@nettyapps/ntybase 21.1.37 → 21.1.39
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/fesm2022/{nettyapps-ntybase-en-USbase-C1t7F-R0.mjs → nettyapps-ntybase-en-USbase-Bl-neyoj.mjs} +6 -2
- package/fesm2022/{nettyapps-ntybase-en-USbase-C1t7F-R0.mjs.map → nettyapps-ntybase-en-USbase-Bl-neyoj.mjs.map} +1 -1
- package/fesm2022/{nettyapps-ntybase-tr-TRbase-BXQ_UTZY.mjs → nettyapps-ntybase-tr-TRbase-CO4HBOmj.mjs} +6 -2
- package/fesm2022/{nettyapps-ntybase-tr-TRbase-BXQ_UTZY.mjs.map → nettyapps-ntybase-tr-TRbase-CO4HBOmj.mjs.map} +1 -1
- package/fesm2022/nettyapps-ntybase.mjs +1008 -992
- package/fesm2022/nettyapps-ntybase.mjs.map +1 -1
- package/package.json +1 -1
- package/translations/en-USbase.json +5 -1
- package/translations/tr-TRbase.json +5 -1
- package/types/nettyapps-ntybase.d.ts +124 -123
package/package.json
CHANGED
|
@@ -276,6 +276,9 @@
|
|
|
276
276
|
"@maxLengthError": "Please enter at most {{value}} characters",
|
|
277
277
|
"@dateCannotBeBeforeStart": "Selected date cannot be earlier than the start date",
|
|
278
278
|
"@dateCannotBeAfterEnd": "Selected date cannot be later than the end date",
|
|
279
|
+
"@selectFile": "Select File",
|
|
280
|
+
"@uploadFile": "Upload File",
|
|
281
|
+
"@displayLogs": "Display Logs",
|
|
279
282
|
"@EXCEL_PARSER": {
|
|
280
283
|
"noFileChosen": "Please select a file",
|
|
281
284
|
"errorLoadingFile": "Error loading file",
|
|
@@ -285,7 +288,8 @@
|
|
|
285
288
|
"defaultValueSet": "'{{prop}}' field is empty, default value assigned.",
|
|
286
289
|
"requiredFieldMissing": "'{{prop}}' is required but its value is empty.",
|
|
287
290
|
"conversionError": "Could not convert type of data '{{value}}' for field '{{prop}}'.",
|
|
288
|
-
"rowSkipped": "This row was skipped due to errors."
|
|
291
|
+
"rowSkipped": "This row was skipped due to errors.",
|
|
292
|
+
"sampleFile": "Sample File"
|
|
289
293
|
},
|
|
290
294
|
"@EXCEL_PARSER_LOG": {
|
|
291
295
|
"all": "All",
|
|
@@ -276,6 +276,9 @@
|
|
|
276
276
|
"@maxLengthError": "En fazla {{value}} karakter girebilirsiniz",
|
|
277
277
|
"@dateCannotBeBeforeStart": "Seçilen tarih, başlangıç tarihinden önce olamaz",
|
|
278
278
|
"@dateCannotBeAfterEnd": "Seçilen tarih, bitiş tarihinden sonra olamaz",
|
|
279
|
+
"@selectFile": "Dosya Seç",
|
|
280
|
+
"@uploadFile": "Dosya Yükle",
|
|
281
|
+
"@displayLogs": "Logları Görüntüle",
|
|
279
282
|
"@EXCEL_PARSER": {
|
|
280
283
|
"noFileChosen": "Lütfen bir dosya seçin",
|
|
281
284
|
"errorLoadingFile": "Dosya yüklenirken hata oluştu",
|
|
@@ -285,7 +288,8 @@
|
|
|
285
288
|
"defaultValueSet": "'{{prop}}' alanı boş olduğu için varsayılan değer atandı.",
|
|
286
289
|
"requiredFieldMissing": "'{{prop}}' zorunlu bir alan ancak değeri boş.",
|
|
287
290
|
"conversionError": "'{{prop}}' alanı için '{{value}}' verisinin tipi dönüştürülemedi.",
|
|
288
|
-
"rowSkipped": "Bu satır hatalardan dolayı atlandı."
|
|
291
|
+
"rowSkipped": "Bu satır hatalardan dolayı atlandı.",
|
|
292
|
+
"sampleFile": "Örnek Dosya"
|
|
289
293
|
},
|
|
290
294
|
"@EXCEL_PARSER_LOG": {
|
|
291
295
|
"all": "Tümü",
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, OnInit, DoCheck, InjectionToken, Signal, WritableSignal } from '@angular/core';
|
|
3
|
-
import * as ag_grid_community from 'ag-grid-community';
|
|
4
|
-
import { IFilterParams, IDoesFilterPassParams } from 'ag-grid-community';
|
|
5
|
-
import { EnvironmentProxy, NettyStandardProxy, NettyStandardLogProxy, NettyStandardFilterProxy } from '@nettyapps/ntycontract';
|
|
6
3
|
import { Subject, Observable } from 'rxjs';
|
|
7
4
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
8
5
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
9
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
7
|
import { Title } from '@angular/platform-browser';
|
|
8
|
+
import { NettyStandardFilterProxy, EnvironmentProxy, NettyStandardProxy, NettyStandardLogProxy } from '@nettyapps/ntycontract';
|
|
9
|
+
import { I18nService } from '@nettyapps/ntyi18n';
|
|
10
|
+
import { ActivatedRoute, Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
|
|
11
|
+
import * as ag_grid_community from 'ag-grid-community';
|
|
12
|
+
import { IFilterParams, IDoesFilterPassParams } from 'ag-grid-community';
|
|
11
13
|
import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpInterceptorFn } from '@angular/common/http';
|
|
12
14
|
import { Theme, GridApi, GridOptions, StatusPanelDef, GridReadyEvent } from 'ag-grid-enterprise';
|
|
13
|
-
import { ActivatedRoute, Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
|
|
14
15
|
import { NgForm, FormGroup } from '@angular/forms';
|
|
15
|
-
import * as XLSX from 'xlsx';
|
|
16
16
|
import { ICellRendererAngularComp, IFilterAngularComp } from 'ag-grid-angular';
|
|
17
|
-
import { I18nService } from '@nettyapps/ntyi18n';
|
|
18
|
-
|
|
19
|
-
declare class Ntybase {
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Ntybase, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Ntybase, "lib-ntybase", never, {}, {}, never, never, false, never>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare class NtybaseModule {
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NtybaseModule, never>;
|
|
26
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NtybaseModule, [typeof Ntybase], never, [typeof Ntybase]>;
|
|
27
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NtybaseModule>;
|
|
28
|
-
}
|
|
29
17
|
|
|
30
18
|
declare class AlertService {
|
|
31
19
|
private snackBar;
|
|
@@ -99,6 +87,98 @@ declare abstract class NettyAppsBase implements OnDestroy {
|
|
|
99
87
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAppsBase, "ntybase-netty-apps-base", never, { "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
100
88
|
}
|
|
101
89
|
|
|
90
|
+
declare abstract class NettyAppsFilterBase<Trecord, Tfilter> extends NettyAppsBase implements OnInit {
|
|
91
|
+
isFilterExpanded: i0.ModelSignal<boolean>;
|
|
92
|
+
filteredRecords: i0.OutputEmitterRef<Trecord[]>;
|
|
93
|
+
filterSelectionChanged: i0.OutputEmitterRef<Tfilter>;
|
|
94
|
+
refresh: i0.InputSignal<number>;
|
|
95
|
+
fileName: i0.InputSignal<string>;
|
|
96
|
+
protected filterProxy: NettyStandardFilterProxy<Tfilter>;
|
|
97
|
+
protected currentItem: i0.WritableSignal<Tfilter>;
|
|
98
|
+
constructor();
|
|
99
|
+
ngOnInit(): Promise<void>;
|
|
100
|
+
protected onApply(): void;
|
|
101
|
+
protected onReset(): void;
|
|
102
|
+
protected onExport(): void;
|
|
103
|
+
protected abstract createNewFilter(): Tfilter;
|
|
104
|
+
protected abstract componentName(): string;
|
|
105
|
+
protected afterOnInit(): Promise<void>;
|
|
106
|
+
logInputs(message: string): void;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NettyAppsFilterBase<any, any>, never>;
|
|
108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAppsFilterBase<any, any>, "ntybase-netty-apps-base", never, { "isFilterExpanded": { "alias": "isFilterExpanded"; "required": false; "isSignal": true; }; "refresh": { "alias": "refresh"; "required": false; "isSignal": true; }; "fileName": { "alias": "fileName"; "required": false; "isSignal": true; }; }, { "isFilterExpanded": "isFilterExpandedChange"; "filteredRecords": "filteredRecords"; "filterSelectionChanged": "filterSelectionChanged"; }, never, never, true, never>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface NettyEntityBaseInterface<T> {
|
|
112
|
+
getPK(): any;
|
|
113
|
+
setPK(pk: any): void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface NettyEntityInterface<T> extends NettyEntityBaseInterface<T> {
|
|
117
|
+
compare(other: T): T;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
interface NettyEntityLogInterface<T> extends NettyEntityBaseInterface<T> {
|
|
121
|
+
logGuid: any | null;
|
|
122
|
+
changingDate: Date | null;
|
|
123
|
+
changingUser: any | null;
|
|
124
|
+
ip: string | null;
|
|
125
|
+
changingUserName: string | null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare class NettyBaseApp {
|
|
129
|
+
protected i18nService: I18nService;
|
|
130
|
+
protected alertService: AlertService;
|
|
131
|
+
protected loadBaseTranslations(): Promise<void>;
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NettyBaseApp, never>;
|
|
133
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NettyBaseApp, "ntybase-netty-base-app", never, {}, {}, never, never, true, never>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare class ParseLog implements NettyEntityInterface<ParseLog> {
|
|
137
|
+
rowIndex: number;
|
|
138
|
+
message: string;
|
|
139
|
+
level: 'INFO' | 'WARN' | 'ERROR';
|
|
140
|
+
messageKey?: string;
|
|
141
|
+
messageParams?: any;
|
|
142
|
+
init(): void;
|
|
143
|
+
compare(other: ParseLog): ParseLog;
|
|
144
|
+
getPK(): number;
|
|
145
|
+
setPK(pk: any): void;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
type ConverterFn = (value: any) => any;
|
|
149
|
+
interface ColumnMapping<T> {
|
|
150
|
+
index: number;
|
|
151
|
+
prop: keyof T;
|
|
152
|
+
headerName?: string;
|
|
153
|
+
required?: boolean;
|
|
154
|
+
defaultValue?: any;
|
|
155
|
+
converter?: ConverterFn;
|
|
156
|
+
sampleValue?: any | ((index: number) => any);
|
|
157
|
+
}
|
|
158
|
+
interface ExcelParserOptions {
|
|
159
|
+
sheetIndex?: number;
|
|
160
|
+
headerRowIndex?: number;
|
|
161
|
+
}
|
|
162
|
+
interface ExcelSampleOptions {
|
|
163
|
+
sampleCount?: number;
|
|
164
|
+
fileName?: string;
|
|
165
|
+
sheetName?: string;
|
|
166
|
+
}
|
|
167
|
+
declare class ExcelParserError extends Error {
|
|
168
|
+
key: string;
|
|
169
|
+
params?: any | undefined;
|
|
170
|
+
constructor(key: string, params?: any | undefined);
|
|
171
|
+
}
|
|
172
|
+
declare class ExcelParser<T> {
|
|
173
|
+
private mappings;
|
|
174
|
+
constructor(mappings: ColumnMapping<T>[]);
|
|
175
|
+
parse(file: File, options?: ExcelParserOptions): Promise<{
|
|
176
|
+
data: T[];
|
|
177
|
+
logs: ParseLog[];
|
|
178
|
+
}>;
|
|
179
|
+
generateSampleExcel(options?: ExcelSampleOptions): Promise<void>;
|
|
180
|
+
}
|
|
181
|
+
|
|
102
182
|
declare class CurrentUserPreference {
|
|
103
183
|
coid: any | null;
|
|
104
184
|
nettyUserPreferenceGUID: any | null;
|
|
@@ -326,11 +406,6 @@ declare class SysfunctionProxy {
|
|
|
326
406
|
|
|
327
407
|
type AgGridSelectionModeType = 'singleRow' | 'multiRow';
|
|
328
408
|
|
|
329
|
-
interface NettyEntityBaseInterface<T> {
|
|
330
|
-
getPK(): any;
|
|
331
|
-
setPK(pk: any): void;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
409
|
declare abstract class NettyAgGridBase<T extends NettyEntityBaseInterface<T>> extends NettyAppsBase {
|
|
335
410
|
protected FILTER_MODE_KEY: string;
|
|
336
411
|
protected myTheme: Theme<ag_grid_community.ThemeDefaultParams>;
|
|
@@ -450,10 +525,6 @@ declare abstract class NettyAgGridBase<T extends NettyEntityBaseInterface<T>> ex
|
|
|
450
525
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridBase<any>, "ntybase-ag-grid-base", never, { "popupFilterValid": { "alias": "popupFilterValid"; "required": false; "isSignal": true; }; "popupValid": { "alias": "popupValid"; "required": false; "isSignal": true; }; "componantParameterGUID": { "alias": "componantParameterGUID"; "required": false; "isSignal": true; }; "componantParameterType": { "alias": "componantParameterType"; "required": false; "isSignal": true; }; "agGridSelectionMode": { "alias": "agGridSelectionMode"; "required": false; "isSignal": true; }; }, { "onElementSelect": "onElementSelect"; "selectedElement": "selectedElement"; }, never, never, true, never>;
|
|
451
526
|
}
|
|
452
527
|
|
|
453
|
-
interface NettyEntityInterface<T> extends NettyEntityBaseInterface<T> {
|
|
454
|
-
compare(other: T): T;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
528
|
declare abstract class NettyAgGridListBase<T extends NettyEntityInterface<T>> extends NettyAgGridBase<T> implements OnInit {
|
|
458
529
|
protected router: Router;
|
|
459
530
|
protected dialog: MatDialog;
|
|
@@ -483,6 +554,33 @@ declare abstract class NettyAgGridListBase<T extends NettyEntityInterface<T>> ex
|
|
|
483
554
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridListBase<any>, "ntybase-ag-grid-list-base", never, {}, {}, never, never, true, never>;
|
|
484
555
|
}
|
|
485
556
|
|
|
557
|
+
declare abstract class ExcelImportBase<T> extends NettyAgGridListBase<any> {
|
|
558
|
+
protected isFileSelectionHidden: i0.WritableSignal<boolean>;
|
|
559
|
+
protected isFileValid: i0.WritableSignal<boolean>;
|
|
560
|
+
protected logs: i0.WritableSignal<ParseLog[]>;
|
|
561
|
+
protected hasLogs: i0.Signal<boolean>;
|
|
562
|
+
protected logDialog: MatDialog;
|
|
563
|
+
protected parser: ExcelParser<T>;
|
|
564
|
+
onBtnClick(e: any): void;
|
|
565
|
+
loadData(): void;
|
|
566
|
+
onFilesSelected(evt: any): void;
|
|
567
|
+
downloadSampleExcel(): void;
|
|
568
|
+
showLogs(): void;
|
|
569
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExcelImportBase<any>, never>;
|
|
570
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExcelImportBase<any>, "ntybase-excel-import-base", never, {}, {}, never, never, true, never>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare class Ntybase {
|
|
574
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Ntybase, never>;
|
|
575
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Ntybase, "lib-ntybase", never, {}, {}, never, never, false, never>;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
declare class NtybaseModule {
|
|
579
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NtybaseModule, never>;
|
|
580
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NtybaseModule, [typeof Ntybase], never, [typeof Ntybase]>;
|
|
581
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NtybaseModule>;
|
|
582
|
+
}
|
|
583
|
+
|
|
486
584
|
declare abstract class NettyAgGridListFilterBase<T extends NettyEntityInterface<T>> extends NettyAgGridListBase<T> implements OnInit {
|
|
487
585
|
displayFilter: i0.InputSignal<boolean>;
|
|
488
586
|
protected _displayFilter: i0.Signal<boolean>;
|
|
@@ -503,14 +601,6 @@ declare abstract class NettyAgGridListFilterBase<T extends NettyEntityInterface<
|
|
|
503
601
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridListFilterBase<any>, "ntybase-ag-grid-list-filter-base", never, { "displayFilter": { "alias": "displayFilter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
504
602
|
}
|
|
505
603
|
|
|
506
|
-
interface NettyEntityLogInterface<T> extends NettyEntityBaseInterface<T> {
|
|
507
|
-
logGuid: any | null;
|
|
508
|
-
changingDate: Date | null;
|
|
509
|
-
changingUser: any | null;
|
|
510
|
-
ip: string | null;
|
|
511
|
-
changingUserName: string | null;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
604
|
declare abstract class NettyAgGridLogBase<T extends NettyEntityLogInterface<T>> extends NettyAgGridBase<T> implements OnInit {
|
|
515
605
|
protected nettyAppsProxy: NettyStandardLogProxy<T>;
|
|
516
606
|
/**
|
|
@@ -608,20 +698,6 @@ declare abstract class NettyAgGridSaveBase<T extends NettyEntityInterface<T>> ex
|
|
|
608
698
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridSaveBase<any>, "ntybase-ag-grid-save-base", never, { "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
609
699
|
}
|
|
610
700
|
|
|
611
|
-
type AOA = string[][];
|
|
612
|
-
declare abstract class ExcelImportBase extends NettyAgGridListBase<any> {
|
|
613
|
-
protected dataList: AOA;
|
|
614
|
-
protected wopts: XLSX.WritingOptions;
|
|
615
|
-
protected fileName: string;
|
|
616
|
-
protected isDataValidated: boolean;
|
|
617
|
-
/*******************************
|
|
618
|
-
*** EXCEL UPLOAD FUNCTIONS ***
|
|
619
|
-
*******************************/
|
|
620
|
-
onFileChange(evt: any): void;
|
|
621
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ExcelImportBase, never>;
|
|
622
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ExcelImportBase, "ntybase-excel-import-base", never, {}, {}, never, never, true, never>;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
701
|
declare class ButtonRenderer implements ICellRendererAngularComp {
|
|
626
702
|
protected params: any;
|
|
627
703
|
protected label: string;
|
|
@@ -1041,14 +1117,6 @@ declare class Guid {
|
|
|
1041
1117
|
static emptyWhenNull(guid: any): any;
|
|
1042
1118
|
}
|
|
1043
1119
|
|
|
1044
|
-
declare class NettyBaseApp {
|
|
1045
|
-
protected i18nService: I18nService;
|
|
1046
|
-
protected alertService: AlertService;
|
|
1047
|
-
protected loadBaseTranslations(): Promise<void>;
|
|
1048
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NettyBaseApp, never>;
|
|
1049
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NettyBaseApp, "ntybase-netty-base-app", never, {}, {}, never, never, true, never>;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
1120
|
declare class EnvironmentInfo {
|
|
1053
1121
|
showNettyInfo: boolean;
|
|
1054
1122
|
protected environmentProxy: EnvironmentProxy;
|
|
@@ -1125,73 +1193,6 @@ declare class NettyMenuService {
|
|
|
1125
1193
|
static ɵprov: i0.ɵɵInjectableDeclaration<NettyMenuService>;
|
|
1126
1194
|
}
|
|
1127
1195
|
|
|
1128
|
-
declare abstract class NettyAppsFilterBase<Trecord, Tfilter> extends NettyAppsBase implements OnInit {
|
|
1129
|
-
isFilterExpanded: i0.ModelSignal<boolean>;
|
|
1130
|
-
filteredRecords: i0.OutputEmitterRef<Trecord[]>;
|
|
1131
|
-
filterSelectionChanged: i0.OutputEmitterRef<Tfilter>;
|
|
1132
|
-
refresh: i0.InputSignal<number>;
|
|
1133
|
-
fileName: i0.InputSignal<string>;
|
|
1134
|
-
protected filterProxy: NettyStandardFilterProxy<Tfilter>;
|
|
1135
|
-
protected currentItem: i0.WritableSignal<Tfilter>;
|
|
1136
|
-
constructor();
|
|
1137
|
-
ngOnInit(): Promise<void>;
|
|
1138
|
-
protected onApply(): void;
|
|
1139
|
-
protected onReset(): void;
|
|
1140
|
-
protected onExport(): void;
|
|
1141
|
-
protected abstract createNewFilter(): Tfilter;
|
|
1142
|
-
protected abstract componentName(): string;
|
|
1143
|
-
protected afterOnInit(): Promise<void>;
|
|
1144
|
-
logInputs(message: string): void;
|
|
1145
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NettyAppsFilterBase<any, any>, never>;
|
|
1146
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAppsFilterBase<any, any>, "ntybase-netty-apps-base", never, { "isFilterExpanded": { "alias": "isFilterExpanded"; "required": false; "isSignal": true; }; "refresh": { "alias": "refresh"; "required": false; "isSignal": true; }; "fileName": { "alias": "fileName"; "required": false; "isSignal": true; }; }, { "isFilterExpanded": "isFilterExpandedChange"; "filteredRecords": "filteredRecords"; "filterSelectionChanged": "filterSelectionChanged"; }, never, never, true, never>;
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
declare class ParseLog implements NettyEntityInterface<ParseLog> {
|
|
1150
|
-
rowIndex: number;
|
|
1151
|
-
message: string;
|
|
1152
|
-
level: 'INFO' | 'WARN' | 'ERROR';
|
|
1153
|
-
messageKey?: string;
|
|
1154
|
-
messageParams?: any;
|
|
1155
|
-
init(): void;
|
|
1156
|
-
compare(other: ParseLog): ParseLog;
|
|
1157
|
-
getPK(): number;
|
|
1158
|
-
setPK(pk: any): void;
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
type ConverterFn = (value: any) => any;
|
|
1162
|
-
interface ColumnMapping<T> {
|
|
1163
|
-
index: number;
|
|
1164
|
-
prop: keyof T;
|
|
1165
|
-
headerName?: string;
|
|
1166
|
-
required?: boolean;
|
|
1167
|
-
defaultValue?: any;
|
|
1168
|
-
converter?: ConverterFn;
|
|
1169
|
-
sampleValue?: any | ((index: number) => any);
|
|
1170
|
-
}
|
|
1171
|
-
interface ExcelParserOptions {
|
|
1172
|
-
sheetIndex?: number;
|
|
1173
|
-
headerRowIndex?: number;
|
|
1174
|
-
}
|
|
1175
|
-
interface ExcelSampleOptions {
|
|
1176
|
-
sampleCount?: number;
|
|
1177
|
-
fileName?: string;
|
|
1178
|
-
sheetName?: string;
|
|
1179
|
-
}
|
|
1180
|
-
declare class ExcelParserError extends Error {
|
|
1181
|
-
key: string;
|
|
1182
|
-
params?: any | undefined;
|
|
1183
|
-
constructor(key: string, params?: any | undefined);
|
|
1184
|
-
}
|
|
1185
|
-
declare class ExcelParser<T> {
|
|
1186
|
-
private mappings;
|
|
1187
|
-
constructor(mappings: ColumnMapping<T>[]);
|
|
1188
|
-
parse(file: File, options?: ExcelParserOptions): Promise<{
|
|
1189
|
-
data: T[];
|
|
1190
|
-
logs: ParseLog[];
|
|
1191
|
-
}>;
|
|
1192
|
-
generateSampleExcel(options?: ExcelSampleOptions): Promise<void>;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
1196
|
declare const toNumber: (v: any) => number | null;
|
|
1196
1197
|
declare const toDate: (v: any) => Date | null;
|
|
1197
1198
|
declare const toBoolean: (v: any) => boolean | null;
|