@genesislcap/documentation-components 14.172.1-alpha-30b1afc.0 → 14.172.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"preview-components.template.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-components/preview-components.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,WAAY,MAAM,2EA4a/C,CAAC;AACF,eAAO,MAAM,yBAAyB,wEAErC,CAAC"}
1
+ {"version":3,"file":"preview-components.template.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-components/preview-components.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,WAAY,MAAM,2EAgb/C,CAAC;AACF,eAAO,MAAM,yBAAyB,wEAErC,CAAC"}
@@ -0,0 +1,26 @@
1
+ export declare const sampleRowData: ({
2
+ athlete: string;
3
+ age: number;
4
+ country: string;
5
+ year: number;
6
+ date: string;
7
+ sport: string;
8
+ gold: number;
9
+ silver: number;
10
+ bronze: number;
11
+ total: number;
12
+ isActionDisabled: boolean;
13
+ } | {
14
+ athlete: string;
15
+ age: number;
16
+ country: string;
17
+ year: number;
18
+ date: string;
19
+ sport: string;
20
+ gold: number;
21
+ silver: number;
22
+ bronze: number;
23
+ total: number;
24
+ isActionDisabled?: undefined;
25
+ })[];
26
+ //# sourceMappingURL=sampleRowData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampleRowData.d.ts","sourceRoot":"","sources":["../../../../../src/components/preview-grid/data/sampleRowData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;IAwXzB,CAAC"}
@@ -1,37 +1,56 @@
1
+ import type { ColDef, GridOptions } from '@ag-grid-community/core';
2
+ import { GridProRendererTypes } from '@genesislcap/foundation-zero-grid-pro';
1
3
  import { GridPro } from '@genesislcap/grid-pro';
2
4
  import { FASTElement } from '@microsoft/fast-element';
3
5
  export declare class PreviewGrid extends FASTElement {
4
6
  grid: GridPro;
5
7
  prefix: string;
6
8
  provider: HTMLElement;
7
- rowData: {
8
- make: string;
9
- model: string;
10
- price: number;
11
- creationDate: number;
12
- isCool: boolean;
13
- }[];
14
- columnDefs: {
15
- field: string;
16
- }[];
17
- gridOptions: {
18
- defaultColDef: {
19
- resizable: boolean;
20
- filter: boolean;
9
+ rowData: ({
10
+ athlete: string;
11
+ age: number;
12
+ country: string;
13
+ year: number;
14
+ date: string;
15
+ sport: string;
16
+ gold: number;
17
+ silver: number;
18
+ bronze: number;
19
+ total: number;
20
+ isActionDisabled: boolean;
21
+ } | {
22
+ athlete: string;
23
+ age: number;
24
+ country: string;
25
+ year: number;
26
+ date: string;
27
+ sport: string;
28
+ gold: number;
29
+ silver: number;
30
+ bronze: number;
31
+ total: number;
32
+ isActionDisabled?: undefined;
33
+ })[];
34
+ columnDefs: ColDef[];
35
+ gridOptions: GridOptions;
36
+ setGridOptions(): void;
37
+ myCustomCheckboxRenderer: (params: any) => any;
38
+ multipleCustomFoundationColumnConfigs: any[];
39
+ private multipleActions;
40
+ multipleActionsMenuSlottedConfig: ColDef;
41
+ singleActionSlottedConfig: {
42
+ headerName: string;
43
+ width: number;
44
+ cellRenderer: GridProRendererTypes;
45
+ cellRendererParams: {
46
+ actionClick: (rowData: any) => void;
47
+ actionName: string;
48
+ appearance: string;
49
+ isDisabled: (rowData: any) => boolean;
50
+ dataTestId: string;
51
+ uniqueFieldName: string;
21
52
  };
22
- debug: boolean;
23
- columnDefs: {
24
- field: string;
25
- }[];
26
- rowData: {
27
- make: string;
28
- model: string;
29
- price: number;
30
- creationDate: number;
31
- isCool: boolean;
32
- }[];
33
53
  };
34
- setGridOptions(): void;
35
54
  connectedCallback(): void;
36
55
  private handleStyleChanges;
37
56
  private handleDSChanges;
@@ -1 +1 @@
1
- {"version":3,"file":"preview-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-grid/preview-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAA4B,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAM5F,qBAKa,WAAY,SAAQ,WAAW;IAEnC,IAAI,EAAE,OAAO,CAAC;IACR,MAAM,SAAU;IAGtB,QAAQ,EAAE,WAAW,CAAC;IAEV,OAAO;;;;;;QA4BxB;IAEiB,UAAU;;QAM3B;IAEiB,WAAW;;;;;;;;;;;;;;;;MAQ5B;IAEK,cAAc;IAIrB,iBAAiB;IAejB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,eAAe;CAMxB"}
1
+ {"version":3,"file":"preview-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-grid/preview-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAqB,MAAM,uCAAuC,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAA4B,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAO5F,qBAKa,WAAY,SAAQ,WAAW;IAEnC,IAAI,EAAE,OAAO,CAAC;IACR,MAAM,SAAU;IAGtB,QAAQ,EAAE,WAAW,CAAC;IAEjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;SAAsB;IAE7B,UAAU,EAAE,MAAM,EAAE,CA2C9B;IAEiB,WAAW,EAAE,WAAW,CAQzC;IAEK,cAAc;IAGrB,wBAAwB,uBAOtB;IAEK,qCAAqC,EAAE,GAAG,EAAE,CAWjD;IAEF,OAAO,CAAC,eAAe,CAiBrB;IAEK,gCAAgC,EAAE,MAAM,CAS7C;IAEK,yBAAyB;;;;;;;;;;;;MAc9B;IAEF,iBAAiB;IAejB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,eAAe;CAMxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"preview-grid.template.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-grid/preview-grid.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,WAAW,WAAY,MAAM,qEAQzC,CAAC;AACF,eAAO,MAAM,mBAAmB,kEAE/B,CAAC"}
1
+ {"version":3,"file":"preview-grid.template.d.ts","sourceRoot":"","sources":["../../../../src/components/preview-grid/preview-grid.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,WAAW,WAAY,MAAM,qEAiCzC,CAAC;AACF,eAAO,MAAM,mBAAmB,kEAE/B,CAAC"}
@@ -184,6 +184,9 @@ export const previewComponents = (prefix) => html `
184
184
  <${prefix}-button appearance="${(x) => x.buttonAppearanceAccent}" slot="bottom" @click="${(x) => x.closeDialog('dialog')}">
185
185
  Close this dialog
186
186
  </${prefix}-button>
187
+ <${prefix}-button appearance="${(x) => x.buttonAppearanceAccent}" slot="bottom" >
188
+ Confirm
189
+ </${prefix}-button>
187
190
  </${prefix}-dialog>
188
191
  <div ${ref('errorDialogContainer')}></div>
189
192
  </div>
@@ -0,0 +1,377 @@
1
+ export const sampleRowData = [
2
+ {
3
+ athlete: 'Michael Phelps',
4
+ age: 23,
5
+ country: 'United States',
6
+ year: 2008,
7
+ date: '24/08/2008',
8
+ sport: 'Swimming',
9
+ gold: 8,
10
+ silver: 0,
11
+ bronze: 0,
12
+ total: 8,
13
+ isActionDisabled: true,
14
+ },
15
+ {
16
+ athlete: 'Michael Phelps',
17
+ age: 19,
18
+ country: 'United States',
19
+ year: 2004,
20
+ date: '29/08/2004',
21
+ sport: 'Swimming',
22
+ gold: 6,
23
+ silver: 0,
24
+ bronze: 2,
25
+ total: 8,
26
+ },
27
+ {
28
+ athlete: 'Michael Phelps',
29
+ age: 27,
30
+ country: 'United States',
31
+ year: 2012,
32
+ date: '12/08/2012',
33
+ sport: 'Swimming',
34
+ gold: 4,
35
+ silver: 2,
36
+ bronze: 0,
37
+ total: 6,
38
+ },
39
+ {
40
+ athlete: 'Natalie Coughlin',
41
+ age: 25,
42
+ country: 'United States',
43
+ year: 2008,
44
+ date: '24/08/2008',
45
+ sport: 'Swimming',
46
+ gold: 1,
47
+ silver: 2,
48
+ bronze: 3,
49
+ total: 6,
50
+ isActionDisabled: true,
51
+ },
52
+ {
53
+ athlete: 'Aleksey Nemov',
54
+ age: 24,
55
+ country: 'Russia',
56
+ year: 2000,
57
+ date: '01/10/2000',
58
+ sport: 'Gymnastics',
59
+ gold: 2,
60
+ silver: 1,
61
+ bronze: 3,
62
+ total: 6,
63
+ },
64
+ {
65
+ athlete: 'Alicia Coutts',
66
+ age: 24,
67
+ country: 'Australia',
68
+ year: 2012,
69
+ date: '12/08/2012',
70
+ sport: 'Swimming',
71
+ gold: 1,
72
+ silver: 3,
73
+ bronze: 1,
74
+ total: 5,
75
+ isActionDisabled: true,
76
+ },
77
+ {
78
+ athlete: 'Missy Franklin',
79
+ age: 17,
80
+ country: 'United States',
81
+ year: 2012,
82
+ date: '12/08/2012',
83
+ sport: 'Swimming',
84
+ gold: 4,
85
+ silver: 0,
86
+ bronze: 1,
87
+ total: 5,
88
+ },
89
+ {
90
+ athlete: 'Ryan Lochte',
91
+ age: 27,
92
+ country: 'United States',
93
+ year: 2012,
94
+ date: '12/08/2012',
95
+ sport: 'Swimming',
96
+ gold: 2,
97
+ silver: 2,
98
+ bronze: 1,
99
+ total: 5,
100
+ },
101
+ {
102
+ athlete: 'Allison Schmitt',
103
+ age: 22,
104
+ country: 'United States',
105
+ year: 2012,
106
+ date: '12/08/2012',
107
+ sport: 'Swimming',
108
+ gold: 3,
109
+ silver: 1,
110
+ bronze: 1,
111
+ total: 5,
112
+ },
113
+ {
114
+ athlete: 'Natalie Coughlin',
115
+ age: 21,
116
+ country: 'United States',
117
+ year: 2004,
118
+ date: '29/08/2004',
119
+ sport: 'Swimming',
120
+ gold: 2,
121
+ silver: 2,
122
+ bronze: 1,
123
+ total: 5,
124
+ },
125
+ {
126
+ athlete: 'Ian Thorpe',
127
+ age: 17,
128
+ country: 'Australia',
129
+ year: 2000,
130
+ date: '01/10/2000',
131
+ sport: 'Swimming',
132
+ gold: 3,
133
+ silver: 2,
134
+ bronze: 0,
135
+ total: 5,
136
+ },
137
+ {
138
+ athlete: 'Dara Torres',
139
+ age: 33,
140
+ country: 'United States',
141
+ year: 2000,
142
+ date: '01/10/2000',
143
+ sport: 'Swimming',
144
+ gold: 2,
145
+ silver: 0,
146
+ bronze: 3,
147
+ total: 5,
148
+ },
149
+ {
150
+ athlete: 'Cindy Klassen',
151
+ age: 26,
152
+ country: 'Canada',
153
+ year: 2006,
154
+ date: '26/02/2006',
155
+ sport: 'Speed Skating',
156
+ gold: 1,
157
+ silver: 2,
158
+ bronze: 2,
159
+ total: 5,
160
+ },
161
+ {
162
+ athlete: 'Nastia Liukin',
163
+ age: 18,
164
+ country: 'United States',
165
+ year: 2008,
166
+ date: '24/08/2008',
167
+ sport: 'Gymnastics',
168
+ gold: 1,
169
+ silver: 3,
170
+ bronze: 1,
171
+ total: 5,
172
+ },
173
+ {
174
+ athlete: 'Marit Bjørgen',
175
+ age: 29,
176
+ country: 'Norway',
177
+ year: 2010,
178
+ date: '28/02/2010',
179
+ sport: 'Cross Country Skiing',
180
+ gold: 3,
181
+ silver: 1,
182
+ bronze: 1,
183
+ total: 5,
184
+ },
185
+ {
186
+ athlete: 'Sun Yang',
187
+ age: 20,
188
+ country: 'China',
189
+ year: 2012,
190
+ date: '12/08/2012',
191
+ sport: 'Swimming',
192
+ gold: 2,
193
+ silver: 1,
194
+ bronze: 1,
195
+ total: 4,
196
+ },
197
+ {
198
+ athlete: 'Kirsty Coventry',
199
+ age: 24,
200
+ country: 'Zimbabwe',
201
+ year: 2008,
202
+ date: '24/08/2008',
203
+ sport: 'Swimming',
204
+ gold: 1,
205
+ silver: 3,
206
+ bronze: 0,
207
+ total: 4,
208
+ },
209
+ {
210
+ athlete: 'Libby Lenton-Trickett',
211
+ age: 23,
212
+ country: 'Australia',
213
+ year: 2008,
214
+ date: '24/08/2008',
215
+ sport: 'Swimming',
216
+ gold: 2,
217
+ silver: 1,
218
+ bronze: 1,
219
+ total: 4,
220
+ },
221
+ {
222
+ athlete: 'Ryan Lochte',
223
+ age: 24,
224
+ country: 'United States',
225
+ year: 2008,
226
+ date: '24/08/2008',
227
+ sport: 'Swimming',
228
+ gold: 2,
229
+ silver: 0,
230
+ bronze: 2,
231
+ total: 4,
232
+ },
233
+ {
234
+ athlete: 'Inge de Bruijn',
235
+ age: 30,
236
+ country: 'Netherlands',
237
+ year: 2004,
238
+ date: '29/08/2004',
239
+ sport: 'Swimming',
240
+ gold: 1,
241
+ silver: 1,
242
+ bronze: 2,
243
+ total: 4,
244
+ },
245
+ {
246
+ athlete: 'Petria Thomas',
247
+ age: 28,
248
+ country: 'Australia',
249
+ year: 2004,
250
+ date: '29/08/2004',
251
+ sport: 'Swimming',
252
+ gold: 3,
253
+ silver: 1,
254
+ bronze: 0,
255
+ total: 4,
256
+ },
257
+ {
258
+ athlete: 'Ian Thorpe',
259
+ age: 21,
260
+ country: 'Australia',
261
+ year: 2004,
262
+ date: '29/08/2004',
263
+ sport: 'Swimming',
264
+ gold: 2,
265
+ silver: 1,
266
+ bronze: 1,
267
+ total: 4,
268
+ },
269
+ {
270
+ athlete: 'Inge de Bruijn',
271
+ age: 27,
272
+ country: 'Netherlands',
273
+ year: 2000,
274
+ date: '01/10/2000',
275
+ sport: 'Swimming',
276
+ gold: 3,
277
+ silver: 1,
278
+ bronze: 0,
279
+ total: 4,
280
+ },
281
+ {
282
+ athlete: 'Gary Hall Jr.',
283
+ age: 25,
284
+ country: 'United States',
285
+ year: 2000,
286
+ date: '01/10/2000',
287
+ sport: 'Swimming',
288
+ gold: 2,
289
+ silver: 1,
290
+ bronze: 1,
291
+ total: 4,
292
+ },
293
+ {
294
+ athlete: 'Michael Klim',
295
+ age: 23,
296
+ country: 'Australia',
297
+ year: 2000,
298
+ date: '01/10/2000',
299
+ sport: 'Swimming',
300
+ gold: 2,
301
+ silver: 2,
302
+ bronze: 0,
303
+ total: 4,
304
+ },
305
+ {
306
+ athlete: "Susie O'Neill",
307
+ age: 27,
308
+ country: 'Australia',
309
+ year: 2000,
310
+ date: '01/10/2000',
311
+ sport: 'Swimming',
312
+ gold: 1,
313
+ silver: 3,
314
+ bronze: 0,
315
+ total: 4,
316
+ },
317
+ {
318
+ athlete: 'Jenny Thompson',
319
+ age: 27,
320
+ country: 'United States',
321
+ year: 2000,
322
+ date: '01/10/2000',
323
+ sport: 'Swimming',
324
+ gold: 3,
325
+ silver: 0,
326
+ bronze: 1,
327
+ total: 4,
328
+ },
329
+ {
330
+ athlete: 'Pieter van den Hoogenband',
331
+ age: 22,
332
+ country: 'Netherlands',
333
+ year: 2000,
334
+ date: '01/10/2000',
335
+ sport: 'Swimming',
336
+ gold: 2,
337
+ silver: 0,
338
+ bronze: 2,
339
+ total: 4,
340
+ },
341
+ {
342
+ athlete: 'An Hyeon-Su',
343
+ age: 20,
344
+ country: 'South Korea',
345
+ year: 2006,
346
+ date: '26/02/2006',
347
+ sport: 'Short-Track Speed Skating',
348
+ gold: 3,
349
+ silver: 0,
350
+ bronze: 1,
351
+ total: 4,
352
+ },
353
+ {
354
+ athlete: 'Aliya Mustafina',
355
+ age: 17,
356
+ country: 'Russia',
357
+ year: 2012,
358
+ date: '12/08/2012',
359
+ sport: 'Gymnastics',
360
+ gold: 1,
361
+ silver: 1,
362
+ bronze: 2,
363
+ total: 4,
364
+ },
365
+ {
366
+ athlete: 'Shawn Johnson',
367
+ age: 16,
368
+ country: 'United States',
369
+ year: 2008,
370
+ date: '24/08/2008',
371
+ sport: 'Gymnastics',
372
+ gold: 1,
373
+ silver: 3,
374
+ bronze: 0,
375
+ total: 4,
376
+ },
377
+ ];
@@ -1,6 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
+ import { GridProRendererTypes, getActionsMenuDef } from '@genesislcap/foundation-zero-grid-pro';
2
3
  import { bodyFont } from '@microsoft/fast-components';
3
4
  import { attr, customElement, DOM, FASTElement, observable } from '@microsoft/fast-element';
5
+ import { sampleRowData } from './data/sampleRowData';
4
6
  import { defaultBodyFont, EventName } from '../../types';
5
7
  import { applyStyleChanges } from '../../utils/utils';
6
8
  import { PreviewGridStyles as styles } from './preview-grid.styles';
@@ -9,36 +11,47 @@ let PreviewGrid = class PreviewGrid extends FASTElement {
9
11
  constructor() {
10
12
  super(...arguments);
11
13
  this.prefix = 'zero';
12
- this.rowData = [
13
- { make: 'Toyota', model: 'Celica', price: 35000, creationDate: 1617624494293, isCool: true },
14
- { make: 'Ford', model: 'Mondeo', price: 32000, creationDate: 1617624494295, isCool: false },
15
- { make: 'Porsche', model: 'Boxter', price: 72000, creationDate: 1619637452397, isCool: false },
16
- { make: 'Audi', model: 'A6', price: 80000, creationDate: 1617624494293, isCool: true },
17
- { make: 'Renault', model: 'Clio', price: 20000, creationDate: 1617624494295, isCool: true },
14
+ this.rowData = [...sampleRowData];
15
+ this.columnDefs = [
16
+ { headerName: '#', colId: 'rowNum', valueGetter: 'node.id', width: 80, pinned: 'left' },
17
+ { headerName: 'Athlete', field: 'athlete', width: 150, pinned: 'left' },
18
+ { headerName: 'Age', field: 'age', width: 90, pinned: 'left' },
19
+ { headerName: 'Country', field: 'country', width: 150 },
20
+ { headerName: 'Year', field: 'year', width: 90 },
18
21
  {
19
- make: 'Chevrolet',
20
- model: 'Camaro',
21
- price: 40000,
22
- creationDate: 1619637452397,
23
- isCool: false,
22
+ headerName: 'Date',
23
+ field: 'date',
24
+ width: 110,
25
+ filter: 'agDateColumnFilter',
26
+ filterParams: {
27
+ buttons: ['apply', 'reset'],
28
+ browserDatePicker: true,
29
+ comparator: (filterLocalDateAtMidnight, cellValue) => {
30
+ // Handling '29/08/2004' date format - adjust as need to match your date format
31
+ // https://www.ag-grid.com/javascript-data-grid/filter-date/
32
+ const dateAsString = cellValue;
33
+ if (dateAsString == null)
34
+ return -1;
35
+ const dateParts = dateAsString.split('/');
36
+ const cellDate = new Date(Number(dateParts[2]), Number(dateParts[1]) - 1, Number(dateParts[0]));
37
+ if (filterLocalDateAtMidnight.getTime() === cellDate.getTime()) {
38
+ return 0;
39
+ }
40
+ if (cellDate < filterLocalDateAtMidnight) {
41
+ return -1;
42
+ }
43
+ if (cellDate > filterLocalDateAtMidnight) {
44
+ return 1;
45
+ }
46
+ return 0;
47
+ },
48
+ },
24
49
  },
25
- { make: 'BMW', model: 'Z8', price: 90000, creationDate: 1617624494293, isCool: false },
26
- { make: 'Suzuki', model: 'Jimny', price: 23000, creationDate: 1617624494295, isCool: false },
27
- { make: 'Toyota', model: 'Celica', price: 35000, creationDate: 1619637452397, isCool: true },
28
- { make: 'Ford', model: 'Mondeo', price: 32000, creationDate: 1617624494293, isCool: false },
29
- { make: 'Porsche', model: 'Boxter', price: 72000, creationDate: 1617624494295, isCool: true },
30
- { make: 'Audi', model: 'A6', price: 80000, creationDate: 1619637452397, isCool: false },
31
- { make: 'Renault', model: 'Clio', price: 20000, creationDate: 1617624494293, isCool: false },
32
- { make: 'Chevrolet', model: 'Camaro', price: 40000, creationDate: 1617624494295, isCool: true },
33
- { make: 'BMW', model: 'Z8', price: 90000, creationDate: 1619637452397, isCool: true },
34
- { make: 'Suzuki', model: 'Jimny', price: 23000, creationDate: 1617624494293, isCool: true },
35
- ];
36
- this.columnDefs = [
37
- { field: 'make' },
38
- { field: 'model' },
39
- { field: 'price' },
40
- { field: 'creationDate' },
41
- { field: 'isCool' },
50
+ { headerName: 'Sport', field: 'sport', width: 150, editable: true },
51
+ { headerName: 'Gold', field: 'gold', width: 100 },
52
+ { headerName: 'Silver', field: 'silver', width: 100 },
53
+ { headerName: 'Bronze', field: 'bronze', width: 100 },
54
+ { headerName: 'Total', field: 'total', width: 100, pinned: 'right' },
42
55
  ];
43
56
  this.gridOptions = {
44
57
  defaultColDef: {
@@ -49,6 +62,62 @@ let PreviewGrid = class PreviewGrid extends FASTElement {
49
62
  columnDefs: this.columnDefs,
50
63
  rowData: this.rowData,
51
64
  };
65
+ this.myCustomCheckboxRenderer = (params) => {
66
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
67
+ if (params.value === 2012) {
68
+ return `<div><span style="color: var(--warning-color); font-weight: bold;">${params.value}</span></div>`;
69
+ }
70
+ return params.value;
71
+ };
72
+ this.multipleCustomFoundationColumnConfigs = [
73
+ {
74
+ headerName: 'Country',
75
+ field: 'country',
76
+ cellRenderer: GridProRendererTypes.boolean,
77
+ },
78
+ {
79
+ headerName: 'Year',
80
+ field: 'year',
81
+ cellRenderer: this.myCustomCheckboxRenderer,
82
+ },
83
+ ];
84
+ this.multipleActions = [
85
+ {
86
+ name: 'View',
87
+ callback: (rowData) => console.log('VIEWW!!!', rowData),
88
+ },
89
+ {
90
+ name: 'Delete',
91
+ callback: (rowData) => console.log('DELETE!!!', rowData),
92
+ },
93
+ {
94
+ name: 'Edit',
95
+ callback: (rowData) => console.log('EDIT!!!', rowData),
96
+ },
97
+ {
98
+ name: 'Wait',
99
+ callback: (rowData) => console.log('WHAT???', rowData),
100
+ },
101
+ ];
102
+ this.multipleActionsMenuSlottedConfig = getActionsMenuDef(this.multipleActions, {
103
+ headerName: 'Multiple Actions',
104
+ width: 140,
105
+ }, '⋮', true, 'stealth');
106
+ this.singleActionSlottedConfig = {
107
+ headerName: 'Single Action',
108
+ width: 200,
109
+ cellRenderer: GridProRendererTypes.action,
110
+ cellRendererParams: {
111
+ actionClick: (rowData) => console.log('CLICKED ON SINGLE ACTION!!!!', rowData),
112
+ actionName: 'Single Action',
113
+ appearance: 'accent',
114
+ isDisabled: (rowData) => {
115
+ return !!rowData.isActionDisabled;
116
+ },
117
+ dataTestId: 'singleActionTestId#',
118
+ uniqueFieldName: 'UNIQUE_ID',
119
+ },
120
+ };
52
121
  }
53
122
  setGridOptions() {
54
123
  this.grid.gridOptions = this.gridOptions;
@@ -12,6 +12,6 @@ export const PreviewGridStyles = css `
12
12
  }
13
13
 
14
14
  .grid-height {
15
- height: 450px;
15
+ height: 100%;
16
16
  }
17
17
  `;
@@ -1,9 +1,28 @@
1
- import { html, ref } from '@microsoft/fast-element';
1
+ import { html, ref, repeat, when } from '@microsoft/fast-element';
2
2
  export const previewGrid = (prefix) => html `
3
3
  <template>
4
4
  <${prefix}-design-system-provider ${ref('provider')}>
5
5
  <div class="grid-height">
6
- <${prefix}-grid-pro ${ref('grid')}></${prefix}-grid-pro>
6
+ <${prefix}-grid-pro
7
+ ${ref('grid')}
8
+ rowHeight="45"
9
+ headerHeight="45"
10
+ singleClickEdit="true"
11
+ persist-column-state-key="zero-grid-pro-state"
12
+ >
13
+ ${repeat((x) => x.multipleCustomFoundationColumnConfigs, html `
14
+ <grid-pro-column :definition=${(x) => x}>
15
+ ${when((x) => x.cellRenderer, html `
16
+ <grid-pro-cell
17
+ :renderer=${(x) => x.cellRenderer}
18
+ :rendererParams=${(x) => x.cellRendererParams}
19
+ ></grid-pro-cell>
20
+ `)}
21
+ </grid-pro-column>
22
+ `)}
23
+ <grid-pro-column :definition=${(x) => x.multipleActionsMenuSlottedConfig}></grid-pro-column>
24
+ <grid-pro-column :definition=${(x) => x.singleActionSlottedConfig}></grid-pro-column>
25
+ </${prefix}-grid-pro>
7
26
  </div>
8
27
  </${prefix}-design-system-provider>
9
28
  </template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/documentation-components",
3
3
  "description": "Genesis Foundation Dcoumentation Components",
4
- "version": "14.172.1-alpha-30b1afc.0",
4
+ "version": "14.172.2",
5
5
  "sideEffects": [
6
6
  "*.css"
7
7
  ],
@@ -23,25 +23,26 @@
23
23
  "clean": "rimraf dist tsconfig.tsbuildinfo"
24
24
  },
25
25
  "devDependencies": {
26
- "@genesislcap/genx": "14.172.1-alpha-30b1afc.0",
27
- "@genesislcap/rollup-builder": "14.172.1-alpha-30b1afc.0",
28
- "@genesislcap/ts-builder": "14.172.1-alpha-30b1afc.0",
29
- "@genesislcap/uvu-playwright-builder": "14.172.1-alpha-30b1afc.0",
30
- "@genesislcap/vite-builder": "14.172.1-alpha-30b1afc.0",
31
- "@genesislcap/webpack-builder": "14.172.1-alpha-30b1afc.0",
26
+ "@genesislcap/genx": "14.172.2",
27
+ "@genesislcap/rollup-builder": "14.172.2",
28
+ "@genesislcap/ts-builder": "14.172.2",
29
+ "@genesislcap/uvu-playwright-builder": "14.172.2",
30
+ "@genesislcap/vite-builder": "14.172.2",
31
+ "@genesislcap/webpack-builder": "14.172.2",
32
32
  "rimraf": "^3.0.2"
33
33
  },
34
34
  "dependencies": {
35
- "@genesislcap/alpha-design-system": "14.172.1-alpha-30b1afc.0",
36
- "@genesislcap/foundation-forms": "14.172.1-alpha-30b1afc.0",
37
- "@genesislcap/foundation-logger": "14.172.1-alpha-30b1afc.0",
38
- "@genesislcap/foundation-ui": "14.172.1-alpha-30b1afc.0",
39
- "@genesislcap/foundation-utils": "14.172.1-alpha-30b1afc.0",
40
- "@genesislcap/foundation-zero": "14.172.1-alpha-30b1afc.0",
41
- "@genesislcap/foundation-zero-grid-pro": "14.172.1-alpha-30b1afc.0",
42
- "@genesislcap/grid-pro": "14.172.1-alpha-30b1afc.0",
43
- "@genesislcap/rapid-design-system": "14.172.1-alpha-30b1afc.0",
44
- "@genesislcap/rapid-grid-pro": "14.172.1-alpha-30b1afc.0",
35
+ "@ag-grid-community/core": "29.2.0",
36
+ "@genesislcap/alpha-design-system": "14.172.2",
37
+ "@genesislcap/foundation-forms": "14.172.2",
38
+ "@genesislcap/foundation-logger": "14.172.2",
39
+ "@genesislcap/foundation-ui": "14.172.2",
40
+ "@genesislcap/foundation-utils": "14.172.2",
41
+ "@genesislcap/foundation-zero": "14.172.2",
42
+ "@genesislcap/foundation-zero-grid-pro": "14.172.2",
43
+ "@genesislcap/grid-pro": "14.172.2",
44
+ "@genesislcap/rapid-design-system": "14.172.2",
45
+ "@genesislcap/rapid-grid-pro": "14.172.2",
45
46
  "@jsonforms/core": "^3.0.0",
46
47
  "@microsoft/fast-colors": "^5.3.1",
47
48
  "@microsoft/fast-components": "^2.30.6",
@@ -58,5 +59,5 @@
58
59
  "publishConfig": {
59
60
  "access": "public"
60
61
  },
61
- "gitHead": "03cac2d0ae1984bbe5f54f6792f5265fa2545476"
62
+ "gitHead": "a6749638692882168d42f082894d110a07f735fc"
62
63
  }