@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.
- package/bundles/kendo-angular-excel-export.umd.js +5 -0
- package/{dist/es2015/columns → columns}/column-base.d.ts +4 -1
- package/{dist/es2015/columns → columns}/column-group.component.d.ts +3 -0
- package/{dist/es2015/columns → columns}/column.component.d.ts +3 -0
- package/{dist/es2015/columns → columns}/footer-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-footer-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-header-column-template.directive.d.ts +3 -0
- package/{dist/es2015/columns → columns}/group-header-template.directive.d.ts +3 -0
- package/esm2015/columns/column-base.js +41 -0
- package/esm2015/columns/column-group.component.js +43 -0
- package/esm2015/columns/column.component.js +68 -0
- package/esm2015/columns/footer-template.directive.js +26 -0
- package/esm2015/columns/group-footer-template.directive.js +26 -0
- package/esm2015/columns/group-header-column-template.directive.js +25 -0
- package/esm2015/columns/group-header-template.directive.js +26 -0
- package/{dist/es → esm2015}/excel-export-data.js +1 -0
- package/{dist/es2015 → esm2015}/excel-export.component.js +54 -69
- package/{dist/es2015 → esm2015}/excel-export.module.js +25 -10
- package/{dist/es2015/excel-export-data.js → esm2015/kendo-angular-excel-export.js} +4 -0
- package/{dist/es2015 → esm2015}/main.js +1 -0
- package/{dist/es2015 → esm2015}/ooxml/cell-options.interface.js +1 -0
- package/{dist/es2015 → esm2015}/ooxml/exporter-columns.js +2 -7
- package/{dist/es2015 → esm2015}/ooxml/workbook.js +0 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015/excel-export-data.d.ts → excel-export-data.d.ts} +0 -0
- package/{dist/es2015/excel-export.component.d.ts → excel-export.component.d.ts} +3 -0
- package/{dist/es2015/excel-export.module.d.ts → excel-export.module.d.ts} +11 -0
- package/fesm2015/kendo-angular-excel-export.js +606 -0
- package/{dist/es2015/index.d.ts → kendo-angular-excel-export.d.ts} +1 -1
- package/{dist/es2015/main.d.ts → main.d.ts} +1 -0
- package/{dist/es2015/ooxml → ooxml}/cell-options.interface.d.ts +0 -0
- package/{dist/es2015/ooxml → ooxml}/exporter-columns.d.ts +0 -0
- package/{dist/es2015/ooxml → ooxml}/workbook.d.ts +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +30 -88
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/dist/cdn/js/kendo-angular-excel-export.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/columns/column-base.js +0 -50
- package/dist/es/columns/column-group.component.js +0 -36
- package/dist/es/columns/column.component.js +0 -74
- package/dist/es/columns/footer-template.directive.js +0 -25
- package/dist/es/columns/group-footer-template.directive.js +0 -25
- package/dist/es/columns/group-header-column-template.directive.js +0 -24
- package/dist/es/columns/group-header-template.directive.js +0 -25
- package/dist/es/excel-export.component.js +0 -170
- package/dist/es/excel-export.module.js +0 -65
- package/dist/es/index.js +0 -9
- package/dist/es/main.js +0 -14
- package/dist/es/ooxml/cell-options.interface.js +0 -4
- package/dist/es/ooxml/exporter-columns.js +0 -126
- package/dist/es/ooxml/workbook.js +0 -45
- package/dist/es/package-metadata.js +0 -15
- package/dist/es2015/columns/column-base.js +0 -44
- package/dist/es2015/columns/column-group.component.js +0 -32
- package/dist/es2015/columns/column.component.js +0 -71
- package/dist/es2015/columns/footer-template.directive.js +0 -24
- package/dist/es2015/columns/group-footer-template.directive.js +0 -24
- package/dist/es2015/columns/group-header-column-template.directive.js +0 -23
- package/dist/es2015/columns/group-header-template.directive.js +0 -24
- package/dist/es2015/index.js +0 -9
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/fesm2015/index.js +0 -585
- package/dist/fesm5/index.js +0 -606
- package/dist/npm/columns/column-base.js +0 -52
- package/dist/npm/columns/column-group.component.js +0 -38
- package/dist/npm/columns/column.component.js +0 -76
- package/dist/npm/columns/footer-template.directive.js +0 -27
- package/dist/npm/columns/group-footer-template.directive.js +0 -27
- package/dist/npm/columns/group-header-column-template.directive.js +0 -26
- package/dist/npm/columns/group-header-template.directive.js +0 -27
- package/dist/npm/excel-export-data.js +0 -6
- package/dist/npm/excel-export.component.js +0 -172
- package/dist/npm/excel-export.module.js +0 -67
- package/dist/npm/index.js +0 -13
- package/dist/npm/main.js +0 -25
- package/dist/npm/ooxml/cell-options.interface.js +0 -6
- package/dist/npm/ooxml/exporter-columns.js +0 -131
- package/dist/npm/ooxml/workbook.js +0 -47
- package/dist/npm/package-metadata.js +0 -17
- package/dist/systemjs/kendo-angular-excel-export.js +0 -5
|
@@ -1,36 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { Component, forwardRef, SkipSelf, Host, Optional } from '@angular/core';
|
|
7
|
-
import { ColumnBase } from './column-base';
|
|
8
|
-
/**
|
|
9
|
-
* Represents the column group component of the Kendo UI Excel Export component.
|
|
10
|
-
*/
|
|
11
|
-
var ColumnGroupComponent = /** @class */ (function (_super) {
|
|
12
|
-
tslib_1.__extends(ColumnGroupComponent, _super);
|
|
13
|
-
function ColumnGroupComponent(parent) {
|
|
14
|
-
var _this = _super.call(this, parent) || this;
|
|
15
|
-
_this.parent = parent;
|
|
16
|
-
return _this;
|
|
17
|
-
}
|
|
18
|
-
ColumnGroupComponent_1 = ColumnGroupComponent;
|
|
19
|
-
var ColumnGroupComponent_1;
|
|
20
|
-
ColumnGroupComponent = ColumnGroupComponent_1 = tslib_1.__decorate([
|
|
21
|
-
Component({
|
|
22
|
-
providers: [
|
|
23
|
-
{
|
|
24
|
-
provide: ColumnBase,
|
|
25
|
-
useExisting: forwardRef(function () { return ColumnGroupComponent_1; }) // tslint:disable-line:no-forward-ref
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
selector: 'kendo-excelexport-column-group',
|
|
29
|
-
template: ""
|
|
30
|
-
}),
|
|
31
|
-
tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
|
|
32
|
-
tslib_1.__metadata("design:paramtypes", [ColumnBase])
|
|
33
|
-
], ColumnGroupComponent);
|
|
34
|
-
return ColumnGroupComponent;
|
|
35
|
-
}(ColumnBase));
|
|
36
|
-
export { ColumnGroupComponent };
|
|
@@ -1,74 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { forwardRef, Component, Input, ContentChild, SkipSelf, Host, Optional } from '@angular/core';
|
|
7
|
-
import { GroupHeaderTemplateDirective } from './group-header-template.directive';
|
|
8
|
-
import { GroupHeaderColumnTemplateDirective } from './group-header-column-template.directive';
|
|
9
|
-
import { GroupFooterTemplateDirective } from './group-footer-template.directive';
|
|
10
|
-
import { FooterTemplateDirective } from './footer-template.directive';
|
|
11
|
-
import { ColumnBase } from './column-base';
|
|
12
|
-
/**
|
|
13
|
-
* Represents the columns of the Kendo UI Excel Export component for Angular.
|
|
14
|
-
*/
|
|
15
|
-
var ColumnComponent = /** @class */ (function (_super) {
|
|
16
|
-
tslib_1.__extends(ColumnComponent, _super);
|
|
17
|
-
function ColumnComponent(parent) {
|
|
18
|
-
return _super.call(this, parent) || this;
|
|
19
|
-
}
|
|
20
|
-
ColumnComponent_1 = ColumnComponent;
|
|
21
|
-
var ColumnComponent_1;
|
|
22
|
-
tslib_1.__decorate([
|
|
23
|
-
Input(),
|
|
24
|
-
tslib_1.__metadata("design:type", String)
|
|
25
|
-
], ColumnComponent.prototype, "field", void 0);
|
|
26
|
-
tslib_1.__decorate([
|
|
27
|
-
Input(),
|
|
28
|
-
tslib_1.__metadata("design:type", Object)
|
|
29
|
-
], ColumnComponent.prototype, "cellOptions", void 0);
|
|
30
|
-
tslib_1.__decorate([
|
|
31
|
-
Input(),
|
|
32
|
-
tslib_1.__metadata("design:type", Object)
|
|
33
|
-
], ColumnComponent.prototype, "groupHeaderCellOptions", void 0);
|
|
34
|
-
tslib_1.__decorate([
|
|
35
|
-
Input(),
|
|
36
|
-
tslib_1.__metadata("design:type", Object)
|
|
37
|
-
], ColumnComponent.prototype, "groupFooterCellOptions", void 0);
|
|
38
|
-
tslib_1.__decorate([
|
|
39
|
-
Input(),
|
|
40
|
-
tslib_1.__metadata("design:type", Object)
|
|
41
|
-
], ColumnComponent.prototype, "footerCellOptions", void 0);
|
|
42
|
-
tslib_1.__decorate([
|
|
43
|
-
ContentChild(GroupHeaderTemplateDirective, { static: false }),
|
|
44
|
-
tslib_1.__metadata("design:type", GroupHeaderTemplateDirective)
|
|
45
|
-
], ColumnComponent.prototype, "groupHeaderTemplate", void 0);
|
|
46
|
-
tslib_1.__decorate([
|
|
47
|
-
ContentChild(GroupHeaderColumnTemplateDirective, { static: false }),
|
|
48
|
-
tslib_1.__metadata("design:type", GroupHeaderColumnTemplateDirective)
|
|
49
|
-
], ColumnComponent.prototype, "groupHeaderColumnTemplate", void 0);
|
|
50
|
-
tslib_1.__decorate([
|
|
51
|
-
ContentChild(GroupFooterTemplateDirective, { static: false }),
|
|
52
|
-
tslib_1.__metadata("design:type", GroupFooterTemplateDirective)
|
|
53
|
-
], ColumnComponent.prototype, "groupFooterTemplate", void 0);
|
|
54
|
-
tslib_1.__decorate([
|
|
55
|
-
ContentChild(FooterTemplateDirective, { static: false }),
|
|
56
|
-
tslib_1.__metadata("design:type", FooterTemplateDirective)
|
|
57
|
-
], ColumnComponent.prototype, "footerTemplate", void 0);
|
|
58
|
-
ColumnComponent = ColumnComponent_1 = tslib_1.__decorate([
|
|
59
|
-
Component({
|
|
60
|
-
providers: [
|
|
61
|
-
{
|
|
62
|
-
provide: ColumnBase,
|
|
63
|
-
useExisting: forwardRef(function () { return ColumnComponent_1; }) // tslint:disable-line:no-forward-ref
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
selector: 'kendo-excelexport-column',
|
|
67
|
-
template: ""
|
|
68
|
-
}),
|
|
69
|
-
tslib_1.__param(0, SkipSelf()), tslib_1.__param(0, Host()), tslib_1.__param(0, Optional()),
|
|
70
|
-
tslib_1.__metadata("design:paramtypes", [ColumnBase])
|
|
71
|
-
], ColumnComponent);
|
|
72
|
-
return ColumnComponent;
|
|
73
|
-
}(ColumnBase));
|
|
74
|
-
export { ColumnComponent };
|
|
@@ -1,25 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef, Optional } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the footer cell template of the Excel Export column component
|
|
9
|
-
* ([see example]({% slug columns_excel-export %}#toc-footer-template)).
|
|
10
|
-
* Enables you to customize the footer cell of the column.
|
|
11
|
-
*/
|
|
12
|
-
var FooterTemplateDirective = /** @class */ (function () {
|
|
13
|
-
function FooterTemplateDirective(templateRef) {
|
|
14
|
-
this.templateRef = templateRef;
|
|
15
|
-
}
|
|
16
|
-
FooterTemplateDirective = tslib_1.__decorate([
|
|
17
|
-
Directive({
|
|
18
|
-
selector: '[kendoExcelExportFooterTemplate]'
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__param(0, Optional()),
|
|
21
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
22
|
-
], FooterTemplateDirective);
|
|
23
|
-
return FooterTemplateDirective;
|
|
24
|
-
}());
|
|
25
|
-
export { FooterTemplateDirective };
|
|
@@ -1,25 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef, Optional } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the group footer cell template of the Excel Export column component
|
|
9
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-footer-template)).
|
|
10
|
-
* Enables you to customize the group footer cell of the column.
|
|
11
|
-
*/
|
|
12
|
-
var GroupFooterTemplateDirective = /** @class */ (function () {
|
|
13
|
-
function GroupFooterTemplateDirective(templateRef) {
|
|
14
|
-
this.templateRef = templateRef;
|
|
15
|
-
}
|
|
16
|
-
GroupFooterTemplateDirective = tslib_1.__decorate([
|
|
17
|
-
Directive({
|
|
18
|
-
selector: '[kendoExcelExportGroupFooterTemplate]'
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__param(0, Optional()),
|
|
21
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
22
|
-
], GroupFooterTemplateDirective);
|
|
23
|
-
return GroupFooterTemplateDirective;
|
|
24
|
-
}());
|
|
25
|
-
export { GroupFooterTemplateDirective };
|
|
@@ -1,24 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef, Optional } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the group header column template of the Excel Export column component
|
|
9
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-header-column-template)).
|
|
10
|
-
*/
|
|
11
|
-
var GroupHeaderColumnTemplateDirective = /** @class */ (function () {
|
|
12
|
-
function GroupHeaderColumnTemplateDirective(templateRef) {
|
|
13
|
-
this.templateRef = templateRef;
|
|
14
|
-
}
|
|
15
|
-
GroupHeaderColumnTemplateDirective = tslib_1.__decorate([
|
|
16
|
-
Directive({
|
|
17
|
-
selector: '[kendoExcelExportGroupHeaderColumnTemplate]'
|
|
18
|
-
}),
|
|
19
|
-
tslib_1.__param(0, Optional()),
|
|
20
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
21
|
-
], GroupHeaderColumnTemplateDirective);
|
|
22
|
-
return GroupHeaderColumnTemplateDirective;
|
|
23
|
-
}());
|
|
24
|
-
export { GroupHeaderColumnTemplateDirective };
|
|
@@ -1,25 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef, Optional } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the group header cell template of the Excel Export column component
|
|
9
|
-
* ([see example]({% slug columns_excel-export %}#toc-group-header-template)).
|
|
10
|
-
* Enables you to customize the content of the group header item.
|
|
11
|
-
*/
|
|
12
|
-
var GroupHeaderTemplateDirective = /** @class */ (function () {
|
|
13
|
-
function GroupHeaderTemplateDirective(templateRef) {
|
|
14
|
-
this.templateRef = templateRef;
|
|
15
|
-
}
|
|
16
|
-
GroupHeaderTemplateDirective = tslib_1.__decorate([
|
|
17
|
-
Directive({
|
|
18
|
-
selector: '[kendoExcelExportGroupHeaderTemplate]'
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__param(0, Optional()),
|
|
21
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
22
|
-
], GroupHeaderTemplateDirective);
|
|
23
|
-
return GroupHeaderTemplateDirective;
|
|
24
|
-
}());
|
|
25
|
-
export { GroupHeaderTemplateDirective };
|
|
@@ -1,170 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
// tslint:disable:max-line-length
|
|
7
|
-
import { Component, ContentChildren, Input, QueryList, NgZone } from '@angular/core';
|
|
8
|
-
import { saveAs } from '@progress/kendo-file-saver';
|
|
9
|
-
import { workbookOptions, toDataURL, isWorkbookOptions } from './ooxml/workbook';
|
|
10
|
-
import { ColumnBase } from './columns/column-base';
|
|
11
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
12
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
-
import { packageMetadata } from './package-metadata';
|
|
14
|
-
/**
|
|
15
|
-
* Represents the [Kendo UI Excel Export component for Angular]({% slug overview_excelexport %}).
|
|
16
|
-
* Configures the settings for the Excel export of the Kendo UI Grid.
|
|
17
|
-
*/
|
|
18
|
-
var ExcelExportComponent = /** @class */ (function () {
|
|
19
|
-
function ExcelExportComponent(localization, zone) {
|
|
20
|
-
this.localization = localization;
|
|
21
|
-
this.zone = zone;
|
|
22
|
-
/**
|
|
23
|
-
* Specifies the name of the file that is exported to Excel.
|
|
24
|
-
* @default "Export.xlsx"
|
|
25
|
-
*/
|
|
26
|
-
this.fileName = 'Export.xlsx';
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
*/
|
|
30
|
-
this.columns = new QueryList();
|
|
31
|
-
validatePackage(packageMetadata);
|
|
32
|
-
this.saveFile = this.saveFile.bind(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Saves the data to Excel.
|
|
36
|
-
*
|
|
37
|
-
* @param exportData - An optional parameter. Can be the data that will be exported or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}).
|
|
38
|
-
*/
|
|
39
|
-
ExcelExportComponent.prototype.save = function (exportData) {
|
|
40
|
-
this.toDataURL(exportData).then(this.saveFile);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Based on the specified columns and data, returns
|
|
44
|
-
* [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %})
|
|
45
|
-
* ([see example]({% slug customrowsandcells_excelexport %})).
|
|
46
|
-
*
|
|
47
|
-
* @param exportData - The optional data to be exported.
|
|
48
|
-
* @returns {WorkbookOptions} - The workbook options.
|
|
49
|
-
*/
|
|
50
|
-
ExcelExportComponent.prototype.workbookOptions = function (exportData) {
|
|
51
|
-
var currentData = this.getExportData(exportData);
|
|
52
|
-
var options = workbookOptions({
|
|
53
|
-
columns: this.columns,
|
|
54
|
-
data: currentData.data,
|
|
55
|
-
group: currentData.group,
|
|
56
|
-
filterable: this.filterable,
|
|
57
|
-
creator: this.creator,
|
|
58
|
-
date: this.date,
|
|
59
|
-
rtl: this.localization.rtl,
|
|
60
|
-
paddingCellOptions: this.paddingCellOptions,
|
|
61
|
-
headerPaddingCellOptions: this.headerPaddingCellOptions,
|
|
62
|
-
collapsible: this.collapsible
|
|
63
|
-
});
|
|
64
|
-
return options;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Returns a promise which will be resolved with the file data URI
|
|
68
|
-
* ([see example]({% slug filesaving_excelexport %})).
|
|
69
|
-
*
|
|
70
|
-
* @param exportData - The optional data or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}) that will be used to generate the data URI.
|
|
71
|
-
* @returns {Promise<string>} - The promise that will be resolved by the file data URI.
|
|
72
|
-
*/
|
|
73
|
-
ExcelExportComponent.prototype.toDataURL = function (exportData) {
|
|
74
|
-
var options = isWorkbookOptions(exportData) ?
|
|
75
|
-
exportData :
|
|
76
|
-
this.workbookOptions(exportData);
|
|
77
|
-
return this.zone.runOutsideAngular(function () { return toDataURL(options); });
|
|
78
|
-
};
|
|
79
|
-
ExcelExportComponent.prototype.getExportData = function (exportData) {
|
|
80
|
-
var result;
|
|
81
|
-
if (exportData) {
|
|
82
|
-
if (Array.isArray(exportData)) {
|
|
83
|
-
result = {
|
|
84
|
-
data: exportData
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
result = exportData;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
result = {
|
|
93
|
-
data: this.data,
|
|
94
|
-
group: this.group
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
98
|
-
};
|
|
99
|
-
ExcelExportComponent.prototype.saveFile = function (dataURL) {
|
|
100
|
-
saveAs(dataURL, this.fileName, {
|
|
101
|
-
forceProxy: this.forceProxy,
|
|
102
|
-
proxyURL: this.proxyURL
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
tslib_1.__decorate([
|
|
106
|
-
Input(),
|
|
107
|
-
tslib_1.__metadata("design:type", String)
|
|
108
|
-
], ExcelExportComponent.prototype, "fileName", void 0);
|
|
109
|
-
tslib_1.__decorate([
|
|
110
|
-
Input(),
|
|
111
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
112
|
-
], ExcelExportComponent.prototype, "filterable", void 0);
|
|
113
|
-
tslib_1.__decorate([
|
|
114
|
-
Input(),
|
|
115
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
116
|
-
], ExcelExportComponent.prototype, "collapsible", void 0);
|
|
117
|
-
tslib_1.__decorate([
|
|
118
|
-
Input(),
|
|
119
|
-
tslib_1.__metadata("design:type", String)
|
|
120
|
-
], ExcelExportComponent.prototype, "creator", void 0);
|
|
121
|
-
tslib_1.__decorate([
|
|
122
|
-
Input(),
|
|
123
|
-
tslib_1.__metadata("design:type", Date)
|
|
124
|
-
], ExcelExportComponent.prototype, "date", void 0);
|
|
125
|
-
tslib_1.__decorate([
|
|
126
|
-
Input(),
|
|
127
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
128
|
-
], ExcelExportComponent.prototype, "forceProxy", void 0);
|
|
129
|
-
tslib_1.__decorate([
|
|
130
|
-
Input(),
|
|
131
|
-
tslib_1.__metadata("design:type", String)
|
|
132
|
-
], ExcelExportComponent.prototype, "proxyURL", void 0);
|
|
133
|
-
tslib_1.__decorate([
|
|
134
|
-
Input(),
|
|
135
|
-
tslib_1.__metadata("design:type", Array)
|
|
136
|
-
], ExcelExportComponent.prototype, "data", void 0);
|
|
137
|
-
tslib_1.__decorate([
|
|
138
|
-
Input(),
|
|
139
|
-
tslib_1.__metadata("design:type", Array)
|
|
140
|
-
], ExcelExportComponent.prototype, "group", void 0);
|
|
141
|
-
tslib_1.__decorate([
|
|
142
|
-
Input(),
|
|
143
|
-
tslib_1.__metadata("design:type", Object)
|
|
144
|
-
], ExcelExportComponent.prototype, "paddingCellOptions", void 0);
|
|
145
|
-
tslib_1.__decorate([
|
|
146
|
-
Input(),
|
|
147
|
-
tslib_1.__metadata("design:type", Object)
|
|
148
|
-
], ExcelExportComponent.prototype, "headerPaddingCellOptions", void 0);
|
|
149
|
-
tslib_1.__decorate([
|
|
150
|
-
ContentChildren(ColumnBase, { descendants: true }),
|
|
151
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
152
|
-
], ExcelExportComponent.prototype, "columns", void 0);
|
|
153
|
-
ExcelExportComponent = tslib_1.__decorate([
|
|
154
|
-
Component({
|
|
155
|
-
exportAs: 'kendoExcelExport',
|
|
156
|
-
selector: 'kendo-excelexport',
|
|
157
|
-
providers: [
|
|
158
|
-
LocalizationService,
|
|
159
|
-
{
|
|
160
|
-
provide: L10N_PREFIX,
|
|
161
|
-
useValue: 'kendo.excelexport'
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
template: ""
|
|
165
|
-
}),
|
|
166
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService, NgZone])
|
|
167
|
-
], ExcelExportComponent);
|
|
168
|
-
return ExcelExportComponent;
|
|
169
|
-
}());
|
|
170
|
-
export { ExcelExportComponent };
|
|
@@ -1,65 +0,0 @@
|
|
|
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 tslib_1 from "tslib";
|
|
6
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { ExcelExportComponent } from './excel-export.component';
|
|
8
|
-
import { ColumnComponent } from './columns/column.component';
|
|
9
|
-
import { ColumnGroupComponent } from './columns/column-group.component';
|
|
10
|
-
import { FooterTemplateDirective } from './columns/footer-template.directive';
|
|
11
|
-
import { GroupFooterTemplateDirective } from './columns/group-footer-template.directive';
|
|
12
|
-
import { GroupHeaderTemplateDirective } from './columns/group-header-template.directive';
|
|
13
|
-
import { GroupHeaderColumnTemplateDirective } from './columns/group-header-column-template.directive';
|
|
14
|
-
var declarations = [
|
|
15
|
-
ExcelExportComponent,
|
|
16
|
-
ColumnComponent,
|
|
17
|
-
ColumnGroupComponent,
|
|
18
|
-
FooterTemplateDirective,
|
|
19
|
-
GroupFooterTemplateDirective,
|
|
20
|
-
GroupHeaderTemplateDirective,
|
|
21
|
-
GroupHeaderColumnTemplateDirective
|
|
22
|
-
];
|
|
23
|
-
/**
|
|
24
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
25
|
-
* definition for the Excel Export component.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
*
|
|
29
|
-
* ```ts-no-run
|
|
30
|
-
* // Import the ExcelExportModule module
|
|
31
|
-
* import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
|
|
32
|
-
*
|
|
33
|
-
* // The browser platform with a compiler
|
|
34
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
35
|
-
*
|
|
36
|
-
* import { NgModule } from '@angular/core';
|
|
37
|
-
*
|
|
38
|
-
* // Import the app component
|
|
39
|
-
* import { AppComponent } from './app.component';
|
|
40
|
-
*
|
|
41
|
-
* // Define the app module
|
|
42
|
-
* _@NgModule({
|
|
43
|
-
* declarations: [AppComponent], // declare app component
|
|
44
|
-
* imports: [BrowserModule, ExcelExportModule], // import ExcelExportModule module
|
|
45
|
-
* bootstrap: [AppComponent]
|
|
46
|
-
* })
|
|
47
|
-
* export class AppModule {}
|
|
48
|
-
*
|
|
49
|
-
* // Compile and launch the module
|
|
50
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
51
|
-
*
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
var ExcelExportModule = /** @class */ (function () {
|
|
55
|
-
function ExcelExportModule() {
|
|
56
|
-
}
|
|
57
|
-
ExcelExportModule = tslib_1.__decorate([
|
|
58
|
-
NgModule({
|
|
59
|
-
declarations: [declarations],
|
|
60
|
-
exports: [declarations]
|
|
61
|
-
})
|
|
62
|
-
], ExcelExportModule);
|
|
63
|
-
return ExcelExportModule;
|
|
64
|
-
}());
|
|
65
|
-
export { ExcelExportModule };
|
package/dist/es/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './main';
|
|
9
|
-
export { GroupHeaderColumnTemplateDirective } from './columns/group-header-column-template.directive';
|
package/dist/es/main.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
export { ExcelExportComponent } from './excel-export.component';
|
|
6
|
-
export { ExcelExportModule } from './excel-export.module';
|
|
7
|
-
export { ColumnBase } from './columns/column-base';
|
|
8
|
-
export { ColumnComponent } from './columns/column.component';
|
|
9
|
-
export { ColumnGroupComponent } from './columns/column-group.component';
|
|
10
|
-
export { FooterTemplateDirective } from './columns/footer-template.directive';
|
|
11
|
-
export { GroupFooterTemplateDirective } from './columns/group-footer-template.directive';
|
|
12
|
-
export { GroupHeaderTemplateDirective } from './columns/group-header-template.directive';
|
|
13
|
-
export * from './ooxml/workbook';
|
|
14
|
-
export * from '@progress/kendo-ooxml';
|
|
@@ -1,4 +0,0 @@
|
|
|
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
|
-
*-------------------------------------------------------------------------------------------*/
|
|
@@ -1,126 +0,0 @@
|
|
|
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
|
-
/* tslint:disable align */
|
|
6
|
-
/* tslint:disable:no-use-before-declare */
|
|
7
|
-
var compileTemplate = function (templateRef, context, updateContext) {
|
|
8
|
-
var embeddedView = templateRef.createEmbeddedView(context);
|
|
9
|
-
var result = function (data) {
|
|
10
|
-
updateContext(context, data);
|
|
11
|
-
embeddedView.detectChanges();
|
|
12
|
-
return embeddedView.rootNodes.reduce(function (content, rootNode) {
|
|
13
|
-
return content + rootNode.textContent;
|
|
14
|
-
}, '').trim();
|
|
15
|
-
};
|
|
16
|
-
result.destroy = function () {
|
|
17
|
-
embeddedView.destroy();
|
|
18
|
-
embeddedView = null;
|
|
19
|
-
};
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
var ɵ0 = compileTemplate;
|
|
23
|
-
var updateGroupHeaderContext = function (context, data) {
|
|
24
|
-
context.$implicit = context.group = data;
|
|
25
|
-
context.field = data.field;
|
|
26
|
-
context.value = data.value;
|
|
27
|
-
context.aggregates = data.aggregates;
|
|
28
|
-
};
|
|
29
|
-
var ɵ1 = updateGroupHeaderContext;
|
|
30
|
-
var updateGroupFooterContext = function (context, data) {
|
|
31
|
-
context.group = data.group;
|
|
32
|
-
context.$implicit = context.aggregates = data;
|
|
33
|
-
};
|
|
34
|
-
var ɵ2 = updateGroupFooterContext;
|
|
35
|
-
var updateFooterContext = function (context, data) {
|
|
36
|
-
context.aggregates = data.aggregates;
|
|
37
|
-
};
|
|
38
|
-
var ɵ3 = updateFooterContext;
|
|
39
|
-
/**
|
|
40
|
-
* @hidden
|
|
41
|
-
*/
|
|
42
|
-
export var toExporterColumns = function (sourceColumns) {
|
|
43
|
-
var exporterColumns = [];
|
|
44
|
-
var columnIndex = 0;
|
|
45
|
-
var addColumns = function (columns, result, level) {
|
|
46
|
-
columns.forEach(function (column) {
|
|
47
|
-
if (column.level === level) {
|
|
48
|
-
var exporterColumn = new ExporterColumn(column, columnIndex);
|
|
49
|
-
result.push(exporterColumn);
|
|
50
|
-
if (column.children && column.children.some(function (c) { return c !== column; })) {
|
|
51
|
-
var children = exporterColumn.columns = [];
|
|
52
|
-
addColumns(column.children, children, level + 1);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
columnIndex++;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
addColumns(sourceColumns, exporterColumns, 0);
|
|
61
|
-
return exporterColumns;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
export var destroyColumns = function (columns) {
|
|
67
|
-
if (columns) {
|
|
68
|
-
columns.forEach(function (column) {
|
|
69
|
-
column.destroy();
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* @hidden
|
|
75
|
-
*/
|
|
76
|
-
var ExporterColumn = /** @class */ (function () {
|
|
77
|
-
function ExporterColumn(column, columnIndex) {
|
|
78
|
-
this.title = column.title;
|
|
79
|
-
this.field = column.field;
|
|
80
|
-
this.hidden = column.hidden;
|
|
81
|
-
this.locked = column.locked;
|
|
82
|
-
this.width = column.width;
|
|
83
|
-
this.headerCellOptions = column.headerCellOptions;
|
|
84
|
-
this.cellOptions = column.cellOptions;
|
|
85
|
-
this.groupHeaderCellOptions = column.groupHeaderCellOptions;
|
|
86
|
-
this.groupFooterCellOptions = column.groupFooterCellOptions;
|
|
87
|
-
this.footerCellOptions = column.footerCellOptions;
|
|
88
|
-
if (column.footerTemplate) {
|
|
89
|
-
this.footerTemplate = compileTemplate(column.footerTemplate.templateRef, {
|
|
90
|
-
$implicit: column,
|
|
91
|
-
column: column,
|
|
92
|
-
columnIndex: columnIndex
|
|
93
|
-
}, updateFooterContext);
|
|
94
|
-
}
|
|
95
|
-
if (column.groupFooterTemplate) {
|
|
96
|
-
this.groupFooterTemplate = compileTemplate(column.groupFooterTemplate.templateRef, {
|
|
97
|
-
column: column,
|
|
98
|
-
field: column.field
|
|
99
|
-
}, updateGroupFooterContext);
|
|
100
|
-
}
|
|
101
|
-
if (column.groupHeaderTemplate) {
|
|
102
|
-
this.groupHeaderTemplate = compileTemplate(column.groupHeaderTemplate.templateRef, {}, updateGroupHeaderContext);
|
|
103
|
-
}
|
|
104
|
-
if (column.groupHeaderColumnTemplate) {
|
|
105
|
-
this.groupHeaderColumnTemplate = compileTemplate(column.groupHeaderColumnTemplate.templateRef, {}, updateGroupHeaderContext);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
ExporterColumn.prototype.destroy = function () {
|
|
109
|
-
if (this.footerTemplate) {
|
|
110
|
-
this.footerTemplate.destroy();
|
|
111
|
-
}
|
|
112
|
-
if (this.groupFooterTemplate) {
|
|
113
|
-
this.groupFooterTemplate.destroy();
|
|
114
|
-
}
|
|
115
|
-
if (this.groupHeaderTemplate) {
|
|
116
|
-
this.groupHeaderTemplate.destroy();
|
|
117
|
-
}
|
|
118
|
-
if (this.groupHeaderColumnTemplate) {
|
|
119
|
-
this.groupHeaderColumnTemplate.destroy();
|
|
120
|
-
}
|
|
121
|
-
destroyColumns(this.columns);
|
|
122
|
-
};
|
|
123
|
-
return ExporterColumn;
|
|
124
|
-
}());
|
|
125
|
-
export { ExporterColumn };
|
|
126
|
-
export { ɵ0, ɵ1, ɵ2, ɵ3 };
|
|
@@ -1,45 +0,0 @@
|
|
|
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 { IntlService, ExcelExporter, Workbook } from '@progress/kendo-ooxml';
|
|
6
|
-
import { toExporterColumns, destroyColumns } from './exporter-columns';
|
|
7
|
-
import { toString } from '@telerik/kendo-intl';
|
|
8
|
-
IntlService.register({ toString: toString });
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export var workbookOptions = function (options) {
|
|
14
|
-
var columns = toExporterColumns(options.columns);
|
|
15
|
-
var exporter = new ExcelExporter({
|
|
16
|
-
columns: columns,
|
|
17
|
-
data: options.data,
|
|
18
|
-
filterable: options.filterable,
|
|
19
|
-
groups: options.group,
|
|
20
|
-
paddingCellOptions: options.paddingCellOptions,
|
|
21
|
-
headerPaddingCellOptions: options.headerPaddingCellOptions,
|
|
22
|
-
collapsible: options.collapsible,
|
|
23
|
-
hierarchy: options.hierarchy,
|
|
24
|
-
aggregates: options.aggregates
|
|
25
|
-
});
|
|
26
|
-
var result = exporter.workbook();
|
|
27
|
-
result.creator = options.creator;
|
|
28
|
-
result.date = options.date;
|
|
29
|
-
result.rtl = options.rtl;
|
|
30
|
-
destroyColumns(columns);
|
|
31
|
-
return result;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
export var toDataURL = function (options) {
|
|
37
|
-
var workbook = new Workbook(options);
|
|
38
|
-
return workbook.toDataURL();
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
export var isWorkbookOptions = function (value) {
|
|
44
|
-
return value && value.sheets;
|
|
45
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export var packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-excel-export',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate: 1646218926,
|
|
13
|
-
version: '',
|
|
14
|
-
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'
|
|
15
|
-
};
|