forstok-ui-lib 5.3.6 → 5.4.4
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.ts +108 -5
- package/dist/index.js +1044 -163
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1036 -155
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
- package/src/assets/images/icons/edit-white.svg +5 -0
- package/src/assets/images/icons/loading-red.svg +27 -0
- package/src/assets/javascripts/function.ts +319 -10
- package/src/assets/javascripts/helper.ts +47 -0
- package/src/assets/stylesheets/shares.styles.ts +168 -0
- package/src/components/button/styles.ts +13 -0
- package/src/components/index.ts +2 -0
- package/src/components/masterTable/index.tsx +649 -0
- package/src/components/masterTable/partials/datas/confirm.tsx +92 -0
- package/src/components/masterTable/partials/datas/index.tsx +81 -0
- package/src/components/masterTable/partials/editors/date.bare.tsx +39 -0
- package/src/components/masterTable/partials/editors/date.tsx +123 -0
- package/src/components/masterTable/partials/editors/image.tsx +61 -0
- package/src/components/masterTable/partials/editors/input.bare.tsx +127 -0
- package/src/components/masterTable/partials/editors/input.tsx +140 -0
- package/src/components/masterTable/partials/editors/label.tsx +128 -0
- package/src/components/masterTable/partials/editors/select.bare.tsx +104 -0
- package/src/components/masterTable/partials/editors/select.tsx +142 -0
- package/src/components/masterTable/partials/editors/switch.tsx +56 -0
- package/src/components/masterTable/partials/editors/tag.tsx +49 -0
- package/src/components/masterTable/partials/editors/textarea.tsx +7 -0
- package/src/components/masterTable/styles.tsx +1012 -0
- package/src/components/masterTable/typed.ts +87 -0
- package/src/components/switch/index.tsx +52 -0
- package/src/components/switch/styles.ts +34 -0
- package/src/declarations.d.ts +3 -1
- package/src/typeds/shares.typed.ts +56 -2
package/dist/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ type TFileImage = TFile & {
|
|
|
78
78
|
};
|
|
79
79
|
type TState<T> = Dispatch<SetStateAction<T>>;
|
|
80
80
|
|
|
81
|
-
type TInput$
|
|
81
|
+
type TInput$2 = InputHTMLAttributes<HTMLInputElement> & {
|
|
82
82
|
$mode?: string;
|
|
83
83
|
$isError?: boolean;
|
|
84
84
|
$iconLeft?: boolean;
|
|
@@ -95,7 +95,7 @@ type TInput$1 = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
95
95
|
evKeyUp?: TKeyboadEvent;
|
|
96
96
|
$aliasLabel?: string;
|
|
97
97
|
};
|
|
98
|
-
declare const InputComponent: ({ $mode, $aliasLabel, $isError, $iconLeft, $iconRight, reset, setReset, isForceUpdate, setForceUpdate, evChange, evBlur, isField, evChangeCustom, evEnter, evKeyUp, ...props }: TInput$
|
|
98
|
+
declare const InputComponent: ({ $mode, $aliasLabel, $isError, $iconLeft, $iconRight, reset, setReset, isForceUpdate, setForceUpdate, evChange, evBlur, isField, evChangeCustom, evEnter, evKeyUp, ...props }: TInput$2) => react_jsx_runtime.JSX.Element;
|
|
99
99
|
|
|
100
100
|
declare const InputWithRefComponent: react.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
|
|
101
101
|
$mode?: string;
|
|
@@ -104,7 +104,7 @@ declare const InputWithRefComponent: react.ForwardRefExoticComponent<InputHTMLAt
|
|
|
104
104
|
$isError?: boolean;
|
|
105
105
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
106
106
|
|
|
107
|
-
type TInput = InputHTMLAttributes<HTMLInputElement> & {
|
|
107
|
+
type TInput$1 = InputHTMLAttributes<HTMLInputElement> & {
|
|
108
108
|
evChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
109
109
|
$flow?: string;
|
|
110
110
|
extendKey?: string | null;
|
|
@@ -117,7 +117,7 @@ type TInput = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
117
117
|
$iconRight?: boolean;
|
|
118
118
|
'data-qa-id'?: string;
|
|
119
119
|
};
|
|
120
|
-
declare const CheckboxComponent: ({ id, name, children, $flow, extendKey, extendClass, reset, setReset, isForceUpdate, setForceUpdate, evChange, $isError, $iconRight, ...props }: PropsWithChildren<TInput>) => react_jsx_runtime.JSX.Element;
|
|
120
|
+
declare const CheckboxComponent: ({ id, name, children, $flow, extendKey, extendClass, reset, setReset, isForceUpdate, setForceUpdate, evChange, $isError, $iconRight, ...props }: PropsWithChildren<TInput$1>) => react_jsx_runtime.JSX.Element;
|
|
121
121
|
|
|
122
122
|
type TButton = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
123
123
|
children?: ReactNode;
|
|
@@ -241,6 +241,26 @@ type TImage = ImgHTMLAttributes<HTMLImageElement> & {
|
|
|
241
241
|
};
|
|
242
242
|
declare const ImageComponent: ({ $mode, ...props }: TImage) => react_jsx_runtime.JSX.Element;
|
|
243
243
|
|
|
244
|
+
type TAutoCopyObj = {
|
|
245
|
+
category: string;
|
|
246
|
+
copy: {
|
|
247
|
+
id: number;
|
|
248
|
+
accountIds: number[];
|
|
249
|
+
}[];
|
|
250
|
+
channelId?: number;
|
|
251
|
+
start?: {
|
|
252
|
+
accId: number;
|
|
253
|
+
id: number;
|
|
254
|
+
};
|
|
255
|
+
keys?: string[];
|
|
256
|
+
};
|
|
257
|
+
type TAutoCopy = TAutoCopyObj[];
|
|
258
|
+
type TCustomField = {
|
|
259
|
+
accountId: number;
|
|
260
|
+
header: any;
|
|
261
|
+
id: number;
|
|
262
|
+
};
|
|
263
|
+
|
|
244
264
|
type TUser = {
|
|
245
265
|
profile_id: number;
|
|
246
266
|
profile_name: string;
|
|
@@ -292,6 +312,58 @@ type TChannel = {
|
|
|
292
312
|
}[];
|
|
293
313
|
availableAPI?: boolean | null;
|
|
294
314
|
};
|
|
315
|
+
type THeadProps = {
|
|
316
|
+
key: string;
|
|
317
|
+
name: string;
|
|
318
|
+
fieldType: string;
|
|
319
|
+
validations?: TObject;
|
|
320
|
+
width: number;
|
|
321
|
+
typeData: string;
|
|
322
|
+
condition?: string;
|
|
323
|
+
type?: string;
|
|
324
|
+
bare?: boolean;
|
|
325
|
+
multiline?: boolean;
|
|
326
|
+
options?: TOption[];
|
|
327
|
+
isMassEditable?: boolean;
|
|
328
|
+
isMassClearable?: boolean;
|
|
329
|
+
value?: number;
|
|
330
|
+
schema?: string;
|
|
331
|
+
align?: any;
|
|
332
|
+
format?: string;
|
|
333
|
+
allowEmpty?: boolean;
|
|
334
|
+
customOptionKey?: string;
|
|
335
|
+
icon?: string;
|
|
336
|
+
initial?: string;
|
|
337
|
+
color?: string;
|
|
338
|
+
tip?: string;
|
|
339
|
+
placeholder?: string;
|
|
340
|
+
isHidden?: boolean;
|
|
341
|
+
showFormat?: string;
|
|
342
|
+
};
|
|
343
|
+
type TMasterProps = {
|
|
344
|
+
data: any;
|
|
345
|
+
setData: any;
|
|
346
|
+
headerColumns: THeadProps[];
|
|
347
|
+
evCreateMessage?: TMessageFunction;
|
|
348
|
+
evCreateMessageQuestion?: TMessageQuestionFunction;
|
|
349
|
+
type?: string;
|
|
350
|
+
isLessField?: boolean;
|
|
351
|
+
isForceUpdateField?: boolean;
|
|
352
|
+
setForceUpdateField?: TState<boolean>;
|
|
353
|
+
evOpenPopup?: TPopupOpenFunction;
|
|
354
|
+
autoCopy?: TAutoCopy;
|
|
355
|
+
setAutoCopy?: TState<TAutoCopy>;
|
|
356
|
+
isAutoCopyField?: boolean;
|
|
357
|
+
resultPopup?: TObject | null;
|
|
358
|
+
setResultPopup?: TState<TObject | null>;
|
|
359
|
+
evCheckAllValidation?: any;
|
|
360
|
+
dataCustomField?: TCustomField[];
|
|
361
|
+
setDataCustomField?: TState<TCustomField[]>;
|
|
362
|
+
isRemovable?: boolean;
|
|
363
|
+
isForceUpdate?: boolean;
|
|
364
|
+
setForceUpdate?: TState<boolean>;
|
|
365
|
+
evPickAll?: TMouseEvent;
|
|
366
|
+
};
|
|
295
367
|
|
|
296
368
|
type TOption = {
|
|
297
369
|
readonly value: any;
|
|
@@ -455,6 +527,17 @@ type TRadio = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
455
527
|
};
|
|
456
528
|
declare const RadioComponent: ({ children, $mode, evChange, ...props }: TRadio) => react_jsx_runtime.JSX.Element;
|
|
457
529
|
|
|
530
|
+
type TInput = InputHTMLAttributes<HTMLInputElement> & {
|
|
531
|
+
reset?: boolean;
|
|
532
|
+
setReset?: TState<boolean>;
|
|
533
|
+
isForceUpdate?: boolean;
|
|
534
|
+
setForceUpdate?: TState<boolean>;
|
|
535
|
+
evChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
536
|
+
};
|
|
537
|
+
declare const SwitchComponent: ({ isForceUpdate, setForceUpdate, reset, setReset, evChange, ...props }: TInput) => react_jsx_runtime.JSX.Element;
|
|
538
|
+
|
|
539
|
+
declare const MasterTableComponent: (props: TMasterProps) => react_jsx_runtime.JSX.Element;
|
|
540
|
+
|
|
458
541
|
declare const FormContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<styled_components.FastOmit<styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>>, never>, {
|
|
459
542
|
name?: string;
|
|
460
543
|
}>> & string;
|
|
@@ -545,6 +628,17 @@ declare const InputGroup: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
545
628
|
$required?: boolean;
|
|
546
629
|
}>> & string;
|
|
547
630
|
declare const BoxContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
631
|
+
declare const BulkActionWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
632
|
+
$isOpen?: boolean;
|
|
633
|
+
}>> & string;
|
|
634
|
+
declare const InitialContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
635
|
+
declare const MasterTableActionWrapper: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
636
|
+
$mode?: string;
|
|
637
|
+
}>> & string;
|
|
638
|
+
declare const FigureWraper: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
639
|
+
$size?: string;
|
|
640
|
+
$mode?: string;
|
|
641
|
+
}>> & string;
|
|
548
642
|
|
|
549
643
|
declare const getStorage: (name: string, type?: string, defaultVal?: any, loadName?: string) => any;
|
|
550
644
|
declare const setStorage: (name: string, value?: any, only?: string) => false | undefined;
|
|
@@ -552,6 +646,7 @@ declare const removeStorage: (name: string) => boolean;
|
|
|
552
646
|
declare const debounce: (fn: Function, ms?: number) => (this: any, ...args: any[]) => void;
|
|
553
647
|
declare const capitalize: (value?: string) => string;
|
|
554
648
|
declare const formatNumber: (n?: string | number, flag?: boolean) => string;
|
|
649
|
+
declare const IsNumeric: (val?: any) => boolean;
|
|
555
650
|
declare const generateMessage: (type: string, value: string | ReactNode, callback?: () => void, timer?: number) => TMessage;
|
|
556
651
|
declare const generateMessageQuestion: (type: string, title: string, subtitle: string, callback?: () => void, buttonSubmit?: string, cancelCallback?: () => void) => TMessageQuestion;
|
|
557
652
|
declare const currencyNumber: (value: number) => string;
|
|
@@ -560,9 +655,17 @@ declare const getSizeContainer: (full?: boolean) => {
|
|
|
560
655
|
width: number;
|
|
561
656
|
height: number;
|
|
562
657
|
};
|
|
658
|
+
declare const generateValueTable: (input: string | number, key: string) => string | number;
|
|
659
|
+
declare const generateValue: (type: string, value: any) => any;
|
|
660
|
+
declare const validateByApproveJs: (head: TObject, value: any, title?: string, valueMatch?: any) => TObject;
|
|
661
|
+
declare const evGenerateValueMatch: (validation?: TObject, data?: any) => any;
|
|
662
|
+
declare const unescapeHTML: (value?: string) => string;
|
|
563
663
|
|
|
564
664
|
declare const dateRangeStatus: (value: string) => any;
|
|
565
665
|
declare const dateRangeDays: (value: string) => any;
|
|
666
|
+
declare const pageMasterTable: (value: string) => "" | "master" | "listing" | "stock" | "promotion" | "payment" | "picklist";
|
|
667
|
+
declare const errorTitle: (name: string) => string;
|
|
668
|
+
declare const colorCommonQuantity: (value: number) => "green" | "red";
|
|
566
669
|
|
|
567
670
|
declare const configDateRange: {
|
|
568
671
|
rangeDate: string;
|
|
@@ -572,4 +675,4 @@ declare const configDateRange: {
|
|
|
572
675
|
minDate: string;
|
|
573
676
|
};
|
|
574
677
|
|
|
575
|
-
export { BoxContainer, BreadcrumbContainer, ButtonComponent, CheckboxComponent, ContentLoaderAccountsList, ContentLoaderActivityList, ContentLoaderAddition, ContentLoaderAnalyticsMenu, ContentLoaderCategoryList, ContentLoaderChatAccounts, ContentLoaderChatMessages, ContentLoaderChatProducts, ContentLoaderChatStores, ContentLoaderDashboardCard, ContentLoaderEditBundle, ContentLoaderFilterCategories, ContentLoaderFilters, ContentLoaderInvoiceListPaymentreceiveDetail, ContentLoaderMasterBundleDetail, ContentLoaderMasterDetail, ContentLoaderMasterList, ContentLoaderMasterListingDetail, ContentLoaderNonOrderList, ContentLoaderNotifUpdate, ContentLoaderOneLinePromotion, ContentLoaderOnlyBodyDashboardCard, ContentLoaderOnlyBodyTableList, ContentLoaderOnlyHeaderTableList, ContentLoaderOrderDetail, ContentLoaderOrderList, ContentLoaderPagination, ContentLoaderPopupBundle, ContentLoaderPopupChooseStore, ContentLoaderPopupLinkedListing, ContentLoaderPopupListOrder, ContentLoaderPopupPaymentReceive, ContentLoaderPopupPaymentReceived, ContentLoaderPopupPicklist, ContentLoaderPopupReadyToShip, ContentLoaderPopupStoreSelect, ContentLoaderPromotionHover, ContentLoaderReportingDashboard, ContentLoaderSetting, ContentLoaderTableList, DateComponent, DateTimeComponent, DropDownComponent as DropdownComponent, ErrorComponent, FoContainer, FormContainer, HeaderContainer, IconComponent, ImageComponent, InfoGroup, InputComponent, InputGroup, InputWithRefComponent as InputRefComponent, type KeysToSnakeCase, LabelComponent, LinkComponent, ListContainer, LoadingComponent, MenuList, MessageComponent, MessageQuestionComponent, MuteLabel, PanelContainer, PanelWrapper, type PartialBy, PopupComponent, RadioComponent, ReactPortalComponent, SelectComponent, SingleFormContainer, type TActionMeta, type TCSSObject, type TCSSObjectWithLabel, type TChangeEvent, type TChannel, type TCloseDropdownFunction, type TControlProps, type TCustomStyles, type TDragEvent, type TDropdown, type TEnterEvent, type TFile, type TFileImage, type TGroupBase, type THierarchy, type TIdNum, type TIdStr, type TKeyboadEvent, type TLoadOption, type TMessage, type TMessageFunction, type TMessageQuestion, type TMessageQuestionFunction, type TMouseEvent, type TObject, type TOnChangeValue, type TOnChangeValueFalse, type TOption, type TOptionProps, type TPage, type TPopup, type TPopupContainer, type TPopupFunction, type TPopupFunctionGroup, type TPopupFunctionParam, type TPopupOpenFunction, type TSelectAsyncPaginate, type TState, type TUser, TabsContainer, TabsContent, TextAreaComponent, TextAreaWithRefComponent as TextAreaRefComponent, TextComponent, Title, UploadComponent, UploadDragDropComponent, type WithRequired, boxBase, capitalize, clearList, configDateRange, currencyNumber, dateRangeDays, dateRangeStatus, debounce, dropBase, elipsis, evUpdateInputRc, formLabel, formatNumber, generateMessage, generateMessageQuestion, getSizeContainer, getStorage, headTable, multiElipsis, removeStorage, responseWidth, setStorage, thirdElipsis };
|
|
678
|
+
export { BoxContainer, BreadcrumbContainer, BulkActionWrapper, ButtonComponent, CheckboxComponent, ContentLoaderAccountsList, ContentLoaderActivityList, ContentLoaderAddition, ContentLoaderAnalyticsMenu, ContentLoaderCategoryList, ContentLoaderChatAccounts, ContentLoaderChatMessages, ContentLoaderChatProducts, ContentLoaderChatStores, ContentLoaderDashboardCard, ContentLoaderEditBundle, ContentLoaderFilterCategories, ContentLoaderFilters, ContentLoaderInvoiceListPaymentreceiveDetail, ContentLoaderMasterBundleDetail, ContentLoaderMasterDetail, ContentLoaderMasterList, ContentLoaderMasterListingDetail, ContentLoaderNonOrderList, ContentLoaderNotifUpdate, ContentLoaderOneLinePromotion, ContentLoaderOnlyBodyDashboardCard, ContentLoaderOnlyBodyTableList, ContentLoaderOnlyHeaderTableList, ContentLoaderOrderDetail, ContentLoaderOrderList, ContentLoaderPagination, ContentLoaderPopupBundle, ContentLoaderPopupChooseStore, ContentLoaderPopupLinkedListing, ContentLoaderPopupListOrder, ContentLoaderPopupPaymentReceive, ContentLoaderPopupPaymentReceived, ContentLoaderPopupPicklist, ContentLoaderPopupReadyToShip, ContentLoaderPopupStoreSelect, ContentLoaderPromotionHover, ContentLoaderReportingDashboard, ContentLoaderSetting, ContentLoaderTableList, DateComponent, DateTimeComponent, DropDownComponent as DropdownComponent, ErrorComponent, FigureWraper, FoContainer, FormContainer, HeaderContainer, IconComponent, ImageComponent, InfoGroup, InitialContainer, InputComponent, InputGroup, InputWithRefComponent as InputRefComponent, IsNumeric, type KeysToSnakeCase, LabelComponent, LinkComponent, ListContainer, LoadingComponent, MasterTableActionWrapper, MasterTableComponent, MenuList, MessageComponent, MessageQuestionComponent, MuteLabel, PanelContainer, PanelWrapper, type PartialBy, PopupComponent, RadioComponent, ReactPortalComponent, SelectComponent, SingleFormContainer, SwitchComponent, type TActionMeta, type TCSSObject, type TCSSObjectWithLabel, type TChangeEvent, type TChannel, type TCloseDropdownFunction, type TControlProps, type TCustomStyles, type TDragEvent, type TDropdown, type TEnterEvent, type TFile, type TFileImage, type TGroupBase, type THeadProps, type THierarchy, type TIdNum, type TIdStr, type TKeyboadEvent, type TLoadOption, type TMasterProps, type TMessage, type TMessageFunction, type TMessageQuestion, type TMessageQuestionFunction, type TMouseEvent, type TObject, type TOnChangeValue, type TOnChangeValueFalse, type TOption, type TOptionProps, type TPage, type TPopup, type TPopupContainer, type TPopupFunction, type TPopupFunctionGroup, type TPopupFunctionParam, type TPopupOpenFunction, type TSelectAsyncPaginate, type TState, type TUser, TabsContainer, TabsContent, TextAreaComponent, TextAreaWithRefComponent as TextAreaRefComponent, TextComponent, Title, UploadComponent, UploadDragDropComponent, type WithRequired, boxBase, capitalize, clearList, colorCommonQuantity, configDateRange, currencyNumber, dateRangeDays, dateRangeStatus, debounce, dropBase, elipsis, errorTitle, evGenerateValueMatch, evUpdateInputRc, formLabel, formatNumber, generateMessage, generateMessageQuestion, generateValue, generateValueTable, getSizeContainer, getStorage, headTable, multiElipsis, pageMasterTable, removeStorage, responseWidth, setStorage, thirdElipsis, unescapeHTML, validateByApproveJs };
|