forstok-ui-lib 8.5.1 → 8.5.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.d.ts CHANGED
@@ -191,7 +191,7 @@ type TOption = {
191
191
  readonly label: string;
192
192
  readonly name?: string;
193
193
  readonly isFixed?: boolean;
194
- readonly channel?: Omit<TChannel, 'stores'>;
194
+ readonly channel?: Omit<TChannel, "stores">;
195
195
  postalCode?: string;
196
196
  localId?: string;
197
197
  isDisabled?: boolean | null;
@@ -209,8 +209,9 @@ type TOption = {
209
209
  imageUrl?: string | null;
210
210
  warehouse?: TWarehouseAddons[] | null;
211
211
  };
212
+ detail?: any;
212
213
  } & TskuAddons;
213
- type TLoadOption = (search: string, callback: () => void, { endCursor }: {
214
+ type TLoadOption = (search: string, callback: () => void, { endCursor, }: {
214
215
  endCursor: string;
215
216
  }) => Promise<{
216
217
  options: any;
@@ -233,9 +234,9 @@ type TSelectAsyncPaginate = {
233
234
  evChange?: (newValue: TOnChangeValue, actionMeta?: ActionMeta<TOption>) => void;
234
235
  defaultValue?: TOnChangeValue;
235
236
  loadOptionsOnMenuOpen?: boolean;
236
- noOptionsMessage?: ((obj: {
237
+ noOptionsMessage?: (obj: {
237
238
  inputValue: string;
238
- }) => React.ReactNode);
239
+ }) => React.ReactNode;
239
240
  isSearchable?: boolean;
240
241
  isClearable?: boolean;
241
242
  placeholder?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "8.5.1",
3
+ "version": "8.5.2",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -1,118 +1,147 @@
1
- import type { ActionMeta, OnChangeValue, SingleValueProps } from 'react-select';
2
- import type { OptionProps, GroupBase, StylesConfig, CSSObjectWithLabel, ControlProps, ValueContainerProps, MultiValueProps, MultiValue, OptionsOrGroups, MenuListProps } from 'react-select';
3
- import type { Response } from 'react-select-async-paginate';
4
- import type { Moment } from 'moment';
5
- import type { CSSObject } from '@emotion/serialize'
6
- import type { TChannel } from '../../typeds/shares.typed';
7
- import type { TState } from '../../typeds';
1
+ import type { ActionMeta, OnChangeValue, SingleValueProps } from "react-select";
2
+ import type {
3
+ OptionProps,
4
+ GroupBase,
5
+ StylesConfig,
6
+ CSSObjectWithLabel,
7
+ ControlProps,
8
+ ValueContainerProps,
9
+ MultiValueProps,
10
+ MultiValue,
11
+ OptionsOrGroups,
12
+ MenuListProps,
13
+ } from "react-select";
14
+ import type { Response } from "react-select-async-paginate";
15
+ import type { Moment } from "moment";
16
+ import type { CSSObject } from "@emotion/serialize";
17
+ import type { TChannel } from "../../typeds/shares.typed";
18
+ import type { TState } from "../../typeds";
8
19
 
9
20
  type TskuAddons = {
10
- id?: number
11
- productId?: number
12
- masterProductId?: string
13
- imageUrl?: string
14
- sku?: string
15
- price?: number
16
- quantity?: number
17
- salePrice?: number
18
- }
21
+ id?: number;
22
+ productId?: number;
23
+ masterProductId?: string;
24
+ imageUrl?: string;
25
+ sku?: string;
26
+ price?: number;
27
+ quantity?: number;
28
+ salePrice?: number;
29
+ };
19
30
 
20
31
  type TWarehouseAddons = {
21
- id?: number
22
- newId?: string | null
23
- name?: string
24
- } | null
32
+ id?: number;
33
+ newId?: string | null;
34
+ name?: string;
35
+ } | null;
25
36
 
26
37
  export type TOption = {
27
- readonly value: any
28
- readonly label: string
29
- readonly name?: string
30
- readonly isFixed?: boolean
31
- readonly channel?: Omit<TChannel, 'stores'>
32
- postalCode?: string
33
- localId?: string
34
- isDisabled?: boolean | null
35
- momentValue?: Moment[]
38
+ readonly value: any;
39
+ readonly label: string;
40
+ readonly name?: string;
41
+ readonly isFixed?: boolean;
42
+ readonly channel?: Omit<TChannel, "stores">;
43
+ postalCode?: string;
44
+ localId?: string;
45
+ isDisabled?: boolean | null;
46
+ momentValue?: Moment[];
36
47
  option?: {
37
- readonly value: any
38
- readonly label: string
39
- localId?: string
40
- }[]
48
+ readonly value: any;
49
+ readonly label: string;
50
+ localId?: string;
51
+ }[];
41
52
  store?: {
42
- id: number
43
- name: string
44
- warehouseId?: Array<string | null> | null
45
- warehouseCount?: number | null
46
- imageUrl?: string | null,
47
- warehouse?: TWarehouseAddons[] | null
48
- }
49
- } & TskuAddons
50
-
51
- export type TLoadOption = (search: string, callback: () => void, { endCursor }: {
52
- endCursor: string;
53
- }) => Promise<{
54
- options: any;
55
- hasMore: any;
56
- additional?: {
57
- endCursor: any;
53
+ id: number;
54
+ name: string;
55
+ warehouseId?: Array<string | null> | null;
56
+ warehouseCount?: number | null;
57
+ imageUrl?: string | null;
58
+ warehouse?: TWarehouseAddons[] | null;
58
59
  };
59
- } | {
60
- options: never[];
61
- hasMore: boolean;
62
- additional?: undefined;
63
- } | undefined>
64
-
65
- export type TOnChangeValue = OnChangeValue<TOption, boolean>
66
-
67
- export type TOnChangeValueFalse = OnChangeValue<TOption, false>
68
-
69
- export type TOnChangeValueTrue = OnChangeValue<TOption, true>
70
-
71
- export type TActionMeta = ActionMeta<TOption>
60
+ detail?: any;
61
+ } & TskuAddons;
62
+
63
+ export type TLoadOption = (
64
+ search: string,
65
+ callback: () => void,
66
+ {
67
+ endCursor,
68
+ }: {
69
+ endCursor: string;
70
+ },
71
+ ) => Promise<
72
+ | {
73
+ options: any;
74
+ hasMore: any;
75
+ additional?: {
76
+ endCursor: any;
77
+ };
78
+ }
79
+ | {
80
+ options: never[];
81
+ hasMore: boolean;
82
+ additional?: undefined;
83
+ }
84
+ | undefined
85
+ >;
86
+
87
+ export type TOnChangeValue = OnChangeValue<TOption, boolean>;
88
+
89
+ export type TOnChangeValueFalse = OnChangeValue<TOption, false>;
90
+
91
+ export type TOnChangeValueTrue = OnChangeValue<TOption, true>;
92
+
93
+ export type TActionMeta = ActionMeta<TOption>;
72
94
 
73
95
  export type TSelectAsyncPaginate = {
74
- customOption?: (arg0: OptionProps) => void
75
- MenuList?: any
76
- evChange?: (newValue: TOnChangeValue, actionMeta?: ActionMeta<TOption>) => void
77
- defaultValue?: TOnChangeValue
96
+ customOption?: (arg0: OptionProps) => void;
97
+ MenuList?: any;
98
+ evChange?: (
99
+ newValue: TOnChangeValue,
100
+ actionMeta?: ActionMeta<TOption>,
101
+ ) => void;
102
+ defaultValue?: TOnChangeValue;
78
103
  // loadOptions: TLoadOption | LoadOptions<unknown, GroupBase<unknown>, unknown>
79
- loadOptionsOnMenuOpen?: boolean
80
- noOptionsMessage?: ((obj: {
81
- inputValue: string;
82
- }) => React.ReactNode)
83
- isSearchable?: boolean
84
- isClearable?: boolean
85
- placeholder?: string
86
- isMenuOpen?: boolean
87
- setMenuIsOpen: TState<boolean|undefined>
88
- isForceUpdate: boolean
89
- setForceUpdate: TState<boolean>
90
- }
104
+ loadOptionsOnMenuOpen?: boolean;
105
+ noOptionsMessage?: (obj: { inputValue: string }) => React.ReactNode;
106
+ isSearchable?: boolean;
107
+ isClearable?: boolean;
108
+ placeholder?: string;
109
+ isMenuOpen?: boolean;
110
+ setMenuIsOpen: TState<boolean | undefined>;
111
+ isForceUpdate: boolean;
112
+ setForceUpdate: TState<boolean>;
113
+ };
91
114
 
92
- export type TCustomStylesWithVariable = StylesConfig<TOption, boolean>
115
+ export type TCustomStylesWithVariable = StylesConfig<TOption, boolean>;
93
116
 
94
- export type TCSSObject = CSSObject
117
+ export type TCSSObject = CSSObject;
95
118
 
96
- export type TCSSObjectWithLabel = CSSObjectWithLabel
119
+ export type TCSSObjectWithLabel = CSSObjectWithLabel;
97
120
 
98
- export type TControlPropsWithVariable = ControlProps<TOption, boolean>
121
+ export type TControlPropsWithVariable = ControlProps<TOption, boolean>;
99
122
 
100
- export type TOptionPropsWithVariable = OptionProps<TOption, boolean>
123
+ export type TOptionPropsWithVariable = OptionProps<TOption, boolean>;
101
124
 
102
- export type TGroupBaseWithVariable = GroupBase<TOption>
125
+ export type TGroupBaseWithVariable = GroupBase<TOption>;
103
126
 
104
- export type TSingleValueProps = SingleValueProps
127
+ export type TSingleValueProps = SingleValueProps;
105
128
 
106
- export type TOptionProps = OptionProps
129
+ export type TOptionProps = OptionProps;
107
130
 
108
- export type TValueContainerPropsWithVariable = ValueContainerProps<TOption, boolean>
131
+ export type TValueContainerPropsWithVariable = ValueContainerProps<
132
+ TOption,
133
+ boolean
134
+ >;
109
135
 
110
- export type TMultiValuePropsWithVariable = MultiValueProps<TOption, boolean>
136
+ export type TMultiValuePropsWithVariable = MultiValueProps<TOption, boolean>;
111
137
 
112
- export type TMultiValue = MultiValue<TOption>
138
+ export type TMultiValue = MultiValue<TOption>;
113
139
 
114
- export type TOptionsOrGroupsWithVariable = OptionsOrGroups<TOption, GroupBase<TOption>>
140
+ export type TOptionsOrGroupsWithVariable = OptionsOrGroups<
141
+ TOption,
142
+ GroupBase<TOption>
143
+ >;
115
144
 
116
- export type TMenuListProps = MenuListProps
145
+ export type TMenuListProps = MenuListProps;
117
146
 
118
- export type TResponseAsync = Response<unknown, TGroupBaseWithVariable, unknown>
147
+ export type TResponseAsync = Response<unknown, TGroupBaseWithVariable, unknown>;