@nettyapps/ntybase 21.1.38 → 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.mjs +1209 -1209
- package/fesm2022/nettyapps-ntybase.mjs.map +1 -1
- package/package.json +1 -1
- package/types/nettyapps-ntybase.d.ts +124 -124
package/package.json
CHANGED
|
@@ -1,30 +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
16
|
import { ICellRendererAngularComp, IFilterAngularComp } from 'ag-grid-angular';
|
|
16
|
-
import { I18nService } from '@nettyapps/ntyi18n';
|
|
17
|
-
|
|
18
|
-
declare class Ntybase {
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Ntybase, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Ntybase, "lib-ntybase", never, {}, {}, never, never, false, never>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare class NtybaseModule {
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NtybaseModule, never>;
|
|
25
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NtybaseModule, [typeof Ntybase], never, [typeof Ntybase]>;
|
|
26
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NtybaseModule>;
|
|
27
|
-
}
|
|
28
17
|
|
|
29
18
|
declare class AlertService {
|
|
30
19
|
private snackBar;
|
|
@@ -98,6 +87,98 @@ declare abstract class NettyAppsBase implements OnDestroy {
|
|
|
98
87
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAppsBase, "ntybase-netty-apps-base", never, { "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
99
88
|
}
|
|
100
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
|
+
|
|
101
182
|
declare class CurrentUserPreference {
|
|
102
183
|
coid: any | null;
|
|
103
184
|
nettyUserPreferenceGUID: any | null;
|
|
@@ -325,11 +406,6 @@ declare class SysfunctionProxy {
|
|
|
325
406
|
|
|
326
407
|
type AgGridSelectionModeType = 'singleRow' | 'multiRow';
|
|
327
408
|
|
|
328
|
-
interface NettyEntityBaseInterface<T> {
|
|
329
|
-
getPK(): any;
|
|
330
|
-
setPK(pk: any): void;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
409
|
declare abstract class NettyAgGridBase<T extends NettyEntityBaseInterface<T>> extends NettyAppsBase {
|
|
334
410
|
protected FILTER_MODE_KEY: string;
|
|
335
411
|
protected myTheme: Theme<ag_grid_community.ThemeDefaultParams>;
|
|
@@ -449,10 +525,6 @@ declare abstract class NettyAgGridBase<T extends NettyEntityBaseInterface<T>> ex
|
|
|
449
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>;
|
|
450
526
|
}
|
|
451
527
|
|
|
452
|
-
interface NettyEntityInterface<T> extends NettyEntityBaseInterface<T> {
|
|
453
|
-
compare(other: T): T;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
528
|
declare abstract class NettyAgGridListBase<T extends NettyEntityInterface<T>> extends NettyAgGridBase<T> implements OnInit {
|
|
457
529
|
protected router: Router;
|
|
458
530
|
protected dialog: MatDialog;
|
|
@@ -482,6 +554,33 @@ declare abstract class NettyAgGridListBase<T extends NettyEntityInterface<T>> ex
|
|
|
482
554
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridListBase<any>, "ntybase-ag-grid-list-base", never, {}, {}, never, never, true, never>;
|
|
483
555
|
}
|
|
484
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
|
+
|
|
485
584
|
declare abstract class NettyAgGridListFilterBase<T extends NettyEntityInterface<T>> extends NettyAgGridListBase<T> implements OnInit {
|
|
486
585
|
displayFilter: i0.InputSignal<boolean>;
|
|
487
586
|
protected _displayFilter: i0.Signal<boolean>;
|
|
@@ -502,14 +601,6 @@ declare abstract class NettyAgGridListFilterBase<T extends NettyEntityInterface<
|
|
|
502
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>;
|
|
503
602
|
}
|
|
504
603
|
|
|
505
|
-
interface NettyEntityLogInterface<T> extends NettyEntityBaseInterface<T> {
|
|
506
|
-
logGuid: any | null;
|
|
507
|
-
changingDate: Date | null;
|
|
508
|
-
changingUser: any | null;
|
|
509
|
-
ip: string | null;
|
|
510
|
-
changingUserName: string | null;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
604
|
declare abstract class NettyAgGridLogBase<T extends NettyEntityLogInterface<T>> extends NettyAgGridBase<T> implements OnInit {
|
|
514
605
|
protected nettyAppsProxy: NettyStandardLogProxy<T>;
|
|
515
606
|
/**
|
|
@@ -607,68 +698,6 @@ declare abstract class NettyAgGridSaveBase<T extends NettyEntityInterface<T>> ex
|
|
|
607
698
|
static ɵcmp: i0.ɵɵComponentDeclaration<NettyAgGridSaveBase<any>, "ntybase-ag-grid-save-base", never, { "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
608
699
|
}
|
|
609
700
|
|
|
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>;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
701
|
declare class ButtonRenderer implements ICellRendererAngularComp {
|
|
673
702
|
protected params: any;
|
|
674
703
|
protected label: string;
|
|
@@ -1088,14 +1117,6 @@ declare class Guid {
|
|
|
1088
1117
|
static emptyWhenNull(guid: any): any;
|
|
1089
1118
|
}
|
|
1090
1119
|
|
|
1091
|
-
declare class NettyBaseApp {
|
|
1092
|
-
protected i18nService: I18nService;
|
|
1093
|
-
protected alertService: AlertService;
|
|
1094
|
-
protected loadBaseTranslations(): Promise<void>;
|
|
1095
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NettyBaseApp, never>;
|
|
1096
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NettyBaseApp, "ntybase-netty-base-app", never, {}, {}, never, never, true, never>;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
1120
|
declare class EnvironmentInfo {
|
|
1100
1121
|
showNettyInfo: boolean;
|
|
1101
1122
|
protected environmentProxy: EnvironmentProxy;
|
|
@@ -1172,27 +1193,6 @@ declare class NettyMenuService {
|
|
|
1172
1193
|
static ɵprov: i0.ɵɵInjectableDeclaration<NettyMenuService>;
|
|
1173
1194
|
}
|
|
1174
1195
|
|
|
1175
|
-
declare abstract class NettyAppsFilterBase<Trecord, Tfilter> extends NettyAppsBase implements OnInit {
|
|
1176
|
-
isFilterExpanded: i0.ModelSignal<boolean>;
|
|
1177
|
-
filteredRecords: i0.OutputEmitterRef<Trecord[]>;
|
|
1178
|
-
filterSelectionChanged: i0.OutputEmitterRef<Tfilter>;
|
|
1179
|
-
refresh: i0.InputSignal<number>;
|
|
1180
|
-
fileName: i0.InputSignal<string>;
|
|
1181
|
-
protected filterProxy: NettyStandardFilterProxy<Tfilter>;
|
|
1182
|
-
protected currentItem: i0.WritableSignal<Tfilter>;
|
|
1183
|
-
constructor();
|
|
1184
|
-
ngOnInit(): Promise<void>;
|
|
1185
|
-
protected onApply(): void;
|
|
1186
|
-
protected onReset(): void;
|
|
1187
|
-
protected onExport(): void;
|
|
1188
|
-
protected abstract createNewFilter(): Tfilter;
|
|
1189
|
-
protected abstract componentName(): string;
|
|
1190
|
-
protected afterOnInit(): Promise<void>;
|
|
1191
|
-
logInputs(message: string): void;
|
|
1192
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NettyAppsFilterBase<any, any>, never>;
|
|
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>;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
1196
|
declare const toNumber: (v: any) => number | null;
|
|
1197
1197
|
declare const toDate: (v: any) => Date | null;
|
|
1198
1198
|
declare const toBoolean: (v: any) => boolean | null;
|