@sd-angular/core 1.3.238 → 1.3.240
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/sd-angular-core-export.umd.js +95 -88
- package/bundles/sd-angular-core-export.umd.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.min.js +1 -1
- package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.js +514 -90
- package/bundles/sd-angular-core-table.umd.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.min.js +2 -2
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
- package/esm2015/export/src/lib/export.service.js +93 -90
- package/esm2015/table/sd-angular-core-table.js +19 -18
- package/esm2015/table/src/lib/components/popup-export/popup-export.component.js +289 -0
- package/esm2015/table/src/lib/models/table-option-export.model.js +1 -1
- package/esm2015/table/src/lib/table.component.js +32 -16
- package/esm2015/table/src/lib/table.module.js +6 -2
- package/export/src/lib/export.service.d.ts +4 -0
- package/fesm2015/sd-angular-core-export.js +92 -89
- package/fesm2015/sd-angular-core-export.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +319 -18
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.238.tgz → sd-angular-core-1.3.240.tgz} +0 -0
- package/table/sd-angular-core-table.d.ts +18 -17
- package/table/sd-angular-core-table.metadata.json +1 -1
- package/table/src/lib/components/popup-export/popup-export.component.d.ts +56 -0
- package/table/src/lib/models/table-option-export.model.d.ts +7 -6
- package/table/src/lib/table.component.d.ts +8 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { OnInit, AfterViewInit, EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { SdNotifyService } from '@sd-angular/core/notify';
|
|
3
|
+
import { SdLoadingService } from '@sd-angular/core/loading';
|
|
4
|
+
import { SdTranslateService } from '@sd-angular/core/translate';
|
|
5
|
+
import { MatSelectionList } from '@angular/material/list';
|
|
6
|
+
import { SdModal } from '@sd-angular/core/modal';
|
|
7
|
+
import { SdExportFile, SdExportService, SdExportColumn } from '@sd-angular/core/export';
|
|
8
|
+
import { FormGroup } from '@angular/forms';
|
|
9
|
+
import { SdTableOption } from '../../models';
|
|
10
|
+
import { SdTableConfigurationResult } from '../../models/table-option-config.model';
|
|
11
|
+
export declare class SdPopupExport implements OnInit, AfterViewInit {
|
|
12
|
+
#private;
|
|
13
|
+
private ref;
|
|
14
|
+
private loadingService;
|
|
15
|
+
private exportService;
|
|
16
|
+
private notifyService;
|
|
17
|
+
private translateService;
|
|
18
|
+
tableOption: SdTableOption;
|
|
19
|
+
columns: SdExportColumn[];
|
|
20
|
+
templateName: string;
|
|
21
|
+
enableCreating: boolean;
|
|
22
|
+
modal: SdModal;
|
|
23
|
+
listGroups: MatSelectionList;
|
|
24
|
+
selected: {
|
|
25
|
+
[key: string]: boolean;
|
|
26
|
+
};
|
|
27
|
+
files: SdExportFile[];
|
|
28
|
+
export: EventEmitter<{
|
|
29
|
+
file: SdExportFile;
|
|
30
|
+
columns: SdExportColumn[];
|
|
31
|
+
isCSV?: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
form: FormGroup;
|
|
34
|
+
set _tableOption(option: SdTableOption);
|
|
35
|
+
configuration: SdTableConfigurationResult;
|
|
36
|
+
private get key();
|
|
37
|
+
private get tableColumns();
|
|
38
|
+
private get additionalColumns();
|
|
39
|
+
constructor(ref: ChangeDetectorRef, loadingService: SdLoadingService, exportService: SdExportService, notifyService: SdNotifyService, translateService: SdTranslateService);
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
ngAfterViewInit(): void;
|
|
42
|
+
open: () => Promise<void>;
|
|
43
|
+
exportDefault: () => void;
|
|
44
|
+
exportCSV: () => void;
|
|
45
|
+
loadFiles: (group?: string) => Promise<void>;
|
|
46
|
+
generateTemplate: () => Promise<void>;
|
|
47
|
+
generateAndUploadTemplate: (fileName?: string) => Promise<{
|
|
48
|
+
filePath: any;
|
|
49
|
+
fileName: any;
|
|
50
|
+
}>;
|
|
51
|
+
onExport: (file: SdExportFile) => void;
|
|
52
|
+
uploadTemplate: () => Promise<void>;
|
|
53
|
+
removeFile: (file: SdExportFile) => void;
|
|
54
|
+
createTemplate: () => Promise<void>;
|
|
55
|
+
templateNameValidator: (val: string) => string;
|
|
56
|
+
}
|
|
@@ -13,14 +13,10 @@ export interface SdTableOptionExport<T = any> {
|
|
|
13
13
|
}>;
|
|
14
14
|
mapping?: (items: T[], fileName?: string) => T[] | Promise<T[]>;
|
|
15
15
|
columns?: SdTableOptionExportColumn<T>[];
|
|
16
|
-
sheets?:
|
|
17
|
-
name: string;
|
|
18
|
-
items: any[] | ((items?: any[]) => any[] | Promise<any[]>);
|
|
19
|
-
fields: string[];
|
|
20
|
-
}[];
|
|
16
|
+
sheets?: SdTableOptionExportSheet[];
|
|
21
17
|
}
|
|
22
18
|
export interface SdTableOptionExportColumn<T = any> {
|
|
23
|
-
field: string
|
|
19
|
+
field: Extract<keyof T, string>;
|
|
24
20
|
title: string;
|
|
25
21
|
description?: string;
|
|
26
22
|
width?: string;
|
|
@@ -29,3 +25,8 @@ export interface SdTableOptionExportColumn<T = any> {
|
|
|
29
25
|
disabled: boolean;
|
|
30
26
|
};
|
|
31
27
|
}
|
|
28
|
+
export interface SdTableOptionExportSheet<T = any> {
|
|
29
|
+
name: string;
|
|
30
|
+
items: T[] | (() => T[] | Promise<T[]>);
|
|
31
|
+
fields: (Extract<keyof T, string>)[];
|
|
32
|
+
}
|
|
@@ -12,7 +12,7 @@ import { SdTableFilter } from './components/table-filter/table-filter.component'
|
|
|
12
12
|
import { SdTableFilterDefDirective } from './directives/sd-table-filter-def.directive';
|
|
13
13
|
import { SdMaterialSubInformationDefDirective } from './directives/sd-table-expand-def.directive';
|
|
14
14
|
import { SdMaterialFooterDefDirective } from './directives/sd-table-footer-def.directive';
|
|
15
|
-
import { SdExportService } from '@sd-angular/core/export';
|
|
15
|
+
import { SdExportColumn, SdExportFile, SdExportService } from '@sd-angular/core/export';
|
|
16
16
|
import { SdTableConfigurationResult } from './models/table-option-config.model';
|
|
17
17
|
import { SdTableConfigurationService } from './services/table-configuration.service';
|
|
18
18
|
import { SdQuickAction } from '@sd-angular/core/quick-action';
|
|
@@ -21,6 +21,7 @@ import { SdScrollDirective } from '@sd-angular/core/common';
|
|
|
21
21
|
import { SdTableFilterService } from './services/table-filter/table-filter.service';
|
|
22
22
|
import { SdPopupConfiguration } from './components/popup-configuration/popup-configuration.component';
|
|
23
23
|
import { SdLoadingService } from '@sd-angular/core/loading';
|
|
24
|
+
import { SdPopupExport } from './components/popup-export/popup-export.component';
|
|
24
25
|
export declare class SdTable<T = any> implements OnInit, AfterViewInit, OnDestroy {
|
|
25
26
|
#private;
|
|
26
27
|
private ref;
|
|
@@ -32,6 +33,7 @@ export declare class SdTable<T = any> implements OnInit, AfterViewInit, OnDestro
|
|
|
32
33
|
private gridFilterService;
|
|
33
34
|
table: MatTable<any>;
|
|
34
35
|
popupConfiguration: SdPopupConfiguration;
|
|
36
|
+
sdPopupExport: SdPopupExport;
|
|
35
37
|
sdScroll: SdScrollDirective;
|
|
36
38
|
filterRegister: SdTableFilterRegister;
|
|
37
39
|
key: string;
|
|
@@ -70,6 +72,11 @@ export declare class SdTable<T = any> implements OnInit, AfterViewInit, OnDestro
|
|
|
70
72
|
ngAfterViewInit(): void;
|
|
71
73
|
ngOnDestroy(): void;
|
|
72
74
|
reload: (force?: boolean) => Promise<void>;
|
|
75
|
+
onExport: (args?: {
|
|
76
|
+
file?: SdExportFile;
|
|
77
|
+
columns?: SdExportColumn[];
|
|
78
|
+
isCSV?: boolean;
|
|
79
|
+
}) => Promise<void>;
|
|
73
80
|
exportExcel: () => void;
|
|
74
81
|
exportCSV: () => void;
|
|
75
82
|
onFilterChange: () => void;
|