@wertzui/ngx-restworld-client 3.2.0 → 4.0.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
  }
@@ -14,6 +14,8 @@ export declare class RESTworldClient {
14
14
  private setDefaultCurie;
15
15
  getList(rel: string, parameters: {}, headers?: HttpHeaders, curie?: string): Promise<HttpResponse<PagedListResource | ProblemDetails>>;
16
16
  getListByUri(uri: string, parameters: {}, headers?: HttpHeaders): Promise<HttpResponse<PagedListResource | ProblemDetails>>;
17
+ getAllPagesFromList(rel: string, parameters: {}, headers?: HttpHeaders, curie?: string): Promise<HttpResponse<PagedListResource | ProblemDetails>>;
18
+ getAllPagesFromListByUri(uri: string, parameters: {}, headers?: HttpHeaders): Promise<HttpResponse<PagedListResource | ProblemDetails>>;
17
19
  getSingle(relOrUri: string, id?: number, headers?: HttpHeaders, curie?: string): Promise<HttpResponse<Resource | ProblemDetails>>;
18
20
  save(resource: Resource): Promise<HttpResponse<Resource | ProblemDetails>>;
19
21
  getAllForms(resource: Resource): Promise<HttpResponse<FormsResource | ProblemDetails>[]>;
@@ -1,15 +1,36 @@
1
- import { HttpBackend } from "@angular/common/http";
2
1
  import { ClientSettings } from "../models/client-settings";
3
2
  import { RESTworldClientCollection } from "./restworld-client-collection";
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class SettingsService {
6
5
  private _clients;
7
- private readonly _client;
8
- private _settings;
6
+ private static _settings;
9
7
  get settings(): ClientSettings | undefined;
10
- constructor(backend: HttpBackend, _clients: RESTworldClientCollection);
11
- initialize(): Promise<void>;
12
- private ensureSettingsAreLoaded;
8
+ private initializing;
9
+ private initialized;
10
+ constructor(_clients: RESTworldClientCollection);
11
+ ensureInitialized(): Promise<void>;
12
+ /**
13
+ * Call this method in your main.ts before calling bootstrapModule(...)
14
+ *
15
+ * Example:
16
+ * async function main() {
17
+ * try {
18
+ * await SettingsService.ensureSettingsAreLoaded();
19
+ *
20
+ * const providers : StaticProvider[] = [
21
+ * { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
22
+ * ];
23
+ *
24
+ * await platformBrowserDynamic(providers).bootstrapModule(AppModule);
25
+ * }
26
+ * catch (e) {
27
+ * console.error(e);
28
+ * }
29
+ * }
30
+ *
31
+ * main();
32
+ * */
33
+ static ensureSettingsAreLoaded(): Promise<void>;
13
34
  private populateRESTworldClientCollectionFromSettings;
14
35
  static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
15
36
  static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
@@ -1,9 +1,9 @@
1
- import { AfterViewInit, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
1
  import { PagedListResource, Resource } from '@wertzui/ngx-hal-client';
3
2
  import * as _ from 'lodash';
4
- import { ConfirmationService, LazyLoadEvent, MessageService } from 'primeng/api';
3
+ import { ConfirmationService, LazyLoadEvent, MenuItem, MessageService } from 'primeng/api';
5
4
  import { RESTworldClientCollection } from '../../services/restworld-client-collection';
6
5
  import { AvatarGenerator } from '../../services/avatar-generator';
6
+ import { Router } from '@angular/router';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare enum ColumnType {
9
9
  text = "text",
@@ -18,11 +18,12 @@ export interface Column {
18
18
  field: string;
19
19
  type: ColumnType;
20
20
  }
21
- export declare class RESTworldListViewComponent implements AfterViewInit, OnInit, OnChanges {
21
+ export declare class RESTworldListViewComponent {
22
22
  private _clients;
23
23
  private _confirmationService;
24
24
  private _messageService;
25
25
  avatarGenerator: AvatarGenerator;
26
+ private readonly _router;
26
27
  get columns(): Column[];
27
28
  private _columns;
28
29
  set editLink(value: string);
@@ -41,6 +42,7 @@ export declare class RESTworldListViewComponent implements AfterViewInit, OnInit
41
42
  get sortOrder(): number;
42
43
  private _sortOrder;
43
44
  rowsPerPage: number[];
45
+ createButtonMenu?: MenuItem[];
44
46
  resource?: PagedListResource;
45
47
  isLoading: boolean;
46
48
  private _totalRecords;
@@ -52,10 +54,8 @@ export declare class RESTworldListViewComponent implements AfterViewInit, OnInit
52
54
  get newHref(): string | undefined;
53
55
  private static _dateFormat;
54
56
  get dateFormat(): string;
55
- constructor(_clients: RESTworldClientCollection, _confirmationService: ConfirmationService, _messageService: MessageService, avatarGenerator: AvatarGenerator);
56
- ngOnChanges(changes: SimpleChanges): void;
57
- ngOnInit(): void;
58
- ngAfterViewInit(): Promise<void>;
57
+ constructor(_clients: RESTworldClientCollection, _confirmationService: ConfirmationService, _messageService: MessageService, avatarGenerator: AvatarGenerator, _router: Router);
58
+ createNew(): Promise<boolean>;
59
59
  private getClient;
60
60
  load: _.DebouncedFunc<(event: LazyLoadEvent) => Promise<void>>;
61
61
  load2(event: LazyLoadEvent): Promise<void>;
@@ -74,5 +74,5 @@ export declare class RESTworldListViewComponent implements AfterViewInit, OnInit
74
74
  private static createODataOperator;
75
75
  private createComparisonValue;
76
76
  static ɵfac: i0.ɵɵFactoryDeclaration<RESTworldListViewComponent, never>;
77
- static ɵcmp: i0.ɵɵComponentDeclaration<RESTworldListViewComponent, "rw-list", never, { "editLink": "editLink"; "apiName": "apiName"; "rel": "rel"; "sortField": "sortField"; "sortOrder": "sortOrder"; "rowsPerPage": "rowsPerPage"; }, {}, never, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<RESTworldListViewComponent, "rw-list", never, { "editLink": "editLink"; "apiName": "apiName"; "rel": "rel"; "sortField": "sortField"; "sortOrder": "sortOrder"; "rowsPerPage": "rowsPerPage"; "createButtonMenu": "createButtonMenu"; }, {}, never, never>;
78
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wertzui/ngx-restworld-client",
3
- "version": "3.2.0",
3
+ "version": "4.0.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": {