@rosoftlab/rdict 1.0.3-alpha-2 → 1.0.4-alpha-1

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.
@@ -1,7 +1,9 @@
1
1
  import { ElementRef, EventEmitter, Injector, OnInit } from '@angular/core';
2
2
  import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
- import { AddEvent, RemoveEvent } from '@progress/kendo-angular-grid';
4
+ import { AddEvent, DataStateChangeEvent, PageChangeEvent, RemoveEvent } from '@progress/kendo-angular-grid';
5
+ import { IntlService } from '@progress/kendo-angular-intl';
6
+ import { CompositeFilterDescriptor, State } from '@progress/kendo-data-query';
5
7
  import { SVGIcon } from '@progress/kendo-svg-icons';
6
8
  import { LocalFileService } from '@rosoftlab/core';
7
9
  import { ReactiveDictionary } from '../../reactive-dictionary';
@@ -15,13 +17,14 @@ export declare class GenericRdictTableComponent implements OnInit {
15
17
  protected localFileService: LocalFileService;
16
18
  protected rdict: ReactiveDictionary;
17
19
  protected dialogService: MaterialDialogService;
20
+ private intl;
18
21
  dataSource: unknown[];
19
22
  title: string;
20
23
  model: string;
21
24
  showSerach: boolean;
22
25
  searchFields: string;
23
26
  customInclude: string;
24
- defaultSort: string;
27
+ defaultSort: any;
25
28
  deletePropertyName: string;
26
29
  defaultFilter: string;
27
30
  showHeader: boolean;
@@ -63,10 +66,18 @@ export declare class GenericRdictTableComponent implements OnInit {
63
66
  svgAdd: SVGIcon;
64
67
  tableRdict: ReactiveDictionary;
65
68
  editColumn: string | null;
66
- constructor(router: Router, route: ActivatedRoute, translate: TranslateService, injector: Injector, localFileService: LocalFileService, rdict: ReactiveDictionary, dialogService: MaterialDialogService);
69
+ useView: boolean;
70
+ pageable: boolean;
71
+ pageSizes: number[];
72
+ state: State;
73
+ private stateChange;
74
+ parentDict: ReactiveDictionary;
75
+ constructor(router: Router, route: ActivatedRoute, translate: TranslateService, injector: Injector, localFileService: LocalFileService, rdict: ReactiveDictionary, dialogService: MaterialDialogService, intl: IntlService);
67
76
  ngOnInit(): Promise<void>;
77
+ getParentDict(): Promise<void>;
68
78
  setValueFromSnapshot<T>(component: any, snapshot: ActivatedRouteSnapshot, key: string, defaultValue: T): void;
69
- loadData(): Promise<void>;
79
+ loadData(): void;
80
+ loadDataView(): void;
70
81
  onChangeEvent(changes: any): void;
71
82
  ondDeleteEvent(changes: any): void;
72
83
  getListLayout(): void;
@@ -77,6 +88,13 @@ export declare class GenericRdictTableComponent implements OnInit {
77
88
  edit(dataItem: any): void;
78
89
  removeHandler(args: RemoveEvent): void;
79
90
  getCellValue(item: any, column: any): any;
91
+ filterChange(filter: CompositeFilterDescriptor): void;
92
+ dataStateChange(state: DataStateChangeEvent): void;
93
+ pageChange(state: PageChangeEvent): void;
94
+ formatValue(value: any, format?: string): any;
95
+ private extractFormat;
96
+ private looksLikeDateFormat;
97
+ inferFilterType(col: any): 'date' | 'numeric' | 'boolean' | 'text';
80
98
  static ɵfac: i0.ɵɵFactoryDeclaration<GenericRdictTableComponent, never>;
81
99
  static ɵcmp: i0.ɵɵComponentDeclaration<GenericRdictTableComponent, "rsl-rdict-generic-table", never, { "showSerach": { "alias": "showSerach"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "customInclude": { "alias": "customInclude"; "required": false; }; "defaultSort": { "alias": "defaultSort"; "required": false; }; "deletePropertyName": { "alias": "deletePropertyName"; "required": false; }; "defaultFilter": { "alias": "defaultFilter"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "hasAdd": { "alias": "hasAdd"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "canEdit": { "alias": "canEdit"; "required": false; }; "editOnClick": { "alias": "editOnClick"; "required": false; }; "editOnDblClick": { "alias": "editOnDblClick"; "required": false; }; }, { "selectedObject": "selectedObject"; "click": "click"; "editModel": "editModel"; }, never, never, true, never>;
82
100
  }
@@ -0,0 +1,4 @@
1
+ import type { State } from '@progress/kendo-data-query';
2
+ import { FilterRequest } from '@rosoftlab/core';
3
+ /** Main mapper */
4
+ export declare function kendoToFilterRequest(e: State): FilterRequest;
@@ -31,7 +31,7 @@ export declare class ReactiveDictionary extends Map<string, any> {
31
31
  private getNextOid;
32
32
  update(record: Record<string, any>, key?: string): Promise<void>;
33
33
  getFilteredView(key: string, request: FilterRequest): Observable<any>;
34
- executeFunction(functionName: string, args?: any[], kwargs?: Kwargs): Observable<any>;
34
+ executeFunction(functionName: string, args?: any[], kwargs?: Kwargs, waitMs?: number, awaitResult?: boolean): Observable<any>;
35
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ReactiveDictionary, never>;
36
36
  static ɵprov: i0.ɵɵInjectableDeclaration<ReactiveDictionary>;
37
37
  }
@@ -5,6 +5,10 @@ type Kwargs = Record<string, any>;
5
5
  export declare class SocketService {
6
6
  private socket;
7
7
  private socketUrl;
8
+ private disconnect$;
9
+ private result$;
10
+ private error$;
11
+ private disconnected$;
8
12
  constructor(socketUrl: string);
9
13
  initSocket(authToken: string): void;
10
14
  getInitialData(): Promise<Record<string, any>>;
@@ -12,11 +16,13 @@ export declare class SocketService {
12
16
  getDeleteEvent(rdict: any): void;
13
17
  requestLazyLoad(did: string, key: string): Promise<any>;
14
18
  requestFilteredData(guid: string, key: string, request: FilterRequest): Observable<any>;
15
- executeFunction(did: string, functionName: string, args?: any[], kwargs?: Kwargs): Observable<any>;
19
+ convertDates(obj: any): any;
16
20
  emitSet(did: string, key: string, value: any): Promise<void>;
17
21
  emitDelete(did: string, key: string): Promise<void>;
18
22
  transformDatesForEncoding(obj: any): any;
19
23
  transformDatesForDecoding(obj: any): any;
24
+ executeFunction_old(did: string, functionName: string, args?: any[], kwargs?: Kwargs): Observable<any>;
25
+ executeFunction(did: string, functionName: string, args?: any[], kwargs?: Record<string, any>, waitMs?: number, awaitResult?: boolean): Observable<any>;
20
26
  static ɵfac: i0.ɵɵFactoryDeclaration<SocketService, never>;
21
27
  static ɵprov: i0.ɵɵInjectableDeclaration<SocketService>;
22
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosoftlab/rdict",
3
- "version": "1.0.3-alpha-2",
3
+ "version": "1.0.4-alpha-1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.8",
6
6
  "@angular/core": "^19.2.8",
@@ -37,7 +37,7 @@
37
37
  "socket.io-client": "^4.8.1",
38
38
  "socket.io-msgpack-parser": "^3.0.2",
39
39
  "socket.io-parser": "^3.3.4",
40
- "@rosoftlab/core": "1.0.3-alpha-2"
40
+ "@rosoftlab/core": "1.0.4-alpha-1"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "author": "rosoftlab",