@nettyapps/ntybase 21.1.36 → 21.1.38
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 +229 -30
- 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 +68 -15
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ü",
|
|
@@ -12,7 +12,6 @@ import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpI
|
|
|
12
12
|
import { Theme, GridApi, GridOptions, StatusPanelDef, GridReadyEvent } from 'ag-grid-enterprise';
|
|
13
13
|
import { ActivatedRoute, Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
|
|
14
14
|
import { NgForm, FormGroup } from '@angular/forms';
|
|
15
|
-
import * as XLSX from 'xlsx';
|
|
16
15
|
import { ICellRendererAngularComp, IFilterAngularComp } from 'ag-grid-angular';
|
|
17
16
|
import { I18nService } from '@nettyapps/ntyi18n';
|
|
18
17
|
|
|
@@ -608,18 +607,66 @@ declare abstract class NettyAgGridSaveBase<T extends NettyEntityInterface<T>> ex
|
|
|
608
607
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridSaveBase<any>, "ntybase-ag-grid-save-base", never, { "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
609
608
|
}
|
|
610
609
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
610
|
+
declare class ParseLog implements NettyEntityInterface<ParseLog> {
|
|
611
|
+
rowIndex: number;
|
|
612
|
+
message: string;
|
|
613
|
+
level: 'INFO' | 'WARN' | 'ERROR';
|
|
614
|
+
messageKey?: string;
|
|
615
|
+
messageParams?: any;
|
|
616
|
+
init(): void;
|
|
617
|
+
compare(other: ParseLog): ParseLog;
|
|
618
|
+
getPK(): number;
|
|
619
|
+
setPK(pk: any): void;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
type ConverterFn = (value: any) => any;
|
|
623
|
+
interface ColumnMapping<T> {
|
|
624
|
+
index: number;
|
|
625
|
+
prop: keyof T;
|
|
626
|
+
headerName?: string;
|
|
627
|
+
required?: boolean;
|
|
628
|
+
defaultValue?: any;
|
|
629
|
+
converter?: ConverterFn;
|
|
630
|
+
sampleValue?: any | ((index: number) => any);
|
|
631
|
+
}
|
|
632
|
+
interface ExcelParserOptions {
|
|
633
|
+
sheetIndex?: number;
|
|
634
|
+
headerRowIndex?: number;
|
|
635
|
+
}
|
|
636
|
+
interface ExcelSampleOptions {
|
|
637
|
+
sampleCount?: number;
|
|
638
|
+
fileName?: string;
|
|
639
|
+
sheetName?: string;
|
|
640
|
+
}
|
|
641
|
+
declare class ExcelParserError extends Error {
|
|
642
|
+
key: string;
|
|
643
|
+
params?: any | undefined;
|
|
644
|
+
constructor(key: string, params?: any | undefined);
|
|
645
|
+
}
|
|
646
|
+
declare class ExcelParser<T> {
|
|
647
|
+
private mappings;
|
|
648
|
+
constructor(mappings: ColumnMapping<T>[]);
|
|
649
|
+
parse(file: File, options?: ExcelParserOptions): Promise<{
|
|
650
|
+
data: T[];
|
|
651
|
+
logs: ParseLog[];
|
|
652
|
+
}>;
|
|
653
|
+
generateSampleExcel(options?: ExcelSampleOptions): Promise<void>;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare abstract class ExcelImportBase<T> extends NettyAgGridListBase<any> {
|
|
657
|
+
protected isFileSelectionHidden: i0.WritableSignal<boolean>;
|
|
658
|
+
protected isFileValid: i0.WritableSignal<boolean>;
|
|
659
|
+
protected logs: i0.WritableSignal<ParseLog[]>;
|
|
660
|
+
protected hasLogs: i0.Signal<boolean>;
|
|
661
|
+
protected logDialog: MatDialog;
|
|
662
|
+
protected parser: ExcelParser<T>;
|
|
663
|
+
onBtnClick(e: any): void;
|
|
664
|
+
loadData(): void;
|
|
665
|
+
onFilesSelected(evt: any): void;
|
|
666
|
+
downloadSampleExcel(): void;
|
|
667
|
+
showLogs(): void;
|
|
668
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExcelImportBase<any>, never>;
|
|
669
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExcelImportBase<any>, "ntybase-excel-import-base", never, {}, {}, never, never, true, never>;
|
|
623
670
|
}
|
|
624
671
|
|
|
625
672
|
declare class ButtonRenderer implements ICellRendererAngularComp {
|
|
@@ -1146,5 +1193,11 @@ declare abstract class NettyAppsFilterBase<Trecord, Tfilter> extends NettyAppsBa
|
|
|
1146
1193
|
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
1194
|
}
|
|
1148
1195
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1196
|
+
declare const toNumber: (v: any) => number | null;
|
|
1197
|
+
declare const toDate: (v: any) => Date | null;
|
|
1198
|
+
declare const toBoolean: (v: any) => boolean | null;
|
|
1199
|
+
declare const toUpperString: (v: any) => string | null;
|
|
1200
|
+
declare const toEnum: <T>(v: any, enumObj: any) => T | null;
|
|
1201
|
+
|
|
1202
|
+
export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ErrorAlert, ExcelImportBase, ExcelParser, ExcelParserError, ForgotPassword, Guid, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridListBase, NettyAgGridListFilterBase, NettyAgGridLogBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyAppsFilterBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyLoadingComponent, NtyLoadingInterceptor, NtyLoadingService, Ntybase, NtybaseModule, PageTitle, ParseLog, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor, toBoolean, toDate, toEnum, toNumber, toUpperString };
|
|
1203
|
+
export type { AgGridSelectionModeType, CanComponentDeactivate, ColumnMapping, ConverterFn, Credentials, EnvironmentConfig, ExcelParserOptions, ExcelSampleOptions, LoginContext, MFACodeContext, NettyEntityInterface, NettyEntityLogInterface, UserViewMode };
|