@iress-oss/ids-mcp-server 5.14.2 → 5.20.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/generated/docs/components_components-alert-docs.md +492 -0
- package/generated/docs/components_components-autocomplete-docs.md +3485 -0
- package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +32 -14
- package/generated/docs/{components-badge-docs.md → components_components-badge-docs.md} +222 -30
- package/generated/docs/components_components-button-docs.md +2078 -0
- package/generated/docs/components_components-button-recipes-docs.md +37 -0
- package/generated/docs/components_components-buttongroup-docs.md +1045 -0
- package/generated/docs/components_components-card-docs.md +2276 -0
- package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +131 -14
- package/generated/docs/components_components-checkbox-docs.md +1054 -0
- package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1000 -81
- package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +101 -11
- package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
- package/generated/docs/components_components-combobox-docs.md +3767 -0
- package/generated/docs/{components-container-docs.md → components_components-container-docs.md} +61 -24
- package/generated/docs/{components-divider-docs.md → components_components-divider-docs.md} +83 -24
- package/generated/docs/{components-expander-docs.md → components_components-expander-docs.md} +264 -33
- package/generated/docs/{components-field-docs.md → components_components-field-docs.md} +814 -120
- package/generated/docs/components_components-filter-docs.md +4080 -0
- package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1488 -358
- package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +174 -64
- package/generated/docs/components_components-hide-docs.md +293 -0
- package/generated/docs/components_components-icon-docs.md +1337 -0
- package/generated/docs/{components-inline-docs.md → components_components-inline-docs.md} +462 -42
- package/generated/docs/components_components-input-docs.md +1468 -0
- package/generated/docs/components_components-input-recipes-docs.md +367 -0
- package/generated/docs/components_components-inputcurrency-docs.md +432 -0
- package/generated/docs/{components-inputcurrency-recipes-docs.md → components_components-inputcurrency-recipes-docs.md} +110 -17
- package/generated/docs/components_components-label-docs.md +323 -0
- package/generated/docs/components_components-menu-docs.md +2345 -0
- package/generated/docs/components_components-menu-menuitem-docs.md +633 -0
- package/generated/docs/{components-modal-docs.md → components_components-modal-docs.md} +1625 -232
- package/generated/docs/components_components-navbar-docs.md +1847 -0
- package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +697 -39
- package/generated/docs/{components-panel-docs.md → components_components-panel-docs.md} +754 -57
- package/generated/docs/components_components-placeholder-docs.md +92 -0
- package/generated/docs/components_components-popover-docs.md +1641 -0
- package/generated/docs/{components-popover-recipes-docs.md → components_components-popover-recipes-docs.md} +347 -17
- package/generated/docs/components_components-progress-docs.md +115 -0
- package/generated/docs/components_components-provider-docs.md +114 -0
- package/generated/docs/components_components-radio-docs.md +491 -0
- package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +943 -75
- package/generated/docs/components_components-readonly-docs.md +263 -0
- package/generated/docs/components_components-richselect-docs.md +6497 -0
- package/generated/docs/{components-row-docs.md → components_components-row-docs.md} +353 -43
- package/generated/docs/{components-select-docs.md → components_components-select-docs.md} +719 -61
- package/generated/docs/components_components-skeleton-docs.md +480 -0
- package/generated/docs/{components-skeleton-recipes-docs.md → components_components-skeleton-recipes-docs.md} +50 -10
- package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
- package/generated/docs/components_components-slideout-docs.md +2262 -0
- package/generated/docs/components_components-slider-docs.md +1276 -0
- package/generated/docs/components_components-spinner-docs.md +82 -0
- package/generated/docs/{components-stack-docs.md → components_components-stack-docs.md} +223 -40
- package/generated/docs/components_components-table-docs.md +3651 -0
- package/generated/docs/components_components-tabset-docs.md +772 -0
- package/generated/docs/components_components-tabset-tab-docs.md +262 -0
- package/generated/docs/components_components-tag-docs.md +259 -0
- package/generated/docs/{components-text-docs.md → components_components-text-docs.md} +491 -51
- package/generated/docs/{components-toaster-docs.md → components_components-toaster-docs.md} +224 -71
- package/generated/docs/components_components-toaster-toast-docs.md +634 -0
- package/generated/docs/components_components-toggle-docs.md +461 -0
- package/generated/docs/{components-tooltip-docs.md → components_components-tooltip-docs.md} +286 -41
- package/generated/docs/{components-validationmessage-docs.md → components_components-validationmessage-docs.md} +230 -61
- package/generated/docs/components_contact-us-docs.md +12 -0
- package/generated/docs/{foundations-accessibility-docs.md → components_foundations-accessibility-docs.md} +11 -21
- package/generated/docs/{foundations-colours-docs.md → components_foundations-colour-030-colours.md} +8 -15
- package/generated/docs/{foundations-consistency-docs.md → components_foundations-consistency-docs.md} +12 -20
- package/generated/docs/{foundations-content-docs.md → components_foundations-content-docs.md} +6 -11
- package/generated/docs/components_foundations-introduction-docs.md +15 -0
- package/generated/docs/{foundations-principles-docs.md → components_foundations-principles-docs.md} +14 -24
- package/generated/docs/components_foundations-typography-docs.md +608 -0
- package/generated/docs/{foundations-user-experience-docs.md → components_foundations-user-experience-docs.md} +16 -26
- package/generated/docs/{foundations-visual-design-docs.md → components_foundations-visual-design-docs.md} +10 -17
- package/generated/docs/{frequently-asked-questions-docs.md → components_frequently-asked-questions-docs.md} +14 -23
- package/generated/docs/components_get-started-develop-docs.md +84 -0
- package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
- package/generated/docs/components_introduction-docs.md +15 -0
- package/generated/docs/{patterns-loading-docs.md → components_patterns-loading-docs.md} +711 -143
- package/generated/docs/components_resources-changelog-docs.md +4 -0
- package/generated/docs/{resources-code-katas-docs.md → components_resources-code-katas-docs.md} +5 -9
- package/generated/docs/{resources-migration-guides-from-v4-to-v5-docs.md → components_resources-migration-guides-from-v4-to-v5-docs.md} +54 -239
- package/generated/docs/{versions-docs.md → components_versions-docs.md} +5 -8
- package/generated/docs/guidelines.md +484 -200
- package/generated/docs/introduction-docs.md +19 -30
- package/package.json +41 -45
- package/generated/docs/components-alert-docs.md +0 -130
- package/generated/docs/components-autocomplete-docs.md +0 -754
- package/generated/docs/components-button-docs.md +0 -362
- package/generated/docs/components-button-recipes-docs.md +0 -76
- package/generated/docs/components-buttongroup-docs.md +0 -310
- package/generated/docs/components-card-docs.md +0 -494
- package/generated/docs/components-checkbox-docs.md +0 -193
- package/generated/docs/components-combobox-docs.md +0 -1016
- package/generated/docs/components-filter-docs.md +0 -1109
- package/generated/docs/components-hide-docs.md +0 -265
- package/generated/docs/components-icon-docs.md +0 -553
- package/generated/docs/components-input-docs.md +0 -335
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -157
- package/generated/docs/components-label-docs.md +0 -135
- package/generated/docs/components-menu-docs.md +0 -704
- package/generated/docs/components-menu-menuitem-docs.md +0 -193
- package/generated/docs/components-navbar-docs.md +0 -291
- package/generated/docs/components-placeholder-docs.md +0 -27
- package/generated/docs/components-popover-docs.md +0 -464
- package/generated/docs/components-progress-docs.md +0 -104
- package/generated/docs/components-radio-docs.md +0 -107
- package/generated/docs/components-readonly-docs.md +0 -89
- package/generated/docs/components-richselect-docs.md +0 -2433
- package/generated/docs/components-skeleton-docs.md +0 -214
- package/generated/docs/components-slideout-docs.md +0 -538
- package/generated/docs/components-slider-docs.md +0 -346
- package/generated/docs/components-spinner-docs.md +0 -59
- package/generated/docs/components-table-ag-grid-docs.md +0 -2666
- package/generated/docs/components-table-docs.md +0 -1305
- package/generated/docs/components-tabset-docs.md +0 -341
- package/generated/docs/components-tabset-tab-docs.md +0 -86
- package/generated/docs/components-tag-docs.md +0 -115
- package/generated/docs/components-toaster-toast-docs.md +0 -157
- package/generated/docs/components-toggle-docs.md +0 -158
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -288
- package/generated/docs/extensions-editor-recipes-docs.md +0 -39
- package/generated/docs/foundations-introduction-docs.md +0 -17
- package/generated/docs/foundations-typography-docs.md +0 -191
- package/generated/docs/get-started-develop-docs.md +0 -48
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/resources-changelog-docs.md +0 -6
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/themes-tokens-docs.md +0 -1200
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,2666 +0,0 @@
|
|
|
1
|
-
[](#ag-grid)AG Grid
|
|
2
|
-
===================
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
AG Grid is the preferred solution for complex tables.
|
|
8
|
-
|
|
9
|
-
1 to 3 of 3. Page 1 of 1
|
|
10
|
-
|
|
11
|
-
Drag here to set row groups
|
|
12
|
-
|
|
13
|
-
Drag here to set column labels
|
|
14
|
-
|
|
15
|
-
Make
|
|
16
|
-
|
|
17
|
-
Model
|
|
18
|
-
|
|
19
|
-
Price
|
|
20
|
-
|
|
21
|
-
Electric
|
|
22
|
-
|
|
23
|
-
Order
|
|
24
|
-
|
|
25
|
-
Tesla
|
|
26
|
-
|
|
27
|
-
Model Y
|
|
28
|
-
|
|
29
|
-
$64,950
|
|
30
|
-
|
|
31
|
-
Order
|
|
32
|
-
|
|
33
|
-
Ford
|
|
34
|
-
|
|
35
|
-
F-Series
|
|
36
|
-
|
|
37
|
-
$33,850
|
|
38
|
-
|
|
39
|
-
Order
|
|
40
|
-
|
|
41
|
-
Toyota
|
|
42
|
-
|
|
43
|
-
Corolla
|
|
44
|
-
|
|
45
|
-
$29,600
|
|
46
|
-
|
|
47
|
-
Order
|
|
48
|
-
|
|
49
|
-
Page Size:
|
|
50
|
-
|
|
51
|
-
500
|
|
52
|
-
|
|
53
|
-
1 to 3 of 3
|
|
54
|
-
|
|
55
|
-
Page 1 of 1
|
|
56
|
-
|
|
57
|
-
Hide code
|
|
58
|
-
|
|
59
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
60
|
-
|
|
61
|
-
import { useState } from 'react';
|
|
62
|
-
import {
|
|
63
|
-
IressButton,
|
|
64
|
-
IressModal,
|
|
65
|
-
IressText,
|
|
66
|
-
IressToasterProvider,
|
|
67
|
-
useToaster,
|
|
68
|
-
} from '@iress-oss/ids-components';
|
|
69
|
-
import { AG\_THEME\_IRESS\_ICONS, IressAgGridContainer } from '@iress/ids-themes';
|
|
70
|
-
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
|
|
71
|
-
import { AllCommunityModule, ModuleRegistry, provideGlobalGridOptions, type ColDef, type ICellRendererParams } from 'ag-grid-community';
|
|
72
|
-
import styles from '@iress-storybook/styles.module.scss';
|
|
73
|
-
ModuleRegistry.registerModules(\[AllCommunityModule\]);
|
|
74
|
-
provideGlobalGridOptions({ theme: 'legacy' });
|
|
75
|
-
const OrderCar \= ({ data }: ICellRendererParams) \=> {
|
|
76
|
-
const \[show, setShow\] \= useState(false);
|
|
77
|
-
const { success } \= useToaster();
|
|
78
|
-
return (
|
|
79
|
-
<\>
|
|
80
|
-
<IressButton onClick\={() \=> setShow(true)}\>Order</IressButton\>
|
|
81
|
-
<IressModal show\={show} onShowChange\={setShow}\>
|
|
82
|
-
<IressText\>
|
|
83
|
-
<h2\>Order a car</h2\>
|
|
84
|
-
<p\>
|
|
85
|
-
Car: {data.make} {data.model}
|
|
86
|
-
</p\>
|
|
87
|
-
<p\>
|
|
88
|
-
<IressButton
|
|
89
|
-
onClick\={() \=> {
|
|
90
|
-
success({
|
|
91
|
-
children: 'Order submitted',
|
|
92
|
-
});
|
|
93
|
-
setShow(false);
|
|
94
|
-
}}
|
|
95
|
-
\>
|
|
96
|
-
Submit </IressButton\>
|
|
97
|
-
</p\>
|
|
98
|
-
</IressText\>
|
|
99
|
-
</IressModal\>
|
|
100
|
-
</\>
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
export const AgGridSimple \= (args: AgGridReactProps) \=> {
|
|
104
|
-
// Row Data: The data to be displayed.
|
|
105
|
-
const \[rowData\] \= useState(\[
|
|
106
|
-
{ make: 'Tesla', model: 'Model Y', price: 64950, electric: true },
|
|
107
|
-
{ make: 'Ford', model: 'F-Series', price: 33850, electric: false },
|
|
108
|
-
{ make: 'Toyota', model: 'Corolla', price: 29600, electric: false },
|
|
109
|
-
\]);
|
|
110
|
-
// Column Definitions: Defines the columns to be displayed.
|
|
111
|
-
const \[colDefs\] \= useState<ColDef\[\]\>(\[
|
|
112
|
-
{
|
|
113
|
-
field: 'make',
|
|
114
|
-
filter: true,
|
|
115
|
-
floatingFilter: true,
|
|
116
|
-
flex: 2,
|
|
117
|
-
checkboxSelection: true,
|
|
118
|
-
},
|
|
119
|
-
{ field: 'model', flex: 1, autoHeight: true },
|
|
120
|
-
{
|
|
121
|
-
field: 'price',
|
|
122
|
-
flex: 1,
|
|
123
|
-
autoHeight: true,
|
|
124
|
-
valueFormatter: (price) \=> \`$${price.value.toLocaleString()}\`,
|
|
125
|
-
},
|
|
126
|
-
{ field: 'electric', flex: 1, editable: true, autoHeight: true },
|
|
127
|
-
{ field: 'order', flex: 1, cellRenderer: OrderCar },
|
|
128
|
-
\]);
|
|
129
|
-
return (
|
|
130
|
-
<IressToasterProvider\>
|
|
131
|
-
<IressAgGridContainer
|
|
132
|
-
alignMiddle
|
|
133
|
-
style\={{ height: '300px' }}
|
|
134
|
-
\>
|
|
135
|
-
<AgGridReact
|
|
136
|
-
{...args}
|
|
137
|
-
rowData\={rowData}
|
|
138
|
-
rowClassRules\={{
|
|
139
|
-
\[styles.highlightDanger\]: (params) \=> params.data.make \=== 'Toyota',
|
|
140
|
-
}}
|
|
141
|
-
rowSelection\="multiple"
|
|
142
|
-
columnDefs\={colDefs}
|
|
143
|
-
icons\={AG\_THEME\_IRESS\_ICONS}
|
|
144
|
-
pagination
|
|
145
|
-
paginationPageSize\={500}
|
|
146
|
-
paginationPageSizeSelector\={\[200, 500, 1000\]}
|
|
147
|
-
/>
|
|
148
|
-
</IressAgGridContainer\>
|
|
149
|
-
</IressToasterProvider\>
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
export default AgGridSimple;
|
|
153
|
-
|
|
154
|
-
Copy
|
|
155
|
-
|
|
156
|
-
[](#props-api)Props (API)
|
|
157
|
-
-------------------------
|
|
158
|
-
|
|
159
|
-
AG Grid is a third-party library and has its own API. To use AG Grid, you will need to refer to the [AG Grid documentation](https://www.ag-grid.com/react-data-grid).
|
|
160
|
-
|
|
161
|
-
[](#usage)Usage
|
|
162
|
-
---------------
|
|
163
|
-
|
|
164
|
-
The `@iress/ids-themes` package provides an Iress theme for AG Grid. This theme is intended to be used on top of the Alpine theme. It works by mapping the AG grid CSS variables to the IDS design tokens, hence it should work with all IDS/Styler themes.
|
|
165
|
-
|
|
166
|
-
### [](#installation)Installation
|
|
167
|
-
|
|
168
|
-
1. Ensure you have [AG grid installed](https://www.ag-grid.com/react-data-grid/getting-started/) in your project.
|
|
169
|
-
2. Add the `@iress/ids-themes` package to your project with `yarn add @iress/ids-themes`.
|
|
170
|
-
3. Import the `IressAgGridContainer` component from the package and wrap your AG Grid component with it.
|
|
171
|
-
|
|
172
|
-
\[data-radix-scroll-area-viewport\] {
|
|
173
|
-
scrollbar-width: none;
|
|
174
|
-
-ms-overflow-style: none;
|
|
175
|
-
-webkit-overflow-scrolling: touch;
|
|
176
|
-
}
|
|
177
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
178
|
-
display: none;
|
|
179
|
-
}
|
|
180
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
181
|
-
display: flex;
|
|
182
|
-
flex-direction: column;
|
|
183
|
-
align-items: stretch;
|
|
184
|
-
}
|
|
185
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
186
|
-
flex-grow: 1;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
import { IressAgGridContainer } from '@iress/ids-themes';
|
|
190
|
-
<IressAgGridContainer\>
|
|
191
|
-
<AgGridReact />
|
|
192
|
-
</IressAgGridContainer\>;
|
|
193
|
-
|
|
194
|
-
Copy
|
|
195
|
-
|
|
196
|
-
**Note:** It is important that you ensure the ag-theme-iress-lite CSS class is imported _after_ ag-theme-alpine. If you do not copy the order correctly, you will see some styling issues.
|
|
197
|
-
|
|
198
|
-
### [](#version)Version
|
|
199
|
-
|
|
200
|
-
The version of AG Grid that the theme is supporting is: `ag-grid-react@^33.0.0`
|
|
201
|
-
|
|
202
|
-
[](#examples)Examples
|
|
203
|
-
---------------------
|
|
204
|
-
|
|
205
|
-
### [](#simple)Simple
|
|
206
|
-
|
|
207
|
-
This is a simple example, based on the [Quick Start](https://www.ag-grid.com/react-data-grid/getting-started/) example from the AG Grid documentation.
|
|
208
|
-
|
|
209
|
-
1 to 3 of 3. Page 1 of 1
|
|
210
|
-
|
|
211
|
-
Drag here to set row groups
|
|
212
|
-
|
|
213
|
-
Drag here to set column labels
|
|
214
|
-
|
|
215
|
-
Make
|
|
216
|
-
|
|
217
|
-
Model
|
|
218
|
-
|
|
219
|
-
Price
|
|
220
|
-
|
|
221
|
-
Electric
|
|
222
|
-
|
|
223
|
-
Order
|
|
224
|
-
|
|
225
|
-
Tesla
|
|
226
|
-
|
|
227
|
-
Model Y
|
|
228
|
-
|
|
229
|
-
$64,950
|
|
230
|
-
|
|
231
|
-
Order
|
|
232
|
-
|
|
233
|
-
Ford
|
|
234
|
-
|
|
235
|
-
F-Series
|
|
236
|
-
|
|
237
|
-
$33,850
|
|
238
|
-
|
|
239
|
-
Order
|
|
240
|
-
|
|
241
|
-
Toyota
|
|
242
|
-
|
|
243
|
-
Corolla
|
|
244
|
-
|
|
245
|
-
$29,600
|
|
246
|
-
|
|
247
|
-
Order
|
|
248
|
-
|
|
249
|
-
Page Size:
|
|
250
|
-
|
|
251
|
-
500
|
|
252
|
-
|
|
253
|
-
1 to 3 of 3
|
|
254
|
-
|
|
255
|
-
Page 1 of 1
|
|
256
|
-
|
|
257
|
-
Hide code
|
|
258
|
-
|
|
259
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
260
|
-
|
|
261
|
-
import { useState } from 'react';
|
|
262
|
-
import {
|
|
263
|
-
IressButton,
|
|
264
|
-
IressModal,
|
|
265
|
-
IressText,
|
|
266
|
-
IressToasterProvider,
|
|
267
|
-
useToaster,
|
|
268
|
-
} from '@iress-oss/ids-components';
|
|
269
|
-
import { AG\_THEME\_IRESS\_ICONS, IressAgGridContainer } from '@iress/ids-themes';
|
|
270
|
-
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
|
|
271
|
-
import { AllCommunityModule, ModuleRegistry, provideGlobalGridOptions, type ColDef, type ICellRendererParams } from 'ag-grid-community';
|
|
272
|
-
import styles from '@iress-storybook/styles.module.scss';
|
|
273
|
-
ModuleRegistry.registerModules(\[AllCommunityModule\]);
|
|
274
|
-
provideGlobalGridOptions({ theme: 'legacy' });
|
|
275
|
-
const OrderCar \= ({ data }: ICellRendererParams) \=> {
|
|
276
|
-
const \[show, setShow\] \= useState(false);
|
|
277
|
-
const { success } \= useToaster();
|
|
278
|
-
return (
|
|
279
|
-
<\>
|
|
280
|
-
<IressButton onClick\={() \=> setShow(true)}\>Order</IressButton\>
|
|
281
|
-
<IressModal show\={show} onShowChange\={setShow}\>
|
|
282
|
-
<IressText\>
|
|
283
|
-
<h2\>Order a car</h2\>
|
|
284
|
-
<p\>
|
|
285
|
-
Car: {data.make} {data.model}
|
|
286
|
-
</p\>
|
|
287
|
-
<p\>
|
|
288
|
-
<IressButton
|
|
289
|
-
onClick\={() \=> {
|
|
290
|
-
success({
|
|
291
|
-
children: 'Order submitted',
|
|
292
|
-
});
|
|
293
|
-
setShow(false);
|
|
294
|
-
}}
|
|
295
|
-
\>
|
|
296
|
-
Submit </IressButton\>
|
|
297
|
-
</p\>
|
|
298
|
-
</IressText\>
|
|
299
|
-
</IressModal\>
|
|
300
|
-
</\>
|
|
301
|
-
);
|
|
302
|
-
};
|
|
303
|
-
export const AgGridSimple \= (args: AgGridReactProps) \=> {
|
|
304
|
-
// Row Data: The data to be displayed.
|
|
305
|
-
const \[rowData\] \= useState(\[
|
|
306
|
-
{ make: 'Tesla', model: 'Model Y', price: 64950, electric: true },
|
|
307
|
-
{ make: 'Ford', model: 'F-Series', price: 33850, electric: false },
|
|
308
|
-
{ make: 'Toyota', model: 'Corolla', price: 29600, electric: false },
|
|
309
|
-
\]);
|
|
310
|
-
// Column Definitions: Defines the columns to be displayed.
|
|
311
|
-
const \[colDefs\] \= useState<ColDef\[\]\>(\[
|
|
312
|
-
{
|
|
313
|
-
field: 'make',
|
|
314
|
-
filter: true,
|
|
315
|
-
floatingFilter: true,
|
|
316
|
-
flex: 2,
|
|
317
|
-
checkboxSelection: true,
|
|
318
|
-
},
|
|
319
|
-
{ field: 'model', flex: 1, autoHeight: true },
|
|
320
|
-
{
|
|
321
|
-
field: 'price',
|
|
322
|
-
flex: 1,
|
|
323
|
-
autoHeight: true,
|
|
324
|
-
valueFormatter: (price) \=> \`$${price.value.toLocaleString()}\`,
|
|
325
|
-
},
|
|
326
|
-
{ field: 'electric', flex: 1, editable: true, autoHeight: true },
|
|
327
|
-
{ field: 'order', flex: 1, cellRenderer: OrderCar },
|
|
328
|
-
\]);
|
|
329
|
-
return (
|
|
330
|
-
<IressToasterProvider\>
|
|
331
|
-
<IressAgGridContainer
|
|
332
|
-
alignMiddle
|
|
333
|
-
style\={{ height: '300px' }}
|
|
334
|
-
\>
|
|
335
|
-
<AgGridReact
|
|
336
|
-
{...args}
|
|
337
|
-
rowData\={rowData}
|
|
338
|
-
rowClassRules\={{
|
|
339
|
-
\[styles.highlightDanger\]: (params) \=> params.data.make \=== 'Toyota',
|
|
340
|
-
}}
|
|
341
|
-
rowSelection\="multiple"
|
|
342
|
-
columnDefs\={colDefs}
|
|
343
|
-
icons\={AG\_THEME\_IRESS\_ICONS}
|
|
344
|
-
pagination
|
|
345
|
-
paginationPageSize\={500}
|
|
346
|
-
paginationPageSizeSelector\={\[200, 500, 1000\]}
|
|
347
|
-
/>
|
|
348
|
-
</IressAgGridContainer\>
|
|
349
|
-
</IressToasterProvider\>
|
|
350
|
-
);
|
|
351
|
-
};
|
|
352
|
-
export default AgGridSimple;
|
|
353
|
-
|
|
354
|
-
Copy
|
|
355
|
-
|
|
356
|
-
### [](#complex)Complex
|
|
357
|
-
|
|
358
|
-
This is a complex example showcasing some of the more advanced features of AG Grid.
|
|
359
|
-
|
|
360
|
-
Drag here to set row groups
|
|
361
|
-
|
|
362
|
-
Drag here to set column labels
|
|
363
|
-
|
|
364
|
-
Employee
|
|
365
|
-
|
|
366
|
-
Sales performance
|
|
367
|
-
|
|
368
|
-
Contact details
|
|
369
|
-
|
|
370
|
-
Address
|
|
371
|
-
|
|
372
|
-
First Name
|
|
373
|
-
|
|
374
|
-
Rating
|
|
375
|
-
|
|
376
|
-
Sales
|
|
377
|
-
|
|
378
|
-
Profit
|
|
379
|
-
|
|
380
|
-
Email
|
|
381
|
-
|
|
382
|
-
Phone No
|
|
383
|
-
|
|
384
|
-
Country
|
|
385
|
-
|
|
386
|
-
Shellie
|
|
387
|
-
|
|
388
|
-
49,446
|
|
389
|
-
|
|
390
|
-
\-£627.30
|
|
391
|
-
|
|
392
|
-
aliquet@purus.com
|
|
393
|
-
|
|
394
|
-
0828 746 6831
|
|
395
|
-
|
|
396
|
-
French Polynesia
|
|
397
|
-
|
|
398
|
-
Jade
|
|
399
|
-
|
|
400
|
-
78,893
|
|
401
|
-
|
|
402
|
-
\-£906.36
|
|
403
|
-
|
|
404
|
-
mi.pede.nonummy@senectus.org
|
|
405
|
-
|
|
406
|
-
0800 360062
|
|
407
|
-
|
|
408
|
-
Tonga
|
|
409
|
-
|
|
410
|
-
Wyoming
|
|
411
|
-
|
|
412
|
-
8,882
|
|
413
|
-
|
|
414
|
-
£55.76
|
|
415
|
-
|
|
416
|
-
Nulla.tempor.augue@aliquamiaculis.org
|
|
417
|
-
|
|
418
|
-
0800 377 7753
|
|
419
|
-
|
|
420
|
-
Rwanda
|
|
421
|
-
|
|
422
|
-
Christine
|
|
423
|
-
|
|
424
|
-
69,518
|
|
425
|
-
|
|
426
|
-
£125.04
|
|
427
|
-
|
|
428
|
-
neque.sed.dictum@ultricesVivamus.ca
|
|
429
|
-
|
|
430
|
-
07578 190673
|
|
431
|
-
|
|
432
|
-
Bahamas
|
|
433
|
-
|
|
434
|
-
Jameson
|
|
435
|
-
|
|
436
|
-
4,238
|
|
437
|
-
|
|
438
|
-
£170.98
|
|
439
|
-
|
|
440
|
-
sem.semper@liberoProin.com
|
|
441
|
-
|
|
442
|
-
07489 442639
|
|
443
|
-
|
|
444
|
-
Nauru
|
|
445
|
-
|
|
446
|
-
Driscoll
|
|
447
|
-
|
|
448
|
-
21,692
|
|
449
|
-
|
|
450
|
-
\-£594.06
|
|
451
|
-
|
|
452
|
-
libero.dui@estacfacilisis.edu
|
|
453
|
-
|
|
454
|
-
0843 298 8205
|
|
455
|
-
|
|
456
|
-
Tajikistan
|
|
457
|
-
|
|
458
|
-
Morgan
|
|
459
|
-
|
|
460
|
-
79,436
|
|
461
|
-
|
|
462
|
-
£115.01
|
|
463
|
-
|
|
464
|
-
mauris.eu@ipsum.ca
|
|
465
|
-
|
|
466
|
-
070 6292 4498
|
|
467
|
-
|
|
468
|
-
Colombia
|
|
469
|
-
|
|
470
|
-
Kylee
|
|
471
|
-
|
|
472
|
-
62,388
|
|
473
|
-
|
|
474
|
-
£437.11
|
|
475
|
-
|
|
476
|
-
libero.Proin@malesuadafamesac.com
|
|
477
|
-
|
|
478
|
-
(017177) 84788
|
|
479
|
-
|
|
480
|
-
Papua New Guinea
|
|
481
|
-
|
|
482
|
-
Cathleen
|
|
483
|
-
|
|
484
|
-
29,723
|
|
485
|
-
|
|
486
|
-
\-£540.19
|
|
487
|
-
|
|
488
|
-
risus.Donec@augue.edu
|
|
489
|
-
|
|
490
|
-
(0115) 224 4142
|
|
491
|
-
|
|
492
|
-
Guinea-Bissau
|
|
493
|
-
|
|
494
|
-
Sierra
|
|
495
|
-
|
|
496
|
-
95,017
|
|
497
|
-
|
|
498
|
-
\-£742.40
|
|
499
|
-
|
|
500
|
-
dictum.eleifend.nunc@tellus.net
|
|
501
|
-
|
|
502
|
-
(01266) 957950
|
|
503
|
-
|
|
504
|
-
Isle of Man
|
|
505
|
-
|
|
506
|
-
Levi
|
|
507
|
-
|
|
508
|
-
66,937
|
|
509
|
-
|
|
510
|
-
£87.91
|
|
511
|
-
|
|
512
|
-
Nulla.tempor.augue@nibhdolor.ca
|
|
513
|
-
|
|
514
|
-
0855 608 0347
|
|
515
|
-
|
|
516
|
-
Tuvalu
|
|
517
|
-
|
|
518
|
-
Kyle
|
|
519
|
-
|
|
520
|
-
2,510
|
|
521
|
-
|
|
522
|
-
£454.30
|
|
523
|
-
|
|
524
|
-
lacinia@senectus.org
|
|
525
|
-
|
|
526
|
-
0845 46 40
|
|
527
|
-
|
|
528
|
-
Qatar
|
|
529
|
-
|
|
530
|
-
Emery
|
|
531
|
-
|
|
532
|
-
42,677
|
|
533
|
-
|
|
534
|
-
\-£869.12
|
|
535
|
-
|
|
536
|
-
Nulla.facilisis@nonummyultriciesornare.co.uk
|
|
537
|
-
|
|
538
|
-
(01553) 502913
|
|
539
|
-
|
|
540
|
-
Belize
|
|
541
|
-
|
|
542
|
-
Nadine
|
|
543
|
-
|
|
544
|
-
84,276
|
|
545
|
-
|
|
546
|
-
\-£724.56
|
|
547
|
-
|
|
548
|
-
Duis@Sed.ca
|
|
549
|
-
|
|
550
|
-
055 2785 0228
|
|
551
|
-
|
|
552
|
-
Uruguay
|
|
553
|
-
|
|
554
|
-
Dalton
|
|
555
|
-
|
|
556
|
-
66,926
|
|
557
|
-
|
|
558
|
-
\-£779.42
|
|
559
|
-
|
|
560
|
-
nibh.dolor.nonummy@laoreetlibero.org
|
|
561
|
-
|
|
562
|
-
0395 486 9374
|
|
563
|
-
|
|
564
|
-
Cayman Islands
|
|
565
|
-
|
|
566
|
-
Zeph
|
|
567
|
-
|
|
568
|
-
51,688
|
|
569
|
-
|
|
570
|
-
\-£639.95
|
|
571
|
-
|
|
572
|
-
non.dui@felisorci.com
|
|
573
|
-
|
|
574
|
-
0845 46 41
|
|
575
|
-
|
|
576
|
-
Niger
|
|
577
|
-
|
|
578
|
-
Shannon
|
|
579
|
-
|
|
580
|
-
12,040
|
|
581
|
-
|
|
582
|
-
\-£778.18
|
|
583
|
-
|
|
584
|
-
leo@lobortis.co.uk
|
|
585
|
-
|
|
586
|
-
0800 135593
|
|
587
|
-
|
|
588
|
-
Somalia
|
|
589
|
-
|
|
590
|
-
Erich
|
|
591
|
-
|
|
592
|
-
69,877
|
|
593
|
-
|
|
594
|
-
\-£610.68
|
|
595
|
-
|
|
596
|
-
cursus.non.egestas@aliquet.org
|
|
597
|
-
|
|
598
|
-
0845 46 44
|
|
599
|
-
|
|
600
|
-
Sao Tome and Principe
|
|
601
|
-
|
|
602
|
-
Rhiannon
|
|
603
|
-
|
|
604
|
-
8,184
|
|
605
|
-
|
|
606
|
-
£459.01
|
|
607
|
-
|
|
608
|
-
arcu.Morbi.sit@cursus.edu
|
|
609
|
-
|
|
610
|
-
0361 311 4051
|
|
611
|
-
|
|
612
|
-
Croatia
|
|
613
|
-
|
|
614
|
-
Elijah
|
|
615
|
-
|
|
616
|
-
80,582
|
|
617
|
-
|
|
618
|
-
\-£845.80
|
|
619
|
-
|
|
620
|
-
ipsum.Donec.sollicitudin@leo.co.uk
|
|
621
|
-
|
|
622
|
-
0800 365 8250
|
|
623
|
-
|
|
624
|
-
San Marino
|
|
625
|
-
|
|
626
|
-
Grady
|
|
627
|
-
|
|
628
|
-
20,501
|
|
629
|
-
|
|
630
|
-
£488.20
|
|
631
|
-
|
|
632
|
-
mollis.nec.cursus@malesuadamalesuadaInteger.edu
|
|
633
|
-
|
|
634
|
-
070 2824 3427
|
|
635
|
-
|
|
636
|
-
Cuba
|
|
637
|
-
|
|
638
|
-
Quentin
|
|
639
|
-
|
|
640
|
-
33,800
|
|
641
|
-
|
|
642
|
-
\-£948.93
|
|
643
|
-
|
|
644
|
-
erat.vel@auctor.net
|
|
645
|
-
|
|
646
|
-
(029) 5052 0365
|
|
647
|
-
|
|
648
|
-
Mayotte
|
|
649
|
-
|
|
650
|
-
Samuel
|
|
651
|
-
|
|
652
|
-
64,503
|
|
653
|
-
|
|
654
|
-
£142.21
|
|
655
|
-
|
|
656
|
-
tellus@magnaSed.edu
|
|
657
|
-
|
|
658
|
-
07064 102166
|
|
659
|
-
|
|
660
|
-
Lebanon
|
|
661
|
-
|
|
662
|
-
Merritt
|
|
663
|
-
|
|
664
|
-
8,725
|
|
665
|
-
|
|
666
|
-
\-£572.96
|
|
667
|
-
|
|
668
|
-
interdum.Nunc.sollicitudin@elitpellentesque.edu
|
|
669
|
-
|
|
670
|
-
0800 825458
|
|
671
|
-
|
|
672
|
-
French Southern Territories
|
|
673
|
-
|
|
674
|
-
Columns
|
|
675
|
-
|
|
676
|
-
Filters
|
|
677
|
-
|
|
678
|
-
Pivot Mode
|
|
679
|
-
|
|
680
|
-
Employee
|
|
681
|
-
|
|
682
|
-
First Name
|
|
683
|
-
|
|
684
|
-
Last Name
|
|
685
|
-
|
|
686
|
-
Personal ID
|
|
687
|
-
|
|
688
|
-
Date
|
|
689
|
-
|
|
690
|
-
Sales performance
|
|
691
|
-
|
|
692
|
-
Rating
|
|
693
|
-
|
|
694
|
-
Sales
|
|
695
|
-
|
|
696
|
-
Profit
|
|
697
|
-
|
|
698
|
-
Contact details
|
|
699
|
-
|
|
700
|
-
Email
|
|
701
|
-
|
|
702
|
-
Phone No
|
|
703
|
-
|
|
704
|
-
Address
|
|
705
|
-
|
|
706
|
-
Street
|
|
707
|
-
|
|
708
|
-
City
|
|
709
|
-
|
|
710
|
-
Row Groups
|
|
711
|
-
|
|
712
|
-
Drag here to set row groups
|
|
713
|
-
|
|
714
|
-
Values
|
|
715
|
-
|
|
716
|
-
Drag here to aggregate
|
|
717
|
-
|
|
718
|
-
Column Labels
|
|
719
|
-
|
|
720
|
-
Drag here to set column labels
|
|
721
|
-
|
|
722
|
-
Employee
|
|
723
|
-
|
|
724
|
-
Enabled
|
|
725
|
-
|
|
726
|
-
First Name
|
|
727
|
-
|
|
728
|
-
Last Name
|
|
729
|
-
|
|
730
|
-
Personal ID
|
|
731
|
-
|
|
732
|
-
Date
|
|
733
|
-
|
|
734
|
-
Sales performance
|
|
735
|
-
|
|
736
|
-
Enabled
|
|
737
|
-
|
|
738
|
-
Sales
|
|
739
|
-
|
|
740
|
-
Profit
|
|
741
|
-
|
|
742
|
-
Contact details
|
|
743
|
-
|
|
744
|
-
Enabled
|
|
745
|
-
|
|
746
|
-
Email
|
|
747
|
-
|
|
748
|
-
Phone No
|
|
749
|
-
|
|
750
|
-
Address
|
|
751
|
-
|
|
752
|
-
Enabled
|
|
753
|
-
|
|
754
|
-
Street
|
|
755
|
-
|
|
756
|
-
City
|
|
757
|
-
|
|
758
|
-
Postcode
|
|
759
|
-
|
|
760
|
-
Country
|
|
761
|
-
|
|
762
|
-
to of
|
|
763
|
-
|
|
764
|
-
Page of
|
|
765
|
-
|
|
766
|
-
Hide code
|
|
767
|
-
|
|
768
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
769
|
-
|
|
770
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
771
|
-
import { AG\_GRID\_LICENSE\_KEY } from '@iress/ag-grid-license-key';
|
|
772
|
-
import type {
|
|
773
|
-
GridApi,
|
|
774
|
-
GridReadyEvent,
|
|
775
|
-
ValueFormatterParams,
|
|
776
|
-
} from 'ag-grid-community';
|
|
777
|
-
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
|
|
778
|
-
import { AllEnterpriseModule, LicenseManager, ModuleRegistry, provideGlobalGridOptions } from 'ag-grid-enterprise';
|
|
779
|
-
import { AG\_THEME\_IRESS\_ICONS, IressAgGridContainer } from '@iress/ids-themes';
|
|
780
|
-
import styles from '@iress-storybook/styles.module.scss';
|
|
781
|
-
LicenseManager.setLicenseKey(AG\_GRID\_LICENSE\_KEY);
|
|
782
|
-
ModuleRegistry.registerModules(\[AllEnterpriseModule\]);
|
|
783
|
-
provideGlobalGridOptions({ theme: 'legacy' });
|
|
784
|
-
const formatter2dp \= new Intl.NumberFormat('en-UK', {
|
|
785
|
-
minimumFractionDigits: 2,
|
|
786
|
-
maximumFractionDigits: 2,
|
|
787
|
-
});
|
|
788
|
-
const formatterCurrency \= new Intl.NumberFormat('en-UK', {
|
|
789
|
-
minimumFractionDigits: 2,
|
|
790
|
-
maximumFractionDigits: 2,
|
|
791
|
-
currencySign: 'standard',
|
|
792
|
-
currency: 'GBP',
|
|
793
|
-
style: 'currency',
|
|
794
|
-
});
|
|
795
|
-
const getSales \= (number: number) \=> {
|
|
796
|
-
const no \= number \* 100000;
|
|
797
|
-
return Math.ceil(no);
|
|
798
|
-
};
|
|
799
|
-
const getProfit \= (number: number) \=> {
|
|
800
|
-
const no \= number \> 0.5 ? number \* \-1000 : number \* 1000;
|
|
801
|
-
return formatter2dp.format(no);
|
|
802
|
-
};
|
|
803
|
-
const getRating \= () \=> (Math.random() \> 0.5 ? 'red' : 'green');
|
|
804
|
-
const BIG\_DATA \= \[
|
|
805
|
-
{
|
|
806
|
-
firstName: 'Shellie',
|
|
807
|
-
lastName: 'Cantu',
|
|
808
|
-
email: 'aliquet@purus.com',
|
|
809
|
-
phoneNo: '0828 746 6831',
|
|
810
|
-
street: '639-9644 Eget Street',
|
|
811
|
-
city: 'Weißenfels',
|
|
812
|
-
postcode: '37962',
|
|
813
|
-
country: 'French Polynesia',
|
|
814
|
-
personalID: '16011210 9582',
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
firstName: 'Jade',
|
|
818
|
-
lastName: 'Sellers',
|
|
819
|
-
email: 'mi.pede.nonummy@senectus.org',
|
|
820
|
-
phoneNo: '0800 360062',
|
|
821
|
-
street: 'P.O. Box 511, 3099 In Rd.',
|
|
822
|
-
city: 'Cochrane',
|
|
823
|
-
postcode: 'K8I 3RB',
|
|
824
|
-
country: 'Tonga',
|
|
825
|
-
personalID: '16870328 2056',
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
firstName: 'Wyoming',
|
|
829
|
-
lastName: 'Fox',
|
|
830
|
-
email: 'Nulla.tempor.augue@aliquamiaculis.org',
|
|
831
|
-
phoneNo: '0800 377 7753',
|
|
832
|
-
street: '7354 Ac Ave',
|
|
833
|
-
city: 'East Kilbride',
|
|
834
|
-
postcode: '233010',
|
|
835
|
-
country: 'Rwanda',
|
|
836
|
-
personalID: '16070816 5048',
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
firstName: 'Christine',
|
|
840
|
-
lastName: 'Holcomb',
|
|
841
|
-
email: 'neque.sed.dictum@ultricesVivamus.ca',
|
|
842
|
-
phoneNo: '07578 190673',
|
|
843
|
-
street: 'Ap #121-4421 Iaculis Av.',
|
|
844
|
-
city: 'Etroubles',
|
|
845
|
-
postcode: '6742',
|
|
846
|
-
country: 'Bahamas',
|
|
847
|
-
personalID: '16401211 0773',
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
firstName: 'Jameson',
|
|
851
|
-
lastName: 'Sutton',
|
|
852
|
-
email: 'sem.semper@liberoProin.com',
|
|
853
|
-
phoneNo: '07489 442639',
|
|
854
|
-
street: 'Ap #700-1481 Porttitor Ave',
|
|
855
|
-
city: 'Nice',
|
|
856
|
-
postcode: '14655',
|
|
857
|
-
country: 'Nauru',
|
|
858
|
-
personalID: '16301129 4323',
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
firstName: 'Driscoll',
|
|
862
|
-
lastName: 'Jenkins',
|
|
863
|
-
email: 'libero.dui@estacfacilisis.edu',
|
|
864
|
-
phoneNo: '0843 298 8205',
|
|
865
|
-
street: 'Ap #775-8090 Sed Avenue',
|
|
866
|
-
city: 'Natales',
|
|
867
|
-
postcode: '622109',
|
|
868
|
-
country: 'Tajikistan',
|
|
869
|
-
personalID: '16430908 1950',
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
firstName: 'Morgan',
|
|
873
|
-
lastName: 'Hutchinson',
|
|
874
|
-
email: 'mauris.eu@ipsum.ca',
|
|
875
|
-
phoneNo: '070 6292 4498',
|
|
876
|
-
street: '3135 Curabitur Rd.',
|
|
877
|
-
city: 'Darmstadt',
|
|
878
|
-
postcode: '010900',
|
|
879
|
-
country: 'Colombia',
|
|
880
|
-
personalID: '16890811 2991',
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
firstName: 'Kylee',
|
|
884
|
-
lastName: 'Riddle',
|
|
885
|
-
email: 'libero.Proin@malesuadafamesac.com',
|
|
886
|
-
phoneNo: '(017177) 84788',
|
|
887
|
-
street: '7336 Ipsum St.',
|
|
888
|
-
city: 'Semarang',
|
|
889
|
-
postcode: '9828',
|
|
890
|
-
country: 'Papua New Guinea',
|
|
891
|
-
personalID: '16260701 0093',
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
firstName: 'Cathleen',
|
|
895
|
-
lastName: 'Dale',
|
|
896
|
-
email: 'risus.Donec@augue.edu',
|
|
897
|
-
phoneNo: '(0115) 224 4142',
|
|
898
|
-
street: 'Ap #568-2948 Fringilla Rd.',
|
|
899
|
-
city: 'Brandenburg',
|
|
900
|
-
postcode: 'CH2L 4EH',
|
|
901
|
-
country: 'Guinea-Bissau',
|
|
902
|
-
personalID: '16161203 4817',
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
firstName: 'Sierra',
|
|
906
|
-
lastName: 'Robbins',
|
|
907
|
-
email: 'dictum.eleifend.nunc@tellus.net',
|
|
908
|
-
phoneNo: '(01266) 957950',
|
|
909
|
-
street: '481-6201 Mattis. Rd.',
|
|
910
|
-
city: 'Upper Hutt',
|
|
911
|
-
postcode: '23945',
|
|
912
|
-
country: 'Isle of Man',
|
|
913
|
-
personalID: '16691217 6010',
|
|
914
|
-
},
|
|
915
|
-
{
|
|
916
|
-
firstName: 'Levi',
|
|
917
|
-
lastName: 'Simpson',
|
|
918
|
-
email: 'Nulla.tempor.augue@nibhdolor.ca',
|
|
919
|
-
phoneNo: '0855 608 0347',
|
|
920
|
-
street: '555-4187 Integer Av.',
|
|
921
|
-
city: 'Curacaví',
|
|
922
|
-
postcode: '439311',
|
|
923
|
-
country: 'Tuvalu',
|
|
924
|
-
personalID: '16000330 9499',
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
firstName: 'Kyle',
|
|
928
|
-
lastName: 'Mendez',
|
|
929
|
-
email: 'lacinia@senectus.org',
|
|
930
|
-
phoneNo: '0845 46 40',
|
|
931
|
-
street: '814-4647 Nec, St.',
|
|
932
|
-
city: 'Akron',
|
|
933
|
-
postcode: '199413',
|
|
934
|
-
country: 'Qatar',
|
|
935
|
-
personalID: '16471029 5397',
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
firstName: 'Emery',
|
|
939
|
-
lastName: 'Hurley',
|
|
940
|
-
email: 'Nulla.facilisis@nonummyultriciesornare.co.uk',
|
|
941
|
-
phoneNo: '(01553) 502913',
|
|
942
|
-
street: '4540 Luctus Ave',
|
|
943
|
-
city: 'Meux',
|
|
944
|
-
postcode: '36612',
|
|
945
|
-
country: 'Belize',
|
|
946
|
-
personalID: '16440228 3842',
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
firstName: 'Nadine',
|
|
950
|
-
lastName: 'Buchanan',
|
|
951
|
-
email: 'Duis@Sed.ca',
|
|
952
|
-
phoneNo: '055 2785 0228',
|
|
953
|
-
street: '694 Mi, Av.',
|
|
954
|
-
city: 'Middelburg',
|
|
955
|
-
postcode: '62232-88887',
|
|
956
|
-
country: 'Uruguay',
|
|
957
|
-
personalID: '16721129 5857',
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
firstName: 'Dalton',
|
|
961
|
-
lastName: 'Nieves',
|
|
962
|
-
email: 'nibh.dolor.nonummy@laoreetlibero.org',
|
|
963
|
-
phoneNo: '0395 486 9374',
|
|
964
|
-
street: '797-8170 Enim, Street',
|
|
965
|
-
city: 'Burhanpur',
|
|
966
|
-
postcode: '29633-93750',
|
|
967
|
-
country: 'Cayman Islands',
|
|
968
|
-
personalID: '16600205 0067',
|
|
969
|
-
},
|
|
970
|
-
{
|
|
971
|
-
firstName: 'Zeph',
|
|
972
|
-
lastName: 'Ruiz',
|
|
973
|
-
email: 'non.dui@felisorci.com',
|
|
974
|
-
phoneNo: '0845 46 41',
|
|
975
|
-
street: 'Ap #282-8369 Malesuada Ave',
|
|
976
|
-
city: 'Cavallino',
|
|
977
|
-
postcode: 'EW2V 1ZE',
|
|
978
|
-
country: 'Niger',
|
|
979
|
-
personalID: '16580706 9124',
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
firstName: 'Shannon',
|
|
983
|
-
lastName: 'Decker',
|
|
984
|
-
email: 'leo@lobortis.co.uk',
|
|
985
|
-
phoneNo: '0800 135593',
|
|
986
|
-
street: 'P.O. Box 587, 6871 Eleifend. Ave',
|
|
987
|
-
city: 'Rocca San Felice',
|
|
988
|
-
postcode: '42271-38735',
|
|
989
|
-
country: 'Somalia',
|
|
990
|
-
personalID: '16090810 4763',
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
firstName: 'Erich',
|
|
994
|
-
lastName: 'Daniels',
|
|
995
|
-
email: 'cursus.non.egestas@aliquet.org',
|
|
996
|
-
phoneNo: '0845 46 44',
|
|
997
|
-
street: '689-4565 Velit. Avenue',
|
|
998
|
-
city: 'Edmundston',
|
|
999
|
-
postcode: 'JR32 7QA',
|
|
1000
|
-
country: 'Sao Tome and Principe',
|
|
1001
|
-
personalID: '16720401 5049',
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
firstName: 'Rhiannon',
|
|
1005
|
-
lastName: 'Malone',
|
|
1006
|
-
email: 'arcu.Morbi.sit@cursus.edu',
|
|
1007
|
-
phoneNo: '0361 311 4051',
|
|
1008
|
-
street: 'Ap #971-1781 Vehicula Road',
|
|
1009
|
-
city: 'Wood Buffalo',
|
|
1010
|
-
postcode: '71682',
|
|
1011
|
-
country: 'Croatia',
|
|
1012
|
-
personalID: '16931028 3388',
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
firstName: 'Elijah',
|
|
1016
|
-
lastName: 'Sosa',
|
|
1017
|
-
email: 'ipsum.Donec.sollicitudin@leo.co.uk',
|
|
1018
|
-
phoneNo: '0800 365 8250',
|
|
1019
|
-
street: 'P.O. Box 169, 2562 Commodo Ave',
|
|
1020
|
-
city: 'Montoggio',
|
|
1021
|
-
postcode: '42092',
|
|
1022
|
-
country: 'San Marino',
|
|
1023
|
-
personalID: '16251107 2403',
|
|
1024
|
-
},
|
|
1025
|
-
{
|
|
1026
|
-
firstName: 'Grady',
|
|
1027
|
-
lastName: 'Crosby',
|
|
1028
|
-
email: 'mollis.nec.cursus@malesuadamalesuadaInteger.edu',
|
|
1029
|
-
phoneNo: '070 2824 3427',
|
|
1030
|
-
street: '821-5145 Id, Ave',
|
|
1031
|
-
city: 'Rosoux-Crenwick',
|
|
1032
|
-
postcode: '56176',
|
|
1033
|
-
country: 'Cuba',
|
|
1034
|
-
personalID: '16520115 9133',
|
|
1035
|
-
},
|
|
1036
|
-
{
|
|
1037
|
-
firstName: 'Quentin',
|
|
1038
|
-
lastName: 'Armstrong',
|
|
1039
|
-
email: 'erat.vel@auctor.net',
|
|
1040
|
-
phoneNo: '(029) 5052 0365',
|
|
1041
|
-
street: '157-253 Hendrerit Av.',
|
|
1042
|
-
city: 'Aubervilliers',
|
|
1043
|
-
postcode: '2151',
|
|
1044
|
-
country: 'Mayotte',
|
|
1045
|
-
personalID: '16730607 0553',
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
firstName: 'Samuel',
|
|
1049
|
-
lastName: 'Harrell',
|
|
1050
|
-
email: 'tellus@magnaSed.edu',
|
|
1051
|
-
phoneNo: '07064 102166',
|
|
1052
|
-
street: 'P.O. Box 713, 4115 Ut Rd.',
|
|
1053
|
-
city: 'Kingston',
|
|
1054
|
-
postcode: '23315',
|
|
1055
|
-
country: 'Lebanon',
|
|
1056
|
-
personalID: '16361016 5551',
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
firstName: 'Merritt',
|
|
1060
|
-
lastName: 'Holland',
|
|
1061
|
-
email: 'interdum.Nunc.sollicitudin@elitpellentesque.edu',
|
|
1062
|
-
phoneNo: '0800 825458',
|
|
1063
|
-
street: 'P.O. Box 261, 3590 Nascetur Road',
|
|
1064
|
-
city: 'Drancy',
|
|
1065
|
-
postcode: '760017',
|
|
1066
|
-
country: 'French Southern Territories',
|
|
1067
|
-
personalID: '16040311 2121',
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
firstName: 'Harlan',
|
|
1071
|
-
lastName: 'Brennan',
|
|
1072
|
-
email: 'nascetur.ridiculus@feugiatmetussit.net',
|
|
1073
|
-
phoneNo: '(012812) 59410',
|
|
1074
|
-
street: '8210 Torquent Av.',
|
|
1075
|
-
city: 'Grantham',
|
|
1076
|
-
postcode: '01537',
|
|
1077
|
-
country: 'Saint Pierre and Miquelon',
|
|
1078
|
-
personalID: '16431216 0239',
|
|
1079
|
-
},
|
|
1080
|
-
{
|
|
1081
|
-
firstName: 'Stuart',
|
|
1082
|
-
lastName: 'Deleon',
|
|
1083
|
-
email: 'sed.pede.nec@maurisMorbinon.com',
|
|
1084
|
-
phoneNo: '0807 013 3815',
|
|
1085
|
-
street: 'P.O. Box 143, 4909 At Street',
|
|
1086
|
-
city: 'Terrance',
|
|
1087
|
-
postcode: '27218',
|
|
1088
|
-
country: 'Jersey',
|
|
1089
|
-
personalID: '16330207 5852',
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
firstName: 'Clarke',
|
|
1093
|
-
lastName: 'Middleton',
|
|
1094
|
-
email: 'in@estacfacilisis.org',
|
|
1095
|
-
phoneNo: '(028) 5013 9648',
|
|
1096
|
-
street: '9856 Eget, Avenue',
|
|
1097
|
-
city: 'Solihull',
|
|
1098
|
-
postcode: '72893',
|
|
1099
|
-
country: 'Seychelles',
|
|
1100
|
-
personalID: '16340804 3325',
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
firstName: 'Roanna',
|
|
1104
|
-
lastName: 'Gentry',
|
|
1105
|
-
email: 'dui@nascetur.net',
|
|
1106
|
-
phoneNo: '(024) 3023 2962',
|
|
1107
|
-
street: '3566 Ornare. Rd.',
|
|
1108
|
-
city: 'Freiberg',
|
|
1109
|
-
postcode: '3899',
|
|
1110
|
-
country: 'Lesotho',
|
|
1111
|
-
personalID: '16680618 3791',
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
firstName: 'Delilah',
|
|
1115
|
-
lastName: 'Bird',
|
|
1116
|
-
email: 'laoreet.lectus.quis@utaliquam.edu',
|
|
1117
|
-
phoneNo: '07160 224163',
|
|
1118
|
-
street: 'P.O. Box 332, 8565 Molestie Avenue',
|
|
1119
|
-
city: 'Washuk',
|
|
1120
|
-
postcode: '607065',
|
|
1121
|
-
country: 'Indonesia',
|
|
1122
|
-
personalID: '16891112 9461',
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
firstName: 'Georgia',
|
|
1126
|
-
lastName: 'Cash',
|
|
1127
|
-
email: 'dui@enimnisl.net',
|
|
1128
|
-
phoneNo: '(0113) 542 3955',
|
|
1129
|
-
street: '900-3252 Fusce Avenue',
|
|
1130
|
-
city: 'Sint-Michiels',
|
|
1131
|
-
postcode: 'Z8203',
|
|
1132
|
-
country: 'Niue',
|
|
1133
|
-
personalID: '16340718 4716',
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
firstName: 'Aiko',
|
|
1137
|
-
lastName: 'Mclean',
|
|
1138
|
-
email: 'cubilia.Curae.Phasellus@augueid.com',
|
|
1139
|
-
phoneNo: '055 9506 2116',
|
|
1140
|
-
street: 'P.O. Box 786, 1756 Fringilla St.',
|
|
1141
|
-
city: 'Malonne',
|
|
1142
|
-
postcode: 'Y8E 7M2',
|
|
1143
|
-
country: 'Belize',
|
|
1144
|
-
personalID: '16680622 4207',
|
|
1145
|
-
},
|
|
1146
|
-
{
|
|
1147
|
-
firstName: 'Winter',
|
|
1148
|
-
lastName: 'Jacobs',
|
|
1149
|
-
email: 'aliquet@Duisac.ca',
|
|
1150
|
-
phoneNo: '0800 693847',
|
|
1151
|
-
street: '774-9011 Arcu Road',
|
|
1152
|
-
city: 'Bilbo',
|
|
1153
|
-
postcode: '05558',
|
|
1154
|
-
country: 'Equatorial Guinea',
|
|
1155
|
-
personalID: '16611201 4144',
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
firstName: 'Jolene',
|
|
1159
|
-
lastName: 'Rios',
|
|
1160
|
-
email: 'odio.Aliquam.vulputate@ac.ca',
|
|
1161
|
-
phoneNo: '(023) 4876 2215',
|
|
1162
|
-
street: 'Ap #325-8225 Amet Road',
|
|
1163
|
-
city: 'Limena',
|
|
1164
|
-
postcode: 'K56 0YJ',
|
|
1165
|
-
country: 'Morocco',
|
|
1166
|
-
personalID: '16170215 3485',
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
firstName: 'Kaden',
|
|
1170
|
-
lastName: 'Morrow',
|
|
1171
|
-
email: 'rutrum@eleifendnec.ca',
|
|
1172
|
-
phoneNo: '07305 685548',
|
|
1173
|
-
street: '8870 Aliquam Road',
|
|
1174
|
-
city: 'Sète',
|
|
1175
|
-
postcode: '04908',
|
|
1176
|
-
country: 'Peru',
|
|
1177
|
-
personalID: '16820820 6675',
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
firstName: 'Kaseem',
|
|
1181
|
-
lastName: 'Norris',
|
|
1182
|
-
email: 'mauris.erat.eget@nequeMorbi.com',
|
|
1183
|
-
phoneNo: '07275 403152',
|
|
1184
|
-
street: 'P.O. Box 776, 7115 Integer Avenue',
|
|
1185
|
-
city: 'Jönköping',
|
|
1186
|
-
postcode: '42236-83471',
|
|
1187
|
-
country: 'Sudan',
|
|
1188
|
-
personalID: '16440829 7895',
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
firstName: 'Vladimir',
|
|
1192
|
-
lastName: 'Mcguire',
|
|
1193
|
-
email: 'id@nonarcuVivamus.edu',
|
|
1194
|
-
phoneNo: '0500 950469',
|
|
1195
|
-
street: '2067 Est Ave',
|
|
1196
|
-
city: 'Ziano di Fiemme',
|
|
1197
|
-
postcode: '774056',
|
|
1198
|
-
country: 'Mexico',
|
|
1199
|
-
personalID: '16771016 3796',
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
firstName: 'Jocelyn',
|
|
1203
|
-
lastName: 'Schroeder',
|
|
1204
|
-
email: 'dolor@nec.ca',
|
|
1205
|
-
phoneNo: '07302 403156',
|
|
1206
|
-
street: 'Ap #155-3999 Vivamus St.',
|
|
1207
|
-
city: 'Malloa',
|
|
1208
|
-
postcode: '4059',
|
|
1209
|
-
country: 'Canada',
|
|
1210
|
-
personalID: '16530314 9388',
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
firstName: 'Howard',
|
|
1214
|
-
lastName: 'Villarreal',
|
|
1215
|
-
email: 'Donec.felis@insodales.com',
|
|
1216
|
-
phoneNo: '07624 830239',
|
|
1217
|
-
street: '540-7057 Cras Rd.',
|
|
1218
|
-
city: 'Siverek',
|
|
1219
|
-
postcode: '8701',
|
|
1220
|
-
country: 'Seychelles',
|
|
1221
|
-
personalID: '16640823 8530',
|
|
1222
|
-
},
|
|
1223
|
-
{
|
|
1224
|
-
firstName: 'Adam',
|
|
1225
|
-
lastName: 'Miranda',
|
|
1226
|
-
email: 'amet.dapibus@faucibus.edu',
|
|
1227
|
-
phoneNo: '0845 46 49',
|
|
1228
|
-
street: 'Ap #931-6286 Diam. Avenue',
|
|
1229
|
-
city: 'Warburg',
|
|
1230
|
-
postcode: '01972',
|
|
1231
|
-
country: 'Jordan',
|
|
1232
|
-
personalID: '16370414 7911',
|
|
1233
|
-
},
|
|
1234
|
-
{
|
|
1235
|
-
firstName: 'Aiko',
|
|
1236
|
-
lastName: 'Elliott',
|
|
1237
|
-
email: 'sodales@mauris.edu',
|
|
1238
|
-
phoneNo: '0800 1111',
|
|
1239
|
-
street: 'P.O. Box 583, 6119 Ut St.',
|
|
1240
|
-
city: 'Villavicencio',
|
|
1241
|
-
postcode: '4864 XQ',
|
|
1242
|
-
country: 'Faroe Islands',
|
|
1243
|
-
personalID: '16940907 6115',
|
|
1244
|
-
},
|
|
1245
|
-
\].map((person) \=> ({
|
|
1246
|
-
...person,
|
|
1247
|
-
sales: getSales(Math.random()),
|
|
1248
|
-
profit: getProfit(Math.random()),
|
|
1249
|
-
redOrGreen: getRating(),
|
|
1250
|
-
date: new Date(Math.floor(Math.random() \* \-10000000000)).toDateString(),
|
|
1251
|
-
}));
|
|
1252
|
-
const createClassNameMutationObserver \= (
|
|
1253
|
-
element: HTMLElement,
|
|
1254
|
-
callback: (className: string) \=> void,
|
|
1255
|
-
): MutationObserver \=> {
|
|
1256
|
-
const observer \= new MutationObserver(() \=> {
|
|
1257
|
-
callback(element.className);
|
|
1258
|
-
});
|
|
1259
|
-
observer.observe(element, {
|
|
1260
|
-
attributes: true,
|
|
1261
|
-
attributeFilter: \['class'\],
|
|
1262
|
-
childList: false,
|
|
1263
|
-
characterData: false,
|
|
1264
|
-
});
|
|
1265
|
-
return observer;
|
|
1266
|
-
};
|
|
1267
|
-
const useClassNameMutationObserver \= (
|
|
1268
|
-
element: HTMLElement,
|
|
1269
|
-
callback: () \=> void,
|
|
1270
|
-
): void \=> {
|
|
1271
|
-
useEffect(() \=> {
|
|
1272
|
-
const observer \= createClassNameMutationObserver(element, callback);
|
|
1273
|
-
// Cleanup listener
|
|
1274
|
-
return (): void \=> {
|
|
1275
|
-
observer.disconnect();
|
|
1276
|
-
};
|
|
1277
|
-
});
|
|
1278
|
-
};
|
|
1279
|
-
const RedOrGreenFormatter \= (params: ValueFormatterParams) \=> {
|
|
1280
|
-
const dotStyle \= styles\[\`dot--${params.value}\`\];
|
|
1281
|
-
return <span className\={\`${styles.dot} ${dotStyle}\`} />;
|
|
1282
|
-
};
|
|
1283
|
-
const CommaFormatter \= (params: ValueFormatterParams): string \=> {
|
|
1284
|
-
return params.value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');
|
|
1285
|
-
};
|
|
1286
|
-
const CurrencyFormatter \= (params: ValueFormatterParams): string \=> {
|
|
1287
|
-
if (params.value \=== '0.00') {
|
|
1288
|
-
return formatter2dp.format(params.value);
|
|
1289
|
-
}
|
|
1290
|
-
return formatterCurrency.format(params.value);
|
|
1291
|
-
};
|
|
1292
|
-
export const AgGridComplex \= (args: AgGridReactProps) \=> {
|
|
1293
|
-
const \[rowData, setRowData\] \= useState(BIG\_DATA);
|
|
1294
|
-
const api \= useRef<GridApi\>();
|
|
1295
|
-
// pick one row at random to show data updating in the grid
|
|
1296
|
-
useEffect(() \=> {
|
|
1297
|
-
const updateTick \= setInterval(() \=> {
|
|
1298
|
-
const randomNo \= Math.random();
|
|
1299
|
-
const index \= Math.floor(Math.random() \* rowData.length);
|
|
1300
|
-
const itemToUpdate \= rowData\[index\];
|
|
1301
|
-
if (randomNo < 0.5) {
|
|
1302
|
-
itemToUpdate.sales \= getSales(Math.random());
|
|
1303
|
-
} else if (randomNo \> 0.9) {
|
|
1304
|
-
itemToUpdate.profit \= getProfit(0);
|
|
1305
|
-
} else {
|
|
1306
|
-
itemToUpdate.profit \= getProfit(Math.random());
|
|
1307
|
-
}
|
|
1308
|
-
setRowData(rowData);
|
|
1309
|
-
api.current?.refreshCells();
|
|
1310
|
-
}, 500);
|
|
1311
|
-
return () \=> {
|
|
1312
|
-
clearInterval(updateTick);
|
|
1313
|
-
};
|
|
1314
|
-
}, \[rowData\]);
|
|
1315
|
-
const onGridReady \= useCallback((event: GridReadyEvent): void \=> {
|
|
1316
|
-
api.current \= event.api;
|
|
1317
|
-
api.current.resetRowHeights();
|
|
1318
|
-
}, \[\]);
|
|
1319
|
-
useClassNameMutationObserver(document.documentElement, () \=> {
|
|
1320
|
-
if (api.current) {
|
|
1321
|
-
api.current.resetRowHeights();
|
|
1322
|
-
}
|
|
1323
|
-
});
|
|
1324
|
-
return (
|
|
1325
|
-
<IressAgGridContainer
|
|
1326
|
-
alignMiddle
|
|
1327
|
-
style\={{ height: '100vh', width: '100%' }}
|
|
1328
|
-
\>
|
|
1329
|
-
<AgGridReact {...args}
|
|
1330
|
-
onGridReady={onGridReady}
|
|
1331
|
-
rowDragManaged animateRows enableRangeSelection={true}
|
|
1332
|
-
enableCharts={true}
|
|
1333
|
-
sideBar={true}
|
|
1334
|
-
rowData={rowData}
|
|
1335
|
-
rowSelection="multiple" rowMultiSelectWithClick components={{
|
|
1336
|
-
redGreenDots: RedOrGreenFormatter,
|
|
1337
|
-
}}
|
|
1338
|
-
defaultColDef={{
|
|
1339
|
-
enableCellChangeFlash: true,
|
|
1340
|
-
resizable: true,
|
|
1341
|
-
sortable: true,
|
|
1342
|
-
unSortIcon: true,
|
|
1343
|
-
filter: true,
|
|
1344
|
-
floatingFilter: true,
|
|
1345
|
-
enablePivot: false,
|
|
1346
|
-
filterParams: {
|
|
1347
|
-
buttons: \['reset', 'apply'\],
|
|
1348
|
-
},
|
|
1349
|
-
autoHeight: true,
|
|
1350
|
-
wrapText: true,
|
|
1351
|
-
}}
|
|
1352
|
-
icons={AG\_THEME\_IRESS\_ICONS}
|
|
1353
|
-
columnDefs={\[
|
|
1354
|
-
{
|
|
1355
|
-
headerName: 'Employee',
|
|
1356
|
-
children: \[
|
|
1357
|
-
{
|
|
1358
|
-
field: 'firstName',
|
|
1359
|
-
editable: true,
|
|
1360
|
-
filter: 'agTextColumnFilter',
|
|
1361
|
-
headerTooltip: 'First name',
|
|
1362
|
-
rowDrag: true,
|
|
1363
|
-
lockVisible: true,
|
|
1364
|
-
tooltipField: 'firstName',
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
field: 'lastName',
|
|
1368
|
-
editable: true,
|
|
1369
|
-
filter: 'agTextColumnFilter',
|
|
1370
|
-
headerTooltip: 'Surname',
|
|
1371
|
-
lockVisible: true,
|
|
1372
|
-
cellClass: 'iress-cell--divider',
|
|
1373
|
-
headerClass: 'iress-cell--divider',
|
|
1374
|
-
columnGroupShow: 'open',
|
|
1375
|
-
},
|
|
1376
|
-
{
|
|
1377
|
-
field: 'personalID',
|
|
1378
|
-
filter: 'agTextColumnFilter',
|
|
1379
|
-
headerTooltip: 'Personal ID',
|
|
1380
|
-
columnGroupShow: 'open',
|
|
1381
|
-
},
|
|
1382
|
-
{
|
|
1383
|
-
field: 'date',
|
|
1384
|
-
filter: 'agDateColumnFilter',
|
|
1385
|
-
headerTooltip: 'Date',
|
|
1386
|
-
columnGroupShow: 'open',
|
|
1387
|
-
},
|
|
1388
|
-
\],
|
|
1389
|
-
},
|
|
1390
|
-
{
|
|
1391
|
-
headerName: 'Sales performance',
|
|
1392
|
-
children: \[
|
|
1393
|
-
{
|
|
1394
|
-
field: 'redOrGreen',
|
|
1395
|
-
headerName: 'Rating',
|
|
1396
|
-
cellRenderer: 'redGreenDots',
|
|
1397
|
-
filter: false,
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
field: 'sales',
|
|
1401
|
-
filter: 'agNumberColumnFilter',
|
|
1402
|
-
valueFormatter: CommaFormatter,
|
|
1403
|
-
},
|
|
1404
|
-
{
|
|
1405
|
-
field: 'profit',
|
|
1406
|
-
valueFormatter: CurrencyFormatter,
|
|
1407
|
-
cellClassRules: {
|
|
1408
|
-
'iress--positive': (params) \=> parseInt(params.value, 10) \> 0,
|
|
1409
|
-
'iress--negative': (params) \=> parseInt(params.value, 10) < 0,
|
|
1410
|
-
'iress--zero': (params) \=> params.value \=== '0.00',
|
|
1411
|
-
},
|
|
1412
|
-
},
|
|
1413
|
-
\],
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
headerName: 'Contact details',
|
|
1417
|
-
children: \[
|
|
1418
|
-
{
|
|
1419
|
-
field: 'email',
|
|
1420
|
-
width: 350,
|
|
1421
|
-
filter: 'agTextColumnFilter',
|
|
1422
|
-
headerTooltip: 'Email address',
|
|
1423
|
-
cellClass: 'iress-cell--ellipsis',
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
field: 'phoneNo',
|
|
1427
|
-
enableValue: true,
|
|
1428
|
-
filter: 'agTextColumnFilter',
|
|
1429
|
-
headerTooltip: 'Phone number',
|
|
1430
|
-
},
|
|
1431
|
-
\],
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
headerName: 'Address',
|
|
1435
|
-
children: \[
|
|
1436
|
-
{
|
|
1437
|
-
field: 'street',
|
|
1438
|
-
width: 350,
|
|
1439
|
-
filter: 'agTextColumnFilter',
|
|
1440
|
-
cellClass: 'iress-cell--ellipsis',
|
|
1441
|
-
columnGroupShow: 'open',
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
field: 'city',
|
|
1445
|
-
filter: 'agTextColumnFilter',
|
|
1446
|
-
columnGroupShow: 'open',
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
field: 'postcode',
|
|
1450
|
-
filter: 'agTextColumnFilter',
|
|
1451
|
-
columnGroupShow: 'open',
|
|
1452
|
-
},
|
|
1453
|
-
{ field: 'country', filter: 'agTextColumnFilter' },
|
|
1454
|
-
\],
|
|
1455
|
-
},
|
|
1456
|
-
\]}
|
|
1457
|
-
/> </IressAgGridContainer\>
|
|
1458
|
-
);
|
|
1459
|
-
};
|
|
1460
|
-
export default AgGridComplex;
|
|
1461
|
-
|
|
1462
|
-
Copy
|
|
1463
|
-
|
|
1464
|
-
### [](#compact)Compact
|
|
1465
|
-
|
|
1466
|
-
This is a complex example showcasing some of the more advanced features of AG Grid using the `compact` variant.
|
|
1467
|
-
|
|
1468
|
-
Drag here to set row groups
|
|
1469
|
-
|
|
1470
|
-
Drag here to set column labels
|
|
1471
|
-
|
|
1472
|
-
Employee
|
|
1473
|
-
|
|
1474
|
-
Sales performance
|
|
1475
|
-
|
|
1476
|
-
Contact details
|
|
1477
|
-
|
|
1478
|
-
Address
|
|
1479
|
-
|
|
1480
|
-
First Name
|
|
1481
|
-
|
|
1482
|
-
Rating
|
|
1483
|
-
|
|
1484
|
-
Sales
|
|
1485
|
-
|
|
1486
|
-
Profit
|
|
1487
|
-
|
|
1488
|
-
Email
|
|
1489
|
-
|
|
1490
|
-
Phone No
|
|
1491
|
-
|
|
1492
|
-
Country
|
|
1493
|
-
|
|
1494
|
-
Shellie
|
|
1495
|
-
|
|
1496
|
-
3,489
|
|
1497
|
-
|
|
1498
|
-
£21.68
|
|
1499
|
-
|
|
1500
|
-
aliquet@purus.com
|
|
1501
|
-
|
|
1502
|
-
0828 746 6831
|
|
1503
|
-
|
|
1504
|
-
French Polynesia
|
|
1505
|
-
|
|
1506
|
-
Jade
|
|
1507
|
-
|
|
1508
|
-
12,963
|
|
1509
|
-
|
|
1510
|
-
£306.21
|
|
1511
|
-
|
|
1512
|
-
mi.pede.nonummy@senectus.org
|
|
1513
|
-
|
|
1514
|
-
0800 360062
|
|
1515
|
-
|
|
1516
|
-
Tonga
|
|
1517
|
-
|
|
1518
|
-
Wyoming
|
|
1519
|
-
|
|
1520
|
-
23,715
|
|
1521
|
-
|
|
1522
|
-
\-£745.77
|
|
1523
|
-
|
|
1524
|
-
Nulla.tempor.augue@aliquamiaculis.org
|
|
1525
|
-
|
|
1526
|
-
0800 377 7753
|
|
1527
|
-
|
|
1528
|
-
Rwanda
|
|
1529
|
-
|
|
1530
|
-
Christine
|
|
1531
|
-
|
|
1532
|
-
61,370
|
|
1533
|
-
|
|
1534
|
-
\-£662.81
|
|
1535
|
-
|
|
1536
|
-
neque.sed.dictum@ultricesVivamus.ca
|
|
1537
|
-
|
|
1538
|
-
07578 190673
|
|
1539
|
-
|
|
1540
|
-
Bahamas
|
|
1541
|
-
|
|
1542
|
-
Jameson
|
|
1543
|
-
|
|
1544
|
-
95,958
|
|
1545
|
-
|
|
1546
|
-
\-£953.31
|
|
1547
|
-
|
|
1548
|
-
sem.semper@liberoProin.com
|
|
1549
|
-
|
|
1550
|
-
07489 442639
|
|
1551
|
-
|
|
1552
|
-
Nauru
|
|
1553
|
-
|
|
1554
|
-
Driscoll
|
|
1555
|
-
|
|
1556
|
-
7,579
|
|
1557
|
-
|
|
1558
|
-
£268.43
|
|
1559
|
-
|
|
1560
|
-
libero.dui@estacfacilisis.edu
|
|
1561
|
-
|
|
1562
|
-
0843 298 8205
|
|
1563
|
-
|
|
1564
|
-
Tajikistan
|
|
1565
|
-
|
|
1566
|
-
Morgan
|
|
1567
|
-
|
|
1568
|
-
41,229
|
|
1569
|
-
|
|
1570
|
-
£204.74
|
|
1571
|
-
|
|
1572
|
-
mauris.eu@ipsum.ca
|
|
1573
|
-
|
|
1574
|
-
070 6292 4498
|
|
1575
|
-
|
|
1576
|
-
Colombia
|
|
1577
|
-
|
|
1578
|
-
Kylee
|
|
1579
|
-
|
|
1580
|
-
80,559
|
|
1581
|
-
|
|
1582
|
-
\-£698.67
|
|
1583
|
-
|
|
1584
|
-
libero.Proin@malesuadafamesac.com
|
|
1585
|
-
|
|
1586
|
-
(017177) 84788
|
|
1587
|
-
|
|
1588
|
-
Papua New Guinea
|
|
1589
|
-
|
|
1590
|
-
Cathleen
|
|
1591
|
-
|
|
1592
|
-
85,185
|
|
1593
|
-
|
|
1594
|
-
\-£927.22
|
|
1595
|
-
|
|
1596
|
-
risus.Donec@augue.edu
|
|
1597
|
-
|
|
1598
|
-
(0115) 224 4142
|
|
1599
|
-
|
|
1600
|
-
Guinea-Bissau
|
|
1601
|
-
|
|
1602
|
-
Sierra
|
|
1603
|
-
|
|
1604
|
-
43,903
|
|
1605
|
-
|
|
1606
|
-
£287.01
|
|
1607
|
-
|
|
1608
|
-
dictum.eleifend.nunc@tellus.net
|
|
1609
|
-
|
|
1610
|
-
(01266) 957950
|
|
1611
|
-
|
|
1612
|
-
Isle of Man
|
|
1613
|
-
|
|
1614
|
-
Levi
|
|
1615
|
-
|
|
1616
|
-
27,410
|
|
1617
|
-
|
|
1618
|
-
\-£598.32
|
|
1619
|
-
|
|
1620
|
-
Nulla.tempor.augue@nibhdolor.ca
|
|
1621
|
-
|
|
1622
|
-
0855 608 0347
|
|
1623
|
-
|
|
1624
|
-
Tuvalu
|
|
1625
|
-
|
|
1626
|
-
Kyle
|
|
1627
|
-
|
|
1628
|
-
59,394
|
|
1629
|
-
|
|
1630
|
-
£19.79
|
|
1631
|
-
|
|
1632
|
-
lacinia@senectus.org
|
|
1633
|
-
|
|
1634
|
-
0845 46 40
|
|
1635
|
-
|
|
1636
|
-
Qatar
|
|
1637
|
-
|
|
1638
|
-
Emery
|
|
1639
|
-
|
|
1640
|
-
69,852
|
|
1641
|
-
|
|
1642
|
-
\-£784.52
|
|
1643
|
-
|
|
1644
|
-
Nulla.facilisis@nonummyultriciesornare.co.uk
|
|
1645
|
-
|
|
1646
|
-
(01553) 502913
|
|
1647
|
-
|
|
1648
|
-
Belize
|
|
1649
|
-
|
|
1650
|
-
Nadine
|
|
1651
|
-
|
|
1652
|
-
9,884
|
|
1653
|
-
|
|
1654
|
-
£97.94
|
|
1655
|
-
|
|
1656
|
-
Duis@Sed.ca
|
|
1657
|
-
|
|
1658
|
-
055 2785 0228
|
|
1659
|
-
|
|
1660
|
-
Uruguay
|
|
1661
|
-
|
|
1662
|
-
Dalton
|
|
1663
|
-
|
|
1664
|
-
60,037
|
|
1665
|
-
|
|
1666
|
-
£429.75
|
|
1667
|
-
|
|
1668
|
-
nibh.dolor.nonummy@laoreetlibero.org
|
|
1669
|
-
|
|
1670
|
-
0395 486 9374
|
|
1671
|
-
|
|
1672
|
-
Cayman Islands
|
|
1673
|
-
|
|
1674
|
-
Zeph
|
|
1675
|
-
|
|
1676
|
-
61,632
|
|
1677
|
-
|
|
1678
|
-
£256.51
|
|
1679
|
-
|
|
1680
|
-
non.dui@felisorci.com
|
|
1681
|
-
|
|
1682
|
-
0845 46 41
|
|
1683
|
-
|
|
1684
|
-
Niger
|
|
1685
|
-
|
|
1686
|
-
Shannon
|
|
1687
|
-
|
|
1688
|
-
6,613
|
|
1689
|
-
|
|
1690
|
-
£57.82
|
|
1691
|
-
|
|
1692
|
-
leo@lobortis.co.uk
|
|
1693
|
-
|
|
1694
|
-
0800 135593
|
|
1695
|
-
|
|
1696
|
-
Somalia
|
|
1697
|
-
|
|
1698
|
-
Erich
|
|
1699
|
-
|
|
1700
|
-
34,643
|
|
1701
|
-
|
|
1702
|
-
0.00
|
|
1703
|
-
|
|
1704
|
-
cursus.non.egestas@aliquet.org
|
|
1705
|
-
|
|
1706
|
-
0845 46 44
|
|
1707
|
-
|
|
1708
|
-
Sao Tome and Principe
|
|
1709
|
-
|
|
1710
|
-
Rhiannon
|
|
1711
|
-
|
|
1712
|
-
57,478
|
|
1713
|
-
|
|
1714
|
-
£125.61
|
|
1715
|
-
|
|
1716
|
-
arcu.Morbi.sit@cursus.edu
|
|
1717
|
-
|
|
1718
|
-
0361 311 4051
|
|
1719
|
-
|
|
1720
|
-
Croatia
|
|
1721
|
-
|
|
1722
|
-
Elijah
|
|
1723
|
-
|
|
1724
|
-
8,032
|
|
1725
|
-
|
|
1726
|
-
\-£936.24
|
|
1727
|
-
|
|
1728
|
-
ipsum.Donec.sollicitudin@leo.co.uk
|
|
1729
|
-
|
|
1730
|
-
0800 365 8250
|
|
1731
|
-
|
|
1732
|
-
San Marino
|
|
1733
|
-
|
|
1734
|
-
Grady
|
|
1735
|
-
|
|
1736
|
-
27,873
|
|
1737
|
-
|
|
1738
|
-
£474.66
|
|
1739
|
-
|
|
1740
|
-
mollis.nec.cursus@malesuadamalesuadaInteger.edu
|
|
1741
|
-
|
|
1742
|
-
070 2824 3427
|
|
1743
|
-
|
|
1744
|
-
Cuba
|
|
1745
|
-
|
|
1746
|
-
Quentin
|
|
1747
|
-
|
|
1748
|
-
56,391
|
|
1749
|
-
|
|
1750
|
-
\-£879.89
|
|
1751
|
-
|
|
1752
|
-
erat.vel@auctor.net
|
|
1753
|
-
|
|
1754
|
-
(029) 5052 0365
|
|
1755
|
-
|
|
1756
|
-
Mayotte
|
|
1757
|
-
|
|
1758
|
-
Samuel
|
|
1759
|
-
|
|
1760
|
-
76,919
|
|
1761
|
-
|
|
1762
|
-
£431.98
|
|
1763
|
-
|
|
1764
|
-
tellus@magnaSed.edu
|
|
1765
|
-
|
|
1766
|
-
07064 102166
|
|
1767
|
-
|
|
1768
|
-
Lebanon
|
|
1769
|
-
|
|
1770
|
-
Merritt
|
|
1771
|
-
|
|
1772
|
-
53,310
|
|
1773
|
-
|
|
1774
|
-
£103.21
|
|
1775
|
-
|
|
1776
|
-
interdum.Nunc.sollicitudin@elitpellentesque.edu
|
|
1777
|
-
|
|
1778
|
-
0800 825458
|
|
1779
|
-
|
|
1780
|
-
French Southern Territories
|
|
1781
|
-
|
|
1782
|
-
Harlan
|
|
1783
|
-
|
|
1784
|
-
88,270
|
|
1785
|
-
|
|
1786
|
-
£365.29
|
|
1787
|
-
|
|
1788
|
-
nascetur.ridiculus@feugiatmetussit.net
|
|
1789
|
-
|
|
1790
|
-
(012812) 59410
|
|
1791
|
-
|
|
1792
|
-
Saint Pierre and Miquelon
|
|
1793
|
-
|
|
1794
|
-
Stuart
|
|
1795
|
-
|
|
1796
|
-
83,845
|
|
1797
|
-
|
|
1798
|
-
£465.92
|
|
1799
|
-
|
|
1800
|
-
sed.pede.nec@maurisMorbinon.com
|
|
1801
|
-
|
|
1802
|
-
0807 013 3815
|
|
1803
|
-
|
|
1804
|
-
Jersey
|
|
1805
|
-
|
|
1806
|
-
Columns
|
|
1807
|
-
|
|
1808
|
-
Filters
|
|
1809
|
-
|
|
1810
|
-
Pivot Mode
|
|
1811
|
-
|
|
1812
|
-
Employee
|
|
1813
|
-
|
|
1814
|
-
First Name
|
|
1815
|
-
|
|
1816
|
-
Last Name
|
|
1817
|
-
|
|
1818
|
-
Personal ID
|
|
1819
|
-
|
|
1820
|
-
Date
|
|
1821
|
-
|
|
1822
|
-
Sales performance
|
|
1823
|
-
|
|
1824
|
-
Rating
|
|
1825
|
-
|
|
1826
|
-
Sales
|
|
1827
|
-
|
|
1828
|
-
Profit
|
|
1829
|
-
|
|
1830
|
-
Contact details
|
|
1831
|
-
|
|
1832
|
-
Email
|
|
1833
|
-
|
|
1834
|
-
Phone No
|
|
1835
|
-
|
|
1836
|
-
Address
|
|
1837
|
-
|
|
1838
|
-
Street
|
|
1839
|
-
|
|
1840
|
-
City
|
|
1841
|
-
|
|
1842
|
-
Postcode
|
|
1843
|
-
|
|
1844
|
-
Country
|
|
1845
|
-
|
|
1846
|
-
Row Groups
|
|
1847
|
-
|
|
1848
|
-
Drag here to set row groups
|
|
1849
|
-
|
|
1850
|
-
Values
|
|
1851
|
-
|
|
1852
|
-
Drag here to aggregate
|
|
1853
|
-
|
|
1854
|
-
Column Labels
|
|
1855
|
-
|
|
1856
|
-
Drag here to set column labels
|
|
1857
|
-
|
|
1858
|
-
Employee
|
|
1859
|
-
|
|
1860
|
-
Enabled
|
|
1861
|
-
|
|
1862
|
-
First Name
|
|
1863
|
-
|
|
1864
|
-
Last Name
|
|
1865
|
-
|
|
1866
|
-
Personal ID
|
|
1867
|
-
|
|
1868
|
-
Date
|
|
1869
|
-
|
|
1870
|
-
Sales performance
|
|
1871
|
-
|
|
1872
|
-
Enabled
|
|
1873
|
-
|
|
1874
|
-
Sales
|
|
1875
|
-
|
|
1876
|
-
Profit
|
|
1877
|
-
|
|
1878
|
-
Contact details
|
|
1879
|
-
|
|
1880
|
-
Enabled
|
|
1881
|
-
|
|
1882
|
-
Email
|
|
1883
|
-
|
|
1884
|
-
Phone No
|
|
1885
|
-
|
|
1886
|
-
Address
|
|
1887
|
-
|
|
1888
|
-
Enabled
|
|
1889
|
-
|
|
1890
|
-
Street
|
|
1891
|
-
|
|
1892
|
-
City
|
|
1893
|
-
|
|
1894
|
-
Postcode
|
|
1895
|
-
|
|
1896
|
-
Country
|
|
1897
|
-
|
|
1898
|
-
to of
|
|
1899
|
-
|
|
1900
|
-
Page of
|
|
1901
|
-
|
|
1902
|
-
Hide code
|
|
1903
|
-
|
|
1904
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
1905
|
-
|
|
1906
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
1907
|
-
import { AG\_GRID\_LICENSE\_KEY } from '@iress/ag-grid-license-key';
|
|
1908
|
-
import type {
|
|
1909
|
-
GridApi,
|
|
1910
|
-
GridReadyEvent,
|
|
1911
|
-
ValueFormatterParams,
|
|
1912
|
-
} from 'ag-grid-community';
|
|
1913
|
-
import { AgGridReact, AgGridReactProps } from 'ag-grid-react';
|
|
1914
|
-
import {
|
|
1915
|
-
AllEnterpriseModule,
|
|
1916
|
-
LicenseManager,
|
|
1917
|
-
ModuleRegistry,
|
|
1918
|
-
provideGlobalGridOptions,
|
|
1919
|
-
} from 'ag-grid-enterprise';
|
|
1920
|
-
import { AG\_THEME\_IRESS\_ICONS, IressAgGridContainer } from '@iress/ids-themes';
|
|
1921
|
-
import styles from '@iress-storybook/styles.module.scss';
|
|
1922
|
-
LicenseManager.setLicenseKey(AG\_GRID\_LICENSE\_KEY);
|
|
1923
|
-
ModuleRegistry.registerModules(\[AllEnterpriseModule\]);
|
|
1924
|
-
provideGlobalGridOptions({ theme: 'legacy' });
|
|
1925
|
-
const formatter2dp \= new Intl.NumberFormat('en-UK', {
|
|
1926
|
-
minimumFractionDigits: 2,
|
|
1927
|
-
maximumFractionDigits: 2,
|
|
1928
|
-
});
|
|
1929
|
-
const formatterCurrency \= new Intl.NumberFormat('en-UK', {
|
|
1930
|
-
minimumFractionDigits: 2,
|
|
1931
|
-
maximumFractionDigits: 2,
|
|
1932
|
-
currencySign: 'standard',
|
|
1933
|
-
currency: 'GBP',
|
|
1934
|
-
style: 'currency',
|
|
1935
|
-
});
|
|
1936
|
-
const getSales \= (number: number) \=> {
|
|
1937
|
-
const no \= number \* 100000;
|
|
1938
|
-
return Math.ceil(no);
|
|
1939
|
-
};
|
|
1940
|
-
const getProfit \= (number: number) \=> {
|
|
1941
|
-
const no \= number \> 0.5 ? number \* \-1000 : number \* 1000;
|
|
1942
|
-
return formatter2dp.format(no);
|
|
1943
|
-
};
|
|
1944
|
-
const getRating \= () \=> (Math.random() \> 0.5 ? 'red' : 'green');
|
|
1945
|
-
const BIG\_DATA \= \[
|
|
1946
|
-
{
|
|
1947
|
-
firstName: 'Shellie',
|
|
1948
|
-
lastName: 'Cantu',
|
|
1949
|
-
email: 'aliquet@purus.com',
|
|
1950
|
-
phoneNo: '0828 746 6831',
|
|
1951
|
-
street: '639-9644 Eget Street',
|
|
1952
|
-
city: 'Weißenfels',
|
|
1953
|
-
postcode: '37962',
|
|
1954
|
-
country: 'French Polynesia',
|
|
1955
|
-
personalID: '16011210 9582',
|
|
1956
|
-
},
|
|
1957
|
-
{
|
|
1958
|
-
firstName: 'Jade',
|
|
1959
|
-
lastName: 'Sellers',
|
|
1960
|
-
email: 'mi.pede.nonummy@senectus.org',
|
|
1961
|
-
phoneNo: '0800 360062',
|
|
1962
|
-
street: 'P.O. Box 511, 3099 In Rd.',
|
|
1963
|
-
city: 'Cochrane',
|
|
1964
|
-
postcode: 'K8I 3RB',
|
|
1965
|
-
country: 'Tonga',
|
|
1966
|
-
personalID: '16870328 2056',
|
|
1967
|
-
},
|
|
1968
|
-
{
|
|
1969
|
-
firstName: 'Wyoming',
|
|
1970
|
-
lastName: 'Fox',
|
|
1971
|
-
email: 'Nulla.tempor.augue@aliquamiaculis.org',
|
|
1972
|
-
phoneNo: '0800 377 7753',
|
|
1973
|
-
street: '7354 Ac Ave',
|
|
1974
|
-
city: 'East Kilbride',
|
|
1975
|
-
postcode: '233010',
|
|
1976
|
-
country: 'Rwanda',
|
|
1977
|
-
personalID: '16070816 5048',
|
|
1978
|
-
},
|
|
1979
|
-
{
|
|
1980
|
-
firstName: 'Christine',
|
|
1981
|
-
lastName: 'Holcomb',
|
|
1982
|
-
email: 'neque.sed.dictum@ultricesVivamus.ca',
|
|
1983
|
-
phoneNo: '07578 190673',
|
|
1984
|
-
street: 'Ap #121-4421 Iaculis Av.',
|
|
1985
|
-
city: 'Etroubles',
|
|
1986
|
-
postcode: '6742',
|
|
1987
|
-
country: 'Bahamas',
|
|
1988
|
-
personalID: '16401211 0773',
|
|
1989
|
-
},
|
|
1990
|
-
{
|
|
1991
|
-
firstName: 'Jameson',
|
|
1992
|
-
lastName: 'Sutton',
|
|
1993
|
-
email: 'sem.semper@liberoProin.com',
|
|
1994
|
-
phoneNo: '07489 442639',
|
|
1995
|
-
street: 'Ap #700-1481 Porttitor Ave',
|
|
1996
|
-
city: 'Nice',
|
|
1997
|
-
postcode: '14655',
|
|
1998
|
-
country: 'Nauru',
|
|
1999
|
-
personalID: '16301129 4323',
|
|
2000
|
-
},
|
|
2001
|
-
{
|
|
2002
|
-
firstName: 'Driscoll',
|
|
2003
|
-
lastName: 'Jenkins',
|
|
2004
|
-
email: 'libero.dui@estacfacilisis.edu',
|
|
2005
|
-
phoneNo: '0843 298 8205',
|
|
2006
|
-
street: 'Ap #775-8090 Sed Avenue',
|
|
2007
|
-
city: 'Natales',
|
|
2008
|
-
postcode: '622109',
|
|
2009
|
-
country: 'Tajikistan',
|
|
2010
|
-
personalID: '16430908 1950',
|
|
2011
|
-
},
|
|
2012
|
-
{
|
|
2013
|
-
firstName: 'Morgan',
|
|
2014
|
-
lastName: 'Hutchinson',
|
|
2015
|
-
email: 'mauris.eu@ipsum.ca',
|
|
2016
|
-
phoneNo: '070 6292 4498',
|
|
2017
|
-
street: '3135 Curabitur Rd.',
|
|
2018
|
-
city: 'Darmstadt',
|
|
2019
|
-
postcode: '010900',
|
|
2020
|
-
country: 'Colombia',
|
|
2021
|
-
personalID: '16890811 2991',
|
|
2022
|
-
},
|
|
2023
|
-
{
|
|
2024
|
-
firstName: 'Kylee',
|
|
2025
|
-
lastName: 'Riddle',
|
|
2026
|
-
email: 'libero.Proin@malesuadafamesac.com',
|
|
2027
|
-
phoneNo: '(017177) 84788',
|
|
2028
|
-
street: '7336 Ipsum St.',
|
|
2029
|
-
city: 'Semarang',
|
|
2030
|
-
postcode: '9828',
|
|
2031
|
-
country: 'Papua New Guinea',
|
|
2032
|
-
personalID: '16260701 0093',
|
|
2033
|
-
},
|
|
2034
|
-
{
|
|
2035
|
-
firstName: 'Cathleen',
|
|
2036
|
-
lastName: 'Dale',
|
|
2037
|
-
email: 'risus.Donec@augue.edu',
|
|
2038
|
-
phoneNo: '(0115) 224 4142',
|
|
2039
|
-
street: 'Ap #568-2948 Fringilla Rd.',
|
|
2040
|
-
city: 'Brandenburg',
|
|
2041
|
-
postcode: 'CH2L 4EH',
|
|
2042
|
-
country: 'Guinea-Bissau',
|
|
2043
|
-
personalID: '16161203 4817',
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
firstName: 'Sierra',
|
|
2047
|
-
lastName: 'Robbins',
|
|
2048
|
-
email: 'dictum.eleifend.nunc@tellus.net',
|
|
2049
|
-
phoneNo: '(01266) 957950',
|
|
2050
|
-
street: '481-6201 Mattis. Rd.',
|
|
2051
|
-
city: 'Upper Hutt',
|
|
2052
|
-
postcode: '23945',
|
|
2053
|
-
country: 'Isle of Man',
|
|
2054
|
-
personalID: '16691217 6010',
|
|
2055
|
-
},
|
|
2056
|
-
{
|
|
2057
|
-
firstName: 'Levi',
|
|
2058
|
-
lastName: 'Simpson',
|
|
2059
|
-
email: 'Nulla.tempor.augue@nibhdolor.ca',
|
|
2060
|
-
phoneNo: '0855 608 0347',
|
|
2061
|
-
street: '555-4187 Integer Av.',
|
|
2062
|
-
city: 'Curacaví',
|
|
2063
|
-
postcode: '439311',
|
|
2064
|
-
country: 'Tuvalu',
|
|
2065
|
-
personalID: '16000330 9499',
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
firstName: 'Kyle',
|
|
2069
|
-
lastName: 'Mendez',
|
|
2070
|
-
email: 'lacinia@senectus.org',
|
|
2071
|
-
phoneNo: '0845 46 40',
|
|
2072
|
-
street: '814-4647 Nec, St.',
|
|
2073
|
-
city: 'Akron',
|
|
2074
|
-
postcode: '199413',
|
|
2075
|
-
country: 'Qatar',
|
|
2076
|
-
personalID: '16471029 5397',
|
|
2077
|
-
},
|
|
2078
|
-
{
|
|
2079
|
-
firstName: 'Emery',
|
|
2080
|
-
lastName: 'Hurley',
|
|
2081
|
-
email: 'Nulla.facilisis@nonummyultriciesornare.co.uk',
|
|
2082
|
-
phoneNo: '(01553) 502913',
|
|
2083
|
-
street: '4540 Luctus Ave',
|
|
2084
|
-
city: 'Meux',
|
|
2085
|
-
postcode: '36612',
|
|
2086
|
-
country: 'Belize',
|
|
2087
|
-
personalID: '16440228 3842',
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
firstName: 'Nadine',
|
|
2091
|
-
lastName: 'Buchanan',
|
|
2092
|
-
email: 'Duis@Sed.ca',
|
|
2093
|
-
phoneNo: '055 2785 0228',
|
|
2094
|
-
street: '694 Mi, Av.',
|
|
2095
|
-
city: 'Middelburg',
|
|
2096
|
-
postcode: '62232-88887',
|
|
2097
|
-
country: 'Uruguay',
|
|
2098
|
-
personalID: '16721129 5857',
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
firstName: 'Dalton',
|
|
2102
|
-
lastName: 'Nieves',
|
|
2103
|
-
email: 'nibh.dolor.nonummy@laoreetlibero.org',
|
|
2104
|
-
phoneNo: '0395 486 9374',
|
|
2105
|
-
street: '797-8170 Enim, Street',
|
|
2106
|
-
city: 'Burhanpur',
|
|
2107
|
-
postcode: '29633-93750',
|
|
2108
|
-
country: 'Cayman Islands',
|
|
2109
|
-
personalID: '16600205 0067',
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
firstName: 'Zeph',
|
|
2113
|
-
lastName: 'Ruiz',
|
|
2114
|
-
email: 'non.dui@felisorci.com',
|
|
2115
|
-
phoneNo: '0845 46 41',
|
|
2116
|
-
street: 'Ap #282-8369 Malesuada Ave',
|
|
2117
|
-
city: 'Cavallino',
|
|
2118
|
-
postcode: 'EW2V 1ZE',
|
|
2119
|
-
country: 'Niger',
|
|
2120
|
-
personalID: '16580706 9124',
|
|
2121
|
-
},
|
|
2122
|
-
{
|
|
2123
|
-
firstName: 'Shannon',
|
|
2124
|
-
lastName: 'Decker',
|
|
2125
|
-
email: 'leo@lobortis.co.uk',
|
|
2126
|
-
phoneNo: '0800 135593',
|
|
2127
|
-
street: 'P.O. Box 587, 6871 Eleifend. Ave',
|
|
2128
|
-
city: 'Rocca San Felice',
|
|
2129
|
-
postcode: '42271-38735',
|
|
2130
|
-
country: 'Somalia',
|
|
2131
|
-
personalID: '16090810 4763',
|
|
2132
|
-
},
|
|
2133
|
-
{
|
|
2134
|
-
firstName: 'Erich',
|
|
2135
|
-
lastName: 'Daniels',
|
|
2136
|
-
email: 'cursus.non.egestas@aliquet.org',
|
|
2137
|
-
phoneNo: '0845 46 44',
|
|
2138
|
-
street: '689-4565 Velit. Avenue',
|
|
2139
|
-
city: 'Edmundston',
|
|
2140
|
-
postcode: 'JR32 7QA',
|
|
2141
|
-
country: 'Sao Tome and Principe',
|
|
2142
|
-
personalID: '16720401 5049',
|
|
2143
|
-
},
|
|
2144
|
-
{
|
|
2145
|
-
firstName: 'Rhiannon',
|
|
2146
|
-
lastName: 'Malone',
|
|
2147
|
-
email: 'arcu.Morbi.sit@cursus.edu',
|
|
2148
|
-
phoneNo: '0361 311 4051',
|
|
2149
|
-
street: 'Ap #971-1781 Vehicula Road',
|
|
2150
|
-
city: 'Wood Buffalo',
|
|
2151
|
-
postcode: '71682',
|
|
2152
|
-
country: 'Croatia',
|
|
2153
|
-
personalID: '16931028 3388',
|
|
2154
|
-
},
|
|
2155
|
-
{
|
|
2156
|
-
firstName: 'Elijah',
|
|
2157
|
-
lastName: 'Sosa',
|
|
2158
|
-
email: 'ipsum.Donec.sollicitudin@leo.co.uk',
|
|
2159
|
-
phoneNo: '0800 365 8250',
|
|
2160
|
-
street: 'P.O. Box 169, 2562 Commodo Ave',
|
|
2161
|
-
city: 'Montoggio',
|
|
2162
|
-
postcode: '42092',
|
|
2163
|
-
country: 'San Marino',
|
|
2164
|
-
personalID: '16251107 2403',
|
|
2165
|
-
},
|
|
2166
|
-
{
|
|
2167
|
-
firstName: 'Grady',
|
|
2168
|
-
lastName: 'Crosby',
|
|
2169
|
-
email: 'mollis.nec.cursus@malesuadamalesuadaInteger.edu',
|
|
2170
|
-
phoneNo: '070 2824 3427',
|
|
2171
|
-
street: '821-5145 Id, Ave',
|
|
2172
|
-
city: 'Rosoux-Crenwick',
|
|
2173
|
-
postcode: '56176',
|
|
2174
|
-
country: 'Cuba',
|
|
2175
|
-
personalID: '16520115 9133',
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
firstName: 'Quentin',
|
|
2179
|
-
lastName: 'Armstrong',
|
|
2180
|
-
email: 'erat.vel@auctor.net',
|
|
2181
|
-
phoneNo: '(029) 5052 0365',
|
|
2182
|
-
street: '157-253 Hendrerit Av.',
|
|
2183
|
-
city: 'Aubervilliers',
|
|
2184
|
-
postcode: '2151',
|
|
2185
|
-
country: 'Mayotte',
|
|
2186
|
-
personalID: '16730607 0553',
|
|
2187
|
-
},
|
|
2188
|
-
{
|
|
2189
|
-
firstName: 'Samuel',
|
|
2190
|
-
lastName: 'Harrell',
|
|
2191
|
-
email: 'tellus@magnaSed.edu',
|
|
2192
|
-
phoneNo: '07064 102166',
|
|
2193
|
-
street: 'P.O. Box 713, 4115 Ut Rd.',
|
|
2194
|
-
city: 'Kingston',
|
|
2195
|
-
postcode: '23315',
|
|
2196
|
-
country: 'Lebanon',
|
|
2197
|
-
personalID: '16361016 5551',
|
|
2198
|
-
},
|
|
2199
|
-
{
|
|
2200
|
-
firstName: 'Merritt',
|
|
2201
|
-
lastName: 'Holland',
|
|
2202
|
-
email: 'interdum.Nunc.sollicitudin@elitpellentesque.edu',
|
|
2203
|
-
phoneNo: '0800 825458',
|
|
2204
|
-
street: 'P.O. Box 261, 3590 Nascetur Road',
|
|
2205
|
-
city: 'Drancy',
|
|
2206
|
-
postcode: '760017',
|
|
2207
|
-
country: 'French Southern Territories',
|
|
2208
|
-
personalID: '16040311 2121',
|
|
2209
|
-
},
|
|
2210
|
-
{
|
|
2211
|
-
firstName: 'Harlan',
|
|
2212
|
-
lastName: 'Brennan',
|
|
2213
|
-
email: 'nascetur.ridiculus@feugiatmetussit.net',
|
|
2214
|
-
phoneNo: '(012812) 59410',
|
|
2215
|
-
street: '8210 Torquent Av.',
|
|
2216
|
-
city: 'Grantham',
|
|
2217
|
-
postcode: '01537',
|
|
2218
|
-
country: 'Saint Pierre and Miquelon',
|
|
2219
|
-
personalID: '16431216 0239',
|
|
2220
|
-
},
|
|
2221
|
-
{
|
|
2222
|
-
firstName: 'Stuart',
|
|
2223
|
-
lastName: 'Deleon',
|
|
2224
|
-
email: 'sed.pede.nec@maurisMorbinon.com',
|
|
2225
|
-
phoneNo: '0807 013 3815',
|
|
2226
|
-
street: 'P.O. Box 143, 4909 At Street',
|
|
2227
|
-
city: 'Terrance',
|
|
2228
|
-
postcode: '27218',
|
|
2229
|
-
country: 'Jersey',
|
|
2230
|
-
personalID: '16330207 5852',
|
|
2231
|
-
},
|
|
2232
|
-
{
|
|
2233
|
-
firstName: 'Clarke',
|
|
2234
|
-
lastName: 'Middleton',
|
|
2235
|
-
email: 'in@estacfacilisis.org',
|
|
2236
|
-
phoneNo: '(028) 5013 9648',
|
|
2237
|
-
street: '9856 Eget, Avenue',
|
|
2238
|
-
city: 'Solihull',
|
|
2239
|
-
postcode: '72893',
|
|
2240
|
-
country: 'Seychelles',
|
|
2241
|
-
personalID: '16340804 3325',
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
firstName: 'Roanna',
|
|
2245
|
-
lastName: 'Gentry',
|
|
2246
|
-
email: 'dui@nascetur.net',
|
|
2247
|
-
phoneNo: '(024) 3023 2962',
|
|
2248
|
-
street: '3566 Ornare. Rd.',
|
|
2249
|
-
city: 'Freiberg',
|
|
2250
|
-
postcode: '3899',
|
|
2251
|
-
country: 'Lesotho',
|
|
2252
|
-
personalID: '16680618 3791',
|
|
2253
|
-
},
|
|
2254
|
-
{
|
|
2255
|
-
firstName: 'Delilah',
|
|
2256
|
-
lastName: 'Bird',
|
|
2257
|
-
email: 'laoreet.lectus.quis@utaliquam.edu',
|
|
2258
|
-
phoneNo: '07160 224163',
|
|
2259
|
-
street: 'P.O. Box 332, 8565 Molestie Avenue',
|
|
2260
|
-
city: 'Washuk',
|
|
2261
|
-
postcode: '607065',
|
|
2262
|
-
country: 'Indonesia',
|
|
2263
|
-
personalID: '16891112 9461',
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
firstName: 'Georgia',
|
|
2267
|
-
lastName: 'Cash',
|
|
2268
|
-
email: 'dui@enimnisl.net',
|
|
2269
|
-
phoneNo: '(0113) 542 3955',
|
|
2270
|
-
street: '900-3252 Fusce Avenue',
|
|
2271
|
-
city: 'Sint-Michiels',
|
|
2272
|
-
postcode: 'Z8203',
|
|
2273
|
-
country: 'Niue',
|
|
2274
|
-
personalID: '16340718 4716',
|
|
2275
|
-
},
|
|
2276
|
-
{
|
|
2277
|
-
firstName: 'Aiko',
|
|
2278
|
-
lastName: 'Mclean',
|
|
2279
|
-
email: 'cubilia.Curae.Phasellus@augueid.com',
|
|
2280
|
-
phoneNo: '055 9506 2116',
|
|
2281
|
-
street: 'P.O. Box 786, 1756 Fringilla St.',
|
|
2282
|
-
city: 'Malonne',
|
|
2283
|
-
postcode: 'Y8E 7M2',
|
|
2284
|
-
country: 'Belize',
|
|
2285
|
-
personalID: '16680622 4207',
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
firstName: 'Winter',
|
|
2289
|
-
lastName: 'Jacobs',
|
|
2290
|
-
email: 'aliquet@Duisac.ca',
|
|
2291
|
-
phoneNo: '0800 693847',
|
|
2292
|
-
street: '774-9011 Arcu Road',
|
|
2293
|
-
city: 'Bilbo',
|
|
2294
|
-
postcode: '05558',
|
|
2295
|
-
country: 'Equatorial Guinea',
|
|
2296
|
-
personalID: '16611201 4144',
|
|
2297
|
-
},
|
|
2298
|
-
{
|
|
2299
|
-
firstName: 'Jolene',
|
|
2300
|
-
lastName: 'Rios',
|
|
2301
|
-
email: 'odio.Aliquam.vulputate@ac.ca',
|
|
2302
|
-
phoneNo: '(023) 4876 2215',
|
|
2303
|
-
street: 'Ap #325-8225 Amet Road',
|
|
2304
|
-
city: 'Limena',
|
|
2305
|
-
postcode: 'K56 0YJ',
|
|
2306
|
-
country: 'Morocco',
|
|
2307
|
-
personalID: '16170215 3485',
|
|
2308
|
-
},
|
|
2309
|
-
{
|
|
2310
|
-
firstName: 'Kaden',
|
|
2311
|
-
lastName: 'Morrow',
|
|
2312
|
-
email: 'rutrum@eleifendnec.ca',
|
|
2313
|
-
phoneNo: '07305 685548',
|
|
2314
|
-
street: '8870 Aliquam Road',
|
|
2315
|
-
city: 'Sète',
|
|
2316
|
-
postcode: '04908',
|
|
2317
|
-
country: 'Peru',
|
|
2318
|
-
personalID: '16820820 6675',
|
|
2319
|
-
},
|
|
2320
|
-
{
|
|
2321
|
-
firstName: 'Kaseem',
|
|
2322
|
-
lastName: 'Norris',
|
|
2323
|
-
email: 'mauris.erat.eget@nequeMorbi.com',
|
|
2324
|
-
phoneNo: '07275 403152',
|
|
2325
|
-
street: 'P.O. Box 776, 7115 Integer Avenue',
|
|
2326
|
-
city: 'Jönköping',
|
|
2327
|
-
postcode: '42236-83471',
|
|
2328
|
-
country: 'Sudan',
|
|
2329
|
-
personalID: '16440829 7895',
|
|
2330
|
-
},
|
|
2331
|
-
{
|
|
2332
|
-
firstName: 'Vladimir',
|
|
2333
|
-
lastName: 'Mcguire',
|
|
2334
|
-
email: 'id@nonarcuVivamus.edu',
|
|
2335
|
-
phoneNo: '0500 950469',
|
|
2336
|
-
street: '2067 Est Ave',
|
|
2337
|
-
city: 'Ziano di Fiemme',
|
|
2338
|
-
postcode: '774056',
|
|
2339
|
-
country: 'Mexico',
|
|
2340
|
-
personalID: '16771016 3796',
|
|
2341
|
-
},
|
|
2342
|
-
{
|
|
2343
|
-
firstName: 'Jocelyn',
|
|
2344
|
-
lastName: 'Schroeder',
|
|
2345
|
-
email: 'dolor@nec.ca',
|
|
2346
|
-
phoneNo: '07302 403156',
|
|
2347
|
-
street: 'Ap #155-3999 Vivamus St.',
|
|
2348
|
-
city: 'Malloa',
|
|
2349
|
-
postcode: '4059',
|
|
2350
|
-
country: 'Canada',
|
|
2351
|
-
personalID: '16530314 9388',
|
|
2352
|
-
},
|
|
2353
|
-
{
|
|
2354
|
-
firstName: 'Howard',
|
|
2355
|
-
lastName: 'Villarreal',
|
|
2356
|
-
email: 'Donec.felis@insodales.com',
|
|
2357
|
-
phoneNo: '07624 830239',
|
|
2358
|
-
street: '540-7057 Cras Rd.',
|
|
2359
|
-
city: 'Siverek',
|
|
2360
|
-
postcode: '8701',
|
|
2361
|
-
country: 'Seychelles',
|
|
2362
|
-
personalID: '16640823 8530',
|
|
2363
|
-
},
|
|
2364
|
-
{
|
|
2365
|
-
firstName: 'Adam',
|
|
2366
|
-
lastName: 'Miranda',
|
|
2367
|
-
email: 'amet.dapibus@faucibus.edu',
|
|
2368
|
-
phoneNo: '0845 46 49',
|
|
2369
|
-
street: 'Ap #931-6286 Diam. Avenue',
|
|
2370
|
-
city: 'Warburg',
|
|
2371
|
-
postcode: '01972',
|
|
2372
|
-
country: 'Jordan',
|
|
2373
|
-
personalID: '16370414 7911',
|
|
2374
|
-
},
|
|
2375
|
-
{
|
|
2376
|
-
firstName: 'Aiko',
|
|
2377
|
-
lastName: 'Elliott',
|
|
2378
|
-
email: 'sodales@mauris.edu',
|
|
2379
|
-
phoneNo: '0800 1111',
|
|
2380
|
-
street: 'P.O. Box 583, 6119 Ut St.',
|
|
2381
|
-
city: 'Villavicencio',
|
|
2382
|
-
postcode: '4864 XQ',
|
|
2383
|
-
country: 'Faroe Islands',
|
|
2384
|
-
personalID: '16940907 6115',
|
|
2385
|
-
},
|
|
2386
|
-
\].map((person) \=> ({
|
|
2387
|
-
...person,
|
|
2388
|
-
sales: getSales(Math.random()),
|
|
2389
|
-
profit: getProfit(Math.random()),
|
|
2390
|
-
redOrGreen: getRating(),
|
|
2391
|
-
date: new Date(Math.floor(Math.random() \* \-10000000000)).toDateString(),
|
|
2392
|
-
}));
|
|
2393
|
-
const createClassNameMutationObserver \= (
|
|
2394
|
-
element: HTMLElement,
|
|
2395
|
-
callback: (className: string) \=> void,
|
|
2396
|
-
): MutationObserver \=> {
|
|
2397
|
-
const observer \= new MutationObserver(() \=> {
|
|
2398
|
-
callback(element.className);
|
|
2399
|
-
});
|
|
2400
|
-
observer.observe(element, {
|
|
2401
|
-
attributes: true,
|
|
2402
|
-
attributeFilter: \['class'\],
|
|
2403
|
-
childList: false,
|
|
2404
|
-
characterData: false,
|
|
2405
|
-
});
|
|
2406
|
-
return observer;
|
|
2407
|
-
};
|
|
2408
|
-
const useClassNameMutationObserver \= (
|
|
2409
|
-
element: HTMLElement,
|
|
2410
|
-
callback: () \=> void,
|
|
2411
|
-
): void \=> {
|
|
2412
|
-
useEffect(() \=> {
|
|
2413
|
-
const observer \= createClassNameMutationObserver(element, callback);
|
|
2414
|
-
// Cleanup listener
|
|
2415
|
-
return (): void \=> {
|
|
2416
|
-
observer.disconnect();
|
|
2417
|
-
};
|
|
2418
|
-
});
|
|
2419
|
-
};
|
|
2420
|
-
const RedOrGreenFormatter \= (params: ValueFormatterParams) \=> {
|
|
2421
|
-
const dotStyle \= styles\[\`dot--${params.value}\`\];
|
|
2422
|
-
return <span className\={\`${styles.dot} ${dotStyle}\`} />;
|
|
2423
|
-
};
|
|
2424
|
-
const CommaFormatter \= (params: ValueFormatterParams): string \=> {
|
|
2425
|
-
return params.value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');
|
|
2426
|
-
};
|
|
2427
|
-
const CurrencyFormatter \= (params: ValueFormatterParams): string \=> {
|
|
2428
|
-
if (params.value \=== '0.00') {
|
|
2429
|
-
return formatter2dp.format(params.value);
|
|
2430
|
-
}
|
|
2431
|
-
return formatterCurrency.format(params.value);
|
|
2432
|
-
};
|
|
2433
|
-
export const AgGridCompact \= (args: AgGridReactProps) \=> {
|
|
2434
|
-
const \[rowData, setRowData\] \= useState(BIG\_DATA);
|
|
2435
|
-
const api \= useRef<GridApi\>();
|
|
2436
|
-
// pick one row at random to show data updating in the grid
|
|
2437
|
-
useEffect(() \=> {
|
|
2438
|
-
const updateTick \= setInterval(() \=> {
|
|
2439
|
-
const randomNo \= Math.random();
|
|
2440
|
-
const index \= Math.floor(Math.random() \* rowData.length);
|
|
2441
|
-
const itemToUpdate \= rowData\[index\];
|
|
2442
|
-
if (randomNo < 0.5) {
|
|
2443
|
-
itemToUpdate.sales \= getSales(Math.random());
|
|
2444
|
-
} else if (randomNo \> 0.9) {
|
|
2445
|
-
itemToUpdate.profit \= getProfit(0);
|
|
2446
|
-
} else {
|
|
2447
|
-
itemToUpdate.profit \= getProfit(Math.random());
|
|
2448
|
-
}
|
|
2449
|
-
setRowData(rowData);
|
|
2450
|
-
api.current?.refreshCells();
|
|
2451
|
-
}, 500);
|
|
2452
|
-
return () \=> {
|
|
2453
|
-
clearInterval(updateTick);
|
|
2454
|
-
};
|
|
2455
|
-
}, \[rowData\]);
|
|
2456
|
-
const onGridReady \= useCallback((event: GridReadyEvent): void \=> {
|
|
2457
|
-
api.current \= event.api;
|
|
2458
|
-
api.current.resetRowHeights();
|
|
2459
|
-
}, \[\]);
|
|
2460
|
-
useClassNameMutationObserver(document.documentElement, () \=> {
|
|
2461
|
-
if (api.current) {
|
|
2462
|
-
api.current.resetRowHeights();
|
|
2463
|
-
}
|
|
2464
|
-
});
|
|
2465
|
-
return (
|
|
2466
|
-
<IressAgGridContainer
|
|
2467
|
-
alignMiddle
|
|
2468
|
-
compact
|
|
2469
|
-
style\={{ height: '100vh', width: '100%' }}
|
|
2470
|
-
\>
|
|
2471
|
-
<AgGridReact {...args}
|
|
2472
|
-
onGridReady={onGridReady}
|
|
2473
|
-
rowDragManaged animateRows enableRangeSelection={true}
|
|
2474
|
-
enableCharts={true}
|
|
2475
|
-
sideBar={true}
|
|
2476
|
-
rowData={rowData}
|
|
2477
|
-
rowSelection="multiple" rowMultiSelectWithClick components={{
|
|
2478
|
-
redGreenDots: RedOrGreenFormatter,
|
|
2479
|
-
}}
|
|
2480
|
-
defaultColDef={{
|
|
2481
|
-
enableCellChangeFlash: true,
|
|
2482
|
-
resizable: true,
|
|
2483
|
-
sortable: true,
|
|
2484
|
-
unSortIcon: true,
|
|
2485
|
-
filter: true,
|
|
2486
|
-
floatingFilter: true,
|
|
2487
|
-
enablePivot: false,
|
|
2488
|
-
filterParams: {
|
|
2489
|
-
buttons: \['reset', 'apply'\],
|
|
2490
|
-
},
|
|
2491
|
-
autoHeight: true,
|
|
2492
|
-
wrapText: true,
|
|
2493
|
-
}}
|
|
2494
|
-
icons={AG\_THEME\_IRESS\_ICONS}
|
|
2495
|
-
columnDefs={\[
|
|
2496
|
-
{
|
|
2497
|
-
headerName: 'Employee',
|
|
2498
|
-
children: \[
|
|
2499
|
-
{
|
|
2500
|
-
field: 'firstName',
|
|
2501
|
-
editable: true,
|
|
2502
|
-
filter: 'agTextColumnFilter',
|
|
2503
|
-
headerTooltip: 'First name',
|
|
2504
|
-
rowDrag: true,
|
|
2505
|
-
lockVisible: true,
|
|
2506
|
-
tooltipField: 'firstName',
|
|
2507
|
-
},
|
|
2508
|
-
{
|
|
2509
|
-
field: 'lastName',
|
|
2510
|
-
editable: true,
|
|
2511
|
-
filter: 'agTextColumnFilter',
|
|
2512
|
-
headerTooltip: 'Surname',
|
|
2513
|
-
lockVisible: true,
|
|
2514
|
-
cellClass: 'iress-cell--divider',
|
|
2515
|
-
headerClass: 'iress-cell--divider',
|
|
2516
|
-
columnGroupShow: 'open',
|
|
2517
|
-
},
|
|
2518
|
-
{
|
|
2519
|
-
field: 'personalID',
|
|
2520
|
-
filter: 'agTextColumnFilter',
|
|
2521
|
-
headerTooltip: 'Personal ID',
|
|
2522
|
-
columnGroupShow: 'open',
|
|
2523
|
-
},
|
|
2524
|
-
{
|
|
2525
|
-
field: 'date',
|
|
2526
|
-
filter: 'agDateColumnFilter',
|
|
2527
|
-
headerTooltip: 'Date',
|
|
2528
|
-
columnGroupShow: 'open',
|
|
2529
|
-
},
|
|
2530
|
-
\],
|
|
2531
|
-
},
|
|
2532
|
-
{
|
|
2533
|
-
headerName: 'Sales performance',
|
|
2534
|
-
children: \[
|
|
2535
|
-
{
|
|
2536
|
-
field: 'redOrGreen',
|
|
2537
|
-
headerName: 'Rating',
|
|
2538
|
-
cellRenderer: 'redGreenDots',
|
|
2539
|
-
filter: false,
|
|
2540
|
-
},
|
|
2541
|
-
{
|
|
2542
|
-
field: 'sales',
|
|
2543
|
-
filter: 'agNumberColumnFilter',
|
|
2544
|
-
valueFormatter: CommaFormatter,
|
|
2545
|
-
},
|
|
2546
|
-
{
|
|
2547
|
-
field: 'profit',
|
|
2548
|
-
valueFormatter: CurrencyFormatter,
|
|
2549
|
-
cellClassRules: {
|
|
2550
|
-
'iress--positive': (params) \=> parseInt(params.value, 10) \> 0,
|
|
2551
|
-
'iress--negative': (params) \=> parseInt(params.value, 10) < 0,
|
|
2552
|
-
'iress--zero': (params) \=> params.value \=== '0.00',
|
|
2553
|
-
},
|
|
2554
|
-
},
|
|
2555
|
-
\],
|
|
2556
|
-
},
|
|
2557
|
-
{
|
|
2558
|
-
headerName: 'Contact details',
|
|
2559
|
-
children: \[
|
|
2560
|
-
{
|
|
2561
|
-
field: 'email',
|
|
2562
|
-
width: 350,
|
|
2563
|
-
filter: 'agTextColumnFilter',
|
|
2564
|
-
headerTooltip: 'Email address',
|
|
2565
|
-
cellClass: 'iress-cell--ellipsis',
|
|
2566
|
-
},
|
|
2567
|
-
{
|
|
2568
|
-
field: 'phoneNo',
|
|
2569
|
-
enableValue: true,
|
|
2570
|
-
filter: 'agTextColumnFilter',
|
|
2571
|
-
headerTooltip: 'Phone number',
|
|
2572
|
-
},
|
|
2573
|
-
\],
|
|
2574
|
-
},
|
|
2575
|
-
{
|
|
2576
|
-
headerName: 'Address',
|
|
2577
|
-
children: \[
|
|
2578
|
-
{
|
|
2579
|
-
field: 'street',
|
|
2580
|
-
width: 350,
|
|
2581
|
-
filter: 'agTextColumnFilter',
|
|
2582
|
-
cellClass: 'iress-cell--ellipsis',
|
|
2583
|
-
columnGroupShow: 'open',
|
|
2584
|
-
},
|
|
2585
|
-
{
|
|
2586
|
-
field: 'city',
|
|
2587
|
-
filter: 'agTextColumnFilter',
|
|
2588
|
-
columnGroupShow: 'open',
|
|
2589
|
-
},
|
|
2590
|
-
{
|
|
2591
|
-
field: 'postcode',
|
|
2592
|
-
filter: 'agTextColumnFilter',
|
|
2593
|
-
columnGroupShow: 'open',
|
|
2594
|
-
},
|
|
2595
|
-
{ field: 'country', filter: 'agTextColumnFilter' },
|
|
2596
|
-
\],
|
|
2597
|
-
},
|
|
2598
|
-
\]}
|
|
2599
|
-
/> </IressAgGridContainer\>
|
|
2600
|
-
);
|
|
2601
|
-
};
|
|
2602
|
-
export default AgGridCompact;
|
|
2603
|
-
|
|
2604
|
-
Copy
|
|
2605
|
-
|
|
2606
|
-
[](#utility-classes)Utility classes
|
|
2607
|
-
-----------------------------------
|
|
2608
|
-
|
|
2609
|
-
Because AG Grid is a third-party piece of software, we have to rely on utility classes to enforce styling of cell content. You can use the following utility classes.
|
|
2610
|
-
|
|
2611
|
-
| Class | Applied to | Effect |
|
|
2612
|
-
| --- | --- | --- |
|
|
2613
|
-
| iress--positive | Cell content | Adds buy / positive styling to match the IressText buy variant |
|
|
2614
|
-
| iress--negative | Cell content | Adds sell / negative styling to match the IressText sell variant |
|
|
2615
|
-
| iress--zero | Cell content | Reduces the visual weight of cells that have a value of zero |
|
|
2616
|
-
| iress-cell--divider | Column (via cellClass and headerCellClass) | Creates a vertical divide between this column and the next column |
|
|
2617
|
-
| iress-cell--ellipsis | Column (via cellClass) | Shows an ellipsis instead of wrapping text content |
|
|
2618
|
-
|
|
2619
|
-
[](#common-issues)Common issues
|
|
2620
|
-
-------------------------------
|
|
2621
|
-
|
|
2622
|
-
### [](#wrong-row-heights)Wrong row heights
|
|
2623
|
-
|
|
2624
|
-
If you are seeing grid rows not automatically adjusting to their content, you may have to set `autoHeight=true` on the column definition that will define the height (usually the one with the most content, or the first column).
|
|
2625
|
-
|
|
2626
|
-
\[data-radix-scroll-area-viewport\] {
|
|
2627
|
-
scrollbar-width: none;
|
|
2628
|
-
-ms-overflow-style: none;
|
|
2629
|
-
-webkit-overflow-scrolling: touch;
|
|
2630
|
-
}
|
|
2631
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
2632
|
-
display: none;
|
|
2633
|
-
}
|
|
2634
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
2635
|
-
display: flex;
|
|
2636
|
-
flex-direction: column;
|
|
2637
|
-
align-items: stretch;
|
|
2638
|
-
}
|
|
2639
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
2640
|
-
flex-grow: 1;
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
<AgGridReact columnDefs\={\[{ field: 'name', autoHeight: true }\]} />
|
|
2644
|
-
|
|
2645
|
-
Copy
|
|
2646
|
-
|
|
2647
|
-
Performance concerns
|
|
2648
|
-
--------------------
|
|
2649
|
-
|
|
2650
|
-
As `autoHeight` adds additional render calculations to the AG grid, you may notice reduced performance, particularly in larger tables. If this happens, you should set the `getRowHeight` property on AG Grid to a fixed row height.
|
|
2651
|
-
|
|
2652
|
-
On this page
|
|
2653
|
-
|
|
2654
|
-
* [Overview](#overview)
|
|
2655
|
-
* [Props](#props)
|
|
2656
|
-
* [Props (API)](#props-api)
|
|
2657
|
-
* [Usage](#usage)
|
|
2658
|
-
* [Installation](#installation)
|
|
2659
|
-
* [Version](#version)
|
|
2660
|
-
* [Examples](#examples)
|
|
2661
|
-
* [Simple](#simple)
|
|
2662
|
-
* [Complex](#complex)
|
|
2663
|
-
* [Compact](#compact)
|
|
2664
|
-
* [Utility classes](#utility-classes)
|
|
2665
|
-
* [Common issues](#common-issues)
|
|
2666
|
-
* [Wrong row heights](#wrong-row-heights)
|