@wertzui/ngx-restworld-client 3.1.0 → 3.3.0

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.
@@ -36,9 +36,10 @@ import * as i33 from "primeng/dialog";
36
36
  import * as i34 from "primeng/button";
37
37
  import * as i35 from "primeng/colorpicker";
38
38
  import * as i36 from "@angular/cdk/drag-drop";
39
+ import * as i37 from "primeng/splitbutton";
39
40
  export declare function initializeSettings(settingsService: SettingsService): () => Promise<void>;
40
41
  export declare class RestworldClientModule {
41
42
  static ɵfac: i0.ɵɵFactoryDeclaration<RestworldClientModule, never>;
42
- static ɵmod: i0.ɵɵNgModuleDeclaration<RestworldClientModule, [typeof i1.RESTworldListViewComponent, typeof i2.RESTworldEditViewComponent, typeof i3.RESTWorldImageViewComponent, typeof i4.RESTWorldFileViewComponent, typeof i5.SafeUrlPipe, typeof i6.AsPipe, typeof i7.RestworldEditFormComponent], [typeof i8.CommonModule, typeof i9.RouterModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.TableModule, typeof i12.TooltipModule, typeof i13.ScrollingModule, typeof i14.InputTextModule, typeof i15.InputNumberModule, typeof i16.CalendarModule, typeof i17.CheckboxModule, typeof i18.ConfirmDialogModule, typeof i19.ToastModule, typeof i20.MessagesModule, typeof i21.PanelModule, typeof i22.TabViewModule, typeof i23.SkeletonModule, typeof i24.ProgressSpinnerModule, typeof i25.RippleModule, typeof i26.TriStateCheckboxModule, typeof i27.AvatarModule, typeof i28.DropdownModule, typeof i29.MultiSelectModule, typeof i30.FileUploadModule, typeof i31.ValdemortModule, typeof i32.ImageCropperModule, typeof i33.DialogModule, typeof i34.ButtonModule, typeof i35.ColorPickerModule, typeof i36.DragDropModule], [typeof i1.RESTworldListViewComponent, typeof i2.RESTworldEditViewComponent, typeof i3.RESTWorldImageViewComponent, typeof i4.RESTWorldFileViewComponent, typeof i5.SafeUrlPipe]>;
43
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RestworldClientModule, [typeof i1.RESTworldListViewComponent, typeof i2.RESTworldEditViewComponent, typeof i3.RESTWorldImageViewComponent, typeof i4.RESTWorldFileViewComponent, typeof i5.SafeUrlPipe, typeof i6.AsPipe, typeof i7.RestworldEditFormComponent], [typeof i8.CommonModule, typeof i9.RouterModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.TableModule, typeof i12.TooltipModule, typeof i13.ScrollingModule, typeof i14.InputTextModule, typeof i15.InputNumberModule, typeof i16.CalendarModule, typeof i17.CheckboxModule, typeof i18.ConfirmDialogModule, typeof i19.ToastModule, typeof i20.MessagesModule, typeof i21.PanelModule, typeof i22.TabViewModule, typeof i23.SkeletonModule, typeof i24.ProgressSpinnerModule, typeof i25.RippleModule, typeof i26.TriStateCheckboxModule, typeof i27.AvatarModule, typeof i28.DropdownModule, typeof i29.MultiSelectModule, typeof i30.FileUploadModule, typeof i31.ValdemortModule, typeof i32.ImageCropperModule, typeof i33.DialogModule, typeof i34.ButtonModule, typeof i35.ColorPickerModule, typeof i36.DragDropModule, typeof i37.SplitButtonModule], [typeof i1.RESTworldListViewComponent, typeof i2.RESTworldEditViewComponent, typeof i3.RESTWorldImageViewComponent, typeof i4.RESTWorldFileViewComponent, typeof i5.SafeUrlPipe]>;
43
44
  static ɵinj: i0.ɵɵInjectorDeclaration<RestworldClientModule>;
44
45
  }
@@ -26,4 +26,5 @@ export declare class RESTworldClient {
26
26
  getLinksFromHome(rel: string, curie?: string): Link[];
27
27
  private getFullRel;
28
28
  private static createHeaders;
29
+ private static combineHeaders;
29
30
  }
@@ -1,24 +1,30 @@
1
+ import { AfterViewInit, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
2
  import { PagedListResource, Resource } from '@wertzui/ngx-hal-client';
2
- import { ConfirmationService, LazyLoadEvent, MessageService } from 'primeng/api';
3
+ import * as _ from 'lodash';
4
+ import { ConfirmationService, LazyLoadEvent, MenuItem, MessageService } from 'primeng/api';
3
5
  import { RESTworldClientCollection } from '../../services/restworld-client-collection';
4
6
  import { AvatarGenerator } from '../../services/avatar-generator';
7
+ import { Router } from '@angular/router';
5
8
  import * as i0 from "@angular/core";
6
9
  export declare enum ColumnType {
7
10
  text = "text",
8
11
  numeric = "numeric",
9
12
  boolean = "boolean",
10
- date = "date"
13
+ date = "date",
14
+ array = "array",
15
+ object = "object"
11
16
  }
12
17
  export interface Column {
13
18
  header: string;
14
19
  field: string;
15
20
  type: ColumnType;
16
21
  }
17
- export declare class RESTworldListViewComponent {
22
+ export declare class RESTworldListViewComponent implements AfterViewInit, OnInit, OnChanges {
18
23
  private _clients;
19
24
  private _confirmationService;
20
25
  private _messageService;
21
26
  avatarGenerator: AvatarGenerator;
27
+ private readonly _router;
22
28
  get columns(): Column[];
23
29
  private _columns;
24
30
  set editLink(value: string);
@@ -30,7 +36,14 @@ export declare class RESTworldListViewComponent {
30
36
  set rel(value: string | undefined);
31
37
  get rel(): string | undefined;
32
38
  private _rel?;
39
+ set sortField(value: string | undefined);
40
+ get sortField(): string;
41
+ private _sortField;
42
+ set sortOrder(value: number | undefined);
43
+ get sortOrder(): number;
44
+ private _sortOrder;
33
45
  rowsPerPage: number[];
46
+ createButtonMenu?: MenuItem[];
34
47
  resource?: PagedListResource;
35
48
  isLoading: boolean;
36
49
  private _totalRecords;
@@ -39,13 +52,17 @@ export declare class RESTworldListViewComponent {
39
52
  get rows(): number;
40
53
  get totalRecords(): number;
41
54
  private set totalRecords(value);
42
- get sortOrder(): number;
43
55
  get newHref(): string | undefined;
44
56
  private static _dateFormat;
45
57
  get dateFormat(): string;
46
- constructor(_clients: RESTworldClientCollection, _confirmationService: ConfirmationService, _messageService: MessageService, avatarGenerator: AvatarGenerator);
58
+ constructor(_clients: RESTworldClientCollection, _confirmationService: ConfirmationService, _messageService: MessageService, avatarGenerator: AvatarGenerator, _router: Router);
59
+ ngOnChanges(changes: SimpleChanges): void;
60
+ ngOnInit(): void;
61
+ ngAfterViewInit(): Promise<void>;
62
+ createNew(): Promise<boolean>;
47
63
  private getClient;
48
- load(event: LazyLoadEvent): Promise<void>;
64
+ load: _.DebouncedFunc<(event: LazyLoadEvent) => Promise<void>>;
65
+ load2(event: LazyLoadEvent): Promise<void>;
49
66
  showDeleteConfirmatioModal(resource: Resource): void;
50
67
  delete(resource: Resource): Promise<void>;
51
68
  private createColumns;
@@ -61,5 +78,5 @@ export declare class RESTworldListViewComponent {
61
78
  private static createODataOperator;
62
79
  private createComparisonValue;
63
80
  static ɵfac: i0.ɵɵFactoryDeclaration<RESTworldListViewComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<RESTworldListViewComponent, "rw-list", never, { "editLink": "editLink"; "apiName": "apiName"; "rel": "rel"; "rowsPerPage": "rowsPerPage"; }, {}, never, never>;
81
+ static ɵcmp: i0.ɵɵComponentDeclaration<RESTworldListViewComponent, "rw-list", never, { "editLink": "editLink"; "apiName": "apiName"; "rel": "rel"; "sortField": "sortField"; "sortOrder": "sortOrder"; "rowsPerPage": "rowsPerPage"; "createButtonMenu": "createButtonMenu"; }, {}, never, never>;
65
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wertzui/ngx-restworld-client",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "author": "wertzui",
5
5
  "description": "An Angular client to consume a RESTworld service that serves application/hal+json or hal-forms+json.",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@angular/platform-server": "^13.2.5",
35
35
  "@angular/router": "^13.2.5",
36
36
  "@fortawesome/fontawesome-free": "^6.0.0",
37
- "@jdrks/ngx-deep-linking": "^1.0.6",
37
+ "@jdrks/ngx-deep-linking": "^1.0.7",
38
38
  "@wertzui/ngx-hal-client": "^2.0.1",
39
39
  "cldr-dates-modern": "^40.0.0",
40
40
  "cldr-numbers-modern": "^40.0.0",