@rxap/remote-method 15.0.0 → 16.0.0-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/directive/lib/remote-method-template-collection.directive.d.ts +1 -1
- package/directive/lib/remote-method-template.directive.d.ts +1 -1
- package/directive/lib/remote-method.directive.d.ts +1 -1
- package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +335 -0
- package/esm2022/directive/lib/remote-method-template.directive.mjs +203 -0
- package/esm2022/directive/lib/remote-method.directive.mjs +167 -0
- package/esm2022/http/directive/lib/contenteditable.directive.mjs +88 -0
- package/esm2022/http/directive/lib/http-remote-method.directive.mjs +81 -0
- package/esm2022/http/lib/base-http.remote-method.mjs +83 -0
- package/esm2022/http/lib/http-remote-method.loader.mjs +31 -0
- package/esm2022/http/lib/http.remote-method.mjs +46 -0
- package/esm2022/lib/base.remote-method.mjs +74 -0
- package/esm2022/lib/proxy.remote-method.mjs +30 -0
- package/esm2022/lib/remote-method-loader.mjs +18 -0
- package/{fesm2020 → fesm2022}/rxap-remote-method-directive.mjs +91 -92
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/rxap-remote-method-http-directive.mjs +14 -15
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/rxap-remote-method-http.mjs +9 -10
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/rxap-remote-method-testing.mjs +0 -1
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/rxap-remote-method.mjs +9 -10
- package/fesm2022/rxap-remote-method.mjs.map +1 -0
- package/http/directive/lib/contenteditable.directive.d.ts +1 -1
- package/http/directive/lib/http-remote-method.directive.d.ts +1 -1
- package/package.json +27 -41
- package/testing/lib/remote-method-testing-loader.d.ts +1 -1
- package/esm2020/directive/lib/remote-method-template-collection.directive.mjs +0 -333
- package/esm2020/directive/lib/remote-method-template.directive.mjs +0 -201
- package/esm2020/directive/lib/remote-method.directive.mjs +0 -165
- package/esm2020/http/directive/lib/contenteditable.directive.mjs +0 -86
- package/esm2020/http/directive/lib/http-remote-method.directive.mjs +0 -79
- package/esm2020/http/lib/base-http.remote-method.mjs +0 -82
- package/esm2020/http/lib/http-remote-method.loader.mjs +0 -30
- package/esm2020/http/lib/http.remote-method.mjs +0 -45
- package/esm2020/lib/base.remote-method.mjs +0 -73
- package/esm2020/lib/proxy.remote-method.mjs +0 -29
- package/esm2020/lib/remote-method-loader.mjs +0 -17
- package/fesm2015/rxap-remote-method-directive.mjs +0 -713
- package/fesm2015/rxap-remote-method-directive.mjs.map +0 -1
- package/fesm2015/rxap-remote-method-http-directive.mjs +0 -173
- package/fesm2015/rxap-remote-method-http-directive.mjs.map +0 -1
- package/fesm2015/rxap-remote-method-http.mjs +0 -159
- package/fesm2015/rxap-remote-method-http.mjs.map +0 -1
- package/fesm2015/rxap-remote-method-testing.mjs +0 -61
- package/fesm2015/rxap-remote-method-testing.mjs.map +0 -1
- package/fesm2015/rxap-remote-method.mjs +0 -138
- package/fesm2015/rxap-remote-method.mjs.map +0 -1
- package/fesm2020/rxap-remote-method-directive.mjs.map +0 -1
- package/fesm2020/rxap-remote-method-http-directive.mjs.map +0 -1
- package/fesm2020/rxap-remote-method-http.mjs.map +0 -1
- package/fesm2020/rxap-remote-method-testing.mjs.map +0 -1
- package/fesm2020/rxap-remote-method.mjs.map +0 -1
- /package/{esm2020 → esm2022}/directive/lib/error.mjs +0 -0
- /package/{esm2020 → esm2022}/directive/lib/tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/directive/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/directive/rxap-remote-method-directive.mjs +0 -0
- /package/{esm2020 → esm2022}/http/directive/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/http/directive/rxap-remote-method-http-directive.mjs +0 -0
- /package/{esm2020 → esm2022}/http/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/http/rxap-remote-method-http.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/error.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/rxap-remote-method.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/lib/remote-method-testing-loader.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/rxap-remote-method-testing.mjs +0 -0
|
@@ -10,6 +10,14 @@ import { take, tap } from 'rxjs/operators';
|
|
|
10
10
|
const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');
|
|
11
11
|
|
|
12
12
|
class RemoteMethodDirective {
|
|
13
|
+
set remoteMethodOrIdOrToken(value) {
|
|
14
|
+
if (value) {
|
|
15
|
+
this._remoteMethodOrIdOrToken = value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
set hasConfirmDirective(value) {
|
|
19
|
+
this._hasConfirmDirective = coerceBoolean(value);
|
|
20
|
+
}
|
|
13
21
|
constructor(remoteMethodLoader, injector = Injector.NULL, remoteMethodToken) {
|
|
14
22
|
this.remoteMethodLoader = remoteMethodLoader;
|
|
15
23
|
this.injector = injector;
|
|
@@ -27,14 +35,6 @@ class RemoteMethodDirective {
|
|
|
27
35
|
this._remoteMethodOrIdOrToken = this.remoteMethodToken;
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
|
-
set remoteMethodOrIdOrToken(value) {
|
|
31
|
-
if (value) {
|
|
32
|
-
this._remoteMethodOrIdOrToken = value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
set hasConfirmDirective(value) {
|
|
36
|
-
this._hasConfirmDirective = coerceBoolean(value);
|
|
37
|
-
}
|
|
38
38
|
ngOnInit() {
|
|
39
39
|
if (this.immediately) {
|
|
40
40
|
this.execute();
|
|
@@ -93,9 +93,9 @@ class RemoteMethodDirective {
|
|
|
93
93
|
this.executing$.disable();
|
|
94
94
|
return result;
|
|
95
95
|
}
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
97
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: RemoteMethodDirective, selector: "[rxapRemoteMethod]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethod", "remoteMethodOrIdOrToken"], parameters: "parameters", metadata: "metadata", immediately: "immediately", hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, exportAs: ["rxapRemoteMethod"], ngImport: i0 }); }
|
|
96
98
|
}
|
|
97
|
-
RemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
98
|
-
RemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: RemoteMethodDirective, selector: "[rxapRemoteMethod]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethod", "remoteMethodOrIdOrToken"], parameters: "parameters", metadata: "metadata", immediately: "immediately", hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, exportAs: ["rxapRemoteMethod"], ngImport: i0 });
|
|
99
99
|
__decorate([
|
|
100
100
|
Required,
|
|
101
101
|
__metadata("design:type", Object)
|
|
@@ -106,7 +106,7 @@ __decorate([
|
|
|
106
106
|
__metadata("design:paramtypes", []),
|
|
107
107
|
__metadata("design:returntype", Promise)
|
|
108
108
|
], RemoteMethodDirective.prototype, "call", null);
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirective, decorators: [{
|
|
110
110
|
type: Directive,
|
|
111
111
|
args: [{
|
|
112
112
|
selector: '[rxapRemoteMethod]',
|
|
@@ -154,11 +154,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
154
154
|
args: ['click']
|
|
155
155
|
}], call: [] } });
|
|
156
156
|
class RemoteMethodDirectiveModule {
|
|
157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
158
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] }); }
|
|
159
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirectiveModule }); }
|
|
157
160
|
}
|
|
158
|
-
|
|
159
|
-
RemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] });
|
|
160
|
-
RemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodDirectiveModule });
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
|
|
162
162
|
type: NgModule,
|
|
163
163
|
args: [{
|
|
164
164
|
declarations: [RemoteMethodDirective],
|
|
@@ -195,6 +195,54 @@ class RecordViewTuple {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
class RemoteMethodTemplateCollectionDirective {
|
|
198
|
+
/**
|
|
199
|
+
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
200
|
+
*
|
|
201
|
+
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
202
|
+
* `NgForOf` structural directive renders its template with a specific context type.
|
|
203
|
+
*/
|
|
204
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
set remoteMethodOrIdOrToken(value) {
|
|
208
|
+
if (value) {
|
|
209
|
+
this._remoteMethodOrIdOrToken = value;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* A function that defines how to track changes for items in the iterable.
|
|
214
|
+
*
|
|
215
|
+
* When items are added, moved, or removed in the iterable,
|
|
216
|
+
* the directive must re-render the appropriate DOM nodes.
|
|
217
|
+
* To minimize churn in the DOM, only nodes that have changed
|
|
218
|
+
* are re-rendered.
|
|
219
|
+
*
|
|
220
|
+
* By default, the change detector assumes that
|
|
221
|
+
* the object instance identifies the node in the iterable.
|
|
222
|
+
* When this function is supplied, the directive uses
|
|
223
|
+
* the result of calling this function to identify the item node,
|
|
224
|
+
* rather than the identity of the object itself.
|
|
225
|
+
*
|
|
226
|
+
* The function receives two inputs,
|
|
227
|
+
* the iteration index and the node object ID.
|
|
228
|
+
*/
|
|
229
|
+
set trackBy(fn) {
|
|
230
|
+
if (isDevMode() && fn != null && typeof fn !== 'function') {
|
|
231
|
+
// TODO(vicb): use a log service once there is a public one available
|
|
232
|
+
if (console && console.warn) {
|
|
233
|
+
console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +
|
|
234
|
+
`See https://angular.io/api/common/NgForOf#change-propagation for more information.`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
this._trackByFn = fn;
|
|
238
|
+
}
|
|
239
|
+
get trackBy() {
|
|
240
|
+
return this._trackByFn;
|
|
241
|
+
}
|
|
242
|
+
set data(data) {
|
|
243
|
+
this._data = data;
|
|
244
|
+
this._dirty = true;
|
|
245
|
+
}
|
|
198
246
|
constructor(template, remoteMethodLoader, injector, viewContainerRef, cdr, differs, zone, remoteMethodToken) {
|
|
199
247
|
this.template = template;
|
|
200
248
|
this.remoteMethodLoader = remoteMethodLoader;
|
|
@@ -252,54 +300,6 @@ class RemoteMethodTemplateCollectionDirective {
|
|
|
252
300
|
this._remoteMethodOrIdOrToken = this.remoteMethodToken;
|
|
253
301
|
}
|
|
254
302
|
}
|
|
255
|
-
/**
|
|
256
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
257
|
-
*
|
|
258
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
259
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
260
|
-
*/
|
|
261
|
-
static ngTemplateContextGuard(dir, ctx) {
|
|
262
|
-
return true;
|
|
263
|
-
}
|
|
264
|
-
set remoteMethodOrIdOrToken(value) {
|
|
265
|
-
if (value) {
|
|
266
|
-
this._remoteMethodOrIdOrToken = value;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* A function that defines how to track changes for items in the iterable.
|
|
271
|
-
*
|
|
272
|
-
* When items are added, moved, or removed in the iterable,
|
|
273
|
-
* the directive must re-render the appropriate DOM nodes.
|
|
274
|
-
* To minimize churn in the DOM, only nodes that have changed
|
|
275
|
-
* are re-rendered.
|
|
276
|
-
*
|
|
277
|
-
* By default, the change detector assumes that
|
|
278
|
-
* the object instance identifies the node in the iterable.
|
|
279
|
-
* When this function is supplied, the directive uses
|
|
280
|
-
* the result of calling this function to identify the item node,
|
|
281
|
-
* rather than the identity of the object itself.
|
|
282
|
-
*
|
|
283
|
-
* The function receives two inputs,
|
|
284
|
-
* the iteration index and the node object ID.
|
|
285
|
-
*/
|
|
286
|
-
set trackBy(fn) {
|
|
287
|
-
if (isDevMode() && fn != null && typeof fn !== 'function') {
|
|
288
|
-
// TODO(vicb): use a log service once there is a public one available
|
|
289
|
-
if (console && console.warn) {
|
|
290
|
-
console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +
|
|
291
|
-
`See https://angular.io/api/common/NgForOf#change-propagation for more information.`);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
this._trackByFn = fn;
|
|
295
|
-
}
|
|
296
|
-
get trackBy() {
|
|
297
|
-
return this._trackByFn;
|
|
298
|
-
}
|
|
299
|
-
set data(data) {
|
|
300
|
-
this._data = data;
|
|
301
|
-
this._dirty = true;
|
|
302
|
-
}
|
|
303
303
|
ngOnChanges(changes) {
|
|
304
304
|
const parametersChanges = changes.parameters;
|
|
305
305
|
if (parametersChanges) {
|
|
@@ -418,14 +418,14 @@ class RemoteMethodTemplateCollectionDirective {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, deps: [{ token: TemplateRef }, { token: RemoteMethodLoader }, { token: INJECTOR }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: IterableDiffers }, { token: NgZone }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
422
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: RemoteMethodTemplateCollectionDirective, selector: "[rxapRemoteMethodCollection]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethodCollectionCall", "remoteMethodOrIdOrToken"], trackBy: ["rxapRemoteMethodCollectionTrackBy", "trackBy"], parameters: ["rxapRemoteMethodCollectionParameters", "parameters"], emptyTemplate: ["rxapRemoteMethodCollectionEmpty", "emptyTemplate"], errorTemplate: ["rxapRemoteMethodCollectionError", "errorTemplate"], withoutParameters: ["rxapRemoteMethodCollectionWithoutParameters", "withoutParameters"] }, exportAs: ["rxapRemoteMethodCollection"], usesOnChanges: true, ngImport: i0 }); }
|
|
421
423
|
}
|
|
422
|
-
RemoteMethodTemplateCollectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, deps: [{ token: TemplateRef }, { token: RemoteMethodLoader }, { token: INJECTOR }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: IterableDiffers }, { token: NgZone }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
423
|
-
RemoteMethodTemplateCollectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: RemoteMethodTemplateCollectionDirective, selector: "[rxapRemoteMethodCollection]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethodCollectionCall", "remoteMethodOrIdOrToken"], trackBy: ["rxapRemoteMethodCollectionTrackBy", "trackBy"], parameters: ["rxapRemoteMethodCollectionParameters", "parameters"], emptyTemplate: ["rxapRemoteMethodCollectionEmpty", "emptyTemplate"], errorTemplate: ["rxapRemoteMethodCollectionError", "errorTemplate"], withoutParameters: ["rxapRemoteMethodCollectionWithoutParameters", "withoutParameters"] }, exportAs: ["rxapRemoteMethodCollection"], usesOnChanges: true, ngImport: i0 });
|
|
424
424
|
__decorate([
|
|
425
425
|
Required,
|
|
426
426
|
__metadata("design:type", Object)
|
|
427
427
|
], RemoteMethodTemplateCollectionDirective.prototype, "_remoteMethodOrIdOrToken", void 0);
|
|
428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
|
|
429
429
|
type: Directive,
|
|
430
430
|
args: [{
|
|
431
431
|
selector: '[rxapRemoteMethodCollection]',
|
|
@@ -479,11 +479,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
479
479
|
args: ['rxapRemoteMethodCollectionWithoutParameters']
|
|
480
480
|
}], _remoteMethodOrIdOrToken: [] } });
|
|
481
481
|
class RemoteMethodTemplateCollectionDirectiveModule {
|
|
482
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
483
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] }); }
|
|
484
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule }); }
|
|
482
485
|
}
|
|
483
|
-
|
|
484
|
-
RemoteMethodTemplateCollectionDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] });
|
|
485
|
-
RemoteMethodTemplateCollectionDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule });
|
|
486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
|
|
487
487
|
type: NgModule,
|
|
488
488
|
args: [{
|
|
489
489
|
declarations: [RemoteMethodTemplateCollectionDirective],
|
|
@@ -492,6 +492,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
492
492
|
}] });
|
|
493
493
|
|
|
494
494
|
class RemoteMethodTemplateDirective {
|
|
495
|
+
// TODO : remove template context Guard
|
|
496
|
+
// the template context Guard must be defined with a concrete context type
|
|
497
|
+
// else the context guard is resolved to any
|
|
498
|
+
// For each child directive that should have a template context guard
|
|
499
|
+
// the template context guard must be defined
|
|
500
|
+
// !! add generation of concrete template context guard to openapi schematics !!
|
|
501
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
set remoteMethodOrIdOrToken(value) {
|
|
505
|
+
if (value) {
|
|
506
|
+
this._remoteMethodOrIdOrToken = value;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
495
509
|
constructor(template, remoteMethodLoader, injector, viewContainerRef, cdr, remoteMethodToken) {
|
|
496
510
|
this.template = template;
|
|
497
511
|
this.remoteMethodLoader = remoteMethodLoader;
|
|
@@ -512,20 +526,6 @@ class RemoteMethodTemplateDirective {
|
|
|
512
526
|
this._remoteMethodOrIdOrToken = this.remoteMethodToken;
|
|
513
527
|
}
|
|
514
528
|
}
|
|
515
|
-
// TODO : remove template context Guard
|
|
516
|
-
// the template context Guard must be defined with a concrete context type
|
|
517
|
-
// else the context guard is resolved to any
|
|
518
|
-
// For each child directive that should have a template context guard
|
|
519
|
-
// the template context guard must be defined
|
|
520
|
-
// !! add generation of concrete template context guard to openapi schematics !!
|
|
521
|
-
static ngTemplateContextGuard(dir, ctx) {
|
|
522
|
-
return true;
|
|
523
|
-
}
|
|
524
|
-
set remoteMethodOrIdOrToken(value) {
|
|
525
|
-
if (value) {
|
|
526
|
-
this._remoteMethodOrIdOrToken = value;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
529
|
ngOnChanges(changes) {
|
|
530
530
|
const parametersChanges = changes.parameters;
|
|
531
531
|
if (parametersChanges) {
|
|
@@ -600,9 +600,9 @@ class RemoteMethodTemplateDirective {
|
|
|
600
600
|
this.embedded.emit();
|
|
601
601
|
this.cdr.detectChanges();
|
|
602
602
|
}
|
|
603
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirective, deps: [{ token: TemplateRef }, { token: RemoteMethodLoader }, { token: INJECTOR }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
604
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: RemoteMethodTemplateDirective, selector: "[rxapRemoteMethod]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethodCall", "remoteMethodOrIdOrToken"], metadata: ["rxapRemoteMethodMetadata", "metadata"], parameters: ["rxapRemoteMethodParameters", "parameters"], errorTemplate: ["rxapRemoteMethodError", "errorTemplate"], loadingTemplate: ["rxapRemoteMethodLoading", "loadingTemplate"], withoutParameters: ["rxapRemoteMethodWithoutParameters", "withoutParameters"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful", embedded: "embedded" }, exportAs: ["rxapRemoteMethod"], usesOnChanges: true, ngImport: i0 }); }
|
|
603
605
|
}
|
|
604
|
-
RemoteMethodTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateDirective, deps: [{ token: TemplateRef }, { token: RemoteMethodLoader }, { token: INJECTOR }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
605
|
-
RemoteMethodTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: RemoteMethodTemplateDirective, selector: "[rxapRemoteMethod]", inputs: { remoteMethodOrIdOrToken: ["rxapRemoteMethodCall", "remoteMethodOrIdOrToken"], metadata: ["rxapRemoteMethodMetadata", "metadata"], parameters: ["rxapRemoteMethodParameters", "parameters"], errorTemplate: ["rxapRemoteMethodError", "errorTemplate"], loadingTemplate: ["rxapRemoteMethodLoading", "loadingTemplate"], withoutParameters: ["rxapRemoteMethodWithoutParameters", "withoutParameters"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful", embedded: "embedded" }, exportAs: ["rxapRemoteMethod"], usesOnChanges: true, ngImport: i0 });
|
|
606
606
|
__decorate([
|
|
607
607
|
Required,
|
|
608
608
|
__metadata("design:type", Object)
|
|
@@ -613,7 +613,7 @@ __decorate([
|
|
|
613
613
|
__metadata("design:paramtypes", [Object]),
|
|
614
614
|
__metadata("design:returntype", void 0)
|
|
615
615
|
], RemoteMethodTemplateDirective.prototype, "call", null);
|
|
616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
|
|
617
617
|
type: Directive,
|
|
618
618
|
args: [{
|
|
619
619
|
selector: '[rxapRemoteMethod]',
|
|
@@ -672,11 +672,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
672
672
|
type: Output
|
|
673
673
|
}], call: [] } });
|
|
674
674
|
class RemoteMethodTemplateDirectiveModule {
|
|
675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
676
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] }); }
|
|
677
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule }); }
|
|
675
678
|
}
|
|
676
|
-
|
|
677
|
-
RemoteMethodTemplateDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] });
|
|
678
|
-
RemoteMethodTemplateDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule });
|
|
679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
|
|
679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
|
|
680
680
|
type: NgModule,
|
|
681
681
|
args: [{
|
|
682
682
|
declarations: [RemoteMethodTemplateDirective],
|
|
@@ -696,4 +696,3 @@ class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
|
|
|
696
696
|
|
|
697
697
|
export { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, RemoteMethodDirective, RemoteMethodDirectiveModule, RemoteMethodTemplateCollectionDirective, RemoteMethodTemplateCollectionDirectiveContext, RemoteMethodTemplateCollectionDirectiveModule, RemoteMethodTemplateDirective, RemoteMethodTemplateDirectiveModule, RxapRemoteMethodDirectiveError };
|
|
698
698
|
//# sourceMappingURL=rxap-remote-method-directive.mjs.map
|
|
699
|
-
//# sourceMappingURL=rxap-remote-method-directive.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../libs/remote-method/directive/src/lib/tokens.ts","../../../../libs/remote-method/directive/src/lib/remote-method.directive.ts","../../../../libs/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../libs/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../libs/remote-method/directive/src/lib/error.ts","../../../../libs/remote-method/directive/src/rxap-remote-method-directive.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');\n","import {\n Input,\n NgModule,\n Output,\n EventEmitter,\n Directive,\n OnInit,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n isDevMode,\n Optional,\n Self\n} from '@angular/core';\nimport {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport {\n Required,\n coerceBoolean,\n Deprecated\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/utilities/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod'\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n\n @Input('rxapRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n @Input()\n public parameters?: Parameters;\n\n @Input()\n public metadata?: Metadata;\n\n @Output('executed')\n public executed$ = new EventEmitter();\n\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n\n @Input()\n public immediately: boolean = false;\n\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n private _hasConfirmDirective = false;\n\n constructor(\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector = Injector.NULL,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnInit(): void {\n if (this.immediately) {\n this.execute();\n }\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n this.execute();\n }\n\n @HostListener('click')\n public onClick() {\n if (!this._hasConfirmDirective) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public async execute(): Promise<void> {\n this.executing$.enable();\n try {\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);\n this.executed(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n protected async call(): Promise<any> {\n this.executing$.enable();\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);\n this.executing$.disable();\n return result;\n }\n\n}\n\n@NgModule({\n declarations: [ RemoteMethodDirective ],\n exports: [ RemoteMethodDirective ]\n})\nexport class RemoteMethodDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n Inject,\n Input,\n Injector,\n INJECTOR,\n ViewContainerRef,\n ChangeDetectorRef,\n NgModule,\n SimpleChanges,\n OnChanges,\n EmbeddedViewRef,\n TrackByFunction,\n isDevMode,\n IterableDiffer,\n IterableDiffers,\n IterableChanges,\n IterableChangeRecord,\n DoCheck,\n OnInit,\n NgZone,\n Optional,\n Self\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader\n} from '@rxap/remote-method';\nimport { Required } from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n first,\n tap,\n take\n} from 'rxjs/operators';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\n\nexport class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {\n constructor(\n public $implicit: ReturnType,\n public index: number,\n public count: number,\n ) {}\n\n get first(): boolean {\n return this.index === 0;\n }\n\n get last(): boolean {\n return this.index === this.count - 1;\n }\n\n get even(): boolean {\n return this.index % 2 === 0;\n }\n\n get odd(): boolean {\n return !this.even;\n }\n}\n\nexport interface RemoteMethodTemplateCollectionDirectiveErrorContext {\n $implicit: Error;\n message?: string;\n name?: string;\n}\n\nfunction getTypeName(type: any): string {\n return type['name'] || typeof type;\n}\n\nclass RecordViewTuple<T> {\n constructor(public record: any, public view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<T>>) {}\n}\n\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection'\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, DoCheck, OnInit {\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateCollectionDirectiveContext<T> {\n return true;\n }\n\n @Input('rxapRemoteMethodCollectionCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n /**\n * A function that defines how to track changes for items in the iterable.\n *\n * When items are added, moved, or removed in the iterable,\n * the directive must re-render the appropriate DOM nodes.\n * To minimize churn in the DOM, only nodes that have changed\n * are re-rendered.\n *\n * By default, the change detector assumes that\n * the object instance identifies the node in the iterable.\n * When this function is supplied, the directive uses\n * the result of calling this function to identify the item node,\n * rather than the identity of the object itself.\n *\n * The function receives two inputs,\n * the iteration index and the node object ID.\n */\n @Input('rxapRemoteMethodCollectionTrackBy')\n set trackBy(fn: TrackByFunction<ReturnType>) {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (<any>console && <any>console.warn) {\n console.warn(\n `trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n }\n this._trackByFn = fn;\n }\n\n get trackBy(): TrackByFunction<ReturnType> {\n return this._trackByFn;\n }\n\n @Input('rxapRemoteMethodCollectionParameters')\n public parameters?: Parameters;\n\n @Input('rxapRemoteMethodCollectionEmpty')\n public emptyTemplate?: TemplateRef<void>;\n\n @Input('rxapRemoteMethodCollectionError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;\n\n @Input('rxapRemoteMethodCollectionWithoutParameters')\n public withoutParameters: boolean = false;\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\n\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _trackByFn!: TrackByFunction<ReturnType>;\n\n /**\n * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n private _dirty = true;\n\n /**\n * Indicates that the remote method returned a empty collection\n *\n * true - is empty\n * false - is NOT empty\n * null - unknown\n *\n * @private\n */\n private _empty: boolean | null = null;\n\n /**\n * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\n\n /**\n * Holds the empty template view ref.\n *\n * Is used to determine if a empty template is added to the\n * view. And used to destruct the empty template if the remote method\n * changes from empty to not empty.\n *\n * @private\n */\n private _emptyTemplateViewRef: EmbeddedViewRef<void> | null = null;\n\n /**\n * Holds the error template view ref.\n *\n * Is used to determine if a error template is added to the\n * view. And used to destruct the error template if the remote method\n * is called again with an error.\n *\n * @private\n */\n private _errorTemplateViewRef: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveErrorContext> | null = null;\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Inject(IterableDiffers)\n private readonly differs: IterableDiffers,\n @Inject(NgZone)\n private readonly zone: NgZone,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes.parameters;\n if (parametersChanges) {\n this.call(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n if (this.withoutParameters) {\n this.call();\n }\n }\n\n public call(parameters?: Parameters): void {\n this.zone.onStable.pipe(\n take(1),\n tap(() => {\n this.zone.run(() => {\n this.remoteMethodLoader\n .call$(this._remoteMethodOrIdOrToken, parameters, undefined, this.injector)\n .then(response => {\n this._empty = response.length === 0;\n this._data = response;\n this.cdr.detectChanges();\n })\n .catch(error => {\n this._error = error;\n this.cdr.detectChanges();\n });\n });\n })\n ).subscribe();\n }\n\n protected applyChanges(changes: IterableChanges<ReturnType>) {\n\n const insertTuples: RecordViewTuple<ReturnType>[] = [];\n changes.forEachOperation(\n (item: IterableChangeRecord<any>, adjustedPreviousIndex: number | null, currentIndex: number | null) => {\n\n if (item.previousIndex == null) {\n\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n const view = this.viewContainerRef.createEmbeddedView(\n this.template,\n new RemoteMethodTemplateCollectionDirectiveContext<ReturnType>(null!, -1, -1),\n currentIndex === null ? undefined : currentIndex\n );\n const tuple = new RecordViewTuple<ReturnType>(item, view);\n insertTuples.push(tuple);\n\n } else if (currentIndex == null) {\n\n this.viewContainerRef.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n\n } else if (adjustedPreviousIndex !== null) {\n\n const view = this.viewContainerRef.get(adjustedPreviousIndex)!;\n this.viewContainerRef.move(view, currentIndex);\n const tuple = new RecordViewTuple(item, <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view);\n insertTuples.push(tuple);\n\n }\n\n });\n\n for (let i = 0; i < insertTuples.length; i++) {\n this.perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n\n for (let i = 0, ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n }\n\n changes.forEachIdentityChange((record: any) => {\n const viewRef =\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n\n }\n\n private perViewChange(\n view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>, record: IterableChangeRecord<any>) {\n view.context.$implicit = record.item;\n }\n\n /**\n * Applies the changes when needed.\n */\n public ngDoCheck(): void {\n if (this._error !== null) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n if (this.errorTemplate) {\n this._errorTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.errorTemplate, { $implicit: this._error, message: this._error.message, name: this._error.name });\n }\n\n } else if (this._empty === true) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n // attaches the empty template if the data source is empty\n if (this.emptyTemplate) {\n this._emptyTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.emptyTemplate);\n }\n\n } else if (this._empty === false) {\n\n // detach and destroy the empty template if the data source is not\n // empty any more\n if (this._emptyTemplateViewRef) {\n this._emptyTemplateViewRef.detach();\n this._emptyTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._errorTemplateViewRef) {\n this._errorTemplateViewRef.detach();\n this._errorTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._data) {\n this._dirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._data;\n if (!this._differ && value) {\n try {\n this._differ = this.differs.find(value).create(this.trackBy);\n } catch {\n throw new Error(`Cannot find a differ supporting object '${value}' of type '${\n getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._data);\n if (changes) {\n this.applyChanges(changes);\n }\n }\n }\n }\n\n}\n\n@NgModule({\n declarations: [RemoteMethodTemplateCollectionDirective],\n exports: [RemoteMethodTemplateCollectionDirective]\n})\nexport class RemoteMethodTemplateCollectionDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n Inject,\n Input,\n Injector,\n INJECTOR,\n ViewContainerRef,\n ChangeDetectorRef,\n NgModule,\n OnChanges,\n SimpleChanges,\n OnInit,\n EventEmitter,\n Output,\n isDevMode,\n Optional,\n Self\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader\n} from '@rxap/remote-method';\nimport {\n Required,\n Deprecated\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/utilities/rxjs';\n\nexport interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {\n $implicit: ReturnType;\n}\n\nexport interface RemoteMethodTemplateDirectiveErrorContext {\n $implicit: Error;\n message: string;\n}\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod'\n})\nexport class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, OnInit {\n\n // TODO : remove template context Guard\n // the template context Guard must be defined with a concrete context type\n // else the context guard is resolved to any\n // For each child directive that should have a template context guard\n // the template context guard must be defined\n // !! add generation of concrete template context guard to openapi schematics !!\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateDirectiveContext<T> {\n return true;\n }\n\n @Input('rxapRemoteMethodCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n @Output('executed')\n public executed$ = new EventEmitter();\n\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n\n @Input('rxapRemoteMethodMetadata')\n public metadata?: Metadata;\n\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n @Input('rxapRemoteMethodParameters')\n public parameters?: Parameters;\n\n @Input('rxapRemoteMethodError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;\n\n @Input('rxapRemoteMethodLoading')\n public loadingTemplate?: TemplateRef<void>;\n\n @Input('rxapRemoteMethodWithoutParameters')\n public withoutParameters: boolean = false;\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n @Output()\n public embedded = new EventEmitter();\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes.parameters;\n if (parametersChanges) {\n this.execute(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n this.renderLoadingTemplate();\n if (this.withoutParameters) {\n this.execute();\n }\n }\n\n public async execute(parameters: Parameters | undefined = this.parameters): Promise<void> {\n this.executing$.enable();\n this.renderLoadingTemplate();\n try {\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, parameters, this.metadata, this.injector);\n this.executed(result);\n this.renderTemplate(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n public call(parameters?: Parameters): void {\n this.execute(parameters)\n .catch(error => console.error('Remote method template rendering failed: ' + error.message));\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [ parameterKey ]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n private renderLoadingTemplate() {\n if (this.loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.loadingTemplate);\n }\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n protected renderTemplate(result: ReturnType) {\n\n this.viewContainerRef.clear();\n\n try {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });\n } catch (error: any) {\n if (this.errorTemplate) {\n this.viewContainerRef.createEmbeddedView(this.errorTemplate, { $implicit: error, message: error.message });\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n}\n\n@NgModule({\n declarations: [RemoteMethodTemplateDirective],\n exports: [RemoteMethodTemplateDirective]\n})\nexport class RemoteMethodTemplateDirectiveModule {}\n","import { RxapRemoteMethodError } from '@rxap/remote-method';\n\nexport class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {\n\n constructor(message: string, code?: string, scope?: string) {\n super(message, code ?? '', scope);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAEa,kCAAkC,GAAG,IAAI,cAAc,CAAC,oCAAoC;;AC2BzG,MAIa,qBAAqB,CAAA;IAGhC,IACW,uBAAuB,CAAC,KAA8E,EAAA;AAC/G,QAAA,IAAI,KAAK,EAAE;AACT,YAAA,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC;AACvC,SAAA;KACF;IAoBD,IACW,mBAAmB,CAAC,KAAU,EAAA;AACvC,QAAA,IAAI,CAAC,oBAAoB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;KAClD;AAYD,IAAA,WAAA,CAEqB,kBAAsC,EAExC,QAAA,GAAqB,QAAQ,CAAC,IAAI,EAIlC,iBAAuB,EAAA;QANrB,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;QAExC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;QAIlC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAM;AAlCnC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;AAG/B,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAS,CAAC;AAGrC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAc,CAAC;QAG7C,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAOpC;;AAEG;AACI,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;QAKhC,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC;QAYnC,IAAI,IAAI,CAAC,iBAA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,EAAA,CAAA,CAAA,EAAA;;2FAAnC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAJ/C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,6BAA6B,CAAC;oBAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;AACzC,iBAAA,CAAA;;;ACrNK,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;KACnC;AAEF;;ACRD;;AAEG;;;;"}
|
|
@@ -39,10 +39,10 @@ class HttpRemoteMethodDirective extends RemoteMethodDirective {
|
|
|
39
39
|
this._remoteMethodOrIdOrToken = value;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: HttpRemoteMethodDirective, selector: "button[rxapHttpRemoteMethod]", inputs: { headers: "headers", reportProgress: "reportProgress", params: "params", responseType: "responseType", withCredentials: "withCredentials", body: "body", setHeaders: "setHeaders", setParams: "setParams", pathParams: "pathParams", remoteMethodOrIdOrToken: ["rxapHttpRemoteMethod", "remoteMethodOrIdOrToken"] }, usesInheritance: true, ngImport: i0 }); }
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
HttpRemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: HttpRemoteMethodDirective, selector: "button[rxapHttpRemoteMethod]", inputs: { headers: "headers", reportProgress: "reportProgress", params: "params", responseType: "responseType", withCredentials: "withCredentials", body: "body", setHeaders: "setHeaders", setParams: "setParams", pathParams: "pathParams", remoteMethodOrIdOrToken: ["rxapHttpRemoteMethod", "remoteMethodOrIdOrToken"] }, usesInheritance: true, ngImport: i0 });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
|
|
46
46
|
type: Directive,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: 'button[rxapHttpRemoteMethod]'
|
|
@@ -70,11 +70,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
70
70
|
args: ['rxapHttpRemoteMethod']
|
|
71
71
|
}] } });
|
|
72
72
|
class HttpRemoteMethodDirectiveModule {
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
74
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, declarations: [HttpRemoteMethodDirective], exports: [HttpRemoteMethodDirective] }); }
|
|
75
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule }); }
|
|
73
76
|
}
|
|
74
|
-
|
|
75
|
-
HttpRemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule, declarations: [HttpRemoteMethodDirective], exports: [HttpRemoteMethodDirective] });
|
|
76
|
-
HttpRemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule });
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule, decorators: [{
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, decorators: [{
|
|
78
78
|
type: NgModule,
|
|
79
79
|
args: [{
|
|
80
80
|
declarations: [HttpRemoteMethodDirective],
|
|
@@ -100,9 +100,9 @@ class ContenteditableDirective {
|
|
|
100
100
|
}
|
|
101
101
|
return Promise.resolve();
|
|
102
102
|
}
|
|
103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirective, deps: [{ token: HttpRemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: ContenteditableDirective, selector: "[rxapContenteditable]", inputs: { remoteMethodId: ["rxapContenteditable", "remoteMethodId"], property: "property", uuid: "uuid" }, host: { listeners: { "click": "onClick($event)", "input": "onInput($event)" }, properties: { "attr.contenteditable": "this.contenteditable" } }, ngImport: i0 }); }
|
|
103
105
|
}
|
|
104
|
-
ContenteditableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: ContenteditableDirective, deps: [{ token: HttpRemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Directive });
|
|
105
|
-
ContenteditableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: ContenteditableDirective, selector: "[rxapContenteditable]", inputs: { remoteMethodId: ["rxapContenteditable", "remoteMethodId"], property: "property", uuid: "uuid" }, host: { listeners: { "click": "onClick($event)", "input": "onInput($event)" }, properties: { "attr.contenteditable": "this.contenteditable" } }, ngImport: i0 });
|
|
106
106
|
__decorate([
|
|
107
107
|
Required,
|
|
108
108
|
__metadata("design:type", String)
|
|
@@ -121,7 +121,7 @@ __decorate([
|
|
|
121
121
|
__metadata("design:paramtypes", [Object]),
|
|
122
122
|
__metadata("design:returntype", void 0)
|
|
123
123
|
], ContenteditableDirective.prototype, "onInput", null);
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirective, decorators: [{
|
|
125
125
|
type: Directive,
|
|
126
126
|
args: [{
|
|
127
127
|
selector: '[rxapContenteditable]',
|
|
@@ -150,11 +150,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
150
150
|
* @deprecated removed
|
|
151
151
|
*/
|
|
152
152
|
class ContenteditableDirectiveModule {
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
154
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] }); }
|
|
155
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirectiveModule }); }
|
|
153
156
|
}
|
|
154
|
-
|
|
155
|
-
ContenteditableDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] });
|
|
156
|
-
ContenteditableDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: ContenteditableDirectiveModule });
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
|
|
158
158
|
type: NgModule,
|
|
159
159
|
args: [{
|
|
160
160
|
declarations: [ContenteditableDirective],
|
|
@@ -168,4 +168,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
168
168
|
|
|
169
169
|
export { ContenteditableDirective, ContenteditableDirectiveModule, HttpRemoteMethodDirective, HttpRemoteMethodDirectiveModule };
|
|
170
170
|
//# sourceMappingURL=rxap-remote-method-http-directive.mjs.map
|
|
171
|
-
//# sourceMappingURL=rxap-remote-method-http-directive.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-http-directive.mjs","sources":["../../../../libs/remote-method/http/directive/src/lib/http-remote-method.directive.ts","../../../../libs/remote-method/http/directive/src/lib/contenteditable.directive.ts","../../../../libs/remote-method/http/directive/src/rxap-remote-method-http-directive.ts"],"sourcesContent":["import {\n Directive,\n Input,\n NgModule\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\nimport { RemoteMethodDirective } from '@rxap/remote-method/directive';\nimport {\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from '@rxap/remote-method/http';\nimport { BaseRemoteMethod } from '@rxap/remote-method';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Directive({\n selector: 'button[rxapHttpRemoteMethod]'\n})\nexport class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {\n\n @Input()\n public set headers(headers: HttpRemoteMethodParameter['headers']) {\n this.updateParameters({ headers });\n }\n\n @Input()\n public set reportProgress(reportProgress: HttpRemoteMethodParameter['reportProgress']) {\n this.updateParameters({ reportProgress });\n }\n\n @Input()\n public set params(params: HttpRemoteMethodParameter['params']) {\n this.updateParameters({ params });\n }\n\n @Input()\n public set responseType(responseType: HttpRemoteMethodParameter['responseType']) {\n this.updateParameters({ responseType });\n }\n\n @Input()\n public set withCredentials(withCredentials: HttpRemoteMethodParameter['withCredentials']) {\n this.updateParameters({ withCredentials });\n }\n\n @Input()\n public set body(body: HttpRemoteMethodParameter['body']) {\n this.updateParameters({ body });\n }\n\n @Input()\n public set setHeaders(setHeaders: HttpRemoteMethodParameter['setHeaders']) {\n this.updateParameters({ setHeaders });\n }\n\n @Input()\n public set setParams(setParams: HttpRemoteMethodParameter['setParams']) {\n this.updateParameters({ setParams });\n }\n\n @Input()\n public set pathParams(pathParams: HttpRemoteMethodParameter['pathParams']) {\n this.updateParameters({ pathParams });\n }\n\n @Input('rxapHttpRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n}\n\n@NgModule({\n declarations: [ HttpRemoteMethodDirective ],\n exports: [ HttpRemoteMethodDirective ]\n})\nexport class HttpRemoteMethodDirectiveModule {}\n","import {\n Directive,\n Input,\n HostListener,\n NgModule,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport { Required, DebounceCall } from '@rxap/utilities';\nimport { HttpRemoteMethodLoader } from '@rxap/remote-method/http';\n\n@Directive({\n selector: '[rxapContenteditable]',\n})\nexport class ContenteditableDirective {\n @HostBinding('attr.contenteditable')\n public contenteditable = true;\n\n @Input('rxapContenteditable')\n @Required\n public remoteMethodId!: string;\n\n @Input()\n @Required\n public property!: string;\n\n @Input()\n @Required\n public uuid!: string;\n\n constructor(\n @Inject(HttpRemoteMethodLoader)\n private readonly httpRemoteMethodLoader: HttpRemoteMethodLoader\n ) {}\n\n @HostListener('click', ['$event'])\n public onClick($event: Event) {\n $event.stopPropagation();\n }\n\n @HostListener('input', ['$event'])\n @DebounceCall(1000)\n public onInput($event: any) {\n const value = ($event.target as HTMLElement).textContent;\n if (value && value.length > 3) {\n return this.httpRemoteMethodLoader.request$(this.remoteMethodId, {\n pathParams: { uuid: this.uuid },\n body: { [this.property]: value },\n });\n }\n return Promise.resolve();\n }\n}\n\n/**\n * @deprecated removed\n */\n@NgModule({\n declarations: [ContenteditableDirective],\n exports: [ContenteditableDirective],\n})\nexport class ContenteditableDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAcA,MAGa,yBAAkH,SAAQ,qBAAsE,CAAA;IAE3M,IACW,OAAO,CAAC,OAA6C,EAAA;AAC9D,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACpC;IAED,IACW,cAAc,CAAC,cAA2D,EAAA;AACnF,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;KAC3C;IAED,IACW,MAAM,CAAC,MAA2C,EAAA;AAC3D,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACnC;IAED,IACW,YAAY,CAAC,YAAuD,EAAA;AAC7E,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KACzC;IAED,IACW,eAAe,CAAC,eAA6D,EAAA;AACtF,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC;KAC5C;IAED,IACW,IAAI,CAAC,IAAuC,EAAA;AACrD,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;KACjC;IAED,IACW,UAAU,CAAC,UAAmD,EAAA;AACvE,QAAA,IAAI,CAAC,gBAAg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
}
|
|
66
66
|
return url;
|
|
67
67
|
}
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
69
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseHttpRemoteMethod }); }
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BaseHttpRemoteMethod });
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
|
|
72
72
|
type: Injectable
|
|
73
73
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
74
74
|
type: Inject,
|
|
@@ -116,10 +116,10 @@ class HttpRemoteMethod extends BaseHttpRemoteMethod {
|
|
|
116
116
|
transformer(response) {
|
|
117
117
|
return response;
|
|
118
118
|
}
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
120
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethod }); }
|
|
119
121
|
}
|
|
120
|
-
|
|
121
|
-
HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethod });
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethod, decorators: [{
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethod, decorators: [{
|
|
123
123
|
type: Injectable
|
|
124
124
|
}] });
|
|
125
125
|
|
|
@@ -137,10 +137,10 @@ class HttpRemoteMethodLoader {
|
|
|
137
137
|
}
|
|
138
138
|
return remoteMethod.call(parameters);
|
|
139
139
|
}
|
|
140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodLoader, deps: [{ token: RemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
141
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' }); }
|
|
140
142
|
}
|
|
141
|
-
|
|
142
|
-
HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' });
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
|
|
144
144
|
type: Injectable,
|
|
145
145
|
args: [{ providedIn: 'root' }]
|
|
146
146
|
}], ctorParameters: function () { return [{ type: i1$1.RemoteMethodLoader, decorators: [{
|
|
@@ -154,4 +154,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
154
154
|
|
|
155
155
|
export { BaseHttpRemoteMethod, HttpRemoteMethod, HttpRemoteMethodLoader };
|
|
156
156
|
//# sourceMappingURL=rxap-remote-method-http.mjs.map
|
|
157
|
-
//# sourceMappingURL=rxap-remote-method-http.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../libs/remote-method/http/src/lib/base-http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../libs/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Injectable,\n Optional,\n Inject,\n Injector\n} from '@angular/core';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n public timeout = 60 * 1000;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);\n }\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n public init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials\n }\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters.hasOwnProperty('pathParams')) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n ...parameters,\n url\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);\n }\n\n const matches = url.match(/\\{[^\\}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (!pathParams.hasOwnProperty(param)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);\n }\n url = url.replace(match, encodeURIComponent(pathParams[ param ]));\n }\n }\n }\n\n return url;\n }\n\n}\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpSentEvent,\n HttpHeaderResponse,\n HttpResponse,\n HttpProgressEvent,\n HttpEventType\n} from '@angular/common/http';\nimport {\n tap,\n filter,\n map,\n timeout,\n retry\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from './base-http.remote-method';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ).toPromise();\n }\n\n public onSentEvent(event: HttpSentEvent): void {}\n\n public onHeaderResponse(event: HttpHeaderResponse): void {}\n\n public onResponse(event: HttpResponse<ReturnType>): void {}\n\n public onProgressEvent(event: HttpProgressEvent): void {}\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n}\n","import {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n RxapRemoteMethodError,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Injectable,\n Inject,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {}\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectFlags\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAgDA,MACsB,oBAIpB,SAAQ,gBAAiD,CAAA;AAMzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAJU,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAH/C,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;AAQzB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QACrD,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,qBAAqB,CAAC,oFAAoF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClJ,SAAA;AACD,QAAA,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,qBAAqB,CAAC,+EAA+E,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7I,SAAA;KACF;IAES,aAAa,GAAA;QACrB,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,UAAU,EAAE;AAC3C,YAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;AAC5B,SAAA;AACD,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;KAC1B;IAEM,IAAI,GAAA;QACT,KAAK,CAAC,IAAI,EAAE,CAAC;AACb,QAAA,IAAI,CAAC,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EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAL3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;0BAMnB,MAAM;2BAAC,kBAAkB,CAAA;;;ACrBxC;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../libs/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../libs/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n RemoteMethodLoader,\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from '@rxap/remote-method';\nimport {\n Provider,\n Type,\n InjectionToken,\n AbstractType\n} from '@angular/core';\n\nexport type MockRemoteMethod = (parameters?: any, metadata?: any) => any;\n\nexport class RemoteMethodTestingLoader extends RemoteMethodLoader {\n\n private mockedRemoteMethods = new Map<string, MockRemoteMethod>();\n\n public mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void {\n let resultFunction: MockRemoteMethod;\n if (typeof resultOrFunction !== 'function') {\n resultFunction = () => resultOrFunction;\n } else {\n resultFunction = resultOrFunction;\n }\n this.mockedRemoteMethods.set(remoteMethodId, resultFunction);\n }\n\n public clearMocks(): void {\n this.mockedRemoteMethods.clear();\n }\n\n public deleteMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.delete(remoteMethodId);\n }\n\n public hasMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.has(remoteMethodId);\n }\n\n public getMock(remoteMethodId: string): MockRemoteMethod {\n if (!this.hasMock(remoteMethodId)) {\n throw new Error(`A remote method mock with the id '${remoteMethodId}' is not registered`);\n }\n return this.mockedRemoteMethods.get(remoteMethodId)!;\n }\n\n public async call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters?: Parameters,\n metadata?: Metadata\n ): Promise<ReturnType> {\n\n if (typeof remoteMethodOrIdOrToken === 'string') {\n\n if (this.hasMock(remoteMethodOrIdOrToken)) {\n const resultFunction = this.getMock(remoteMethodOrIdOrToken)!;\n return await resultFunction(parameters, metadata);\n }\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n\n }\n\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n }\n\n}\n\nexport const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider = {\n provide: RemoteMethodLoader,\n useClass: RemoteMethodTestingLoader\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;AAcM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAAjE,IAAA,WAAA,GAAA;;AAEU,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA4B,CAAC;KAkDnE;IAhDQ,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC,CAAC;AACrC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG,MAAM,gBAAgB,CAAC;AACzC,SAAA;AAAM,aAAA;YACL,cAAc,GAAG,gBAAgB,CAAC;AACnC,SAAA;QACD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,EAAE,cAA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