@pongrass/utils 1.1.3-v20 → 1.1.5-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 +324 -183
- package/fesm2022/pongrass-utils.mjs.map +1 -1
- package/index.d.ts +52 -11
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { WritableSignal, ElementRef, OnInit, OnDestroy, EventEmitter, OnChanges,
|
|
|
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';
|
|
6
|
-
import * as
|
|
7
|
-
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
6
|
+
import * as i5 from '@angular/forms';
|
|
7
|
+
import { AbstractControl, FormGroup, ControlValueAccessor } from '@angular/forms';
|
|
8
8
|
import { Observable, Subject } from 'rxjs';
|
|
9
|
+
import * as _pongrass_utils from '@pongrass/utils';
|
|
9
10
|
import * as i2 from '@angular/common';
|
|
10
|
-
import * as
|
|
11
|
-
import * as i6 from '@coreui/icons-angular';
|
|
12
|
-
import * as
|
|
11
|
+
import * as i6 from '@coreui/angular-pro';
|
|
12
|
+
import * as i6$1 from '@coreui/icons-angular';
|
|
13
|
+
import * as i10 from 'ngx-bootstrap/datepicker';
|
|
13
14
|
|
|
14
15
|
interface IConfig {
|
|
15
16
|
firstDayOfWeek: number;
|
|
@@ -263,8 +264,11 @@ declare enum FormFieldType {
|
|
|
263
264
|
Email = "email",
|
|
264
265
|
Number = "number",
|
|
265
266
|
Select = "select",
|
|
267
|
+
Autosuggest = "autosuggest",
|
|
266
268
|
Textarea = "textarea",
|
|
267
269
|
Date = "date",
|
|
270
|
+
Datetime = "datetime",
|
|
271
|
+
Switch = "switch",
|
|
268
272
|
Checkbox = "checkbox",
|
|
269
273
|
Float = "float",
|
|
270
274
|
Edition = "edition",
|
|
@@ -309,6 +313,10 @@ interface IFieldConfig {
|
|
|
309
313
|
value?: any;
|
|
310
314
|
/** For multi-selects - Allows multiple selection */
|
|
311
315
|
multiple?: boolean;
|
|
316
|
+
/** Additional info or description for the field */
|
|
317
|
+
info?: string;
|
|
318
|
+
/** Additional configuration for specific field types */
|
|
319
|
+
config?: any;
|
|
312
320
|
styles?: IFormStyles;
|
|
313
321
|
actionButton?: {
|
|
314
322
|
icon: string;
|
|
@@ -352,6 +360,7 @@ interface IFormStyles {
|
|
|
352
360
|
declare class MultiFormComponent implements OnInit, OnChanges {
|
|
353
361
|
private readonly formBuilder;
|
|
354
362
|
readonly configurationService: ConfigurationServiceLib;
|
|
363
|
+
private readonly jsonrpcService;
|
|
355
364
|
config: IFormConfig;
|
|
356
365
|
showUnsavedFlags: boolean;
|
|
357
366
|
currentTableGridsSelectedIndex: number;
|
|
@@ -403,6 +412,7 @@ declare class MultiFormComponent implements OnInit, OnChanges {
|
|
|
403
412
|
onValueChange(event: any, control: string): void;
|
|
404
413
|
onDateValueChange(value: any, control: string): void;
|
|
405
414
|
onEditionChange(event: any): void;
|
|
415
|
+
handleSearch(field: IFieldConfig, keyword: any): void;
|
|
406
416
|
setDefaultAdvanceDate(currentDate: Date, defaultAdvance: string): any;
|
|
407
417
|
private advanceDate;
|
|
408
418
|
private findStopControl;
|
|
@@ -496,6 +506,10 @@ type MaintAction = 'N' | 'D' | 'U';
|
|
|
496
506
|
declare class JsonrpcServiceLib {
|
|
497
507
|
private readonly httpService;
|
|
498
508
|
private readonly configService;
|
|
509
|
+
private readonly baseURL$;
|
|
510
|
+
get baseURL(): string;
|
|
511
|
+
get defaultBaseURl(): string;
|
|
512
|
+
setBaseUrl(url: string): void;
|
|
499
513
|
postJsonRpcRequest(method: string, params: any): Observable<any>;
|
|
500
514
|
postJsonRpcRequestPromise(method: string, params: any): Promise<any>;
|
|
501
515
|
/**
|
|
@@ -552,6 +566,25 @@ declare class GenericFilterModelComponent implements OnInit {
|
|
|
552
566
|
static ɵcmp: i0.ɵɵComponentDeclaration<GenericFilterModelComponent, "prg-ws-generic-filter-model", never, { "filterFormConfiguration": { "alias": "filterFormConfiguration"; "required": false; }; "tableName": { "alias": "tableName"; "required": false; }; }, { "sendFilteredData": "sendFilteredData"; }, never, never, true, never>;
|
|
553
567
|
}
|
|
554
568
|
|
|
569
|
+
declare class DateTimePickerComponent implements ControlValueAccessor {
|
|
570
|
+
date: Date | null;
|
|
571
|
+
timeValue: string | null;
|
|
572
|
+
disabled: boolean;
|
|
573
|
+
readonly timeDropdwons: _pongrass_utils.TimeOption[];
|
|
574
|
+
readonly DEFAULT_TIME = "0,0";
|
|
575
|
+
private onChange;
|
|
576
|
+
private onTouched;
|
|
577
|
+
writeValue(value: Date | null): void;
|
|
578
|
+
registerOnChange(fn: any): void;
|
|
579
|
+
registerOnTouched(fn: any): void;
|
|
580
|
+
setDisabledState(isDisabled: boolean): void;
|
|
581
|
+
onDateChange(date: Date | null): void;
|
|
582
|
+
onTimeChange(value: string): void;
|
|
583
|
+
private emitValue;
|
|
584
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent, never>;
|
|
585
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "app-date-time-picker", never, {}, {}, never, never, false, never>;
|
|
586
|
+
}
|
|
587
|
+
|
|
555
588
|
declare class CircularFocusDirective implements AfterViewInit, OnDestroy {
|
|
556
589
|
private el;
|
|
557
590
|
formId: string;
|
|
@@ -614,7 +647,7 @@ declare class MultiSelectStylerDirective implements OnInit, OnDestroy {
|
|
|
614
647
|
|
|
615
648
|
declare class MultiFormModule {
|
|
616
649
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiFormModule, never>;
|
|
617
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MultiFormModule, [typeof MultiFormComponent], [typeof CircularFocusDirective, typeof i2.CommonModule, typeof
|
|
650
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MultiFormModule, [typeof MultiFormComponent, typeof DateTimePickerComponent], [typeof CircularFocusDirective, typeof i2.CommonModule, typeof i5.ReactiveFormsModule, typeof i6.MultiSelectModule, typeof i6.FormModule, typeof i6$1.IconModule, typeof i6.InputGroupComponent, typeof i6.DatePickerModule, typeof DecimalInputDirective, typeof ShowTooltipIfTruncatedDirective, typeof i6.ModalModule, typeof i6.TooltipModule, typeof i6.ButtonModule, typeof i10.BsDatepickerModule, typeof i6.AutocompleteModule, typeof i6.FormCheckInputDirective, typeof EditionListGroupedComponent, typeof MultiSelectStylerDirective], [typeof MultiFormComponent, typeof DateTimePickerComponent]>;
|
|
618
651
|
static ɵinj: i0.ɵɵInjectorDeclaration<MultiFormModule>;
|
|
619
652
|
}
|
|
620
653
|
|
|
@@ -628,6 +661,7 @@ declare class TableGridComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
628
661
|
initialPageNumber: number;
|
|
629
662
|
tableGridReady: EventEmitter<GridReadyEvent>;
|
|
630
663
|
tableRowSelection: EventEmitter<any>;
|
|
664
|
+
tableRowSelectionChanged: EventEmitter<any>;
|
|
631
665
|
tableRowClicked: EventEmitter<{
|
|
632
666
|
event: any;
|
|
633
667
|
row: any;
|
|
@@ -666,6 +700,8 @@ declare class TableGridComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
666
700
|
onRowSelected(event: any): void;
|
|
667
701
|
/** Send event to parent component when a row is clicked */
|
|
668
702
|
onRowClicked(event: any): void;
|
|
703
|
+
/** Send on checkbox selection event event to parent component when row selection is changed */
|
|
704
|
+
onRowSelectionChanged(event: any): void;
|
|
669
705
|
/** Create column state on initialization of table grid */
|
|
670
706
|
private createColumnState;
|
|
671
707
|
/** Set visibility of columns and send the event and column form to parent component along with last checkbox event data */
|
|
@@ -697,12 +733,12 @@ declare class TableGridComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
697
733
|
onCellValueChanged(event: CellValueChangedEvent): void;
|
|
698
734
|
ngOnDestroy(): void;
|
|
699
735
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableGridComponent, never>;
|
|
700
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableGridComponent, "prg-ws-table-grid", never, { "tableConfiguration": { "alias": "tableConfiguration"; "required": false; }; "columnToolVisible": { "alias": "columnToolVisible"; "required": false; }; "initialPageNumber": { "alias": "initialPageNumber"; "required": false; }; }, { "tableGridReady": "tableGridReady"; "tableRowSelection": "tableRowSelection"; "tableRowClicked": "tableRowClicked"; "columnStateEvent": "columnStateEvent"; "pageChange": "pageChange"; "filterChanged": "filterChanged"; "cellValueChanged": "cellValueChanged"; }, never, never, false, never>;
|
|
736
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableGridComponent, "prg-ws-table-grid", never, { "tableConfiguration": { "alias": "tableConfiguration"; "required": false; }; "columnToolVisible": { "alias": "columnToolVisible"; "required": false; }; "initialPageNumber": { "alias": "initialPageNumber"; "required": false; }; }, { "tableGridReady": "tableGridReady"; "tableRowSelection": "tableRowSelection"; "tableRowSelectionChanged": "tableRowSelectionChanged"; "tableRowClicked": "tableRowClicked"; "columnStateEvent": "columnStateEvent"; "pageChange": "pageChange"; "filterChanged": "filterChanged"; "cellValueChanged": "cellValueChanged"; }, never, never, false, never>;
|
|
701
737
|
}
|
|
702
738
|
|
|
703
739
|
declare class TableGridModule {
|
|
704
740
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableGridModule, never>;
|
|
705
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableGridModule, [typeof TableGridComponent], [typeof i2.CommonModule, typeof i3.AgGridModule, typeof
|
|
741
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableGridModule, [typeof TableGridComponent], [typeof i2.CommonModule, typeof i3.AgGridModule, typeof i6.FormModule, typeof i5.ReactiveFormsModule, typeof i6.ButtonModule, typeof i6.OffcanvasModule, typeof i6.TooltipModule, typeof i6$1.IconModule], [typeof TableGridComponent]>;
|
|
706
742
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableGridModule>;
|
|
707
743
|
}
|
|
708
744
|
|
|
@@ -786,6 +822,11 @@ declare function convertToISOnString(date: Date): string;
|
|
|
786
822
|
declare function regionalDateFormat(date: Date): string;
|
|
787
823
|
declare function convertIsoToFormat(date: string | Date, dateFormat?: string): string;
|
|
788
824
|
declare function convertDateShort(dateString: string): string;
|
|
825
|
+
type TimeOption = {
|
|
826
|
+
value: string;
|
|
827
|
+
label: string;
|
|
828
|
+
};
|
|
829
|
+
declare function generateTimeOptions(): TimeOption[];
|
|
789
830
|
|
|
790
831
|
interface ILoginConfig {
|
|
791
832
|
/** Heading of Application (e.g., Maintainance Portal) */
|
|
@@ -841,9 +882,9 @@ declare class LoginComponent implements OnInit {
|
|
|
841
882
|
|
|
842
883
|
declare class LoginModule {
|
|
843
884
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginModule, never>;
|
|
844
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof LoginComponent], [typeof i2.CommonModule, typeof BackgroundImageDirective, typeof
|
|
885
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof LoginComponent], [typeof i2.CommonModule, typeof BackgroundImageDirective, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.FormModule, typeof i6.ButtonModule, typeof i6.SpinnerModule, typeof i6.FormPasswordDirective, typeof i6$1.IconModule, typeof i6.AlertModule], [typeof LoginComponent]>;
|
|
845
886
|
static ɵinj: i0.ɵɵInjectorDeclaration<LoginModule>;
|
|
846
887
|
}
|
|
847
888
|
|
|
848
|
-
export { BackgroundImageDirective, CheckboxCellRendererComponent, CircularFocusDirective, ColorCellRendererComponent, CommentsButtonCellRendererComponent, ConfigurationServiceLib, CustomSelectFilterComponent, DecimalInputDirective, EditionListGroupedComponent, ExcelType, ExportToExcelNames, FormFieldType, GenericFilterModelComponent, ILOGIN_ACTION, ITableGridConfiguration, ITableGridPagination, IndustryUpdateListboxCellRendererComponent, LoginComponent, LoginModule, MultiFormComponent, MultiFormModule, MultiSelectStylerDirective, PageStatusCellRendererComponent, ShowTooltipIfTruncatedDirective, StatusSelectCellRendererComponent, TableGridComponent, TableGridModule, UtilsService, convertDateShort, convertIsoToFormat, convertToISOnString, regionalDateFormat };
|
|
849
|
-
export type { IAgPublicEventType, ICellValueChangedEvent, IColDef, IColumnStateEvent, IEmmitedResponse, IExcelHeaders, IExportCellConfig, IFieldConfig, IFilterChangeEvent, IFormConfig, IFormStyles, IFormSubmissionEmit, IFormValidations, IGridApi, IGridReadyEvent, ILoginConfig, IPaginationChangedEvent, IPrintHeaders, IRowSelectionOptions, ITableGridState, MaintAction, PongrassICellRendererAngularComp, PongrassICellRendererParams };
|
|
889
|
+
export { BackgroundImageDirective, CheckboxCellRendererComponent, CircularFocusDirective, ColorCellRendererComponent, CommentsButtonCellRendererComponent, ConfigurationServiceLib, CustomSelectFilterComponent, DateTimePickerComponent, DecimalInputDirective, EditionListGroupedComponent, ExcelType, ExportToExcelNames, FormFieldType, GenericFilterModelComponent, ILOGIN_ACTION, ITableGridConfiguration, ITableGridPagination, IndustryUpdateListboxCellRendererComponent, JsonrpcServiceLib, LoginComponent, LoginModule, MultiFormComponent, MultiFormModule, MultiSelectStylerDirective, PageStatusCellRendererComponent, ShowTooltipIfTruncatedDirective, StatusSelectCellRendererComponent, TableGridComponent, TableGridModule, UtilsService, convertDateShort, convertIsoToFormat, convertToISOnString, generateTimeOptions, regionalDateFormat };
|
|
890
|
+
export type { IAgPublicEventType, ICellValueChangedEvent, IColDef, IColumnStateEvent, IEmmitedResponse, IExcelHeaders, IExportCellConfig, IFieldConfig, IFilterChangeEvent, IFormConfig, IFormStyles, IFormSubmissionEmit, IFormValidations, IGridApi, IGridReadyEvent, ILoginConfig, IPaginationChangedEvent, IPrintHeaders, IRowSelectionOptions, ITableGridState, MaintAction, PongrassICellRendererAngularComp, PongrassICellRendererParams, TimeOption };
|