@fctc/sme-widget-ui 4.1.10-beta.13 → 4.1.10-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +68 -166
- package/dist/index.mjs +65 -162
- package/dist/widgets.d.mts +2 -12
- package/dist/widgets.d.ts +2 -12
- package/dist/widgets.js +68 -166
- package/dist/widgets.mjs +65 -162
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useClickOutside, useFileInfo } from './hooks.mjs';
|
|
2
2
|
export { ArchiveIcon, AttachIcon, BackIcon, CalendarIcon, CheckIcon, ChevronBottomIcon, CloseIcon, CopyIcon, DefaultFileIcon, DeleteIcon, DeleteIconDanger, DoubleArrow, DownloadIcon, ExcelIcon, ExportIcon, EyeClosedIcon, EyeHiddenIcon, EyeIcon, FilterColumnIcon, FilterIcon, GoogleIcon, GroupByIcon, IcArrow, IcEmptyTable, JSONFileIcon, ListIcon, LoadingIcon, MoreIcon, PaidIcon, PdfIcon, PlaceHolderIcon, PlayIcon, QRIcon, ResetIcon, SearchIcon, SettingIcon, StarIcon, TriangleIcon, UnArchiveIcon, ZipIcon } from './icons.mjs';
|
|
3
3
|
export { IInputFieldProps, LoginData, LoginProps, Provider, ValuePropsType, loginSchema } from './types.mjs';
|
|
4
|
-
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IProviderEinvoicesProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, IStatusSingleFieldProps, ImageField, IntegerField, Item, LayerLoading, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, Many2manyBinaryField, MiniQRLink, MiniQrType,
|
|
4
|
+
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IProviderEinvoicesProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, IStatusSingleFieldProps, ImageField, IntegerField, Item, LayerLoading, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, Many2manyBinaryField, MiniQRLink, MiniQrType, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, ProviderEinvoice, RadioGroupField, RatingStarField, RemainingDaysField, Row, Search, SecureField, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusSingle, StatusbarDurationField, TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, UrlDownload, UrlDownloadType, usePagination } from './widgets.mjs';
|
|
5
5
|
export { ACCEPT_TYPES, ALLOWED_EXTS, ALLOWED_MIME_TYPES, COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, generateTagColors, getFileLabel, getPasswordMessage, isBase64Image, parseFormattedNumber, range, uppercaseFirstLetter, useFormatDate, validateAndParseDate, validateInput } from './utils.mjs';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useClickOutside, useFileInfo } from './hooks.js';
|
|
2
2
|
export { ArchiveIcon, AttachIcon, BackIcon, CalendarIcon, CheckIcon, ChevronBottomIcon, CloseIcon, CopyIcon, DefaultFileIcon, DeleteIcon, DeleteIconDanger, DoubleArrow, DownloadIcon, ExcelIcon, ExportIcon, EyeClosedIcon, EyeHiddenIcon, EyeIcon, FilterColumnIcon, FilterIcon, GoogleIcon, GroupByIcon, IcArrow, IcEmptyTable, JSONFileIcon, ListIcon, LoadingIcon, MoreIcon, PaidIcon, PdfIcon, PlaceHolderIcon, PlayIcon, QRIcon, ResetIcon, SearchIcon, SettingIcon, StarIcon, TriangleIcon, UnArchiveIcon, ZipIcon } from './icons.js';
|
|
3
3
|
export { IInputFieldProps, LoginData, LoginProps, Provider, ValuePropsType, loginSchema } from './types.js';
|
|
4
|
-
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IProviderEinvoicesProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, IStatusSingleFieldProps, ImageField, IntegerField, Item, LayerLoading, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, Many2manyBinaryField, MiniQRLink, MiniQrType,
|
|
4
|
+
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IProviderEinvoicesProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, IStatusSingleFieldProps, ImageField, IntegerField, Item, LayerLoading, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, Many2manyBinaryField, MiniQRLink, MiniQrType, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, ProviderEinvoice, RadioGroupField, RatingStarField, RemainingDaysField, Row, Search, SecureField, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusSingle, StatusbarDurationField, TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, UrlDownload, UrlDownloadType, usePagination } from './widgets.js';
|
|
5
5
|
export { ACCEPT_TYPES, ALLOWED_EXTS, ALLOWED_MIME_TYPES, COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, generateTagColors, getFileLabel, getPasswordMessage, isBase64Image, parseFormattedNumber, range, uppercaseFirstLetter, useFormatDate, validateAndParseDate, validateInput } from './utils.js';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -179,7 +179,6 @@ __export(index_exports, {
|
|
|
179
179
|
Many2OneField: () => Many2OneField,
|
|
180
180
|
Many2manyBinaryField: () => Many2manyBinaryField,
|
|
181
181
|
MiniQRLink: () => MiniQRLink,
|
|
182
|
-
ModalConfirm: () => ModalConfirm,
|
|
183
182
|
ModalDetail: () => ModalDetail,
|
|
184
183
|
ModalLayer: () => ModalLayer,
|
|
185
184
|
MonetaryField: () => MonetaryField,
|
|
@@ -9377,7 +9376,7 @@ var Search = ({
|
|
|
9377
9376
|
selectedRowKeys,
|
|
9378
9377
|
domainSearch,
|
|
9379
9378
|
evalJSONContext,
|
|
9380
|
-
clearSearch,
|
|
9379
|
+
// clearSearch,
|
|
9381
9380
|
onKeyDown,
|
|
9382
9381
|
handleMouseEnter,
|
|
9383
9382
|
handleMouseLeave,
|
|
@@ -9407,7 +9406,6 @@ var Search = ({
|
|
|
9407
9406
|
setDidInit(false);
|
|
9408
9407
|
setIsReadyFormatDomain(false);
|
|
9409
9408
|
return () => {
|
|
9410
|
-
clearSearch();
|
|
9411
9409
|
setDidInit(false);
|
|
9412
9410
|
setIsReadyFormatDomain(false);
|
|
9413
9411
|
};
|
|
@@ -12675,8 +12673,8 @@ var Many2ManyField = (props) => {
|
|
|
12675
12673
|
searchString,
|
|
12676
12674
|
selectedTags,
|
|
12677
12675
|
setFilterBy,
|
|
12678
|
-
setGroupBy
|
|
12679
|
-
clearSearch
|
|
12676
|
+
setGroupBy
|
|
12677
|
+
// clearSearch,
|
|
12680
12678
|
} = searchController;
|
|
12681
12679
|
(0, import_react38.useEffect)(() => {
|
|
12682
12680
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
@@ -12745,7 +12743,6 @@ var Many2ManyField = (props) => {
|
|
|
12745
12743
|
aid,
|
|
12746
12744
|
domainSearch,
|
|
12747
12745
|
evalJSONContext,
|
|
12748
|
-
clearSearch,
|
|
12749
12746
|
groupByList
|
|
12750
12747
|
}
|
|
12751
12748
|
) }),
|
|
@@ -13908,153 +13905,10 @@ var ProviderEinvoice = (props) => {
|
|
|
13908
13905
|
);
|
|
13909
13906
|
};
|
|
13910
13907
|
|
|
13911
|
-
// src/widgets/common/modal-layer.tsx
|
|
13912
|
-
var import_react46 = require("react");
|
|
13913
|
-
var import_react47 = require("@headlessui/react");
|
|
13914
|
-
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
13915
|
-
var ModalLayer = ({
|
|
13916
|
-
isOpen,
|
|
13917
|
-
onClose,
|
|
13918
|
-
title,
|
|
13919
|
-
children
|
|
13920
|
-
}) => {
|
|
13921
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
13922
|
-
import_react47.Transition,
|
|
13923
|
-
{
|
|
13924
|
-
show: isOpen,
|
|
13925
|
-
enter: "transition duration-100 ease-out",
|
|
13926
|
-
enterFrom: "transform scale-95 opacity-0",
|
|
13927
|
-
enterTo: "transform scale-100 opacity-100",
|
|
13928
|
-
leave: "transition duration-75 ease-out",
|
|
13929
|
-
leaveFrom: "transform scale-100 opacity-100",
|
|
13930
|
-
leaveTo: "transform scale-95 opacity-0",
|
|
13931
|
-
as: import_react46.Fragment,
|
|
13932
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react47.Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react47.DialogPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
13933
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
13934
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: " relative z-[1] mx-auto my-[88px] p-4 flex flex-col gap-2 max-w-[1000px] transform rounded-xl bg-[#FFF]", children: [
|
|
13935
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
13936
|
-
"div",
|
|
13937
|
-
{
|
|
13938
|
-
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
13939
|
-
children: [
|
|
13940
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
13941
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
13942
|
-
"button",
|
|
13943
|
-
{
|
|
13944
|
-
onClick: onClose,
|
|
13945
|
-
"aria-label": "Close",
|
|
13946
|
-
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
13947
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CloseIcon, {})
|
|
13948
|
-
}
|
|
13949
|
-
)
|
|
13950
|
-
]
|
|
13951
|
-
}
|
|
13952
|
-
),
|
|
13953
|
-
children
|
|
13954
|
-
] }) })
|
|
13955
|
-
] }) }) })
|
|
13956
|
-
}
|
|
13957
|
-
);
|
|
13958
|
-
};
|
|
13959
|
-
|
|
13960
|
-
// src/widgets/common/modal-confirm.tsx
|
|
13961
|
-
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
13962
|
-
var ModalConfirm = ({
|
|
13963
|
-
name,
|
|
13964
|
-
isShowModal,
|
|
13965
|
-
onClick,
|
|
13966
|
-
onClose,
|
|
13967
|
-
title,
|
|
13968
|
-
content,
|
|
13969
|
-
isLoading
|
|
13970
|
-
}) => {
|
|
13971
|
-
const { t: t4 } = useI18n();
|
|
13972
|
-
const renderButtonAction = (name2) => {
|
|
13973
|
-
switch (name2) {
|
|
13974
|
-
case "duplicate":
|
|
13975
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
13976
|
-
"button",
|
|
13977
|
-
{
|
|
13978
|
-
type: "button",
|
|
13979
|
-
onClick,
|
|
13980
|
-
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
13981
|
-
disabled: isLoading,
|
|
13982
|
-
children: [
|
|
13983
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(LoadingIcon, {}),
|
|
13984
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: t4(isLoading ? "duplicating" : "duplicate") })
|
|
13985
|
-
]
|
|
13986
|
-
}
|
|
13987
|
-
);
|
|
13988
|
-
case "archive":
|
|
13989
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
13990
|
-
"button",
|
|
13991
|
-
{
|
|
13992
|
-
type: "button",
|
|
13993
|
-
onClick,
|
|
13994
|
-
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
13995
|
-
disabled: isLoading,
|
|
13996
|
-
children: [
|
|
13997
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(LoadingIcon, {}),
|
|
13998
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: t4(isLoading ? "archiving" : "save_archive") })
|
|
13999
|
-
]
|
|
14000
|
-
}
|
|
14001
|
-
);
|
|
14002
|
-
case "unarchive":
|
|
14003
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
14004
|
-
"button",
|
|
14005
|
-
{
|
|
14006
|
-
type: "button",
|
|
14007
|
-
onClick,
|
|
14008
|
-
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
14009
|
-
disabled: isLoading,
|
|
14010
|
-
children: [
|
|
14011
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(LoadingIcon, {}),
|
|
14012
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: t4(isLoading ? "unarchiving" : "save_unarchive") })
|
|
14013
|
-
]
|
|
14014
|
-
}
|
|
14015
|
-
);
|
|
14016
|
-
case "delete":
|
|
14017
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
14018
|
-
"button",
|
|
14019
|
-
{
|
|
14020
|
-
type: "button",
|
|
14021
|
-
onClick,
|
|
14022
|
-
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
14023
|
-
disabled: isLoading,
|
|
14024
|
-
children: [
|
|
14025
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(LoadingIcon, {}),
|
|
14026
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: t4(isLoading ? "deleting" : "delete_button") })
|
|
14027
|
-
]
|
|
14028
|
-
}
|
|
14029
|
-
);
|
|
14030
|
-
default:
|
|
14031
|
-
break;
|
|
14032
|
-
}
|
|
14033
|
-
};
|
|
14034
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
14035
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
14036
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "text-[18px] font-bold", children: title }),
|
|
14037
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { className: "text-[16px]", children: content })
|
|
14038
|
-
] }),
|
|
14039
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
14040
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
14041
|
-
"button",
|
|
14042
|
-
{
|
|
14043
|
-
type: "button",
|
|
14044
|
-
onClick: onClose,
|
|
14045
|
-
className: "button-secondary flex-1 cursor-pointer",
|
|
14046
|
-
children: t4("cancel")
|
|
14047
|
-
}
|
|
14048
|
-
),
|
|
14049
|
-
renderButtonAction(name)
|
|
14050
|
-
] })
|
|
14051
|
-
] }) });
|
|
14052
|
-
};
|
|
14053
|
-
|
|
14054
13908
|
// src/widgets/common/modal-detail.tsx
|
|
14055
|
-
var
|
|
13909
|
+
var import_react46 = require("react");
|
|
14056
13910
|
var import_react_dom4 = require("react-dom");
|
|
14057
|
-
var
|
|
13911
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
14058
13912
|
var ModalDetail = ({
|
|
14059
13913
|
title,
|
|
14060
13914
|
model,
|
|
@@ -14064,8 +13918,8 @@ var ModalDetail = ({
|
|
|
14064
13918
|
context
|
|
14065
13919
|
}) => {
|
|
14066
13920
|
const { t: t4 } = useI18n();
|
|
14067
|
-
const [showModalDetail, setShowModalDetail] = (0,
|
|
14068
|
-
const [actionData, setActionData] = (0,
|
|
13921
|
+
const [showModalDetail, setShowModalDetail] = (0, import_react46.useState)(false);
|
|
13922
|
+
const [actionData, setActionData] = (0, import_react46.useState)();
|
|
14069
13923
|
const handleToggleModal = (e4) => {
|
|
14070
13924
|
e4.stopPropagation();
|
|
14071
13925
|
setShowModalDetail(!showModalDetail);
|
|
@@ -14075,18 +13929,18 @@ var ModalDetail = ({
|
|
|
14075
13929
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
14076
13930
|
};
|
|
14077
13931
|
return (0, import_react_dom4.createPortal)(
|
|
14078
|
-
/* @__PURE__ */ (0,
|
|
14079
|
-
/* @__PURE__ */ (0,
|
|
14080
|
-
/* @__PURE__ */ (0,
|
|
14081
|
-
/* @__PURE__ */ (0,
|
|
14082
|
-
/* @__PURE__ */ (0,
|
|
13932
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_jsx_runtime105.Fragment, { children: showModalDetail && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
13933
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
13934
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "relative z-[1] max-w-full p-4 flex flex-col gap-4 w-[1000px] transform rounded-3xl bg-[#FFF] h-[90%]", children: [
|
|
13935
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
13936
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
14083
13937
|
"div",
|
|
14084
13938
|
{
|
|
14085
13939
|
id: "modal-detail",
|
|
14086
13940
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
14087
13941
|
children: [
|
|
14088
13942
|
t4("detail_button"),
|
|
14089
|
-
/* @__PURE__ */ (0,
|
|
13943
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
14090
13944
|
"button",
|
|
14091
13945
|
{
|
|
14092
13946
|
onClick: handleNavigateDetail,
|
|
@@ -14097,9 +13951,9 @@ var ModalDetail = ({
|
|
|
14097
13951
|
]
|
|
14098
13952
|
}
|
|
14099
13953
|
),
|
|
14100
|
-
/* @__PURE__ */ (0,
|
|
13954
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CloseIcon, { className: "h-5 w-5" }) })
|
|
14101
13955
|
] }),
|
|
14102
|
-
/* @__PURE__ */ (0,
|
|
13956
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
14103
13957
|
id: idForm,
|
|
14104
13958
|
aid,
|
|
14105
13959
|
model,
|
|
@@ -14112,9 +13966,58 @@ var ModalDetail = ({
|
|
|
14112
13966
|
);
|
|
14113
13967
|
};
|
|
14114
13968
|
|
|
13969
|
+
// src/widgets/common/modal-layer.tsx
|
|
13970
|
+
var import_react47 = require("react");
|
|
13971
|
+
var import_react48 = require("@headlessui/react");
|
|
13972
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
13973
|
+
var ModalLayer = ({
|
|
13974
|
+
isOpen,
|
|
13975
|
+
onClose,
|
|
13976
|
+
title,
|
|
13977
|
+
children
|
|
13978
|
+
}) => {
|
|
13979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
13980
|
+
import_react48.Transition,
|
|
13981
|
+
{
|
|
13982
|
+
show: isOpen,
|
|
13983
|
+
enter: "transition duration-100 ease-out",
|
|
13984
|
+
enterFrom: "transform scale-95 opacity-0",
|
|
13985
|
+
enterTo: "transform scale-100 opacity-100",
|
|
13986
|
+
leave: "transition duration-75 ease-out",
|
|
13987
|
+
leaveFrom: "transform scale-100 opacity-100",
|
|
13988
|
+
leaveTo: "transform scale-95 opacity-0",
|
|
13989
|
+
as: import_react47.Fragment,
|
|
13990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react48.Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_react48.DialogPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
13991
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
13992
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: " relative z-[1] mx-auto my-[88px] p-4 flex flex-col gap-2 max-w-[1000px] transform rounded-xl bg-[#FFF]", children: [
|
|
13993
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
13994
|
+
"div",
|
|
13995
|
+
{
|
|
13996
|
+
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
13997
|
+
children: [
|
|
13998
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
13999
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
14000
|
+
"button",
|
|
14001
|
+
{
|
|
14002
|
+
onClick: onClose,
|
|
14003
|
+
"aria-label": "Close",
|
|
14004
|
+
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
14005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CloseIcon, {})
|
|
14006
|
+
}
|
|
14007
|
+
)
|
|
14008
|
+
]
|
|
14009
|
+
}
|
|
14010
|
+
),
|
|
14011
|
+
children
|
|
14012
|
+
] }) })
|
|
14013
|
+
] }) }) })
|
|
14014
|
+
}
|
|
14015
|
+
);
|
|
14016
|
+
};
|
|
14017
|
+
|
|
14115
14018
|
// src/widgets/common/loading-normal.tsx
|
|
14116
14019
|
var import_react49 = require("react");
|
|
14117
|
-
var
|
|
14020
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
14118
14021
|
var LayerLoading = () => {
|
|
14119
14022
|
const { t: t4 } = useI18n();
|
|
14120
14023
|
const [activeIndex, setActiveIndex] = (0, import_react49.useState)(0);
|
|
@@ -14124,15 +14027,15 @@ var LayerLoading = () => {
|
|
|
14124
14027
|
}, 200);
|
|
14125
14028
|
return () => clearInterval(interval);
|
|
14126
14029
|
}, []);
|
|
14127
|
-
return /* @__PURE__ */ (0,
|
|
14128
|
-
/* @__PURE__ */ (0,
|
|
14030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
14031
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "loading-container", children: [...Array(6)].map((_2, index) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
14129
14032
|
"div",
|
|
14130
14033
|
{
|
|
14131
14034
|
className: `loading-item ${index === activeIndex ? "active" : ""}`
|
|
14132
14035
|
},
|
|
14133
14036
|
index
|
|
14134
14037
|
)) }),
|
|
14135
|
-
/* @__PURE__ */ (0,
|
|
14038
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t4("loading") })
|
|
14136
14039
|
] }) }) });
|
|
14137
14040
|
};
|
|
14138
14041
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -14199,7 +14102,6 @@ var LayerLoading = () => {
|
|
|
14199
14102
|
Many2OneField,
|
|
14200
14103
|
Many2manyBinaryField,
|
|
14201
14104
|
MiniQRLink,
|
|
14202
|
-
ModalConfirm,
|
|
14203
14105
|
ModalDetail,
|
|
14204
14106
|
ModalLayer,
|
|
14205
14107
|
MonetaryField,
|