@pongrass/utils 1.1.4-v20 → 1.1.6-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/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 i4 from '@angular/forms';
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 i5 from '@coreui/angular-pro';
11
- import * as i6 from '@coreui/icons-angular';
12
- import * as i9 from 'ngx-bootstrap/datepicker';
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",
@@ -272,7 +276,8 @@ declare enum FormFieldType {
272
276
  FormHeader = "form-header",
273
277
  Password = "password",
274
278
  Url = "url",
275
- Tel = "tel"
279
+ Tel = "tel",
280
+ Timepicker = "time"
276
281
  }
277
282
  interface IFieldConfig {
278
283
  /** Form label */
@@ -309,6 +314,10 @@ interface IFieldConfig {
309
314
  value?: any;
310
315
  /** For multi-selects - Allows multiple selection */
311
316
  multiple?: boolean;
317
+ /** Additional info or description for the field */
318
+ info?: string;
319
+ /** Additional configuration for specific field types */
320
+ config?: any;
312
321
  styles?: IFormStyles;
313
322
  actionButton?: {
314
323
  icon: string;
@@ -352,6 +361,7 @@ interface IFormStyles {
352
361
  declare class MultiFormComponent implements OnInit, OnChanges {
353
362
  private readonly formBuilder;
354
363
  readonly configurationService: ConfigurationServiceLib;
364
+ private readonly jsonrpcService;
355
365
  config: IFormConfig;
356
366
  showUnsavedFlags: boolean;
357
367
  currentTableGridsSelectedIndex: number;
@@ -403,6 +413,7 @@ declare class MultiFormComponent implements OnInit, OnChanges {
403
413
  onValueChange(event: any, control: string): void;
404
414
  onDateValueChange(value: any, control: string): void;
405
415
  onEditionChange(event: any): void;
416
+ handleSearch(field: IFieldConfig, keyword: any): void;
406
417
  setDefaultAdvanceDate(currentDate: Date, defaultAdvance: string): any;
407
418
  private advanceDate;
408
419
  private findStopControl;
@@ -496,6 +507,10 @@ type MaintAction = 'N' | 'D' | 'U';
496
507
  declare class JsonrpcServiceLib {
497
508
  private readonly httpService;
498
509
  private readonly configService;
510
+ private readonly baseURL$;
511
+ get baseURL(): string;
512
+ get defaultBaseURl(): string;
513
+ setBaseUrl(url: string): void;
499
514
  postJsonRpcRequest(method: string, params: any): Observable<any>;
500
515
  postJsonRpcRequestPromise(method: string, params: any): Promise<any>;
501
516
  /**
@@ -552,6 +567,25 @@ declare class GenericFilterModelComponent implements OnInit {
552
567
  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
568
  }
554
569
 
570
+ declare class DateTimePickerComponent implements ControlValueAccessor {
571
+ date: Date | null;
572
+ timeValue: string | null;
573
+ disabled: boolean;
574
+ readonly timeDropdwons: _pongrass_utils.TimeOption[];
575
+ readonly DEFAULT_TIME = "0,0";
576
+ private onChange;
577
+ private onTouched;
578
+ writeValue(value: Date | null): void;
579
+ registerOnChange(fn: any): void;
580
+ registerOnTouched(fn: any): void;
581
+ setDisabledState(isDisabled: boolean): void;
582
+ onDateChange(date: Date | null): void;
583
+ onTimeChange(value: string): void;
584
+ private emitValue;
585
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent, never>;
586
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "app-date-time-picker", never, {}, {}, never, never, false, never>;
587
+ }
588
+
555
589
  declare class CircularFocusDirective implements AfterViewInit, OnDestroy {
556
590
  private el;
557
591
  formId: string;
@@ -614,7 +648,7 @@ declare class MultiSelectStylerDirective implements OnInit, OnDestroy {
614
648
 
615
649
  declare class MultiFormModule {
616
650
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiFormModule, never>;
617
- static ɵmod: i0.ɵɵNgModuleDeclaration<MultiFormModule, [typeof MultiFormComponent], [typeof CircularFocusDirective, typeof i2.CommonModule, typeof i4.ReactiveFormsModule, typeof i5.MultiSelectModule, typeof i5.FormModule, typeof i6.IconModule, typeof i5.InputGroupComponent, typeof i5.DatePickerModule, typeof DecimalInputDirective, typeof ShowTooltipIfTruncatedDirective, typeof i5.ModalModule, typeof i5.TooltipModule, typeof i5.ButtonModule, typeof i9.BsDatepickerModule, typeof EditionListGroupedComponent, typeof MultiSelectStylerDirective], [typeof MultiFormComponent]>;
651
+ 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 i6.TimePickerModule], [typeof MultiFormComponent, typeof DateTimePickerComponent]>;
618
652
  static ɵinj: i0.ɵɵInjectorDeclaration<MultiFormModule>;
619
653
  }
620
654
 
@@ -705,7 +739,7 @@ declare class TableGridComponent implements OnInit, OnChanges, OnDestroy {
705
739
 
706
740
  declare class TableGridModule {
707
741
  static ɵfac: i0.ɵɵFactoryDeclaration<TableGridModule, never>;
708
- static ɵmod: i0.ɵɵNgModuleDeclaration<TableGridModule, [typeof TableGridComponent], [typeof i2.CommonModule, typeof i3.AgGridModule, typeof i5.FormModule, typeof i4.ReactiveFormsModule, typeof i5.ButtonModule, typeof i5.OffcanvasModule, typeof i5.TooltipModule, typeof i6.IconModule], [typeof TableGridComponent]>;
742
+ 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]>;
709
743
  static ɵinj: i0.ɵɵInjectorDeclaration<TableGridModule>;
710
744
  }
711
745
 
@@ -789,6 +823,12 @@ declare function convertToISOnString(date: Date): string;
789
823
  declare function regionalDateFormat(date: Date): string;
790
824
  declare function convertIsoToFormat(date: string | Date, dateFormat?: string): string;
791
825
  declare function convertDateShort(dateString: string): string;
826
+ type TimeOption = {
827
+ value: string;
828
+ label: string;
829
+ };
830
+ declare function generateTimeOptions(): TimeOption[];
831
+ declare function getTimeValueFromDateTime(isoString: string): string;
792
832
 
793
833
  interface ILoginConfig {
794
834
  /** Heading of Application (e.g., Maintainance Portal) */
@@ -844,9 +884,9 @@ declare class LoginComponent implements OnInit {
844
884
 
845
885
  declare class LoginModule {
846
886
  static ɵfac: i0.ɵɵFactoryDeclaration<LoginModule, never>;
847
- static ɵmod: i0.ɵɵNgModuleDeclaration<LoginModule, [typeof LoginComponent], [typeof i2.CommonModule, typeof BackgroundImageDirective, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.FormModule, typeof i5.ButtonModule, typeof i5.SpinnerModule, typeof i5.FormPasswordDirective, typeof i6.IconModule, typeof i5.AlertModule], [typeof LoginComponent]>;
887
+ 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]>;
848
888
  static ɵinj: i0.ɵɵInjectorDeclaration<LoginModule>;
849
889
  }
850
890
 
851
- 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 };
852
- 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 };
891
+ 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, getTimeValueFromDateTime, regionalDateFormat };
892
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pongrass/utils",
3
- "version": "1.1.4-v20",
3
+ "version": "1.1.6-v20",
4
4
  "description": "A collection of utility components and services for Angular applications",
5
5
  "keywords": [
6
6
  "angular",