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

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