@rxap/remote-method 19.2.0 → 21.0.1-dev.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.
- package/CHANGELOG.md +17 -0
- package/compodoc/changelog.html +16 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/injectables/BaseRemoteMethod.html +20 -21
- package/compodoc/injectables/ProxyRemoteMethod.html +10 -10
- package/compodoc/injectables/RemoteMethodLoader.html +5 -5
- package/compodoc/interfaces/BaseRemoteMethodMetadata.html +2 -3
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +454 -422
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/classes/BaseRemoteMethod.html +10 -10
- package/docs/html/classes/ProxyRemoteMethod.html +10 -10
- package/docs/html/classes/RemoteMethodLoader.html +2 -2
- package/docs/html/classes/RxapRemoteMethodError.html +6 -5
- package/docs/html/functions/RxapRemoteMethod.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/BaseRemoteMethodMetadata.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/REMOTE_METHOD_META_DATA.html +1 -1
- package/docs/html/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/BaseRemoteMethod.md +31 -31
- package/docs/markdown/classes/ProxyRemoteMethod.md +32 -32
- package/docs/markdown/classes/RemoteMethodLoader.md +7 -7
- package/docs/markdown/classes/RxapRemoteMethodError.md +25 -13
- package/docs/markdown/functions/RxapRemoteMethod.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/BaseRemoteMethodMetadata.md +5 -5
- package/docs/markdown/variables/REMOTE_METHOD_META_DATA.md +2 -2
- package/docs/markdown/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.md +2 -2
- package/docs/wiki/Class.BaseRemoteMethod.md +30 -30
- package/docs/wiki/Class.ProxyRemoteMethod.md +31 -31
- package/docs/wiki/Class.RemoteMethodLoader.md +6 -6
- package/docs/wiki/Class.RxapRemoteMethodError.md +24 -12
- package/docs/wiki/Function.RxapRemoteMethod.md +1 -1
- package/docs/wiki/Interface.BaseRemoteMethodMetadata.md +4 -4
- package/docs/wiki/Variable.REMOTE_METHOD_META_DATA.md +1 -1
- package/docs/wiki/Variable.RXAP_PROXY_REMOTE_METHOD_TARGET.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-remote-method-directive.mjs +10 -10
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http-directive.mjs +7 -7
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http.mjs +10 -10
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2022/rxap-remote-method.mjs +12 -12
- package/fesm2022/rxap-remote-method.mjs.map +1 -1
- package/package.json +25 -24
- package/types/rxap-remote-method-directive.d.ts +216 -0
- package/{http/directive/lib/http-remote-method.directive.d.ts → types/rxap-remote-method-http-directive.d.ts} +19 -3
- package/types/rxap-remote-method-http.d.ts +69 -0
- package/{testing/lib/remote-method-testing-loader.d.ts → types/rxap-remote-method-testing.d.ts} +9 -5
- package/types/rxap-remote-method.d.ts +53 -0
- package/directive/index.d.ts +0 -5
- package/directive/lib/error.d.ts +0 -4
- package/directive/lib/remote-method-template-collection.directive.d.ts +0 -118
- package/directive/lib/remote-method-template.directive.d.ts +0 -54
- package/directive/lib/remote-method.directive.d.ts +0 -41
- package/directive/lib/tokens.d.ts +0 -2
- package/http/directive/index.d.ts +0 -2
- package/http/directive/lib/contenteditable.directive.d.ts +0 -14
- package/http/index.d.ts +0 -3
- package/http/lib/base-http.remote-method.d.ts +0 -44
- package/http/lib/http-remote-method.loader.d.ts +0 -11
- package/http/lib/http.remote-method.d.ts +0 -14
- package/index.d.ts +0 -5
- package/lib/base.remote-method.d.ts +0 -27
- package/lib/error.d.ts +0 -4
- package/lib/proxy.remote-method.d.ts +0 -11
- package/lib/remote-method-loader.d.ts +0 -9
- package/lib/tokens.d.ts +0 -3
- package/testing/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "21.0.1-dev.0",
|
|
3
3
|
"name": "@rxap/remote-method",
|
|
4
4
|
"description": "This package provides abstractions for defining and executing remote methods in Angular applications. It includes features such as automatic refreshing, proxying, and error handling. It offers a structured way to manage remote calls and their dependencies.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "
|
|
7
|
+
"@nx/devkit": "22.7.5",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
13
|
-
"@rxap/definition": "^
|
|
14
|
-
"@rxap/rxjs": "^1.1.
|
|
15
|
-
"@rxap/utilities": "^16.5.
|
|
16
|
-
"rxjs": "^7.8.
|
|
11
|
+
"@angular/common": "^21.2.9",
|
|
12
|
+
"@angular/core": "^21.2.9",
|
|
13
|
+
"@rxap/definition": "^21.0.1-dev.0",
|
|
14
|
+
"@rxap/rxjs": "^1.1.18-dev.0",
|
|
15
|
+
"@rxap/utilities": "^16.5.2-dev.0",
|
|
16
|
+
"rxjs": "^7.8.2"
|
|
17
17
|
},
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "Merzough Münker",
|
|
@@ -38,27 +38,27 @@
|
|
|
38
38
|
"packageGroup": [
|
|
39
39
|
{
|
|
40
40
|
"package": "@angular/common",
|
|
41
|
-
"version": "
|
|
41
|
+
"version": "21.2.9"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"package": "@angular/core",
|
|
45
|
-
"version": "
|
|
45
|
+
"version": "21.2.9"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"package": "@rxap/definition",
|
|
49
|
-
"version": "
|
|
49
|
+
"version": "21.0.1-dev.0"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"package": "@rxap/reflect-metadata",
|
|
53
|
-
"version": "1.0.
|
|
53
|
+
"version": "1.0.18-dev.0"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"package": "@rxap/rxjs",
|
|
57
|
-
"version": "1.1.
|
|
57
|
+
"version": "1.1.18-dev.0"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"package": "@rxap/utilities",
|
|
61
|
-
"version": "16.5.
|
|
61
|
+
"version": "16.5.2-dev.0"
|
|
62
62
|
}
|
|
63
63
|
]
|
|
64
64
|
},
|
|
@@ -74,31 +74,32 @@
|
|
|
74
74
|
"schematics": "./generators.json",
|
|
75
75
|
"sideEffects": false,
|
|
76
76
|
"module": "fesm2022/rxap-remote-method.mjs",
|
|
77
|
-
"typings": "
|
|
77
|
+
"typings": "types/rxap-remote-method.d.ts",
|
|
78
78
|
"exports": {
|
|
79
79
|
"./package.json": {
|
|
80
80
|
"default": "./package.json"
|
|
81
81
|
},
|
|
82
82
|
".": {
|
|
83
|
-
"types": "./
|
|
83
|
+
"types": "./types/rxap-remote-method.d.ts",
|
|
84
84
|
"default": "./fesm2022/rxap-remote-method.mjs"
|
|
85
85
|
},
|
|
86
86
|
"./directive": {
|
|
87
|
-
"types": "./directive
|
|
87
|
+
"types": "./types/rxap-remote-method-directive.d.ts",
|
|
88
88
|
"default": "./fesm2022/rxap-remote-method-directive.mjs"
|
|
89
89
|
},
|
|
90
90
|
"./http": {
|
|
91
|
-
"types": "./http
|
|
91
|
+
"types": "./types/rxap-remote-method-http.d.ts",
|
|
92
92
|
"default": "./fesm2022/rxap-remote-method-http.mjs"
|
|
93
93
|
},
|
|
94
|
-
"./testing": {
|
|
95
|
-
"types": "./testing/index.d.ts",
|
|
96
|
-
"default": "./fesm2022/rxap-remote-method-testing.mjs"
|
|
97
|
-
},
|
|
98
94
|
"./http/directive": {
|
|
99
|
-
"types": "./http
|
|
95
|
+
"types": "./types/rxap-remote-method-http-directive.d.ts",
|
|
100
96
|
"default": "./fesm2022/rxap-remote-method-http-directive.mjs"
|
|
101
97
|
},
|
|
98
|
+
"./testing": {
|
|
99
|
+
"types": "./types/rxap-remote-method-testing.d.ts",
|
|
100
|
+
"default": "./fesm2022/rxap-remote-method-testing.mjs"
|
|
101
|
+
},
|
|
102
102
|
"./theme": "./theme.css"
|
|
103
|
-
}
|
|
103
|
+
},
|
|
104
|
+
"type": "module"
|
|
104
105
|
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { RxapRemoteMethodError, BaseRemoteMethodMetadata, RemoteMethodLoader, BaseRemoteMethod } from '@rxap/remote-method';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { OnChanges, DoCheck, OnInit, ChangeDetectorRef, TemplateRef, Injector, ViewContainerRef, IterableDiffers, NgZone, TrackByFunction, SimpleChanges, IterableChanges, EventEmitter, InjectionToken } from '@angular/core';
|
|
4
|
+
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
5
|
+
import { ToggleSubject } from '@rxap/rxjs';
|
|
6
|
+
|
|
7
|
+
declare class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
|
|
8
|
+
constructor(message: string, code?: string, scope?: string);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {
|
|
12
|
+
$implicit: ReturnType;
|
|
13
|
+
index: number;
|
|
14
|
+
count: number;
|
|
15
|
+
constructor($implicit: ReturnType, index: number, count: number);
|
|
16
|
+
get first(): boolean;
|
|
17
|
+
get last(): boolean;
|
|
18
|
+
get even(): boolean;
|
|
19
|
+
get odd(): boolean;
|
|
20
|
+
}
|
|
21
|
+
interface RemoteMethodTemplateCollectionDirectiveErrorContext {
|
|
22
|
+
$implicit: Error;
|
|
23
|
+
message?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
}
|
|
26
|
+
declare class RemoteMethodTemplateCollectionDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnChanges, DoCheck, OnInit {
|
|
27
|
+
private readonly template;
|
|
28
|
+
protected readonly remoteMethodLoader: RemoteMethodLoader;
|
|
29
|
+
private readonly injector;
|
|
30
|
+
private readonly viewContainerRef;
|
|
31
|
+
protected readonly cdr: ChangeDetectorRef;
|
|
32
|
+
private readonly differs;
|
|
33
|
+
private readonly zone;
|
|
34
|
+
private readonly remoteMethodToken?;
|
|
35
|
+
parameters?: Parameters;
|
|
36
|
+
emptyTemplate?: TemplateRef<void>;
|
|
37
|
+
errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;
|
|
38
|
+
withoutParameters: boolean;
|
|
39
|
+
private _differ;
|
|
40
|
+
private _trackByFn;
|
|
41
|
+
private _dirty;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates that the remote method returned a empty collection
|
|
44
|
+
*
|
|
45
|
+
* true - is empty
|
|
46
|
+
* false - is NOT empty
|
|
47
|
+
* null - unknown
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
private _empty;
|
|
52
|
+
/**
|
|
53
|
+
* Holds the error that call of the remote method throws
|
|
54
|
+
*
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
private _error;
|
|
58
|
+
/**
|
|
59
|
+
* Holds the empty template view ref.
|
|
60
|
+
*
|
|
61
|
+
* Is used to determine if a empty template is added to the
|
|
62
|
+
* view. And used to destruct the empty template if the remote method
|
|
63
|
+
* changes from empty to not empty.
|
|
64
|
+
*
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
private _emptyTemplateViewRef;
|
|
68
|
+
/**
|
|
69
|
+
* Holds the error template view ref.
|
|
70
|
+
*
|
|
71
|
+
* Is used to determine if a error template is added to the
|
|
72
|
+
* view. And used to destruct the error template if the remote method
|
|
73
|
+
* is called again with an error.
|
|
74
|
+
*
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
private _errorTemplateViewRef;
|
|
78
|
+
constructor(template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>, remoteMethodLoader: RemoteMethodLoader, injector: Injector, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, differs: IterableDiffers, zone: NgZone, remoteMethodToken?: any | undefined);
|
|
79
|
+
get trackBy(): TrackByFunction<ReturnType>;
|
|
80
|
+
/**
|
|
81
|
+
* A function that defines how to track changes for items in the iterable.
|
|
82
|
+
*
|
|
83
|
+
* When items are added, moved, or removed in the iterable,
|
|
84
|
+
* the directive must re-render the appropriate DOM nodes.
|
|
85
|
+
* To minimize churn in the DOM, only nodes that have changed
|
|
86
|
+
* are re-rendered.
|
|
87
|
+
*
|
|
88
|
+
* By default, the change detector assumes that
|
|
89
|
+
* the object instance identifies the node in the iterable.
|
|
90
|
+
* When this function is supplied, the directive uses
|
|
91
|
+
* the result of calling this function to identify the item node,
|
|
92
|
+
* rather than the identity of the object itself.
|
|
93
|
+
*
|
|
94
|
+
* The function receives two inputs,
|
|
95
|
+
* the iteration index and the node object ID.
|
|
96
|
+
*/
|
|
97
|
+
set trackBy(fn: TrackByFunction<ReturnType>);
|
|
98
|
+
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;
|
|
99
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>);
|
|
100
|
+
/**
|
|
101
|
+
* Holds the data that should be displayed
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
104
|
+
private _data;
|
|
105
|
+
protected set data(data: ReturnType[]);
|
|
106
|
+
/**
|
|
107
|
+
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
108
|
+
*
|
|
109
|
+
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
110
|
+
* `NgForOf` structural directive renders its template with a specific context type.
|
|
111
|
+
*/
|
|
112
|
+
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any): ctx is RemoteMethodTemplateCollectionDirectiveContext<T>;
|
|
113
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
114
|
+
ngOnInit(): void;
|
|
115
|
+
call(parameters?: Parameters): void;
|
|
116
|
+
/**
|
|
117
|
+
* Applies the changes when needed.
|
|
118
|
+
*/
|
|
119
|
+
ngDoCheck(): void;
|
|
120
|
+
protected applyChanges(changes: IterableChanges<ReturnType>): void;
|
|
121
|
+
private perViewChange;
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, [null, null, null, null, null, null, null, { optional: true; self: true; }]>;
|
|
123
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, "[rxapRemoteMethodCollection]", ["rxapRemoteMethodCollection"], { "parameters": { "alias": "rxapRemoteMethodCollectionParameters"; "required": false; }; "emptyTemplate": { "alias": "rxapRemoteMethodCollectionEmpty"; "required": false; }; "errorTemplate": { "alias": "rxapRemoteMethodCollectionError"; "required": false; }; "withoutParameters": { "alias": "rxapRemoteMethodCollectionWithoutParameters"; "required": false; }; "trackBy": { "alias": "rxapRemoteMethodCollectionTrackBy"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCollectionCall"; "required": false; }; }, {}, never, never, true, never>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {
|
|
127
|
+
$implicit: ReturnType;
|
|
128
|
+
}
|
|
129
|
+
interface RemoteMethodTemplateDirectiveErrorContext {
|
|
130
|
+
$implicit: Error;
|
|
131
|
+
message: string;
|
|
132
|
+
}
|
|
133
|
+
declare class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnChanges, OnInit {
|
|
134
|
+
private readonly template;
|
|
135
|
+
protected readonly remoteMethodLoader: RemoteMethodLoader;
|
|
136
|
+
private readonly injector;
|
|
137
|
+
private readonly viewContainerRef;
|
|
138
|
+
protected readonly cdr: ChangeDetectorRef;
|
|
139
|
+
private readonly remoteMethodToken?;
|
|
140
|
+
executed$: EventEmitter<any>;
|
|
141
|
+
failure$: EventEmitter<Error>;
|
|
142
|
+
successful$: EventEmitter<ReturnType>;
|
|
143
|
+
metadata?: Metadata;
|
|
144
|
+
/**
|
|
145
|
+
* true - a remote method call is in progress
|
|
146
|
+
*/
|
|
147
|
+
executing$: ToggleSubject;
|
|
148
|
+
parameters?: Parameters;
|
|
149
|
+
errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;
|
|
150
|
+
loadingTemplate?: TemplateRef<void>;
|
|
151
|
+
withoutParameters: boolean;
|
|
152
|
+
embedded: EventEmitter<any>;
|
|
153
|
+
constructor(template: TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>, remoteMethodLoader: RemoteMethodLoader, injector: Injector, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, remoteMethodToken?: any | undefined);
|
|
154
|
+
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
|
|
155
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
156
|
+
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any): ctx is RemoteMethodTemplateDirectiveContext<T>;
|
|
157
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
158
|
+
ngOnInit(): void;
|
|
159
|
+
execute(parameters?: Parameters | undefined): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated removed
|
|
162
|
+
* @protected
|
|
163
|
+
*/
|
|
164
|
+
call(parameters?: Parameters): void;
|
|
165
|
+
setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
|
|
166
|
+
updateParameters(parameters: Partial<Parameters>): void;
|
|
167
|
+
protected executed(result: any): void;
|
|
168
|
+
protected failure(error: Error): void;
|
|
169
|
+
protected successful(result: ReturnType): void;
|
|
170
|
+
protected renderTemplate(result: ReturnType): void;
|
|
171
|
+
private renderLoadingTemplate;
|
|
172
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateDirective<any, any, any>, [null, null, null, null, null, { optional: true; self: true; }]>;
|
|
173
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "metadata": { "alias": "rxapRemoteMethodMetadata"; "required": false; }; "parameters": { "alias": "rxapRemoteMethodParameters"; "required": false; }; "errorTemplate": { "alias": "rxapRemoteMethodError"; "required": false; }; "loadingTemplate": { "alias": "rxapRemoteMethodLoading"; "required": false; }; "withoutParameters": { "alias": "rxapRemoteMethodWithoutParameters"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCall"; "required": false; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; "embedded": "embedded"; }, never, never, true, never>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnInit {
|
|
177
|
+
protected readonly remoteMethodLoader: RemoteMethodLoader;
|
|
178
|
+
private readonly injector;
|
|
179
|
+
private readonly remoteMethodToken?;
|
|
180
|
+
parameters?: Parameters;
|
|
181
|
+
metadata?: Metadata;
|
|
182
|
+
executed$: EventEmitter<any>;
|
|
183
|
+
failure$: EventEmitter<Error>;
|
|
184
|
+
successful$: EventEmitter<ReturnType>;
|
|
185
|
+
immediately: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* true - a remote method call is in progress
|
|
188
|
+
*/
|
|
189
|
+
executing$: ToggleSubject;
|
|
190
|
+
constructor(remoteMethodLoader: RemoteMethodLoader, injector?: Injector, remoteMethodToken?: any | undefined);
|
|
191
|
+
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
|
|
192
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
193
|
+
private _hasConfirmDirective;
|
|
194
|
+
set hasConfirmDirective(value: any);
|
|
195
|
+
ngOnInit(): void;
|
|
196
|
+
onConfirmed(): void;
|
|
197
|
+
onClick(): void;
|
|
198
|
+
execute(): Promise<void>;
|
|
199
|
+
setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
|
|
200
|
+
updateParameters(parameters: Partial<Parameters>): void;
|
|
201
|
+
protected executed(result: any): void;
|
|
202
|
+
protected failure(error: Error): void;
|
|
203
|
+
protected successful(result: ReturnType): void;
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated removed
|
|
206
|
+
* @protected
|
|
207
|
+
*/
|
|
208
|
+
protected call(): Promise<any>;
|
|
209
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodDirective<any, any, any>, [null, null, { optional: true; self: true; }]>;
|
|
210
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "parameters": { "alias": "parameters"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "immediately": { "alias": "immediately"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethod"; "required": false; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; }, never, never, true, never>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN: InjectionToken<unknown>;
|
|
214
|
+
|
|
215
|
+
export { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, RemoteMethodDirective, RemoteMethodTemplateCollectionDirective, RemoteMethodTemplateCollectionDirectiveContext, RemoteMethodTemplateDirective, RxapRemoteMethodDirectiveError };
|
|
216
|
+
export type { RemoteMethodTemplateCollectionDirectiveErrorContext, RemoteMethodTemplateDirectiveContext, RemoteMethodTemplateDirectiveErrorContext };
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
import { HttpRemoteMethodLoader, HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from '@rxap/remote-method/http';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
1
3
|
import { RemoteMethodDirective } from '@rxap/remote-method/directive';
|
|
2
|
-
import { HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from '@rxap/remote-method/http';
|
|
3
4
|
import { BaseRemoteMethod } from '@rxap/remote-method';
|
|
4
5
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
declare class ContenteditableDirective {
|
|
8
|
+
private readonly httpRemoteMethodLoader;
|
|
9
|
+
contenteditable: boolean;
|
|
10
|
+
remoteMethodId: string;
|
|
11
|
+
property: string;
|
|
12
|
+
uuid: string;
|
|
13
|
+
constructor(httpRemoteMethodLoader: HttpRemoteMethodLoader);
|
|
14
|
+
onClick($event: Event): void;
|
|
15
|
+
onInput($event: any): Promise<any>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContenteditableDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": { "alias": "rxapContenteditable"; "required": true; }; "property": { "alias": "property"; "required": true; }; "uuid": { "alias": "uuid"; "required": true; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {
|
|
7
21
|
set headers(headers: HttpRemoteMethodParameter['headers']);
|
|
8
22
|
set reportProgress(reportProgress: HttpRemoteMethodParameter['reportProgress']);
|
|
9
23
|
set params(params: HttpRemoteMethodParameter['params']);
|
|
@@ -17,3 +31,5 @@ export declare class HttpRemoteMethodDirective<ReturnType = any, Metadata extend
|
|
|
17
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodDirective<any, any>, never>;
|
|
18
32
|
static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": { "alias": "headers"; "required": false; }; "reportProgress": { "alias": "reportProgress"; "required": false; }; "params": { "alias": "params"; "required": false; }; "responseType": { "alias": "responseType"; "required": false; }; "withCredentials": { "alias": "withCredentials"; "required": false; }; "body": { "alias": "body"; "required": false; }; "setHeaders": { "alias": "setHeaders"; "required": false; }; "setParams": { "alias": "setParams"; "required": false; }; "pathParams": { "alias": "pathParams"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapHttpRemoteMethod"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
33
|
}
|
|
34
|
+
|
|
35
|
+
export { ContenteditableDirective, HttpRemoteMethodDirective };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injector, InjectOptions } from '@angular/core';
|
|
3
|
+
import { HttpHeaders, HttpParams, HttpContext, HttpClient, HttpRequest, HttpSentEvent, HttpHeaderResponse, HttpResponse, HttpProgressEvent } from '@angular/common/http';
|
|
4
|
+
import { BaseRemoteMethodMetadata, BaseRemoteMethod, RemoteMethodLoader } from '@rxap/remote-method';
|
|
5
|
+
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
6
|
+
|
|
7
|
+
interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {
|
|
8
|
+
url: string | (() => string);
|
|
9
|
+
method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';
|
|
10
|
+
headers?: HttpHeaders;
|
|
11
|
+
reportProgress?: boolean;
|
|
12
|
+
params?: HttpParams;
|
|
13
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
14
|
+
withCredentials?: boolean;
|
|
15
|
+
timeout?: number;
|
|
16
|
+
retry?: number;
|
|
17
|
+
context?: HttpContext;
|
|
18
|
+
}
|
|
19
|
+
interface HttpRemoteMethodParameter<PathParams = any> {
|
|
20
|
+
headers?: HttpHeaders;
|
|
21
|
+
reportProgress?: boolean;
|
|
22
|
+
params?: HttpParams;
|
|
23
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
24
|
+
withCredentials?: boolean;
|
|
25
|
+
body?: any | null;
|
|
26
|
+
setHeaders?: {
|
|
27
|
+
[name: string]: string | string[];
|
|
28
|
+
};
|
|
29
|
+
setParams?: {
|
|
30
|
+
[param: string]: string;
|
|
31
|
+
};
|
|
32
|
+
pathParams?: PathParams;
|
|
33
|
+
context?: HttpContext;
|
|
34
|
+
}
|
|
35
|
+
declare abstract class BaseHttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {
|
|
36
|
+
readonly http: HttpClient;
|
|
37
|
+
timeout: number;
|
|
38
|
+
protected _httpRequest: HttpRequest<ReturnType>;
|
|
39
|
+
constructor(http: HttpClient, injector: Injector, metaData?: any | null);
|
|
40
|
+
init(): void;
|
|
41
|
+
updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType>;
|
|
42
|
+
buildUrlWithParams(url: string, pathParams?: PathParams): string;
|
|
43
|
+
protected getRequestUrl(): string;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseHttpRemoteMethod<any, any, any, any>, [null, null, { optional: true; }]>;
|
|
45
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseHttpRemoteMethod<any, any, any, any>>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class HttpRemoteMethodLoader {
|
|
49
|
+
private readonly remoteMethodLoader;
|
|
50
|
+
constructor(remoteMethodLoader: RemoteMethodLoader);
|
|
51
|
+
request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>, parameters: Parameters, metadata?: Partial<BaseRemoteMethodMetadata>, injector?: Injector, notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>, flags?: InjectOptions): Promise<any>;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodLoader, never>;
|
|
53
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpRemoteMethodLoader>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class HttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {
|
|
57
|
+
onSentEvent(event: HttpSentEvent): void;
|
|
58
|
+
onHeaderResponse(event: HttpHeaderResponse): void;
|
|
59
|
+
onResponse(event: HttpResponse<ReturnType>): void;
|
|
60
|
+
onProgressEvent(event: HttpProgressEvent): void;
|
|
61
|
+
createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter>;
|
|
62
|
+
transformer(response: any): ReturnType;
|
|
63
|
+
protected _call(parameters?: Parameter): Promise<ReturnType>;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethod<any, any, any, any>, never>;
|
|
65
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpRemoteMethod<any, any, any, any>>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { BaseHttpRemoteMethod, HttpRemoteMethod, HttpRemoteMethodLoader };
|
|
69
|
+
export type { HttpRemoteMethodMetadata, HttpRemoteMethodParameter };
|
package/{testing/lib/remote-method-testing-loader.d.ts → types/rxap-remote-method-testing.d.ts}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { RemoteMethodLoader, BaseRemoteMethodMetadata, BaseRemoteMethod } from '@rxap/remote-method';
|
|
2
|
+
import { Provider, Type, InjectionToken, AbstractType } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type MockRemoteMethod = (parameters?: any, metadata?: any) => any;
|
|
5
|
+
declare class RemoteMethodTestingLoader extends RemoteMethodLoader {
|
|
5
6
|
private mockedRemoteMethods;
|
|
6
7
|
mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void;
|
|
7
8
|
clearMocks(): void;
|
|
@@ -10,4 +11,7 @@ export declare class RemoteMethodTestingLoader extends RemoteMethodLoader {
|
|
|
10
11
|
getMock(remoteMethodId: string): MockRemoteMethod;
|
|
11
12
|
call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>, parameters?: Parameters, metadata?: Metadata): Promise<ReturnType>;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
declare const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider;
|
|
15
|
+
|
|
16
|
+
export { REMOTE_METHOD_TESTING_LOADER_PROVIDER, RemoteMethodTestingLoader };
|
|
17
|
+
export type { MockRemoteMethod };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Type, InjectionToken, AbstractType, Injector, InjectOptions } from '@angular/core';
|
|
3
|
+
import { BaseDefinitionMetadata, BaseDefinition, DefinitionLoader, IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { Refreshable, RxapError } from '@rxap/utilities';
|
|
6
|
+
import { CounterSubject } from '@rxap/rxjs';
|
|
7
|
+
|
|
8
|
+
interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {
|
|
9
|
+
refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;
|
|
10
|
+
}
|
|
11
|
+
declare function RxapRemoteMethod<MetaData extends BaseDefinitionMetadata = BaseDefinitionMetadata>(metadataOrId: MetaData | string, className?: string, packageName?: string): (target: any) => void;
|
|
12
|
+
declare abstract class BaseRemoteMethod<ReturnType = any, Parameter = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> extends BaseDefinition<Metadata> {
|
|
13
|
+
executed$: Subject<ReturnType>;
|
|
14
|
+
executionsInProgress$: CounterSubject;
|
|
15
|
+
executionsInProgress: i0.Signal<number>;
|
|
16
|
+
executing: i0.Signal<boolean>;
|
|
17
|
+
readonly injector: Injector;
|
|
18
|
+
private _pauseRefresh;
|
|
19
|
+
constructor(injector?: Injector | null, metaData?: any | null);
|
|
20
|
+
call(parameters?: Parameter): Promise<ReturnType>;
|
|
21
|
+
executed(result: ReturnType): void;
|
|
22
|
+
pauseRefresh(): void;
|
|
23
|
+
resumeRefresh(): void;
|
|
24
|
+
refresh(): void;
|
|
25
|
+
protected abstract _call(parameters?: Parameter): Promise<ReturnType> | ReturnType;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseRemoteMethod<any, any, any>, [{ optional: true; }, { optional: true; }]>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseRemoteMethod<any, any, any>>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class RxapRemoteMethodError extends RxapError {
|
|
31
|
+
constructor(message: string, code: string, className?: string);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter> extends BaseRemoteMethod<ReturnType, SourceParameter> {
|
|
35
|
+
private readonly remoteMethod;
|
|
36
|
+
constructor(remoteMethod: BaseRemoteMethod, injector?: Injector | null, metadata?: BaseRemoteMethodMetadata);
|
|
37
|
+
abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;
|
|
38
|
+
protected _call(parameters?: SourceParameter): Promise<any>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProxyRemoteMethod<any, any, any>, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProxyRemoteMethod<any, any, any>>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class RemoteMethodLoader extends DefinitionLoader {
|
|
44
|
+
call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>, parameters: Parameters, metadata?: Partial<BaseRemoteMethodMetadata>, injector?: Injector, notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>, flags?: InjectOptions): Promise<ReturnType>;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodLoader, never>;
|
|
46
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RemoteMethodLoader>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare const REMOTE_METHOD_META_DATA: InjectionToken<unknown>;
|
|
50
|
+
declare const RXAP_PROXY_REMOTE_METHOD_TARGET: InjectionToken<unknown>;
|
|
51
|
+
|
|
52
|
+
export { BaseRemoteMethod, ProxyRemoteMethod, REMOTE_METHOD_META_DATA, RXAP_PROXY_REMOTE_METHOD_TARGET, RemoteMethodLoader, RxapRemoteMethod, RxapRemoteMethodError };
|
|
53
|
+
export type { BaseRemoteMethodMetadata };
|
package/directive/index.d.ts
DELETED
package/directive/lib/error.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, DoCheck, Injector, IterableChanges, IterableDiffers, NgZone, OnChanges, OnInit, SimpleChanges, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
3
|
-
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {
|
|
6
|
-
$implicit: ReturnType;
|
|
7
|
-
index: number;
|
|
8
|
-
count: number;
|
|
9
|
-
constructor($implicit: ReturnType, index: number, count: number);
|
|
10
|
-
get first(): boolean;
|
|
11
|
-
get last(): boolean;
|
|
12
|
-
get even(): boolean;
|
|
13
|
-
get odd(): boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface RemoteMethodTemplateCollectionDirectiveErrorContext {
|
|
16
|
-
$implicit: Error;
|
|
17
|
-
message?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare class RemoteMethodTemplateCollectionDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnChanges, DoCheck, OnInit {
|
|
21
|
-
private readonly template;
|
|
22
|
-
protected readonly remoteMethodLoader: RemoteMethodLoader;
|
|
23
|
-
private readonly injector;
|
|
24
|
-
private readonly viewContainerRef;
|
|
25
|
-
protected readonly cdr: ChangeDetectorRef;
|
|
26
|
-
private readonly differs;
|
|
27
|
-
private readonly zone;
|
|
28
|
-
private readonly remoteMethodToken?;
|
|
29
|
-
parameters?: Parameters;
|
|
30
|
-
emptyTemplate?: TemplateRef<void>;
|
|
31
|
-
errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;
|
|
32
|
-
withoutParameters: boolean;
|
|
33
|
-
private _differ;
|
|
34
|
-
private _trackByFn;
|
|
35
|
-
private _dirty;
|
|
36
|
-
/**
|
|
37
|
-
* Indicates that the remote method returned a empty collection
|
|
38
|
-
*
|
|
39
|
-
* true - is empty
|
|
40
|
-
* false - is NOT empty
|
|
41
|
-
* null - unknown
|
|
42
|
-
*
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
private _empty;
|
|
46
|
-
/**
|
|
47
|
-
* Holds the error that call of the remote method throws
|
|
48
|
-
*
|
|
49
|
-
* @private
|
|
50
|
-
*/
|
|
51
|
-
private _error;
|
|
52
|
-
/**
|
|
53
|
-
* Holds the empty template view ref.
|
|
54
|
-
*
|
|
55
|
-
* Is used to determine if a empty template is added to the
|
|
56
|
-
* view. And used to destruct the empty template if the remote method
|
|
57
|
-
* changes from empty to not empty.
|
|
58
|
-
*
|
|
59
|
-
* @private
|
|
60
|
-
*/
|
|
61
|
-
private _emptyTemplateViewRef;
|
|
62
|
-
/**
|
|
63
|
-
* Holds the error template view ref.
|
|
64
|
-
*
|
|
65
|
-
* Is used to determine if a error template is added to the
|
|
66
|
-
* view. And used to destruct the error template if the remote method
|
|
67
|
-
* is called again with an error.
|
|
68
|
-
*
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
private _errorTemplateViewRef;
|
|
72
|
-
constructor(template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>, remoteMethodLoader: RemoteMethodLoader, injector: Injector, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, differs: IterableDiffers, zone: NgZone, remoteMethodToken?: any | undefined);
|
|
73
|
-
get trackBy(): TrackByFunction<ReturnType>;
|
|
74
|
-
/**
|
|
75
|
-
* A function that defines how to track changes for items in the iterable.
|
|
76
|
-
*
|
|
77
|
-
* When items are added, moved, or removed in the iterable,
|
|
78
|
-
* the directive must re-render the appropriate DOM nodes.
|
|
79
|
-
* To minimize churn in the DOM, only nodes that have changed
|
|
80
|
-
* are re-rendered.
|
|
81
|
-
*
|
|
82
|
-
* By default, the change detector assumes that
|
|
83
|
-
* the object instance identifies the node in the iterable.
|
|
84
|
-
* When this function is supplied, the directive uses
|
|
85
|
-
* the result of calling this function to identify the item node,
|
|
86
|
-
* rather than the identity of the object itself.
|
|
87
|
-
*
|
|
88
|
-
* The function receives two inputs,
|
|
89
|
-
* the iteration index and the node object ID.
|
|
90
|
-
*/
|
|
91
|
-
set trackBy(fn: TrackByFunction<ReturnType>);
|
|
92
|
-
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;
|
|
93
|
-
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>);
|
|
94
|
-
/**
|
|
95
|
-
* Holds the data that should be displayed
|
|
96
|
-
* @private
|
|
97
|
-
*/
|
|
98
|
-
private _data;
|
|
99
|
-
protected set data(data: ReturnType[]);
|
|
100
|
-
/**
|
|
101
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
102
|
-
*
|
|
103
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
104
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
105
|
-
*/
|
|
106
|
-
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any): ctx is RemoteMethodTemplateCollectionDirectiveContext<T>;
|
|
107
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
108
|
-
ngOnInit(): void;
|
|
109
|
-
call(parameters?: Parameters): void;
|
|
110
|
-
/**
|
|
111
|
-
* Applies the changes when needed.
|
|
112
|
-
*/
|
|
113
|
-
ngDoCheck(): void;
|
|
114
|
-
protected applyChanges(changes: IterableChanges<ReturnType>): void;
|
|
115
|
-
private perViewChange;
|
|
116
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, [null, null, null, null, null, null, null, { optional: true; self: true; }]>;
|
|
117
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, "[rxapRemoteMethodCollection]", ["rxapRemoteMethodCollection"], { "parameters": { "alias": "rxapRemoteMethodCollectionParameters"; "required": false; }; "emptyTemplate": { "alias": "rxapRemoteMethodCollectionEmpty"; "required": false; }; "errorTemplate": { "alias": "rxapRemoteMethodCollectionError"; "required": false; }; "withoutParameters": { "alias": "rxapRemoteMethodCollectionWithoutParameters"; "required": false; }; "trackBy": { "alias": "rxapRemoteMethodCollectionTrackBy"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCollectionCall"; "required": false; }; }, {}, never, never, true, never>;
|
|
118
|
-
}
|