@fctc/sme-widget-ui 2.3.4 → 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.js +22 -73
- package/dist/index.mjs +116 -167
- package/dist/widgets.js +22 -73
- package/dist/widgets.mjs +116 -167
- 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
|
]
|
|
@@ -17241,9 +17245,9 @@ var CharField = (props) => {
|
|
|
17241
17245
|
import { useEffect as useEffect12, useMemo as useMemo5, useState as useState11 } from "react";
|
|
17242
17246
|
|
|
17243
17247
|
// src/icons/eye-hidden-icon.tsx
|
|
17244
|
-
import { jsx as jsx79
|
|
17248
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
17245
17249
|
var EyeHiddenIcon = () => {
|
|
17246
|
-
return /* @__PURE__ */
|
|
17250
|
+
return /* @__PURE__ */ jsx79(
|
|
17247
17251
|
"svg",
|
|
17248
17252
|
{
|
|
17249
17253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -17251,74 +17255,19 @@ var EyeHiddenIcon = () => {
|
|
|
17251
17255
|
height: "16",
|
|
17252
17256
|
viewBox: "0 0 16 16",
|
|
17253
17257
|
fill: "none",
|
|
17254
|
-
children:
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
|
|
17260
|
-
|
|
17261
|
-
strokeLinecap: "round",
|
|
17262
|
-
strokeLinejoin: "round"
|
|
17263
|
-
}
|
|
17264
|
-
),
|
|
17265
|
-
/* @__PURE__ */ jsx79(
|
|
17266
|
-
"path",
|
|
17267
|
-
{
|
|
17268
|
-
d: "M11.8799 3.8473C10.7132 2.9673 9.3799 2.4873 7.9999 2.4873C5.64656 2.4873 3.45323 3.87397 1.92656 6.27397C1.32656 7.21397 1.32656 8.79397 1.92656 9.73397C2.45323 10.5606 3.06656 11.274 3.73323 11.8473",
|
|
17269
|
-
stroke: "#576071",
|
|
17270
|
-
strokeWidth: "1.5",
|
|
17271
|
-
strokeLinecap: "round",
|
|
17272
|
-
strokeLinejoin: "round"
|
|
17273
|
-
}
|
|
17274
|
-
),
|
|
17275
|
-
/* @__PURE__ */ jsx79(
|
|
17276
|
-
"path",
|
|
17277
|
-
{
|
|
17278
|
-
d: "M5.61328 13.0195C6.37328 13.3395 7.17995 13.5128 7.99995 13.5128C10.3533 13.5128 12.5466 12.1261 14.0733 9.72613C14.6733 8.78613 14.6733 7.20613 14.0733 6.26613C13.8533 5.91947 13.6133 5.5928 13.3666 5.28613",
|
|
17279
|
-
stroke: "#576071",
|
|
17280
|
-
strokeWidth: "1.5",
|
|
17281
|
-
strokeLinecap: "round",
|
|
17282
|
-
strokeLinejoin: "round"
|
|
17283
|
-
}
|
|
17284
|
-
),
|
|
17285
|
-
/* @__PURE__ */ jsx79(
|
|
17286
|
-
"path",
|
|
17287
|
-
{
|
|
17288
|
-
d: "M10.3409 8.4668C10.1676 9.4068 9.40094 10.1735 8.46094 10.3468",
|
|
17289
|
-
stroke: "#576071",
|
|
17290
|
-
strokeWidth: "1.5",
|
|
17291
|
-
strokeLinecap: "round",
|
|
17292
|
-
strokeLinejoin: "round"
|
|
17293
|
-
}
|
|
17294
|
-
),
|
|
17295
|
-
/* @__PURE__ */ jsx79(
|
|
17296
|
-
"path",
|
|
17297
|
-
{
|
|
17298
|
-
d: "M6.31203 9.68652L1.33203 14.6665",
|
|
17299
|
-
stroke: "#576071",
|
|
17300
|
-
strokeWidth: "1.5",
|
|
17301
|
-
strokeLinecap: "round",
|
|
17302
|
-
strokeLinejoin: "round"
|
|
17303
|
-
}
|
|
17304
|
-
),
|
|
17305
|
-
/* @__PURE__ */ jsx79(
|
|
17306
|
-
"path",
|
|
17307
|
-
{
|
|
17308
|
-
d: "M14.6675 1.33301L9.6875 6.31301",
|
|
17309
|
-
stroke: "#576071",
|
|
17310
|
-
strokeWidth: "1.5",
|
|
17311
|
-
strokeLinecap: "round",
|
|
17312
|
-
strokeLinejoin: "round"
|
|
17313
|
-
}
|
|
17314
|
-
)
|
|
17315
|
-
]
|
|
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
|
+
)
|
|
17316
17265
|
}
|
|
17317
17266
|
);
|
|
17318
17267
|
};
|
|
17319
17268
|
|
|
17320
17269
|
// src/widgets/basic/char-field/secure-field.tsx
|
|
17321
|
-
import { jsx as jsx80, jsxs as
|
|
17270
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
17322
17271
|
function isSensitive(widget) {
|
|
17323
17272
|
return widget === "password" || widget === "access_token" || widget === "refresh_token" || widget === "private_secret_key";
|
|
17324
17273
|
}
|
|
@@ -17399,7 +17348,7 @@ var SecureField = (props) => {
|
|
|
17399
17348
|
useEffect12(() => {
|
|
17400
17349
|
if (value2) clearErrors(name2);
|
|
17401
17350
|
}, [value2, clearErrors, name2]);
|
|
17402
|
-
return /* @__PURE__ */
|
|
17351
|
+
return /* @__PURE__ */ jsxs52("div", { className: `relative w-full ${className ?? ""}`, children: [
|
|
17403
17352
|
isCappedToken && shouldMask && /* @__PURE__ */ jsx80(
|
|
17404
17353
|
"div",
|
|
17405
17354
|
{
|
|
@@ -17555,7 +17504,7 @@ var CheckboxField = (props) => {
|
|
|
17555
17504
|
|
|
17556
17505
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17557
17506
|
import { useEffect as useEffect13, useRef as useRef6, useState as useState12 } from "react";
|
|
17558
|
-
import { Fragment as Fragment19, jsx as jsx82, jsxs as
|
|
17507
|
+
import { Fragment as Fragment19, jsx as jsx82, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
17559
17508
|
var ColorWrapper = (props) => {
|
|
17560
17509
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
17561
17510
|
const { t: t3 } = useI18n();
|
|
@@ -17579,7 +17528,7 @@ var ColorWrapper = (props) => {
|
|
|
17579
17528
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17580
17529
|
};
|
|
17581
17530
|
}, []);
|
|
17582
|
-
return /* @__PURE__ */ jsx82("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx82("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__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: [
|
|
17583
17532
|
/* @__PURE__ */ jsx82(
|
|
17584
17533
|
"button",
|
|
17585
17534
|
{
|
|
@@ -17603,7 +17552,7 @@ var ColorWrapper = (props) => {
|
|
|
17603
17552
|
content: t3(color?.name)
|
|
17604
17553
|
}
|
|
17605
17554
|
)
|
|
17606
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17555
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs53(Fragment19, { children: [
|
|
17607
17556
|
/* @__PURE__ */ jsx82(
|
|
17608
17557
|
"button",
|
|
17609
17558
|
{
|
|
@@ -17660,7 +17609,7 @@ var ColorField = (props) => {
|
|
|
17660
17609
|
|
|
17661
17610
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17662
17611
|
import { useEffect as useEffect14 } from "react";
|
|
17663
|
-
import { jsx as jsx84, jsxs as
|
|
17612
|
+
import { jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
17664
17613
|
var CopyLinkButtonField = (props) => {
|
|
17665
17614
|
const {
|
|
17666
17615
|
isForm,
|
|
@@ -17699,8 +17648,8 @@ var CopyLinkButtonField = (props) => {
|
|
|
17699
17648
|
clearErrors(name2);
|
|
17700
17649
|
}
|
|
17701
17650
|
}, [value]);
|
|
17702
|
-
return /* @__PURE__ */
|
|
17703
|
-
/* @__PURE__ */
|
|
17651
|
+
return /* @__PURE__ */ jsxs54("div", { className: "relative", children: [
|
|
17652
|
+
/* @__PURE__ */ jsxs54(
|
|
17704
17653
|
"div",
|
|
17705
17654
|
{
|
|
17706
17655
|
"aria-disabled": readonly,
|
|
@@ -21703,7 +21652,7 @@ function useEffectEvent(callback) {
|
|
|
21703
21652
|
}
|
|
21704
21653
|
|
|
21705
21654
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21706
|
-
import { jsx as jsx85, jsxs as
|
|
21655
|
+
import { jsx as jsx85, jsxs as jsxs55, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
21707
21656
|
import * as ReactDOM2 from "react-dom";
|
|
21708
21657
|
|
|
21709
21658
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -22101,7 +22050,7 @@ var FloatingArrow = /* @__PURE__ */ React9.forwardRef(function FloatingArrow2(pr
|
|
|
22101
22050
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
22102
22051
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
22103
22052
|
}[side];
|
|
22104
|
-
return /* @__PURE__ */
|
|
22053
|
+
return /* @__PURE__ */ jsxs55("svg", {
|
|
22105
22054
|
...rest,
|
|
22106
22055
|
"aria-hidden": true,
|
|
22107
22056
|
ref,
|
|
@@ -31517,7 +31466,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31517
31466
|
|
|
31518
31467
|
// src/widgets/basic/date-field/date.tsx
|
|
31519
31468
|
var import_moment2 = __toESM(require_moment());
|
|
31520
|
-
import { Fragment as Fragment24, jsx as jsx88, jsxs as
|
|
31469
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31521
31470
|
var DateField = (props) => {
|
|
31522
31471
|
const {
|
|
31523
31472
|
name: name2,
|
|
@@ -31545,7 +31494,7 @@ var DateField = (props) => {
|
|
|
31545
31494
|
} = props;
|
|
31546
31495
|
const { t: t3 } = useI18n();
|
|
31547
31496
|
const InputDateCustom = forwardRef6(
|
|
31548
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
31497
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs56("label", { className: `flex ${className}`, children: [
|
|
31549
31498
|
/* @__PURE__ */ jsx88(
|
|
31550
31499
|
"input",
|
|
31551
31500
|
{
|
|
@@ -31588,7 +31537,7 @@ var DateField = (props) => {
|
|
|
31588
31537
|
}
|
|
31589
31538
|
}, [value, clearErrors, name2]);
|
|
31590
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;
|
|
31591
|
-
return /* @__PURE__ */
|
|
31540
|
+
return /* @__PURE__ */ jsxs56(Fragment24, { children: [
|
|
31592
31541
|
/* @__PURE__ */ jsx88(
|
|
31593
31542
|
DatePicker,
|
|
31594
31543
|
{
|
|
@@ -31655,7 +31604,7 @@ var DateField = (props) => {
|
|
|
31655
31604
|
increaseMonth,
|
|
31656
31605
|
prevMonthButtonDisabled,
|
|
31657
31606
|
nextMonthButtonDisabled
|
|
31658
|
-
}) => /* @__PURE__ */
|
|
31607
|
+
}) => /* @__PURE__ */ jsxs56(
|
|
31659
31608
|
"div",
|
|
31660
31609
|
{
|
|
31661
31610
|
style: {
|
|
@@ -31748,11 +31697,11 @@ var DateField = (props) => {
|
|
|
31748
31697
|
};
|
|
31749
31698
|
|
|
31750
31699
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31751
|
-
import { jsx as jsx89, jsxs as
|
|
31700
|
+
import { jsx as jsx89, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31752
31701
|
var DownLoadBinaryField = (props) => {
|
|
31753
31702
|
const { handleFileDownload } = props;
|
|
31754
31703
|
const { t: t3 } = useI18n();
|
|
31755
|
-
return /* @__PURE__ */
|
|
31704
|
+
return /* @__PURE__ */ jsxs57(
|
|
31756
31705
|
"button",
|
|
31757
31706
|
{
|
|
31758
31707
|
type: "button",
|
|
@@ -31767,7 +31716,7 @@ var DownLoadBinaryField = (props) => {
|
|
|
31767
31716
|
};
|
|
31768
31717
|
|
|
31769
31718
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31770
|
-
import { jsx as jsx90, jsxs as
|
|
31719
|
+
import { jsx as jsx90, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31771
31720
|
var DownloadFileField = (props) => {
|
|
31772
31721
|
const {
|
|
31773
31722
|
readonly,
|
|
@@ -31779,8 +31728,8 @@ var DownloadFileField = (props) => {
|
|
|
31779
31728
|
handleFileChange,
|
|
31780
31729
|
handleFileDownload
|
|
31781
31730
|
} = props;
|
|
31782
|
-
return /* @__PURE__ */
|
|
31783
|
-
/* @__PURE__ */
|
|
31731
|
+
return /* @__PURE__ */ jsxs58("div", { className: "", children: [
|
|
31732
|
+
/* @__PURE__ */ jsxs58(
|
|
31784
31733
|
"label",
|
|
31785
31734
|
{
|
|
31786
31735
|
htmlFor: inputId,
|
|
@@ -31815,7 +31764,7 @@ var DownloadFileField = (props) => {
|
|
|
31815
31764
|
|
|
31816
31765
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31817
31766
|
import { useState as useState17 } from "react";
|
|
31818
|
-
import { jsx as jsx91, jsxs as
|
|
31767
|
+
import { jsx as jsx91, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31819
31768
|
var DropdownField = (props) => {
|
|
31820
31769
|
const {
|
|
31821
31770
|
options: options2,
|
|
@@ -31829,14 +31778,14 @@ var DropdownField = (props) => {
|
|
|
31829
31778
|
} = props;
|
|
31830
31779
|
const [open, setOpen] = useState17(false);
|
|
31831
31780
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31832
|
-
return /* @__PURE__ */
|
|
31781
|
+
return /* @__PURE__ */ jsxs59(
|
|
31833
31782
|
"div",
|
|
31834
31783
|
{
|
|
31835
31784
|
ref: dropdownRef,
|
|
31836
31785
|
className: `relative ${className}`,
|
|
31837
31786
|
onClick: () => setOpen(!open),
|
|
31838
31787
|
children: [
|
|
31839
|
-
/* @__PURE__ */
|
|
31788
|
+
/* @__PURE__ */ jsxs59(
|
|
31840
31789
|
"div",
|
|
31841
31790
|
{
|
|
31842
31791
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
@@ -31872,7 +31821,7 @@ var DropdownField = (props) => {
|
|
|
31872
31821
|
};
|
|
31873
31822
|
|
|
31874
31823
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31875
|
-
import { Fragment as Fragment25, jsx as jsx92, jsxs as
|
|
31824
|
+
import { Fragment as Fragment25, jsx as jsx92, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
31876
31825
|
var FeeField = (props) => {
|
|
31877
31826
|
const { value, formValues } = props;
|
|
31878
31827
|
const { t: t3 } = useI18n();
|
|
@@ -31883,23 +31832,23 @@ var FeeField = (props) => {
|
|
|
31883
31832
|
)
|
|
31884
31833
|
) + " VND";
|
|
31885
31834
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31886
|
-
return /* @__PURE__ */
|
|
31835
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
31887
31836
|
value?.subtotals?.map((sub) => {
|
|
31888
31837
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31889
|
-
return /* @__PURE__ */
|
|
31890
|
-
/* @__PURE__ */
|
|
31891
|
-
/* @__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: [
|
|
31892
31841
|
sub?.name,
|
|
31893
31842
|
":"
|
|
31894
31843
|
] }),
|
|
31895
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" })
|
|
31896
31845
|
] }),
|
|
31897
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31846
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs60(
|
|
31898
31847
|
"div",
|
|
31899
31848
|
{
|
|
31900
31849
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31901
31850
|
children: [
|
|
31902
|
-
/* @__PURE__ */
|
|
31851
|
+
/* @__PURE__ */ jsxs60("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31903
31852
|
group?.group_name,
|
|
31904
31853
|
":"
|
|
31905
31854
|
] }),
|
|
@@ -31911,22 +31860,22 @@ var FeeField = (props) => {
|
|
|
31911
31860
|
] });
|
|
31912
31861
|
}
|
|
31913
31862
|
}),
|
|
31914
|
-
/* @__PURE__ */
|
|
31915
|
-
/* @__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: [
|
|
31916
31865
|
t3("total"),
|
|
31917
31866
|
":"
|
|
31918
31867
|
] }),
|
|
31919
31868
|
/* @__PURE__ */ jsx92("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31920
31869
|
] }),
|
|
31921
|
-
/* @__PURE__ */
|
|
31922
|
-
/* @__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: [
|
|
31923
31872
|
t3("paid_amount"),
|
|
31924
31873
|
":"
|
|
31925
31874
|
] }),
|
|
31926
31875
|
/* @__PURE__ */ jsx92("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31927
31876
|
] }),
|
|
31928
|
-
/* @__PURE__ */
|
|
31929
|
-
/* @__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: [
|
|
31930
31879
|
t3("remanining_amount"),
|
|
31931
31880
|
":"
|
|
31932
31881
|
] }),
|
|
@@ -31937,7 +31886,7 @@ var FeeField = (props) => {
|
|
|
31937
31886
|
|
|
31938
31887
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31939
31888
|
import { useEffect as useEffect19, useRef as useRef14, useState as useState18 } from "react";
|
|
31940
|
-
import { jsx as jsx93, jsxs as
|
|
31889
|
+
import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31941
31890
|
var RenderFile = ({
|
|
31942
31891
|
file,
|
|
31943
31892
|
onDelete,
|
|
@@ -31953,9 +31902,9 @@ var RenderFile = ({
|
|
|
31953
31902
|
"application/vnd.ms-excel": /* @__PURE__ */ jsx93(ExcelIcon, {}),
|
|
31954
31903
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx93(ExcelIcon, {})
|
|
31955
31904
|
};
|
|
31956
|
-
return /* @__PURE__ */
|
|
31905
|
+
return /* @__PURE__ */ jsxs61("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31957
31906
|
/* @__PURE__ */ jsx93("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31958
|
-
/* @__PURE__ */
|
|
31907
|
+
/* @__PURE__ */ jsxs61("div", { children: [
|
|
31959
31908
|
/* @__PURE__ */ jsx93(
|
|
31960
31909
|
"div",
|
|
31961
31910
|
{
|
|
@@ -31968,7 +31917,7 @@ var RenderFile = ({
|
|
|
31968
31917
|
),
|
|
31969
31918
|
/* @__PURE__ */ jsx93("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31970
31919
|
] }),
|
|
31971
|
-
/* @__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: [
|
|
31972
31921
|
/* @__PURE__ */ jsx93(
|
|
31973
31922
|
"span",
|
|
31974
31923
|
{
|
|
@@ -32038,7 +31987,7 @@ var FileUploadField = (props) => {
|
|
|
32038
31987
|
);
|
|
32039
31988
|
}
|
|
32040
31989
|
}, [selectedFiles]);
|
|
32041
|
-
return /* @__PURE__ */
|
|
31990
|
+
return /* @__PURE__ */ jsxs61("div", { children: [
|
|
32042
31991
|
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx93(
|
|
32043
31992
|
RenderFile,
|
|
32044
31993
|
{
|
|
@@ -32079,7 +32028,7 @@ var FileUploadField = (props) => {
|
|
|
32079
32028
|
|
|
32080
32029
|
// src/widgets/basic/float-field/float.tsx
|
|
32081
32030
|
import { useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
|
|
32082
|
-
import { Fragment as Fragment26, jsx as jsx94, jsxs as
|
|
32031
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
32083
32032
|
var FloatField = (props) => {
|
|
32084
32033
|
const {
|
|
32085
32034
|
name: name2,
|
|
@@ -32193,7 +32142,7 @@ var FloatField = (props) => {
|
|
|
32193
32142
|
}
|
|
32194
32143
|
isDirtyRef.current = false;
|
|
32195
32144
|
};
|
|
32196
|
-
return /* @__PURE__ */
|
|
32145
|
+
return /* @__PURE__ */ jsxs62(Fragment26, { children: [
|
|
32197
32146
|
/* @__PURE__ */ jsx94(
|
|
32198
32147
|
"input",
|
|
32199
32148
|
{
|
|
@@ -32222,7 +32171,7 @@ var FloatField = (props) => {
|
|
|
32222
32171
|
|
|
32223
32172
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32224
32173
|
import { useState as useState20 } from "react";
|
|
32225
|
-
import { Fragment as Fragment27, jsx as jsx95, jsxs as
|
|
32174
|
+
import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
32226
32175
|
var FloatTimeField = (props) => {
|
|
32227
32176
|
const {
|
|
32228
32177
|
name: name2,
|
|
@@ -32302,7 +32251,7 @@ var FloatTimeField = (props) => {
|
|
|
32302
32251
|
}
|
|
32303
32252
|
onBlur();
|
|
32304
32253
|
};
|
|
32305
|
-
return /* @__PURE__ */
|
|
32254
|
+
return /* @__PURE__ */ jsxs63(Fragment27, { children: [
|
|
32306
32255
|
/* @__PURE__ */ jsx95(
|
|
32307
32256
|
"input",
|
|
32308
32257
|
{
|
|
@@ -32412,7 +32361,7 @@ var ImageField = (props) => {
|
|
|
32412
32361
|
import React17, { useEffect as useEffect22, useMemo as useMemo11 } from "react";
|
|
32413
32362
|
|
|
32414
32363
|
// src/widgets/basic/information-field/information.tsx
|
|
32415
|
-
import { Fragment as Fragment28, jsx as jsx98, jsxs as
|
|
32364
|
+
import { Fragment as Fragment28, jsx as jsx98, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32416
32365
|
var InfomationField = (props) => {
|
|
32417
32366
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32418
32367
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
@@ -32428,7 +32377,7 @@ var InfomationField = (props) => {
|
|
|
32428
32377
|
stringToColor
|
|
32429
32378
|
},
|
|
32430
32379
|
item.id
|
|
32431
|
-
)) : /* @__PURE__ */
|
|
32380
|
+
)) : /* @__PURE__ */ jsxs64("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32432
32381
|
/* @__PURE__ */ jsx98(
|
|
32433
32382
|
AvatarField,
|
|
32434
32383
|
{
|
|
@@ -32444,7 +32393,7 @@ var InfomationField = (props) => {
|
|
|
32444
32393
|
};
|
|
32445
32394
|
|
|
32446
32395
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32447
|
-
import { jsx as jsx99, jsxs as
|
|
32396
|
+
import { jsx as jsx99, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32448
32397
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32449
32398
|
const { selectProps, data, menuList } = props;
|
|
32450
32399
|
const { relation } = selectProps;
|
|
@@ -32453,7 +32402,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32453
32402
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32454
32403
|
)
|
|
32455
32404
|
)?.[0]?.action?.id;
|
|
32456
|
-
return /* @__PURE__ */
|
|
32405
|
+
return /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32457
32406
|
/* @__PURE__ */ jsx99(
|
|
32458
32407
|
AvatarField,
|
|
32459
32408
|
{
|
|
@@ -32485,9 +32434,9 @@ var CustomMenuList = (props) => {
|
|
|
32485
32434
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32486
32435
|
const { t: t3 } = useI18n();
|
|
32487
32436
|
const limitedChildren = React17.Children.toArray(children).slice(0, 10);
|
|
32488
|
-
return /* @__PURE__ */
|
|
32437
|
+
return /* @__PURE__ */ jsxs65(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32489
32438
|
limitedChildren,
|
|
32490
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32439
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs65(
|
|
32491
32440
|
"button",
|
|
32492
32441
|
{
|
|
32493
32442
|
type: "button",
|
|
@@ -32577,7 +32526,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32577
32526
|
onChange2?.(name2 ?? "", newValue);
|
|
32578
32527
|
clearErrors(name2);
|
|
32579
32528
|
};
|
|
32580
|
-
return /* @__PURE__ */
|
|
32529
|
+
return /* @__PURE__ */ jsxs65("div", { className: "group h-full overflow-y-auto", children: [
|
|
32581
32530
|
/* @__PURE__ */ jsx99(
|
|
32582
32531
|
StateManagedSelect$1,
|
|
32583
32532
|
{
|
|
@@ -32692,7 +32641,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32692
32641
|
|
|
32693
32642
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32694
32643
|
import { useEffect as useEffect23 } from "react";
|
|
32695
|
-
import { Fragment as Fragment29, jsx as jsx100, jsxs as
|
|
32644
|
+
import { Fragment as Fragment29, jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32696
32645
|
var MonetaryField = (props) => {
|
|
32697
32646
|
const { t: t3 } = useI18n();
|
|
32698
32647
|
const {
|
|
@@ -32713,8 +32662,8 @@ var MonetaryField = (props) => {
|
|
|
32713
32662
|
symbol = "VND"
|
|
32714
32663
|
} = props;
|
|
32715
32664
|
if (isForm && name2 === "amount_residual") {
|
|
32716
|
-
return /* @__PURE__ */
|
|
32717
|
-
/* @__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: [
|
|
32718
32667
|
string,
|
|
32719
32668
|
":"
|
|
32720
32669
|
] }),
|
|
@@ -32751,7 +32700,7 @@ var MonetaryField = (props) => {
|
|
|
32751
32700
|
clearErrors(name2);
|
|
32752
32701
|
}
|
|
32753
32702
|
}, [value2]);
|
|
32754
|
-
return /* @__PURE__ */
|
|
32703
|
+
return /* @__PURE__ */ jsxs66(Fragment29, { children: [
|
|
32755
32704
|
/* @__PURE__ */ jsx100(
|
|
32756
32705
|
"input",
|
|
32757
32706
|
{
|
|
@@ -32805,7 +32754,7 @@ var PaidBadgedField = () => {
|
|
|
32805
32754
|
|
|
32806
32755
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32807
32756
|
import React18, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
32808
|
-
import { jsx as jsx102, jsxs as
|
|
32757
|
+
import { jsx as jsx102, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
32809
32758
|
var RatingStarField = (props) => {
|
|
32810
32759
|
const {
|
|
32811
32760
|
label,
|
|
@@ -32850,7 +32799,7 @@ var RatingStarField = (props) => {
|
|
|
32850
32799
|
const starValue = index4 + 1;
|
|
32851
32800
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32852
32801
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32853
|
-
return /* @__PURE__ */
|
|
32802
|
+
return /* @__PURE__ */ jsxs67(React18.Fragment, { children: [
|
|
32854
32803
|
/* @__PURE__ */ jsx102(
|
|
32855
32804
|
"div",
|
|
32856
32805
|
{
|
|
@@ -32930,7 +32879,7 @@ var PriorityField = (props) => {
|
|
|
32930
32879
|
|
|
32931
32880
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32932
32881
|
import { useEffect as useEffect25 } from "react";
|
|
32933
|
-
import { jsx as jsx104, jsxs as
|
|
32882
|
+
import { jsx as jsx104, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32934
32883
|
var RadioGroupField = (props) => {
|
|
32935
32884
|
const {
|
|
32936
32885
|
name: name2,
|
|
@@ -32954,7 +32903,7 @@ var RadioGroupField = (props) => {
|
|
|
32954
32903
|
{
|
|
32955
32904
|
name: name2 ?? "",
|
|
32956
32905
|
control: methods.control,
|
|
32957
|
-
render: ({ field }) => /* @__PURE__ */ jsx104("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__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: [
|
|
32958
32907
|
/* @__PURE__ */ jsx104(
|
|
32959
32908
|
"input",
|
|
32960
32909
|
{
|
|
@@ -32982,7 +32931,7 @@ var RadioGroupField = (props) => {
|
|
|
32982
32931
|
|
|
32983
32932
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32984
32933
|
var import_moment3 = __toESM(require_moment());
|
|
32985
|
-
import { jsx as jsx105, jsxs as
|
|
32934
|
+
import { jsx as jsx105, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
32986
32935
|
var RemainingDaysField = (props) => {
|
|
32987
32936
|
const {
|
|
32988
32937
|
value,
|
|
@@ -32993,7 +32942,7 @@ var RemainingDaysField = (props) => {
|
|
|
32993
32942
|
if (!value) return null;
|
|
32994
32943
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32995
32944
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32996
|
-
return /* @__PURE__ */
|
|
32945
|
+
return /* @__PURE__ */ jsxs69("div", { className: isForm ? "mb-4" : "", children: [
|
|
32997
32946
|
/* @__PURE__ */ jsx105(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32998
32947
|
/* @__PURE__ */ jsx105(
|
|
32999
32948
|
"div",
|
|
@@ -33013,7 +32962,7 @@ var RemainingDaysField = (props) => {
|
|
|
33013
32962
|
};
|
|
33014
32963
|
|
|
33015
32964
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
33016
|
-
import { Fragment as Fragment30, jsx as jsx106, jsxs as
|
|
32965
|
+
import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
33017
32966
|
var SelectDropdownField = (props) => {
|
|
33018
32967
|
const { t: t3 } = useI18n();
|
|
33019
32968
|
const {
|
|
@@ -33064,7 +33013,7 @@ var SelectDropdownField = (props) => {
|
|
|
33064
33013
|
value: defaultValue || null,
|
|
33065
33014
|
required: !invisible && required
|
|
33066
33015
|
};
|
|
33067
|
-
return /* @__PURE__ */
|
|
33016
|
+
return /* @__PURE__ */ jsxs70(Fragment30, { children: [
|
|
33068
33017
|
/* @__PURE__ */ jsx106("div", { className: `group ${isEditTable ? "h-full" : ""}`, children: /* @__PURE__ */ jsx106(
|
|
33069
33018
|
StateManagedSelect$1,
|
|
33070
33019
|
{
|
|
@@ -33178,7 +33127,7 @@ var TextAreaField = (props) => {
|
|
|
33178
33127
|
};
|
|
33179
33128
|
|
|
33180
33129
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33181
|
-
import { jsx as jsx108, jsxs as
|
|
33130
|
+
import { jsx as jsx108, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
33182
33131
|
var ToggleButtonField = (props) => {
|
|
33183
33132
|
const {
|
|
33184
33133
|
name: name2,
|
|
@@ -33193,7 +33142,7 @@ var ToggleButtonField = (props) => {
|
|
|
33193
33142
|
{
|
|
33194
33143
|
name: name2 ?? "",
|
|
33195
33144
|
control: methods?.control,
|
|
33196
|
-
render: ({ field }) => /* @__PURE__ */ jsx108("div", { className: "inline-flex items-center", children: /* @__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: [
|
|
33197
33146
|
/* @__PURE__ */ jsx108(
|
|
33198
33147
|
"input",
|
|
33199
33148
|
{
|
|
@@ -33248,7 +33197,7 @@ var ToggleButtonField = (props) => {
|
|
|
33248
33197
|
|
|
33249
33198
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33250
33199
|
import { useEffect as useEffect26, useRef as useRef17, useState as useState22 } from "react";
|
|
33251
|
-
import { Fragment as Fragment31, jsx as jsx109, jsxs as
|
|
33200
|
+
import { Fragment as Fragment31, jsx as jsx109, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
33252
33201
|
var IntegerField = (props) => {
|
|
33253
33202
|
const {
|
|
33254
33203
|
name: name2,
|
|
@@ -33347,7 +33296,7 @@ var IntegerField = (props) => {
|
|
|
33347
33296
|
inputRef.current?.blur();
|
|
33348
33297
|
clearErrors(name2);
|
|
33349
33298
|
};
|
|
33350
|
-
return /* @__PURE__ */
|
|
33299
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33351
33300
|
/* @__PURE__ */ jsx109(
|
|
33352
33301
|
"input",
|
|
33353
33302
|
{
|
|
@@ -33391,7 +33340,7 @@ var IntegerField = (props) => {
|
|
|
33391
33340
|
};
|
|
33392
33341
|
|
|
33393
33342
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33394
|
-
import { jsx as jsx110, jsxs as
|
|
33343
|
+
import { jsx as jsx110, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33395
33344
|
var StatusDropdownField = (props) => {
|
|
33396
33345
|
const {
|
|
33397
33346
|
buttonRef,
|
|
@@ -33403,7 +33352,7 @@ var StatusDropdownField = (props) => {
|
|
|
33403
33352
|
handleClick,
|
|
33404
33353
|
colors: colors2
|
|
33405
33354
|
} = props;
|
|
33406
|
-
return /* @__PURE__ */
|
|
33355
|
+
return /* @__PURE__ */ jsxs73(
|
|
33407
33356
|
"div",
|
|
33408
33357
|
{
|
|
33409
33358
|
ref: buttonRef,
|
|
@@ -33419,14 +33368,14 @@ var StatusDropdownField = (props) => {
|
|
|
33419
33368
|
),
|
|
33420
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) => {
|
|
33421
33370
|
const isActive = item[0] == state;
|
|
33422
|
-
return /* @__PURE__ */
|
|
33371
|
+
return /* @__PURE__ */ jsxs73(
|
|
33423
33372
|
"div",
|
|
33424
33373
|
{
|
|
33425
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" : ""}`,
|
|
33426
33375
|
onClick: () => handleClick(item[0]),
|
|
33427
33376
|
children: [
|
|
33428
33377
|
/* @__PURE__ */ jsx110("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx110(CheckIcon, {}) }),
|
|
33429
|
-
/* @__PURE__ */
|
|
33378
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2", children: [
|
|
33430
33379
|
/* @__PURE__ */ jsx110(
|
|
33431
33380
|
"div",
|
|
33432
33381
|
{
|
|
@@ -33448,7 +33397,7 @@ var StatusDropdownField = (props) => {
|
|
|
33448
33397
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33449
33398
|
import { createPortal as createPortal5 } from "react-dom";
|
|
33450
33399
|
import { useEffect as useEffect27 } from "react";
|
|
33451
|
-
import { jsx as jsx111, jsxs as
|
|
33400
|
+
import { jsx as jsx111, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
33452
33401
|
var Many2ManyField = (props) => {
|
|
33453
33402
|
const { t: t3 } = useI18n();
|
|
33454
33403
|
const {
|
|
@@ -33522,7 +33471,7 @@ var Many2ManyField = (props) => {
|
|
|
33522
33471
|
};
|
|
33523
33472
|
}, [selectedTags]);
|
|
33524
33473
|
return createPortal5(
|
|
33525
|
-
/* @__PURE__ */
|
|
33474
|
+
/* @__PURE__ */ jsxs74(
|
|
33526
33475
|
"div",
|
|
33527
33476
|
{
|
|
33528
33477
|
style: {
|
|
@@ -33531,7 +33480,7 @@ var Many2ManyField = (props) => {
|
|
|
33531
33480
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33532
33481
|
children: [
|
|
33533
33482
|
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33534
|
-
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */
|
|
33483
|
+
/* @__PURE__ */ jsx111("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs74(
|
|
33535
33484
|
"div",
|
|
33536
33485
|
{
|
|
33537
33486
|
style: {
|
|
@@ -33539,11 +33488,11 @@ var Many2ManyField = (props) => {
|
|
|
33539
33488
|
},
|
|
33540
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",
|
|
33541
33490
|
children: [
|
|
33542
|
-
/* @__PURE__ */
|
|
33491
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33543
33492
|
/* @__PURE__ */ jsx111("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33544
33493
|
/* @__PURE__ */ jsx111("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx111(CloseIcon, {}) })
|
|
33545
33494
|
] }),
|
|
33546
|
-
/* @__PURE__ */
|
|
33495
|
+
/* @__PURE__ */ jsxs74("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33547
33496
|
/* @__PURE__ */ jsx111("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ jsx111(
|
|
33548
33497
|
Search,
|
|
33549
33498
|
{
|
|
@@ -33603,7 +33552,7 @@ var Many2ManyField = (props) => {
|
|
|
33603
33552
|
"div",
|
|
33604
33553
|
{
|
|
33605
33554
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33606
|
-
children: /* @__PURE__ */ jsx111("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */
|
|
33555
|
+
children: /* @__PURE__ */ jsx111("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs74(
|
|
33607
33556
|
"table",
|
|
33608
33557
|
{
|
|
33609
33558
|
className: `relative w-full bg-white custom-dropdown `,
|
|
@@ -33679,7 +33628,7 @@ var Many2ManyField = (props) => {
|
|
|
33679
33628
|
) }) })
|
|
33680
33629
|
}
|
|
33681
33630
|
) }) }) : /* @__PURE__ */ jsx111(LayerLoading, {}),
|
|
33682
|
-
/* @__PURE__ */
|
|
33631
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33683
33632
|
isDisplayCheckbox && /* @__PURE__ */ jsx111(
|
|
33684
33633
|
"button",
|
|
33685
33634
|
{
|
|
@@ -33728,15 +33677,15 @@ var Many2ManyField = (props) => {
|
|
|
33728
33677
|
|
|
33729
33678
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33730
33679
|
import React19, { useEffect as useEffect28 } from "react";
|
|
33731
|
-
import { Fragment as Fragment32, jsx as jsx112, jsxs as
|
|
33680
|
+
import { Fragment as Fragment32, jsx as jsx112, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
33732
33681
|
var CustomMenuList2 = (props) => {
|
|
33733
33682
|
const { t: t3 } = useI18n();
|
|
33734
33683
|
const { options: options2, children, selectProps } = props;
|
|
33735
33684
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33736
33685
|
const limitedChildren = React19.Children.toArray(children).slice(0, 10);
|
|
33737
|
-
return /* @__PURE__ */
|
|
33686
|
+
return /* @__PURE__ */ jsxs75(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33738
33687
|
limitedChildren,
|
|
33739
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33688
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs75(
|
|
33740
33689
|
"button",
|
|
33741
33690
|
{
|
|
33742
33691
|
type: "button",
|
|
@@ -33779,7 +33728,7 @@ var Many2OneField = (props) => {
|
|
|
33779
33728
|
const { t: t3 } = useI18n();
|
|
33780
33729
|
if (!isForm && !isEditTable) {
|
|
33781
33730
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33782
|
-
return /* @__PURE__ */
|
|
33731
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
33783
33732
|
allowShowDetail && renderDetail({
|
|
33784
33733
|
idToolTip: String(name2) + Number(index4),
|
|
33785
33734
|
model: options2?.model ?? relation,
|
|
@@ -33797,7 +33746,7 @@ var Many2OneField = (props) => {
|
|
|
33797
33746
|
)
|
|
33798
33747
|
] });
|
|
33799
33748
|
}
|
|
33800
|
-
return /* @__PURE__ */
|
|
33749
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
33801
33750
|
allowShowDetail && renderDetail({
|
|
33802
33751
|
idToolTip: String(name2),
|
|
33803
33752
|
model: options2?.model ?? relation,
|
|
@@ -33835,7 +33784,7 @@ var Many2OneField = (props) => {
|
|
|
33835
33784
|
methods?.clearErrors(name2);
|
|
33836
33785
|
}
|
|
33837
33786
|
}, [selectedOption]);
|
|
33838
|
-
return /* @__PURE__ */
|
|
33787
|
+
return /* @__PURE__ */ jsxs75("div", { className: "h-full", children: [
|
|
33839
33788
|
/* @__PURE__ */ jsx112(
|
|
33840
33789
|
StateManagedSelect$1,
|
|
33841
33790
|
{
|
|
@@ -33941,7 +33890,7 @@ var Many2OneField = (props) => {
|
|
|
33941
33890
|
};
|
|
33942
33891
|
|
|
33943
33892
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33944
|
-
import { jsx as jsx113, jsxs as
|
|
33893
|
+
import { jsx as jsx113, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
33945
33894
|
var StatusbarDurationField = (props) => {
|
|
33946
33895
|
const {
|
|
33947
33896
|
disabled,
|
|
@@ -33955,10 +33904,10 @@ var StatusbarDurationField = (props) => {
|
|
|
33955
33904
|
"div",
|
|
33956
33905
|
{
|
|
33957
33906
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33958
|
-
children: /* @__PURE__ */
|
|
33907
|
+
children: /* @__PURE__ */ jsxs76("div", { className: "flex items-center gap-[24px]", children: [
|
|
33959
33908
|
/* @__PURE__ */ jsx113("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33960
33909
|
const value = option?.id === defaultValue;
|
|
33961
|
-
return /* @__PURE__ */
|
|
33910
|
+
return /* @__PURE__ */ jsxs76(
|
|
33962
33911
|
"label",
|
|
33963
33912
|
{
|
|
33964
33913
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33993,7 +33942,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33993
33942
|
}) }),
|
|
33994
33943
|
dataResponse?.records?.some(
|
|
33995
33944
|
(item) => item?.fold && item.id !== defaultValue
|
|
33996
|
-
) && /* @__PURE__ */
|
|
33945
|
+
) && /* @__PURE__ */ jsxs76(
|
|
33997
33946
|
"div",
|
|
33998
33947
|
{
|
|
33999
33948
|
onClick: () => setModalStatus(!modelStatus),
|
|
@@ -34031,7 +33980,7 @@ var StatusbarDurationField = (props) => {
|
|
|
34031
33980
|
|
|
34032
33981
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
34033
33982
|
import { useMemo as useMemo12 } from "react";
|
|
34034
|
-
import { Fragment as Fragment33, jsx as jsx114, jsxs as
|
|
33983
|
+
import { Fragment as Fragment33, jsx as jsx114, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
34035
33984
|
var StatusBarOptionField = (props) => {
|
|
34036
33985
|
const { selection, defaultValue } = props;
|
|
34037
33986
|
const memoizedStatusOptions = useMemo12(() => selection, [selection]);
|
|
@@ -34047,8 +33996,8 @@ var StatusBarOptionField = (props) => {
|
|
|
34047
33996
|
flexWrap: "wrap"
|
|
34048
33997
|
},
|
|
34049
33998
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
34050
|
-
return /* @__PURE__ */
|
|
34051
|
-
/* @__PURE__ */
|
|
33999
|
+
return /* @__PURE__ */ jsxs77(Fragment33, { children: [
|
|
34000
|
+
/* @__PURE__ */ jsxs77(
|
|
34052
34001
|
"div",
|
|
34053
34002
|
{
|
|
34054
34003
|
style: {
|
|
@@ -34167,7 +34116,7 @@ var ICCheck = () => {
|
|
|
34167
34116
|
};
|
|
34168
34117
|
|
|
34169
34118
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34170
|
-
import { jsx as jsx115, jsxs as
|
|
34119
|
+
import { jsx as jsx115, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
34171
34120
|
var DateOptionField = (props) => {
|
|
34172
34121
|
const {
|
|
34173
34122
|
name: name2,
|
|
@@ -34183,7 +34132,7 @@ var DateOptionField = (props) => {
|
|
|
34183
34132
|
{
|
|
34184
34133
|
name: name2 ?? "",
|
|
34185
34134
|
control: methods?.control,
|
|
34186
|
-
render: ({ field }) => /* @__PURE__ */
|
|
34135
|
+
render: ({ field }) => /* @__PURE__ */ jsxs78(
|
|
34187
34136
|
"label",
|
|
34188
34137
|
{
|
|
34189
34138
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|