@ecodev/natural 56.0.1 → 56.0.3
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/esm2022/lib/modules/avatar/component/avatar.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +1 -1
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +1 -1
- package/esm2022/lib/modules/relations/relations.component.mjs +3 -3
- package/esm2022/lib/modules/search/input/input.component.mjs +1 -1
- package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +1 -1
- package/esm2022/lib/services/abstract-model.service.mjs +8 -6
- package/esm2022/lib/services/debounce.service.mjs +26 -7
- package/esm2022/lib/services/enum.service.mjs +1 -1
- package/esm2022/lib/services/link-mutation.service.mjs +1 -1
- package/fesm2022/ecodev-natural.mjs +34 -13
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/services/abstract-model.service.d.ts +2 -2
- package/lib/services/debounce.service.d.ts +10 -2
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
|
|
|
70
70
|
* If available it will emit object from cache immediately, then it
|
|
71
71
|
* will **always** fetch from network and then the observable will be completed
|
|
72
72
|
*/
|
|
73
|
-
getOne(id: string): Observable<Tone>;
|
|
73
|
+
getOne(id: string, fetchPolicy?: WatchQueryFetchPolicy): Observable<Tone>;
|
|
74
74
|
/**
|
|
75
75
|
* Get a collection of objects
|
|
76
76
|
*
|
|
@@ -121,7 +121,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
|
|
|
121
121
|
id: string;
|
|
122
122
|
}[]): Observable<Tdelete>;
|
|
123
123
|
/**
|
|
124
|
-
* Resolve model and items related to the model, if the id is provided, in order to show a form
|
|
124
|
+
* Resolve model from server (never from cache) and items related to the model, if the id is provided, in order to show a form
|
|
125
125
|
*/
|
|
126
126
|
resolve(id: string): Observable<Resolve<Tone | Vcreate['input']>>;
|
|
127
127
|
/**
|
|
@@ -12,7 +12,6 @@ type Key = NaturalAbstractModelService<unknown, any, any, any, unknown, any, unk
|
|
|
12
12
|
* `id` should be the ID of the object that will be updated.
|
|
13
13
|
*/
|
|
14
14
|
export declare class NaturalDebounceService {
|
|
15
|
-
private readonly flusher;
|
|
16
15
|
/**
|
|
17
16
|
* Stores the debounced update function
|
|
18
17
|
*/
|
|
@@ -25,7 +24,15 @@ export declare class NaturalDebounceService {
|
|
|
25
24
|
* keep the same debouncing timeline.
|
|
26
25
|
*/
|
|
27
26
|
debounce<T>(key: Key, id: string, source: Observable<T>): Observable<T>;
|
|
28
|
-
|
|
27
|
+
cancelOne(key: Key, id: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Immediately execute the pending update, if any.
|
|
30
|
+
*
|
|
31
|
+
* It should typically be called before resolving the object, to mutate it before re-fetching it from server.
|
|
32
|
+
*
|
|
33
|
+
* The returned observable will complete when the update completes, even if it errors.
|
|
34
|
+
*/
|
|
35
|
+
flushOne(key: Key, id: string): Observable<void>;
|
|
29
36
|
/**
|
|
30
37
|
* Immediately execute all pending updates.
|
|
31
38
|
*
|
|
@@ -34,6 +41,7 @@ export declare class NaturalDebounceService {
|
|
|
34
41
|
* The returned observable will complete when all updates complete, even if some of them error.
|
|
35
42
|
*/
|
|
36
43
|
flush(): Observable<void>;
|
|
44
|
+
private internalFlush;
|
|
37
45
|
/**
|
|
38
46
|
* Count of pending updates
|
|
39
47
|
*/
|