@pongrass/utils 1.1.6-v20 → 1.1.8-v20
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/pongrass-utils.mjs +1226 -38
- package/fesm2022/pongrass-utils.mjs.map +1 -1
- package/index.d.ts +192 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { WritableSignal, ElementRef, OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges,
|
|
2
|
+
import { WritableSignal, ElementRef, AfterViewInit, ChangeDetectorRef, OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges, Type, ViewContainerRef, Injector, ComponentRef } from '@angular/core';
|
|
3
3
|
import * as i3 from '@ag-grid-community/angular';
|
|
4
4
|
import { ICellRendererAngularComp, IFilterAngularComp } from '@ag-grid-community/angular';
|
|
5
5
|
import { ICellRendererParams, IFilterParams, IDoesFilterPassParams, ColDef, SelectionColumnDef, GridOptions, GridReadyEvent, GridApi, CellValueChangedEvent, PaginationChangedEvent, AgPublicEventType, ColumnResizedEvent, ColumnMovedEvent, SortChangedEvent, FirstDataRenderedEvent } from '@ag-grid-community/core';
|
|
@@ -30,10 +30,17 @@ interface IConfig {
|
|
|
30
30
|
defaultLoginRoute?: string;
|
|
31
31
|
enableMenuFromSecurity?: boolean;
|
|
32
32
|
userInactivityMinutes?: number;
|
|
33
|
+
formConfig?: {
|
|
34
|
+
formValidations?: IFormValidations$1;
|
|
35
|
+
};
|
|
33
36
|
}
|
|
34
37
|
interface ITableGrid {
|
|
35
38
|
defaultPageSize: number;
|
|
36
39
|
defaultPageSizeSelector: number[] | boolean;
|
|
40
|
+
defaultMinWidth: number;
|
|
41
|
+
}
|
|
42
|
+
interface IFormValidations$1 {
|
|
43
|
+
defaultDecimalPrecision: number;
|
|
37
44
|
}
|
|
38
45
|
interface IReportsConfig {
|
|
39
46
|
showExport: boolean;
|
|
@@ -157,6 +164,7 @@ declare class CustomSelectFilterComponent implements IFilterAngularComp {
|
|
|
157
164
|
searchInputRef: ElementRef<HTMLInputElement>;
|
|
158
165
|
afterGuiAttached(): void;
|
|
159
166
|
getUniqueValues(): string[];
|
|
167
|
+
getFormattedValue(node: any, value: any): string;
|
|
160
168
|
isValueSelected(value: string): boolean;
|
|
161
169
|
isAllSelected(): boolean;
|
|
162
170
|
onSelectAllChanged(event: Event): void;
|
|
@@ -171,10 +179,50 @@ declare class CustomSelectFilterComponent implements IFilterAngularComp {
|
|
|
171
179
|
setModel(model: {
|
|
172
180
|
values?: string[];
|
|
173
181
|
}): void;
|
|
182
|
+
onReset(): void;
|
|
174
183
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomSelectFilterComponent, never>;
|
|
175
184
|
static ɵcmp: i0.ɵɵComponentDeclaration<CustomSelectFilterComponent, "prg-ws-custom-set-filter", never, {}, {}, never, never, true, never>;
|
|
176
185
|
}
|
|
177
186
|
|
|
187
|
+
declare class AgDateRangeFilterComponent implements IFilterAngularComp, AfterViewInit {
|
|
188
|
+
private cdr;
|
|
189
|
+
params: IFilterParams;
|
|
190
|
+
startDate: Date | null;
|
|
191
|
+
endDate: Date | null;
|
|
192
|
+
viewDate: Date;
|
|
193
|
+
private selectedPresetLabel;
|
|
194
|
+
presets: {
|
|
195
|
+
label: string;
|
|
196
|
+
isSelected: boolean;
|
|
197
|
+
calculate: () => {
|
|
198
|
+
start: Date;
|
|
199
|
+
end: Date;
|
|
200
|
+
};
|
|
201
|
+
}[];
|
|
202
|
+
constructor(cdr: ChangeDetectorRef);
|
|
203
|
+
agInit(params: IFilterParams): void;
|
|
204
|
+
ngAfterViewInit(): void;
|
|
205
|
+
onStartDateChange(date: Date | null): void;
|
|
206
|
+
onEndDateChange(date: Date | null): void;
|
|
207
|
+
private clearPresetSelection;
|
|
208
|
+
private calculatePastDays;
|
|
209
|
+
private normalizeDate;
|
|
210
|
+
private areDatesEqual;
|
|
211
|
+
private matchAndSelectPreset;
|
|
212
|
+
onPresetClick(preset: any): void;
|
|
213
|
+
isFilterActive(): boolean;
|
|
214
|
+
doesFilterPass(params: IDoesFilterPassParams): boolean;
|
|
215
|
+
getModel(): {
|
|
216
|
+
startDate: Date | null;
|
|
217
|
+
endDate: Date | null;
|
|
218
|
+
selectedPreset: string | null;
|
|
219
|
+
};
|
|
220
|
+
setModel(model: any): void;
|
|
221
|
+
onReset(): void;
|
|
222
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgDateRangeFilterComponent, never>;
|
|
223
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgDateRangeFilterComponent, "prg-ws-ag-date-range-filter", never, {}, {}, never, never, true, never>;
|
|
224
|
+
}
|
|
225
|
+
|
|
178
226
|
declare class CheckboxCellRendererComponent implements ICellRendererAngularComp {
|
|
179
227
|
value: boolean;
|
|
180
228
|
private params;
|
|
@@ -254,6 +302,47 @@ declare class StatusSelectCellRendererComponent implements ICellRendererAngularC
|
|
|
254
302
|
static ɵcmp: i0.ɵɵComponentDeclaration<StatusSelectCellRendererComponent, "prg-ws-status-select-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
255
303
|
}
|
|
256
304
|
|
|
305
|
+
declare class BadgeCellRendererComponent implements ICellRendererAngularComp {
|
|
306
|
+
displayValue: string;
|
|
307
|
+
badgeColor: string;
|
|
308
|
+
textColor: string;
|
|
309
|
+
customStyles: {
|
|
310
|
+
[key: string]: string;
|
|
311
|
+
};
|
|
312
|
+
agInit(params: ICellRendererParams): void;
|
|
313
|
+
refresh(params: ICellRendererParams): boolean;
|
|
314
|
+
private updateValue;
|
|
315
|
+
private applyColor;
|
|
316
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeCellRendererComponent, never>;
|
|
317
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeCellRendererComponent, "prg-ws-badge-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare class IconTextCellRendererComponent implements ICellRendererAngularComp {
|
|
321
|
+
displayValue: string;
|
|
322
|
+
iconName: string;
|
|
323
|
+
iconPosition: 'start' | 'end';
|
|
324
|
+
isRed: boolean;
|
|
325
|
+
agInit(params: ICellRendererParams): void;
|
|
326
|
+
refresh(params: ICellRendererParams): boolean;
|
|
327
|
+
private updateValue;
|
|
328
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconTextCellRendererComponent, never>;
|
|
329
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconTextCellRendererComponent, "prg-ws-icon-text-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
declare class HyperlinkCellRendererComponent implements ICellRendererAngularComp {
|
|
333
|
+
displayValue: string;
|
|
334
|
+
href: string;
|
|
335
|
+
target: string;
|
|
336
|
+
isLink: boolean;
|
|
337
|
+
agInit(params: ICellRendererParams): void;
|
|
338
|
+
refresh(params: ICellRendererParams): boolean;
|
|
339
|
+
private updateValue;
|
|
340
|
+
private setAsEmail;
|
|
341
|
+
private setAsLink;
|
|
342
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HyperlinkCellRendererComponent, never>;
|
|
343
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HyperlinkCellRendererComponent, "prg-ws-hyperlink-cell-renderer", never, {}, {}, never, never, true, never>;
|
|
344
|
+
}
|
|
345
|
+
|
|
257
346
|
interface IEmmitedResponse {
|
|
258
347
|
isReset: boolean;
|
|
259
348
|
returnedData: any[];
|
|
@@ -264,9 +353,9 @@ declare enum FormFieldType {
|
|
|
264
353
|
Email = "email",
|
|
265
354
|
Number = "number",
|
|
266
355
|
Select = "select",
|
|
267
|
-
Autosuggest = "autosuggest",
|
|
268
356
|
Textarea = "textarea",
|
|
269
357
|
Date = "date",
|
|
358
|
+
NewDate = "new-date",
|
|
270
359
|
Datetime = "datetime",
|
|
271
360
|
Switch = "switch",
|
|
272
361
|
Checkbox = "checkbox",
|
|
@@ -298,6 +387,8 @@ interface IFieldConfig {
|
|
|
298
387
|
allowSearch?: boolean;
|
|
299
388
|
/** for selects or multi-selects allows clear option */
|
|
300
389
|
allowCleaner?: boolean;
|
|
390
|
+
/** for selects or multi-selects search option */
|
|
391
|
+
search?: string;
|
|
301
392
|
/** grid column span */
|
|
302
393
|
colspan?: number;
|
|
303
394
|
/** Placeholder */
|
|
@@ -387,6 +478,7 @@ declare class MultiFormComponent implements OnInit, OnChanges {
|
|
|
387
478
|
color_code: string;
|
|
388
479
|
}[];
|
|
389
480
|
FormFieldType: typeof FormFieldType;
|
|
481
|
+
today: Date;
|
|
390
482
|
constructor();
|
|
391
483
|
ngOnInit(): void;
|
|
392
484
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -417,6 +509,12 @@ declare class MultiFormComponent implements OnInit, OnChanges {
|
|
|
417
509
|
setDefaultAdvanceDate(currentDate: Date, defaultAdvance: string): any;
|
|
418
510
|
private advanceDate;
|
|
419
511
|
private findStopControl;
|
|
512
|
+
/**
|
|
513
|
+
* Set precision for float type
|
|
514
|
+
* @param value
|
|
515
|
+
* @returns
|
|
516
|
+
*/
|
|
517
|
+
private updateFloatValue;
|
|
420
518
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiFormComponent, never>;
|
|
421
519
|
static ɵcmp: i0.ɵɵComponentDeclaration<MultiFormComponent, "prg-ws-multi-form", never, { "config": { "alias": "config"; "required": false; }; "showUnsavedFlags": { "alias": "showUnsavedFlags"; "required": false; }; "currentTableGridsSelectedIndex": { "alias": "currentTableGridsSelectedIndex"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; }, { "fieldAction": "fieldAction"; "formSavedUnsavedListen": "formSavedUnsavedListen"; "selectionChangeEvent": "selectionChangeEvent"; }, never, never, false, never>;
|
|
422
520
|
}
|
|
@@ -606,6 +704,7 @@ declare class DecimalInputDirective implements OnInit, OnDestroy {
|
|
|
606
704
|
private control;
|
|
607
705
|
private sub;
|
|
608
706
|
wsDecimalInput: number;
|
|
707
|
+
wsAcceptStringInput: boolean;
|
|
609
708
|
private specialKeys;
|
|
610
709
|
ngOnInit(): void;
|
|
611
710
|
ngOnDestroy(): void;
|
|
@@ -615,7 +714,7 @@ declare class DecimalInputDirective implements OnInit, OnDestroy {
|
|
|
615
714
|
private isValidInput;
|
|
616
715
|
private getNextValue;
|
|
617
716
|
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalInputDirective, never>;
|
|
618
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "[wsDecimalInput]", never, { "wsDecimalInput": { "alias": "wsDecimalInput"; "required": false; }; }, {}, never, never, true, never>;
|
|
717
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DecimalInputDirective, "[wsDecimalInput]", never, { "wsDecimalInput": { "alias": "wsDecimalInput"; "required": false; }; "wsAcceptStringInput": { "alias": "wsAcceptStringInput"; "required": false; }; }, {}, never, never, true, never>;
|
|
619
718
|
}
|
|
620
719
|
|
|
621
720
|
declare class ShowTooltipIfTruncatedDirective {
|
|
@@ -888,5 +987,93 @@ declare class LoginModule {
|
|
|
888
987
|
static ɵinj: i0.ɵɵInjectorDeclaration<LoginModule>;
|
|
889
988
|
}
|
|
890
989
|
|
|
891
|
-
|
|
892
|
-
|
|
990
|
+
interface IDialogButton {
|
|
991
|
+
label: string;
|
|
992
|
+
type?: 'submit' | 'close' | 'custom';
|
|
993
|
+
color?: string;
|
|
994
|
+
variant?: string;
|
|
995
|
+
class?: string;
|
|
996
|
+
onClick?: (context?: any) => void;
|
|
997
|
+
}
|
|
998
|
+
interface IDialogConfig {
|
|
999
|
+
title?: string;
|
|
1000
|
+
message?: string;
|
|
1001
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
1002
|
+
data?: any;
|
|
1003
|
+
buttons?: IDialogButton[];
|
|
1004
|
+
scrollable?: boolean;
|
|
1005
|
+
customClose?: boolean;
|
|
1006
|
+
alignment?: 'center' | 'top';
|
|
1007
|
+
component?: Type<any>;
|
|
1008
|
+
}
|
|
1009
|
+
declare class DialogRef<T = any> {
|
|
1010
|
+
closeFn?: ((result?: T) => void) | undefined;
|
|
1011
|
+
private _result;
|
|
1012
|
+
/** Observable that emits when any button is clicked in the wrapper */
|
|
1013
|
+
buttonClick$: Subject<IDialogButton>;
|
|
1014
|
+
/** Observable that emits when the dialog is closed */
|
|
1015
|
+
afterClosed(): Observable<T>;
|
|
1016
|
+
constructor(closeFn?: ((result?: T) => void) | undefined);
|
|
1017
|
+
setCloseFn(fn: (result?: T) => void): void;
|
|
1018
|
+
close(result?: T): void;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
declare class PgDialogService {
|
|
1022
|
+
private appRef;
|
|
1023
|
+
private injector;
|
|
1024
|
+
private viewContainerRef;
|
|
1025
|
+
private openDialogs;
|
|
1026
|
+
registerViewContainerRef(vcr: ViewContainerRef): void;
|
|
1027
|
+
add<T>(config: IDialogConfig): Observable<any>;
|
|
1028
|
+
alert(message: string, title?: string): Observable<void>;
|
|
1029
|
+
confirm(message: string, title?: string): Observable<boolean>;
|
|
1030
|
+
open<T>(component: Type<T>, config?: IDialogConfig): DialogRef<any>;
|
|
1031
|
+
private openManual;
|
|
1032
|
+
private configureWrapper;
|
|
1033
|
+
private removeDialog;
|
|
1034
|
+
closeAll(): void;
|
|
1035
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PgDialogService, never>;
|
|
1036
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PgDialogService>;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
declare class DynamicModalWrapperComponent implements AfterViewInit, OnDestroy {
|
|
1040
|
+
title: string;
|
|
1041
|
+
message: string;
|
|
1042
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | undefined;
|
|
1043
|
+
buttons: IDialogButton[];
|
|
1044
|
+
scrollable: boolean;
|
|
1045
|
+
alignment: 'center' | 'top';
|
|
1046
|
+
childInjector?: Injector;
|
|
1047
|
+
backdropIndex: number;
|
|
1048
|
+
customClose: boolean;
|
|
1049
|
+
private _result;
|
|
1050
|
+
private _childComponentType;
|
|
1051
|
+
set childComponentType(value: Type<any>);
|
|
1052
|
+
private _childComponentData;
|
|
1053
|
+
set childComponentData(value: any);
|
|
1054
|
+
contentHost: ViewContainerRef;
|
|
1055
|
+
modalElement: ElementRef;
|
|
1056
|
+
visibleSignal: i0.WritableSignal<boolean>;
|
|
1057
|
+
componentRef: ComponentRef<any>;
|
|
1058
|
+
closeCallback: (result?: any) => void;
|
|
1059
|
+
private readonly cdr;
|
|
1060
|
+
private readonly zone;
|
|
1061
|
+
private readonly dialogRef;
|
|
1062
|
+
private isDestroyed;
|
|
1063
|
+
private isViewInit;
|
|
1064
|
+
constructor();
|
|
1065
|
+
ngAfterViewInit(): void;
|
|
1066
|
+
ngOnDestroy(): void;
|
|
1067
|
+
loadComponent(): void;
|
|
1068
|
+
private applyData;
|
|
1069
|
+
onButtonClick(btn: IDialogButton): void;
|
|
1070
|
+
topClose(): void;
|
|
1071
|
+
close(result?: any): void;
|
|
1072
|
+
onVisibleChange(event: boolean): void;
|
|
1073
|
+
private addBackdropClass;
|
|
1074
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicModalWrapperComponent, never>;
|
|
1075
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicModalWrapperComponent, "prg-ws-dynamic-modal-wrapper", never, { "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "size": { "alias": "size"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "childInjector": { "alias": "childInjector"; "required": false; }; "backdropIndex": { "alias": "backdropIndex"; "required": false; }; "customClose": { "alias": "customClose"; "required": false; }; "childComponentType": { "alias": "childComponentType"; "required": false; }; "childComponentData": { "alias": "childComponentData"; "required": false; }; }, {}, never, never, true, never>;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export { AgDateRangeFilterComponent, BackgroundImageDirective, BadgeCellRendererComponent, CheckboxCellRendererComponent, CircularFocusDirective, ColorCellRendererComponent, CommentsButtonCellRendererComponent, ConfigurationServiceLib, CustomSelectFilterComponent, DateTimePickerComponent, DecimalInputDirective, DialogRef, DynamicModalWrapperComponent, EditionListGroupedComponent, ExcelType, ExportToExcelNames, FormFieldType, GenericFilterModelComponent, HyperlinkCellRendererComponent, ILOGIN_ACTION, ITableGridConfiguration, ITableGridPagination, IconTextCellRendererComponent, IndustryUpdateListboxCellRendererComponent, JsonrpcServiceLib, LoginComponent, LoginModule, MultiFormComponent, MultiFormModule, MultiSelectStylerDirective, PageStatusCellRendererComponent, PgDialogService, ShowTooltipIfTruncatedDirective, StatusSelectCellRendererComponent, TableGridComponent, TableGridModule, UtilsService, convertDateShort, convertIsoToFormat, convertToISOnString, generateTimeOptions, getTimeValueFromDateTime, regionalDateFormat };
|
|
1079
|
+
export type { IAgPublicEventType, ICellValueChangedEvent, IColDef, IColumnStateEvent, IDialogButton, IDialogConfig, IEmmitedResponse, IExcelHeaders, IExportCellConfig, IFieldConfig, IFilterChangeEvent, IFormConfig, IFormStyles, IFormSubmissionEmit, IFormValidations, IGridApi, IGridReadyEvent, ILoginConfig, IPaginationChangedEvent, IPrintHeaders, IRowSelectionOptions, ITableGridState, MaintAction, PongrassICellRendererAngularComp, PongrassICellRendererParams, TimeOption };
|