forstok-ui-lib 5.0.3 → 5.1.1

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { HTMLAttributes, ReactNode, AnchorHTMLAttributes, MouseEvent, Dispatch, SetStateAction, KeyboardEvent, FocusEvent, ChangeEvent, DragEvent, InputHTMLAttributes, PropsWithChildren, ButtonHTMLAttributes, RefObject, ImgHTMLAttributes } from 'react';
4
+ import { OptionProps, SingleValueProps, OnChangeValue, ActionMeta } from 'react-select';
4
5
  import * as styled_components from 'styled-components';
5
6
  import * as styled_components_dist_types from 'styled-components/dist/types';
6
7
 
@@ -76,7 +77,7 @@ type TFileImage = TFile & {
76
77
  type TState<T> = Dispatch<SetStateAction<T>>;
77
78
 
78
79
  type TInput$1 = InputHTMLAttributes<HTMLInputElement> & {
79
- mode?: string;
80
+ $mode?: string;
80
81
  $isError?: boolean;
81
82
  $iconLeft?: boolean;
82
83
  $iconRight?: boolean;
@@ -90,8 +91,16 @@ type TInput$1 = InputHTMLAttributes<HTMLInputElement> & {
90
91
  evChangeCustom?: (key: string, value: any) => void;
91
92
  evEnter?: TEnterEvent;
92
93
  evKeyUp?: TKeyboadEvent;
94
+ $aliasLabel?: string;
93
95
  };
94
- declare const InputComponent: ({ mode, $isError, $iconLeft, $iconRight, reset, setReset, isForceUpdate, setForceUpdate, evChange, evBlur, isField, evChangeCustom, evEnter, evKeyUp, ...props }: TInput$1) => react_jsx_runtime.JSX.Element;
96
+ declare const InputComponent: ({ $mode, $aliasLabel, $isError, $iconLeft, $iconRight, reset, setReset, isForceUpdate, setForceUpdate, evChange, evBlur, isField, evChangeCustom, evEnter, evKeyUp, ...props }: TInput$1) => react_jsx_runtime.JSX.Element;
97
+
98
+ declare const InputWithRefComponent: react.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
99
+ $mode?: string;
100
+ $iconLeft?: boolean;
101
+ $iconRight?: boolean;
102
+ $isError?: boolean;
103
+ } & react.RefAttributes<HTMLInputElement>>;
95
104
 
96
105
  type TInput = InputHTMLAttributes<HTMLInputElement> & {
97
106
  evChange?: (e: ChangeEvent<HTMLInputElement>) => void;
@@ -230,6 +239,106 @@ type TImage = ImgHTMLAttributes<HTMLImageElement> & {
230
239
  };
231
240
  declare const ImageComponent: ({ $mode, ...props }: TImage) => react_jsx_runtime.JSX.Element;
232
241
 
242
+ type TUser = {
243
+ profile_id: number;
244
+ profile_name: string;
245
+ id: number;
246
+ username: string;
247
+ email: string;
248
+ freshchat_restore_id: string | number | null;
249
+ credentials: {
250
+ aws_access_key: string;
251
+ aws_secret_access_key: string;
252
+ aws_bucket_name: string;
253
+ aws_region: string;
254
+ chat_token: string;
255
+ shopee_partner_id: string;
256
+ shopee_partner_key: string;
257
+ };
258
+ has_access_orderV1: boolean;
259
+ };
260
+ type THierarchy = {
261
+ evTooglePopup?: TPopupFunction;
262
+ evCreateMessage?: TMessageFunction;
263
+ evForcePopUp?: TPopupFunction;
264
+ isOpenPopup: boolean;
265
+ modePopup: string;
266
+ pathPopup: string;
267
+ actionPopup: string;
268
+ detailPopup?: TObject;
269
+ evOpenPopup?: TPopupOpenFunction;
270
+ evCloseDropdown?: TCloseDropdownFunction;
271
+ evCreateMessageQuestion?: TMessageQuestionFunction;
272
+ };
273
+ type TChannel = {
274
+ channelName?: string;
275
+ channelInitials?: string;
276
+ channelColor?: string;
277
+ channelImage?: string;
278
+ channelId?: number;
279
+ name?: string | null;
280
+ initials?: string | null;
281
+ color?: string | null;
282
+ icon?: string | null;
283
+ id?: number | null;
284
+ totalStores?: number;
285
+ Stores?: {
286
+ id?: number;
287
+ storeName?: string;
288
+ storeImage?: string;
289
+ storeImageName?: string;
290
+ }[];
291
+ availableAPI?: boolean | null;
292
+ };
293
+
294
+ type TOption = {
295
+ readonly value: any;
296
+ readonly label: string;
297
+ readonly name?: string;
298
+ readonly isFixed?: boolean;
299
+ readonly channel?: Omit<TChannel, 'stores'>;
300
+ postalCode?: string;
301
+ localId?: string;
302
+ option?: {
303
+ readonly value: any;
304
+ readonly label: string;
305
+ localId?: string;
306
+ }[];
307
+ };
308
+
309
+ type TSelect = {
310
+ type?: string;
311
+ mode?: string;
312
+ isError?: boolean;
313
+ name?: string;
314
+ customOption?: (arg0: OptionProps) => void;
315
+ customLabel?: (arg0: SingleValueProps) => void;
316
+ MenuList?: any;
317
+ isCreateable?: boolean;
318
+ isClearable?: boolean;
319
+ selectKey?: string;
320
+ disabled?: boolean;
321
+ width?: string | number;
322
+ reset?: boolean;
323
+ setReset?: TState<boolean>;
324
+ isForceUpdate?: boolean;
325
+ setForceUpdate?: TState<boolean>;
326
+ isCheckAutoCopy?: boolean;
327
+ isField?: boolean;
328
+ isMulti?: boolean;
329
+ evCreate?: (value: string) => void;
330
+ evChange?: (newValue: OnChangeValue<TOption, boolean>, actionMeta?: ActionMeta<TOption>) => void;
331
+ evChangeCustom?: (key: string, value: any) => void;
332
+ defaultValue?: OnChangeValue<TOption, boolean>;
333
+ options: TOption[] | null;
334
+ isMinOption?: boolean;
335
+ placeholder?: string;
336
+ 'data-qa-id'?: string;
337
+ removeMessage?: TObject;
338
+ evCreateMessageQuestion?: TMessageQuestionFunction;
339
+ };
340
+ declare const SelectComponent: ({ type, isError, mode, customOption, customLabel, MenuList, isCreateable, isClearable, selectKey, disabled, defaultValue, width, reset, setReset, isForceUpdate, setForceUpdate, isCheckAutoCopy, evChangeCustom, isField, evCreate, evChange, isMinOption, isMulti, options, name, placeholder, removeMessage, evCreateMessageQuestion, ...props }: TSelect) => react_jsx_runtime.JSX.Element;
341
+
233
342
  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>, {
234
343
  name?: string;
235
344
  }>> & string;
@@ -263,36 +372,4 @@ declare const TabsContent: styled_components_dist_types.IStyledComponentBase<"we
263
372
  declare const FoContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
264
373
  declare const InfoGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
265
374
 
266
- type TUser = {
267
- profile_id: number;
268
- profile_name: string;
269
- id: number;
270
- username: string;
271
- email: string;
272
- freshchat_restore_id: string | number | null;
273
- credentials: {
274
- aws_access_key: string;
275
- aws_secret_access_key: string;
276
- aws_bucket_name: string;
277
- aws_region: string;
278
- chat_token: string;
279
- shopee_partner_id: string;
280
- shopee_partner_key: string;
281
- };
282
- has_access_orderV1: boolean;
283
- };
284
- type THierarchy = {
285
- evTooglePopup?: TPopupFunction;
286
- evCreateMessage?: TMessageFunction;
287
- evForcePopUp?: TPopupFunction;
288
- isOpenPopup: boolean;
289
- modePopup: string;
290
- pathPopup: string;
291
- actionPopup: string;
292
- detailPopup?: TObject;
293
- evOpenPopup?: TPopupOpenFunction;
294
- evCloseDropdown?: TCloseDropdownFunction;
295
- evCreateMessageQuestion?: TMessageQuestionFunction;
296
- };
297
-
298
- export { ButtonComponent, CheckboxComponent, DropDownComponent as DropdownComponent, FoContainer, FormContainer, HeaderContainer, IconComponent, ImageComponent, InfoGroup, InputComponent, type KeysToSnakeCase, LabelComponent, LinkComponent, ListContainer, LoadingComponent, MessageComponent, MessageQuestionComponent, PanelContainer, PanelWrapper, type PartialBy, PopupComponent, ReactPortalComponent, SingleFormContainer, type TChangeEvent, type TCloseDropdownFunction, type TDragEvent, type TDropdown, type TEnterEvent, type TFile, type TFileImage, type THierarchy, type TIdNum, type TIdStr, type TKeyboadEvent, type TMessage, type TMessageFunction, type TMessageQuestion, type TMessageQuestionFunction, type TMouseEvent, type TObject, type TPage, type TPopup, type TPopupContainer, type TPopupFunction, type TPopupFunctionGroup, type TPopupFunctionParam, type TPopupOpenFunction, type TState, type TUser, TabsContainer, TabsContent, TextComponent, Title, type WithRequired, boxBase, clearList, dropBase, elipsis, formLabel, headTable, multiElipsis, responseWidth, thirdElipsis };
375
+ export { ButtonComponent, CheckboxComponent, DropDownComponent as DropdownComponent, FoContainer, FormContainer, HeaderContainer, IconComponent, ImageComponent, InfoGroup, InputComponent, InputWithRefComponent as InputRefComponent, type KeysToSnakeCase, LabelComponent, LinkComponent, ListContainer, LoadingComponent, MessageComponent, MessageQuestionComponent, PanelContainer, PanelWrapper, type PartialBy, PopupComponent, ReactPortalComponent, SelectComponent, SingleFormContainer, type TChangeEvent, type TChannel, type TCloseDropdownFunction, type TDragEvent, type TDropdown, type TEnterEvent, type TFile, type TFileImage, type THierarchy, type TIdNum, type TIdStr, type TKeyboadEvent, type TMessage, type TMessageFunction, type TMessageQuestion, type TMessageQuestionFunction, type TMouseEvent, type TObject, type TPage, type TPopup, type TPopupContainer, type TPopupFunction, type TPopupFunctionGroup, type TPopupFunctionParam, type TPopupOpenFunction, type TState, type TUser, TabsContainer, TabsContent, TextComponent, Title, type WithRequired, boxBase, clearList, dropBase, elipsis, formLabel, headTable, multiElipsis, responseWidth, thirdElipsis };