@true-engineering/true-react-common-ui-kit 3.9.0 → 3.9.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/LICENSE +201 -201
- package/README.md +6 -0
- package/dist/true-react-common-ui-kit.js +61 -60
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +61 -60
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountInfo/AccountInfo.stories.tsx +32 -32
- package/src/components/AccountInfo/AccountInfo.tsx +80 -80
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/AddButton/AddButton.tsx +52 -52
- package/src/components/Button/Button.stories.tsx +56 -56
- package/src/components/Button/Button.tsx +129 -129
- package/src/components/Checkbox/Checkbox.stories.tsx +28 -28
- package/src/components/CloseButton/CloseButton.tsx +34 -34
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/DateInput/DateInput.tsx +90 -90
- package/src/components/DateInput/constants.ts +2 -2
- package/src/components/DatePicker/DatePicker.tsx +308 -308
- package/src/components/Description/Description.stories.tsx +27 -27
- package/src/components/Description/Description.tsx +61 -61
- package/src/components/FiltersPane/FiltersPane.tsx +158 -158
- package/src/components/FiltersPane/components/Filter/Filter.tsx +203 -203
- package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +166 -166
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +210 -210
- package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +177 -177
- package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +167 -167
- package/src/components/Flag/Flag.stories.tsx +29 -29
- package/src/components/Flag/Flag.tsx +26 -26
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +267 -267
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +110 -110
- package/src/components/FlexibleTable/FlexibleTable.tsx +271 -271
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +38 -38
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +83 -83
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +25 -25
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +196 -196
- package/src/components/FlexibleTable/helpers.ts +13 -13
- package/src/components/FlexibleTable/types.ts +52 -52
- package/src/components/Icon/Icon.stories.tsx +86 -86
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/IncrementInput/IncrementInput.tsx +105 -105
- package/src/components/Input/Input.tsx +297 -297
- package/src/components/Input/types.ts +32 -32
- package/src/components/List/List.stories.tsx +70 -70
- package/src/components/List/List.tsx +33 -33
- package/src/components/List/components/ListItem/ListItem.tsx +57 -57
- package/src/components/Modal/Modal.stories.tsx +105 -105
- package/src/components/Modal/Modal.tsx +196 -196
- package/src/components/MoreMenu/MoreMenu.styles.ts +68 -68
- package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
- package/src/components/MultiSelect/MultiSelect.tsx +106 -106
- package/src/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.tsx +53 -53
- package/src/components/MultiSelectList/MultiSelectList.tsx +461 -461
- package/src/components/Notification/Notification.stories.tsx +46 -46
- package/src/components/Notification/Notification.tsx +69 -69
- package/src/components/NumberInput/NumberInput.tsx +137 -137
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.tsx +214 -214
- package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +155 -155
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
- package/src/components/RadioButton/RadioButton.tsx +57 -57
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/Select/CustomSelect.stories.tsx +217 -217
- package/src/components/Select/MultiSelect.stories.tsx +240 -240
- package/src/components/Select/Select.stories.tsx +235 -235
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/types.ts +1 -1
- package/src/components/Selector/Selector.stories.tsx +62 -62
- package/src/components/Selector/Selector.styles.ts +164 -164
- package/src/components/Selector/Selector.tsx +115 -115
- package/src/components/Selector/index.ts +2 -2
- package/src/components/Selector/types.ts +12 -12
- package/src/components/Skeleton/Skeleton.stories.tsx +19 -19
- package/src/components/SmartInput/SmartInput.tsx +134 -134
- package/src/components/Status/Status.stories.tsx +73 -73
- package/src/components/Status/Status.styles.ts +143 -143
- package/src/components/Status/Status.tsx +49 -49
- package/src/components/Status/constants.ts +11 -11
- package/src/components/Status/index.ts +3 -3
- package/src/components/Status/types.ts +5 -5
- package/src/components/Switch/Switch.stories.tsx +40 -40
- package/src/components/Switch/Switch.tsx +75 -75
- package/src/components/TextArea/TextArea.tsx +180 -180
- package/src/components/TextButton/TextButton.stories.tsx +46 -46
- package/src/components/TextButton/TextButton.styles.ts +129 -129
- package/src/components/TextButton/TextButton.tsx +103 -103
- package/src/components/TextButton/index.ts +4 -4
- package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
- package/src/components/TextWithInfo/TextWithInfo.tsx +62 -62
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
- package/src/components/ThemedPreloader/ThemedPreloader.tsx +54 -54
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/Toaster/Toaster.stories.tsx +30 -30
- package/src/components/Toaster/Toaster.tsx +108 -108
- package/src/components/Tooltip/Tooltip.stories.tsx +19 -19
- package/src/components/Tooltip/Tooltip.tsx +35 -35
- package/src/components/Tooltip/types.ts +1 -1
- package/src/components/WithPopup/WithPopup.tsx +1 -0
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/hooks/use-dropdown.ts +84 -84
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/theme/helpers.ts +76 -76
- package/src/vite-env.d.ts +1 -1
|
@@ -1,267 +1,267 @@
|
|
|
1
|
-
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
-
import { FlexibleTable } from './FlexibleTable';
|
|
3
|
-
import { IFlexibleTableConfigType, IValueComponent } from './types';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Table/FlexibleTable',
|
|
7
|
-
component: FlexibleTable,
|
|
8
|
-
} as ComponentMeta<typeof FlexibleTable>;
|
|
9
|
-
|
|
10
|
-
interface ITableContent {
|
|
11
|
-
contractCode: string;
|
|
12
|
-
validFrom: Date;
|
|
13
|
-
validTo: Date;
|
|
14
|
-
title: string;
|
|
15
|
-
signDate: Date;
|
|
16
|
-
partner: string;
|
|
17
|
-
partnerDescription: string;
|
|
18
|
-
parentContract: string;
|
|
19
|
-
currency: string;
|
|
20
|
-
status: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const Temp: IValueComponent<ITableContent, string> = ({ value }) => <>{value}</>;
|
|
24
|
-
|
|
25
|
-
const config: IFlexibleTableConfigType<ITableContent> = {
|
|
26
|
-
contractCode: {
|
|
27
|
-
title: 'Contract Code',
|
|
28
|
-
},
|
|
29
|
-
title: {
|
|
30
|
-
component: Temp,
|
|
31
|
-
title: 'Title',
|
|
32
|
-
minWidth: 320,
|
|
33
|
-
},
|
|
34
|
-
validFrom: {
|
|
35
|
-
title: 'Valid From',
|
|
36
|
-
},
|
|
37
|
-
validTo: {
|
|
38
|
-
title: 'Valid From',
|
|
39
|
-
},
|
|
40
|
-
signDate: {
|
|
41
|
-
title: 'Sign Date',
|
|
42
|
-
},
|
|
43
|
-
partner: {
|
|
44
|
-
component: Temp,
|
|
45
|
-
title: 'Partner',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const content: ITableContent[] = [
|
|
50
|
-
{
|
|
51
|
-
contractCode: 'SOME_CODE',
|
|
52
|
-
validFrom: new Date('2015-05-18'),
|
|
53
|
-
validTo: new Date('2020-05-18'),
|
|
54
|
-
title: 'Название',
|
|
55
|
-
signDate: new Date('2020-05-18'),
|
|
56
|
-
partner: 'SE_00206_CR',
|
|
57
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
58
|
-
parentContract: '',
|
|
59
|
-
currency: 'RUR',
|
|
60
|
-
status: 'Active',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
contractCode: 'SOME_CODE',
|
|
64
|
-
validFrom: new Date('2015-05-18'),
|
|
65
|
-
validTo: new Date('2020-05-18'),
|
|
66
|
-
title: 'Название',
|
|
67
|
-
signDate: new Date('2020-05-18'),
|
|
68
|
-
partner: 'SE_00168_CR',
|
|
69
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
70
|
-
parentContract: '',
|
|
71
|
-
currency: 'RUR',
|
|
72
|
-
status: 'Active',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
contractCode: 'SOME_CODE',
|
|
76
|
-
validFrom: new Date('2015-05-18'),
|
|
77
|
-
validTo: new Date('2020-05-18'),
|
|
78
|
-
title: 'Название',
|
|
79
|
-
signDate: new Date('2020-05-18'),
|
|
80
|
-
partner: 'SE_00206_CR',
|
|
81
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
82
|
-
parentContract: '',
|
|
83
|
-
currency: 'U00',
|
|
84
|
-
status: 'Active',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
contractCode: 'SOME_CODE_1',
|
|
88
|
-
validFrom: new Date('2015-05-18'),
|
|
89
|
-
validTo: new Date('2020-05-18'),
|
|
90
|
-
title: 'Название',
|
|
91
|
-
signDate: new Date('2020-05-18'),
|
|
92
|
-
partner: 'SE_00168_CR',
|
|
93
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
94
|
-
parentContract: 'PARENT/CONTRACT',
|
|
95
|
-
currency: 'RUR',
|
|
96
|
-
status: 'Active',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
contractCode: 'SOME_CODE',
|
|
100
|
-
validFrom: new Date('2015-05-18'),
|
|
101
|
-
validTo: new Date('2020-05-18'),
|
|
102
|
-
title: 'Название',
|
|
103
|
-
signDate: new Date('2020-05-18'),
|
|
104
|
-
partner: 'SE_00206_CR',
|
|
105
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
106
|
-
parentContract: 'PARENT/CONTRACT',
|
|
107
|
-
currency: 'RUR',
|
|
108
|
-
status: 'Active',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
contractCode: 'SOME_CODE',
|
|
112
|
-
validFrom: new Date('2015-05-18'),
|
|
113
|
-
validTo: new Date('2020-05-18'),
|
|
114
|
-
title: 'Название',
|
|
115
|
-
signDate: new Date('2020-05-18'),
|
|
116
|
-
partner: 'SE_00168_CR',
|
|
117
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
118
|
-
parentContract: 'PARENT/CONTRACT',
|
|
119
|
-
currency: 'RUR',
|
|
120
|
-
status: 'Active',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
contractCode: 'SOME_CODE',
|
|
124
|
-
validFrom: new Date('2015-05-18'),
|
|
125
|
-
validTo: new Date('2020-05-18'),
|
|
126
|
-
title: 'Название',
|
|
127
|
-
signDate: new Date('2020-05-18'),
|
|
128
|
-
partner: 'SE_00206_CR',
|
|
129
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
130
|
-
parentContract: '',
|
|
131
|
-
currency: 'U00',
|
|
132
|
-
status: 'Active',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
contractCode: 'SOME_CODE',
|
|
136
|
-
validFrom: new Date('2015-05-18'),
|
|
137
|
-
validTo: new Date('2020-05-18'),
|
|
138
|
-
title: 'Название',
|
|
139
|
-
signDate: new Date('2020-05-18'),
|
|
140
|
-
partner: 'SE_00168_CR',
|
|
141
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
142
|
-
parentContract: 'PARENT/CONTRACT',
|
|
143
|
-
currency: 'RUR',
|
|
144
|
-
status: 'Active',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
contractCode: 'SOME_CODE',
|
|
148
|
-
validFrom: new Date('2015-05-18'),
|
|
149
|
-
validTo: new Date('2020-05-18'),
|
|
150
|
-
title: 'Название',
|
|
151
|
-
signDate: new Date('2020-05-18'),
|
|
152
|
-
partner: 'SE_00206_CR',
|
|
153
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
154
|
-
parentContract: '',
|
|
155
|
-
currency: 'U00',
|
|
156
|
-
status: 'Active',
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
contractCode: 'SOME_CODE',
|
|
160
|
-
validFrom: new Date('2015-05-18'),
|
|
161
|
-
validTo: new Date('2020-05-18'),
|
|
162
|
-
title: 'Название',
|
|
163
|
-
signDate: new Date('2020-05-18'),
|
|
164
|
-
partner: 'SE_00206_CR',
|
|
165
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
166
|
-
parentContract: '',
|
|
167
|
-
currency: 'U00',
|
|
168
|
-
status: 'Active',
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
contractCode: 'SOME_CODE',
|
|
172
|
-
validFrom: new Date('2015-05-18'),
|
|
173
|
-
validTo: new Date('2020-05-18'),
|
|
174
|
-
title: 'Название',
|
|
175
|
-
signDate: new Date('2020-05-18'),
|
|
176
|
-
partner: 'SE_00206_CR',
|
|
177
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
178
|
-
parentContract: '',
|
|
179
|
-
currency: 'U00',
|
|
180
|
-
status: 'Active',
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
contractCode: 'SOME_CODE',
|
|
184
|
-
validFrom: new Date('2015-05-18'),
|
|
185
|
-
validTo: new Date('2020-05-18'),
|
|
186
|
-
title: 'Название',
|
|
187
|
-
signDate: new Date('2020-05-18'),
|
|
188
|
-
partner: 'SE_00206_CR',
|
|
189
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
190
|
-
parentContract: '',
|
|
191
|
-
currency: 'U00',
|
|
192
|
-
status: 'Active',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
contractCode: 'OB_UT_M119',
|
|
196
|
-
validFrom: new Date('2015-05-18'),
|
|
197
|
-
validTo: new Date('2020-05-18'),
|
|
198
|
-
title: 'Название',
|
|
199
|
-
signDate: new Date('2020-05-18'),
|
|
200
|
-
partner: 'SE_00206_CR',
|
|
201
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
202
|
-
parentContract: '',
|
|
203
|
-
currency: 'U00',
|
|
204
|
-
status: 'Active',
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
contractCode: 'SOME_CODE',
|
|
208
|
-
validFrom: new Date('2015-05-18'),
|
|
209
|
-
validTo: new Date('2020-05-18'),
|
|
210
|
-
title: 'Название',
|
|
211
|
-
signDate: new Date('2020-05-18'),
|
|
212
|
-
partner: 'SE_00206_CR',
|
|
213
|
-
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
214
|
-
parentContract: '',
|
|
215
|
-
currency: 'U00',
|
|
216
|
-
status: 'Active',
|
|
217
|
-
},
|
|
218
|
-
];
|
|
219
|
-
|
|
220
|
-
const Template: ComponentStory<typeof FlexibleTable<ITableContent>> = (args) => (
|
|
221
|
-
<div style={{ width: 500, overflow: 'auto' }}>
|
|
222
|
-
<FlexibleTable<ITableContent>
|
|
223
|
-
{...args}
|
|
224
|
-
config={config}
|
|
225
|
-
content={content}
|
|
226
|
-
rowAttributes={['contractCode']}
|
|
227
|
-
expandableRowComponent={(_0, _1, close) => (
|
|
228
|
-
<div onClick={close}>
|
|
229
|
-
всем привет :)
|
|
230
|
-
<br />
|
|
231
|
-
Нажми на меня, чтобы закрыть
|
|
232
|
-
</div>
|
|
233
|
-
)}
|
|
234
|
-
/>
|
|
235
|
-
</div>
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
export const Default = Template.bind({});
|
|
239
|
-
|
|
240
|
-
Default.args = {
|
|
241
|
-
isLoading: false,
|
|
242
|
-
isFirstColumnSticky: true,
|
|
243
|
-
isHorizontallyScrollable: true,
|
|
244
|
-
isExpandableRowComponentInitiallyOpen: false,
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
Default.argTypes = {
|
|
248
|
-
isExpandableRowComponentInitiallyOpen: { control: 'boolean' },
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
Default.parameters = {
|
|
252
|
-
controls: {
|
|
253
|
-
exclude: [
|
|
254
|
-
'data',
|
|
255
|
-
'testId',
|
|
256
|
-
'content',
|
|
257
|
-
'config',
|
|
258
|
-
'rowAttributes',
|
|
259
|
-
'headerContent',
|
|
260
|
-
'tweakStyles',
|
|
261
|
-
'onHeadClick',
|
|
262
|
-
'onRowClick',
|
|
263
|
-
'onRowHover',
|
|
264
|
-
'expandableRowComponent',
|
|
265
|
-
],
|
|
266
|
-
},
|
|
267
|
-
};
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { FlexibleTable } from './FlexibleTable';
|
|
3
|
+
import { IFlexibleTableConfigType, IValueComponent } from './types';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Table/FlexibleTable',
|
|
7
|
+
component: FlexibleTable,
|
|
8
|
+
} as ComponentMeta<typeof FlexibleTable>;
|
|
9
|
+
|
|
10
|
+
interface ITableContent {
|
|
11
|
+
contractCode: string;
|
|
12
|
+
validFrom: Date;
|
|
13
|
+
validTo: Date;
|
|
14
|
+
title: string;
|
|
15
|
+
signDate: Date;
|
|
16
|
+
partner: string;
|
|
17
|
+
partnerDescription: string;
|
|
18
|
+
parentContract: string;
|
|
19
|
+
currency: string;
|
|
20
|
+
status: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const Temp: IValueComponent<ITableContent, string> = ({ value }) => <>{value}</>;
|
|
24
|
+
|
|
25
|
+
const config: IFlexibleTableConfigType<ITableContent> = {
|
|
26
|
+
contractCode: {
|
|
27
|
+
title: 'Contract Code',
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
component: Temp,
|
|
31
|
+
title: 'Title',
|
|
32
|
+
minWidth: 320,
|
|
33
|
+
},
|
|
34
|
+
validFrom: {
|
|
35
|
+
title: 'Valid From',
|
|
36
|
+
},
|
|
37
|
+
validTo: {
|
|
38
|
+
title: 'Valid From',
|
|
39
|
+
},
|
|
40
|
+
signDate: {
|
|
41
|
+
title: 'Sign Date',
|
|
42
|
+
},
|
|
43
|
+
partner: {
|
|
44
|
+
component: Temp,
|
|
45
|
+
title: 'Partner',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const content: ITableContent[] = [
|
|
50
|
+
{
|
|
51
|
+
contractCode: 'SOME_CODE',
|
|
52
|
+
validFrom: new Date('2015-05-18'),
|
|
53
|
+
validTo: new Date('2020-05-18'),
|
|
54
|
+
title: 'Название',
|
|
55
|
+
signDate: new Date('2020-05-18'),
|
|
56
|
+
partner: 'SE_00206_CR',
|
|
57
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
58
|
+
parentContract: '',
|
|
59
|
+
currency: 'RUR',
|
|
60
|
+
status: 'Active',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
contractCode: 'SOME_CODE',
|
|
64
|
+
validFrom: new Date('2015-05-18'),
|
|
65
|
+
validTo: new Date('2020-05-18'),
|
|
66
|
+
title: 'Название',
|
|
67
|
+
signDate: new Date('2020-05-18'),
|
|
68
|
+
partner: 'SE_00168_CR',
|
|
69
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
70
|
+
parentContract: '',
|
|
71
|
+
currency: 'RUR',
|
|
72
|
+
status: 'Active',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
contractCode: 'SOME_CODE',
|
|
76
|
+
validFrom: new Date('2015-05-18'),
|
|
77
|
+
validTo: new Date('2020-05-18'),
|
|
78
|
+
title: 'Название',
|
|
79
|
+
signDate: new Date('2020-05-18'),
|
|
80
|
+
partner: 'SE_00206_CR',
|
|
81
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
82
|
+
parentContract: '',
|
|
83
|
+
currency: 'U00',
|
|
84
|
+
status: 'Active',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
contractCode: 'SOME_CODE_1',
|
|
88
|
+
validFrom: new Date('2015-05-18'),
|
|
89
|
+
validTo: new Date('2020-05-18'),
|
|
90
|
+
title: 'Название',
|
|
91
|
+
signDate: new Date('2020-05-18'),
|
|
92
|
+
partner: 'SE_00168_CR',
|
|
93
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
94
|
+
parentContract: 'PARENT/CONTRACT',
|
|
95
|
+
currency: 'RUR',
|
|
96
|
+
status: 'Active',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
contractCode: 'SOME_CODE',
|
|
100
|
+
validFrom: new Date('2015-05-18'),
|
|
101
|
+
validTo: new Date('2020-05-18'),
|
|
102
|
+
title: 'Название',
|
|
103
|
+
signDate: new Date('2020-05-18'),
|
|
104
|
+
partner: 'SE_00206_CR',
|
|
105
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
106
|
+
parentContract: 'PARENT/CONTRACT',
|
|
107
|
+
currency: 'RUR',
|
|
108
|
+
status: 'Active',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
contractCode: 'SOME_CODE',
|
|
112
|
+
validFrom: new Date('2015-05-18'),
|
|
113
|
+
validTo: new Date('2020-05-18'),
|
|
114
|
+
title: 'Название',
|
|
115
|
+
signDate: new Date('2020-05-18'),
|
|
116
|
+
partner: 'SE_00168_CR',
|
|
117
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
118
|
+
parentContract: 'PARENT/CONTRACT',
|
|
119
|
+
currency: 'RUR',
|
|
120
|
+
status: 'Active',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
contractCode: 'SOME_CODE',
|
|
124
|
+
validFrom: new Date('2015-05-18'),
|
|
125
|
+
validTo: new Date('2020-05-18'),
|
|
126
|
+
title: 'Название',
|
|
127
|
+
signDate: new Date('2020-05-18'),
|
|
128
|
+
partner: 'SE_00206_CR',
|
|
129
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
130
|
+
parentContract: '',
|
|
131
|
+
currency: 'U00',
|
|
132
|
+
status: 'Active',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
contractCode: 'SOME_CODE',
|
|
136
|
+
validFrom: new Date('2015-05-18'),
|
|
137
|
+
validTo: new Date('2020-05-18'),
|
|
138
|
+
title: 'Название',
|
|
139
|
+
signDate: new Date('2020-05-18'),
|
|
140
|
+
partner: 'SE_00168_CR',
|
|
141
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
142
|
+
parentContract: 'PARENT/CONTRACT',
|
|
143
|
+
currency: 'RUR',
|
|
144
|
+
status: 'Active',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
contractCode: 'SOME_CODE',
|
|
148
|
+
validFrom: new Date('2015-05-18'),
|
|
149
|
+
validTo: new Date('2020-05-18'),
|
|
150
|
+
title: 'Название',
|
|
151
|
+
signDate: new Date('2020-05-18'),
|
|
152
|
+
partner: 'SE_00206_CR',
|
|
153
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
154
|
+
parentContract: '',
|
|
155
|
+
currency: 'U00',
|
|
156
|
+
status: 'Active',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
contractCode: 'SOME_CODE',
|
|
160
|
+
validFrom: new Date('2015-05-18'),
|
|
161
|
+
validTo: new Date('2020-05-18'),
|
|
162
|
+
title: 'Название',
|
|
163
|
+
signDate: new Date('2020-05-18'),
|
|
164
|
+
partner: 'SE_00206_CR',
|
|
165
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
166
|
+
parentContract: '',
|
|
167
|
+
currency: 'U00',
|
|
168
|
+
status: 'Active',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
contractCode: 'SOME_CODE',
|
|
172
|
+
validFrom: new Date('2015-05-18'),
|
|
173
|
+
validTo: new Date('2020-05-18'),
|
|
174
|
+
title: 'Название',
|
|
175
|
+
signDate: new Date('2020-05-18'),
|
|
176
|
+
partner: 'SE_00206_CR',
|
|
177
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
178
|
+
parentContract: '',
|
|
179
|
+
currency: 'U00',
|
|
180
|
+
status: 'Active',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
contractCode: 'SOME_CODE',
|
|
184
|
+
validFrom: new Date('2015-05-18'),
|
|
185
|
+
validTo: new Date('2020-05-18'),
|
|
186
|
+
title: 'Название',
|
|
187
|
+
signDate: new Date('2020-05-18'),
|
|
188
|
+
partner: 'SE_00206_CR',
|
|
189
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
190
|
+
parentContract: '',
|
|
191
|
+
currency: 'U00',
|
|
192
|
+
status: 'Active',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
contractCode: 'OB_UT_M119',
|
|
196
|
+
validFrom: new Date('2015-05-18'),
|
|
197
|
+
validTo: new Date('2020-05-18'),
|
|
198
|
+
title: 'Название',
|
|
199
|
+
signDate: new Date('2020-05-18'),
|
|
200
|
+
partner: 'SE_00206_CR',
|
|
201
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
202
|
+
parentContract: '',
|
|
203
|
+
currency: 'U00',
|
|
204
|
+
status: 'Active',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
contractCode: 'SOME_CODE',
|
|
208
|
+
validFrom: new Date('2015-05-18'),
|
|
209
|
+
validTo: new Date('2020-05-18'),
|
|
210
|
+
title: 'Название',
|
|
211
|
+
signDate: new Date('2020-05-18'),
|
|
212
|
+
partner: 'SE_00206_CR',
|
|
213
|
+
partnerDescription: 'TEST PARTNER DESCRIPTION',
|
|
214
|
+
parentContract: '',
|
|
215
|
+
currency: 'U00',
|
|
216
|
+
status: 'Active',
|
|
217
|
+
},
|
|
218
|
+
];
|
|
219
|
+
|
|
220
|
+
const Template: ComponentStory<typeof FlexibleTable<ITableContent>> = (args) => (
|
|
221
|
+
<div style={{ width: 500, overflow: 'auto' }}>
|
|
222
|
+
<FlexibleTable<ITableContent>
|
|
223
|
+
{...args}
|
|
224
|
+
config={config}
|
|
225
|
+
content={content}
|
|
226
|
+
rowAttributes={['contractCode']}
|
|
227
|
+
expandableRowComponent={(_0, _1, close) => (
|
|
228
|
+
<div onClick={close}>
|
|
229
|
+
всем привет :)
|
|
230
|
+
<br />
|
|
231
|
+
Нажми на меня, чтобы закрыть
|
|
232
|
+
</div>
|
|
233
|
+
)}
|
|
234
|
+
/>
|
|
235
|
+
</div>
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
export const Default = Template.bind({});
|
|
239
|
+
|
|
240
|
+
Default.args = {
|
|
241
|
+
isLoading: false,
|
|
242
|
+
isFirstColumnSticky: true,
|
|
243
|
+
isHorizontallyScrollable: true,
|
|
244
|
+
isExpandableRowComponentInitiallyOpen: false,
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
Default.argTypes = {
|
|
248
|
+
isExpandableRowComponentInitiallyOpen: { control: 'boolean' },
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
Default.parameters = {
|
|
252
|
+
controls: {
|
|
253
|
+
exclude: [
|
|
254
|
+
'data',
|
|
255
|
+
'testId',
|
|
256
|
+
'content',
|
|
257
|
+
'config',
|
|
258
|
+
'rowAttributes',
|
|
259
|
+
'headerContent',
|
|
260
|
+
'tweakStyles',
|
|
261
|
+
'onHeadClick',
|
|
262
|
+
'onRowClick',
|
|
263
|
+
'onRowHover',
|
|
264
|
+
'expandableRowComponent',
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
};
|