@fctc/sme-widget-ui 1.1.0 → 1.1.2
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 +166 -151
- package/dist/index.mjs +166 -151
- package/dist/widgets.js +166 -151
- package/dist/widgets.mjs +166 -151
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12573,8 +12573,14 @@ var TableHead = (props) => {
|
|
|
12573
12573
|
return /* @__PURE__ */ jsx45("thead", { className: "relative z-10", children: /* @__PURE__ */ jsxs28(
|
|
12574
12574
|
"tr",
|
|
12575
12575
|
{
|
|
12576
|
-
style: {
|
|
12577
|
-
|
|
12576
|
+
style: {
|
|
12577
|
+
userSelect: "none",
|
|
12578
|
+
WebkitUserSelect: "none",
|
|
12579
|
+
zIndex: 1,
|
|
12580
|
+
position: "sticky",
|
|
12581
|
+
top: 0
|
|
12582
|
+
},
|
|
12583
|
+
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
12578
12584
|
children: [
|
|
12579
12585
|
isDisplayCheckbox && /* @__PURE__ */ jsx45(
|
|
12580
12586
|
"th",
|
|
@@ -12595,7 +12601,7 @@ var TableHead = (props) => {
|
|
|
12595
12601
|
return /* @__PURE__ */ jsx45(
|
|
12596
12602
|
"th",
|
|
12597
12603
|
{
|
|
12598
|
-
className: `column whitespace-nowrap text-left p-3 text-sm font-
|
|
12604
|
+
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12599
12605
|
children: /* @__PURE__ */ jsx45("div", { className: "cursor-pointer flex justify-between items-center gap-[4px] w-full min-w-max group", children: col.title })
|
|
12600
12606
|
},
|
|
12601
12607
|
"table-head-" + index4
|
|
@@ -15111,7 +15117,7 @@ var Search = ({
|
|
|
15111
15117
|
"input",
|
|
15112
15118
|
{
|
|
15113
15119
|
value: searchString,
|
|
15114
|
-
className: "min-h-[
|
|
15120
|
+
className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
|
|
15115
15121
|
placeholder: instance.t("search..."),
|
|
15116
15122
|
onChange: (e3) => {
|
|
15117
15123
|
onSearchString(e3.target.value);
|
|
@@ -18055,7 +18061,7 @@ var CharField = (props) => {
|
|
|
18055
18061
|
disabled: readonly,
|
|
18056
18062
|
placeholder,
|
|
18057
18063
|
required: !invisible && required,
|
|
18058
|
-
className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border border-[rgba(66,66,66,0.12)] rounded-lg
|
|
18064
|
+
className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border !border-[rgba(66,66,66,0.12)] rounded-lg py-2 px-3 text-sm font-normal gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content
|
|
18059
18065
|
${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer text-[#AEAEAE]"}
|
|
18060
18066
|
`
|
|
18061
18067
|
}
|
|
@@ -33904,164 +33910,173 @@ var Many2ManyField = (props) => {
|
|
|
33904
33910
|
return createPortal5(
|
|
33905
33911
|
/* @__PURE__ */ jsxs71("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[9999]", children: [
|
|
33906
33912
|
/* @__PURE__ */ jsx102("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33907
|
-
/* @__PURE__ */ jsx102("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs71(
|
|
33908
|
-
|
|
33909
|
-
|
|
33910
|
-
|
|
33911
|
-
|
|
33912
|
-
|
|
33913
|
-
|
|
33914
|
-
|
|
33915
|
-
{
|
|
33916
|
-
|
|
33917
|
-
|
|
33918
|
-
|
|
33919
|
-
|
|
33920
|
-
|
|
33921
|
-
|
|
33922
|
-
|
|
33923
|
-
|
|
33924
|
-
|
|
33925
|
-
|
|
33926
|
-
|
|
33927
|
-
|
|
33928
|
-
|
|
33929
|
-
|
|
33930
|
-
|
|
33931
|
-
|
|
33932
|
-
|
|
33933
|
-
|
|
33934
|
-
|
|
33935
|
-
|
|
33936
|
-
|
|
33937
|
-
|
|
33938
|
-
|
|
33939
|
-
|
|
33940
|
-
|
|
33941
|
-
|
|
33942
|
-
|
|
33943
|
-
|
|
33944
|
-
|
|
33945
|
-
|
|
33946
|
-
|
|
33947
|
-
|
|
33948
|
-
|
|
33949
|
-
|
|
33950
|
-
|
|
33951
|
-
totalCount: totalRows ?? 0,
|
|
33952
|
-
pageSize: 10,
|
|
33953
|
-
onPageChange: (page2) => {
|
|
33954
|
-
if (typeof setPage === "function") {
|
|
33955
|
-
setPage(page2);
|
|
33913
|
+
/* @__PURE__ */ jsx102("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs71(
|
|
33914
|
+
"div",
|
|
33915
|
+
{
|
|
33916
|
+
style: {
|
|
33917
|
+
zIndex: 1
|
|
33918
|
+
},
|
|
33919
|
+
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",
|
|
33920
|
+
children: [
|
|
33921
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33922
|
+
/* @__PURE__ */ jsx102("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33923
|
+
/* @__PURE__ */ jsx102("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx102(CloseIcon, {}) })
|
|
33924
|
+
] }),
|
|
33925
|
+
/* @__PURE__ */ jsxs71("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33926
|
+
/* @__PURE__ */ jsx102("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ jsx102(
|
|
33927
|
+
Search,
|
|
33928
|
+
{
|
|
33929
|
+
removeSearchItems,
|
|
33930
|
+
selectedTags,
|
|
33931
|
+
filterBy,
|
|
33932
|
+
setFilterBy,
|
|
33933
|
+
searchString,
|
|
33934
|
+
onSearchString,
|
|
33935
|
+
handleAddTagSearch,
|
|
33936
|
+
searchBy,
|
|
33937
|
+
groupBy,
|
|
33938
|
+
showFiltersGroups: true,
|
|
33939
|
+
setGroupBy,
|
|
33940
|
+
setDomainList: setDomain,
|
|
33941
|
+
setPage: (pages) => {
|
|
33942
|
+
setPage?.(pages);
|
|
33943
|
+
},
|
|
33944
|
+
fieldsList: [
|
|
33945
|
+
...columns?.filter(
|
|
33946
|
+
(col) => col?.field?.type_co === "field" && col?.optional !== "hide"
|
|
33947
|
+
)?.map((col) => ({ ...col.field })) ?? []
|
|
33948
|
+
],
|
|
33949
|
+
setSelectedRowKeys,
|
|
33950
|
+
viewData,
|
|
33951
|
+
context,
|
|
33952
|
+
selectedRowKeys,
|
|
33953
|
+
aid,
|
|
33954
|
+
domainSearch,
|
|
33955
|
+
evalJSONContext,
|
|
33956
|
+
clearSearch
|
|
33956
33957
|
}
|
|
33957
|
-
},
|
|
33958
|
-
|
|
33959
|
-
|
|
33960
|
-
|
|
33961
|
-
|
|
33962
|
-
|
|
33963
|
-
|
|
33964
|
-
|
|
33965
|
-
|
|
33966
|
-
|
|
33967
|
-
|
|
33958
|
+
) }),
|
|
33959
|
+
/* @__PURE__ */ jsx102(
|
|
33960
|
+
PaginationView,
|
|
33961
|
+
{
|
|
33962
|
+
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
33963
|
+
currentPage: page,
|
|
33964
|
+
totalCount: totalRows ?? 0,
|
|
33965
|
+
pageSize: 10,
|
|
33966
|
+
onPageChange: (page2) => {
|
|
33967
|
+
if (typeof setPage === "function") {
|
|
33968
|
+
setPage(page2);
|
|
33969
|
+
}
|
|
33970
|
+
},
|
|
33971
|
+
displayPageNumberDots: false,
|
|
33972
|
+
displayRowsNumberOption: false
|
|
33973
|
+
}
|
|
33974
|
+
)
|
|
33975
|
+
] }),
|
|
33976
|
+
!isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ jsx102("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx102("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx102(
|
|
33968
33977
|
"div",
|
|
33969
33978
|
{
|
|
33970
|
-
className: `
|
|
33971
|
-
children: /* @__PURE__ */ jsx102("div", { className: "w-full h-full
|
|
33972
|
-
"
|
|
33979
|
+
className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33980
|
+
children: /* @__PURE__ */ jsx102("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx102("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx102(
|
|
33981
|
+
"div",
|
|
33973
33982
|
{
|
|
33974
|
-
className: `
|
|
33975
|
-
children:
|
|
33976
|
-
|
|
33977
|
-
|
|
33978
|
-
|
|
33979
|
-
|
|
33980
|
-
|
|
33981
|
-
|
|
33982
|
-
|
|
33983
|
-
|
|
33984
|
-
|
|
33985
|
-
|
|
33986
|
-
|
|
33987
|
-
|
|
33988
|
-
|
|
33989
|
-
|
|
33990
|
-
|
|
33991
|
-
|
|
33992
|
-
|
|
33993
|
-
|
|
33994
|
-
|
|
33995
|
-
|
|
33996
|
-
|
|
33997
|
-
|
|
33998
|
-
|
|
33999
|
-
rootField: rootField2
|
|
34000
|
-
}) => {
|
|
34001
|
-
if (typeof renderField === "function") {
|
|
34002
|
-
return renderField({
|
|
33983
|
+
className: `flex w-full items-center h-full overflow-auto `,
|
|
33984
|
+
children: /* @__PURE__ */ jsx102("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs71(
|
|
33985
|
+
"table",
|
|
33986
|
+
{
|
|
33987
|
+
className: `relative w-full bg-white custom-dropdown `,
|
|
33988
|
+
children: [
|
|
33989
|
+
/* @__PURE__ */ jsx102(
|
|
33990
|
+
TableHead,
|
|
33991
|
+
{
|
|
33992
|
+
columns,
|
|
33993
|
+
onToggleColumnOptional,
|
|
33994
|
+
isDisplayCheckbox,
|
|
33995
|
+
checkedAll,
|
|
33996
|
+
handleCheckBoxAll
|
|
33997
|
+
}
|
|
33998
|
+
),
|
|
33999
|
+
/* @__PURE__ */ jsx102(
|
|
34000
|
+
TableBody,
|
|
34001
|
+
{
|
|
34002
|
+
columns,
|
|
34003
|
+
rows,
|
|
34004
|
+
rootField,
|
|
34005
|
+
isDisplayCheckbox,
|
|
34006
|
+
model: relation,
|
|
34007
|
+
renderField: ({
|
|
34003
34008
|
row,
|
|
34004
34009
|
col,
|
|
34005
34010
|
indexRow,
|
|
34006
34011
|
onChangeData,
|
|
34007
34012
|
rootField: rootField2
|
|
34008
|
-
})
|
|
34013
|
+
}) => {
|
|
34014
|
+
if (typeof renderField === "function") {
|
|
34015
|
+
return renderField({
|
|
34016
|
+
row,
|
|
34017
|
+
col,
|
|
34018
|
+
indexRow,
|
|
34019
|
+
onChangeData,
|
|
34020
|
+
rootField: rootField2
|
|
34021
|
+
});
|
|
34022
|
+
}
|
|
34023
|
+
},
|
|
34024
|
+
onRemoveRow: null,
|
|
34025
|
+
onAddRow,
|
|
34026
|
+
onClickRow,
|
|
34027
|
+
typeTable,
|
|
34028
|
+
selectedRowKeysRef,
|
|
34029
|
+
selectedRowKeys,
|
|
34030
|
+
setSelectedRowKeys
|
|
34009
34031
|
}
|
|
34010
|
-
|
|
34011
|
-
|
|
34012
|
-
|
|
34013
|
-
|
|
34014
|
-
typeTable,
|
|
34015
|
-
selectedRowKeysRef,
|
|
34016
|
-
selectedRowKeys,
|
|
34017
|
-
setSelectedRowKeys
|
|
34018
|
-
}
|
|
34019
|
-
)
|
|
34020
|
-
]
|
|
34032
|
+
)
|
|
34033
|
+
]
|
|
34034
|
+
}
|
|
34035
|
+
) })
|
|
34021
34036
|
}
|
|
34022
|
-
) })
|
|
34037
|
+
) }) })
|
|
34023
34038
|
}
|
|
34024
|
-
) }) })
|
|
34025
|
-
|
|
34026
|
-
|
|
34027
|
-
|
|
34028
|
-
|
|
34029
|
-
|
|
34030
|
-
|
|
34031
|
-
|
|
34032
|
-
|
|
34033
|
-
|
|
34034
|
-
className: "button-primary",
|
|
34035
|
-
children: instance.t("choose")
|
|
34036
|
-
}
|
|
34037
|
-
),
|
|
34038
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx102(
|
|
34039
|
-
"button",
|
|
34040
|
-
{
|
|
34041
|
-
type: "button",
|
|
34042
|
-
onClick: () => {
|
|
34043
|
-
if (typeof onAddNew === "function") {
|
|
34044
|
-
onAddNew();
|
|
34045
|
-
onClose();
|
|
34046
|
-
} else {
|
|
34047
|
-
handleCreateNewOnPage();
|
|
34039
|
+
) }) }) : /* @__PURE__ */ jsx102(LayerLoading, {}),
|
|
34040
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
34041
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx102(
|
|
34042
|
+
"button",
|
|
34043
|
+
{
|
|
34044
|
+
disabled: selectedRowKeys?.length === 0,
|
|
34045
|
+
type: "button",
|
|
34046
|
+
onClick: () => onChoose(selectedRowKeys),
|
|
34047
|
+
className: "button-primary",
|
|
34048
|
+
children: instance.t("choose")
|
|
34048
34049
|
}
|
|
34049
|
-
|
|
34050
|
-
|
|
34051
|
-
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
34057
|
-
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34050
|
+
),
|
|
34051
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx102(
|
|
34052
|
+
"button",
|
|
34053
|
+
{
|
|
34054
|
+
type: "button",
|
|
34055
|
+
onClick: () => {
|
|
34056
|
+
if (typeof onAddNew === "function") {
|
|
34057
|
+
onAddNew();
|
|
34058
|
+
onClose();
|
|
34059
|
+
} else {
|
|
34060
|
+
handleCreateNewOnPage();
|
|
34061
|
+
}
|
|
34062
|
+
},
|
|
34063
|
+
className: "button-primary",
|
|
34064
|
+
children: instance.t("new")
|
|
34065
|
+
}
|
|
34066
|
+
),
|
|
34067
|
+
/* @__PURE__ */ jsx102(
|
|
34068
|
+
"button",
|
|
34069
|
+
{
|
|
34070
|
+
type: "button",
|
|
34071
|
+
onClick: onClose,
|
|
34072
|
+
className: "button-secondary",
|
|
34073
|
+
children: instance.t("cancel_button")
|
|
34074
|
+
}
|
|
34075
|
+
)
|
|
34076
|
+
] })
|
|
34077
|
+
]
|
|
34078
|
+
}
|
|
34079
|
+
) })
|
|
34065
34080
|
] }),
|
|
34066
34081
|
document.body
|
|
34067
34082
|
);
|
|
@@ -34186,7 +34201,7 @@ var Many2OneField = (props) => {
|
|
|
34186
34201
|
menuShouldScrollIntoView: false,
|
|
34187
34202
|
options: options2,
|
|
34188
34203
|
classNames: {
|
|
34189
|
-
control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px]
|
|
34204
|
+
control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
|
|
34190
34205
|
valueContainer: () => "!m-0 !p-0",
|
|
34191
34206
|
singleValue: () => `!m-0 ${readonly ? "!text-[#5c5a5a]" : ""}`,
|
|
34192
34207
|
input: () => "!m-0 !p-0",
|