@ecodev/natural 58.0.2 → 58.0.4

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.
@@ -56,6 +56,14 @@ export declare class NaturalAbstractDetail<TService extends NaturalAbstractModel
56
56
  * Injected service
57
57
  */
58
58
  protected readonly route: ActivatedRoute;
59
+ private _dialogData;
60
+ /**
61
+ * Once set, this must not change anymore, especially not right after the creation mutation,
62
+ * so the form does not switch from creation mode to update mode without an actual reload of
63
+ * model from DB (by navigating to update page).
64
+ */
65
+ private _isUpdatePage;
66
+ private readonly changes;
59
67
  constructor(key: string, service: TService);
60
68
  /**
61
69
  * You probably should not override this method. Instead, consider overriding `initForm()`.
@@ -4,7 +4,8 @@ import { ReadonlyDeep } from 'type-fest';
4
4
  * Cumulate all changes made to an object over time
5
5
  */
6
6
  export declare class CumulativeChanges<T extends Literal> {
7
- #private;
7
+ private original;
8
+ private diff;
8
9
  /**
9
10
  * Initialize the original values, should be called exactly one time per instance
10
11
  */
@@ -13,7 +13,6 @@ import * as i0 from "@angular/core";
13
13
  * </mat-tab-group>
14
14
  */
15
15
  export declare class NaturalLinkableTabDirective extends NaturalAbstractController implements AfterViewInit {
16
- #private;
17
16
  private readonly component;
18
17
  private readonly route;
19
18
  private readonly router;
@@ -21,6 +20,7 @@ export declare class NaturalLinkableTabDirective extends NaturalAbstractControll
21
20
  * If false, disables the persistent navigation
22
21
  */
23
22
  naturalLinkableTab: boolean | '';
23
+ private isLoadingRouteConfig;
24
24
  constructor(component: MatTabGroup, route: ActivatedRoute, router: Router);
25
25
  ngAfterViewInit(): void;
26
26
  private getTabIndex;
@@ -19,11 +19,11 @@ import * as i0 from "@angular/core";
19
19
  * </natural-relations>
20
20
  */
21
21
  export declare class NaturalRelationsComponent<TService extends NaturalAbstractModelService<unknown, any, PaginatedData<LinkableObject>, QueryVariables, unknown, any, unknown, any, unknown, any>> extends NaturalAbstractController implements OnInit, OnChanges {
22
- #private;
23
22
  private readonly linkMutationService;
24
23
  private readonly hierarchicSelectorDialog;
25
24
  private select?;
26
25
  itemTemplate?: TemplateRef<unknown>;
26
+ private _service;
27
27
  get service(): TService;
28
28
  set service(service: TService);
29
29
  /**
@@ -13,7 +13,6 @@ import * as i0 from "@angular/core";
13
13
  * Maybe the better is to wait next release
14
14
  */
15
15
  export declare class NaturalSidenavService extends NaturalAbstractController {
16
- #private;
17
16
  readonly breakpointObserver: BreakpointObserver;
18
17
  private readonly router;
19
18
  private readonly sessionStorage;
@@ -51,6 +50,7 @@ export declare class NaturalSidenavService extends NaturalAbstractController {
51
50
  private readonly openedStorageKey;
52
51
  private minimizedStorageKeyWithName;
53
52
  private openedStorageKeyWithName;
53
+ private _isMobileView;
54
54
  constructor(breakpointObserver: BreakpointObserver, router: Router, sessionStorage: NaturalStorage, naturalSidenavStackService: NaturalSidenavStackService);
55
55
  get activeMode(): MatDrawerMode;
56
56
  get isOpened(): boolean;
@@ -24,20 +24,36 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
24
24
  }, Tdelete, Vdelete extends {
25
25
  ids: string[];
26
26
  }> {
27
- #private;
28
27
  protected readonly name: string;
29
28
  protected readonly oneQuery: DocumentNode | null;
30
29
  protected readonly allQuery: DocumentNode | null;
31
30
  protected readonly createMutation: DocumentNode | null;
32
31
  protected readonly updateMutation: DocumentNode | null;
33
32
  protected readonly deleteMutation: DocumentNode | null;
33
+ private readonly createName;
34
+ private readonly updateName;
35
+ private readonly deleteName;
34
36
  /**
35
37
  * Store the creation mutations that are pending
36
38
  */
37
39
  private readonly creatingCache;
38
40
  protected readonly apollo: Apollo;
39
41
  protected readonly naturalDebounceService: NaturalDebounceService;
40
- constructor(name: string, oneQuery: DocumentNode | null, allQuery: DocumentNode | null, createMutation: DocumentNode | null, updateMutation: DocumentNode | null, deleteMutation: DocumentNode | null, plural?: string | null);
42
+ private readonly plural;
43
+ /**
44
+ *
45
+ * @param name service and single object query name (eg. userForFront or user).
46
+ * @param oneQuery GraphQL query to fetch a single object from ID (eg. userForCrudQuery).
47
+ * @param allQuery GraphQL query to fetch a filtered list of objects (eg. usersForCrudQuery).
48
+ * @param createMutation GraphQL mutation to create an object.
49
+ * @param updateMutation GraphQL mutation to update an object.
50
+ * @param deleteMutation GraphQL mutation to delete a list of objects.
51
+ * @param plural list query name (eg. usersForFront or users).
52
+ * @param createName create object mutation name (eg. createUser).
53
+ * @param updateName update object mutation name (eg. updateUser).
54
+ * @param deleteName delete object mutation name (eg. deleteUsers).
55
+ */
56
+ constructor(name: string, oneQuery: DocumentNode | null, allQuery: DocumentNode | null, createMutation: DocumentNode | null, updateMutation: DocumentNode | null, deleteMutation: DocumentNode | null, plural?: string | null, createName?: string | null, updateName?: string | null, deleteName?: string | null);
41
57
  /**
42
58
  * List of individual fields validators
43
59
  */
@@ -82,6 +98,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
82
98
  * You **MUST** unsubscribe.
83
99
  */
84
100
  watchOne(id: string, fetchPolicy?: WatchQueryFetchPolicy): Observable<Tone>;
101
+ private prepareOneQuery;
85
102
  /**
86
103
  * Get a collection of objects
87
104
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "58.0.2",
3
+ "version": "58.0.4",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,