@syncfusion/ej2-treemap 29.1.33 → 30.1.37

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.
Files changed (47) hide show
  1. package/.eslintrc.json +2 -0
  2. package/dist/ej2-treemap.min.js +2 -2
  3. package/dist/ej2-treemap.umd.min.js +2 -2
  4. package/dist/ej2-treemap.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treemap.es2015.js +1 -1
  6. package/dist/es6/ej2-treemap.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treemap.es5.js +1 -1
  8. package/dist/es6/ej2-treemap.es5.js.map +1 -1
  9. package/dist/global/ej2-treemap.min.js +2 -2
  10. package/dist/global/ej2-treemap.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/dist/ts/index.d.ts +4 -0
  13. package/dist/ts/index.ts +4 -0
  14. package/dist/ts/treemap/index.d.ts +19 -0
  15. package/dist/ts/treemap/index.ts +19 -0
  16. package/dist/ts/treemap/layout/legend.d.ts +137 -0
  17. package/dist/ts/treemap/layout/legend.ts +1095 -0
  18. package/dist/ts/treemap/layout/render-panel.d.ts +47 -0
  19. package/dist/ts/treemap/layout/render-panel.ts +758 -0
  20. package/dist/ts/treemap/model/base-model.d.ts +795 -0
  21. package/dist/ts/treemap/model/base.d.ts +671 -0
  22. package/dist/ts/treemap/model/base.ts +798 -0
  23. package/dist/ts/treemap/model/constants.d.ts +117 -0
  24. package/dist/ts/treemap/model/constants.ts +118 -0
  25. package/dist/ts/treemap/model/image-export.d.ts +34 -0
  26. package/dist/ts/treemap/model/image-export.ts +117 -0
  27. package/dist/ts/treemap/model/interface.d.ts +555 -0
  28. package/dist/ts/treemap/model/interface.ts +583 -0
  29. package/dist/ts/treemap/model/pdf-export.d.ts +36 -0
  30. package/dist/ts/treemap/model/pdf-export.ts +105 -0
  31. package/dist/ts/treemap/model/print.d.ts +45 -0
  32. package/dist/ts/treemap/model/print.ts +106 -0
  33. package/dist/ts/treemap/model/theme.d.ts +19 -0
  34. package/dist/ts/treemap/model/theme.ts +450 -0
  35. package/dist/ts/treemap/treemap-model.d.ts +374 -0
  36. package/dist/ts/treemap/treemap.d.ts +724 -0
  37. package/dist/ts/treemap/treemap.ts +1817 -0
  38. package/dist/ts/treemap/user-interaction/highlight-selection.d.ts +118 -0
  39. package/dist/ts/treemap/user-interaction/highlight-selection.ts +799 -0
  40. package/dist/ts/treemap/user-interaction/tooltip.d.ts +42 -0
  41. package/dist/ts/treemap/user-interaction/tooltip.ts +228 -0
  42. package/dist/ts/treemap/utils/enum.d.ts +256 -0
  43. package/dist/ts/treemap/utils/enum.ts +263 -0
  44. package/dist/ts/treemap/utils/helper.d.ts +543 -0
  45. package/dist/ts/treemap/utils/helper.ts +1453 -0
  46. package/package.json +12 -13
  47. package/src/treemap/utils/helper.js +1 -1
@@ -0,0 +1,583 @@
1
+ import { TreeMap } from '../../treemap/treemap';
2
+ import { BorderModel, FontModel } from '../model/base-model';
3
+ import { LegendShape, LegendPosition } from '../utils/enum';
4
+ import { Size } from '../utils/helper';
5
+
6
+
7
+ /**
8
+ * Specifies the event argument for the treemap.
9
+ *
10
+ * @private
11
+ */
12
+ export interface ITreeMapEventArgs {
13
+ /** Defines the name of the event. */
14
+ name: string;
15
+ /**
16
+ * Specifies the cancel state for the event. The default value is false.
17
+ * If set as true, the event progress will be stopped.
18
+ */
19
+ cancel: boolean;
20
+ }
21
+ /**
22
+ * Specifies the event arguments for print event in treemap.
23
+ */
24
+ export interface IPrintEventArgs extends ITreeMapEventArgs {
25
+ /**
26
+ * Specifies the html content that is printed. The html content returned is usually the id string of the treemap.
27
+ */
28
+ htmlContent: Element;
29
+ }
30
+ /**
31
+ * Specifies the event arguments for load event in treemap.
32
+ */
33
+ export interface ILoadEventArgs extends ITreeMapEventArgs {
34
+ /** Defines the current treemap instance.
35
+ *
36
+ * @deprecated
37
+ */
38
+ treemap?: TreeMap;
39
+ }
40
+
41
+ /**
42
+ * Specifies the event arguments for loaded event in treemap.
43
+ */
44
+ export interface ILoadedEventArgs extends ITreeMapEventArgs {
45
+ /** Defines the current treemap instance.
46
+ *
47
+ * @deprecated
48
+ */
49
+ treemap?: TreeMap;
50
+
51
+ /** Specifies whether the treemap is resized or not.
52
+ */
53
+ isResized: boolean;
54
+ }
55
+
56
+ /**
57
+ * Specifies the event arguments in item rendering event in treemap.
58
+ */
59
+ export interface IItemRenderingEventArgs extends ITreeMapEventArgs {
60
+ /** Defines the current treemap instance.
61
+ *
62
+ * @deprecated
63
+ */
64
+ treemap?: TreeMap;
65
+ /**
66
+ * Defines the current rendering item.
67
+ */
68
+ currentItem: Object;
69
+ /**
70
+ * Defines all the items for rendering.
71
+ */
72
+ RenderItems?: Object[];
73
+ /**
74
+ * Defines the options for the treemap item rendering.
75
+ */
76
+ options: Object;
77
+ /**
78
+ * Defines the label of the treemap item.
79
+ */
80
+ text: string;
81
+ /**
82
+ * Defines the text color of the TreeMap item.
83
+ */
84
+ textColor: string;
85
+ }
86
+
87
+ /**
88
+ * Specifies the event arguments for the drill down start event of treemap.
89
+ */
90
+ export interface IDrillStartEventArgs extends ITreeMapEventArgs {
91
+ /** Defines the current treemap instance.
92
+ *
93
+ * @deprecated
94
+ */
95
+ treemap?: TreeMap;
96
+ /**
97
+ * Defines the current drill-down item.
98
+ */
99
+ item: Object;
100
+ /**
101
+ * Defines the current element of drill-down.
102
+ */
103
+ element: Element;
104
+ /**
105
+ * Defines the level of the treemap item.
106
+ */
107
+ groupIndex: number;
108
+ /**
109
+ * Defines the parent name of the treemap item.
110
+ */
111
+ groupName: string;
112
+ /**
113
+ * Returns whether the right click is performed or not.
114
+ */
115
+ rightClick: boolean;
116
+ /**
117
+ * Defines the details of the child level items in the drill start event.
118
+ */
119
+ childItems: Object;
120
+ }
121
+
122
+ /**
123
+ * Specifies the event arguments for the drill down end event of the treemap.
124
+ */
125
+ export interface IDrillEndEventArgs extends ITreeMapEventArgs {
126
+ /** Defines the current treemap instance.
127
+ *
128
+ * @deprecated
129
+ */
130
+ treemap?: TreeMap;
131
+ /**
132
+ * Defines all the items which is rendered after drill down.
133
+ */
134
+ renderItems: Object[];
135
+ }
136
+
137
+ /**
138
+ * Defines the event arguments for treemap item click event.
139
+ */
140
+ export interface IItemClickEventArgs extends ITreeMapEventArgs {
141
+ /** Defines the current treemap instance.
142
+ *
143
+ * @deprecated
144
+ */
145
+ treemap?: TreeMap;
146
+ /**
147
+ * Defines the current item in the click event.
148
+ *
149
+ * @isGenericType true
150
+ */
151
+ item: Object;
152
+ /**
153
+ * Defines the original mouse event arguments.
154
+ */
155
+ mouseEvent: PointerEvent;
156
+ /**
157
+ * Defines the index of the level of the current treemap item.
158
+ */
159
+ groupIndex: number;
160
+ /**
161
+ * Defines the name of the parent item of the current treemap item.
162
+ */
163
+ groupName: string;
164
+ /**
165
+ * Defines the label of the current treemap item.
166
+ */
167
+ text: string;
168
+ /**
169
+ * Defines the template of the treemap item which is added as custom element for the labels in the treemap.
170
+ */
171
+ contentItemTemplate : string;
172
+ }
173
+
174
+ /**
175
+ * Defines the event argument of the treemap item data.
176
+ *
177
+ * @private
178
+ */
179
+ export interface IItemDataEventArgs {
180
+ /**
181
+ * Defines the name of the treemap item.
182
+ */
183
+ name: string;
184
+ /**
185
+ * Defines the level of the current treemap item.
186
+ */
187
+ groupIndex: number;
188
+ /**
189
+ * Defines the parent name of the current treemap item.
190
+ */
191
+ groupName: string;
192
+ /**
193
+ * Specifies whether the drill down is performed or not.
194
+ */
195
+ isDrilled: boolean;
196
+ /**
197
+ * Specifies whether the item is leaf item or not.
198
+ */
199
+ isLeafItem: boolean;
200
+ /**
201
+ * Defines the item area in the treemap.
202
+ */
203
+ itemArea: number;
204
+ /**
205
+ * Defines the name of the parent level of the treemap item.
206
+ */
207
+ levelOrderName: string;
208
+ /**
209
+ * Defines the options provided in the event arguments
210
+ */
211
+ options?: Object;
212
+ /**
213
+ * Specifies the rect element in the event.
214
+ */
215
+ rect?: Object;
216
+ }
217
+
218
+ /**
219
+ * Specifies the event arguments available when mouse move action is performed on the treemap items.
220
+ */
221
+ export interface IItemMoveEventArgs extends ITreeMapEventArgs {
222
+ /** Defines the current treemap instance.
223
+ *
224
+ * @deprecated
225
+ */
226
+ treemap?: TreeMap;
227
+ /**
228
+ * Defines the current item on which mouse is moved.
229
+ *
230
+ * @isGenericType true
231
+ */
232
+ item: Object;
233
+ /**
234
+ * Defines the original mouse event argument.
235
+ */
236
+ mouseEvent: PointerEvent;
237
+ }
238
+
239
+ /**
240
+ * Specifies the event arguments available when click event is performed on the treemap items.
241
+ */
242
+ export interface IClickEventArgs extends ITreeMapEventArgs {
243
+ /** Defines the current treemap instance.
244
+ *
245
+ * @deprecated
246
+ */
247
+ treemap?: TreeMap;
248
+ /**
249
+ * Defines the original mouse event arguments.
250
+ */
251
+ mouseEvent: PointerEvent;
252
+ }
253
+
254
+ /**
255
+ * Specifies the event arguments available when double click action is performed on the treemap items.
256
+ */
257
+ export interface IDoubleClickEventArgs extends ITreeMapEventArgs {
258
+ /** Defines the current treemap instance.
259
+ *
260
+ * @deprecated
261
+ */
262
+ treemap?: TreeMap;
263
+ /**
264
+ * Defines the original mouse event arguments.
265
+ */
266
+ mouseEvent: PointerEvent;
267
+ }
268
+
269
+ /**
270
+ * Specifies the event arguments available when right click action is performed on the treemap items.
271
+ */
272
+ export interface IRightClickEventArgs extends ITreeMapEventArgs {
273
+ /** Defines the current treemap instance.
274
+ *
275
+ * @deprecated
276
+ */
277
+ treemap?: TreeMap;
278
+ /**
279
+ * Defines the original mouse event arguments.
280
+ */
281
+ mouseEvent: PointerEvent;
282
+ }
283
+
284
+ /**
285
+ * Specifies the event arguments available when mouse action is performed on the treemap items.
286
+ */
287
+ export interface IMouseMoveEventArgs extends ITreeMapEventArgs {
288
+ /** Defines the current treemap instance.
289
+ *
290
+ * @deprecated
291
+ */
292
+ treemap?: TreeMap;
293
+ /**
294
+ * Defines the original mouse event arguments.
295
+ */
296
+ mouseEvent: PointerEvent;
297
+ }
298
+
299
+ /**
300
+ * Specifies the event arguments available when the leaf item is selected in the treemap.
301
+ */
302
+ export interface IItemSelectedEventArgs extends ITreeMapEventArgs {
303
+ /** Defines the current treemap instance.
304
+ *
305
+ * @deprecated
306
+ */
307
+ treemap?: TreeMap;
308
+ /**
309
+ * Specifies the current selected item.
310
+ */
311
+ items: Object[];
312
+ /**
313
+ * Specifies the current selected elements.
314
+ */
315
+ elements: Element[];
316
+ /**
317
+ * Defines the label of the current selected item.
318
+ */
319
+ text: string;
320
+ /**
321
+ * Defines the template of the treemap item which is added as custom element for the labels in the treemap.
322
+ */
323
+ contentItemTemplate : string;
324
+ }
325
+
326
+ /**
327
+ * Specifies the event arguments available when the item is highlighted in the treemap.
328
+ */
329
+ export interface IItemHighlightEventArgs extends ITreeMapEventArgs {
330
+ /**
331
+ * Defines the current treemap instance.
332
+ *
333
+ * @deprecated
334
+ */
335
+ treemap?: TreeMap;
336
+ /**
337
+ * Defines the current item which is highlighted.
338
+ */
339
+ items: Object[];
340
+ /**
341
+ * Defines the current highlighted elements.
342
+ */
343
+ elements: Element[];
344
+ }
345
+
346
+ /**
347
+ * Specifies the event arguments available when the tooltip is rendered in the treemap.
348
+ */
349
+ export interface ITreeMapTooltipRenderEventArgs extends ITreeMapEventArgs {
350
+ /** Defines the current treemap instance.
351
+ *
352
+ * @deprecated
353
+ */
354
+ treemap?: TreeMap;
355
+ /**
356
+ * Defines the current treemap item in which the tooltip appears.
357
+ */
358
+ item: Object;
359
+ /**
360
+ * Defines the options for customizing the tooltip.
361
+ */
362
+ options: Object;
363
+ /**
364
+ * Defines the element of the current item on which tooltip is rendered.
365
+ */
366
+ element?: Element;
367
+ /**
368
+ * Defines the original mouse event arguments.
369
+ */
370
+ eventArgs: PointerEvent;
371
+ }
372
+
373
+ /**
374
+ * Specifies the event arguments available for the tooltip events in the treemap.
375
+ *
376
+ * @private
377
+ */
378
+ export interface ITreeMapTooltipArgs extends ITreeMapEventArgs {
379
+ /**
380
+ * Defines the location of the tooltip rendering event.
381
+ */
382
+ location: Object;
383
+ /**
384
+ * Defines the text rendered in the tooltip.
385
+ */
386
+ text: string[];
387
+ /**
388
+ * Defines the data for rendering the tooltip.
389
+ */
390
+ data: Object;
391
+ /**
392
+ * Defines the text style for customizing the tooltip text.
393
+ */
394
+ textStyle: FontModel;
395
+ /**
396
+ * Defines the template for rendering the tooltip.
397
+ *
398
+ * @aspType string
399
+ */
400
+ template: string | Function;
401
+ }
402
+
403
+ /**
404
+ * Specifies the event arguments available when rendering each legend item in the treemap.
405
+ */
406
+ export interface ILegendItemRenderingEventArgs extends ITreeMapEventArgs {
407
+ /**
408
+ * Defines the current treemap instance.
409
+ *
410
+ * @deprecated
411
+ */
412
+ treemap?: TreeMap;
413
+ /**
414
+ * Specifies the shape color of the current legend item.
415
+ */
416
+ fill?: string;
417
+ /**
418
+ * Specifies the options for customizing the color and width of the shape border.
419
+ */
420
+ shapeBorder?: BorderModel;
421
+ /**
422
+ * Defines the shape of the current legend item.
423
+ */
424
+ shape?: LegendShape;
425
+ /**
426
+ * Defines the URL of the legend if the shape is set as image.
427
+ */
428
+ imageUrl?: string;
429
+ }
430
+
431
+ /**
432
+ * Specifies the event arguments available when rendering the legend in the treemap.
433
+ */
434
+ export interface ILegendRenderingEventArgs extends ITreeMapEventArgs {
435
+ /**
436
+ * Defines the current treemap instance.
437
+ *
438
+ * @deprecated
439
+ */
440
+ treemap?: TreeMap;
441
+ /**
442
+ * Specifies the position of the legend in the treemap.
443
+ */
444
+ position?: LegendPosition;
445
+ /**
446
+ * Specifies the position of the legend in the treemap.
447
+ */
448
+ _changePosition?: LegendPosition;
449
+ }
450
+
451
+
452
+ /**
453
+ * Specifies the event arguments available for resize event of the treemap.
454
+ */
455
+ export interface IResizeEventArgs extends ITreeMapEventArgs {
456
+ /** Defines the size of the treemap before resizing the window. */
457
+ previousSize: Size;
458
+ /** Defines the size of the treemap after resizing the window. */
459
+ currentSize: Size;
460
+ /** Defines the treemap instance.
461
+ *
462
+ * @deprecated
463
+ */
464
+ treemap?: TreeMap;
465
+ }
466
+
467
+
468
+ /**
469
+ * @private
470
+ */
471
+ export interface IFontMapping {
472
+ size?: string;
473
+ color?: string;
474
+ fontWeight?: string;
475
+ fontStyle?: string;
476
+ fontFamily?: string;
477
+ }
478
+
479
+
480
+ /**
481
+ * @private
482
+ */
483
+ export interface IShapes {
484
+ renderOption?: Object;
485
+ functionName?: string;
486
+ }
487
+
488
+
489
+ /**
490
+ * Defines the theme supported for treemap.
491
+ *
492
+ * @private
493
+ */
494
+ export interface IThemeStyle {
495
+ /**
496
+ * Defines the background color of the treemap, supporting the theme.
497
+ */
498
+ backgroundColor: string;
499
+ /**
500
+ * Defines the title text color of the treemap, supporting the theme.
501
+ */
502
+ titleFontColor: string;
503
+ /**
504
+ * Defines the title font weight of the treemap, supporting the theme.
505
+ */
506
+ titleFontWeight: string;
507
+ /**
508
+ * Defines the subtitle text color of the treemap, supporting the theme.
509
+ */
510
+ subTitleFontColor: string;
511
+ /**
512
+ * Defines the tooltip fill color of the treemap, supporting the theme.
513
+ */
514
+ tooltipFillColor: string;
515
+ /**
516
+ * Defines the tooltip text color of the treemap supporting the theme.
517
+ */
518
+ tooltipFontColor: string;
519
+ /**
520
+ * Defines the tooltip text size of the treemap supporting the theme.
521
+ */
522
+ tooltipFontSize: string;
523
+ /**
524
+ * Defines the opacity of tooltip in the treemap, supporting the theme.
525
+ */
526
+ tooltipFillOpacity?: number;
527
+ /**
528
+ * Defines the opacity of tooltip text in the treemap, supporting the theme.
529
+ */
530
+ tooltipTextOpacity?: number;
531
+ /**
532
+ * Defines the color of the legend title in the treemap, supporting the theme.
533
+ */
534
+ legendTitleColor: string;
535
+ /**
536
+ * Defines the color of the legend text in the treemap, supporting the theme.
537
+ */
538
+ legendTextColor: string;
539
+ /**
540
+ * Defines the font weight of texts in the treemap, supporting the theme.
541
+ */
542
+ fontWeight?: string;
543
+ /**
544
+ * Defines the font family of texts in the treemap, supporting the theme.
545
+ */
546
+ fontFamily?: string;
547
+ /**
548
+ * Defines the font size of the texts in the treemap, supporting the theme.
549
+ */
550
+ fontSize?: string;
551
+ /**
552
+ * Defines the font size of the texts in the subtitle of the TreeMap, supporting the theme.
553
+ */
554
+ subtitleFontSize?: string;
555
+ /**
556
+ * Defines the font size of the legend texts in the treemap, supporting the theme.
557
+ */
558
+ legendFontSize?: string;
559
+ /**
560
+ * Defines the font family of the label contents in the treemap, supporting the theme.
561
+ */
562
+ labelFontFamily?: string;
563
+ /**
564
+ * Defines the font size of the label contents in the treemap, supporting the theme.
565
+ */
566
+ labelFontSize?: string;
567
+ /**
568
+ * Defines the border color of the legend in the treemap, supporting the theme.
569
+ */
570
+ legendBorderColor?: string;
571
+ /**
572
+ * Defines the border width of the legend in the treemap, supporting the theme.
573
+ */
574
+ legendBorderWidth?: number;
575
+ /**
576
+ * Defines the border color of the tooltip in the treemap, supporting the theme.
577
+ */
578
+ tooltipBorderColor?: string;
579
+ /**
580
+ * Defines the border width of the tooltip in the treemap, supporting the theme.
581
+ */
582
+ tooltipBorderWidth?: number;
583
+ }
@@ -0,0 +1,36 @@
1
+ import { TreeMap } from '../../index';
2
+ import { ExportType } from '../utils/enum';
3
+ import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
4
+ /**
5
+ * PdfExport module handles the export to pdf functionality for treemap.
6
+ *
7
+ * @hidden
8
+ */
9
+ export declare class PdfExport {
10
+ /**
11
+ * Constructor for Maps
12
+ *
13
+ * @param {TreeMap} control - Specifies the treemap instance
14
+ */
15
+ constructor(control: TreeMap);
16
+ /**
17
+ * This method is used to perform the export functionality for the rendered treemap.
18
+ *
19
+ * @param {TreeMap} treeMap - Specifies the treemap instance.
20
+ * @param {ExportType} type - Specifies the type of the document.
21
+ * @param {string} fileName - Specifies the name of the document.
22
+ * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the treemap.
23
+ * @param {boolean} allowDownload - Specifies whether to download the document or not.
24
+ * @returns {Promise} - Returns the string.
25
+ * @private
26
+ */
27
+ export(treeMap: TreeMap, type: ExportType, fileName: string, orientation?: PdfPageOrientation, allowDownload?: boolean): Promise<string>;
28
+ protected getModuleName(): string;
29
+ /**
30
+ * To destroy the PdfExport.
31
+ *
32
+ * @returns {void}
33
+ * @private
34
+ */
35
+ destroy(): void;
36
+ }