@fctc/sme-widget-ui 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.js +14 -10
- package/dist/icons.mjs +14 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +888 -694
- package/dist/index.mjs +807 -614
- package/dist/widgets.d.mts +3 -1
- package/dist/widgets.d.ts +3 -1
- package/dist/widgets.js +888 -694
- package/dist/widgets.mjs +807 -614
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5636,26 +5636,30 @@ import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
|
5636
5636
|
var EyeIcon = () => /* @__PURE__ */ jsxs6(
|
|
5637
5637
|
"svg",
|
|
5638
5638
|
{
|
|
5639
|
-
width: "20",
|
|
5640
|
-
height: "21",
|
|
5641
|
-
viewBox: "0 0 20 21",
|
|
5642
|
-
fill: "none",
|
|
5643
5639
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5640
|
+
width: "16",
|
|
5641
|
+
height: "16",
|
|
5642
|
+
viewBox: "0 0 16 16",
|
|
5643
|
+
fill: "none",
|
|
5644
5644
|
children: [
|
|
5645
5645
|
/* @__PURE__ */ jsx16(
|
|
5646
5646
|
"path",
|
|
5647
5647
|
{
|
|
5648
|
-
d: "
|
|
5649
|
-
stroke: "#
|
|
5650
|
-
strokeWidth: "1.5"
|
|
5648
|
+
d: "M10.3866 7.99995C10.3866 9.31995 9.31995 10.3866 7.99995 10.3866C6.67995 10.3866 5.61328 9.31995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C9.31995 5.61328 10.3866 6.67995 10.3866 7.99995Z",
|
|
5649
|
+
stroke: "#646566",
|
|
5650
|
+
strokeWidth: "1.5",
|
|
5651
|
+
strokeLinecap: "round",
|
|
5652
|
+
strokeLinejoin: "round"
|
|
5651
5653
|
}
|
|
5652
5654
|
),
|
|
5653
5655
|
/* @__PURE__ */ jsx16(
|
|
5654
5656
|
"path",
|
|
5655
5657
|
{
|
|
5656
|
-
d: "
|
|
5657
|
-
stroke: "#
|
|
5658
|
-
strokeWidth: "1.5"
|
|
5658
|
+
d: "M7.9999 13.5138C10.3532 13.5138 12.5466 12.1271 14.0732 9.72714C14.6732 8.78714 14.6732 7.20714 14.0732 6.26714C12.5466 3.86714 10.3532 2.48047 7.9999 2.48047C5.64656 2.48047 3.45323 3.86714 1.92656 6.26714C1.32656 7.20714 1.32656 8.78714 1.92656 9.72714C3.45323 12.1271 5.64656 13.5138 7.9999 13.5138Z",
|
|
5659
|
+
stroke: "#646566",
|
|
5660
|
+
strokeWidth: "1.5",
|
|
5661
|
+
strokeLinecap: "round",
|
|
5662
|
+
strokeLinejoin: "round"
|
|
5659
5663
|
}
|
|
5660
5664
|
)
|
|
5661
5665
|
]
|
|
@@ -17237,8 +17241,196 @@ var CharField = (props) => {
|
|
|
17237
17241
|
);
|
|
17238
17242
|
};
|
|
17239
17243
|
|
|
17240
|
-
// src/widgets/basic/
|
|
17244
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17245
|
+
import { useEffect as useEffect12, useMemo as useMemo5, useState as useState11 } from "react";
|
|
17246
|
+
|
|
17247
|
+
// src/icons/eye-hidden-icon.tsx
|
|
17241
17248
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
17249
|
+
var EyeHiddenIcon = () => {
|
|
17250
|
+
return /* @__PURE__ */ jsx79(
|
|
17251
|
+
"svg",
|
|
17252
|
+
{
|
|
17253
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17254
|
+
width: "16",
|
|
17255
|
+
height: "16",
|
|
17256
|
+
viewBox: "0 0 16 16",
|
|
17257
|
+
fill: "none",
|
|
17258
|
+
children: /* @__PURE__ */ jsx79(
|
|
17259
|
+
"path",
|
|
17260
|
+
{
|
|
17261
|
+
d: "M2.02273 4.37106C1.85957 3.99034 1.41866 3.81398 1.03793 3.97715C0.657212 4.14031 0.480849 4.58122 0.644015 4.96194L1.33337 4.6665L2.02273 4.37106ZM10.3915 8.88564L10.1168 8.18775L10.1168 8.18775L10.3915 8.88564ZM6.23722 9.29468C6.46313 8.94749 6.36481 8.48291 6.01762 8.257C5.67043 8.03109 5.20585 8.12941 4.97994 8.4766L5.60858 8.88564L6.23722 9.29468ZM4.03807 9.92413C3.81216 10.2713 3.91048 10.7359 4.25767 10.9618C4.60486 11.1877 5.06944 11.0894 5.29535 10.7422L4.66671 10.3332L4.03807 9.92413ZM15.3561 4.96194C15.5192 4.58122 15.3429 4.14031 14.9621 3.97715C14.5814 3.81398 14.1405 3.99034 13.9773 4.37106L14.6667 4.6665L15.3561 4.96194ZM12.6667 7.41906L12.1534 6.87221H12.1534L12.6667 7.41906ZM13.1364 8.94939C13.4293 9.24229 13.9041 9.24229 14.197 8.94939C14.4899 8.6565 14.4899 8.18163 14.197 7.88873L13.6667 8.41906L13.1364 8.94939ZM7.25004 10.9998C7.25004 11.4141 7.58583 11.7498 8.00004 11.7498C8.41425 11.7498 8.75004 11.4141 8.75004 10.9998H8.00004H7.25004ZM10.7047 10.7422C10.9306 11.0894 11.3952 11.1877 11.7424 10.9618C12.0896 10.7359 12.1879 10.2713 11.962 9.92413L11.3334 10.3332L10.7047 10.7422ZM3.8637 7.94939C4.1566 7.6565 4.1566 7.18163 3.8637 6.88873C3.57081 6.59584 3.09594 6.59584 2.80304 6.88873L3.33337 7.41906L3.8637 7.94939ZM1.80304 7.88873C1.51015 8.18163 1.51015 8.6565 1.80304 8.94939C2.09594 9.24229 2.57081 9.24229 2.8637 8.94939L2.33337 8.41906L1.80304 7.88873ZM8.00004 9.33317V8.58317C5.94282 8.58317 4.46137 7.56111 3.4663 6.4895C2.96899 5.95393 2.60371 5.41601 2.36326 5.01206C2.24346 4.81079 2.15582 4.64476 2.09925 4.53161C2.07099 4.4751 2.05057 4.43196 2.03785 4.40441C2.03149 4.39065 2.02706 4.3808 2.02455 4.37514C2.02329 4.37231 2.02251 4.37054 2.02221 4.36984C2.02206 4.3695 2.02203 4.36942 2.02211 4.36963C2.02216 4.36973 2.02223 4.3699 2.02233 4.37014C2.02239 4.37026 2.02249 4.37049 2.02251 4.37055C2.02262 4.3708 2.02273 4.37106 1.33337 4.6665C0.644015 4.96194 0.644145 4.96225 0.644283 4.96257C0.644339 4.9627 0.644484 4.96304 0.644597 4.9633C0.644822 4.96382 0.645079 4.96442 0.645367 4.96508C0.645943 4.96641 0.646645 4.96803 0.647473 4.96993C0.64913 4.97372 0.651291 4.97864 0.65396 4.98464C0.659298 4.99664 0.666671 5.013 0.6761 5.03341C0.694953 5.07423 0.722061 5.13135 0.757606 5.20243C0.828639 5.3445 0.933705 5.54305 1.07432 5.77928C1.35471 6.25033 1.78109 6.87907 2.36711 7.51018C3.53871 8.7719 5.3906 10.0832 8.00004 10.0832V9.33317ZM10.3915 8.88564L10.1168 8.18775C9.49772 8.43143 8.7951 8.58317 8.00004 8.58317V9.33317V10.0832C8.9916 10.0832 9.88017 9.89291 10.6662 9.58352L10.3915 8.88564ZM5.60858 8.88564L4.97994 8.4766L4.03807 9.92413L4.66671 10.3332L5.29535 10.7422L6.23722 9.29468L5.60858 8.88564ZM14.6667 4.6665C13.9773 4.37106 13.9774 4.37091 13.9775 4.37076C13.9775 4.37072 13.9776 4.37058 13.9776 4.37049C13.9777 4.37032 13.9777 4.37018 13.9778 4.37005C13.9779 4.3698 13.978 4.36964 13.978 4.36957C13.9781 4.36941 13.978 4.36961 13.9777 4.37014C13.9773 4.37121 13.9762 4.37363 13.9745 4.37736C13.9712 4.38483 13.9655 4.39752 13.9573 4.41503C13.941 4.45007 13.915 4.50434 13.8791 4.5747C13.8072 4.71559 13.6963 4.91998 13.5448 5.1631C13.2405 5.65149 12.7799 6.28423 12.1534 6.87221L12.6667 7.41906L13.18 7.96591C13.9259 7.26575 14.4653 6.52221 14.8179 5.95636C14.9949 5.67235 15.1266 5.43013 15.2153 5.25619C15.2597 5.16913 15.2935 5.09893 15.3168 5.04886C15.3285 5.02381 15.3376 5.00378 15.3441 4.98916C15.3474 4.98186 15.35 4.9759 15.352 4.97135C15.353 4.96907 15.3538 4.96714 15.3545 4.96557C15.3548 4.96479 15.3551 4.96409 15.3554 4.96349C15.3555 4.96319 15.3557 4.96291 15.3558 4.96265C15.3558 4.96252 15.3559 4.96234 15.3559 4.96228C15.356 4.96211 15.3561 4.96194 14.6667 4.6665ZM12.6667 7.41906L12.1534 6.87221C11.5987 7.39287 10.9224 7.87068 10.1168 8.18775L10.3915 8.88564L10.6662 9.58352C11.684 9.18292 12.5176 8.58764 13.18 7.96591L12.6667 7.41906ZM12.6667 7.41906L12.1364 7.94939L13.1364 8.94939L13.6667 8.41906L14.197 7.88873L13.197 6.88873L12.6667 7.41906ZM8.00004 9.33317H7.25004V10.9998H8.00004H8.75004V9.33317H8.00004ZM10.3915 8.88564L9.76286 9.29468L10.7047 10.7422L11.3334 10.3332L11.962 9.92413L11.0201 8.4766L10.3915 8.88564ZM3.33337 7.41906L2.80304 6.88873L1.80304 7.88873L2.33337 8.41906L2.8637 8.94939L3.8637 7.94939L3.33337 7.41906Z",
|
|
17262
|
+
fill: "#646566"
|
|
17263
|
+
}
|
|
17264
|
+
)
|
|
17265
|
+
}
|
|
17266
|
+
);
|
|
17267
|
+
};
|
|
17268
|
+
|
|
17269
|
+
// src/widgets/basic/char-field/secure-field.tsx
|
|
17270
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
17271
|
+
function isSensitive(widget) {
|
|
17272
|
+
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
17273
|
+
}
|
|
17274
|
+
function EyeIconComponent({ open }) {
|
|
17275
|
+
return open ? /* @__PURE__ */ jsx80(EyeIcon, {}) : /* @__PURE__ */ jsx80(EyeHiddenIcon, {});
|
|
17276
|
+
}
|
|
17277
|
+
var SecureField = (props) => {
|
|
17278
|
+
const {
|
|
17279
|
+
name: name2,
|
|
17280
|
+
readonly,
|
|
17281
|
+
placeholder,
|
|
17282
|
+
required,
|
|
17283
|
+
invisible,
|
|
17284
|
+
methods,
|
|
17285
|
+
onChange: onChange2,
|
|
17286
|
+
string = name2,
|
|
17287
|
+
widget,
|
|
17288
|
+
min: min3,
|
|
17289
|
+
max: max3,
|
|
17290
|
+
special,
|
|
17291
|
+
upcase,
|
|
17292
|
+
digit,
|
|
17293
|
+
regex,
|
|
17294
|
+
className,
|
|
17295
|
+
value,
|
|
17296
|
+
defaultValue,
|
|
17297
|
+
isForm,
|
|
17298
|
+
isEditTable
|
|
17299
|
+
} = props;
|
|
17300
|
+
const { t: t3 } = useI18n();
|
|
17301
|
+
const getPasswordMessage2 = (min4, max4, upcase2, digit2, special2) => {
|
|
17302
|
+
let message2 = t3("message", { min: min4, max: max4 });
|
|
17303
|
+
if (upcase2 || upcase2 === "0") message2 += t3("upcase", { count: upcase2 });
|
|
17304
|
+
if (digit2 || digit2 === "0") message2 += t3("digit", { count: digit2 });
|
|
17305
|
+
if (special2 || special2 === "0") message2 += t3("special", { count: special2 });
|
|
17306
|
+
return message2;
|
|
17307
|
+
};
|
|
17308
|
+
if (!isForm && !isEditTable) {
|
|
17309
|
+
const propValue = value || defaultValue;
|
|
17310
|
+
return /* @__PURE__ */ jsx80("span", { children: propValue && typeof propValue === "object" ? propValue?.display_name : propValue });
|
|
17311
|
+
}
|
|
17312
|
+
return /* @__PURE__ */ jsx80(
|
|
17313
|
+
Controller,
|
|
17314
|
+
{
|
|
17315
|
+
name: String(name2),
|
|
17316
|
+
control: methods.control,
|
|
17317
|
+
rules: {
|
|
17318
|
+
...required && !invisible ? {
|
|
17319
|
+
required: {
|
|
17320
|
+
value: true,
|
|
17321
|
+
message: `${string} ${t3("must_required")}`
|
|
17322
|
+
}
|
|
17323
|
+
} : {},
|
|
17324
|
+
...(widget === "custom_password" || widget === "password") && regex ? {
|
|
17325
|
+
pattern: {
|
|
17326
|
+
value: new RegExp(regex),
|
|
17327
|
+
message: getPasswordMessage2(min3, max3, upcase, digit, special)
|
|
17328
|
+
}
|
|
17329
|
+
} : {}
|
|
17330
|
+
},
|
|
17331
|
+
render: ({
|
|
17332
|
+
field: { onChange: fieldOnchange, value: value2 },
|
|
17333
|
+
fieldState: { error: error2 }
|
|
17334
|
+
}) => {
|
|
17335
|
+
const { setError, clearErrors } = methods;
|
|
17336
|
+
const [showPlain, setShowPlain] = useState11(false);
|
|
17337
|
+
const realValue = useMemo5(
|
|
17338
|
+
() => typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "",
|
|
17339
|
+
[value2]
|
|
17340
|
+
);
|
|
17341
|
+
const canToggle = isSensitive(widget) && !readonly;
|
|
17342
|
+
const shouldMask = isSensitive(widget) && !showPlain;
|
|
17343
|
+
const isCappedToken = widget === "access_token" || widget === "refresh_token";
|
|
17344
|
+
const maskedDisplay = isCappedToken && shouldMask ? "\u2022".repeat(Math.min(realValue.length, 20)) : "";
|
|
17345
|
+
useEffect12(() => {
|
|
17346
|
+
if (canToggle) setShowPlain(false);
|
|
17347
|
+
}, [canToggle]);
|
|
17348
|
+
useEffect12(() => {
|
|
17349
|
+
if (value2) clearErrors(name2);
|
|
17350
|
+
}, [value2, clearErrors, name2]);
|
|
17351
|
+
return /* @__PURE__ */ jsxs52("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
17352
|
+
isCappedToken && shouldMask && /* @__PURE__ */ jsx80(
|
|
17353
|
+
"div",
|
|
17354
|
+
{
|
|
17355
|
+
className: "pointer-events-none absolute inset-0 p-3 text-sm leading-[1.5] whitespace-pre-wrap",
|
|
17356
|
+
"aria-hidden": "true",
|
|
17357
|
+
children: maskedDisplay
|
|
17358
|
+
}
|
|
17359
|
+
),
|
|
17360
|
+
/* @__PURE__ */ jsx80(
|
|
17361
|
+
"input",
|
|
17362
|
+
{
|
|
17363
|
+
value: realValue,
|
|
17364
|
+
onChange: (e3) => {
|
|
17365
|
+
if (readonly) return;
|
|
17366
|
+
const inputValue = e3.target.value ?? "";
|
|
17367
|
+
fieldOnchange(inputValue);
|
|
17368
|
+
clearErrors(name2);
|
|
17369
|
+
},
|
|
17370
|
+
onBlur: (e3) => {
|
|
17371
|
+
if (readonly) return;
|
|
17372
|
+
const inputValue = (e3.target.value ?? "").trim();
|
|
17373
|
+
if (!inputValue && required && !invisible) {
|
|
17374
|
+
setError(name2, {
|
|
17375
|
+
type: "required",
|
|
17376
|
+
message: `${string} ${t3("must_required")}`
|
|
17377
|
+
});
|
|
17378
|
+
return;
|
|
17379
|
+
}
|
|
17380
|
+
if ((widget === "custom_password" || widget === "password") && regex && !new RegExp(regex).test(inputValue)) {
|
|
17381
|
+
setError(name2, {
|
|
17382
|
+
type: "pattern",
|
|
17383
|
+
message: getPasswordMessage2(
|
|
17384
|
+
min3,
|
|
17385
|
+
max3,
|
|
17386
|
+
upcase,
|
|
17387
|
+
digit,
|
|
17388
|
+
special
|
|
17389
|
+
)
|
|
17390
|
+
});
|
|
17391
|
+
return;
|
|
17392
|
+
}
|
|
17393
|
+
fieldOnchange(inputValue);
|
|
17394
|
+
onChange2 && onChange2(String(name2), inputValue);
|
|
17395
|
+
clearErrors(name2);
|
|
17396
|
+
},
|
|
17397
|
+
readOnly: readonly,
|
|
17398
|
+
disabled: readonly,
|
|
17399
|
+
placeholder,
|
|
17400
|
+
required: !invisible && required,
|
|
17401
|
+
style: {
|
|
17402
|
+
...isCappedToken && shouldMask ? {
|
|
17403
|
+
WebkitTextSecurity: "none",
|
|
17404
|
+
color: "transparent",
|
|
17405
|
+
caretColor: void 0
|
|
17406
|
+
} : shouldMask ? { WebkitTextSecurity: "disc" } : { WebkitTextSecurity: "none" }
|
|
17407
|
+
},
|
|
17408
|
+
onCopy: (e3) => {
|
|
17409
|
+
if (shouldMask) e3.preventDefault();
|
|
17410
|
+
},
|
|
17411
|
+
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
|
|
17412
|
+
bg-[#f7f7f7] border border-[#f7f7f7] rounded-[10px]
|
|
17413
|
+
${readonly ? "!cursor-not-allowed text-[#5c5a5a]" : "!cursor-text"}`
|
|
17414
|
+
}
|
|
17415
|
+
),
|
|
17416
|
+
canToggle && !isCappedToken && /* @__PURE__ */ jsx80(
|
|
17417
|
+
"button",
|
|
17418
|
+
{
|
|
17419
|
+
type: "button",
|
|
17420
|
+
onClick: () => setShowPlain((s4) => !s4),
|
|
17421
|
+
className: "absolute right-[12px] top-[15px] rounded-md text-[#60656c]",
|
|
17422
|
+
children: /* @__PURE__ */ jsx80(EyeIconComponent, { open: showPlain })
|
|
17423
|
+
}
|
|
17424
|
+
),
|
|
17425
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx80("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17426
|
+
] });
|
|
17427
|
+
}
|
|
17428
|
+
}
|
|
17429
|
+
);
|
|
17430
|
+
};
|
|
17431
|
+
|
|
17432
|
+
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17433
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
17242
17434
|
var CheckboxField = (props) => {
|
|
17243
17435
|
const {
|
|
17244
17436
|
name: name2,
|
|
@@ -17253,9 +17445,9 @@ var CheckboxField = (props) => {
|
|
|
17253
17445
|
} = props;
|
|
17254
17446
|
if (!isForm) {
|
|
17255
17447
|
if (name2 === "is_active" || name2 === "active") {
|
|
17256
|
-
return /* @__PURE__ */
|
|
17448
|
+
return /* @__PURE__ */ jsx81(ActiveBadgeField, { type: value });
|
|
17257
17449
|
} else {
|
|
17258
|
-
return /* @__PURE__ */
|
|
17450
|
+
return /* @__PURE__ */ jsx81(
|
|
17259
17451
|
"input",
|
|
17260
17452
|
{
|
|
17261
17453
|
type: "checkbox",
|
|
@@ -17266,12 +17458,12 @@ var CheckboxField = (props) => {
|
|
|
17266
17458
|
);
|
|
17267
17459
|
}
|
|
17268
17460
|
}
|
|
17269
|
-
return /* @__PURE__ */
|
|
17461
|
+
return /* @__PURE__ */ jsx81(
|
|
17270
17462
|
Controller,
|
|
17271
17463
|
{
|
|
17272
17464
|
name: name2 ?? "",
|
|
17273
17465
|
control: methods?.control,
|
|
17274
|
-
render: ({ field }) => /* @__PURE__ */
|
|
17466
|
+
render: ({ field }) => /* @__PURE__ */ jsx81(
|
|
17275
17467
|
"div",
|
|
17276
17468
|
{
|
|
17277
17469
|
className: "flex items-center gap-2",
|
|
@@ -17284,7 +17476,7 @@ var CheckboxField = (props) => {
|
|
|
17284
17476
|
onChange2(name2 ?? "", checked);
|
|
17285
17477
|
}
|
|
17286
17478
|
},
|
|
17287
|
-
children: /* @__PURE__ */
|
|
17479
|
+
children: /* @__PURE__ */ jsx81(
|
|
17288
17480
|
"input",
|
|
17289
17481
|
{
|
|
17290
17482
|
...field,
|
|
@@ -17311,21 +17503,21 @@ var CheckboxField = (props) => {
|
|
|
17311
17503
|
};
|
|
17312
17504
|
|
|
17313
17505
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17314
|
-
import { useEffect as
|
|
17315
|
-
import { Fragment as Fragment19, jsx as
|
|
17506
|
+
import { useEffect as useEffect13, useRef as useRef6, useState as useState12 } from "react";
|
|
17507
|
+
import { Fragment as Fragment19, jsx as jsx82, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
17316
17508
|
var ColorWrapper = (props) => {
|
|
17317
17509
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
17318
17510
|
const { t: t3 } = useI18n();
|
|
17319
|
-
const [selectedColor, setSelectedColor] =
|
|
17320
|
-
const [showFullColors, setIsShowFullColor] =
|
|
17511
|
+
const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
|
|
17512
|
+
const [showFullColors, setIsShowFullColor] = useState12(false);
|
|
17321
17513
|
const pickColorsRef = useRef6(null);
|
|
17322
|
-
|
|
17514
|
+
useEffect13(() => {
|
|
17323
17515
|
setSelectedColor(colors2[defaultColor]);
|
|
17324
17516
|
}, [defaultColor]);
|
|
17325
17517
|
const handleShowFullColors = () => {
|
|
17326
17518
|
setIsShowFullColor(!showFullColors);
|
|
17327
17519
|
};
|
|
17328
|
-
|
|
17520
|
+
useEffect13(() => {
|
|
17329
17521
|
const handleClickOutside = (event) => {
|
|
17330
17522
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17331
17523
|
setIsShowFullColor(false);
|
|
@@ -17336,8 +17528,8 @@ var ColorWrapper = (props) => {
|
|
|
17336
17528
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17337
17529
|
};
|
|
17338
17530
|
}, []);
|
|
17339
|
-
return /* @__PURE__ */
|
|
17340
|
-
/* @__PURE__ */
|
|
17531
|
+
return /* @__PURE__ */ jsx82("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx82("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs53("div", { children: [
|
|
17532
|
+
/* @__PURE__ */ jsx82(
|
|
17341
17533
|
"button",
|
|
17342
17534
|
{
|
|
17343
17535
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17351,7 +17543,7 @@ var ColorWrapper = (props) => {
|
|
|
17351
17543
|
}
|
|
17352
17544
|
}
|
|
17353
17545
|
),
|
|
17354
|
-
/* @__PURE__ */
|
|
17546
|
+
/* @__PURE__ */ jsx82(
|
|
17355
17547
|
M,
|
|
17356
17548
|
{
|
|
17357
17549
|
className: "",
|
|
@@ -17360,8 +17552,8 @@ var ColorWrapper = (props) => {
|
|
|
17360
17552
|
content: t3(color?.name)
|
|
17361
17553
|
}
|
|
17362
17554
|
)
|
|
17363
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17364
|
-
/* @__PURE__ */
|
|
17555
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs53(Fragment19, { children: [
|
|
17556
|
+
/* @__PURE__ */ jsx82(
|
|
17365
17557
|
"button",
|
|
17366
17558
|
{
|
|
17367
17559
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17374,7 +17566,7 @@ var ColorWrapper = (props) => {
|
|
|
17374
17566
|
style: { backgroundColor: selectedColor?.color }
|
|
17375
17567
|
}
|
|
17376
17568
|
),
|
|
17377
|
-
/* @__PURE__ */
|
|
17569
|
+
/* @__PURE__ */ jsx82(
|
|
17378
17570
|
M,
|
|
17379
17571
|
{
|
|
17380
17572
|
place: "top",
|
|
@@ -17386,13 +17578,13 @@ var ColorWrapper = (props) => {
|
|
|
17386
17578
|
};
|
|
17387
17579
|
|
|
17388
17580
|
// src/widgets/basic/color-field/color.tsx
|
|
17389
|
-
import { jsx as
|
|
17581
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
17390
17582
|
var ColorField = (props) => {
|
|
17391
17583
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17392
17584
|
if (!isForm) {
|
|
17393
|
-
return /* @__PURE__ */
|
|
17585
|
+
return /* @__PURE__ */ jsx83(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17394
17586
|
}
|
|
17395
|
-
return /* @__PURE__ */
|
|
17587
|
+
return /* @__PURE__ */ jsx83(
|
|
17396
17588
|
Controller,
|
|
17397
17589
|
{
|
|
17398
17590
|
name: name2 ?? "",
|
|
@@ -17402,7 +17594,7 @@ var ColorField = (props) => {
|
|
|
17402
17594
|
field.onChange(color?.id);
|
|
17403
17595
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17404
17596
|
};
|
|
17405
|
-
return /* @__PURE__ */
|
|
17597
|
+
return /* @__PURE__ */ jsx83(
|
|
17406
17598
|
ColorWrapper,
|
|
17407
17599
|
{
|
|
17408
17600
|
savePickColor: handlePickColorChange,
|
|
@@ -17416,8 +17608,8 @@ var ColorField = (props) => {
|
|
|
17416
17608
|
};
|
|
17417
17609
|
|
|
17418
17610
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17419
|
-
import { useEffect as
|
|
17420
|
-
import { jsx as
|
|
17611
|
+
import { useEffect as useEffect14 } from "react";
|
|
17612
|
+
import { jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
17421
17613
|
var CopyLinkButtonField = (props) => {
|
|
17422
17614
|
const {
|
|
17423
17615
|
isForm,
|
|
@@ -17436,9 +17628,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17436
17628
|
} = props;
|
|
17437
17629
|
const { t: t3 } = useI18n();
|
|
17438
17630
|
if (!isForm) {
|
|
17439
|
-
return /* @__PURE__ */
|
|
17631
|
+
return /* @__PURE__ */ jsx84("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17440
17632
|
}
|
|
17441
|
-
return /* @__PURE__ */
|
|
17633
|
+
return /* @__PURE__ */ jsx84(
|
|
17442
17634
|
Controller,
|
|
17443
17635
|
{
|
|
17444
17636
|
name: name2 ?? "",
|
|
@@ -17451,13 +17643,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17451
17643
|
fieldState: { error: error2 }
|
|
17452
17644
|
}) => {
|
|
17453
17645
|
const { setError, clearErrors } = methods;
|
|
17454
|
-
|
|
17646
|
+
useEffect14(() => {
|
|
17455
17647
|
if (value) {
|
|
17456
17648
|
clearErrors(name2);
|
|
17457
17649
|
}
|
|
17458
17650
|
}, [value]);
|
|
17459
|
-
return /* @__PURE__ */
|
|
17460
|
-
/* @__PURE__ */
|
|
17651
|
+
return /* @__PURE__ */ jsxs54("div", { className: "relative", children: [
|
|
17652
|
+
/* @__PURE__ */ jsxs54(
|
|
17461
17653
|
"div",
|
|
17462
17654
|
{
|
|
17463
17655
|
"aria-disabled": readonly,
|
|
@@ -17466,7 +17658,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17466
17658
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17467
17659
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17468
17660
|
children: [
|
|
17469
|
-
/* @__PURE__ */
|
|
17661
|
+
/* @__PURE__ */ jsx84(
|
|
17470
17662
|
"input",
|
|
17471
17663
|
{
|
|
17472
17664
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17507,19 +17699,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17507
17699
|
`
|
|
17508
17700
|
}
|
|
17509
17701
|
),
|
|
17510
|
-
readonly && value && /* @__PURE__ */
|
|
17702
|
+
readonly && value && /* @__PURE__ */ jsx84(
|
|
17511
17703
|
"button",
|
|
17512
17704
|
{
|
|
17513
17705
|
className: "cursor-pointer",
|
|
17514
17706
|
type: "button",
|
|
17515
17707
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17516
|
-
children: isCopied ? /* @__PURE__ */
|
|
17708
|
+
children: isCopied ? /* @__PURE__ */ jsx84(CheckIcon, {}) : /* @__PURE__ */ jsx84(CopyIcon, {})
|
|
17517
17709
|
}
|
|
17518
17710
|
)
|
|
17519
17711
|
]
|
|
17520
17712
|
}
|
|
17521
17713
|
),
|
|
17522
|
-
error2 && /* @__PURE__ */
|
|
17714
|
+
error2 && /* @__PURE__ */ jsx84("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17523
17715
|
] });
|
|
17524
17716
|
}
|
|
17525
17717
|
}
|
|
@@ -17527,10 +17719,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17527
17719
|
};
|
|
17528
17720
|
|
|
17529
17721
|
// src/widgets/basic/date-field/date.tsx
|
|
17530
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
17722
|
+
import { forwardRef as forwardRef6, useEffect as useEffect18 } from "react";
|
|
17531
17723
|
|
|
17532
17724
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17533
|
-
import
|
|
17725
|
+
import React10, { useRef as useRef10, useCallback as useCallback5, useEffect as useEffect16, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
17534
17726
|
|
|
17535
17727
|
// node_modules/date-fns/constants.js
|
|
17536
17728
|
var daysInYear = 365.2425;
|
|
@@ -21428,22 +21620,22 @@ function subYears(date, amount, options2) {
|
|
|
21428
21620
|
}
|
|
21429
21621
|
|
|
21430
21622
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21431
|
-
import * as
|
|
21623
|
+
import * as React9 from "react";
|
|
21432
21624
|
|
|
21433
21625
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
21434
|
-
import * as
|
|
21626
|
+
import * as React7 from "react";
|
|
21435
21627
|
import { useLayoutEffect } from "react";
|
|
21436
21628
|
var isClient = typeof document !== "undefined";
|
|
21437
21629
|
var noop2 = function noop3() {
|
|
21438
21630
|
};
|
|
21439
21631
|
var index = isClient ? useLayoutEffect : noop2;
|
|
21440
21632
|
var SafeReact = {
|
|
21441
|
-
...
|
|
21633
|
+
...React7
|
|
21442
21634
|
};
|
|
21443
21635
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
21444
21636
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
21445
21637
|
function useEffectEvent(callback) {
|
|
21446
|
-
const ref =
|
|
21638
|
+
const ref = React7.useRef(() => {
|
|
21447
21639
|
if (process.env.NODE_ENV !== "production") {
|
|
21448
21640
|
throw new Error("Cannot call an event handler while rendering.");
|
|
21449
21641
|
}
|
|
@@ -21451,7 +21643,7 @@ function useEffectEvent(callback) {
|
|
|
21451
21643
|
useSafeInsertionEffect(() => {
|
|
21452
21644
|
ref.current = callback;
|
|
21453
21645
|
});
|
|
21454
|
-
return
|
|
21646
|
+
return React7.useCallback(function() {
|
|
21455
21647
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21456
21648
|
args[_key] = arguments[_key];
|
|
21457
21649
|
}
|
|
@@ -21460,11 +21652,11 @@ function useEffectEvent(callback) {
|
|
|
21460
21652
|
}
|
|
21461
21653
|
|
|
21462
21654
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21463
|
-
import { jsx as
|
|
21655
|
+
import { jsx as jsx85, jsxs as jsxs55, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
21464
21656
|
import * as ReactDOM2 from "react-dom";
|
|
21465
21657
|
|
|
21466
21658
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
21467
|
-
import * as
|
|
21659
|
+
import * as React8 from "react";
|
|
21468
21660
|
import { useLayoutEffect as useLayoutEffect2 } from "react";
|
|
21469
21661
|
import * as ReactDOM from "react-dom";
|
|
21470
21662
|
var isClient2 = typeof document !== "undefined";
|
|
@@ -21530,7 +21722,7 @@ function roundByDPR(element, value) {
|
|
|
21530
21722
|
return Math.round(value * dpr) / dpr;
|
|
21531
21723
|
}
|
|
21532
21724
|
function useLatestRef(value) {
|
|
21533
|
-
const ref =
|
|
21725
|
+
const ref = React8.useRef(value);
|
|
21534
21726
|
index2(() => {
|
|
21535
21727
|
ref.current = value;
|
|
21536
21728
|
});
|
|
@@ -21553,7 +21745,7 @@ function useFloating(options2) {
|
|
|
21553
21745
|
whileElementsMounted,
|
|
21554
21746
|
open
|
|
21555
21747
|
} = options2;
|
|
21556
|
-
const [data, setData] =
|
|
21748
|
+
const [data, setData] = React8.useState({
|
|
21557
21749
|
x: 0,
|
|
21558
21750
|
y: 0,
|
|
21559
21751
|
strategy,
|
|
@@ -21561,19 +21753,19 @@ function useFloating(options2) {
|
|
|
21561
21753
|
middlewareData: {},
|
|
21562
21754
|
isPositioned: false
|
|
21563
21755
|
});
|
|
21564
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
21756
|
+
const [latestMiddleware, setLatestMiddleware] = React8.useState(middleware2);
|
|
21565
21757
|
if (!deepEqual2(latestMiddleware, middleware2)) {
|
|
21566
21758
|
setLatestMiddleware(middleware2);
|
|
21567
21759
|
}
|
|
21568
|
-
const [_reference, _setReference] =
|
|
21569
|
-
const [_floating, _setFloating] =
|
|
21570
|
-
const setReference =
|
|
21760
|
+
const [_reference, _setReference] = React8.useState(null);
|
|
21761
|
+
const [_floating, _setFloating] = React8.useState(null);
|
|
21762
|
+
const setReference = React8.useCallback((node2) => {
|
|
21571
21763
|
if (node2 !== referenceRef.current) {
|
|
21572
21764
|
referenceRef.current = node2;
|
|
21573
21765
|
_setReference(node2);
|
|
21574
21766
|
}
|
|
21575
21767
|
}, []);
|
|
21576
|
-
const setFloating =
|
|
21768
|
+
const setFloating = React8.useCallback((node2) => {
|
|
21577
21769
|
if (node2 !== floatingRef.current) {
|
|
21578
21770
|
floatingRef.current = node2;
|
|
21579
21771
|
_setFloating(node2);
|
|
@@ -21581,14 +21773,14 @@ function useFloating(options2) {
|
|
|
21581
21773
|
}, []);
|
|
21582
21774
|
const referenceEl = externalReference || _reference;
|
|
21583
21775
|
const floatingEl = externalFloating || _floating;
|
|
21584
|
-
const referenceRef =
|
|
21585
|
-
const floatingRef =
|
|
21586
|
-
const dataRef =
|
|
21776
|
+
const referenceRef = React8.useRef(null);
|
|
21777
|
+
const floatingRef = React8.useRef(null);
|
|
21778
|
+
const dataRef = React8.useRef(data);
|
|
21587
21779
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
21588
21780
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
21589
21781
|
const platformRef = useLatestRef(platform2);
|
|
21590
21782
|
const openRef = useLatestRef(open);
|
|
21591
|
-
const update =
|
|
21783
|
+
const update = React8.useCallback(() => {
|
|
21592
21784
|
if (!referenceRef.current || !floatingRef.current) {
|
|
21593
21785
|
return;
|
|
21594
21786
|
}
|
|
@@ -21626,7 +21818,7 @@ function useFloating(options2) {
|
|
|
21626
21818
|
}));
|
|
21627
21819
|
}
|
|
21628
21820
|
}, [open]);
|
|
21629
|
-
const isMountedRef =
|
|
21821
|
+
const isMountedRef = React8.useRef(false);
|
|
21630
21822
|
index2(() => {
|
|
21631
21823
|
isMountedRef.current = true;
|
|
21632
21824
|
return () => {
|
|
@@ -21643,17 +21835,17 @@ function useFloating(options2) {
|
|
|
21643
21835
|
update();
|
|
21644
21836
|
}
|
|
21645
21837
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
21646
|
-
const refs =
|
|
21838
|
+
const refs = React8.useMemo(() => ({
|
|
21647
21839
|
reference: referenceRef,
|
|
21648
21840
|
floating: floatingRef,
|
|
21649
21841
|
setReference,
|
|
21650
21842
|
setFloating
|
|
21651
21843
|
}), [setReference, setFloating]);
|
|
21652
|
-
const elements =
|
|
21844
|
+
const elements = React8.useMemo(() => ({
|
|
21653
21845
|
reference: referenceEl,
|
|
21654
21846
|
floating: floatingEl
|
|
21655
21847
|
}), [referenceEl, floatingEl]);
|
|
21656
|
-
const floatingStyles =
|
|
21848
|
+
const floatingStyles = React8.useMemo(() => {
|
|
21657
21849
|
const initialStyles = {
|
|
21658
21850
|
position: strategy,
|
|
21659
21851
|
left: 0,
|
|
@@ -21679,7 +21871,7 @@ function useFloating(options2) {
|
|
|
21679
21871
|
top: y3
|
|
21680
21872
|
};
|
|
21681
21873
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
21682
|
-
return
|
|
21874
|
+
return React8.useMemo(() => ({
|
|
21683
21875
|
...data,
|
|
21684
21876
|
update,
|
|
21685
21877
|
refs,
|
|
@@ -21740,7 +21932,7 @@ var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
|
|
|
21740
21932
|
var verticalKeys = [ARROW_UP, ARROW_DOWN];
|
|
21741
21933
|
var allKeys = [...horizontalKeys, ...verticalKeys];
|
|
21742
21934
|
var SafeReact2 = {
|
|
21743
|
-
...
|
|
21935
|
+
...React9
|
|
21744
21936
|
};
|
|
21745
21937
|
var serverHandoffComplete = false;
|
|
21746
21938
|
var count = 0;
|
|
@@ -21750,13 +21942,13 @@ var genId = () => (
|
|
|
21750
21942
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
21751
21943
|
);
|
|
21752
21944
|
function useFloatingId() {
|
|
21753
|
-
const [id, setId] =
|
|
21945
|
+
const [id, setId] = React9.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
21754
21946
|
index(() => {
|
|
21755
21947
|
if (id == null) {
|
|
21756
21948
|
setId(genId());
|
|
21757
21949
|
}
|
|
21758
21950
|
}, []);
|
|
21759
|
-
|
|
21951
|
+
React9.useEffect(() => {
|
|
21760
21952
|
serverHandoffComplete = true;
|
|
21761
21953
|
}, []);
|
|
21762
21954
|
return id;
|
|
@@ -21791,7 +21983,7 @@ function error() {
|
|
|
21791
21983
|
console.error(message2);
|
|
21792
21984
|
}
|
|
21793
21985
|
}
|
|
21794
|
-
var FloatingArrow = /* @__PURE__ */
|
|
21986
|
+
var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(props, ref) {
|
|
21795
21987
|
const {
|
|
21796
21988
|
context: {
|
|
21797
21989
|
placement,
|
|
@@ -21822,7 +22014,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21822
22014
|
}
|
|
21823
22015
|
}
|
|
21824
22016
|
const clipPathId = useId();
|
|
21825
|
-
const [isRTL2, setIsRTL] =
|
|
22017
|
+
const [isRTL2, setIsRTL] = React9.useState(false);
|
|
21826
22018
|
index(() => {
|
|
21827
22019
|
if (!floating) return;
|
|
21828
22020
|
const isRTL3 = getComputedStyle2(floating).direction === "rtl";
|
|
@@ -21858,7 +22050,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21858
22050
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21859
22051
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21860
22052
|
}[side];
|
|
21861
|
-
return /* @__PURE__ */
|
|
22053
|
+
return /* @__PURE__ */ jsxs55("svg", {
|
|
21862
22054
|
...rest,
|
|
21863
22055
|
"aria-hidden": true,
|
|
21864
22056
|
ref,
|
|
@@ -21874,18 +22066,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21874
22066
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21875
22067
|
...restStyle
|
|
21876
22068
|
},
|
|
21877
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
22069
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx85("path", {
|
|
21878
22070
|
clipPath: "url(#" + clipPathId + ")",
|
|
21879
22071
|
fill: "none",
|
|
21880
22072
|
stroke,
|
|
21881
22073
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21882
22074
|
d: dValue
|
|
21883
|
-
}), /* @__PURE__ */
|
|
22075
|
+
}), /* @__PURE__ */ jsx85("path", {
|
|
21884
22076
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21885
22077
|
d: dValue
|
|
21886
|
-
}), /* @__PURE__ */
|
|
22078
|
+
}), /* @__PURE__ */ jsx85("clipPath", {
|
|
21887
22079
|
id: clipPathId,
|
|
21888
|
-
children: /* @__PURE__ */
|
|
22080
|
+
children: /* @__PURE__ */ jsx85("rect", {
|
|
21889
22081
|
x: -halfStrokeWidth,
|
|
21890
22082
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21891
22083
|
width: width + computedStrokeWidth,
|
|
@@ -21913,13 +22105,13 @@ function createEventEmitter() {
|
|
|
21913
22105
|
}
|
|
21914
22106
|
};
|
|
21915
22107
|
}
|
|
21916
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
21917
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
22108
|
+
var FloatingNodeContext = /* @__PURE__ */ React9.createContext(null);
|
|
22109
|
+
var FloatingTreeContext = /* @__PURE__ */ React9.createContext(null);
|
|
21918
22110
|
var useFloatingParentNodeId = () => {
|
|
21919
22111
|
var _React$useContext;
|
|
21920
|
-
return ((_React$useContext =
|
|
22112
|
+
return ((_React$useContext = React9.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
21921
22113
|
};
|
|
21922
|
-
var useFloatingTree = () =>
|
|
22114
|
+
var useFloatingTree = () => React9.useContext(FloatingTreeContext);
|
|
21923
22115
|
function useFloatingRootContext(options2) {
|
|
21924
22116
|
const {
|
|
21925
22117
|
open = false,
|
|
@@ -21927,8 +22119,8 @@ function useFloatingRootContext(options2) {
|
|
|
21927
22119
|
elements: elementsProp
|
|
21928
22120
|
} = options2;
|
|
21929
22121
|
const floatingId = useId();
|
|
21930
|
-
const dataRef =
|
|
21931
|
-
const [events] =
|
|
22122
|
+
const dataRef = React9.useRef({});
|
|
22123
|
+
const [events] = React9.useState(() => createEventEmitter());
|
|
21932
22124
|
const nested = useFloatingParentNodeId() != null;
|
|
21933
22125
|
if (process.env.NODE_ENV !== "production") {
|
|
21934
22126
|
const optionDomReference = elementsProp.reference;
|
|
@@ -21936,7 +22128,7 @@ function useFloatingRootContext(options2) {
|
|
|
21936
22128
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
21937
22129
|
}
|
|
21938
22130
|
}
|
|
21939
|
-
const [positionReference, setPositionReference] =
|
|
22131
|
+
const [positionReference, setPositionReference] = React9.useState(elementsProp.reference);
|
|
21940
22132
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
21941
22133
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
21942
22134
|
events.emit("openchange", {
|
|
@@ -21947,15 +22139,15 @@ function useFloatingRootContext(options2) {
|
|
|
21947
22139
|
});
|
|
21948
22140
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
21949
22141
|
});
|
|
21950
|
-
const refs =
|
|
22142
|
+
const refs = React9.useMemo(() => ({
|
|
21951
22143
|
setPositionReference
|
|
21952
22144
|
}), []);
|
|
21953
|
-
const elements =
|
|
22145
|
+
const elements = React9.useMemo(() => ({
|
|
21954
22146
|
reference: positionReference || elementsProp.reference || null,
|
|
21955
22147
|
floating: elementsProp.floating || null,
|
|
21956
22148
|
domReference: elementsProp.reference
|
|
21957
22149
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
21958
|
-
return
|
|
22150
|
+
return React9.useMemo(() => ({
|
|
21959
22151
|
dataRef,
|
|
21960
22152
|
open,
|
|
21961
22153
|
onOpenChange,
|
|
@@ -21982,11 +22174,11 @@ function useFloating2(options2) {
|
|
|
21982
22174
|
});
|
|
21983
22175
|
const rootContext = options2.rootContext || internalRootContext;
|
|
21984
22176
|
const computedElements = rootContext.elements;
|
|
21985
|
-
const [_domReference, setDomReference] =
|
|
21986
|
-
const [positionReference, _setPositionReference] =
|
|
22177
|
+
const [_domReference, setDomReference] = React9.useState(null);
|
|
22178
|
+
const [positionReference, _setPositionReference] = React9.useState(null);
|
|
21987
22179
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
21988
22180
|
const domReference = optionDomReference || _domReference;
|
|
21989
|
-
const domReferenceRef =
|
|
22181
|
+
const domReferenceRef = React9.useRef(null);
|
|
21990
22182
|
const tree = useFloatingTree();
|
|
21991
22183
|
index(() => {
|
|
21992
22184
|
if (domReference) {
|
|
@@ -22002,7 +22194,7 @@ function useFloating2(options2) {
|
|
|
22002
22194
|
}
|
|
22003
22195
|
}
|
|
22004
22196
|
});
|
|
22005
|
-
const setPositionReference =
|
|
22197
|
+
const setPositionReference = React9.useCallback((node2) => {
|
|
22006
22198
|
const computedPositionReference = isElement(node2) ? {
|
|
22007
22199
|
getBoundingClientRect: () => node2.getBoundingClientRect(),
|
|
22008
22200
|
getClientRects: () => node2.getClientRects(),
|
|
@@ -22011,7 +22203,7 @@ function useFloating2(options2) {
|
|
|
22011
22203
|
_setPositionReference(computedPositionReference);
|
|
22012
22204
|
position2.refs.setReference(computedPositionReference);
|
|
22013
22205
|
}, [position2.refs]);
|
|
22014
|
-
const setReference =
|
|
22206
|
+
const setReference = React9.useCallback((node2) => {
|
|
22015
22207
|
if (isElement(node2) || node2 === null) {
|
|
22016
22208
|
domReferenceRef.current = node2;
|
|
22017
22209
|
setDomReference(node2);
|
|
@@ -22023,17 +22215,17 @@ function useFloating2(options2) {
|
|
|
22023
22215
|
position2.refs.setReference(node2);
|
|
22024
22216
|
}
|
|
22025
22217
|
}, [position2.refs]);
|
|
22026
|
-
const refs =
|
|
22218
|
+
const refs = React9.useMemo(() => ({
|
|
22027
22219
|
...position2.refs,
|
|
22028
22220
|
setReference,
|
|
22029
22221
|
setPositionReference,
|
|
22030
22222
|
domReference: domReferenceRef
|
|
22031
22223
|
}), [position2.refs, setReference, setPositionReference]);
|
|
22032
|
-
const elements =
|
|
22224
|
+
const elements = React9.useMemo(() => ({
|
|
22033
22225
|
...position2.elements,
|
|
22034
22226
|
domReference
|
|
22035
22227
|
}), [position2.elements, domReference]);
|
|
22036
|
-
const context =
|
|
22228
|
+
const context = React9.useMemo(() => ({
|
|
22037
22229
|
...position2,
|
|
22038
22230
|
...rootContext,
|
|
22039
22231
|
refs,
|
|
@@ -22047,7 +22239,7 @@ function useFloating2(options2) {
|
|
|
22047
22239
|
node2.context = context;
|
|
22048
22240
|
}
|
|
22049
22241
|
});
|
|
22050
|
-
return
|
|
22242
|
+
return React9.useMemo(() => ({
|
|
22051
22243
|
...position2,
|
|
22052
22244
|
context,
|
|
22053
22245
|
refs,
|
|
@@ -22097,7 +22289,7 @@ function __spreadArray(to2, from2, pack) {
|
|
|
22097
22289
|
var CalendarContainer = function(_a2) {
|
|
22098
22290
|
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;
|
|
22099
22291
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
22100
|
-
return
|
|
22292
|
+
return React10.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22101
22293
|
};
|
|
22102
22294
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22103
22295
|
var ref = useRef10(null);
|
|
@@ -22114,7 +22306,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22114
22306
|
}
|
|
22115
22307
|
}
|
|
22116
22308
|
}, [ignoreClass]);
|
|
22117
|
-
|
|
22309
|
+
useEffect16(function() {
|
|
22118
22310
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22119
22311
|
return function() {
|
|
22120
22312
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -22125,7 +22317,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22125
22317
|
var ClickOutsideWrapper = function(_a2) {
|
|
22126
22318
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
22127
22319
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
22128
|
-
return
|
|
22320
|
+
return React10.createElement("div", { className, style, ref: function(node2) {
|
|
22129
22321
|
detectRef.current = node2;
|
|
22130
22322
|
if (containerRef) {
|
|
22131
22323
|
containerRef.current = node2;
|
|
@@ -22721,7 +22913,7 @@ var InputTime = (
|
|
|
22721
22913
|
__extends(InputTime2, _super);
|
|
22722
22914
|
function InputTime2(props) {
|
|
22723
22915
|
var _this = _super.call(this, props) || this;
|
|
22724
|
-
_this.inputRef =
|
|
22916
|
+
_this.inputRef = React10.createRef();
|
|
22725
22917
|
_this.onTimeChange = function(time) {
|
|
22726
22918
|
var _a2, _b;
|
|
22727
22919
|
_this.setState({ time });
|
|
@@ -22745,7 +22937,7 @@ var InputTime = (
|
|
|
22745
22937
|
onChange: _this.onTimeChange
|
|
22746
22938
|
});
|
|
22747
22939
|
}
|
|
22748
|
-
return
|
|
22940
|
+
return React10.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
22749
22941
|
var _a3;
|
|
22750
22942
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
22751
22943
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -22766,14 +22958,14 @@ var InputTime = (
|
|
|
22766
22958
|
return null;
|
|
22767
22959
|
};
|
|
22768
22960
|
InputTime2.prototype.render = function() {
|
|
22769
|
-
return
|
|
22961
|
+
return React10.createElement(
|
|
22770
22962
|
"div",
|
|
22771
22963
|
{ className: "react-datepicker__input-time-container" },
|
|
22772
|
-
|
|
22773
|
-
|
|
22964
|
+
React10.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
22965
|
+
React10.createElement(
|
|
22774
22966
|
"div",
|
|
22775
22967
|
{ className: "react-datepicker-time__input-container" },
|
|
22776
|
-
|
|
22968
|
+
React10.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
22777
22969
|
)
|
|
22778
22970
|
);
|
|
22779
22971
|
};
|
|
@@ -23021,11 +23213,11 @@ var Day = (
|
|
|
23021
23213
|
_this.render = function() {
|
|
23022
23214
|
return (
|
|
23023
23215
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
23024
|
-
|
|
23216
|
+
React10.createElement(
|
|
23025
23217
|
"div",
|
|
23026
23218
|
{ 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() },
|
|
23027
23219
|
_this.renderDayContents(),
|
|
23028
|
-
_this.getTitle() !== "" &&
|
|
23220
|
+
_this.getTitle() !== "" && React10.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
23029
23221
|
)
|
|
23030
23222
|
);
|
|
23031
23223
|
};
|
|
@@ -23134,7 +23326,7 @@ var WeekNumber = (
|
|
|
23134
23326
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
23135
23327
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
23136
23328
|
};
|
|
23137
|
-
return
|
|
23329
|
+
return React10.createElement("div", { ref: this.weekNumberEl, className: clsx(weekNumberClasses), "aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex() }, weekNumber);
|
|
23138
23330
|
};
|
|
23139
23331
|
return WeekNumber2;
|
|
23140
23332
|
}(Component)
|
|
@@ -23211,11 +23403,11 @@ var Week = (
|
|
|
23211
23403
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
23212
23404
|
if (_this.props.showWeekNumber) {
|
|
23213
23405
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
23214
|
-
days.push(
|
|
23406
|
+
days.push(React10.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
23215
23407
|
}
|
|
23216
23408
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
23217
23409
|
var day = addDays(startOfWeek2, offset4);
|
|
23218
|
-
return
|
|
23410
|
+
return React10.createElement(Day, _assign({}, Week2.defaultProps, _this.props, { ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix, key: day.valueOf(), day, onClick: _this.handleDayClick.bind(_this, day), onMouseEnter: _this.handleDayMouseEnter.bind(_this, day) }));
|
|
23219
23411
|
}));
|
|
23220
23412
|
};
|
|
23221
23413
|
_this.startOfWeek = function() {
|
|
@@ -23241,7 +23433,7 @@ var Week = (
|
|
|
23241
23433
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
23242
23434
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
23243
23435
|
};
|
|
23244
|
-
return
|
|
23436
|
+
return React10.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
23245
23437
|
};
|
|
23246
23438
|
return Week2;
|
|
23247
23439
|
}(Component)
|
|
@@ -23469,7 +23661,7 @@ var Month = (
|
|
|
23469
23661
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
23470
23662
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
23471
23663
|
while (true) {
|
|
23472
|
-
weeks.push(
|
|
23664
|
+
weeks.push(React10.createElement(Week, _assign({}, _this.props, { ariaLabelPrefix: _this.props.weekAriaLabelPrefix, key: i3, day: currentWeekStart, month: getMonth(_this.props.day), onDayClick: _this.handleDayClick, onDayMouseEnter: _this.handleDayMouseEnter, selected, preSelection, showWeekNumber: _this.props.showWeekNumbers })));
|
|
23473
23665
|
if (breakAfterNextPush)
|
|
23474
23666
|
break;
|
|
23475
23667
|
i3++;
|
|
@@ -23738,8 +23930,8 @@ var Month = (
|
|
|
23738
23930
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
23739
23931
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
23740
23932
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
23741
|
-
return
|
|
23742
|
-
return
|
|
23933
|
+
return React10.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23934
|
+
return React10.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
23743
23935
|
_this.onMonthClick(event, m);
|
|
23744
23936
|
}, onKeyDown: function(event) {
|
|
23745
23937
|
if (isSpaceKeyDown(event)) {
|
|
@@ -23758,8 +23950,8 @@ var Month = (
|
|
|
23758
23950
|
_this.renderQuarters = function() {
|
|
23759
23951
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
23760
23952
|
var quarters = [1, 2, 3, 4];
|
|
23761
|
-
return
|
|
23762
|
-
return
|
|
23953
|
+
return React10.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
23954
|
+
return React10.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
23763
23955
|
_this.onQuarterClick(event, q3);
|
|
23764
23956
|
}, onKeyDown: function(event) {
|
|
23765
23957
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -23791,7 +23983,7 @@ var Month = (
|
|
|
23791
23983
|
Month2.prototype.render = function() {
|
|
23792
23984
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
23793
23985
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
23794
|
-
return
|
|
23986
|
+
return React10.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : void 0, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : void 0, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
23795
23987
|
};
|
|
23796
23988
|
return Month2;
|
|
23797
23989
|
}(Component)
|
|
@@ -23807,10 +23999,10 @@ var MonthDropdownOptions = (
|
|
|
23807
23999
|
};
|
|
23808
24000
|
_this.renderOptions = function() {
|
|
23809
24001
|
return _this.props.monthNames.map(function(month, i3) {
|
|
23810
|
-
return
|
|
24002
|
+
return React10.createElement(
|
|
23811
24003
|
"div",
|
|
23812
24004
|
{ 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 },
|
|
23813
|
-
_this.isSelectedMonth(i3) ?
|
|
24005
|
+
_this.isSelectedMonth(i3) ? React10.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
23814
24006
|
month
|
|
23815
24007
|
);
|
|
23816
24008
|
});
|
|
@@ -23824,7 +24016,7 @@ var MonthDropdownOptions = (
|
|
|
23824
24016
|
return _this;
|
|
23825
24017
|
}
|
|
23826
24018
|
MonthDropdownOptions2.prototype.render = function() {
|
|
23827
|
-
return
|
|
24019
|
+
return React10.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23828
24020
|
};
|
|
23829
24021
|
return MonthDropdownOptions2;
|
|
23830
24022
|
}(Component)
|
|
@@ -23840,24 +24032,24 @@ var MonthDropdown = (
|
|
|
23840
24032
|
};
|
|
23841
24033
|
_this.renderSelectOptions = function(monthNames) {
|
|
23842
24034
|
return monthNames.map(function(m, i3) {
|
|
23843
|
-
return
|
|
24035
|
+
return React10.createElement("option", { key: m, value: i3 }, m);
|
|
23844
24036
|
});
|
|
23845
24037
|
};
|
|
23846
24038
|
_this.renderSelectMode = function(monthNames) {
|
|
23847
|
-
return
|
|
24039
|
+
return React10.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
23848
24040
|
return _this.onChange(parseInt(e3.target.value));
|
|
23849
24041
|
} }, _this.renderSelectOptions(monthNames));
|
|
23850
24042
|
};
|
|
23851
24043
|
_this.renderReadView = function(visible, monthNames) {
|
|
23852
|
-
return
|
|
24044
|
+
return React10.createElement(
|
|
23853
24045
|
"div",
|
|
23854
24046
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
23855
|
-
|
|
23856
|
-
|
|
24047
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
24048
|
+
React10.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
23857
24049
|
);
|
|
23858
24050
|
};
|
|
23859
24051
|
_this.renderDropdown = function(monthNames) {
|
|
23860
|
-
return
|
|
24052
|
+
return React10.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23861
24053
|
};
|
|
23862
24054
|
_this.renderScrollMode = function(monthNames) {
|
|
23863
24055
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -23896,7 +24088,7 @@ var MonthDropdown = (
|
|
|
23896
24088
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
23897
24089
|
break;
|
|
23898
24090
|
}
|
|
23899
|
-
return
|
|
24091
|
+
return React10.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
23900
24092
|
};
|
|
23901
24093
|
return MonthDropdown2;
|
|
23902
24094
|
}(Component)
|
|
@@ -23921,10 +24113,10 @@ var MonthYearDropdownOptions = (
|
|
|
23921
24113
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
23922
24114
|
var monthYearPoint = getTime(monthYear);
|
|
23923
24115
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
23924
|
-
return
|
|
24116
|
+
return React10.createElement(
|
|
23925
24117
|
"div",
|
|
23926
24118
|
{ 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 },
|
|
23927
|
-
isSameMonthYear ?
|
|
24119
|
+
isSameMonthYear ? React10.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
23928
24120
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
23929
24121
|
);
|
|
23930
24122
|
});
|
|
@@ -23945,7 +24137,7 @@ var MonthYearDropdownOptions = (
|
|
|
23945
24137
|
"react-datepicker__month-year-dropdown": true,
|
|
23946
24138
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
23947
24139
|
});
|
|
23948
|
-
return
|
|
24140
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
23949
24141
|
};
|
|
23950
24142
|
return MonthYearDropdownOptions2;
|
|
23951
24143
|
}(Component)
|
|
@@ -23965,7 +24157,7 @@ var MonthYearDropdown = (
|
|
|
23965
24157
|
var options2 = [];
|
|
23966
24158
|
while (!isAfter(currDate, lastDate)) {
|
|
23967
24159
|
var timePoint = getTime(currDate);
|
|
23968
|
-
options2.push(
|
|
24160
|
+
options2.push(React10.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
23969
24161
|
currDate = addMonths(currDate, 1);
|
|
23970
24162
|
}
|
|
23971
24163
|
return options2;
|
|
@@ -23974,19 +24166,19 @@ var MonthYearDropdown = (
|
|
|
23974
24166
|
_this.onChange(parseInt(event.target.value));
|
|
23975
24167
|
};
|
|
23976
24168
|
_this.renderSelectMode = function() {
|
|
23977
|
-
return
|
|
24169
|
+
return React10.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
23978
24170
|
};
|
|
23979
24171
|
_this.renderReadView = function(visible) {
|
|
23980
24172
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
23981
|
-
return
|
|
24173
|
+
return React10.createElement(
|
|
23982
24174
|
"div",
|
|
23983
24175
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
23984
|
-
|
|
23985
|
-
|
|
24176
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
24177
|
+
React10.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
23986
24178
|
);
|
|
23987
24179
|
};
|
|
23988
24180
|
_this.renderDropdown = function() {
|
|
23989
|
-
return
|
|
24181
|
+
return React10.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
23990
24182
|
};
|
|
23991
24183
|
_this.renderScrollMode = function() {
|
|
23992
24184
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24021,7 +24213,7 @@ var MonthYearDropdown = (
|
|
|
24021
24213
|
renderedDropdown = this.renderSelectMode();
|
|
24022
24214
|
break;
|
|
24023
24215
|
}
|
|
24024
|
-
return
|
|
24216
|
+
return React10.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24025
24217
|
};
|
|
24026
24218
|
return MonthYearDropdown2;
|
|
24027
24219
|
}(Component)
|
|
@@ -24119,7 +24311,7 @@ var Time = (
|
|
|
24119
24311
|
return prev2;
|
|
24120
24312
|
}, times[0]);
|
|
24121
24313
|
return times.map(function(time) {
|
|
24122
|
-
return
|
|
24314
|
+
return React10.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
24123
24315
|
if (time === timeToFocus) {
|
|
24124
24316
|
_this.centerLi = li;
|
|
24125
24317
|
}
|
|
@@ -24130,14 +24322,14 @@ var Time = (
|
|
|
24130
24322
|
};
|
|
24131
24323
|
_this.renderTimeCaption = function() {
|
|
24132
24324
|
if (_this.props.showTimeCaption === false) {
|
|
24133
|
-
return
|
|
24325
|
+
return React10.createElement(React10.Fragment, null);
|
|
24134
24326
|
}
|
|
24135
|
-
return
|
|
24327
|
+
return React10.createElement(
|
|
24136
24328
|
"div",
|
|
24137
24329
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
24138
24330
|
_this.header = header;
|
|
24139
24331
|
} },
|
|
24140
|
-
|
|
24332
|
+
React10.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
24141
24333
|
);
|
|
24142
24334
|
};
|
|
24143
24335
|
return _this;
|
|
@@ -24184,17 +24376,17 @@ var Time = (
|
|
|
24184
24376
|
var _this = this;
|
|
24185
24377
|
var _a2;
|
|
24186
24378
|
var height = this.state.height;
|
|
24187
|
-
return
|
|
24379
|
+
return React10.createElement(
|
|
24188
24380
|
"div",
|
|
24189
24381
|
{ 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" : "") },
|
|
24190
24382
|
this.renderTimeCaption(),
|
|
24191
|
-
|
|
24383
|
+
React10.createElement(
|
|
24192
24384
|
"div",
|
|
24193
24385
|
{ className: "react-datepicker__time" },
|
|
24194
|
-
|
|
24386
|
+
React10.createElement(
|
|
24195
24387
|
"div",
|
|
24196
24388
|
{ className: "react-datepicker__time-box" },
|
|
24197
|
-
|
|
24389
|
+
React10.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
24198
24390
|
_this.list = list;
|
|
24199
24391
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
24200
24392
|
)
|
|
@@ -24452,7 +24644,7 @@ var Year = (
|
|
|
24452
24644
|
}
|
|
24453
24645
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
24454
24646
|
var _loop_1 = function(y4) {
|
|
24455
|
-
yearsList.push(
|
|
24647
|
+
yearsList.push(React10.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
24456
24648
|
_this.onYearClick(event, y4);
|
|
24457
24649
|
}, onKeyDown: function(event) {
|
|
24458
24650
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24474,10 +24666,10 @@ var Year = (
|
|
|
24474
24666
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
24475
24667
|
_loop_1(y3);
|
|
24476
24668
|
}
|
|
24477
|
-
return
|
|
24669
|
+
return React10.createElement(
|
|
24478
24670
|
"div",
|
|
24479
24671
|
{ className: "react-datepicker__year" },
|
|
24480
|
-
|
|
24672
|
+
React10.createElement("div", { className: "react-datepicker__year-wrapper", onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : void 0, onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : void 0 }, yearsList)
|
|
24481
24673
|
);
|
|
24482
24674
|
};
|
|
24483
24675
|
return Year2;
|
|
@@ -24509,10 +24701,10 @@ var YearDropdownOptions = (
|
|
|
24509
24701
|
_this.renderOptions = function() {
|
|
24510
24702
|
var selectedYear = _this.props.year;
|
|
24511
24703
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
24512
|
-
return
|
|
24704
|
+
return React10.createElement(
|
|
24513
24705
|
"div",
|
|
24514
24706
|
{ 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 },
|
|
24515
|
-
selectedYear === year ?
|
|
24707
|
+
selectedYear === year ? React10.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
24516
24708
|
year
|
|
24517
24709
|
);
|
|
24518
24710
|
});
|
|
@@ -24521,19 +24713,19 @@ var YearDropdownOptions = (
|
|
|
24521
24713
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
24522
24714
|
return year === maxYear;
|
|
24523
24715
|
})) {
|
|
24524
|
-
options2.unshift(
|
|
24716
|
+
options2.unshift(React10.createElement(
|
|
24525
24717
|
"div",
|
|
24526
24718
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
24527
|
-
|
|
24719
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
24528
24720
|
));
|
|
24529
24721
|
}
|
|
24530
24722
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
24531
24723
|
return year === minYear;
|
|
24532
24724
|
})) {
|
|
24533
|
-
options2.push(
|
|
24725
|
+
options2.push(React10.createElement(
|
|
24534
24726
|
"div",
|
|
24535
24727
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
24536
|
-
|
|
24728
|
+
React10.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
24537
24729
|
));
|
|
24538
24730
|
}
|
|
24539
24731
|
return options2;
|
|
@@ -24581,7 +24773,7 @@ var YearDropdownOptions = (
|
|
|
24581
24773
|
"react-datepicker__year-dropdown": true,
|
|
24582
24774
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
24583
24775
|
});
|
|
24584
|
-
return
|
|
24776
|
+
return React10.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24585
24777
|
};
|
|
24586
24778
|
return YearDropdownOptions2;
|
|
24587
24779
|
}(Component)
|
|
@@ -24600,7 +24792,7 @@ var YearDropdown = (
|
|
|
24600
24792
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
24601
24793
|
var options2 = [];
|
|
24602
24794
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
24603
|
-
options2.push(
|
|
24795
|
+
options2.push(React10.createElement("option", { key: i3, value: i3 }, i3));
|
|
24604
24796
|
}
|
|
24605
24797
|
return options2;
|
|
24606
24798
|
};
|
|
@@ -24608,20 +24800,20 @@ var YearDropdown = (
|
|
|
24608
24800
|
_this.onChange(parseInt(event.target.value));
|
|
24609
24801
|
};
|
|
24610
24802
|
_this.renderSelectMode = function() {
|
|
24611
|
-
return
|
|
24803
|
+
return React10.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24612
24804
|
};
|
|
24613
24805
|
_this.renderReadView = function(visible) {
|
|
24614
|
-
return
|
|
24806
|
+
return React10.createElement(
|
|
24615
24807
|
"div",
|
|
24616
24808
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
24617
24809
|
return _this.toggleDropdown(event);
|
|
24618
24810
|
} },
|
|
24619
|
-
|
|
24620
|
-
|
|
24811
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24812
|
+
React10.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
24621
24813
|
);
|
|
24622
24814
|
};
|
|
24623
24815
|
_this.renderDropdown = function() {
|
|
24624
|
-
return
|
|
24816
|
+
return React10.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24625
24817
|
};
|
|
24626
24818
|
_this.renderScrollMode = function() {
|
|
24627
24819
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24671,7 +24863,7 @@ var YearDropdown = (
|
|
|
24671
24863
|
renderedDropdown = this.renderSelectMode();
|
|
24672
24864
|
break;
|
|
24673
24865
|
}
|
|
24674
|
-
return
|
|
24866
|
+
return React10.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24675
24867
|
};
|
|
24676
24868
|
return YearDropdown2;
|
|
24677
24869
|
}(Component)
|
|
@@ -24845,13 +25037,13 @@ var Calendar = (
|
|
|
24845
25037
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
24846
25038
|
var dayNames = [];
|
|
24847
25039
|
if (_this.props.showWeekNumbers) {
|
|
24848
|
-
dayNames.push(
|
|
25040
|
+
dayNames.push(React10.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
24849
25041
|
}
|
|
24850
25042
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
24851
25043
|
var day = addDays(startOfWeek2, offset4);
|
|
24852
25044
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
24853
25045
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
24854
|
-
return
|
|
25046
|
+
return React10.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
24855
25047
|
}));
|
|
24856
25048
|
};
|
|
24857
25049
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -24920,10 +25112,10 @@ var Calendar = (
|
|
|
24920
25112
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24921
25113
|
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;
|
|
24922
25114
|
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;
|
|
24923
|
-
return
|
|
25115
|
+
return React10.createElement(
|
|
24924
25116
|
"button",
|
|
24925
25117
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
24926
|
-
|
|
25118
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
24927
25119
|
);
|
|
24928
25120
|
};
|
|
24929
25121
|
_this.increaseYear = function() {
|
|
@@ -24985,10 +25177,10 @@ var Calendar = (
|
|
|
24985
25177
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
24986
25178
|
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;
|
|
24987
25179
|
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;
|
|
24988
|
-
return
|
|
25180
|
+
return React10.createElement(
|
|
24989
25181
|
"button",
|
|
24990
25182
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
24991
|
-
|
|
25183
|
+
React10.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
24992
25184
|
);
|
|
24993
25185
|
};
|
|
24994
25186
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -25005,7 +25197,7 @@ var Calendar = (
|
|
|
25005
25197
|
if (_this.props.showMonthYearDropdown) {
|
|
25006
25198
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
25007
25199
|
}
|
|
25008
|
-
return
|
|
25200
|
+
return React10.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
25009
25201
|
};
|
|
25010
25202
|
_this.renderYearDropdown = function(overrideHide) {
|
|
25011
25203
|
if (overrideHide === void 0) {
|
|
@@ -25014,7 +25206,7 @@ var Calendar = (
|
|
|
25014
25206
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
25015
25207
|
return;
|
|
25016
25208
|
}
|
|
25017
|
-
return
|
|
25209
|
+
return React10.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
25018
25210
|
};
|
|
25019
25211
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
25020
25212
|
if (overrideHide === void 0) {
|
|
@@ -25023,7 +25215,7 @@ var Calendar = (
|
|
|
25023
25215
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
25024
25216
|
return;
|
|
25025
25217
|
}
|
|
25026
|
-
return
|
|
25218
|
+
return React10.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
25027
25219
|
};
|
|
25028
25220
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
25029
25221
|
if (overrideHide === void 0) {
|
|
@@ -25032,7 +25224,7 @@ var Calendar = (
|
|
|
25032
25224
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
25033
25225
|
return;
|
|
25034
25226
|
}
|
|
25035
|
-
return
|
|
25227
|
+
return React10.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
25036
25228
|
};
|
|
25037
25229
|
_this.handleTodayButtonClick = function(event) {
|
|
25038
25230
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -25042,22 +25234,22 @@ var Calendar = (
|
|
|
25042
25234
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
25043
25235
|
return;
|
|
25044
25236
|
}
|
|
25045
|
-
return
|
|
25237
|
+
return React10.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
25046
25238
|
};
|
|
25047
25239
|
_this.renderDefaultHeader = function(_a2) {
|
|
25048
25240
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
25049
|
-
return
|
|
25241
|
+
return React10.createElement(
|
|
25050
25242
|
"div",
|
|
25051
25243
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
25052
25244
|
_this.renderCurrentMonth(monthDate),
|
|
25053
|
-
|
|
25245
|
+
React10.createElement(
|
|
25054
25246
|
"div",
|
|
25055
25247
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
25056
25248
|
_this.renderMonthDropdown(i3 !== 0),
|
|
25057
25249
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
25058
25250
|
_this.renderYearDropdown(i3 !== 0)
|
|
25059
25251
|
),
|
|
25060
|
-
|
|
25252
|
+
React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25061
25253
|
);
|
|
25062
25254
|
};
|
|
25063
25255
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -25071,18 +25263,18 @@ var Calendar = (
|
|
|
25071
25263
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
25072
25264
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
25073
25265
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
25074
|
-
return
|
|
25266
|
+
return React10.createElement(
|
|
25075
25267
|
"div",
|
|
25076
25268
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
25077
25269
|
(_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 })),
|
|
25078
|
-
showDayNames &&
|
|
25270
|
+
showDayNames && React10.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25079
25271
|
);
|
|
25080
25272
|
};
|
|
25081
25273
|
_this.renderYearHeader = function(_a2) {
|
|
25082
25274
|
var monthDate = _a2.monthDate;
|
|
25083
25275
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
25084
25276
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
25085
|
-
return
|
|
25277
|
+
return React10.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
25086
25278
|
};
|
|
25087
25279
|
_this.renderHeader = function(_a2) {
|
|
25088
25280
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -25112,13 +25304,13 @@ var Calendar = (
|
|
|
25112
25304
|
var monthKey = "month-".concat(i3);
|
|
25113
25305
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
25114
25306
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
25115
|
-
monthList.push(
|
|
25307
|
+
monthList.push(React10.createElement(
|
|
25116
25308
|
"div",
|
|
25117
25309
|
{ key: monthKey, ref: function(div) {
|
|
25118
25310
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
25119
25311
|
}, className: "react-datepicker__month-container" },
|
|
25120
25312
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
25121
|
-
|
|
25313
|
+
React10.createElement(Month, _assign({}, Calendar2.defaultProps, _this.props, { containerRef: _this.containerRef, ariaLabelPrefix: _this.props.monthAriaLabelPrefix, day: monthDate, onDayClick: _this.handleDayClick, handleOnKeyDown: _this.props.handleOnDayKeyDown, handleOnMonthKeyDown: _this.props.handleOnKeyDown, onDayMouseEnter: _this.handleDayMouseEnter, onMouseLeave: _this.handleMonthMouseLeave, orderInDisplay: i3, selectingDate: _this.state.selectingDate, monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart }))
|
|
25122
25314
|
));
|
|
25123
25315
|
}
|
|
25124
25316
|
return monthList;
|
|
@@ -25128,18 +25320,18 @@ var Calendar = (
|
|
|
25128
25320
|
return;
|
|
25129
25321
|
}
|
|
25130
25322
|
if (_this.props.showYearPicker) {
|
|
25131
|
-
return
|
|
25323
|
+
return React10.createElement(
|
|
25132
25324
|
"div",
|
|
25133
25325
|
{ className: "react-datepicker__year--container" },
|
|
25134
25326
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
25135
|
-
|
|
25327
|
+
React10.createElement(Year, _assign({}, Calendar2.defaultProps, _this.props, { selectingDate: _this.state.selectingDate, date: _this.state.date, onDayClick: _this.handleDayClick, clearSelectingDate: _this.clearSelectingDate, onYearMouseEnter: _this.handleYearMouseEnter, onYearMouseLeave: _this.handleYearMouseLeave }))
|
|
25136
25328
|
);
|
|
25137
25329
|
}
|
|
25138
25330
|
return;
|
|
25139
25331
|
};
|
|
25140
25332
|
_this.renderTimeSection = function() {
|
|
25141
25333
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
25142
|
-
return
|
|
25334
|
+
return React10.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
25143
25335
|
}
|
|
25144
25336
|
return;
|
|
25145
25337
|
};
|
|
@@ -25148,7 +25340,7 @@ var Calendar = (
|
|
|
25148
25340
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
25149
25341
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
25150
25342
|
if (_this.props.showTimeInput) {
|
|
25151
|
-
return
|
|
25343
|
+
return React10.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
25152
25344
|
}
|
|
25153
25345
|
return;
|
|
25154
25346
|
};
|
|
@@ -25163,11 +25355,11 @@ var Calendar = (
|
|
|
25163
25355
|
} else {
|
|
25164
25356
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
25165
25357
|
}
|
|
25166
|
-
return
|
|
25358
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
25167
25359
|
};
|
|
25168
25360
|
_this.renderChildren = function() {
|
|
25169
25361
|
if (_this.props.children) {
|
|
25170
|
-
return
|
|
25362
|
+
return React10.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
25171
25363
|
}
|
|
25172
25364
|
return;
|
|
25173
25365
|
};
|
|
@@ -25221,13 +25413,13 @@ var Calendar = (
|
|
|
25221
25413
|
};
|
|
25222
25414
|
Calendar2.prototype.render = function() {
|
|
25223
25415
|
var Container = this.props.container || CalendarContainer;
|
|
25224
|
-
return
|
|
25416
|
+
return React10.createElement(
|
|
25225
25417
|
ClickOutsideWrapper,
|
|
25226
25418
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
25227
|
-
|
|
25419
|
+
React10.createElement(
|
|
25228
25420
|
"div",
|
|
25229
25421
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
25230
|
-
|
|
25422
|
+
React10.createElement(
|
|
25231
25423
|
Container,
|
|
25232
25424
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
25233
25425
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -25252,11 +25444,11 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25252
25444
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
25253
25445
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
25254
25446
|
if (typeof icon === "string") {
|
|
25255
|
-
return
|
|
25447
|
+
return React10.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
25256
25448
|
}
|
|
25257
|
-
if (
|
|
25449
|
+
if (React10.isValidElement(icon)) {
|
|
25258
25450
|
var iconElement_1 = icon;
|
|
25259
|
-
return
|
|
25451
|
+
return React10.cloneElement(iconElement_1, {
|
|
25260
25452
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
25261
25453
|
onClick: function(event) {
|
|
25262
25454
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -25268,10 +25460,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25268
25460
|
}
|
|
25269
25461
|
});
|
|
25270
25462
|
}
|
|
25271
|
-
return
|
|
25463
|
+
return React10.createElement(
|
|
25272
25464
|
"svg",
|
|
25273
25465
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
25274
|
-
|
|
25466
|
+
React10.createElement("path", { d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z" })
|
|
25275
25467
|
);
|
|
25276
25468
|
};
|
|
25277
25469
|
var Portal = (
|
|
@@ -25337,12 +25529,12 @@ var TabLoop = (
|
|
|
25337
25529
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
25338
25530
|
return this.props.children;
|
|
25339
25531
|
}
|
|
25340
|
-
return
|
|
25532
|
+
return React10.createElement(
|
|
25341
25533
|
"div",
|
|
25342
25534
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
25343
|
-
|
|
25535
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
25344
25536
|
this.props.children,
|
|
25345
|
-
|
|
25537
|
+
React10.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
25346
25538
|
);
|
|
25347
25539
|
};
|
|
25348
25540
|
TabLoop2.defaultProps = {
|
|
@@ -25362,7 +25554,7 @@ function withFloating(Component3) {
|
|
|
25362
25554
|
arrow3({ element: arrowRef })
|
|
25363
25555
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
25364
25556
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
25365
|
-
return
|
|
25557
|
+
return React10.createElement(Component3, _assign({}, componentProps));
|
|
25366
25558
|
};
|
|
25367
25559
|
return WithFloating;
|
|
25368
25560
|
}
|
|
@@ -25387,14 +25579,14 @@ var PopperComponent = (
|
|
|
25387
25579
|
var popper = void 0;
|
|
25388
25580
|
if (!hidePopper) {
|
|
25389
25581
|
var classes = clsx("react-datepicker-popper", className);
|
|
25390
|
-
popper =
|
|
25582
|
+
popper = React10.createElement(
|
|
25391
25583
|
TabLoop,
|
|
25392
25584
|
{ enableTabLoop },
|
|
25393
|
-
|
|
25585
|
+
React10.createElement(
|
|
25394
25586
|
"div",
|
|
25395
25587
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
25396
25588
|
popperComponent,
|
|
25397
|
-
showArrow &&
|
|
25589
|
+
showArrow && React10.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
25398
25590
|
)
|
|
25399
25591
|
);
|
|
25400
25592
|
}
|
|
@@ -25402,13 +25594,13 @@ var PopperComponent = (
|
|
|
25402
25594
|
popper = createElement5(this.props.popperContainer, {}, popper);
|
|
25403
25595
|
}
|
|
25404
25596
|
if (portalId && !hidePopper) {
|
|
25405
|
-
popper =
|
|
25597
|
+
popper = React10.createElement(Portal, { portalId, portalHost }, popper);
|
|
25406
25598
|
}
|
|
25407
25599
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
25408
|
-
return
|
|
25409
|
-
|
|
25600
|
+
return React10.createElement(
|
|
25601
|
+
React10.Fragment,
|
|
25410
25602
|
null,
|
|
25411
|
-
|
|
25603
|
+
React10.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
25412
25604
|
popper
|
|
25413
25605
|
);
|
|
25414
25606
|
};
|
|
@@ -26027,7 +26219,7 @@ var DatePicker = (
|
|
|
26027
26219
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
26028
26220
|
return null;
|
|
26029
26221
|
}
|
|
26030
|
-
return
|
|
26222
|
+
return React10.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
26031
26223
|
_this.calendar = elem;
|
|
26032
26224
|
} }, _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);
|
|
26033
26225
|
};
|
|
@@ -26063,13 +26255,13 @@ var DatePicker = (
|
|
|
26063
26255
|
}));
|
|
26064
26256
|
}
|
|
26065
26257
|
}
|
|
26066
|
-
return
|
|
26258
|
+
return React10.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
26067
26259
|
};
|
|
26068
26260
|
_this.renderDateInput = function() {
|
|
26069
26261
|
var _a2, _b;
|
|
26070
26262
|
var _c;
|
|
26071
26263
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
26072
|
-
var customInput = _this.props.customInput ||
|
|
26264
|
+
var customInput = _this.props.customInput || React10.createElement("input", { type: "text" });
|
|
26073
26265
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
26074
26266
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
26075
26267
|
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, {
|
|
@@ -26089,7 +26281,7 @@ var DatePicker = (
|
|
|
26089
26281
|
_this.renderClearButton = function() {
|
|
26090
26282
|
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;
|
|
26091
26283
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
26092
|
-
return
|
|
26284
|
+
return React10.createElement("button", { type: "button", className: clsx("react-datepicker__close-icon", clearButtonClassName, { "react-datepicker__close-icon--disabled": disabled }), disabled, "aria-label": ariaLabelClose, onClick: _this.onClearClick, title: clearButtonTitle, tabIndex: -1 });
|
|
26093
26285
|
} else {
|
|
26094
26286
|
return null;
|
|
26095
26287
|
}
|
|
@@ -26190,10 +26382,10 @@ var DatePicker = (
|
|
|
26190
26382
|
if (calendarIconClassname) {
|
|
26191
26383
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
26192
26384
|
}
|
|
26193
|
-
return
|
|
26385
|
+
return React10.createElement(
|
|
26194
26386
|
"div",
|
|
26195
26387
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
26196
|
-
showIcon &&
|
|
26388
|
+
showIcon && React10.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
26197
26389
|
onClick: this.toggleCalendar
|
|
26198
26390
|
} : null)),
|
|
26199
26391
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -26206,22 +26398,22 @@ var DatePicker = (
|
|
|
26206
26398
|
if (this.props.inline)
|
|
26207
26399
|
return calendar;
|
|
26208
26400
|
if (this.props.withPortal) {
|
|
26209
|
-
var portalContainer = this.state.open ?
|
|
26401
|
+
var portalContainer = this.state.open ? React10.createElement(
|
|
26210
26402
|
TabLoop,
|
|
26211
26403
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
26212
|
-
|
|
26404
|
+
React10.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
26213
26405
|
) : null;
|
|
26214
26406
|
if (this.state.open && this.props.portalId) {
|
|
26215
|
-
portalContainer =
|
|
26407
|
+
portalContainer = React10.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
26216
26408
|
}
|
|
26217
|
-
return
|
|
26409
|
+
return React10.createElement(
|
|
26218
26410
|
"div",
|
|
26219
26411
|
null,
|
|
26220
26412
|
this.renderInputContainer(),
|
|
26221
26413
|
portalContainer
|
|
26222
26414
|
);
|
|
26223
26415
|
}
|
|
26224
|
-
return
|
|
26416
|
+
return React10.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
26225
26417
|
};
|
|
26226
26418
|
return DatePicker2;
|
|
26227
26419
|
}(Component)
|
|
@@ -26367,13 +26559,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26367
26559
|
}
|
|
26368
26560
|
|
|
26369
26561
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26370
|
-
import { useState as
|
|
26562
|
+
import { useState as useState15, useCallback as useCallback6 } from "react";
|
|
26371
26563
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26372
26564
|
function useStateManager(_ref3) {
|
|
26373
26565
|
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);
|
|
26374
|
-
var _useState =
|
|
26375
|
-
var _useState3 =
|
|
26376
|
-
var _useState5 =
|
|
26566
|
+
var _useState = useState15(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26567
|
+
var _useState3 = useState15(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26568
|
+
var _useState5 = useState15(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26377
26569
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
26378
26570
|
if (typeof propsOnChange === "function") {
|
|
26379
26571
|
propsOnChange(value2, actionMeta);
|
|
@@ -26425,8 +26617,8 @@ function _extends() {
|
|
|
26425
26617
|
}
|
|
26426
26618
|
|
|
26427
26619
|
// node_modules/react-select/dist/react-select.esm.js
|
|
26428
|
-
import * as
|
|
26429
|
-
import { forwardRef as forwardRef5, useMemo as
|
|
26620
|
+
import * as React15 from "react";
|
|
26621
|
+
import { forwardRef as forwardRef5, useMemo as useMemo10 } from "react";
|
|
26430
26622
|
|
|
26431
26623
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
26432
26624
|
function _classCallCheck(a2, n4) {
|
|
@@ -26533,11 +26725,11 @@ function _toConsumableArray(r4) {
|
|
|
26533
26725
|
}
|
|
26534
26726
|
|
|
26535
26727
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26536
|
-
import * as
|
|
26537
|
-
import { useMemo as
|
|
26728
|
+
import * as React14 from "react";
|
|
26729
|
+
import { useMemo as useMemo9, Fragment as Fragment23, useRef as useRef13, useCallback as useCallback8, useEffect as useEffect17, Component as Component2 } from "react";
|
|
26538
26730
|
|
|
26539
26731
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26540
|
-
import * as
|
|
26732
|
+
import * as React12 from "react";
|
|
26541
26733
|
import { useContext as useContext7, forwardRef as forwardRef4 } from "react";
|
|
26542
26734
|
|
|
26543
26735
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
@@ -27702,18 +27894,18 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
27702
27894
|
}
|
|
27703
27895
|
|
|
27704
27896
|
// node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
27705
|
-
import * as
|
|
27897
|
+
import * as React11 from "react";
|
|
27706
27898
|
var isBrowser3 = typeof document !== "undefined";
|
|
27707
27899
|
var syncFallback = function syncFallback2(create) {
|
|
27708
27900
|
return create();
|
|
27709
27901
|
};
|
|
27710
|
-
var useInsertionEffect3 =
|
|
27902
|
+
var useInsertionEffect3 = React11["useInsertionEffect"] ? React11["useInsertionEffect"] : false;
|
|
27711
27903
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect3 || syncFallback;
|
|
27712
27904
|
|
|
27713
27905
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
27714
27906
|
var isDevelopment3 = false;
|
|
27715
27907
|
var isBrowser4 = typeof document !== "undefined";
|
|
27716
|
-
var EmotionCacheContext = /* @__PURE__ */
|
|
27908
|
+
var EmotionCacheContext = /* @__PURE__ */ React12.createContext(
|
|
27717
27909
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
27718
27910
|
// because this module is primarily intended for the browser and node
|
|
27719
27911
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -27739,7 +27931,7 @@ if (!isBrowser4) {
|
|
|
27739
27931
|
cache = createCache({
|
|
27740
27932
|
key: "css"
|
|
27741
27933
|
});
|
|
27742
|
-
return /* @__PURE__ */
|
|
27934
|
+
return /* @__PURE__ */ React12.createElement(EmotionCacheContext.Provider, {
|
|
27743
27935
|
value: cache
|
|
27744
27936
|
}, func(props, cache));
|
|
27745
27937
|
} else {
|
|
@@ -27748,7 +27940,7 @@ if (!isBrowser4) {
|
|
|
27748
27940
|
};
|
|
27749
27941
|
};
|
|
27750
27942
|
}
|
|
27751
|
-
var ThemeContext = /* @__PURE__ */
|
|
27943
|
+
var ThemeContext = /* @__PURE__ */ React12.createContext({});
|
|
27752
27944
|
var hasOwn = {}.hasOwnProperty;
|
|
27753
27945
|
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
27754
27946
|
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
@@ -27775,7 +27967,7 @@ var Insertion = function Insertion2(_ref3) {
|
|
|
27775
27967
|
serializedNames += " " + next2.name;
|
|
27776
27968
|
next2 = next2.next;
|
|
27777
27969
|
}
|
|
27778
|
-
return /* @__PURE__ */
|
|
27970
|
+
return /* @__PURE__ */ React12.createElement("style", (_ref23 = {}, _ref23["data-emotion"] = cache.key + " " + serializedNames, _ref23.dangerouslySetInnerHTML = {
|
|
27779
27971
|
__html: rules
|
|
27780
27972
|
}, _ref23.nonce = cache.sheet.nonce, _ref23));
|
|
27781
27973
|
}
|
|
@@ -27794,7 +27986,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27794
27986
|
} else if (props.className != null) {
|
|
27795
27987
|
className = props.className + " ";
|
|
27796
27988
|
}
|
|
27797
|
-
var serialized = serializeStyles(registeredStyles, void 0,
|
|
27989
|
+
var serialized = serializeStyles(registeredStyles, void 0, React12.useContext(ThemeContext));
|
|
27798
27990
|
className += cache.key + "-" + serialized.name;
|
|
27799
27991
|
var newProps = {};
|
|
27800
27992
|
for (var _key2 in props) {
|
|
@@ -27806,22 +27998,22 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
27806
27998
|
if (ref) {
|
|
27807
27999
|
newProps.ref = ref;
|
|
27808
28000
|
}
|
|
27809
|
-
return /* @__PURE__ */
|
|
28001
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Insertion, {
|
|
27810
28002
|
cache,
|
|
27811
28003
|
serialized,
|
|
27812
28004
|
isStringTag: typeof WrappedComponent === "string"
|
|
27813
|
-
}), /* @__PURE__ */
|
|
28005
|
+
}), /* @__PURE__ */ React12.createElement(WrappedComponent, newProps));
|
|
27814
28006
|
});
|
|
27815
28007
|
var Emotion$1 = Emotion;
|
|
27816
28008
|
|
|
27817
28009
|
// node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
27818
|
-
import * as
|
|
28010
|
+
import * as React13 from "react";
|
|
27819
28011
|
var import_extends2 = __toESM(require_extends());
|
|
27820
28012
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27821
|
-
var
|
|
28013
|
+
var jsx86 = function jsx87(type, props) {
|
|
27822
28014
|
var args = arguments;
|
|
27823
28015
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27824
|
-
return
|
|
28016
|
+
return React13.createElement.apply(void 0, args);
|
|
27825
28017
|
}
|
|
27826
28018
|
var argsLength = args.length;
|
|
27827
28019
|
var createElementArgArray = new Array(argsLength);
|
|
@@ -27830,13 +28022,13 @@ var jsx84 = function jsx85(type, props) {
|
|
|
27830
28022
|
for (var i3 = 2; i3 < argsLength; i3++) {
|
|
27831
28023
|
createElementArgArray[i3] = args[i3];
|
|
27832
28024
|
}
|
|
27833
|
-
return
|
|
28025
|
+
return React13.createElement.apply(null, createElementArgArray);
|
|
27834
28026
|
};
|
|
27835
28027
|
(function(_jsx) {
|
|
27836
28028
|
var JSX;
|
|
27837
28029
|
/* @__PURE__ */ (function(_JSX) {
|
|
27838
28030
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27839
|
-
})(
|
|
28031
|
+
})(jsx86 || (jsx86 = {}));
|
|
27840
28032
|
function css() {
|
|
27841
28033
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27842
28034
|
args[_key] = arguments[_key];
|
|
@@ -27866,7 +28058,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27866
28058
|
}
|
|
27867
28059
|
|
|
27868
28060
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27869
|
-
import { useContext as useContext9, useRef as useRef12, useState as
|
|
28061
|
+
import { useContext as useContext9, useRef as useRef12, useState as useState16, useMemo as useMemo8, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
27870
28062
|
import { createPortal as createPortal4 } from "react-dom";
|
|
27871
28063
|
|
|
27872
28064
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
@@ -28213,8 +28405,8 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28213
28405
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28214
28406
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28215
28407
|
var ref = useRef12(null);
|
|
28216
|
-
var _useState =
|
|
28217
|
-
var _useState3 =
|
|
28408
|
+
var _useState = useState16(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28409
|
+
var _useState3 = useState16(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28218
28410
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28219
28411
|
index3(function() {
|
|
28220
28412
|
var menuEl = ref.current;
|
|
@@ -28244,7 +28436,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28244
28436
|
};
|
|
28245
28437
|
var Menu = function Menu2(props) {
|
|
28246
28438
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28247
|
-
return
|
|
28439
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menu", {
|
|
28248
28440
|
menu: true
|
|
28249
28441
|
}), {
|
|
28250
28442
|
ref: innerRef
|
|
@@ -28266,7 +28458,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28266
28458
|
};
|
|
28267
28459
|
var MenuList = function MenuList2(props) {
|
|
28268
28460
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28269
|
-
return
|
|
28461
|
+
return jsx86("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28270
28462
|
"menu-list": true,
|
|
28271
28463
|
"menu-list--is-multi": isMulti
|
|
28272
28464
|
}), {
|
|
@@ -28286,7 +28478,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28286
28478
|
var loadingMessageCSS = noticeCSS;
|
|
28287
28479
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28288
28480
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28289
|
-
return
|
|
28481
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28290
28482
|
children,
|
|
28291
28483
|
innerProps
|
|
28292
28484
|
}), "noOptionsMessage", {
|
|
@@ -28296,7 +28488,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28296
28488
|
};
|
|
28297
28489
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28298
28490
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28299
|
-
return
|
|
28491
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28300
28492
|
children,
|
|
28301
28493
|
innerProps
|
|
28302
28494
|
}), "loadingMessage", {
|
|
@@ -28318,13 +28510,13 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28318
28510
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28319
28511
|
var menuPortalRef = useRef12(null);
|
|
28320
28512
|
var cleanupRef = useRef12(null);
|
|
28321
|
-
var _useState5 =
|
|
28322
|
-
var portalPlacementContext =
|
|
28513
|
+
var _useState5 = useState16(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28514
|
+
var portalPlacementContext = useMemo8(function() {
|
|
28323
28515
|
return {
|
|
28324
28516
|
setPortalPlacement
|
|
28325
28517
|
};
|
|
28326
28518
|
}, []);
|
|
28327
|
-
var _useState7 =
|
|
28519
|
+
var _useState7 = useState16(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28328
28520
|
var updateComputedPosition = useCallback7(function() {
|
|
28329
28521
|
if (!controlElement) return;
|
|
28330
28522
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -28359,7 +28551,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28359
28551
|
runAutoUpdate();
|
|
28360
28552
|
}, [runAutoUpdate]);
|
|
28361
28553
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28362
|
-
var menuWrapper =
|
|
28554
|
+
var menuWrapper = jsx86("div", _extends({
|
|
28363
28555
|
ref: setMenuPortalElement
|
|
28364
28556
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28365
28557
|
offset: computedPosition.offset,
|
|
@@ -28368,7 +28560,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28368
28560
|
}), "menuPortal", {
|
|
28369
28561
|
"menu-portal": true
|
|
28370
28562
|
}), innerProps), children);
|
|
28371
|
-
return
|
|
28563
|
+
return jsx86(PortalPlacementContext.Provider, {
|
|
28372
28564
|
value: portalPlacementContext
|
|
28373
28565
|
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
28374
28566
|
};
|
|
@@ -28384,7 +28576,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28384
28576
|
};
|
|
28385
28577
|
var SelectContainer = function SelectContainer2(props) {
|
|
28386
28578
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28387
|
-
return
|
|
28579
|
+
return jsx86("div", _extends({}, getStyleProps(props, "container", {
|
|
28388
28580
|
"--is-disabled": isDisabled,
|
|
28389
28581
|
"--is-rtl": isRtl
|
|
28390
28582
|
}), innerProps), children);
|
|
@@ -28405,7 +28597,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28405
28597
|
};
|
|
28406
28598
|
var ValueContainer = function ValueContainer2(props) {
|
|
28407
28599
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28408
|
-
return
|
|
28600
|
+
return jsx86("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28409
28601
|
"value-container": true,
|
|
28410
28602
|
"value-container--is-multi": isMulti,
|
|
28411
28603
|
"value-container--has-value": hasValue
|
|
@@ -28421,7 +28613,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28421
28613
|
};
|
|
28422
28614
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28423
28615
|
var children = props.children, innerProps = props.innerProps;
|
|
28424
|
-
return
|
|
28616
|
+
return jsx86("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28425
28617
|
indicators: true
|
|
28426
28618
|
}), innerProps), children);
|
|
28427
28619
|
};
|
|
@@ -28442,7 +28634,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28442
28634
|
};
|
|
28443
28635
|
var Svg = function Svg2(_ref3) {
|
|
28444
28636
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28445
|
-
return
|
|
28637
|
+
return jsx86("svg", _extends({
|
|
28446
28638
|
height: size4,
|
|
28447
28639
|
width: size4,
|
|
28448
28640
|
viewBox: "0 0 20 20",
|
|
@@ -28452,16 +28644,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28452
28644
|
}, props));
|
|
28453
28645
|
};
|
|
28454
28646
|
var CrossIcon = function CrossIcon2(props) {
|
|
28455
|
-
return
|
|
28647
|
+
return jsx86(Svg, _extends({
|
|
28456
28648
|
size: 20
|
|
28457
|
-
}, props),
|
|
28649
|
+
}, props), jsx86("path", {
|
|
28458
28650
|
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"
|
|
28459
28651
|
}));
|
|
28460
28652
|
};
|
|
28461
28653
|
var DownChevron = function DownChevron2(props) {
|
|
28462
|
-
return
|
|
28654
|
+
return jsx86(Svg, _extends({
|
|
28463
28655
|
size: 20
|
|
28464
|
-
}, props),
|
|
28656
|
+
}, props), jsx86("path", {
|
|
28465
28657
|
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"
|
|
28466
28658
|
}));
|
|
28467
28659
|
};
|
|
@@ -28482,18 +28674,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28482
28674
|
var dropdownIndicatorCSS = baseCSS;
|
|
28483
28675
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28484
28676
|
var children = props.children, innerProps = props.innerProps;
|
|
28485
|
-
return
|
|
28677
|
+
return jsx86("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28486
28678
|
indicator: true,
|
|
28487
28679
|
"dropdown-indicator": true
|
|
28488
|
-
}), innerProps), children ||
|
|
28680
|
+
}), innerProps), children || jsx86(DownChevron, null));
|
|
28489
28681
|
};
|
|
28490
28682
|
var clearIndicatorCSS = baseCSS;
|
|
28491
28683
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28492
28684
|
var children = props.children, innerProps = props.innerProps;
|
|
28493
|
-
return
|
|
28685
|
+
return jsx86("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28494
28686
|
indicator: true,
|
|
28495
28687
|
"clear-indicator": true
|
|
28496
|
-
}), innerProps), children ||
|
|
28688
|
+
}), innerProps), children || jsx86(CrossIcon, null));
|
|
28497
28689
|
};
|
|
28498
28690
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28499
28691
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28509,7 +28701,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28509
28701
|
};
|
|
28510
28702
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28511
28703
|
var innerProps = props.innerProps;
|
|
28512
|
-
return
|
|
28704
|
+
return jsx86("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28513
28705
|
"indicator-separator": true
|
|
28514
28706
|
})));
|
|
28515
28707
|
};
|
|
@@ -28533,7 +28725,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28533
28725
|
};
|
|
28534
28726
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28535
28727
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28536
|
-
return
|
|
28728
|
+
return jsx86("span", {
|
|
28537
28729
|
css: /* @__PURE__ */ css({
|
|
28538
28730
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28539
28731
|
backgroundColor: "currentColor",
|
|
@@ -28548,20 +28740,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28548
28740
|
};
|
|
28549
28741
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28550
28742
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28551
|
-
return
|
|
28743
|
+
return jsx86("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28552
28744
|
innerProps,
|
|
28553
28745
|
isRtl,
|
|
28554
28746
|
size: size4
|
|
28555
28747
|
}), "loadingIndicator", {
|
|
28556
28748
|
indicator: true,
|
|
28557
28749
|
"loading-indicator": true
|
|
28558
|
-
}), innerProps),
|
|
28750
|
+
}), innerProps), jsx86(LoadingDot, {
|
|
28559
28751
|
delay: 0,
|
|
28560
28752
|
offset: isRtl
|
|
28561
|
-
}),
|
|
28753
|
+
}), jsx86(LoadingDot, {
|
|
28562
28754
|
delay: 160,
|
|
28563
28755
|
offset: true
|
|
28564
|
-
}),
|
|
28756
|
+
}), jsx86(LoadingDot, {
|
|
28565
28757
|
delay: 320,
|
|
28566
28758
|
offset: !isRtl
|
|
28567
28759
|
}));
|
|
@@ -28593,7 +28785,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28593
28785
|
};
|
|
28594
28786
|
var Control = function Control2(props) {
|
|
28595
28787
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28596
|
-
return
|
|
28788
|
+
return jsx86("div", _extends({
|
|
28597
28789
|
ref: innerRef
|
|
28598
28790
|
}, getStyleProps(props, "control", {
|
|
28599
28791
|
control: true,
|
|
@@ -28615,15 +28807,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28615
28807
|
};
|
|
28616
28808
|
var Group = function Group2(props) {
|
|
28617
28809
|
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;
|
|
28618
|
-
return
|
|
28810
|
+
return jsx86("div", _extends({}, getStyleProps(props, "group", {
|
|
28619
28811
|
group: true
|
|
28620
|
-
}), innerProps),
|
|
28812
|
+
}), innerProps), jsx86(Heading, _extends({}, headingProps, {
|
|
28621
28813
|
selectProps,
|
|
28622
28814
|
theme,
|
|
28623
28815
|
getStyles,
|
|
28624
28816
|
getClassNames,
|
|
28625
28817
|
cx
|
|
28626
|
-
}), label),
|
|
28818
|
+
}), label), jsx86("div", null, children));
|
|
28627
28819
|
};
|
|
28628
28820
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28629
28821
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28645,7 +28837,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28645
28837
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28646
28838
|
_cleanCommonProps.data;
|
|
28647
28839
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28648
|
-
return
|
|
28840
|
+
return jsx86("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28649
28841
|
"group-heading": true
|
|
28650
28842
|
}), innerProps));
|
|
28651
28843
|
};
|
|
@@ -28697,11 +28889,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28697
28889
|
var Input = function Input2(props) {
|
|
28698
28890
|
var cx = props.cx, value = props.value;
|
|
28699
28891
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28700
|
-
return
|
|
28892
|
+
return jsx86("div", _extends({}, getStyleProps(props, "input", {
|
|
28701
28893
|
"input-container": true
|
|
28702
28894
|
}), {
|
|
28703
28895
|
"data-value": value || ""
|
|
28704
|
-
}),
|
|
28896
|
+
}), jsx86("input", _extends({
|
|
28705
28897
|
className: cx({
|
|
28706
28898
|
input: true
|
|
28707
28899
|
}, inputClassName),
|
|
@@ -28755,35 +28947,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28755
28947
|
};
|
|
28756
28948
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28757
28949
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28758
|
-
return
|
|
28950
|
+
return jsx86("div", innerProps, children);
|
|
28759
28951
|
};
|
|
28760
28952
|
var MultiValueContainer = MultiValueGeneric;
|
|
28761
28953
|
var MultiValueLabel = MultiValueGeneric;
|
|
28762
28954
|
function MultiValueRemove(_ref5) {
|
|
28763
28955
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28764
|
-
return
|
|
28956
|
+
return jsx86("div", _extends({
|
|
28765
28957
|
role: "button"
|
|
28766
|
-
}, innerProps), children ||
|
|
28958
|
+
}, innerProps), children || jsx86(CrossIcon, {
|
|
28767
28959
|
size: 14
|
|
28768
28960
|
}));
|
|
28769
28961
|
}
|
|
28770
28962
|
var MultiValue = function MultiValue2(props) {
|
|
28771
28963
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28772
28964
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28773
|
-
return
|
|
28965
|
+
return jsx86(Container, {
|
|
28774
28966
|
data,
|
|
28775
28967
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28776
28968
|
"multi-value": true,
|
|
28777
28969
|
"multi-value--is-disabled": isDisabled
|
|
28778
28970
|
})), innerProps),
|
|
28779
28971
|
selectProps
|
|
28780
|
-
},
|
|
28972
|
+
}, jsx86(Label, {
|
|
28781
28973
|
data,
|
|
28782
28974
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28783
28975
|
"multi-value__label": true
|
|
28784
28976
|
})),
|
|
28785
28977
|
selectProps
|
|
28786
|
-
}, children),
|
|
28978
|
+
}, children), jsx86(Remove, {
|
|
28787
28979
|
data,
|
|
28788
28980
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28789
28981
|
"multi-value__remove": true
|
|
@@ -28816,7 +29008,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28816
29008
|
};
|
|
28817
29009
|
var Option = function Option2(props) {
|
|
28818
29010
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28819
|
-
return
|
|
29011
|
+
return jsx86("div", _extends({}, getStyleProps(props, "option", {
|
|
28820
29012
|
option: true,
|
|
28821
29013
|
"option--is-disabled": isDisabled,
|
|
28822
29014
|
"option--is-focused": isFocused,
|
|
@@ -28840,7 +29032,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28840
29032
|
};
|
|
28841
29033
|
var Placeholder = function Placeholder2(props) {
|
|
28842
29034
|
var children = props.children, innerProps = props.innerProps;
|
|
28843
|
-
return
|
|
29035
|
+
return jsx86("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28844
29036
|
placeholder: true
|
|
28845
29037
|
}), innerProps), children);
|
|
28846
29038
|
};
|
|
@@ -28862,7 +29054,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28862
29054
|
};
|
|
28863
29055
|
var SingleValue = function SingleValue2(props) {
|
|
28864
29056
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28865
|
-
return
|
|
29057
|
+
return jsx86("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28866
29058
|
"single-value": true,
|
|
28867
29059
|
"single-value--is-disabled": isDisabled
|
|
28868
29060
|
}), innerProps), children);
|
|
@@ -28964,7 +29156,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28964
29156
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28965
29157
|
};
|
|
28966
29158
|
var A11yText = function A11yText2(props) {
|
|
28967
|
-
return
|
|
29159
|
+
return jsx86("span", _extends({
|
|
28968
29160
|
css: _ref
|
|
28969
29161
|
}, props));
|
|
28970
29162
|
};
|
|
@@ -29025,10 +29217,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29025
29217
|
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;
|
|
29026
29218
|
var ariaLabel = selectProps["aria-label"];
|
|
29027
29219
|
var ariaLive = selectProps["aria-live"];
|
|
29028
|
-
var messages =
|
|
29220
|
+
var messages = useMemo9(function() {
|
|
29029
29221
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
29030
29222
|
}, [ariaLiveMessages]);
|
|
29031
|
-
var ariaSelected =
|
|
29223
|
+
var ariaSelected = useMemo9(function() {
|
|
29032
29224
|
var message2 = "";
|
|
29033
29225
|
if (ariaSelection && messages.onChange) {
|
|
29034
29226
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -29050,7 +29242,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29050
29242
|
}
|
|
29051
29243
|
return message2;
|
|
29052
29244
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
29053
|
-
var ariaFocused =
|
|
29245
|
+
var ariaFocused = useMemo9(function() {
|
|
29054
29246
|
var focusMsg = "";
|
|
29055
29247
|
var focused = focusedOption || focusedValue;
|
|
29056
29248
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -29069,7 +29261,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29069
29261
|
}
|
|
29070
29262
|
return focusMsg;
|
|
29071
29263
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
29072
|
-
var ariaResults =
|
|
29264
|
+
var ariaResults = useMemo9(function() {
|
|
29073
29265
|
var resultsMsg = "";
|
|
29074
29266
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
29075
29267
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -29083,7 +29275,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29083
29275
|
return resultsMsg;
|
|
29084
29276
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
29085
29277
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
29086
|
-
var ariaGuidance =
|
|
29278
|
+
var ariaGuidance = useMemo9(function() {
|
|
29087
29279
|
var guidanceMsg = "";
|
|
29088
29280
|
if (messages.guidance) {
|
|
29089
29281
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -29099,18 +29291,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29099
29291
|
}
|
|
29100
29292
|
return guidanceMsg;
|
|
29101
29293
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29102
|
-
var ScreenReaderText =
|
|
29294
|
+
var ScreenReaderText = jsx86(Fragment23, null, jsx86("span", {
|
|
29103
29295
|
id: "aria-selection"
|
|
29104
|
-
}, ariaSelected),
|
|
29296
|
+
}, ariaSelected), jsx86("span", {
|
|
29105
29297
|
id: "aria-focused"
|
|
29106
|
-
}, ariaFocused),
|
|
29298
|
+
}, ariaFocused), jsx86("span", {
|
|
29107
29299
|
id: "aria-results"
|
|
29108
|
-
}, ariaResults),
|
|
29300
|
+
}, ariaResults), jsx86("span", {
|
|
29109
29301
|
id: "aria-guidance"
|
|
29110
29302
|
}, ariaGuidance));
|
|
29111
|
-
return
|
|
29303
|
+
return jsx86(Fragment23, null, jsx86(A11yText$1, {
|
|
29112
29304
|
id
|
|
29113
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29305
|
+
}, isInitialFocus && ScreenReaderText), jsx86(A11yText$1, {
|
|
29114
29306
|
"aria-live": ariaLive,
|
|
29115
29307
|
"aria-atomic": "false",
|
|
29116
29308
|
"aria-relevant": "additions text",
|
|
@@ -29423,7 +29615,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29423
29615
|
function DummyInput(_ref3) {
|
|
29424
29616
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29425
29617
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29426
|
-
return
|
|
29618
|
+
return jsx86("input", _extends({
|
|
29427
29619
|
ref: innerRef
|
|
29428
29620
|
}, filteredProps, {
|
|
29429
29621
|
css: /* @__PURE__ */ css({
|
|
@@ -29518,7 +29710,7 @@ function useScrollCapture(_ref3) {
|
|
|
29518
29710
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29519
29711
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29520
29712
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29521
|
-
|
|
29713
|
+
useEffect17(function() {
|
|
29522
29714
|
if (!isEnabled) return;
|
|
29523
29715
|
var element = scrollTarget.current;
|
|
29524
29716
|
startListening(element);
|
|
@@ -29621,7 +29813,7 @@ function useScrollLock(_ref3) {
|
|
|
29621
29813
|
}
|
|
29622
29814
|
}
|
|
29623
29815
|
}, [accountForScrollbars]);
|
|
29624
|
-
|
|
29816
|
+
useEffect17(function() {
|
|
29625
29817
|
if (!isEnabled) return;
|
|
29626
29818
|
var element = scrollTarget.current;
|
|
29627
29819
|
addScrollLock(element);
|
|
@@ -29665,7 +29857,7 @@ function ScrollManager(_ref3) {
|
|
|
29665
29857
|
setScrollCaptureTarget(element);
|
|
29666
29858
|
setScrollLockTarget(element);
|
|
29667
29859
|
};
|
|
29668
|
-
return
|
|
29860
|
+
return jsx86(Fragment23, null, lockEnabled && jsx86("div", {
|
|
29669
29861
|
onClick: blurSelectInput,
|
|
29670
29862
|
css: _ref2$1
|
|
29671
29863
|
}), children(targetRef));
|
|
@@ -29684,7 +29876,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29684
29876
|
};
|
|
29685
29877
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29686
29878
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29687
|
-
return
|
|
29879
|
+
return jsx86("input", {
|
|
29688
29880
|
required: true,
|
|
29689
29881
|
name: name2,
|
|
29690
29882
|
tabIndex: -1,
|
|
@@ -30825,7 +31017,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30825
31017
|
"aria-describedby": this.getElementId("placeholder")
|
|
30826
31018
|
});
|
|
30827
31019
|
if (!isSearchable) {
|
|
30828
|
-
return /* @__PURE__ */
|
|
31020
|
+
return /* @__PURE__ */ React14.createElement(DummyInput, _extends({
|
|
30829
31021
|
id,
|
|
30830
31022
|
innerRef: this.getInputRef,
|
|
30831
31023
|
onBlur: this.onInputBlur,
|
|
@@ -30838,7 +31030,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30838
31030
|
value: ""
|
|
30839
31031
|
}, ariaAttributes));
|
|
30840
31032
|
}
|
|
30841
|
-
return /* @__PURE__ */
|
|
31033
|
+
return /* @__PURE__ */ React14.createElement(Input3, _extends({}, commonProps, {
|
|
30842
31034
|
autoCapitalize: "none",
|
|
30843
31035
|
autoComplete: "off",
|
|
30844
31036
|
autoCorrect: "off",
|
|
@@ -30866,7 +31058,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30866
31058
|
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;
|
|
30867
31059
|
var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
|
|
30868
31060
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
30869
|
-
return inputValue ? null : /* @__PURE__ */
|
|
31061
|
+
return inputValue ? null : /* @__PURE__ */ React14.createElement(Placeholder3, _extends({}, commonProps, {
|
|
30870
31062
|
key: "placeholder",
|
|
30871
31063
|
isDisabled,
|
|
30872
31064
|
isFocused,
|
|
@@ -30879,7 +31071,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30879
31071
|
return selectValue.map(function(opt, index4) {
|
|
30880
31072
|
var isOptionFocused = opt === focusedValue;
|
|
30881
31073
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
30882
|
-
return /* @__PURE__ */
|
|
31074
|
+
return /* @__PURE__ */ React14.createElement(MultiValue3, _extends({}, commonProps, {
|
|
30883
31075
|
components: {
|
|
30884
31076
|
Container: MultiValueContainer2,
|
|
30885
31077
|
Label: MultiValueLabel2,
|
|
@@ -30908,7 +31100,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30908
31100
|
return null;
|
|
30909
31101
|
}
|
|
30910
31102
|
var singleValue = selectValue[0];
|
|
30911
|
-
return /* @__PURE__ */
|
|
31103
|
+
return /* @__PURE__ */ React14.createElement(SingleValue3, _extends({}, commonProps, {
|
|
30912
31104
|
data: singleValue,
|
|
30913
31105
|
isDisabled
|
|
30914
31106
|
}), this.formatOptionLabel(singleValue, "value"));
|
|
@@ -30928,7 +31120,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30928
31120
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
30929
31121
|
"aria-hidden": "true"
|
|
30930
31122
|
};
|
|
30931
|
-
return /* @__PURE__ */
|
|
31123
|
+
return /* @__PURE__ */ React14.createElement(ClearIndicator3, _extends({}, commonProps, {
|
|
30932
31124
|
innerProps,
|
|
30933
31125
|
isFocused
|
|
30934
31126
|
}));
|
|
@@ -30944,7 +31136,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30944
31136
|
var innerProps = {
|
|
30945
31137
|
"aria-hidden": "true"
|
|
30946
31138
|
};
|
|
30947
|
-
return /* @__PURE__ */
|
|
31139
|
+
return /* @__PURE__ */ React14.createElement(LoadingIndicator3, _extends({}, commonProps, {
|
|
30948
31140
|
innerProps,
|
|
30949
31141
|
isDisabled,
|
|
30950
31142
|
isFocused
|
|
@@ -30958,7 +31150,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30958
31150
|
var commonProps = this.commonProps;
|
|
30959
31151
|
var isDisabled = this.props.isDisabled;
|
|
30960
31152
|
var isFocused = this.state.isFocused;
|
|
30961
|
-
return /* @__PURE__ */
|
|
31153
|
+
return /* @__PURE__ */ React14.createElement(IndicatorSeparator3, _extends({}, commonProps, {
|
|
30962
31154
|
isDisabled,
|
|
30963
31155
|
isFocused
|
|
30964
31156
|
}));
|
|
@@ -30976,7 +31168,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
30976
31168
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
30977
31169
|
"aria-hidden": "true"
|
|
30978
31170
|
};
|
|
30979
|
-
return /* @__PURE__ */
|
|
31171
|
+
return /* @__PURE__ */ React14.createElement(DropdownIndicator3, _extends({}, commonProps, {
|
|
30980
31172
|
innerProps,
|
|
30981
31173
|
isDisabled,
|
|
30982
31174
|
isFocused
|
|
@@ -31011,7 +31203,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31011
31203
|
"aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
|
|
31012
31204
|
// is not supported on Apple devices
|
|
31013
31205
|
};
|
|
31014
|
-
return /* @__PURE__ */
|
|
31206
|
+
return /* @__PURE__ */ React14.createElement(Option3, _extends({}, commonProps, {
|
|
31015
31207
|
innerProps,
|
|
31016
31208
|
data,
|
|
31017
31209
|
isDisabled,
|
|
@@ -31031,7 +31223,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31031
31223
|
var _data = item.data, options2 = item.options, groupIndex = item.index;
|
|
31032
31224
|
var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
|
|
31033
31225
|
var headingId = "".concat(groupId, "-heading");
|
|
31034
|
-
return /* @__PURE__ */
|
|
31226
|
+
return /* @__PURE__ */ React14.createElement(Group3, _extends({}, commonProps, {
|
|
31035
31227
|
key: groupId,
|
|
31036
31228
|
data: _data,
|
|
31037
31229
|
options: options2,
|
|
@@ -31053,13 +31245,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31053
31245
|
inputValue
|
|
31054
31246
|
});
|
|
31055
31247
|
if (message2 === null) return null;
|
|
31056
|
-
menuUI = /* @__PURE__ */
|
|
31248
|
+
menuUI = /* @__PURE__ */ React14.createElement(LoadingMessage3, commonProps, message2);
|
|
31057
31249
|
} else {
|
|
31058
31250
|
var _message = noOptionsMessage2({
|
|
31059
31251
|
inputValue
|
|
31060
31252
|
});
|
|
31061
31253
|
if (_message === null) return null;
|
|
31062
|
-
menuUI = /* @__PURE__ */
|
|
31254
|
+
menuUI = /* @__PURE__ */ React14.createElement(NoOptionsMessage3, commonProps, _message);
|
|
31063
31255
|
}
|
|
31064
31256
|
var menuPlacementProps = {
|
|
31065
31257
|
minMenuHeight,
|
|
@@ -31068,9 +31260,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31068
31260
|
menuPosition,
|
|
31069
31261
|
menuShouldScrollIntoView
|
|
31070
31262
|
};
|
|
31071
|
-
var menuElement = /* @__PURE__ */
|
|
31263
|
+
var menuElement = /* @__PURE__ */ React14.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
|
|
31072
31264
|
var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
|
|
31073
|
-
return /* @__PURE__ */
|
|
31265
|
+
return /* @__PURE__ */ React14.createElement(Menu3, _extends({}, commonProps, menuPlacementProps, {
|
|
31074
31266
|
innerRef: ref,
|
|
31075
31267
|
innerProps: {
|
|
31076
31268
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -31078,13 +31270,13 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31078
31270
|
},
|
|
31079
31271
|
isLoading,
|
|
31080
31272
|
placement
|
|
31081
|
-
}), /* @__PURE__ */
|
|
31273
|
+
}), /* @__PURE__ */ React14.createElement(ScrollManager, {
|
|
31082
31274
|
captureEnabled: captureMenuScroll,
|
|
31083
31275
|
onTopArrive: onMenuScrollToTop,
|
|
31084
31276
|
onBottomArrive: onMenuScrollToBottom,
|
|
31085
31277
|
lockEnabled: menuShouldBlockScroll
|
|
31086
31278
|
}, function(scrollTargetRef) {
|
|
31087
|
-
return /* @__PURE__ */
|
|
31279
|
+
return /* @__PURE__ */ React14.createElement(MenuList3, _extends({}, commonProps, {
|
|
31088
31280
|
innerRef: function innerRef(instance2) {
|
|
31089
31281
|
_this4.getMenuListRef(instance2);
|
|
31090
31282
|
scrollTargetRef(instance2);
|
|
@@ -31100,7 +31292,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31100
31292
|
}), menuUI);
|
|
31101
31293
|
}));
|
|
31102
31294
|
});
|
|
31103
|
-
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */
|
|
31295
|
+
return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React14.createElement(MenuPortal3, _extends({}, commonProps, {
|
|
31104
31296
|
appendTo: menuPortalTarget,
|
|
31105
31297
|
controlElement: this.controlRef,
|
|
31106
31298
|
menuPlacement,
|
|
@@ -31114,7 +31306,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31114
31306
|
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;
|
|
31115
31307
|
var selectValue = this.state.selectValue;
|
|
31116
31308
|
if (required && !this.hasValue() && !isDisabled) {
|
|
31117
|
-
return /* @__PURE__ */
|
|
31309
|
+
return /* @__PURE__ */ React14.createElement(RequiredInput$1, {
|
|
31118
31310
|
name: name2,
|
|
31119
31311
|
onFocus: this.onValueInputFocus
|
|
31120
31312
|
});
|
|
@@ -31125,29 +31317,29 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31125
31317
|
var value = selectValue.map(function(opt) {
|
|
31126
31318
|
return _this5.getOptionValue(opt);
|
|
31127
31319
|
}).join(delimiter2);
|
|
31128
|
-
return /* @__PURE__ */
|
|
31320
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31129
31321
|
name: name2,
|
|
31130
31322
|
type: "hidden",
|
|
31131
31323
|
value
|
|
31132
31324
|
});
|
|
31133
31325
|
} else {
|
|
31134
31326
|
var input = selectValue.length > 0 ? selectValue.map(function(opt, i3) {
|
|
31135
|
-
return /* @__PURE__ */
|
|
31327
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31136
31328
|
key: "i-".concat(i3),
|
|
31137
31329
|
name: name2,
|
|
31138
31330
|
type: "hidden",
|
|
31139
31331
|
value: _this5.getOptionValue(opt)
|
|
31140
31332
|
});
|
|
31141
|
-
}) : /* @__PURE__ */
|
|
31333
|
+
}) : /* @__PURE__ */ React14.createElement("input", {
|
|
31142
31334
|
name: name2,
|
|
31143
31335
|
type: "hidden",
|
|
31144
31336
|
value: ""
|
|
31145
31337
|
});
|
|
31146
|
-
return /* @__PURE__ */
|
|
31338
|
+
return /* @__PURE__ */ React14.createElement("div", null, input);
|
|
31147
31339
|
}
|
|
31148
31340
|
} else {
|
|
31149
31341
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
|
|
31150
|
-
return /* @__PURE__ */
|
|
31342
|
+
return /* @__PURE__ */ React14.createElement("input", {
|
|
31151
31343
|
name: name2,
|
|
31152
31344
|
type: "hidden",
|
|
31153
31345
|
value: _value
|
|
@@ -31160,7 +31352,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31160
31352
|
var commonProps = this.commonProps;
|
|
31161
31353
|
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;
|
|
31162
31354
|
var focusableOptions = this.getFocusableOptions();
|
|
31163
|
-
return /* @__PURE__ */
|
|
31355
|
+
return /* @__PURE__ */ React14.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
31164
31356
|
id: this.getElementId("live-region"),
|
|
31165
31357
|
ariaSelection,
|
|
31166
31358
|
focusedOption,
|
|
@@ -31178,7 +31370,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31178
31370
|
var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
|
|
31179
31371
|
var isFocused = this.state.isFocused;
|
|
31180
31372
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
31181
|
-
return /* @__PURE__ */
|
|
31373
|
+
return /* @__PURE__ */ React14.createElement(SelectContainer3, _extends({}, commonProps, {
|
|
31182
31374
|
className,
|
|
31183
31375
|
innerProps: {
|
|
31184
31376
|
id,
|
|
@@ -31186,7 +31378,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31186
31378
|
},
|
|
31187
31379
|
isDisabled,
|
|
31188
31380
|
isFocused
|
|
31189
|
-
}), this.renderLiveRegion(), /* @__PURE__ */
|
|
31381
|
+
}), this.renderLiveRegion(), /* @__PURE__ */ React14.createElement(Control3, _extends({}, commonProps, {
|
|
31190
31382
|
innerRef: this.getControlRef,
|
|
31191
31383
|
innerProps: {
|
|
31192
31384
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -31195,9 +31387,9 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31195
31387
|
isDisabled,
|
|
31196
31388
|
isFocused,
|
|
31197
31389
|
menuIsOpen
|
|
31198
|
-
}), /* @__PURE__ */
|
|
31390
|
+
}), /* @__PURE__ */ React14.createElement(ValueContainer3, _extends({}, commonProps, {
|
|
31199
31391
|
isDisabled
|
|
31200
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */
|
|
31392
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React14.createElement(IndicatorsContainer3, _extends({}, commonProps, {
|
|
31201
31393
|
isDisabled
|
|
31202
31394
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
31203
31395
|
}
|
|
@@ -31266,7 +31458,7 @@ var import_defineProperty3 = __toESM(require_defineProperty());
|
|
|
31266
31458
|
import "react-dom";
|
|
31267
31459
|
var StateManagedSelect = /* @__PURE__ */ forwardRef5(function(props, ref) {
|
|
31268
31460
|
var baseSelectProps = useStateManager(props);
|
|
31269
|
-
return /* @__PURE__ */
|
|
31461
|
+
return /* @__PURE__ */ React15.createElement(Select, _extends({
|
|
31270
31462
|
ref
|
|
31271
31463
|
}, baseSelectProps));
|
|
31272
31464
|
});
|
|
@@ -31274,7 +31466,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31274
31466
|
|
|
31275
31467
|
// src/widgets/basic/date-field/date.tsx
|
|
31276
31468
|
var import_moment2 = __toESM(require_moment());
|
|
31277
|
-
import { Fragment as Fragment24, jsx as
|
|
31469
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31278
31470
|
var DateField = (props) => {
|
|
31279
31471
|
const {
|
|
31280
31472
|
name: name2,
|
|
@@ -31302,8 +31494,8 @@ var DateField = (props) => {
|
|
|
31302
31494
|
} = props;
|
|
31303
31495
|
const { t: t3 } = useI18n();
|
|
31304
31496
|
const InputDateCustom = forwardRef6(
|
|
31305
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
31306
|
-
/* @__PURE__ */
|
|
31497
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs56("label", { className: `flex ${className}`, children: [
|
|
31498
|
+
/* @__PURE__ */ jsx88(
|
|
31307
31499
|
"input",
|
|
31308
31500
|
{
|
|
31309
31501
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31317,13 +31509,13 @@ var DateField = (props) => {
|
|
|
31317
31509
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31318
31510
|
}
|
|
31319
31511
|
),
|
|
31320
|
-
isForm2 && /* @__PURE__ */
|
|
31512
|
+
isForm2 && /* @__PURE__ */ jsx88(CalendarIcon, {})
|
|
31321
31513
|
] })
|
|
31322
31514
|
);
|
|
31323
31515
|
if (!isForm && !isEditTable) {
|
|
31324
|
-
return /* @__PURE__ */
|
|
31516
|
+
return /* @__PURE__ */ jsx88("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31325
31517
|
} else {
|
|
31326
|
-
return /* @__PURE__ */
|
|
31518
|
+
return /* @__PURE__ */ jsx88(
|
|
31327
31519
|
Controller,
|
|
31328
31520
|
{
|
|
31329
31521
|
name: name2 || "",
|
|
@@ -31339,14 +31531,14 @@ var DateField = (props) => {
|
|
|
31339
31531
|
},
|
|
31340
31532
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31341
31533
|
const { setError, clearErrors } = methods;
|
|
31342
|
-
|
|
31534
|
+
useEffect18(() => {
|
|
31343
31535
|
if (value) {
|
|
31344
31536
|
clearErrors(name2);
|
|
31345
31537
|
}
|
|
31346
31538
|
}, [value, clearErrors, name2]);
|
|
31347
31539
|
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;
|
|
31348
|
-
return /* @__PURE__ */
|
|
31349
|
-
/* @__PURE__ */
|
|
31540
|
+
return /* @__PURE__ */ jsxs56(Fragment24, { children: [
|
|
31541
|
+
/* @__PURE__ */ jsx88(
|
|
31350
31542
|
DatePicker,
|
|
31351
31543
|
{
|
|
31352
31544
|
selected: selectedDate,
|
|
@@ -31394,7 +31586,7 @@ var DateField = (props) => {
|
|
|
31394
31586
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31395
31587
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31396
31588
|
showTimeInput: showTime,
|
|
31397
|
-
customInput: /* @__PURE__ */
|
|
31589
|
+
customInput: /* @__PURE__ */ jsx88(
|
|
31398
31590
|
InputDateCustom,
|
|
31399
31591
|
{
|
|
31400
31592
|
isForm,
|
|
@@ -31412,7 +31604,7 @@ var DateField = (props) => {
|
|
|
31412
31604
|
increaseMonth,
|
|
31413
31605
|
prevMonthButtonDisabled,
|
|
31414
31606
|
nextMonthButtonDisabled
|
|
31415
|
-
}) => /* @__PURE__ */
|
|
31607
|
+
}) => /* @__PURE__ */ jsxs56(
|
|
31416
31608
|
"div",
|
|
31417
31609
|
{
|
|
31418
31610
|
style: {
|
|
@@ -31421,7 +31613,7 @@ var DateField = (props) => {
|
|
|
31421
31613
|
justifyContent: "center"
|
|
31422
31614
|
},
|
|
31423
31615
|
children: [
|
|
31424
|
-
/* @__PURE__ */
|
|
31616
|
+
/* @__PURE__ */ jsx88(
|
|
31425
31617
|
"button",
|
|
31426
31618
|
{
|
|
31427
31619
|
onClick: decreaseMonth,
|
|
@@ -31429,7 +31621,7 @@ var DateField = (props) => {
|
|
|
31429
31621
|
children: "<"
|
|
31430
31622
|
}
|
|
31431
31623
|
),
|
|
31432
|
-
/* @__PURE__ */
|
|
31624
|
+
/* @__PURE__ */ jsx88(
|
|
31433
31625
|
StateManagedSelect$1,
|
|
31434
31626
|
{
|
|
31435
31627
|
classNames: {
|
|
@@ -31455,7 +31647,7 @@ var DateField = (props) => {
|
|
|
31455
31647
|
autoFocus: true
|
|
31456
31648
|
}
|
|
31457
31649
|
),
|
|
31458
|
-
/* @__PURE__ */
|
|
31650
|
+
/* @__PURE__ */ jsx88(
|
|
31459
31651
|
StateManagedSelect$1,
|
|
31460
31652
|
{
|
|
31461
31653
|
classNames: {
|
|
@@ -31483,7 +31675,7 @@ var DateField = (props) => {
|
|
|
31483
31675
|
}))
|
|
31484
31676
|
}
|
|
31485
31677
|
),
|
|
31486
|
-
/* @__PURE__ */
|
|
31678
|
+
/* @__PURE__ */ jsx88(
|
|
31487
31679
|
"button",
|
|
31488
31680
|
{
|
|
31489
31681
|
onClick: increaseMonth,
|
|
@@ -31496,7 +31688,7 @@ var DateField = (props) => {
|
|
|
31496
31688
|
)
|
|
31497
31689
|
}
|
|
31498
31690
|
),
|
|
31499
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31691
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx88("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31500
31692
|
] });
|
|
31501
31693
|
}
|
|
31502
31694
|
}
|
|
@@ -31505,26 +31697,26 @@ var DateField = (props) => {
|
|
|
31505
31697
|
};
|
|
31506
31698
|
|
|
31507
31699
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31508
|
-
import { jsx as
|
|
31700
|
+
import { jsx as jsx89, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31509
31701
|
var DownLoadBinaryField = (props) => {
|
|
31510
31702
|
const { handleFileDownload } = props;
|
|
31511
31703
|
const { t: t3 } = useI18n();
|
|
31512
|
-
return /* @__PURE__ */
|
|
31704
|
+
return /* @__PURE__ */ jsxs57(
|
|
31513
31705
|
"button",
|
|
31514
31706
|
{
|
|
31515
31707
|
type: "button",
|
|
31516
31708
|
onClick: handleFileDownload,
|
|
31517
31709
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31518
31710
|
children: [
|
|
31519
|
-
/* @__PURE__ */
|
|
31520
|
-
/* @__PURE__ */
|
|
31711
|
+
/* @__PURE__ */ jsx89(DownloadIcon, {}),
|
|
31712
|
+
/* @__PURE__ */ jsx89("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31521
31713
|
]
|
|
31522
31714
|
}
|
|
31523
31715
|
);
|
|
31524
31716
|
};
|
|
31525
31717
|
|
|
31526
31718
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31527
|
-
import { jsx as
|
|
31719
|
+
import { jsx as jsx90, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31528
31720
|
var DownloadFileField = (props) => {
|
|
31529
31721
|
const {
|
|
31530
31722
|
readonly,
|
|
@@ -31536,15 +31728,15 @@ var DownloadFileField = (props) => {
|
|
|
31536
31728
|
handleFileChange,
|
|
31537
31729
|
handleFileDownload
|
|
31538
31730
|
} = props;
|
|
31539
|
-
return /* @__PURE__ */
|
|
31540
|
-
/* @__PURE__ */
|
|
31731
|
+
return /* @__PURE__ */ jsxs58("div", { className: "", children: [
|
|
31732
|
+
/* @__PURE__ */ jsxs58(
|
|
31541
31733
|
"label",
|
|
31542
31734
|
{
|
|
31543
31735
|
htmlFor: inputId,
|
|
31544
31736
|
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",
|
|
31545
31737
|
children: [
|
|
31546
|
-
file ? /* @__PURE__ */
|
|
31547
|
-
/* @__PURE__ */
|
|
31738
|
+
file ? /* @__PURE__ */ jsx90("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx90("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31739
|
+
/* @__PURE__ */ jsx90(
|
|
31548
31740
|
"input",
|
|
31549
31741
|
{
|
|
31550
31742
|
id: inputId,
|
|
@@ -31558,7 +31750,7 @@ var DownloadFileField = (props) => {
|
|
|
31558
31750
|
]
|
|
31559
31751
|
}
|
|
31560
31752
|
),
|
|
31561
|
-
file && /* @__PURE__ */
|
|
31753
|
+
file && /* @__PURE__ */ jsx90(
|
|
31562
31754
|
"button",
|
|
31563
31755
|
{
|
|
31564
31756
|
onClick: handleFileDownload,
|
|
@@ -31571,8 +31763,8 @@ var DownloadFileField = (props) => {
|
|
|
31571
31763
|
};
|
|
31572
31764
|
|
|
31573
31765
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31574
|
-
import { useState as
|
|
31575
|
-
import { jsx as
|
|
31766
|
+
import { useState as useState17 } from "react";
|
|
31767
|
+
import { jsx as jsx91, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31576
31768
|
var DropdownField = (props) => {
|
|
31577
31769
|
const {
|
|
31578
31770
|
options: options2,
|
|
@@ -31584,32 +31776,32 @@ var DropdownField = (props) => {
|
|
|
31584
31776
|
dropdownClassName = "",
|
|
31585
31777
|
useClickOutside: useClickOutside2
|
|
31586
31778
|
} = props;
|
|
31587
|
-
const [open, setOpen] =
|
|
31779
|
+
const [open, setOpen] = useState17(false);
|
|
31588
31780
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31589
|
-
return /* @__PURE__ */
|
|
31781
|
+
return /* @__PURE__ */ jsxs59(
|
|
31590
31782
|
"div",
|
|
31591
31783
|
{
|
|
31592
31784
|
ref: dropdownRef,
|
|
31593
31785
|
className: `relative ${className}`,
|
|
31594
31786
|
onClick: () => setOpen(!open),
|
|
31595
31787
|
children: [
|
|
31596
|
-
/* @__PURE__ */
|
|
31788
|
+
/* @__PURE__ */ jsxs59(
|
|
31597
31789
|
"div",
|
|
31598
31790
|
{
|
|
31599
31791
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31600
31792
|
children: [
|
|
31601
31793
|
selectedValue?.icon,
|
|
31602
|
-
/* @__PURE__ */
|
|
31603
|
-
/* @__PURE__ */
|
|
31794
|
+
/* @__PURE__ */ jsx91("span", { children: selectedValue?.label }),
|
|
31795
|
+
/* @__PURE__ */ jsx91(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31604
31796
|
]
|
|
31605
31797
|
}
|
|
31606
31798
|
),
|
|
31607
|
-
open && /* @__PURE__ */
|
|
31799
|
+
open && /* @__PURE__ */ jsx91(
|
|
31608
31800
|
"div",
|
|
31609
31801
|
{
|
|
31610
31802
|
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}`,
|
|
31611
31803
|
onClick: (e3) => e3.stopPropagation(),
|
|
31612
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31804
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx91(
|
|
31613
31805
|
"div",
|
|
31614
31806
|
{
|
|
31615
31807
|
onClick: () => {
|
|
@@ -31629,7 +31821,7 @@ var DropdownField = (props) => {
|
|
|
31629
31821
|
};
|
|
31630
31822
|
|
|
31631
31823
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31632
|
-
import { Fragment as Fragment25, jsx as
|
|
31824
|
+
import { Fragment as Fragment25, jsx as jsx92, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
31633
31825
|
var FeeField = (props) => {
|
|
31634
31826
|
const { value, formValues } = props;
|
|
31635
31827
|
const { t: t3 } = useI18n();
|
|
@@ -31640,27 +31832,27 @@ var FeeField = (props) => {
|
|
|
31640
31832
|
)
|
|
31641
31833
|
) + " VND";
|
|
31642
31834
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31643
|
-
return /* @__PURE__ */
|
|
31835
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
31644
31836
|
value?.subtotals?.map((sub) => {
|
|
31645
31837
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31646
|
-
return /* @__PURE__ */
|
|
31647
|
-
/* @__PURE__ */
|
|
31648
|
-
/* @__PURE__ */
|
|
31838
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
31839
|
+
/* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31840
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31649
31841
|
sub?.name,
|
|
31650
31842
|
":"
|
|
31651
31843
|
] }),
|
|
31652
|
-
/* @__PURE__ */
|
|
31844
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31653
31845
|
] }),
|
|
31654
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31846
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs60(
|
|
31655
31847
|
"div",
|
|
31656
31848
|
{
|
|
31657
31849
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31658
31850
|
children: [
|
|
31659
|
-
/* @__PURE__ */
|
|
31851
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31660
31852
|
group?.group_name,
|
|
31661
31853
|
":"
|
|
31662
31854
|
] }),
|
|
31663
|
-
/* @__PURE__ */
|
|
31855
|
+
/* @__PURE__ */ jsx92("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31664
31856
|
]
|
|
31665
31857
|
},
|
|
31666
31858
|
`tax_groups_${group?.id}`
|
|
@@ -31668,33 +31860,33 @@ var FeeField = (props) => {
|
|
|
31668
31860
|
] });
|
|
31669
31861
|
}
|
|
31670
31862
|
}),
|
|
31671
|
-
/* @__PURE__ */
|
|
31672
|
-
/* @__PURE__ */
|
|
31863
|
+
/* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31864
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31673
31865
|
t3("total"),
|
|
31674
31866
|
":"
|
|
31675
31867
|
] }),
|
|
31676
|
-
/* @__PURE__ */
|
|
31868
|
+
/* @__PURE__ */ jsx92("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31677
31869
|
] }),
|
|
31678
|
-
/* @__PURE__ */
|
|
31679
|
-
/* @__PURE__ */
|
|
31870
|
+
/* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31871
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31680
31872
|
t3("paid_amount"),
|
|
31681
31873
|
":"
|
|
31682
31874
|
] }),
|
|
31683
|
-
/* @__PURE__ */
|
|
31875
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31684
31876
|
] }),
|
|
31685
|
-
/* @__PURE__ */
|
|
31686
|
-
/* @__PURE__ */
|
|
31877
|
+
/* @__PURE__ */ jsxs60("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31878
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31687
31879
|
t3("remanining_amount"),
|
|
31688
31880
|
":"
|
|
31689
31881
|
] }),
|
|
31690
|
-
/* @__PURE__ */
|
|
31882
|
+
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31691
31883
|
] })
|
|
31692
31884
|
] });
|
|
31693
31885
|
};
|
|
31694
31886
|
|
|
31695
31887
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31696
|
-
import { useEffect as
|
|
31697
|
-
import { jsx as
|
|
31888
|
+
import { useEffect as useEffect19, useRef as useRef14, useState as useState18 } from "react";
|
|
31889
|
+
import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31698
31890
|
var RenderFile = ({
|
|
31699
31891
|
file,
|
|
31700
31892
|
onDelete,
|
|
@@ -31704,16 +31896,16 @@ var RenderFile = ({
|
|
|
31704
31896
|
readAs: "all"
|
|
31705
31897
|
});
|
|
31706
31898
|
const fileTypeIcon = {
|
|
31707
|
-
"application/pdf": /* @__PURE__ */
|
|
31708
|
-
"application/zip": /* @__PURE__ */
|
|
31709
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31710
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31711
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31899
|
+
"application/pdf": /* @__PURE__ */ jsx93(PdfIcon, {}),
|
|
31900
|
+
"application/zip": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31901
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx93(ZipIcon, {}),
|
|
31902
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx93(ExcelIcon, {}),
|
|
31903
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx93(ExcelIcon, {})
|
|
31712
31904
|
};
|
|
31713
|
-
return /* @__PURE__ */
|
|
31714
|
-
/* @__PURE__ */
|
|
31715
|
-
/* @__PURE__ */
|
|
31716
|
-
/* @__PURE__ */
|
|
31905
|
+
return /* @__PURE__ */ jsxs61("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31906
|
+
/* @__PURE__ */ jsx93("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31907
|
+
/* @__PURE__ */ jsxs61("div", { children: [
|
|
31908
|
+
/* @__PURE__ */ jsx93(
|
|
31717
31909
|
"div",
|
|
31718
31910
|
{
|
|
31719
31911
|
style: {
|
|
@@ -31723,20 +31915,20 @@ var RenderFile = ({
|
|
|
31723
31915
|
children: file?.name || file?.display_name || info?.name
|
|
31724
31916
|
}
|
|
31725
31917
|
),
|
|
31726
|
-
/* @__PURE__ */
|
|
31918
|
+
/* @__PURE__ */ jsx93("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31727
31919
|
] }),
|
|
31728
|
-
/* @__PURE__ */
|
|
31729
|
-
/* @__PURE__ */
|
|
31920
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31921
|
+
/* @__PURE__ */ jsx93(
|
|
31730
31922
|
"span",
|
|
31731
31923
|
{
|
|
31732
31924
|
onClick: () => onDownload && onDownload(
|
|
31733
31925
|
file?.data,
|
|
31734
31926
|
file?.name || file?.display_name || info?.name
|
|
31735
31927
|
),
|
|
31736
|
-
children: /* @__PURE__ */
|
|
31928
|
+
children: /* @__PURE__ */ jsx93(DownloadIcon, {})
|
|
31737
31929
|
}
|
|
31738
31930
|
),
|
|
31739
|
-
/* @__PURE__ */
|
|
31931
|
+
/* @__PURE__ */ jsx93("span", { onClick: onDelete, children: /* @__PURE__ */ jsx93(DeleteIconDanger, {}) })
|
|
31740
31932
|
] })
|
|
31741
31933
|
] });
|
|
31742
31934
|
};
|
|
@@ -31759,9 +31951,9 @@ var FileUploadField = (props) => {
|
|
|
31759
31951
|
} = props;
|
|
31760
31952
|
const { t: t3 } = useI18n();
|
|
31761
31953
|
const fileInputRef = useRef14(null);
|
|
31762
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31763
|
-
const [uploadError, setUploadError] =
|
|
31764
|
-
|
|
31954
|
+
const [selectedFiles, setSelectedFiles] = useState18([]);
|
|
31955
|
+
const [uploadError, setUploadError] = useState18();
|
|
31956
|
+
useEffect19(() => {
|
|
31765
31957
|
if (selectedFiles?.length === 0 && value) {
|
|
31766
31958
|
setSelectedFiles([
|
|
31767
31959
|
{
|
|
@@ -31770,7 +31962,7 @@ var FileUploadField = (props) => {
|
|
|
31770
31962
|
]);
|
|
31771
31963
|
}
|
|
31772
31964
|
}, [value]);
|
|
31773
|
-
return /* @__PURE__ */
|
|
31965
|
+
return /* @__PURE__ */ jsx93(
|
|
31774
31966
|
Controller,
|
|
31775
31967
|
{
|
|
31776
31968
|
name: name2 || "",
|
|
@@ -31779,7 +31971,7 @@ var FileUploadField = (props) => {
|
|
|
31779
31971
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31780
31972
|
},
|
|
31781
31973
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31782
|
-
|
|
31974
|
+
useEffect19(() => {
|
|
31783
31975
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31784
31976
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31785
31977
|
data = data.split(",")[1];
|
|
@@ -31795,8 +31987,8 @@ var FileUploadField = (props) => {
|
|
|
31795
31987
|
);
|
|
31796
31988
|
}
|
|
31797
31989
|
}, [selectedFiles]);
|
|
31798
|
-
return /* @__PURE__ */
|
|
31799
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
31990
|
+
return /* @__PURE__ */ jsxs61("div", { children: [
|
|
31991
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx93(
|
|
31800
31992
|
RenderFile,
|
|
31801
31993
|
{
|
|
31802
31994
|
file: fileItem,
|
|
@@ -31811,8 +32003,8 @@ var FileUploadField = (props) => {
|
|
|
31811
32003
|
}
|
|
31812
32004
|
}
|
|
31813
32005
|
)),
|
|
31814
|
-
uploadError && /* @__PURE__ */
|
|
31815
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
32006
|
+
uploadError && /* @__PURE__ */ jsx93("div", { className: "text-[#de4747]", children: uploadError }),
|
|
32007
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx93(
|
|
31816
32008
|
ButtonSelectFiles,
|
|
31817
32009
|
{
|
|
31818
32010
|
fileInputRef,
|
|
@@ -31827,7 +32019,7 @@ var FileUploadField = (props) => {
|
|
|
31827
32019
|
useUploadFile
|
|
31828
32020
|
}
|
|
31829
32021
|
),
|
|
31830
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32022
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx93("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31831
32023
|
] });
|
|
31832
32024
|
}
|
|
31833
32025
|
}
|
|
@@ -31835,8 +32027,8 @@ var FileUploadField = (props) => {
|
|
|
31835
32027
|
};
|
|
31836
32028
|
|
|
31837
32029
|
// src/widgets/basic/float-field/float.tsx
|
|
31838
|
-
import { useEffect as
|
|
31839
|
-
import { Fragment as Fragment26, jsx as
|
|
32030
|
+
import { useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
|
|
32031
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31840
32032
|
var FloatField = (props) => {
|
|
31841
32033
|
const {
|
|
31842
32034
|
name: name2,
|
|
@@ -31854,9 +32046,9 @@ var FloatField = (props) => {
|
|
|
31854
32046
|
} = props;
|
|
31855
32047
|
const { t: t3 } = useI18n();
|
|
31856
32048
|
if (!isForm && !isEditTable) {
|
|
31857
|
-
return /* @__PURE__ */
|
|
32049
|
+
return /* @__PURE__ */ jsx94("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31858
32050
|
}
|
|
31859
|
-
return /* @__PURE__ */
|
|
32051
|
+
return /* @__PURE__ */ jsx94(
|
|
31860
32052
|
Controller,
|
|
31861
32053
|
{
|
|
31862
32054
|
name: name2 ?? "",
|
|
@@ -31867,12 +32059,12 @@ var FloatField = (props) => {
|
|
|
31867
32059
|
},
|
|
31868
32060
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31869
32061
|
const { setError, clearErrors } = methods;
|
|
31870
|
-
const [inputValue, setInputValue] =
|
|
32062
|
+
const [inputValue, setInputValue] = useState19(
|
|
31871
32063
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31872
32064
|
);
|
|
31873
32065
|
const isDirtyRef = useRef15(false);
|
|
31874
32066
|
const lastCommittedValueRef = useRef15(null);
|
|
31875
|
-
|
|
32067
|
+
useEffect20(() => {
|
|
31876
32068
|
if (isDirtyRef.current) return;
|
|
31877
32069
|
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31878
32070
|
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
@@ -31950,8 +32142,8 @@ var FloatField = (props) => {
|
|
|
31950
32142
|
}
|
|
31951
32143
|
isDirtyRef.current = false;
|
|
31952
32144
|
};
|
|
31953
|
-
return /* @__PURE__ */
|
|
31954
|
-
/* @__PURE__ */
|
|
32145
|
+
return /* @__PURE__ */ jsxs62(Fragment26, { children: [
|
|
32146
|
+
/* @__PURE__ */ jsx94(
|
|
31955
32147
|
"input",
|
|
31956
32148
|
{
|
|
31957
32149
|
value: inputValue,
|
|
@@ -31970,7 +32162,7 @@ var FloatField = (props) => {
|
|
|
31970
32162
|
`
|
|
31971
32163
|
}
|
|
31972
32164
|
),
|
|
31973
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32165
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx94("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31974
32166
|
] });
|
|
31975
32167
|
}
|
|
31976
32168
|
}
|
|
@@ -31978,8 +32170,8 @@ var FloatField = (props) => {
|
|
|
31978
32170
|
};
|
|
31979
32171
|
|
|
31980
32172
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31981
|
-
import { useState as
|
|
31982
|
-
import { Fragment as Fragment27, jsx as
|
|
32173
|
+
import { useState as useState20 } from "react";
|
|
32174
|
+
import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
31983
32175
|
var FloatTimeField = (props) => {
|
|
31984
32176
|
const {
|
|
31985
32177
|
name: name2,
|
|
@@ -31995,9 +32187,9 @@ var FloatTimeField = (props) => {
|
|
|
31995
32187
|
const { t: t3 } = useI18n();
|
|
31996
32188
|
if (!isForm) {
|
|
31997
32189
|
const formatValue = value ?? 0;
|
|
31998
|
-
return /* @__PURE__ */
|
|
32190
|
+
return /* @__PURE__ */ jsx95("span", { children: convertFloatToTime(formatValue) });
|
|
31999
32191
|
}
|
|
32000
|
-
return /* @__PURE__ */
|
|
32192
|
+
return /* @__PURE__ */ jsx95(
|
|
32001
32193
|
Controller,
|
|
32002
32194
|
{
|
|
32003
32195
|
name: name2 ?? "",
|
|
@@ -32010,11 +32202,11 @@ var FloatTimeField = (props) => {
|
|
|
32010
32202
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32011
32203
|
fieldState: { error: error2, isDirty }
|
|
32012
32204
|
}) => {
|
|
32013
|
-
const [input, setInput] =
|
|
32205
|
+
const [input, setInput] = useState20(
|
|
32014
32206
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32015
32207
|
);
|
|
32016
|
-
const [formattedTime, setFormattedTime] =
|
|
32017
|
-
const [errors, setErrors] =
|
|
32208
|
+
const [formattedTime, setFormattedTime] = useState20("");
|
|
32209
|
+
const [errors, setErrors] = useState20("");
|
|
32018
32210
|
const handleInputChange = (e3) => {
|
|
32019
32211
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32020
32212
|
setInput(raw);
|
|
@@ -32059,8 +32251,8 @@ var FloatTimeField = (props) => {
|
|
|
32059
32251
|
}
|
|
32060
32252
|
onBlur();
|
|
32061
32253
|
};
|
|
32062
|
-
return /* @__PURE__ */
|
|
32063
|
-
/* @__PURE__ */
|
|
32254
|
+
return /* @__PURE__ */ jsxs63(Fragment27, { children: [
|
|
32255
|
+
/* @__PURE__ */ jsx95(
|
|
32064
32256
|
"input",
|
|
32065
32257
|
{
|
|
32066
32258
|
type: "text",
|
|
@@ -32092,7 +32284,7 @@ var FloatTimeField = (props) => {
|
|
|
32092
32284
|
readOnly: readonly
|
|
32093
32285
|
}
|
|
32094
32286
|
),
|
|
32095
|
-
(error2 || errors) && /* @__PURE__ */
|
|
32287
|
+
(error2 || errors) && /* @__PURE__ */ jsx95("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32096
32288
|
] });
|
|
32097
32289
|
}
|
|
32098
32290
|
}
|
|
@@ -32100,8 +32292,8 @@ var FloatTimeField = (props) => {
|
|
|
32100
32292
|
};
|
|
32101
32293
|
|
|
32102
32294
|
// src/widgets/basic/html-field/html.tsx
|
|
32103
|
-
import { useEffect as
|
|
32104
|
-
import { jsx as
|
|
32295
|
+
import { useEffect as useEffect21, useRef as useRef16 } from "react";
|
|
32296
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
32105
32297
|
var HtmlField = (props) => {
|
|
32106
32298
|
const {
|
|
32107
32299
|
name: name2,
|
|
@@ -32115,16 +32307,16 @@ var HtmlField = (props) => {
|
|
|
32115
32307
|
} = props;
|
|
32116
32308
|
const divRef = useRef16(null);
|
|
32117
32309
|
if (!isForm && !isEditTable) {
|
|
32118
|
-
return /* @__PURE__ */
|
|
32310
|
+
return /* @__PURE__ */ jsx96("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32119
32311
|
}
|
|
32120
|
-
return /* @__PURE__ */
|
|
32312
|
+
return /* @__PURE__ */ jsx96(
|
|
32121
32313
|
Controller,
|
|
32122
32314
|
{
|
|
32123
32315
|
name: name2 ?? "",
|
|
32124
32316
|
control: methods?.control,
|
|
32125
32317
|
defaultValue,
|
|
32126
32318
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32127
|
-
|
|
32319
|
+
useEffect21(() => {
|
|
32128
32320
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32129
32321
|
divRef.current.innerHTML = value2 || "";
|
|
32130
32322
|
}
|
|
@@ -32136,7 +32328,7 @@ var HtmlField = (props) => {
|
|
|
32136
32328
|
onChange2(newValue, "");
|
|
32137
32329
|
}
|
|
32138
32330
|
};
|
|
32139
|
-
return /* @__PURE__ */
|
|
32331
|
+
return /* @__PURE__ */ jsx96(
|
|
32140
32332
|
"div",
|
|
32141
32333
|
{
|
|
32142
32334
|
ref: divRef,
|
|
@@ -32155,28 +32347,28 @@ var HtmlField = (props) => {
|
|
|
32155
32347
|
};
|
|
32156
32348
|
|
|
32157
32349
|
// src/widgets/basic/image-field/image.tsx
|
|
32158
|
-
import { jsx as
|
|
32350
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
32159
32351
|
var ImageField = (props) => {
|
|
32160
32352
|
const { value, type, name: name2, baseURL } = props;
|
|
32161
32353
|
if (!value) return null;
|
|
32162
32354
|
if (type === "url") {
|
|
32163
|
-
return /* @__PURE__ */
|
|
32355
|
+
return /* @__PURE__ */ jsx97("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32164
32356
|
}
|
|
32165
|
-
return /* @__PURE__ */
|
|
32357
|
+
return /* @__PURE__ */ jsx97("div", { id: "qr-code", children: /* @__PURE__ */ jsx97("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32166
32358
|
};
|
|
32167
32359
|
|
|
32168
32360
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32169
|
-
import
|
|
32361
|
+
import React17, { useEffect as useEffect22, useMemo as useMemo11 } from "react";
|
|
32170
32362
|
|
|
32171
32363
|
// src/widgets/basic/information-field/information.tsx
|
|
32172
|
-
import { Fragment as Fragment28, jsx as
|
|
32364
|
+
import { Fragment as Fragment28, jsx as jsx98, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32173
32365
|
var InfomationField = (props) => {
|
|
32174
32366
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32175
32367
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32176
|
-
return /* @__PURE__ */
|
|
32368
|
+
return /* @__PURE__ */ jsx98(Fragment28, {});
|
|
32177
32369
|
}
|
|
32178
32370
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32179
|
-
return /* @__PURE__ */
|
|
32371
|
+
return /* @__PURE__ */ jsx98("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx98(
|
|
32180
32372
|
AvatarField,
|
|
32181
32373
|
{
|
|
32182
32374
|
id: item.id,
|
|
@@ -32185,8 +32377,8 @@ var InfomationField = (props) => {
|
|
|
32185
32377
|
stringToColor
|
|
32186
32378
|
},
|
|
32187
32379
|
item.id
|
|
32188
|
-
)) : /* @__PURE__ */
|
|
32189
|
-
/* @__PURE__ */
|
|
32380
|
+
)) : /* @__PURE__ */ jsxs64("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32381
|
+
/* @__PURE__ */ jsx98(
|
|
32190
32382
|
AvatarField,
|
|
32191
32383
|
{
|
|
32192
32384
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32196,12 +32388,12 @@ var InfomationField = (props) => {
|
|
|
32196
32388
|
stringToColor
|
|
32197
32389
|
}
|
|
32198
32390
|
),
|
|
32199
|
-
showName && /* @__PURE__ */
|
|
32391
|
+
showName && /* @__PURE__ */ jsx98("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32200
32392
|
] }) });
|
|
32201
32393
|
};
|
|
32202
32394
|
|
|
32203
32395
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32204
|
-
import { jsx as
|
|
32396
|
+
import { jsx as jsx99, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32205
32397
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32206
32398
|
const { selectProps, data, menuList } = props;
|
|
32207
32399
|
const { relation } = selectProps;
|
|
@@ -32210,8 +32402,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32210
32402
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32211
32403
|
)
|
|
32212
32404
|
)?.[0]?.action?.id;
|
|
32213
|
-
return /* @__PURE__ */
|
|
32214
|
-
/* @__PURE__ */
|
|
32405
|
+
return /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32406
|
+
/* @__PURE__ */ jsx99(
|
|
32215
32407
|
AvatarField,
|
|
32216
32408
|
{
|
|
32217
32409
|
id: data?.id,
|
|
@@ -32223,8 +32415,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32223
32415
|
stringToColor
|
|
32224
32416
|
}
|
|
32225
32417
|
),
|
|
32226
|
-
/* @__PURE__ */
|
|
32227
|
-
/* @__PURE__ */
|
|
32418
|
+
/* @__PURE__ */ jsx99("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32419
|
+
/* @__PURE__ */ jsx99(
|
|
32228
32420
|
"span",
|
|
32229
32421
|
{
|
|
32230
32422
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32232,7 +32424,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32232
32424
|
e3.stopPropagation();
|
|
32233
32425
|
props.removeProps.onClick();
|
|
32234
32426
|
},
|
|
32235
|
-
children: /* @__PURE__ */
|
|
32427
|
+
children: /* @__PURE__ */ jsx99(CloseIcon, {})
|
|
32236
32428
|
}
|
|
32237
32429
|
)
|
|
32238
32430
|
] });
|
|
@@ -32241,10 +32433,10 @@ var CustomMenuList = (props) => {
|
|
|
32241
32433
|
const { options: options2, children, selectProps } = props;
|
|
32242
32434
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32243
32435
|
const { t: t3 } = useI18n();
|
|
32244
|
-
const limitedChildren =
|
|
32245
|
-
return /* @__PURE__ */
|
|
32436
|
+
const limitedChildren = React17.Children.toArray(children).slice(0, 10);
|
|
32437
|
+
return /* @__PURE__ */ jsxs65(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32246
32438
|
limitedChildren,
|
|
32247
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32439
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs65(
|
|
32248
32440
|
"button",
|
|
32249
32441
|
{
|
|
32250
32442
|
type: "button",
|
|
@@ -32289,7 +32481,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32289
32481
|
value: item.id,
|
|
32290
32482
|
label: item.name ?? item.display_name
|
|
32291
32483
|
})) : [];
|
|
32292
|
-
return /* @__PURE__ */
|
|
32484
|
+
return /* @__PURE__ */ jsx99(
|
|
32293
32485
|
InfomationField,
|
|
32294
32486
|
{
|
|
32295
32487
|
value: optionValue || null,
|
|
@@ -32298,7 +32490,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32298
32490
|
}
|
|
32299
32491
|
);
|
|
32300
32492
|
}
|
|
32301
|
-
return /* @__PURE__ */
|
|
32493
|
+
return /* @__PURE__ */ jsx99(
|
|
32302
32494
|
Controller,
|
|
32303
32495
|
{
|
|
32304
32496
|
name: name2 ?? "",
|
|
@@ -32308,12 +32500,12 @@ var Many2ManyTagField = (props) => {
|
|
|
32308
32500
|
},
|
|
32309
32501
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32310
32502
|
const { clearErrors } = methods;
|
|
32311
|
-
|
|
32503
|
+
useEffect22(() => {
|
|
32312
32504
|
if (field.value) {
|
|
32313
32505
|
clearErrors(name2);
|
|
32314
32506
|
}
|
|
32315
32507
|
}, [field.value]);
|
|
32316
|
-
const filteredValue =
|
|
32508
|
+
const filteredValue = useMemo11(() => {
|
|
32317
32509
|
if (!Array.isArray(field?.value)) return null;
|
|
32318
32510
|
const fieldValueMapped = field.value.map((v) => ({
|
|
32319
32511
|
value: v?.id,
|
|
@@ -32334,8 +32526,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32334
32526
|
onChange2?.(name2 ?? "", newValue);
|
|
32335
32527
|
clearErrors(name2);
|
|
32336
32528
|
};
|
|
32337
|
-
return /* @__PURE__ */
|
|
32338
|
-
/* @__PURE__ */
|
|
32529
|
+
return /* @__PURE__ */ jsxs65("div", { className: "group h-full overflow-y-auto", children: [
|
|
32530
|
+
/* @__PURE__ */ jsx99(
|
|
32339
32531
|
StateManagedSelect$1,
|
|
32340
32532
|
{
|
|
32341
32533
|
options: options2,
|
|
@@ -32414,7 +32606,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32414
32606
|
})
|
|
32415
32607
|
},
|
|
32416
32608
|
components: isUser ? {
|
|
32417
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
32609
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx99(
|
|
32418
32610
|
CustomMultiValue,
|
|
32419
32611
|
{
|
|
32420
32612
|
...multiValueProps,
|
|
@@ -32423,7 +32615,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32423
32615
|
),
|
|
32424
32616
|
IndicatorSeparator: () => null
|
|
32425
32617
|
} : {
|
|
32426
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
32618
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx99(
|
|
32427
32619
|
CustomMenuList,
|
|
32428
32620
|
{
|
|
32429
32621
|
...menuListProps,
|
|
@@ -32434,13 +32626,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32434
32626
|
}
|
|
32435
32627
|
),
|
|
32436
32628
|
IndicatorSeparator: () => null,
|
|
32437
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32438
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32629
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.DropdownIndicator, { ...props2 }),
|
|
32630
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx99(components.ClearIndicator, { ...props2 })
|
|
32439
32631
|
},
|
|
32440
32632
|
required: !invisible && required
|
|
32441
32633
|
}
|
|
32442
32634
|
),
|
|
32443
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32635
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx99("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32444
32636
|
] });
|
|
32445
32637
|
}
|
|
32446
32638
|
}
|
|
@@ -32448,8 +32640,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32448
32640
|
};
|
|
32449
32641
|
|
|
32450
32642
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32451
|
-
import { useEffect as
|
|
32452
|
-
import { Fragment as Fragment29, jsx as
|
|
32643
|
+
import { useEffect as useEffect23 } from "react";
|
|
32644
|
+
import { Fragment as Fragment29, jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32453
32645
|
var MonetaryField = (props) => {
|
|
32454
32646
|
const { t: t3 } = useI18n();
|
|
32455
32647
|
const {
|
|
@@ -32470,26 +32662,26 @@ var MonetaryField = (props) => {
|
|
|
32470
32662
|
symbol = "VND"
|
|
32471
32663
|
} = props;
|
|
32472
32664
|
if (isForm && name2 === "amount_residual") {
|
|
32473
|
-
return /* @__PURE__ */
|
|
32474
|
-
/* @__PURE__ */
|
|
32665
|
+
return /* @__PURE__ */ jsxs66("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32666
|
+
/* @__PURE__ */ jsxs66("span", { className: "font-semibold", children: [
|
|
32475
32667
|
string,
|
|
32476
32668
|
":"
|
|
32477
32669
|
] }),
|
|
32478
|
-
/* @__PURE__ */
|
|
32670
|
+
/* @__PURE__ */ jsx100("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} ${symbol}` })
|
|
32479
32671
|
] });
|
|
32480
32672
|
}
|
|
32481
32673
|
if (!isForm) {
|
|
32482
32674
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
|
|
32483
32675
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32484
|
-
return /* @__PURE__ */
|
|
32676
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
32485
32677
|
parseFloat(String(value ?? defaultValue))
|
|
32486
32678
|
)} ${symbol}` });
|
|
32487
32679
|
}
|
|
32488
|
-
return /* @__PURE__ */
|
|
32680
|
+
return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
|
|
32489
32681
|
parseFloat(value ?? defaultValue)
|
|
32490
32682
|
)} ${currencySymbol}` });
|
|
32491
32683
|
}
|
|
32492
|
-
return /* @__PURE__ */
|
|
32684
|
+
return /* @__PURE__ */ jsx100(
|
|
32493
32685
|
Controller,
|
|
32494
32686
|
{
|
|
32495
32687
|
name: name2 ?? "",
|
|
@@ -32503,13 +32695,13 @@ var MonetaryField = (props) => {
|
|
|
32503
32695
|
fieldState: { error: error2 }
|
|
32504
32696
|
}) => {
|
|
32505
32697
|
const { setError, clearErrors } = methods;
|
|
32506
|
-
|
|
32698
|
+
useEffect23(() => {
|
|
32507
32699
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32508
32700
|
clearErrors(name2);
|
|
32509
32701
|
}
|
|
32510
32702
|
}, [value2]);
|
|
32511
|
-
return /* @__PURE__ */
|
|
32512
|
-
/* @__PURE__ */
|
|
32703
|
+
return /* @__PURE__ */ jsxs66(Fragment29, { children: [
|
|
32704
|
+
/* @__PURE__ */ jsx100(
|
|
32513
32705
|
"input",
|
|
32514
32706
|
{
|
|
32515
32707
|
value: formatNumberOnly(value2),
|
|
@@ -32547,7 +32739,7 @@ var MonetaryField = (props) => {
|
|
|
32547
32739
|
`
|
|
32548
32740
|
}
|
|
32549
32741
|
),
|
|
32550
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32742
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx100("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32551
32743
|
] });
|
|
32552
32744
|
}
|
|
32553
32745
|
}
|
|
@@ -32555,14 +32747,14 @@ var MonetaryField = (props) => {
|
|
|
32555
32747
|
};
|
|
32556
32748
|
|
|
32557
32749
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32558
|
-
import { jsx as
|
|
32750
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
32559
32751
|
var PaidBadgedField = () => {
|
|
32560
|
-
return /* @__PURE__ */
|
|
32752
|
+
return /* @__PURE__ */ jsx101("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx101(PaidIcon, {}) });
|
|
32561
32753
|
};
|
|
32562
32754
|
|
|
32563
32755
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32564
|
-
import
|
|
32565
|
-
import { jsx as
|
|
32756
|
+
import React18, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
32757
|
+
import { jsx as jsx102, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
32566
32758
|
var RatingStarField = (props) => {
|
|
32567
32759
|
const {
|
|
32568
32760
|
label,
|
|
@@ -32571,9 +32763,9 @@ var RatingStarField = (props) => {
|
|
|
32571
32763
|
onSelectPriority,
|
|
32572
32764
|
id
|
|
32573
32765
|
} = props;
|
|
32574
|
-
const [rating, setRating] =
|
|
32575
|
-
const [hover, setHover] =
|
|
32576
|
-
|
|
32766
|
+
const [rating, setRating] = useState21(defaultValue);
|
|
32767
|
+
const [hover, setHover] = useState21(0);
|
|
32768
|
+
useEffect24(() => {
|
|
32577
32769
|
setRating(defaultValue);
|
|
32578
32770
|
}, [defaultValue]);
|
|
32579
32771
|
const handleClick = (value) => {
|
|
@@ -32597,7 +32789,7 @@ var RatingStarField = (props) => {
|
|
|
32597
32789
|
setHover(0);
|
|
32598
32790
|
setRating(0);
|
|
32599
32791
|
};
|
|
32600
|
-
return /* @__PURE__ */
|
|
32792
|
+
return /* @__PURE__ */ jsx102(
|
|
32601
32793
|
"div",
|
|
32602
32794
|
{
|
|
32603
32795
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32607,17 +32799,17 @@ var RatingStarField = (props) => {
|
|
|
32607
32799
|
const starValue = index4 + 1;
|
|
32608
32800
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32609
32801
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32610
|
-
return /* @__PURE__ */
|
|
32611
|
-
/* @__PURE__ */
|
|
32802
|
+
return /* @__PURE__ */ jsxs67(React18.Fragment, { children: [
|
|
32803
|
+
/* @__PURE__ */ jsx102(
|
|
32612
32804
|
"div",
|
|
32613
32805
|
{
|
|
32614
32806
|
onMouseEnter: () => handleHover(starValue),
|
|
32615
32807
|
onClick: () => handleClick(starValue),
|
|
32616
32808
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32617
|
-
children: /* @__PURE__ */
|
|
32809
|
+
children: /* @__PURE__ */ jsx102(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32618
32810
|
}
|
|
32619
32811
|
),
|
|
32620
|
-
/* @__PURE__ */
|
|
32812
|
+
/* @__PURE__ */ jsx102(
|
|
32621
32813
|
M,
|
|
32622
32814
|
{
|
|
32623
32815
|
className: "z-50",
|
|
@@ -32633,7 +32825,7 @@ var RatingStarField = (props) => {
|
|
|
32633
32825
|
};
|
|
32634
32826
|
|
|
32635
32827
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32636
|
-
import { jsx as
|
|
32828
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
32637
32829
|
var PriorityField = (props) => {
|
|
32638
32830
|
const {
|
|
32639
32831
|
isForm,
|
|
@@ -32649,7 +32841,7 @@ var PriorityField = (props) => {
|
|
|
32649
32841
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32650
32842
|
const defaultPriority = parseInt(value) + 1;
|
|
32651
32843
|
if (!isForm) {
|
|
32652
|
-
return /* @__PURE__ */
|
|
32844
|
+
return /* @__PURE__ */ jsx103(
|
|
32653
32845
|
RatingStarField,
|
|
32654
32846
|
{
|
|
32655
32847
|
label,
|
|
@@ -32660,7 +32852,7 @@ var PriorityField = (props) => {
|
|
|
32660
32852
|
}
|
|
32661
32853
|
);
|
|
32662
32854
|
}
|
|
32663
|
-
return /* @__PURE__ */
|
|
32855
|
+
return /* @__PURE__ */ jsx103(
|
|
32664
32856
|
Controller,
|
|
32665
32857
|
{
|
|
32666
32858
|
name: name ?? "",
|
|
@@ -32670,7 +32862,7 @@ var PriorityField = (props) => {
|
|
|
32670
32862
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32671
32863
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32672
32864
|
};
|
|
32673
|
-
return /* @__PURE__ */
|
|
32865
|
+
return /* @__PURE__ */ jsx103(
|
|
32674
32866
|
RatingStarField,
|
|
32675
32867
|
{
|
|
32676
32868
|
label,
|
|
@@ -32686,8 +32878,8 @@ var PriorityField = (props) => {
|
|
|
32686
32878
|
};
|
|
32687
32879
|
|
|
32688
32880
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32689
|
-
import { useEffect as
|
|
32690
|
-
import { jsx as
|
|
32881
|
+
import { useEffect as useEffect25 } from "react";
|
|
32882
|
+
import { jsx as jsx104, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32691
32883
|
var RadioGroupField = (props) => {
|
|
32692
32884
|
const {
|
|
32693
32885
|
name: name2,
|
|
@@ -32700,19 +32892,19 @@ var RadioGroupField = (props) => {
|
|
|
32700
32892
|
onChange: onChange2,
|
|
32701
32893
|
setValue
|
|
32702
32894
|
} = props;
|
|
32703
|
-
|
|
32895
|
+
useEffect25(() => {
|
|
32704
32896
|
if (selection?.length > 0) {
|
|
32705
32897
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32706
32898
|
}
|
|
32707
32899
|
}, [selection, name2, setValue]);
|
|
32708
32900
|
if (!methods) return null;
|
|
32709
|
-
return /* @__PURE__ */
|
|
32901
|
+
return /* @__PURE__ */ jsx104(
|
|
32710
32902
|
Controller,
|
|
32711
32903
|
{
|
|
32712
32904
|
name: name2 ?? "",
|
|
32713
32905
|
control: methods.control,
|
|
32714
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32715
|
-
/* @__PURE__ */
|
|
32906
|
+
render: ({ field }) => /* @__PURE__ */ jsx104("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-1", children: [
|
|
32907
|
+
/* @__PURE__ */ jsx104(
|
|
32716
32908
|
"input",
|
|
32717
32909
|
{
|
|
32718
32910
|
type: "radio",
|
|
@@ -32731,7 +32923,7 @@ var RadioGroupField = (props) => {
|
|
|
32731
32923
|
className: "custom-radio"
|
|
32732
32924
|
}
|
|
32733
32925
|
),
|
|
32734
|
-
/* @__PURE__ */
|
|
32926
|
+
/* @__PURE__ */ jsx104("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32735
32927
|
] }, select[0])) })
|
|
32736
32928
|
}
|
|
32737
32929
|
);
|
|
@@ -32739,7 +32931,7 @@ var RadioGroupField = (props) => {
|
|
|
32739
32931
|
|
|
32740
32932
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32741
32933
|
var import_moment3 = __toESM(require_moment());
|
|
32742
|
-
import { jsx as
|
|
32934
|
+
import { jsx as jsx105, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
32743
32935
|
var RemainingDaysField = (props) => {
|
|
32744
32936
|
const {
|
|
32745
32937
|
value,
|
|
@@ -32750,14 +32942,14 @@ var RemainingDaysField = (props) => {
|
|
|
32750
32942
|
if (!value) return null;
|
|
32751
32943
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32752
32944
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32753
|
-
return /* @__PURE__ */
|
|
32754
|
-
/* @__PURE__ */
|
|
32755
|
-
/* @__PURE__ */
|
|
32945
|
+
return /* @__PURE__ */ jsxs69("div", { className: isForm ? "mb-4" : "", children: [
|
|
32946
|
+
/* @__PURE__ */ jsx105(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32947
|
+
/* @__PURE__ */ jsx105(
|
|
32756
32948
|
"div",
|
|
32757
32949
|
{
|
|
32758
32950
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32759
32951
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32760
|
-
children: /* @__PURE__ */
|
|
32952
|
+
children: /* @__PURE__ */ jsx105(
|
|
32761
32953
|
"div",
|
|
32762
32954
|
{
|
|
32763
32955
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32770,7 +32962,7 @@ var RemainingDaysField = (props) => {
|
|
|
32770
32962
|
};
|
|
32771
32963
|
|
|
32772
32964
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32773
|
-
import { Fragment as Fragment30, jsx as
|
|
32965
|
+
import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
32774
32966
|
var SelectDropdownField = (props) => {
|
|
32775
32967
|
const { t: t3 } = useI18n();
|
|
32776
32968
|
const {
|
|
@@ -32792,9 +32984,9 @@ var SelectDropdownField = (props) => {
|
|
|
32792
32984
|
label: val[1]
|
|
32793
32985
|
})) : [];
|
|
32794
32986
|
if (!isForm && !isEditTable) {
|
|
32795
|
-
return /* @__PURE__ */
|
|
32987
|
+
return /* @__PURE__ */ jsx106("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32796
32988
|
} else {
|
|
32797
|
-
return /* @__PURE__ */
|
|
32989
|
+
return /* @__PURE__ */ jsx106(
|
|
32798
32990
|
Controller,
|
|
32799
32991
|
{
|
|
32800
32992
|
name: name2 || "",
|
|
@@ -32821,8 +33013,8 @@ var SelectDropdownField = (props) => {
|
|
|
32821
33013
|
value: defaultValue || null,
|
|
32822
33014
|
required: !invisible && required
|
|
32823
33015
|
};
|
|
32824
|
-
return /* @__PURE__ */
|
|
32825
|
-
/* @__PURE__ */
|
|
33016
|
+
return /* @__PURE__ */ jsxs70(Fragment30, { children: [
|
|
33017
|
+
/* @__PURE__ */ jsx106("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ jsx106(
|
|
32826
33018
|
StateManagedSelect$1,
|
|
32827
33019
|
{
|
|
32828
33020
|
...commonProps,
|
|
@@ -32879,12 +33071,12 @@ var SelectDropdownField = (props) => {
|
|
|
32879
33071
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32880
33072
|
components: {
|
|
32881
33073
|
IndicatorSeparator: () => null,
|
|
32882
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
33074
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx106(components.DropdownIndicator, { ...props2 })
|
|
32883
33075
|
},
|
|
32884
33076
|
noOptionsMessage: () => t3("no-available")
|
|
32885
33077
|
}
|
|
32886
33078
|
) }),
|
|
32887
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33079
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32888
33080
|
] });
|
|
32889
33081
|
}
|
|
32890
33082
|
}
|
|
@@ -32893,7 +33085,7 @@ var SelectDropdownField = (props) => {
|
|
|
32893
33085
|
};
|
|
32894
33086
|
|
|
32895
33087
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32896
|
-
import { jsx as
|
|
33088
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
32897
33089
|
var TextAreaField = (props) => {
|
|
32898
33090
|
const {
|
|
32899
33091
|
methods,
|
|
@@ -32917,9 +33109,9 @@ var TextAreaField = (props) => {
|
|
|
32917
33109
|
}
|
|
32918
33110
|
}) : {};
|
|
32919
33111
|
if (!isForm) {
|
|
32920
|
-
return /* @__PURE__ */
|
|
33112
|
+
return /* @__PURE__ */ jsx107("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32921
33113
|
}
|
|
32922
|
-
return /* @__PURE__ */
|
|
33114
|
+
return /* @__PURE__ */ jsx107(
|
|
32923
33115
|
"textarea",
|
|
32924
33116
|
{
|
|
32925
33117
|
...formProps,
|
|
@@ -32935,7 +33127,7 @@ var TextAreaField = (props) => {
|
|
|
32935
33127
|
};
|
|
32936
33128
|
|
|
32937
33129
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32938
|
-
import { jsx as
|
|
33130
|
+
import { jsx as jsx108, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
32939
33131
|
var ToggleButtonField = (props) => {
|
|
32940
33132
|
const {
|
|
32941
33133
|
name: name2,
|
|
@@ -32945,13 +33137,13 @@ var ToggleButtonField = (props) => {
|
|
|
32945
33137
|
onChange: onChange2,
|
|
32946
33138
|
methods
|
|
32947
33139
|
} = props;
|
|
32948
|
-
return /* @__PURE__ */
|
|
33140
|
+
return /* @__PURE__ */ jsx108(
|
|
32949
33141
|
Controller,
|
|
32950
33142
|
{
|
|
32951
33143
|
name: name2 ?? "",
|
|
32952
33144
|
control: methods?.control,
|
|
32953
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32954
|
-
/* @__PURE__ */
|
|
33145
|
+
render: ({ field }) => /* @__PURE__ */ jsx108("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs71("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
33146
|
+
/* @__PURE__ */ jsx108(
|
|
32955
33147
|
"input",
|
|
32956
33148
|
{
|
|
32957
33149
|
...field,
|
|
@@ -32970,7 +33162,7 @@ var ToggleButtonField = (props) => {
|
|
|
32970
33162
|
checked: field.value ?? false
|
|
32971
33163
|
}
|
|
32972
33164
|
),
|
|
32973
|
-
/* @__PURE__ */
|
|
33165
|
+
/* @__PURE__ */ jsx108(
|
|
32974
33166
|
"span",
|
|
32975
33167
|
{
|
|
32976
33168
|
style: {
|
|
@@ -32980,7 +33172,7 @@ var ToggleButtonField = (props) => {
|
|
|
32980
33172
|
},
|
|
32981
33173
|
className: `rounded-full transition duration-300
|
|
32982
33174
|
`,
|
|
32983
|
-
children: /* @__PURE__ */
|
|
33175
|
+
children: /* @__PURE__ */ jsx108(
|
|
32984
33176
|
"span",
|
|
32985
33177
|
{
|
|
32986
33178
|
style: {
|
|
@@ -33004,8 +33196,8 @@ var ToggleButtonField = (props) => {
|
|
|
33004
33196
|
};
|
|
33005
33197
|
|
|
33006
33198
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33007
|
-
import { useEffect as
|
|
33008
|
-
import { Fragment as Fragment31, jsx as
|
|
33199
|
+
import { useEffect as useEffect26, useRef as useRef17, useState as useState22 } from "react";
|
|
33200
|
+
import { Fragment as Fragment31, jsx as jsx109, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
33009
33201
|
var IntegerField = (props) => {
|
|
33010
33202
|
const {
|
|
33011
33203
|
name: name2,
|
|
@@ -33024,9 +33216,9 @@ var IntegerField = (props) => {
|
|
|
33024
33216
|
const { t: t3 } = useI18n();
|
|
33025
33217
|
if (!isForm && !isEditTable) {
|
|
33026
33218
|
const displayValue = value ?? defaultValue;
|
|
33027
|
-
return /* @__PURE__ */
|
|
33219
|
+
return /* @__PURE__ */ jsx109("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33028
33220
|
}
|
|
33029
|
-
return /* @__PURE__ */
|
|
33221
|
+
return /* @__PURE__ */ jsx109(
|
|
33030
33222
|
Controller,
|
|
33031
33223
|
{
|
|
33032
33224
|
name: name2 || "",
|
|
@@ -33043,10 +33235,10 @@ var IntegerField = (props) => {
|
|
|
33043
33235
|
const isDirtyRef = useRef17(false);
|
|
33044
33236
|
const inputRef = useRef17(null);
|
|
33045
33237
|
const lastCommittedValueRef = useRef17(null);
|
|
33046
|
-
const [inputValue, setInputValue] =
|
|
33238
|
+
const [inputValue, setInputValue] = useState22(
|
|
33047
33239
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33048
33240
|
);
|
|
33049
|
-
|
|
33241
|
+
useEffect26(() => {
|
|
33050
33242
|
if (value2 !== void 0 && value2 !== null) {
|
|
33051
33243
|
setInputValue(String(value2));
|
|
33052
33244
|
clearErrors(name2);
|
|
@@ -33104,8 +33296,8 @@ var IntegerField = (props) => {
|
|
|
33104
33296
|
inputRef.current?.blur();
|
|
33105
33297
|
clearErrors(name2);
|
|
33106
33298
|
};
|
|
33107
|
-
return /* @__PURE__ */
|
|
33108
|
-
/* @__PURE__ */
|
|
33299
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33300
|
+
/* @__PURE__ */ jsx109(
|
|
33109
33301
|
"input",
|
|
33110
33302
|
{
|
|
33111
33303
|
ref: inputRef,
|
|
@@ -33140,7 +33332,7 @@ var IntegerField = (props) => {
|
|
|
33140
33332
|
`
|
|
33141
33333
|
}
|
|
33142
33334
|
),
|
|
33143
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
33335
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx109("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33144
33336
|
] });
|
|
33145
33337
|
}
|
|
33146
33338
|
}
|
|
@@ -33148,7 +33340,7 @@ var IntegerField = (props) => {
|
|
|
33148
33340
|
};
|
|
33149
33341
|
|
|
33150
33342
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33151
|
-
import { jsx as
|
|
33343
|
+
import { jsx as jsx110, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33152
33344
|
var StatusDropdownField = (props) => {
|
|
33153
33345
|
const {
|
|
33154
33346
|
buttonRef,
|
|
@@ -33160,13 +33352,13 @@ var StatusDropdownField = (props) => {
|
|
|
33160
33352
|
handleClick,
|
|
33161
33353
|
colors: colors2
|
|
33162
33354
|
} = props;
|
|
33163
|
-
return /* @__PURE__ */
|
|
33355
|
+
return /* @__PURE__ */ jsxs73(
|
|
33164
33356
|
"div",
|
|
33165
33357
|
{
|
|
33166
33358
|
ref: buttonRef,
|
|
33167
33359
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33168
33360
|
children: [
|
|
33169
|
-
/* @__PURE__ */
|
|
33361
|
+
/* @__PURE__ */ jsx110(
|
|
33170
33362
|
"button",
|
|
33171
33363
|
{
|
|
33172
33364
|
type: "button",
|
|
@@ -33174,23 +33366,23 @@ var StatusDropdownField = (props) => {
|
|
|
33174
33366
|
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"}`
|
|
33175
33367
|
}
|
|
33176
33368
|
),
|
|
33177
|
-
isOpen && /* @__PURE__ */
|
|
33369
|
+
isOpen && /* @__PURE__ */ jsx110("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
33178
33370
|
const isActive = item[0] == state;
|
|
33179
|
-
return /* @__PURE__ */
|
|
33371
|
+
return /* @__PURE__ */ jsxs73(
|
|
33180
33372
|
"div",
|
|
33181
33373
|
{
|
|
33182
33374
|
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" : ""}`,
|
|
33183
33375
|
onClick: () => handleClick(item[0]),
|
|
33184
33376
|
children: [
|
|
33185
|
-
/* @__PURE__ */
|
|
33186
|
-
/* @__PURE__ */
|
|
33187
|
-
/* @__PURE__ */
|
|
33377
|
+
/* @__PURE__ */ jsx110("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx110(CheckIcon, {}) }),
|
|
33378
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2", children: [
|
|
33379
|
+
/* @__PURE__ */ jsx110(
|
|
33188
33380
|
"div",
|
|
33189
33381
|
{
|
|
33190
33382
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33191
33383
|
}
|
|
33192
33384
|
),
|
|
33193
|
-
/* @__PURE__ */
|
|
33385
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm", children: item[1] })
|
|
33194
33386
|
] })
|
|
33195
33387
|
]
|
|
33196
33388
|
},
|
|
@@ -33204,8 +33396,8 @@ var StatusDropdownField = (props) => {
|
|
|
33204
33396
|
|
|
33205
33397
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33206
33398
|
import { createPortal as createPortal5 } from "react-dom";
|
|
33207
|
-
import { useEffect as
|
|
33208
|
-
import { jsx as
|
|
33399
|
+
import { useEffect as useEffect27 } from "react";
|
|
33400
|
+
import { jsx as jsx111, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
33209
33401
|
var Many2ManyField = (props) => {
|
|
33210
33402
|
const { t: t3 } = useI18n();
|
|
33211
33403
|
const {
|
|
@@ -33264,7 +33456,7 @@ var Many2ManyField = (props) => {
|
|
|
33264
33456
|
clearSearch
|
|
33265
33457
|
} = searchController;
|
|
33266
33458
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33267
|
-
|
|
33459
|
+
useEffect27(() => {
|
|
33268
33460
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33269
33461
|
if (groupItems?.length > 0) {
|
|
33270
33462
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33279,7 +33471,7 @@ var Many2ManyField = (props) => {
|
|
|
33279
33471
|
};
|
|
33280
33472
|
}, [selectedTags]);
|
|
33281
33473
|
return createPortal5(
|
|
33282
|
-
/* @__PURE__ */
|
|
33474
|
+
/* @__PURE__ */ jsxs74(
|
|
33283
33475
|
"div",
|
|
33284
33476
|
{
|
|
33285
33477
|
style: {
|
|
@@ -33287,8 +33479,8 @@ var Many2ManyField = (props) => {
|
|
|
33287
33479
|
},
|
|
33288
33480
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33289
33481
|
children: [
|
|
33290
|
-
/* @__PURE__ */
|
|
33291
|
-
/* @__PURE__ */
|
|
33482
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33483
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs74(
|
|
33292
33484
|
"div",
|
|
33293
33485
|
{
|
|
33294
33486
|
style: {
|
|
@@ -33296,12 +33488,12 @@ var Many2ManyField = (props) => {
|
|
|
33296
33488
|
},
|
|
33297
33489
|
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",
|
|
33298
33490
|
children: [
|
|
33299
|
-
/* @__PURE__ */
|
|
33300
|
-
/* @__PURE__ */
|
|
33301
|
-
/* @__PURE__ */
|
|
33491
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33492
|
+
/* @__PURE__ */ jsx111("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33493
|
+
/* @__PURE__ */ jsx111("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx111(CloseIcon, {}) })
|
|
33302
33494
|
] }),
|
|
33303
|
-
/* @__PURE__ */
|
|
33304
|
-
/* @__PURE__ */
|
|
33495
|
+
/* @__PURE__ */ jsxs74("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33496
|
+
/* @__PURE__ */ jsx111("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ jsx111(
|
|
33305
33497
|
Search,
|
|
33306
33498
|
{
|
|
33307
33499
|
removeSearchItems,
|
|
@@ -33335,7 +33527,7 @@ var Many2ManyField = (props) => {
|
|
|
33335
33527
|
groupByList
|
|
33336
33528
|
}
|
|
33337
33529
|
) }),
|
|
33338
|
-
/* @__PURE__ */
|
|
33530
|
+
/* @__PURE__ */ jsx111(
|
|
33339
33531
|
PaginationView,
|
|
33340
33532
|
{
|
|
33341
33533
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -33352,20 +33544,20 @@ var Many2ManyField = (props) => {
|
|
|
33352
33544
|
}
|
|
33353
33545
|
)
|
|
33354
33546
|
] }),
|
|
33355
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
33547
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx111("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx111("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx111(
|
|
33356
33548
|
"div",
|
|
33357
33549
|
{
|
|
33358
33550
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33359
|
-
children: /* @__PURE__ */
|
|
33551
|
+
children: /* @__PURE__ */ jsx111("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx111("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx111(
|
|
33360
33552
|
"div",
|
|
33361
33553
|
{
|
|
33362
33554
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33363
|
-
children: /* @__PURE__ */
|
|
33555
|
+
children: /* @__PURE__ */ jsx111("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs74(
|
|
33364
33556
|
"table",
|
|
33365
33557
|
{
|
|
33366
33558
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33367
33559
|
children: [
|
|
33368
|
-
/* @__PURE__ */
|
|
33560
|
+
/* @__PURE__ */ jsx111(
|
|
33369
33561
|
TableHead,
|
|
33370
33562
|
{
|
|
33371
33563
|
columns,
|
|
@@ -33375,7 +33567,7 @@ var Many2ManyField = (props) => {
|
|
|
33375
33567
|
handleCheckBoxAll
|
|
33376
33568
|
}
|
|
33377
33569
|
),
|
|
33378
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
33570
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx111(
|
|
33379
33571
|
TableBody,
|
|
33380
33572
|
{
|
|
33381
33573
|
tableGroupController,
|
|
@@ -33415,16 +33607,16 @@ var Many2ManyField = (props) => {
|
|
|
33415
33607
|
checkedAll,
|
|
33416
33608
|
context
|
|
33417
33609
|
}
|
|
33418
|
-
) : /* @__PURE__ */
|
|
33610
|
+
) : /* @__PURE__ */ jsx111("tr", { children: /* @__PURE__ */ jsx111(
|
|
33419
33611
|
"td",
|
|
33420
33612
|
{
|
|
33421
33613
|
className: "w-full",
|
|
33422
33614
|
colSpan: columns?.length + 2,
|
|
33423
|
-
children: /* @__PURE__ */
|
|
33615
|
+
children: /* @__PURE__ */ jsx111(
|
|
33424
33616
|
"div",
|
|
33425
33617
|
{
|
|
33426
33618
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33427
|
-
children: /* @__PURE__ */
|
|
33619
|
+
children: /* @__PURE__ */ jsx111(EmptyTable, {})
|
|
33428
33620
|
}
|
|
33429
33621
|
)
|
|
33430
33622
|
}
|
|
@@ -33435,9 +33627,9 @@ var Many2ManyField = (props) => {
|
|
|
33435
33627
|
}
|
|
33436
33628
|
) }) })
|
|
33437
33629
|
}
|
|
33438
|
-
) }) }) : /* @__PURE__ */
|
|
33439
|
-
/* @__PURE__ */
|
|
33440
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
33630
|
+
) }) }) : /* @__PURE__ */ jsx111(LayerLoading, {}),
|
|
33631
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33632
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx111(
|
|
33441
33633
|
"button",
|
|
33442
33634
|
{
|
|
33443
33635
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33447,7 +33639,7 @@ var Many2ManyField = (props) => {
|
|
|
33447
33639
|
children: t3("choose")
|
|
33448
33640
|
}
|
|
33449
33641
|
),
|
|
33450
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
33642
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx111(
|
|
33451
33643
|
"button",
|
|
33452
33644
|
{
|
|
33453
33645
|
type: "button",
|
|
@@ -33463,7 +33655,7 @@ var Many2ManyField = (props) => {
|
|
|
33463
33655
|
children: t3("new")
|
|
33464
33656
|
}
|
|
33465
33657
|
),
|
|
33466
|
-
/* @__PURE__ */
|
|
33658
|
+
/* @__PURE__ */ jsx111(
|
|
33467
33659
|
"button",
|
|
33468
33660
|
{
|
|
33469
33661
|
type: "button",
|
|
@@ -33484,16 +33676,16 @@ var Many2ManyField = (props) => {
|
|
|
33484
33676
|
};
|
|
33485
33677
|
|
|
33486
33678
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33487
|
-
import
|
|
33488
|
-
import { Fragment as Fragment32, jsx as
|
|
33679
|
+
import React19, { useEffect as useEffect28 } from "react";
|
|
33680
|
+
import { Fragment as Fragment32, jsx as jsx112, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
33489
33681
|
var CustomMenuList2 = (props) => {
|
|
33490
33682
|
const { t: t3 } = useI18n();
|
|
33491
33683
|
const { options: options2, children, selectProps } = props;
|
|
33492
33684
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33493
|
-
const limitedChildren =
|
|
33494
|
-
return /* @__PURE__ */
|
|
33685
|
+
const limitedChildren = React19.Children.toArray(children).slice(0, 10);
|
|
33686
|
+
return /* @__PURE__ */ jsxs75(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33495
33687
|
limitedChildren,
|
|
33496
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33688
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs75(
|
|
33497
33689
|
"button",
|
|
33498
33690
|
{
|
|
33499
33691
|
type: "button",
|
|
@@ -33536,14 +33728,14 @@ var Many2OneField = (props) => {
|
|
|
33536
33728
|
const { t: t3 } = useI18n();
|
|
33537
33729
|
if (!isForm && !isEditTable) {
|
|
33538
33730
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33539
|
-
return /* @__PURE__ */
|
|
33731
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
33540
33732
|
allowShowDetail && renderDetail({
|
|
33541
33733
|
idToolTip: String(name2) + Number(index4),
|
|
33542
33734
|
model: options2?.model ?? relation,
|
|
33543
33735
|
context: contextObject,
|
|
33544
33736
|
idForm: id
|
|
33545
33737
|
}),
|
|
33546
|
-
/* @__PURE__ */
|
|
33738
|
+
/* @__PURE__ */ jsx112(
|
|
33547
33739
|
"span",
|
|
33548
33740
|
{
|
|
33549
33741
|
className: "cursor-pointer",
|
|
@@ -33554,20 +33746,20 @@ var Many2OneField = (props) => {
|
|
|
33554
33746
|
)
|
|
33555
33747
|
] });
|
|
33556
33748
|
}
|
|
33557
|
-
return /* @__PURE__ */
|
|
33749
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
33558
33750
|
allowShowDetail && renderDetail({
|
|
33559
33751
|
idToolTip: String(name2),
|
|
33560
33752
|
model: options2?.model ?? relation,
|
|
33561
33753
|
context: contextObject,
|
|
33562
33754
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33563
33755
|
}),
|
|
33564
|
-
/* @__PURE__ */
|
|
33756
|
+
/* @__PURE__ */ jsx112(
|
|
33565
33757
|
"div",
|
|
33566
33758
|
{
|
|
33567
33759
|
id: name2,
|
|
33568
33760
|
"data-tooltip-id": name2,
|
|
33569
33761
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33570
|
-
children: /* @__PURE__ */
|
|
33762
|
+
children: /* @__PURE__ */ jsx112(
|
|
33571
33763
|
Controller,
|
|
33572
33764
|
{
|
|
33573
33765
|
name: name2 ?? "",
|
|
@@ -33587,13 +33779,13 @@ var Many2OneField = (props) => {
|
|
|
33587
33779
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33588
33780
|
(option) => option.value === tempSelectedOption?.value
|
|
33589
33781
|
) : currentValue ? currentValue : null;
|
|
33590
|
-
|
|
33782
|
+
useEffect28(() => {
|
|
33591
33783
|
if (error2 && selectedOption) {
|
|
33592
33784
|
methods?.clearErrors(name2);
|
|
33593
33785
|
}
|
|
33594
33786
|
}, [selectedOption]);
|
|
33595
|
-
return /* @__PURE__ */
|
|
33596
|
-
/* @__PURE__ */
|
|
33787
|
+
return /* @__PURE__ */ jsxs75("div", { className: "h-full", children: [
|
|
33788
|
+
/* @__PURE__ */ jsx112(
|
|
33597
33789
|
StateManagedSelect$1,
|
|
33598
33790
|
{
|
|
33599
33791
|
menuShouldScrollIntoView: false,
|
|
@@ -33670,7 +33862,7 @@ var Many2OneField = (props) => {
|
|
|
33670
33862
|
})
|
|
33671
33863
|
},
|
|
33672
33864
|
components: {
|
|
33673
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33865
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx112(
|
|
33674
33866
|
CustomMenuList2,
|
|
33675
33867
|
{
|
|
33676
33868
|
...menuListProps,
|
|
@@ -33681,13 +33873,13 @@ var Many2OneField = (props) => {
|
|
|
33681
33873
|
}
|
|
33682
33874
|
),
|
|
33683
33875
|
IndicatorSeparator: () => null,
|
|
33684
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33876
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx112(components.DropdownIndicator, { ...props2 })
|
|
33685
33877
|
},
|
|
33686
33878
|
isDisabled: readonly,
|
|
33687
33879
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33688
33880
|
}
|
|
33689
33881
|
),
|
|
33690
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33882
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx112("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33691
33883
|
] });
|
|
33692
33884
|
}
|
|
33693
33885
|
}
|
|
@@ -33698,7 +33890,7 @@ var Many2OneField = (props) => {
|
|
|
33698
33890
|
};
|
|
33699
33891
|
|
|
33700
33892
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33701
|
-
import { jsx as
|
|
33893
|
+
import { jsx as jsx113, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
33702
33894
|
var StatusbarDurationField = (props) => {
|
|
33703
33895
|
const {
|
|
33704
33896
|
disabled,
|
|
@@ -33708,14 +33900,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33708
33900
|
defaultValue,
|
|
33709
33901
|
setModalStatus
|
|
33710
33902
|
} = props;
|
|
33711
|
-
return /* @__PURE__ */
|
|
33903
|
+
return /* @__PURE__ */ jsx113(
|
|
33712
33904
|
"div",
|
|
33713
33905
|
{
|
|
33714
33906
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33715
|
-
children: /* @__PURE__ */
|
|
33716
|
-
/* @__PURE__ */
|
|
33907
|
+
children: /* @__PURE__ */ jsxs76("div", { className: "flex items-center gap-[24px]", children: [
|
|
33908
|
+
/* @__PURE__ */ jsx113("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33717
33909
|
const value = option?.id === defaultValue;
|
|
33718
|
-
return /* @__PURE__ */
|
|
33910
|
+
return /* @__PURE__ */ jsxs76(
|
|
33719
33911
|
"label",
|
|
33720
33912
|
{
|
|
33721
33913
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33725,7 +33917,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33725
33917
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33726
33918
|
`,
|
|
33727
33919
|
children: [
|
|
33728
|
-
/* @__PURE__ */
|
|
33920
|
+
/* @__PURE__ */ jsx113(
|
|
33729
33921
|
"input",
|
|
33730
33922
|
{
|
|
33731
33923
|
type: "radio",
|
|
@@ -33735,7 +33927,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33735
33927
|
}
|
|
33736
33928
|
),
|
|
33737
33929
|
option?.name,
|
|
33738
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33930
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx113(
|
|
33739
33931
|
"div",
|
|
33740
33932
|
{
|
|
33741
33933
|
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]
|
|
@@ -33750,14 +33942,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33750
33942
|
}) }),
|
|
33751
33943
|
dataResponse?.records?.some(
|
|
33752
33944
|
(item) => item?.fold && item.id !== defaultValue
|
|
33753
|
-
) && /* @__PURE__ */
|
|
33945
|
+
) && /* @__PURE__ */ jsxs76(
|
|
33754
33946
|
"div",
|
|
33755
33947
|
{
|
|
33756
33948
|
onClick: () => setModalStatus(!modelStatus),
|
|
33757
33949
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33758
33950
|
children: [
|
|
33759
|
-
/* @__PURE__ */
|
|
33760
|
-
modelStatus && /* @__PURE__ */
|
|
33951
|
+
/* @__PURE__ */ jsx113(MoreIcon, {}),
|
|
33952
|
+
modelStatus && /* @__PURE__ */ jsx113(
|
|
33761
33953
|
"div",
|
|
33762
33954
|
{
|
|
33763
33955
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33766,7 +33958,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33766
33958
|
(item) => item?.fold && item.id !== defaultValue
|
|
33767
33959
|
)?.map((option) => {
|
|
33768
33960
|
const value = option?.id === defaultValue;
|
|
33769
|
-
return /* @__PURE__ */
|
|
33961
|
+
return /* @__PURE__ */ jsx113(
|
|
33770
33962
|
"div",
|
|
33771
33963
|
{
|
|
33772
33964
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33787,15 +33979,15 @@ var StatusbarDurationField = (props) => {
|
|
|
33787
33979
|
};
|
|
33788
33980
|
|
|
33789
33981
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33790
|
-
import { useMemo as
|
|
33791
|
-
import { Fragment as Fragment33, jsx as
|
|
33982
|
+
import { useMemo as useMemo12 } from "react";
|
|
33983
|
+
import { Fragment as Fragment33, jsx as jsx114, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
33792
33984
|
var StatusBarOptionField = (props) => {
|
|
33793
33985
|
const { selection, defaultValue } = props;
|
|
33794
|
-
const memoizedStatusOptions =
|
|
33986
|
+
const memoizedStatusOptions = useMemo12(() => selection, [selection]);
|
|
33795
33987
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33796
33988
|
(option) => option?.[0] === defaultValue
|
|
33797
33989
|
);
|
|
33798
|
-
return /* @__PURE__ */
|
|
33990
|
+
return /* @__PURE__ */ jsx114(
|
|
33799
33991
|
"div",
|
|
33800
33992
|
{
|
|
33801
33993
|
style: {
|
|
@@ -33804,8 +33996,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33804
33996
|
flexWrap: "wrap"
|
|
33805
33997
|
},
|
|
33806
33998
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33807
|
-
return /* @__PURE__ */
|
|
33808
|
-
/* @__PURE__ */
|
|
33999
|
+
return /* @__PURE__ */ jsxs77(Fragment33, { children: [
|
|
34000
|
+
/* @__PURE__ */ jsxs77(
|
|
33809
34001
|
"div",
|
|
33810
34002
|
{
|
|
33811
34003
|
style: {
|
|
@@ -33823,7 +34015,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33823
34015
|
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" : ""
|
|
33824
34016
|
},
|
|
33825
34017
|
children: [
|
|
33826
|
-
/* @__PURE__ */
|
|
34018
|
+
/* @__PURE__ */ jsx114(
|
|
33827
34019
|
"span",
|
|
33828
34020
|
{
|
|
33829
34021
|
style: {
|
|
@@ -33835,10 +34027,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33835
34027
|
alignItems: "center",
|
|
33836
34028
|
borderRadius: "100%"
|
|
33837
34029
|
},
|
|
33838
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
34030
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx114(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx114(ICCircle, {}) : /* @__PURE__ */ jsx114(ICMinus, {})
|
|
33839
34031
|
}
|
|
33840
34032
|
),
|
|
33841
|
-
/* @__PURE__ */
|
|
34033
|
+
/* @__PURE__ */ jsx114(
|
|
33842
34034
|
"span",
|
|
33843
34035
|
{
|
|
33844
34036
|
style: {
|
|
@@ -33851,7 +34043,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33851
34043
|
},
|
|
33852
34044
|
option?.[0]
|
|
33853
34045
|
),
|
|
33854
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
34046
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx114(
|
|
33855
34047
|
"div",
|
|
33856
34048
|
{
|
|
33857
34049
|
style: {
|
|
@@ -33867,7 +34059,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33867
34059
|
);
|
|
33868
34060
|
};
|
|
33869
34061
|
var ICMinus = () => {
|
|
33870
|
-
return /* @__PURE__ */
|
|
34062
|
+
return /* @__PURE__ */ jsx114(
|
|
33871
34063
|
"svg",
|
|
33872
34064
|
{
|
|
33873
34065
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33875,7 +34067,7 @@ var ICMinus = () => {
|
|
|
33875
34067
|
height: "16",
|
|
33876
34068
|
viewBox: "0 0 16 16",
|
|
33877
34069
|
fill: "none",
|
|
33878
|
-
children: /* @__PURE__ */
|
|
34070
|
+
children: /* @__PURE__ */ jsx114(
|
|
33879
34071
|
"path",
|
|
33880
34072
|
{
|
|
33881
34073
|
d: "M4 8H12",
|
|
@@ -33889,7 +34081,7 @@ var ICMinus = () => {
|
|
|
33889
34081
|
);
|
|
33890
34082
|
};
|
|
33891
34083
|
var ICCircle = () => {
|
|
33892
|
-
return /* @__PURE__ */
|
|
34084
|
+
return /* @__PURE__ */ jsx114(
|
|
33893
34085
|
"svg",
|
|
33894
34086
|
{
|
|
33895
34087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33897,12 +34089,12 @@ var ICCircle = () => {
|
|
|
33897
34089
|
height: "8",
|
|
33898
34090
|
viewBox: "0 0 8 8",
|
|
33899
34091
|
fill: "none",
|
|
33900
|
-
children: /* @__PURE__ */
|
|
34092
|
+
children: /* @__PURE__ */ jsx114("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33901
34093
|
}
|
|
33902
34094
|
);
|
|
33903
34095
|
};
|
|
33904
34096
|
var ICCheck = () => {
|
|
33905
|
-
return /* @__PURE__ */
|
|
34097
|
+
return /* @__PURE__ */ jsx114(
|
|
33906
34098
|
"svg",
|
|
33907
34099
|
{
|
|
33908
34100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33910,7 +34102,7 @@ var ICCheck = () => {
|
|
|
33910
34102
|
height: "16",
|
|
33911
34103
|
viewBox: "0 0 16 16",
|
|
33912
34104
|
fill: "none",
|
|
33913
|
-
children: /* @__PURE__ */
|
|
34105
|
+
children: /* @__PURE__ */ jsx114(
|
|
33914
34106
|
"path",
|
|
33915
34107
|
{
|
|
33916
34108
|
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",
|
|
@@ -33924,7 +34116,7 @@ var ICCheck = () => {
|
|
|
33924
34116
|
};
|
|
33925
34117
|
|
|
33926
34118
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33927
|
-
import { jsx as
|
|
34119
|
+
import { jsx as jsx115, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
33928
34120
|
var DateOptionField = (props) => {
|
|
33929
34121
|
const {
|
|
33930
34122
|
name: name2,
|
|
@@ -33935,19 +34127,19 @@ var DateOptionField = (props) => {
|
|
|
33935
34127
|
string,
|
|
33936
34128
|
onChange: onChange2
|
|
33937
34129
|
} = props;
|
|
33938
|
-
return /* @__PURE__ */
|
|
34130
|
+
return /* @__PURE__ */ jsx115(
|
|
33939
34131
|
Controller,
|
|
33940
34132
|
{
|
|
33941
34133
|
name: name2 ?? "",
|
|
33942
34134
|
control: methods?.control,
|
|
33943
|
-
render: ({ field }) => /* @__PURE__ */
|
|
34135
|
+
render: ({ field }) => /* @__PURE__ */ jsxs78(
|
|
33944
34136
|
"label",
|
|
33945
34137
|
{
|
|
33946
34138
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33947
34139
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33948
34140
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33949
34141
|
children: [
|
|
33950
|
-
/* @__PURE__ */
|
|
34142
|
+
/* @__PURE__ */ jsx115(
|
|
33951
34143
|
"input",
|
|
33952
34144
|
{
|
|
33953
34145
|
type: "checkbox",
|
|
@@ -34055,6 +34247,7 @@ export {
|
|
|
34055
34247
|
Search,
|
|
34056
34248
|
SearchIcon,
|
|
34057
34249
|
SearchType,
|
|
34250
|
+
SecureField,
|
|
34058
34251
|
SelectDropdownField,
|
|
34059
34252
|
SettingIcon,
|
|
34060
34253
|
StarIcon,
|