@progress/kendo-angular-excel-export 4.0.4 → 5.0.0-next.202204010856

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 (82) hide show
  1. package/bundles/kendo-angular-excel-export.umd.js +5 -0
  2. package/{dist/es2015/columns → columns}/column-base.d.ts +4 -1
  3. package/{dist/es2015/columns → columns}/column-group.component.d.ts +3 -0
  4. package/{dist/es2015/columns → columns}/column.component.d.ts +3 -0
  5. package/{dist/es2015/columns → columns}/footer-template.directive.d.ts +3 -0
  6. package/{dist/es2015/columns → columns}/group-footer-template.directive.d.ts +3 -0
  7. package/{dist/es2015/columns → columns}/group-header-column-template.directive.d.ts +3 -0
  8. package/{dist/es2015/columns → columns}/group-header-template.directive.d.ts +3 -0
  9. package/esm2015/columns/column-base.js +41 -0
  10. package/esm2015/columns/column-group.component.js +43 -0
  11. package/esm2015/columns/column.component.js +68 -0
  12. package/esm2015/columns/footer-template.directive.js +26 -0
  13. package/esm2015/columns/group-footer-template.directive.js +26 -0
  14. package/esm2015/columns/group-header-column-template.directive.js +25 -0
  15. package/esm2015/columns/group-header-template.directive.js +26 -0
  16. package/{dist/es → esm2015}/excel-export-data.js +1 -0
  17. package/{dist/es2015 → esm2015}/excel-export.component.js +54 -69
  18. package/{dist/es2015 → esm2015}/excel-export.module.js +25 -10
  19. package/{dist/es2015/excel-export-data.js → esm2015/kendo-angular-excel-export.js} +4 -0
  20. package/{dist/es2015 → esm2015}/main.js +1 -0
  21. package/{dist/es2015 → esm2015}/ooxml/cell-options.interface.js +1 -0
  22. package/{dist/es2015 → esm2015}/ooxml/exporter-columns.js +0 -7
  23. package/{dist/es2015 → esm2015}/ooxml/workbook.js +0 -0
  24. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  25. package/{dist/es2015/excel-export-data.d.ts → excel-export-data.d.ts} +0 -0
  26. package/{dist/es2015/excel-export.component.d.ts → excel-export.component.d.ts} +3 -0
  27. package/{dist/es2015/excel-export.module.d.ts → excel-export.module.d.ts} +11 -0
  28. package/fesm2015/kendo-angular-excel-export.js +604 -0
  29. package/{dist/es2015/index.d.ts → kendo-angular-excel-export.d.ts} +1 -1
  30. package/{dist/es2015/main.d.ts → main.d.ts} +1 -0
  31. package/{dist/es2015/ooxml → ooxml}/cell-options.interface.d.ts +0 -0
  32. package/{dist/es2015/ooxml → ooxml}/exporter-columns.d.ts +0 -0
  33. package/{dist/es2015/ooxml → ooxml}/workbook.d.ts +0 -0
  34. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  35. package/package.json +32 -90
  36. package/schematics/ngAdd/index.js +5 -2
  37. package/schematics/ngAdd/index.js.map +1 -1
  38. package/dist/cdn/js/kendo-angular-excel-export.js +0 -20
  39. package/dist/cdn/main.js +0 -5
  40. package/dist/es/columns/column-base.js +0 -50
  41. package/dist/es/columns/column-group.component.js +0 -36
  42. package/dist/es/columns/column.component.js +0 -74
  43. package/dist/es/columns/footer-template.directive.js +0 -25
  44. package/dist/es/columns/group-footer-template.directive.js +0 -25
  45. package/dist/es/columns/group-header-column-template.directive.js +0 -24
  46. package/dist/es/columns/group-header-template.directive.js +0 -25
  47. package/dist/es/excel-export.component.js +0 -170
  48. package/dist/es/excel-export.module.js +0 -65
  49. package/dist/es/index.js +0 -9
  50. package/dist/es/main.js +0 -14
  51. package/dist/es/ooxml/cell-options.interface.js +0 -4
  52. package/dist/es/ooxml/exporter-columns.js +0 -126
  53. package/dist/es/ooxml/workbook.js +0 -45
  54. package/dist/es/package-metadata.js +0 -15
  55. package/dist/es2015/columns/column-base.js +0 -44
  56. package/dist/es2015/columns/column-group.component.js +0 -32
  57. package/dist/es2015/columns/column.component.js +0 -71
  58. package/dist/es2015/columns/footer-template.directive.js +0 -24
  59. package/dist/es2015/columns/group-footer-template.directive.js +0 -24
  60. package/dist/es2015/columns/group-header-column-template.directive.js +0 -23
  61. package/dist/es2015/columns/group-header-template.directive.js +0 -24
  62. package/dist/es2015/index.js +0 -9
  63. package/dist/es2015/index.metadata.json +0 -1
  64. package/dist/fesm2015/index.js +0 -585
  65. package/dist/fesm5/index.js +0 -606
  66. package/dist/npm/columns/column-base.js +0 -52
  67. package/dist/npm/columns/column-group.component.js +0 -38
  68. package/dist/npm/columns/column.component.js +0 -76
  69. package/dist/npm/columns/footer-template.directive.js +0 -27
  70. package/dist/npm/columns/group-footer-template.directive.js +0 -27
  71. package/dist/npm/columns/group-header-column-template.directive.js +0 -26
  72. package/dist/npm/columns/group-header-template.directive.js +0 -27
  73. package/dist/npm/excel-export-data.js +0 -6
  74. package/dist/npm/excel-export.component.js +0 -172
  75. package/dist/npm/excel-export.module.js +0 -67
  76. package/dist/npm/index.js +0 -13
  77. package/dist/npm/main.js +0 -25
  78. package/dist/npm/ooxml/cell-options.interface.js +0 -6
  79. package/dist/npm/ooxml/exporter-columns.js +0 -131
  80. package/dist/npm/ooxml/workbook.js +0 -47
  81. package/dist/npm/package-metadata.js +0 -17
  82. package/dist/systemjs/kendo-angular-excel-export.js +0 -5
@@ -0,0 +1,604 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Component, Input, ContentChildren, QueryList, Directive, Optional, forwardRef, SkipSelf, Host, ContentChild, NgModule } from '@angular/core';
7
+ import { saveAs } from '@progress/kendo-file-saver';
8
+ import { IntlService, ExcelExporter, Workbook } from '@progress/kendo-ooxml';
9
+ export * from '@progress/kendo-ooxml';
10
+ import { toString } from '@telerik/kendo-intl';
11
+ import * as i1 from '@progress/kendo-angular-l10n';
12
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
13
+ import { validatePackage } from '@progress/kendo-licensing';
14
+
15
+ const compileTemplate = (templateRef, context, updateContext) => {
16
+ let embeddedView = templateRef.createEmbeddedView(context);
17
+ const result = (data) => {
18
+ updateContext(context, data);
19
+ embeddedView.detectChanges();
20
+ return embeddedView.rootNodes.reduce((content, rootNode) => {
21
+ return content + rootNode.textContent;
22
+ }, '').trim();
23
+ };
24
+ result.destroy = () => {
25
+ embeddedView.destroy();
26
+ embeddedView = null;
27
+ };
28
+ return result;
29
+ };
30
+ const updateGroupHeaderContext = (context, data) => {
31
+ context.$implicit = context.group = data;
32
+ context.field = data.field;
33
+ context.value = data.value;
34
+ context.aggregates = data.aggregates;
35
+ };
36
+ const updateGroupFooterContext = (context, data) => {
37
+ context.group = data.group;
38
+ context.$implicit = context.aggregates = data;
39
+ };
40
+ const updateFooterContext = (context, data) => {
41
+ context.aggregates = data.aggregates;
42
+ };
43
+ /**
44
+ * @hidden
45
+ */
46
+ const toExporterColumns = (sourceColumns) => {
47
+ const exporterColumns = [];
48
+ let columnIndex = 0;
49
+ const addColumns = (columns, result, level) => {
50
+ columns.forEach((column) => {
51
+ if (column.level === level) {
52
+ const exporterColumn = new ExporterColumn(column, columnIndex);
53
+ result.push(exporterColumn);
54
+ if (column.children && column.children.some(c => c !== column)) {
55
+ const children = exporterColumn.columns = [];
56
+ addColumns(column.children, children, level + 1);
57
+ }
58
+ else {
59
+ columnIndex++;
60
+ }
61
+ }
62
+ });
63
+ };
64
+ addColumns(sourceColumns, exporterColumns, 0);
65
+ return exporterColumns;
66
+ };
67
+ /**
68
+ * @hidden
69
+ */
70
+ const destroyColumns = (columns) => {
71
+ if (columns) {
72
+ columns.forEach(column => {
73
+ column.destroy();
74
+ });
75
+ }
76
+ };
77
+ /**
78
+ * @hidden
79
+ */
80
+ class ExporterColumn {
81
+ constructor(column, columnIndex) {
82
+ this.title = column.title;
83
+ this.field = column.field;
84
+ this.hidden = column.hidden;
85
+ this.locked = column.locked;
86
+ this.width = column.width;
87
+ this.headerCellOptions = column.headerCellOptions;
88
+ this.cellOptions = column.cellOptions;
89
+ this.groupHeaderCellOptions = column.groupHeaderCellOptions;
90
+ this.groupFooterCellOptions = column.groupFooterCellOptions;
91
+ this.footerCellOptions = column.footerCellOptions;
92
+ if (column.footerTemplate) {
93
+ this.footerTemplate = compileTemplate(column.footerTemplate.templateRef, {
94
+ $implicit: column,
95
+ column: column,
96
+ columnIndex: columnIndex
97
+ }, updateFooterContext);
98
+ }
99
+ if (column.groupFooterTemplate) {
100
+ this.groupFooterTemplate = compileTemplate(column.groupFooterTemplate.templateRef, {
101
+ column: column,
102
+ field: column.field
103
+ }, updateGroupFooterContext);
104
+ }
105
+ if (column.groupHeaderTemplate) {
106
+ this.groupHeaderTemplate = compileTemplate(column.groupHeaderTemplate.templateRef, {}, updateGroupHeaderContext);
107
+ }
108
+ if (column.groupHeaderColumnTemplate) {
109
+ this.groupHeaderColumnTemplate = compileTemplate(column.groupHeaderColumnTemplate.templateRef, {}, updateGroupHeaderContext);
110
+ }
111
+ }
112
+ destroy() {
113
+ if (this.footerTemplate) {
114
+ this.footerTemplate.destroy();
115
+ }
116
+ if (this.groupFooterTemplate) {
117
+ this.groupFooterTemplate.destroy();
118
+ }
119
+ if (this.groupHeaderTemplate) {
120
+ this.groupHeaderTemplate.destroy();
121
+ }
122
+ if (this.groupHeaderColumnTemplate) {
123
+ this.groupHeaderColumnTemplate.destroy();
124
+ }
125
+ destroyColumns(this.columns);
126
+ }
127
+ }
128
+
129
+ IntlService.register({ toString });
130
+ /**
131
+ *
132
+ * @hidden
133
+ */
134
+ const workbookOptions = (options) => {
135
+ const columns = toExporterColumns(options.columns);
136
+ const exporter = new ExcelExporter({
137
+ columns: columns,
138
+ data: options.data,
139
+ filterable: options.filterable,
140
+ groups: options.group,
141
+ paddingCellOptions: options.paddingCellOptions,
142
+ headerPaddingCellOptions: options.headerPaddingCellOptions,
143
+ collapsible: options.collapsible,
144
+ hierarchy: options.hierarchy,
145
+ aggregates: options.aggregates
146
+ });
147
+ const result = exporter.workbook();
148
+ result.creator = options.creator;
149
+ result.date = options.date;
150
+ result.rtl = options.rtl;
151
+ destroyColumns(columns);
152
+ return result;
153
+ };
154
+ /**
155
+ * @hidden
156
+ */
157
+ const toDataURL = (options) => {
158
+ const workbook = new Workbook(options);
159
+ return workbook.toDataURL();
160
+ };
161
+ /**
162
+ * @hidden
163
+ */
164
+ const isWorkbookOptions = (value) => {
165
+ return value && value.sheets;
166
+ };
167
+
168
+ /**
169
+ * @hidden
170
+ */
171
+ class ColumnBase {
172
+ constructor(parent) {
173
+ this.parent = parent;
174
+ }
175
+ /**
176
+ * @hidden
177
+ */
178
+ get level() {
179
+ return this.parent ? this.parent.level + 1 : 0;
180
+ }
181
+ }
182
+ ColumnBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, deps: [{ token: ColumnBase }], target: i0.ɵɵFactoryTarget.Component });
183
+ ColumnBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnBase, selector: "ng-component", inputs: { title: "title", width: "width", locked: "locked", hidden: "hidden", headerCellOptions: "headerCellOptions" }, queries: [{ propertyName: "children", predicate: ColumnBase }], ngImport: i0, template: '', isInline: true });
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnBase, decorators: [{
185
+ type: Component,
186
+ args: [{
187
+ template: ''
188
+ }]
189
+ }], ctorParameters: function () { return [{ type: ColumnBase }]; }, propDecorators: { title: [{
190
+ type: Input
191
+ }], width: [{
192
+ type: Input
193
+ }], locked: [{
194
+ type: Input
195
+ }], hidden: [{
196
+ type: Input
197
+ }], headerCellOptions: [{
198
+ type: Input
199
+ }], children: [{
200
+ type: ContentChildren,
201
+ args: [ColumnBase]
202
+ }] } });
203
+
204
+ /**
205
+ * @hidden
206
+ */
207
+ const packageMetadata = {
208
+ name: '@progress/kendo-angular-excel-export',
209
+ productName: 'Kendo UI for Angular',
210
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
211
+ publishDate: 1648803359,
212
+ version: '',
213
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
214
+ };
215
+
216
+ // eslint-disable max-line-length
217
+ /**
218
+ * Represents the [Kendo UI Excel Export component for Angular]({% slug overview_excelexport %}).
219
+ * Configures the settings for the Excel export of the Kendo UI Grid.
220
+ */
221
+ class ExcelExportComponent {
222
+ constructor(localization, zone) {
223
+ this.localization = localization;
224
+ this.zone = zone;
225
+ /**
226
+ * Specifies the name of the file that is exported to Excel.
227
+ * @default "Export.xlsx"
228
+ */
229
+ this.fileName = 'Export.xlsx';
230
+ /**
231
+ * @hidden
232
+ */
233
+ this.columns = new QueryList();
234
+ validatePackage(packageMetadata);
235
+ this.saveFile = this.saveFile.bind(this);
236
+ }
237
+ /**
238
+ * Saves the data to Excel.
239
+ *
240
+ * @param exportData - An optional parameter. Can be the data that will be exported or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}).
241
+ */
242
+ save(exportData) {
243
+ this.toDataURL(exportData).then(this.saveFile);
244
+ }
245
+ /**
246
+ * Based on the specified columns and data, returns
247
+ * [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %})
248
+ * ([see example]({% slug customrowsandcells_excelexport %})).
249
+ *
250
+ * @param exportData - The optional data to be exported.
251
+ * @returns {WorkbookOptions} - The workbook options.
252
+ */
253
+ workbookOptions(exportData) {
254
+ const currentData = this.getExportData(exportData);
255
+ const options = workbookOptions({
256
+ columns: this.columns,
257
+ data: currentData.data,
258
+ group: currentData.group,
259
+ filterable: this.filterable,
260
+ creator: this.creator,
261
+ date: this.date,
262
+ rtl: this.localization.rtl,
263
+ paddingCellOptions: this.paddingCellOptions,
264
+ headerPaddingCellOptions: this.headerPaddingCellOptions,
265
+ collapsible: this.collapsible
266
+ });
267
+ return options;
268
+ }
269
+ /**
270
+ * Returns a promise which will be resolved with the file data URI
271
+ * ([see example]({% slug filesaving_excelexport %})).
272
+ *
273
+ * @param exportData - The optional data or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}) that will be used to generate the data URI.
274
+ * @returns {Promise<string>} - The promise that will be resolved by the file data URI.
275
+ */
276
+ toDataURL(exportData) {
277
+ const options = isWorkbookOptions(exportData) ?
278
+ exportData :
279
+ this.workbookOptions(exportData);
280
+ return this.zone.runOutsideAngular(() => toDataURL(options));
281
+ }
282
+ getExportData(exportData) {
283
+ let result;
284
+ if (exportData) {
285
+ if (Array.isArray(exportData)) {
286
+ result = {
287
+ data: exportData
288
+ };
289
+ }
290
+ else {
291
+ result = exportData;
292
+ }
293
+ }
294
+ else {
295
+ result = {
296
+ data: this.data,
297
+ group: this.group
298
+ };
299
+ }
300
+ return result;
301
+ }
302
+ saveFile(dataURL) {
303
+ saveAs(dataURL, this.fileName, {
304
+ forceProxy: this.forceProxy,
305
+ proxyURL: this.proxyURL
306
+ });
307
+ }
308
+ }
309
+ ExcelExportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
310
+ ExcelExportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExcelExportComponent, selector: "kendo-excelexport", inputs: { fileName: "fileName", filterable: "filterable", collapsible: "collapsible", creator: "creator", date: "date", forceProxy: "forceProxy", proxyURL: "proxyURL", data: "data", group: "group", paddingCellOptions: "paddingCellOptions", headerPaddingCellOptions: "headerPaddingCellOptions" }, providers: [
311
+ LocalizationService,
312
+ {
313
+ provide: L10N_PREFIX,
314
+ useValue: 'kendo.excelexport'
315
+ }
316
+ ], queries: [{ propertyName: "columns", predicate: ColumnBase, descendants: true }], exportAs: ["kendoExcelExport"], ngImport: i0, template: ``, isInline: true });
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportComponent, decorators: [{
318
+ type: Component,
319
+ args: [{
320
+ exportAs: 'kendoExcelExport',
321
+ selector: 'kendo-excelexport',
322
+ providers: [
323
+ LocalizationService,
324
+ {
325
+ provide: L10N_PREFIX,
326
+ useValue: 'kendo.excelexport'
327
+ }
328
+ ],
329
+ template: ``
330
+ }]
331
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { fileName: [{
332
+ type: Input
333
+ }], filterable: [{
334
+ type: Input
335
+ }], collapsible: [{
336
+ type: Input
337
+ }], creator: [{
338
+ type: Input
339
+ }], date: [{
340
+ type: Input
341
+ }], forceProxy: [{
342
+ type: Input
343
+ }], proxyURL: [{
344
+ type: Input
345
+ }], data: [{
346
+ type: Input
347
+ }], group: [{
348
+ type: Input
349
+ }], paddingCellOptions: [{
350
+ type: Input
351
+ }], headerPaddingCellOptions: [{
352
+ type: Input
353
+ }], columns: [{
354
+ type: ContentChildren,
355
+ args: [ColumnBase, { descendants: true }]
356
+ }] } });
357
+
358
+ /**
359
+ * Represents the group header cell template of the Excel Export column component
360
+ * ([see example]({% slug columns_excel-export %}#toc-group-header-template)).
361
+ * Enables you to customize the content of the group header item.
362
+ */
363
+ class GroupHeaderTemplateDirective {
364
+ constructor(templateRef) {
365
+ this.templateRef = templateRef;
366
+ }
367
+ }
368
+ GroupHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupHeaderTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
369
+ GroupHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: GroupHeaderTemplateDirective, selector: "[kendoExcelExportGroupHeaderTemplate]", ngImport: i0 });
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupHeaderTemplateDirective, decorators: [{
371
+ type: Directive,
372
+ args: [{
373
+ selector: '[kendoExcelExportGroupHeaderTemplate]'
374
+ }]
375
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
376
+ type: Optional
377
+ }] }]; } });
378
+
379
+ /**
380
+ * Represents the group header column template of the Excel Export column component
381
+ * ([see example]({% slug columns_excel-export %}#toc-group-header-column-template)).
382
+ */
383
+ class GroupHeaderColumnTemplateDirective {
384
+ constructor(templateRef) {
385
+ this.templateRef = templateRef;
386
+ }
387
+ }
388
+ GroupHeaderColumnTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupHeaderColumnTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
389
+ GroupHeaderColumnTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: GroupHeaderColumnTemplateDirective, selector: "[kendoExcelExportGroupHeaderColumnTemplate]", ngImport: i0 });
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupHeaderColumnTemplateDirective, decorators: [{
391
+ type: Directive,
392
+ args: [{
393
+ selector: '[kendoExcelExportGroupHeaderColumnTemplate]'
394
+ }]
395
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
396
+ type: Optional
397
+ }] }]; } });
398
+
399
+ /**
400
+ * Represents the group footer cell template of the Excel Export column component
401
+ * ([see example]({% slug columns_excel-export %}#toc-group-footer-template)).
402
+ * Enables you to customize the group footer cell of the column.
403
+ */
404
+ class GroupFooterTemplateDirective {
405
+ constructor(templateRef) {
406
+ this.templateRef = templateRef;
407
+ }
408
+ }
409
+ GroupFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupFooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
410
+ GroupFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: GroupFooterTemplateDirective, selector: "[kendoExcelExportGroupFooterTemplate]", ngImport: i0 });
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GroupFooterTemplateDirective, decorators: [{
412
+ type: Directive,
413
+ args: [{
414
+ selector: '[kendoExcelExportGroupFooterTemplate]'
415
+ }]
416
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
417
+ type: Optional
418
+ }] }]; } });
419
+
420
+ /**
421
+ * Represents the footer cell template of the Excel Export column component
422
+ * ([see example]({% slug columns_excel-export %}#toc-footer-template)).
423
+ * Enables you to customize the footer cell of the column.
424
+ */
425
+ class FooterTemplateDirective {
426
+ constructor(templateRef) {
427
+ this.templateRef = templateRef;
428
+ }
429
+ }
430
+ FooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
431
+ FooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FooterTemplateDirective, selector: "[kendoExcelExportFooterTemplate]", ngImport: i0 });
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FooterTemplateDirective, decorators: [{
433
+ type: Directive,
434
+ args: [{
435
+ selector: '[kendoExcelExportFooterTemplate]'
436
+ }]
437
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
438
+ type: Optional
439
+ }] }]; } });
440
+
441
+ /**
442
+ * Represents the columns of the Kendo UI Excel Export component for Angular.
443
+ */
444
+ class ColumnComponent extends ColumnBase {
445
+ constructor(parent) {
446
+ super(parent);
447
+ }
448
+ }
449
+ ColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnComponent, deps: [{ token: ColumnBase, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
450
+ ColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnComponent, selector: "kendo-excelexport-column", inputs: { field: "field", cellOptions: "cellOptions", groupHeaderCellOptions: "groupHeaderCellOptions", groupFooterCellOptions: "groupFooterCellOptions", footerCellOptions: "footerCellOptions" }, providers: [
451
+ {
452
+ provide: ColumnBase,
453
+ useExisting: forwardRef(() => ColumnComponent)
454
+ }
455
+ ], queries: [{ propertyName: "groupHeaderTemplate", first: true, predicate: GroupHeaderTemplateDirective, descendants: true }, { propertyName: "groupHeaderColumnTemplate", first: true, predicate: GroupHeaderColumnTemplateDirective, descendants: true }, { propertyName: "groupFooterTemplate", first: true, predicate: GroupFooterTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnComponent, decorators: [{
457
+ type: Component,
458
+ args: [{
459
+ providers: [
460
+ {
461
+ provide: ColumnBase,
462
+ useExisting: forwardRef(() => ColumnComponent)
463
+ }
464
+ ],
465
+ selector: 'kendo-excelexport-column',
466
+ template: ``
467
+ }]
468
+ }], ctorParameters: function () { return [{ type: ColumnBase, decorators: [{
469
+ type: SkipSelf
470
+ }, {
471
+ type: Host
472
+ }, {
473
+ type: Optional
474
+ }] }]; }, propDecorators: { field: [{
475
+ type: Input
476
+ }], cellOptions: [{
477
+ type: Input
478
+ }], groupHeaderCellOptions: [{
479
+ type: Input
480
+ }], groupFooterCellOptions: [{
481
+ type: Input
482
+ }], footerCellOptions: [{
483
+ type: Input
484
+ }], groupHeaderTemplate: [{
485
+ type: ContentChild,
486
+ args: [GroupHeaderTemplateDirective, { static: false }]
487
+ }], groupHeaderColumnTemplate: [{
488
+ type: ContentChild,
489
+ args: [GroupHeaderColumnTemplateDirective, { static: false }]
490
+ }], groupFooterTemplate: [{
491
+ type: ContentChild,
492
+ args: [GroupFooterTemplateDirective, { static: false }]
493
+ }], footerTemplate: [{
494
+ type: ContentChild,
495
+ args: [FooterTemplateDirective, { static: false }]
496
+ }] } });
497
+
498
+ /**
499
+ * Represents the column group component of the Kendo UI Excel Export component.
500
+ */
501
+ class ColumnGroupComponent extends ColumnBase {
502
+ constructor(parent) {
503
+ super(parent);
504
+ this.parent = parent;
505
+ }
506
+ }
507
+ ColumnGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnGroupComponent, deps: [{ token: ColumnBase, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
508
+ ColumnGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColumnGroupComponent, selector: "kendo-excelexport-column-group", providers: [
509
+ {
510
+ provide: ColumnBase,
511
+ useExisting: forwardRef(() => ColumnGroupComponent)
512
+ }
513
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColumnGroupComponent, decorators: [{
515
+ type: Component,
516
+ args: [{
517
+ providers: [
518
+ {
519
+ provide: ColumnBase,
520
+ useExisting: forwardRef(() => ColumnGroupComponent)
521
+ }
522
+ ],
523
+ selector: 'kendo-excelexport-column-group',
524
+ template: ``
525
+ }]
526
+ }], ctorParameters: function () { return [{ type: ColumnBase, decorators: [{
527
+ type: SkipSelf
528
+ }, {
529
+ type: Host
530
+ }, {
531
+ type: Optional
532
+ }] }]; } });
533
+
534
+ const declarations = [
535
+ ExcelExportComponent,
536
+ ColumnComponent,
537
+ ColumnGroupComponent,
538
+ FooterTemplateDirective,
539
+ GroupFooterTemplateDirective,
540
+ GroupHeaderTemplateDirective,
541
+ GroupHeaderColumnTemplateDirective
542
+ ];
543
+ /**
544
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
545
+ * definition for the Excel Export component.
546
+ *
547
+ * @example
548
+ *
549
+ * ```ts-no-run
550
+ * // Import the ExcelExportModule module
551
+ * import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
552
+ *
553
+ * // The browser platform with a compiler
554
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
555
+ *
556
+ * import { NgModule } from '@angular/core';
557
+ *
558
+ * // Import the app component
559
+ * import { AppComponent } from './app.component';
560
+ *
561
+ * // Define the app module
562
+ * _@NgModule({
563
+ * declarations: [AppComponent], // declare app component
564
+ * imports: [BrowserModule, ExcelExportModule], // import ExcelExportModule module
565
+ * bootstrap: [AppComponent]
566
+ * })
567
+ * export class AppModule {}
568
+ *
569
+ * // Compile and launch the module
570
+ * platformBrowserDynamic().bootstrapModule(AppModule);
571
+ *
572
+ * ```
573
+ */
574
+ class ExcelExportModule {
575
+ }
576
+ ExcelExportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
577
+ ExcelExportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportModule, declarations: [ExcelExportComponent,
578
+ ColumnComponent,
579
+ ColumnGroupComponent,
580
+ FooterTemplateDirective,
581
+ GroupFooterTemplateDirective,
582
+ GroupHeaderTemplateDirective,
583
+ GroupHeaderColumnTemplateDirective], exports: [ExcelExportComponent,
584
+ ColumnComponent,
585
+ ColumnGroupComponent,
586
+ FooterTemplateDirective,
587
+ GroupFooterTemplateDirective,
588
+ GroupHeaderTemplateDirective,
589
+ GroupHeaderColumnTemplateDirective] });
590
+ ExcelExportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportModule });
591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExcelExportModule, decorators: [{
592
+ type: NgModule,
593
+ args: [{
594
+ declarations: [declarations],
595
+ exports: [declarations]
596
+ }]
597
+ }] });
598
+
599
+ /**
600
+ * Generated bundle index. Do not edit.
601
+ */
602
+
603
+ export { ColumnBase, ColumnComponent, ColumnGroupComponent, ExcelExportComponent, ExcelExportModule, FooterTemplateDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderTemplateDirective, isWorkbookOptions, toDataURL, workbookOptions };
604
+
@@ -5,5 +5,5 @@
5
5
  /**
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
+ /// <amd-module name="@progress/kendo-angular-excel-export" />
8
9
  export * from './main';
9
- export { GroupHeaderColumnTemplateDirective } from './columns/group-header-column-template.directive';
@@ -10,6 +10,7 @@ export { ColumnGroupComponent } from './columns/column-group.component';
10
10
  export { FooterTemplateDirective } from './columns/footer-template.directive';
11
11
  export { GroupFooterTemplateDirective } from './columns/group-footer-template.directive';
12
12
  export { GroupHeaderTemplateDirective } from './columns/group-header-template.directive';
13
+ export { GroupHeaderColumnTemplateDirective } from './columns/group-header-column-template.directive';
13
14
  export { ExcelExportData } from './excel-export-data';
14
15
  export { CellOptions } from './ooxml/cell-options.interface';
15
16
  export * from './ooxml/workbook';
File without changes