@fctc/sme-widget-ui 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -7
- package/dist/index.mjs +10 -7
- package/dist/widgets.js +10 -7
- package/dist/widgets.mjs +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13138,6 +13138,7 @@ var TableHead = (props) => {
|
|
|
13138
13138
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
13139
13139
|
"th",
|
|
13140
13140
|
{
|
|
13141
|
+
"data-type-co": col?.field?.type_co,
|
|
13141
13142
|
"data-rtc-resizable": col?.name,
|
|
13142
13143
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
13143
13144
|
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
@@ -13188,7 +13189,7 @@ var TableHead = (props) => {
|
|
|
13188
13189
|
"th",
|
|
13189
13190
|
{
|
|
13190
13191
|
style: {
|
|
13191
|
-
|
|
13192
|
+
maxWidth: "50px",
|
|
13192
13193
|
right: 0
|
|
13193
13194
|
},
|
|
13194
13195
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
@@ -17346,7 +17347,7 @@ var CharField = (props) => {
|
|
|
17346
17347
|
required: !invisible && required,
|
|
17347
17348
|
className: `w-full h-full ring-0 focus:ring-0 focus:!outline-none outline-0 px-3 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
|
|
17348
17349
|
${readonly ? "cursor-not-allowed border border-[rgba(66,66,66,0.12)] text-[#5c5a5a]" : "cursor-pointer border border-[rgba(66,66,66,0.12)] text-[#525866]"}
|
|
17349
|
-
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17350
|
+
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary w-fit max-w-[200px]"}`}
|
|
17350
17351
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
|
|
17351
17352
|
`
|
|
17352
17353
|
}
|
|
@@ -31995,16 +31996,18 @@ var FloatField = (props) => {
|
|
|
31995
31996
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31996
31997
|
);
|
|
31997
31998
|
(0, import_react58.useEffect)(() => {
|
|
31998
|
-
if (
|
|
31999
|
+
if (isDirtyRef.current) return;
|
|
32000
|
+
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
32001
|
+
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
31999
32002
|
setInputValue(formatFloatNumber(propValue));
|
|
32000
32003
|
clearErrors(name2);
|
|
32001
|
-
} else if (value !== void 0 && value !== null && value !==
|
|
32004
|
+
} else if (value !== void 0 && value !== null && !Number.isNaN(value) && value !== numericInput) {
|
|
32002
32005
|
setInputValue(formatFloatNumber(value));
|
|
32003
32006
|
clearErrors(name2);
|
|
32004
32007
|
} else if (value === null || value === void 0) {
|
|
32005
32008
|
setInputValue("");
|
|
32006
32009
|
}
|
|
32007
|
-
}, [value, name2, clearErrors, propValue]);
|
|
32010
|
+
}, [value, name2, clearErrors, propValue, inputValue]);
|
|
32008
32011
|
const isDirtyRef = (0, import_react58.useRef)(false);
|
|
32009
32012
|
const inputRef = (0, import_react58.useRef)(null);
|
|
32010
32013
|
const lastCommittedValueRef = (0, import_react58.useRef)(null);
|
|
@@ -32539,7 +32542,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32539
32542
|
menu: (base) => ({
|
|
32540
32543
|
...base,
|
|
32541
32544
|
zIndex: 9999,
|
|
32542
|
-
width: "
|
|
32545
|
+
width: "100%",
|
|
32543
32546
|
minWidth: "max-content",
|
|
32544
32547
|
borderRadius: "10px"
|
|
32545
32548
|
}),
|
|
@@ -33271,7 +33274,7 @@ var IntegerField = (props) => {
|
|
|
33271
33274
|
`
|
|
33272
33275
|
}
|
|
33273
33276
|
),
|
|
33274
|
-
error2 && isEditTable && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33277
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33275
33278
|
] });
|
|
33276
33279
|
}
|
|
33277
33280
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -13013,6 +13013,7 @@ var TableHead = (props) => {
|
|
|
13013
13013
|
return /* @__PURE__ */ jsx50(
|
|
13014
13014
|
"th",
|
|
13015
13015
|
{
|
|
13016
|
+
"data-type-co": col?.field?.type_co,
|
|
13016
13017
|
"data-rtc-resizable": col?.name,
|
|
13017
13018
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
13018
13019
|
children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
@@ -13063,7 +13064,7 @@ var TableHead = (props) => {
|
|
|
13063
13064
|
"th",
|
|
13064
13065
|
{
|
|
13065
13066
|
style: {
|
|
13066
|
-
|
|
13067
|
+
maxWidth: "50px",
|
|
13067
13068
|
right: 0
|
|
13068
13069
|
},
|
|
13069
13070
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
@@ -17221,7 +17222,7 @@ var CharField = (props) => {
|
|
|
17221
17222
|
required: !invisible && required,
|
|
17222
17223
|
className: `w-full h-full ring-0 focus:ring-0 focus:!outline-none outline-0 px-3 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
|
|
17223
17224
|
${readonly ? "cursor-not-allowed border border-[rgba(66,66,66,0.12)] text-[#5c5a5a]" : "cursor-pointer border border-[rgba(66,66,66,0.12)] text-[#525866]"}
|
|
17224
|
-
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17225
|
+
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary w-fit max-w-[200px]"}`}
|
|
17225
17226
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
|
|
17226
17227
|
`
|
|
17227
17228
|
}
|
|
@@ -31870,16 +31871,18 @@ var FloatField = (props) => {
|
|
|
31870
31871
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31871
31872
|
);
|
|
31872
31873
|
useEffect20(() => {
|
|
31873
|
-
if (
|
|
31874
|
+
if (isDirtyRef.current) return;
|
|
31875
|
+
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31876
|
+
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
31874
31877
|
setInputValue(formatFloatNumber(propValue));
|
|
31875
31878
|
clearErrors(name2);
|
|
31876
|
-
} else if (value !== void 0 && value !== null && value !==
|
|
31879
|
+
} else if (value !== void 0 && value !== null && !Number.isNaN(value) && value !== numericInput) {
|
|
31877
31880
|
setInputValue(formatFloatNumber(value));
|
|
31878
31881
|
clearErrors(name2);
|
|
31879
31882
|
} else if (value === null || value === void 0) {
|
|
31880
31883
|
setInputValue("");
|
|
31881
31884
|
}
|
|
31882
|
-
}, [value, name2, clearErrors, propValue]);
|
|
31885
|
+
}, [value, name2, clearErrors, propValue, inputValue]);
|
|
31883
31886
|
const isDirtyRef = useRef16(false);
|
|
31884
31887
|
const inputRef = useRef16(null);
|
|
31885
31888
|
const lastCommittedValueRef = useRef16(null);
|
|
@@ -32414,7 +32417,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32414
32417
|
menu: (base) => ({
|
|
32415
32418
|
...base,
|
|
32416
32419
|
zIndex: 9999,
|
|
32417
|
-
width: "
|
|
32420
|
+
width: "100%",
|
|
32418
32421
|
minWidth: "max-content",
|
|
32419
32422
|
borderRadius: "10px"
|
|
32420
32423
|
}),
|
|
@@ -33146,7 +33149,7 @@ var IntegerField = (props) => {
|
|
|
33146
33149
|
`
|
|
33147
33150
|
}
|
|
33148
33151
|
),
|
|
33149
|
-
error2 && isEditTable && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33152
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33150
33153
|
] });
|
|
33151
33154
|
}
|
|
33152
33155
|
}
|
package/dist/widgets.js
CHANGED
|
@@ -12380,6 +12380,7 @@ var TableHead = (props) => {
|
|
|
12380
12380
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12381
12381
|
"th",
|
|
12382
12382
|
{
|
|
12383
|
+
"data-type-co": col?.field?.type_co,
|
|
12383
12384
|
"data-rtc-resizable": col?.name,
|
|
12384
12385
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12385
12386
|
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
@@ -12430,7 +12431,7 @@ var TableHead = (props) => {
|
|
|
12430
12431
|
"th",
|
|
12431
12432
|
{
|
|
12432
12433
|
style: {
|
|
12433
|
-
|
|
12434
|
+
maxWidth: "50px",
|
|
12434
12435
|
right: 0
|
|
12435
12436
|
},
|
|
12436
12437
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
@@ -16599,7 +16600,7 @@ var CharField = (props) => {
|
|
|
16599
16600
|
required: !invisible && required,
|
|
16600
16601
|
className: `w-full h-full ring-0 focus:ring-0 focus:!outline-none outline-0 px-3 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
|
|
16601
16602
|
${readonly ? "cursor-not-allowed border border-[rgba(66,66,66,0.12)] text-[#5c5a5a]" : "cursor-pointer border border-[rgba(66,66,66,0.12)] text-[#525866]"}
|
|
16602
|
-
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16603
|
+
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary w-fit max-w-[200px]"}`}
|
|
16603
16604
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
|
|
16604
16605
|
`
|
|
16605
16606
|
}
|
|
@@ -31248,16 +31249,18 @@ var FloatField = (props) => {
|
|
|
31248
31249
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31249
31250
|
);
|
|
31250
31251
|
(0, import_react58.useEffect)(() => {
|
|
31251
|
-
if (
|
|
31252
|
+
if (isDirtyRef.current) return;
|
|
31253
|
+
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31254
|
+
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
31252
31255
|
setInputValue(formatFloatNumber(propValue));
|
|
31253
31256
|
clearErrors(name2);
|
|
31254
|
-
} else if (value !== void 0 && value !== null && value !==
|
|
31257
|
+
} else if (value !== void 0 && value !== null && !Number.isNaN(value) && value !== numericInput) {
|
|
31255
31258
|
setInputValue(formatFloatNumber(value));
|
|
31256
31259
|
clearErrors(name2);
|
|
31257
31260
|
} else if (value === null || value === void 0) {
|
|
31258
31261
|
setInputValue("");
|
|
31259
31262
|
}
|
|
31260
|
-
}, [value, name2, clearErrors, propValue]);
|
|
31263
|
+
}, [value, name2, clearErrors, propValue, inputValue]);
|
|
31261
31264
|
const isDirtyRef = (0, import_react58.useRef)(false);
|
|
31262
31265
|
const inputRef = (0, import_react58.useRef)(null);
|
|
31263
31266
|
const lastCommittedValueRef = (0, import_react58.useRef)(null);
|
|
@@ -31792,7 +31795,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31792
31795
|
menu: (base) => ({
|
|
31793
31796
|
...base,
|
|
31794
31797
|
zIndex: 9999,
|
|
31795
|
-
width: "
|
|
31798
|
+
width: "100%",
|
|
31796
31799
|
minWidth: "max-content",
|
|
31797
31800
|
borderRadius: "10px"
|
|
31798
31801
|
}),
|
|
@@ -32524,7 +32527,7 @@ var IntegerField = (props) => {
|
|
|
32524
32527
|
`
|
|
32525
32528
|
}
|
|
32526
32529
|
),
|
|
32527
|
-
error2 && isEditTable && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32530
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32528
32531
|
] });
|
|
32529
32532
|
}
|
|
32530
32533
|
}
|
package/dist/widgets.mjs
CHANGED
|
@@ -12318,6 +12318,7 @@ var TableHead = (props) => {
|
|
|
12318
12318
|
return /* @__PURE__ */ jsx50(
|
|
12319
12319
|
"th",
|
|
12320
12320
|
{
|
|
12321
|
+
"data-type-co": col?.field?.type_co,
|
|
12321
12322
|
"data-rtc-resizable": col?.name,
|
|
12322
12323
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12323
12324
|
children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
@@ -12368,7 +12369,7 @@ var TableHead = (props) => {
|
|
|
12368
12369
|
"th",
|
|
12369
12370
|
{
|
|
12370
12371
|
style: {
|
|
12371
|
-
|
|
12372
|
+
maxWidth: "50px",
|
|
12372
12373
|
right: 0
|
|
12373
12374
|
},
|
|
12374
12375
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
@@ -16537,7 +16538,7 @@ var CharField = (props) => {
|
|
|
16537
16538
|
required: !invisible && required,
|
|
16538
16539
|
className: `w-full h-full ring-0 focus:ring-0 focus:!outline-none outline-0 px-3 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
|
|
16539
16540
|
${readonly ? "cursor-not-allowed border border-[rgba(66,66,66,0.12)] text-[#5c5a5a]" : "cursor-pointer border border-[rgba(66,66,66,0.12)] text-[#525866]"}
|
|
16540
|
-
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16541
|
+
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary w-fit max-w-[200px]"}`}
|
|
16541
16542
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
|
|
16542
16543
|
`
|
|
16543
16544
|
}
|
|
@@ -31186,16 +31187,18 @@ var FloatField = (props) => {
|
|
|
31186
31187
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31187
31188
|
);
|
|
31188
31189
|
useEffect20(() => {
|
|
31189
|
-
if (
|
|
31190
|
+
if (isDirtyRef.current) return;
|
|
31191
|
+
const numericInput = parseFloat(inputValue?.replace(/,/g, ""));
|
|
31192
|
+
if (propValue !== void 0 && propValue !== null && !Number.isNaN(propValue) && propValue !== numericInput) {
|
|
31190
31193
|
setInputValue(formatFloatNumber(propValue));
|
|
31191
31194
|
clearErrors(name2);
|
|
31192
|
-
} else if (value !== void 0 && value !== null && value !==
|
|
31195
|
+
} else if (value !== void 0 && value !== null && !Number.isNaN(value) && value !== numericInput) {
|
|
31193
31196
|
setInputValue(formatFloatNumber(value));
|
|
31194
31197
|
clearErrors(name2);
|
|
31195
31198
|
} else if (value === null || value === void 0) {
|
|
31196
31199
|
setInputValue("");
|
|
31197
31200
|
}
|
|
31198
|
-
}, [value, name2, clearErrors, propValue]);
|
|
31201
|
+
}, [value, name2, clearErrors, propValue, inputValue]);
|
|
31199
31202
|
const isDirtyRef = useRef16(false);
|
|
31200
31203
|
const inputRef = useRef16(null);
|
|
31201
31204
|
const lastCommittedValueRef = useRef16(null);
|
|
@@ -31730,7 +31733,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31730
31733
|
menu: (base) => ({
|
|
31731
31734
|
...base,
|
|
31732
31735
|
zIndex: 9999,
|
|
31733
|
-
width: "
|
|
31736
|
+
width: "100%",
|
|
31734
31737
|
minWidth: "max-content",
|
|
31735
31738
|
borderRadius: "10px"
|
|
31736
31739
|
}),
|
|
@@ -32462,7 +32465,7 @@ var IntegerField = (props) => {
|
|
|
32462
32465
|
`
|
|
32463
32466
|
}
|
|
32464
32467
|
),
|
|
32465
|
-
error2 && isEditTable && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32468
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32466
32469
|
] });
|
|
32467
32470
|
}
|
|
32468
32471
|
}
|