@fctc/sme-widget-ui 1.7.6 → 1.7.8
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 +61 -30
- package/dist/index.mjs +61 -29
- package/dist/utils.d.mts +1 -11
- package/dist/utils.d.ts +1 -11
- package/dist/utils.js +0 -12
- package/dist/utils.mjs +0 -11
- package/dist/widgets.js +61 -28
- package/dist/widgets.mjs +61 -28
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,6 @@ export { useClickOutside, useFileInfo } from './hooks.mjs';
|
|
|
2
2
|
export { AddIcon, ArchiveIcon, ArrowDownIcon, ArrowRightIcon, AttachIcon, BackIcon, CalendarIcon, CheckIcon, ChevronBottomIcon, CloseIcon, CopyIcon, DeleteIcon, DeleteIconDanger, DownloadIcon, ExcelIcon, ExportIcon, EyeClosedIcon, EyeIcon, FilterIcon, GoogleIcon, GroupByIcon, KanbanIcon, ListIcon, LoadingIcon, MoreIcon, PaidIcon, PdfIcon, PlaceHolderIcon, PlayIcon, ResetIcon, SearchIcon, SettingIcon, StarIcon, TriangleIcon, UnArchiveIcon, VectorIcon, ZipIcon } from './icons.mjs';
|
|
3
3
|
export { IInputFieldProps, LoginData, LoginProps, Provider, ValuePropsType, loginSchema } from './types.mjs';
|
|
4
4
|
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, ButtonField, ButtonSelectFiles, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FileUploadField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, IButtonProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IFileUploadProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, ImageField, InfomationField, IntegerField, LayerLoading, LoadingSmall, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, RadioGroupField, RatingStarField, RemainingDaysField, RenderFiles, Row, Search, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusbarDurationField, TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, VideoPlayer, usePagination } from './widgets.mjs';
|
|
5
|
-
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range,
|
|
5
|
+
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range, useFormatDate, validateAndParseDate, validateInput } from './utils.mjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { useClickOutside, useFileInfo } from './hooks.js';
|
|
|
2
2
|
export { AddIcon, ArchiveIcon, ArrowDownIcon, ArrowRightIcon, AttachIcon, BackIcon, CalendarIcon, CheckIcon, ChevronBottomIcon, CloseIcon, CopyIcon, DeleteIcon, DeleteIconDanger, DownloadIcon, ExcelIcon, ExportIcon, EyeClosedIcon, EyeIcon, FilterIcon, GoogleIcon, GroupByIcon, KanbanIcon, ListIcon, LoadingIcon, MoreIcon, PaidIcon, PdfIcon, PlaceHolderIcon, PlayIcon, ResetIcon, SearchIcon, SettingIcon, StarIcon, TriangleIcon, UnArchiveIcon, VectorIcon, ZipIcon } from './icons.js';
|
|
3
3
|
export { IInputFieldProps, LoginData, LoginProps, Provider, ValuePropsType, loginSchema } from './types.js';
|
|
4
4
|
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, ButtonField, ButtonSelectFiles, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FileUploadField, FloatField, FloatTimeField, HtmlField, IActiveBadgeProps, IAvatarProps, IBinaryFieldProps, IButtonBadgeProps, IButtonProps, ICharFieldProps, IColorFieldProps, IColorWrapperProps, ICopyLinkButtonProps, IDateFieldProps, IDownLoadBinary, IDownloadFileProps, IDurationProps, IFileUploadProps, IMany2ManyTagsProps, IMonetaryProps, IOptionProps, IPaginationProps, IPriorityFieldProps, IRadioGroupProps, IRatingStarProps, ISelectDropdownProps, IStatusDropdownFieldProps, ImageField, InfomationField, IntegerField, LayerLoading, LoadingSmall, Login, Many2ManyField, Many2ManyProps, Many2ManyTagField, Many2OneField, Many2OneProps, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, RadioGroupField, RatingStarField, RemainingDaysField, RenderFiles, Row, Search, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusbarDurationField, TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, VideoPlayer, usePagination } from './widgets.js';
|
|
5
|
-
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range,
|
|
5
|
+
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range, useFormatDate, validateAndParseDate, validateInput } from './utils.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -5046,7 +5046,6 @@ __export(index_exports, {
|
|
|
5046
5046
|
loginSchema: () => loginSchema,
|
|
5047
5047
|
parseFormattedNumber: () => parseFormattedNumber,
|
|
5048
5048
|
range: () => range,
|
|
5049
|
-
typeStyles: () => typeStyles,
|
|
5050
5049
|
useClickOutside: () => useClickOutside,
|
|
5051
5050
|
useFileInfo: () => useFileInfo,
|
|
5052
5051
|
useFormatDate: () => useFormatDate,
|
|
@@ -7846,16 +7845,6 @@ var COLORS = [
|
|
|
7846
7845
|
}
|
|
7847
7846
|
];
|
|
7848
7847
|
var DOTS = "...";
|
|
7849
|
-
var typeStyles = {
|
|
7850
|
-
primary: "bg-blue-500 text-white",
|
|
7851
|
-
secondary: "bg-lime-600 text-white",
|
|
7852
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
7853
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
7854
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
7855
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
7856
|
-
default: "bg-[#dee2e6]",
|
|
7857
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
7858
|
-
};
|
|
7859
7848
|
var SearchType = {
|
|
7860
7849
|
FILTER: "filter_by",
|
|
7861
7850
|
SEARCH: "search_by",
|
|
@@ -18501,6 +18490,59 @@ var BinaryField = (props) => {
|
|
|
18501
18490
|
|
|
18502
18491
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
18503
18492
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
18493
|
+
var typeStyles = {
|
|
18494
|
+
primary: {
|
|
18495
|
+
backgroundColor: "#3b82f6",
|
|
18496
|
+
color: "#fff",
|
|
18497
|
+
border: "1px solid #fff"
|
|
18498
|
+
},
|
|
18499
|
+
secondary: {
|
|
18500
|
+
backgroundColor: "#EBF1FF",
|
|
18501
|
+
color: "#2597D0",
|
|
18502
|
+
border: "1px solid #35ADE9"
|
|
18503
|
+
},
|
|
18504
|
+
danger: {
|
|
18505
|
+
backgroundColor: "#FFEBEC",
|
|
18506
|
+
color: "#E93544",
|
|
18507
|
+
border: "1px solid #FB2B3D"
|
|
18508
|
+
},
|
|
18509
|
+
info: {
|
|
18510
|
+
backgroundColor: "rgba(5,152,237,0.12)",
|
|
18511
|
+
color: "rgb(5,152,237)",
|
|
18512
|
+
border: "1px solid rgb(5,152,237)"
|
|
18513
|
+
},
|
|
18514
|
+
success: {
|
|
18515
|
+
backgroundColor: "#E0FAEB",
|
|
18516
|
+
color: "#12AF53",
|
|
18517
|
+
border: "1px solid #1FC163"
|
|
18518
|
+
},
|
|
18519
|
+
warning: {
|
|
18520
|
+
backgroundColor: "#FFFAEB",
|
|
18521
|
+
color: "#E6A819",
|
|
18522
|
+
border: "1px solid #F6B51E"
|
|
18523
|
+
},
|
|
18524
|
+
default: {
|
|
18525
|
+
backgroundColor: "#dee2e6",
|
|
18526
|
+
color: "#000",
|
|
18527
|
+
border: "1px solid #000"
|
|
18528
|
+
},
|
|
18529
|
+
light: {
|
|
18530
|
+
backgroundColor: "#fff",
|
|
18531
|
+
color: "#1f2937",
|
|
18532
|
+
border: "1px solid #1f2937"
|
|
18533
|
+
}
|
|
18534
|
+
};
|
|
18535
|
+
var baseStyle = {
|
|
18536
|
+
borderRadius: "4px",
|
|
18537
|
+
fontSize: "12px",
|
|
18538
|
+
padding: "4px 8px",
|
|
18539
|
+
width: "fit-content",
|
|
18540
|
+
textAlign: "center",
|
|
18541
|
+
fontWeight: 500,
|
|
18542
|
+
cursor: "pointer",
|
|
18543
|
+
transition: "all 0.3s ease-in-out",
|
|
18544
|
+
height: "fit-content !important"
|
|
18545
|
+
};
|
|
18504
18546
|
var ButtonBadgeField = (props) => {
|
|
18505
18547
|
const { defaultValue, selection, value, formValues, domainHelper } = props;
|
|
18506
18548
|
const decorationSuccess = props["decoration-success"] && domainHelper.checkDomain(formValues, props["decoration-success"]);
|
|
@@ -18508,31 +18550,21 @@ var ButtonBadgeField = (props) => {
|
|
|
18508
18550
|
const decorationDanger = props["decoration-danger"] && domainHelper.checkDomain(formValues, props["decoration-danger"]);
|
|
18509
18551
|
const decorationWarning = props["decoration-warning"] && domainHelper.checkDomain(formValues, props["decoration-warning"]);
|
|
18510
18552
|
const getType = () => {
|
|
18511
|
-
if (decorationInfo)
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
if (
|
|
18515
|
-
return typeStyles["success"];
|
|
18516
|
-
}
|
|
18517
|
-
if (decorationDanger) {
|
|
18518
|
-
return typeStyles["danger"];
|
|
18519
|
-
}
|
|
18520
|
-
if (decorationWarning) {
|
|
18521
|
-
return typeStyles["warning"];
|
|
18522
|
-
}
|
|
18553
|
+
if (decorationInfo) return typeStyles["info"];
|
|
18554
|
+
if (decorationSuccess) return typeStyles["success"];
|
|
18555
|
+
if (decorationDanger) return typeStyles["danger"];
|
|
18556
|
+
if (decorationWarning) return typeStyles["warning"];
|
|
18523
18557
|
return typeStyles["default"];
|
|
18524
18558
|
};
|
|
18525
|
-
const baseStyle = "rounded-full text-xs px-[0.82rem] w-fit py-1 text-center font-medium cursor-pointer transition duration-300 ease-in-out transform";
|
|
18526
|
-
const buttonClass = `${baseStyle} ${getType()}`;
|
|
18527
18559
|
const getLabel = (value2) => {
|
|
18528
18560
|
if (!value2) return "";
|
|
18529
|
-
const item = selection?.find(
|
|
18530
|
-
|
|
18531
|
-
|
|
18561
|
+
const item = selection?.find(
|
|
18562
|
+
(item2) => Array.isArray(item2) && item2[0] === value2
|
|
18563
|
+
);
|
|
18532
18564
|
return item ? item[1] : "";
|
|
18533
18565
|
};
|
|
18534
18566
|
const label = getLabel(defaultValue ?? value);
|
|
18535
|
-
return label ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {
|
|
18567
|
+
return label ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { style: { ...baseStyle, ...getType() }, children: i18n_default.t(label) }) : null;
|
|
18536
18568
|
};
|
|
18537
18569
|
|
|
18538
18570
|
// src/widgets/basic/button-field/button.tsx
|
|
@@ -35566,7 +35598,6 @@ var DateOptionField = (props) => {
|
|
|
35566
35598
|
loginSchema,
|
|
35567
35599
|
parseFormattedNumber,
|
|
35568
35600
|
range,
|
|
35569
|
-
typeStyles,
|
|
35570
35601
|
useClickOutside,
|
|
35571
35602
|
useFileInfo,
|
|
35572
35603
|
useFormatDate,
|
package/dist/index.mjs
CHANGED
|
@@ -7725,16 +7725,6 @@ var COLORS = [
|
|
|
7725
7725
|
}
|
|
7726
7726
|
];
|
|
7727
7727
|
var DOTS = "...";
|
|
7728
|
-
var typeStyles = {
|
|
7729
|
-
primary: "bg-blue-500 text-white",
|
|
7730
|
-
secondary: "bg-lime-600 text-white",
|
|
7731
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
7732
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
7733
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
7734
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
7735
|
-
default: "bg-[#dee2e6]",
|
|
7736
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
7737
|
-
};
|
|
7738
7728
|
var SearchType = {
|
|
7739
7729
|
FILTER: "filter_by",
|
|
7740
7730
|
SEARCH: "search_by",
|
|
@@ -18380,6 +18370,59 @@ var BinaryField = (props) => {
|
|
|
18380
18370
|
|
|
18381
18371
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
18382
18372
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
18373
|
+
var typeStyles = {
|
|
18374
|
+
primary: {
|
|
18375
|
+
backgroundColor: "#3b82f6",
|
|
18376
|
+
color: "#fff",
|
|
18377
|
+
border: "1px solid #fff"
|
|
18378
|
+
},
|
|
18379
|
+
secondary: {
|
|
18380
|
+
backgroundColor: "#EBF1FF",
|
|
18381
|
+
color: "#2597D0",
|
|
18382
|
+
border: "1px solid #35ADE9"
|
|
18383
|
+
},
|
|
18384
|
+
danger: {
|
|
18385
|
+
backgroundColor: "#FFEBEC",
|
|
18386
|
+
color: "#E93544",
|
|
18387
|
+
border: "1px solid #FB2B3D"
|
|
18388
|
+
},
|
|
18389
|
+
info: {
|
|
18390
|
+
backgroundColor: "rgba(5,152,237,0.12)",
|
|
18391
|
+
color: "rgb(5,152,237)",
|
|
18392
|
+
border: "1px solid rgb(5,152,237)"
|
|
18393
|
+
},
|
|
18394
|
+
success: {
|
|
18395
|
+
backgroundColor: "#E0FAEB",
|
|
18396
|
+
color: "#12AF53",
|
|
18397
|
+
border: "1px solid #1FC163"
|
|
18398
|
+
},
|
|
18399
|
+
warning: {
|
|
18400
|
+
backgroundColor: "#FFFAEB",
|
|
18401
|
+
color: "#E6A819",
|
|
18402
|
+
border: "1px solid #F6B51E"
|
|
18403
|
+
},
|
|
18404
|
+
default: {
|
|
18405
|
+
backgroundColor: "#dee2e6",
|
|
18406
|
+
color: "#000",
|
|
18407
|
+
border: "1px solid #000"
|
|
18408
|
+
},
|
|
18409
|
+
light: {
|
|
18410
|
+
backgroundColor: "#fff",
|
|
18411
|
+
color: "#1f2937",
|
|
18412
|
+
border: "1px solid #1f2937"
|
|
18413
|
+
}
|
|
18414
|
+
};
|
|
18415
|
+
var baseStyle = {
|
|
18416
|
+
borderRadius: "4px",
|
|
18417
|
+
fontSize: "12px",
|
|
18418
|
+
padding: "4px 8px",
|
|
18419
|
+
width: "fit-content",
|
|
18420
|
+
textAlign: "center",
|
|
18421
|
+
fontWeight: 500,
|
|
18422
|
+
cursor: "pointer",
|
|
18423
|
+
transition: "all 0.3s ease-in-out",
|
|
18424
|
+
height: "fit-content !important"
|
|
18425
|
+
};
|
|
18383
18426
|
var ButtonBadgeField = (props) => {
|
|
18384
18427
|
const { defaultValue, selection, value, formValues, domainHelper } = props;
|
|
18385
18428
|
const decorationSuccess = props["decoration-success"] && domainHelper.checkDomain(formValues, props["decoration-success"]);
|
|
@@ -18387,31 +18430,21 @@ var ButtonBadgeField = (props) => {
|
|
|
18387
18430
|
const decorationDanger = props["decoration-danger"] && domainHelper.checkDomain(formValues, props["decoration-danger"]);
|
|
18388
18431
|
const decorationWarning = props["decoration-warning"] && domainHelper.checkDomain(formValues, props["decoration-warning"]);
|
|
18389
18432
|
const getType = () => {
|
|
18390
|
-
if (decorationInfo)
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
if (
|
|
18394
|
-
return typeStyles["success"];
|
|
18395
|
-
}
|
|
18396
|
-
if (decorationDanger) {
|
|
18397
|
-
return typeStyles["danger"];
|
|
18398
|
-
}
|
|
18399
|
-
if (decorationWarning) {
|
|
18400
|
-
return typeStyles["warning"];
|
|
18401
|
-
}
|
|
18433
|
+
if (decorationInfo) return typeStyles["info"];
|
|
18434
|
+
if (decorationSuccess) return typeStyles["success"];
|
|
18435
|
+
if (decorationDanger) return typeStyles["danger"];
|
|
18436
|
+
if (decorationWarning) return typeStyles["warning"];
|
|
18402
18437
|
return typeStyles["default"];
|
|
18403
18438
|
};
|
|
18404
|
-
const baseStyle = "rounded-full text-xs px-[0.82rem] w-fit py-1 text-center font-medium cursor-pointer transition duration-300 ease-in-out transform";
|
|
18405
|
-
const buttonClass = `${baseStyle} ${getType()}`;
|
|
18406
18439
|
const getLabel = (value2) => {
|
|
18407
18440
|
if (!value2) return "";
|
|
18408
|
-
const item = selection?.find(
|
|
18409
|
-
|
|
18410
|
-
|
|
18441
|
+
const item = selection?.find(
|
|
18442
|
+
(item2) => Array.isArray(item2) && item2[0] === value2
|
|
18443
|
+
);
|
|
18411
18444
|
return item ? item[1] : "";
|
|
18412
18445
|
};
|
|
18413
18446
|
const label = getLabel(defaultValue ?? value);
|
|
18414
|
-
return label ? /* @__PURE__ */ jsx71("div", {
|
|
18447
|
+
return label ? /* @__PURE__ */ jsx71("div", { style: { ...baseStyle, ...getType() }, children: i18n_default.t(label) }) : null;
|
|
18415
18448
|
};
|
|
18416
18449
|
|
|
18417
18450
|
// src/widgets/basic/button-field/button.tsx
|
|
@@ -35444,7 +35477,6 @@ export {
|
|
|
35444
35477
|
loginSchema,
|
|
35445
35478
|
parseFormattedNumber,
|
|
35446
35479
|
range,
|
|
35447
|
-
typeStyles,
|
|
35448
35480
|
useClickOutside,
|
|
35449
35481
|
useFileInfo,
|
|
35450
35482
|
useFormatDate,
|
package/dist/utils.d.mts
CHANGED
|
@@ -21,20 +21,10 @@ declare const COLORS: {
|
|
|
21
21
|
id: number;
|
|
22
22
|
}[];
|
|
23
23
|
declare const DOTS = "...";
|
|
24
|
-
declare const typeStyles: {
|
|
25
|
-
primary: string;
|
|
26
|
-
secondary: string;
|
|
27
|
-
danger: string;
|
|
28
|
-
info: string;
|
|
29
|
-
success: string;
|
|
30
|
-
warning: string;
|
|
31
|
-
default: string;
|
|
32
|
-
light: string;
|
|
33
|
-
};
|
|
34
24
|
declare const SearchType: {
|
|
35
25
|
FILTER: string;
|
|
36
26
|
SEARCH: string;
|
|
37
27
|
GROUP: string;
|
|
38
28
|
};
|
|
39
29
|
|
|
40
|
-
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range,
|
|
30
|
+
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range, useFormatDate, validateAndParseDate, validateInput };
|
package/dist/utils.d.ts
CHANGED
|
@@ -21,20 +21,10 @@ declare const COLORS: {
|
|
|
21
21
|
id: number;
|
|
22
22
|
}[];
|
|
23
23
|
declare const DOTS = "...";
|
|
24
|
-
declare const typeStyles: {
|
|
25
|
-
primary: string;
|
|
26
|
-
secondary: string;
|
|
27
|
-
danger: string;
|
|
28
|
-
info: string;
|
|
29
|
-
success: string;
|
|
30
|
-
warning: string;
|
|
31
|
-
default: string;
|
|
32
|
-
light: string;
|
|
33
|
-
};
|
|
34
24
|
declare const SearchType: {
|
|
35
25
|
FILTER: string;
|
|
36
26
|
SEARCH: string;
|
|
37
27
|
GROUP: string;
|
|
38
28
|
};
|
|
39
29
|
|
|
40
|
-
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range,
|
|
30
|
+
export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range, useFormatDate, validateAndParseDate, validateInput };
|
package/dist/utils.js
CHANGED
|
@@ -4071,7 +4071,6 @@ __export(utils_exports, {
|
|
|
4071
4071
|
isObjectEmpty: () => isObjectEmpty,
|
|
4072
4072
|
parseFormattedNumber: () => parseFormattedNumber,
|
|
4073
4073
|
range: () => range,
|
|
4074
|
-
typeStyles: () => typeStyles,
|
|
4075
4074
|
useFormatDate: () => useFormatDate,
|
|
4076
4075
|
validateAndParseDate: () => validateAndParseDate,
|
|
4077
4076
|
validateInput: () => validateInput
|
|
@@ -4838,16 +4837,6 @@ var COLORS = [
|
|
|
4838
4837
|
}
|
|
4839
4838
|
];
|
|
4840
4839
|
var DOTS = "...";
|
|
4841
|
-
var typeStyles = {
|
|
4842
|
-
primary: "bg-blue-500 text-white",
|
|
4843
|
-
secondary: "bg-lime-600 text-white",
|
|
4844
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
4845
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
4846
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
4847
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
4848
|
-
default: "bg-[#dee2e6]",
|
|
4849
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
4850
|
-
};
|
|
4851
4840
|
var SearchType = {
|
|
4852
4841
|
FILTER: "filter_by",
|
|
4853
4842
|
SEARCH: "search_by",
|
|
@@ -4869,7 +4858,6 @@ var SearchType = {
|
|
|
4869
4858
|
isObjectEmpty,
|
|
4870
4859
|
parseFormattedNumber,
|
|
4871
4860
|
range,
|
|
4872
|
-
typeStyles,
|
|
4873
4861
|
useFormatDate,
|
|
4874
4862
|
validateAndParseDate,
|
|
4875
4863
|
validateInput
|
package/dist/utils.mjs
CHANGED
|
@@ -4814,16 +4814,6 @@ var COLORS = [
|
|
|
4814
4814
|
}
|
|
4815
4815
|
];
|
|
4816
4816
|
var DOTS = "...";
|
|
4817
|
-
var typeStyles = {
|
|
4818
|
-
primary: "bg-blue-500 text-white",
|
|
4819
|
-
secondary: "bg-lime-600 text-white",
|
|
4820
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
4821
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
4822
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
4823
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
4824
|
-
default: "bg-[#dee2e6]",
|
|
4825
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
4826
|
-
};
|
|
4827
4817
|
var SearchType = {
|
|
4828
4818
|
FILTER: "filter_by",
|
|
4829
4819
|
SEARCH: "search_by",
|
|
@@ -4844,7 +4834,6 @@ export {
|
|
|
4844
4834
|
isObjectEmpty,
|
|
4845
4835
|
parseFormattedNumber,
|
|
4846
4836
|
range,
|
|
4847
|
-
typeStyles,
|
|
4848
4837
|
useFormatDate,
|
|
4849
4838
|
validateAndParseDate,
|
|
4850
4839
|
validateInput
|
package/dist/widgets.js
CHANGED
|
@@ -5778,16 +5778,6 @@ var COLORS = [
|
|
|
5778
5778
|
}
|
|
5779
5779
|
];
|
|
5780
5780
|
var DOTS = "...";
|
|
5781
|
-
var typeStyles = {
|
|
5782
|
-
primary: "bg-blue-500 text-white",
|
|
5783
|
-
secondary: "bg-lime-600 text-white",
|
|
5784
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
5785
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
5786
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
5787
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
5788
|
-
default: "bg-[#dee2e6]",
|
|
5789
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
5790
|
-
};
|
|
5791
5781
|
var SearchType = {
|
|
5792
5782
|
FILTER: "filter_by",
|
|
5793
5783
|
SEARCH: "search_by",
|
|
@@ -18125,6 +18115,59 @@ var BinaryField = (props) => {
|
|
|
18125
18115
|
|
|
18126
18116
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
18127
18117
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
18118
|
+
var typeStyles = {
|
|
18119
|
+
primary: {
|
|
18120
|
+
backgroundColor: "#3b82f6",
|
|
18121
|
+
color: "#fff",
|
|
18122
|
+
border: "1px solid #fff"
|
|
18123
|
+
},
|
|
18124
|
+
secondary: {
|
|
18125
|
+
backgroundColor: "#EBF1FF",
|
|
18126
|
+
color: "#2597D0",
|
|
18127
|
+
border: "1px solid #35ADE9"
|
|
18128
|
+
},
|
|
18129
|
+
danger: {
|
|
18130
|
+
backgroundColor: "#FFEBEC",
|
|
18131
|
+
color: "#E93544",
|
|
18132
|
+
border: "1px solid #FB2B3D"
|
|
18133
|
+
},
|
|
18134
|
+
info: {
|
|
18135
|
+
backgroundColor: "rgba(5,152,237,0.12)",
|
|
18136
|
+
color: "rgb(5,152,237)",
|
|
18137
|
+
border: "1px solid rgb(5,152,237)"
|
|
18138
|
+
},
|
|
18139
|
+
success: {
|
|
18140
|
+
backgroundColor: "#E0FAEB",
|
|
18141
|
+
color: "#12AF53",
|
|
18142
|
+
border: "1px solid #1FC163"
|
|
18143
|
+
},
|
|
18144
|
+
warning: {
|
|
18145
|
+
backgroundColor: "#FFFAEB",
|
|
18146
|
+
color: "#E6A819",
|
|
18147
|
+
border: "1px solid #F6B51E"
|
|
18148
|
+
},
|
|
18149
|
+
default: {
|
|
18150
|
+
backgroundColor: "#dee2e6",
|
|
18151
|
+
color: "#000",
|
|
18152
|
+
border: "1px solid #000"
|
|
18153
|
+
},
|
|
18154
|
+
light: {
|
|
18155
|
+
backgroundColor: "#fff",
|
|
18156
|
+
color: "#1f2937",
|
|
18157
|
+
border: "1px solid #1f2937"
|
|
18158
|
+
}
|
|
18159
|
+
};
|
|
18160
|
+
var baseStyle = {
|
|
18161
|
+
borderRadius: "4px",
|
|
18162
|
+
fontSize: "12px",
|
|
18163
|
+
padding: "4px 8px",
|
|
18164
|
+
width: "fit-content",
|
|
18165
|
+
textAlign: "center",
|
|
18166
|
+
fontWeight: 500,
|
|
18167
|
+
cursor: "pointer",
|
|
18168
|
+
transition: "all 0.3s ease-in-out",
|
|
18169
|
+
height: "fit-content !important"
|
|
18170
|
+
};
|
|
18128
18171
|
var ButtonBadgeField = (props) => {
|
|
18129
18172
|
const { defaultValue, selection, value, formValues, domainHelper } = props;
|
|
18130
18173
|
const decorationSuccess = props["decoration-success"] && domainHelper.checkDomain(formValues, props["decoration-success"]);
|
|
@@ -18132,31 +18175,21 @@ var ButtonBadgeField = (props) => {
|
|
|
18132
18175
|
const decorationDanger = props["decoration-danger"] && domainHelper.checkDomain(formValues, props["decoration-danger"]);
|
|
18133
18176
|
const decorationWarning = props["decoration-warning"] && domainHelper.checkDomain(formValues, props["decoration-warning"]);
|
|
18134
18177
|
const getType = () => {
|
|
18135
|
-
if (decorationInfo)
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
if (
|
|
18139
|
-
return typeStyles["success"];
|
|
18140
|
-
}
|
|
18141
|
-
if (decorationDanger) {
|
|
18142
|
-
return typeStyles["danger"];
|
|
18143
|
-
}
|
|
18144
|
-
if (decorationWarning) {
|
|
18145
|
-
return typeStyles["warning"];
|
|
18146
|
-
}
|
|
18178
|
+
if (decorationInfo) return typeStyles["info"];
|
|
18179
|
+
if (decorationSuccess) return typeStyles["success"];
|
|
18180
|
+
if (decorationDanger) return typeStyles["danger"];
|
|
18181
|
+
if (decorationWarning) return typeStyles["warning"];
|
|
18147
18182
|
return typeStyles["default"];
|
|
18148
18183
|
};
|
|
18149
|
-
const baseStyle = "rounded-full text-xs px-[0.82rem] w-fit py-1 text-center font-medium cursor-pointer transition duration-300 ease-in-out transform";
|
|
18150
|
-
const buttonClass = `${baseStyle} ${getType()}`;
|
|
18151
18184
|
const getLabel = (value2) => {
|
|
18152
18185
|
if (!value2) return "";
|
|
18153
|
-
const item = selection?.find(
|
|
18154
|
-
|
|
18155
|
-
|
|
18186
|
+
const item = selection?.find(
|
|
18187
|
+
(item2) => Array.isArray(item2) && item2[0] === value2
|
|
18188
|
+
);
|
|
18156
18189
|
return item ? item[1] : "";
|
|
18157
18190
|
};
|
|
18158
18191
|
const label = getLabel(defaultValue ?? value);
|
|
18159
|
-
return label ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {
|
|
18192
|
+
return label ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { style: { ...baseStyle, ...getType() }, children: i18n_default.t(label) }) : null;
|
|
18160
18193
|
};
|
|
18161
18194
|
|
|
18162
18195
|
// src/widgets/basic/button-field/button.tsx
|
package/dist/widgets.mjs
CHANGED
|
@@ -5715,16 +5715,6 @@ var COLORS = [
|
|
|
5715
5715
|
}
|
|
5716
5716
|
];
|
|
5717
5717
|
var DOTS = "...";
|
|
5718
|
-
var typeStyles = {
|
|
5719
|
-
primary: "bg-blue-500 text-white",
|
|
5720
|
-
secondary: "bg-lime-600 text-white",
|
|
5721
|
-
danger: "bg-[rgba(237,28,36,0.1)] text-[#F5222D]",
|
|
5722
|
-
info: "bg-[rgba(5,152,237,0.12)] text-[rgb(5,152,237)]",
|
|
5723
|
-
success: "bg-[rgba(46,181,83,0.1)] text-[rgb(46,181,83)]",
|
|
5724
|
-
warning: "bg-[rgba(237,166,28,0.1)] text-[rgb(250,140,22)]",
|
|
5725
|
-
default: "bg-[#dee2e6]",
|
|
5726
|
-
light: "bg-white text-gray-800 shadow-md"
|
|
5727
|
-
};
|
|
5728
5718
|
var SearchType = {
|
|
5729
5719
|
FILTER: "filter_by",
|
|
5730
5720
|
SEARCH: "search_by",
|
|
@@ -18062,6 +18052,59 @@ var BinaryField = (props) => {
|
|
|
18062
18052
|
|
|
18063
18053
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
18064
18054
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
18055
|
+
var typeStyles = {
|
|
18056
|
+
primary: {
|
|
18057
|
+
backgroundColor: "#3b82f6",
|
|
18058
|
+
color: "#fff",
|
|
18059
|
+
border: "1px solid #fff"
|
|
18060
|
+
},
|
|
18061
|
+
secondary: {
|
|
18062
|
+
backgroundColor: "#EBF1FF",
|
|
18063
|
+
color: "#2597D0",
|
|
18064
|
+
border: "1px solid #35ADE9"
|
|
18065
|
+
},
|
|
18066
|
+
danger: {
|
|
18067
|
+
backgroundColor: "#FFEBEC",
|
|
18068
|
+
color: "#E93544",
|
|
18069
|
+
border: "1px solid #FB2B3D"
|
|
18070
|
+
},
|
|
18071
|
+
info: {
|
|
18072
|
+
backgroundColor: "rgba(5,152,237,0.12)",
|
|
18073
|
+
color: "rgb(5,152,237)",
|
|
18074
|
+
border: "1px solid rgb(5,152,237)"
|
|
18075
|
+
},
|
|
18076
|
+
success: {
|
|
18077
|
+
backgroundColor: "#E0FAEB",
|
|
18078
|
+
color: "#12AF53",
|
|
18079
|
+
border: "1px solid #1FC163"
|
|
18080
|
+
},
|
|
18081
|
+
warning: {
|
|
18082
|
+
backgroundColor: "#FFFAEB",
|
|
18083
|
+
color: "#E6A819",
|
|
18084
|
+
border: "1px solid #F6B51E"
|
|
18085
|
+
},
|
|
18086
|
+
default: {
|
|
18087
|
+
backgroundColor: "#dee2e6",
|
|
18088
|
+
color: "#000",
|
|
18089
|
+
border: "1px solid #000"
|
|
18090
|
+
},
|
|
18091
|
+
light: {
|
|
18092
|
+
backgroundColor: "#fff",
|
|
18093
|
+
color: "#1f2937",
|
|
18094
|
+
border: "1px solid #1f2937"
|
|
18095
|
+
}
|
|
18096
|
+
};
|
|
18097
|
+
var baseStyle = {
|
|
18098
|
+
borderRadius: "4px",
|
|
18099
|
+
fontSize: "12px",
|
|
18100
|
+
padding: "4px 8px",
|
|
18101
|
+
width: "fit-content",
|
|
18102
|
+
textAlign: "center",
|
|
18103
|
+
fontWeight: 500,
|
|
18104
|
+
cursor: "pointer",
|
|
18105
|
+
transition: "all 0.3s ease-in-out",
|
|
18106
|
+
height: "fit-content !important"
|
|
18107
|
+
};
|
|
18065
18108
|
var ButtonBadgeField = (props) => {
|
|
18066
18109
|
const { defaultValue, selection, value, formValues, domainHelper } = props;
|
|
18067
18110
|
const decorationSuccess = props["decoration-success"] && domainHelper.checkDomain(formValues, props["decoration-success"]);
|
|
@@ -18069,31 +18112,21 @@ var ButtonBadgeField = (props) => {
|
|
|
18069
18112
|
const decorationDanger = props["decoration-danger"] && domainHelper.checkDomain(formValues, props["decoration-danger"]);
|
|
18070
18113
|
const decorationWarning = props["decoration-warning"] && domainHelper.checkDomain(formValues, props["decoration-warning"]);
|
|
18071
18114
|
const getType = () => {
|
|
18072
|
-
if (decorationInfo)
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
if (
|
|
18076
|
-
return typeStyles["success"];
|
|
18077
|
-
}
|
|
18078
|
-
if (decorationDanger) {
|
|
18079
|
-
return typeStyles["danger"];
|
|
18080
|
-
}
|
|
18081
|
-
if (decorationWarning) {
|
|
18082
|
-
return typeStyles["warning"];
|
|
18083
|
-
}
|
|
18115
|
+
if (decorationInfo) return typeStyles["info"];
|
|
18116
|
+
if (decorationSuccess) return typeStyles["success"];
|
|
18117
|
+
if (decorationDanger) return typeStyles["danger"];
|
|
18118
|
+
if (decorationWarning) return typeStyles["warning"];
|
|
18084
18119
|
return typeStyles["default"];
|
|
18085
18120
|
};
|
|
18086
|
-
const baseStyle = "rounded-full text-xs px-[0.82rem] w-fit py-1 text-center font-medium cursor-pointer transition duration-300 ease-in-out transform";
|
|
18087
|
-
const buttonClass = `${baseStyle} ${getType()}`;
|
|
18088
18121
|
const getLabel = (value2) => {
|
|
18089
18122
|
if (!value2) return "";
|
|
18090
|
-
const item = selection?.find(
|
|
18091
|
-
|
|
18092
|
-
|
|
18123
|
+
const item = selection?.find(
|
|
18124
|
+
(item2) => Array.isArray(item2) && item2[0] === value2
|
|
18125
|
+
);
|
|
18093
18126
|
return item ? item[1] : "";
|
|
18094
18127
|
};
|
|
18095
18128
|
const label = getLabel(defaultValue ?? value);
|
|
18096
|
-
return label ? /* @__PURE__ */ jsx71("div", {
|
|
18129
|
+
return label ? /* @__PURE__ */ jsx71("div", { style: { ...baseStyle, ...getType() }, children: i18n_default.t(label) }) : null;
|
|
18097
18130
|
};
|
|
18098
18131
|
|
|
18099
18132
|
// src/widgets/basic/button-field/button.tsx
|