@rxap/remote-method 13.0.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/directive/{rxap-remote-method-directive.d.ts → index.d.ts} +0 -0
  2. package/directive/lib/remote-method-template-collection.directive.d.ts +1 -1
  3. package/directive/lib/remote-method-template.directive.d.ts +1 -1
  4. package/directive/lib/remote-method.directive.d.ts +1 -1
  5. package/esm2020/directive/lib/remote-method-template-collection.directive.mjs +8 -8
  6. package/esm2020/directive/lib/remote-method-template.directive.mjs +8 -8
  7. package/esm2020/directive/lib/remote-method.directive.mjs +8 -8
  8. package/esm2020/http/directive/lib/contenteditable.directive.mjs +8 -8
  9. package/esm2020/http/directive/lib/http-remote-method.directive.mjs +7 -7
  10. package/esm2020/http/lib/base-http.remote-method.mjs +3 -3
  11. package/esm2020/http/lib/http-remote-method.loader.mjs +3 -3
  12. package/esm2020/http/lib/http.remote-method.mjs +3 -3
  13. package/esm2020/lib/base.remote-method.mjs +3 -3
  14. package/esm2020/lib/proxy.remote-method.mjs +3 -3
  15. package/esm2020/lib/remote-method-loader.mjs +3 -3
  16. package/fesm2015/rxap-remote-method-directive.mjs +22 -22
  17. package/fesm2015/rxap-remote-method-directive.mjs.map +1 -1
  18. package/fesm2015/rxap-remote-method-http-directive.mjs +14 -14
  19. package/fesm2015/rxap-remote-method-http-directive.mjs.map +1 -1
  20. package/fesm2015/rxap-remote-method-http.mjs +9 -9
  21. package/fesm2015/rxap-remote-method-http.mjs.map +1 -1
  22. package/fesm2015/rxap-remote-method-testing.mjs.map +1 -1
  23. package/fesm2015/rxap-remote-method.mjs +9 -9
  24. package/fesm2015/rxap-remote-method.mjs.map +1 -1
  25. package/fesm2020/rxap-remote-method-directive.mjs +22 -22
  26. package/fesm2020/rxap-remote-method-directive.mjs.map +1 -1
  27. package/fesm2020/rxap-remote-method-http-directive.mjs +14 -14
  28. package/fesm2020/rxap-remote-method-http-directive.mjs.map +1 -1
  29. package/fesm2020/rxap-remote-method-http.mjs +9 -9
  30. package/fesm2020/rxap-remote-method-http.mjs.map +1 -1
  31. package/fesm2020/rxap-remote-method-testing.mjs.map +1 -1
  32. package/fesm2020/rxap-remote-method.mjs +9 -9
  33. package/fesm2020/rxap-remote-method.mjs.map +1 -1
  34. package/http/directive/{rxap-remote-method-http-directive.d.ts → index.d.ts} +0 -0
  35. package/http/directive/lib/contenteditable.directive.d.ts +1 -1
  36. package/http/directive/lib/http-remote-method.directive.d.ts +1 -1
  37. package/http/{rxap-remote-method-http.d.ts → index.d.ts} +0 -0
  38. package/package.json +16 -17
  39. package/src/schematics/base/index.js +1 -1
  40. package/src/schematics/directive/index.js +1 -1
  41. package/src/schematics/http/index.js +1 -1
  42. package/testing/{rxap-remote-method-testing.d.ts → index.d.ts} +0 -0
  43. package/directive/package.json +0 -10
  44. package/http/directive/package.json +0 -10
  45. package/http/package.json +0 -10
  46. package/rxap-remote-method.d.ts +0 -5
  47. package/testing/package.json +0 -10
@@ -12,9 +12,9 @@ export class ProxyRemoteMethod extends BaseRemoteMethod {
12
12
  return this.remoteMethod.call(await this.transformParameters(parameters));
13
13
  }
14
14
  }
15
- ProxyRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable });
16
- ProxyRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ProxyRemoteMethod });
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
15
+ ProxyRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable });
16
+ ProxyRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod });
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
18
18
  type: Injectable
19
19
  }], ctorParameters: function () { return [{ type: i1.BaseRemoteMethod, decorators: [{
20
20
  type: Inject,
@@ -8,9 +8,9 @@ export class RemoteMethodLoader extends DefinitionLoader {
8
8
  .call(parameters);
9
9
  }
10
10
  }
11
- RemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
12
- RemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' });
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodLoader, decorators: [{
11
+ RemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
12
+ RemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' });
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, decorators: [{
14
14
  type: Injectable,
15
15
  args: [{ providedIn: 'root' }]
16
16
  }] });
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate, __metadata } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Injector, EventEmitter, isDevMode, INJECTOR, Directive, Inject, Optional, Self, Input, Output, HostListener, NgModule, TemplateRef, ViewContainerRef, ChangeDetectorRef, IterableDiffers, NgZone } from '@angular/core';
3
+ import { InjectionToken, EventEmitter, Injector, isDevMode, INJECTOR, Directive, Inject, Optional, Self, Input, Output, HostListener, NgModule, TemplateRef, ViewContainerRef, ChangeDetectorRef, IterableDiffers, NgZone } from '@angular/core';
4
4
  import * as i1 from '@rxap/remote-method';
5
5
  import { RemoteMethodLoader, RxapRemoteMethodError } from '@rxap/remote-method';
6
6
  import { coerceBoolean, Required, Deprecated } from '@rxap/utilities';
@@ -99,8 +99,8 @@ class RemoteMethodDirective {
99
99
  });
100
100
  }
101
101
  }
102
- RemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
103
- RemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.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 });
102
+ RemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
103
+ RemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.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 });
104
104
  __decorate([
105
105
  Required,
106
106
  __metadata("design:type", Object)
@@ -111,7 +111,7 @@ __decorate([
111
111
  __metadata("design:paramtypes", []),
112
112
  __metadata("design:returntype", Promise)
113
113
  ], RemoteMethodDirective.prototype, "call", null);
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirective, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirective, decorators: [{
115
115
  type: Directive,
116
116
  args: [{
117
117
  selector: '[rxapRemoteMethod]',
@@ -162,10 +162,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
162
162
  }], call: [] } });
163
163
  class RemoteMethodDirectiveModule {
164
164
  }
165
- RemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
166
- RemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] });
167
- RemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule });
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
165
+ RemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
166
+ RemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] });
167
+ RemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirectiveModule });
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
169
169
  type: NgModule,
170
170
  args: [{
171
171
  declarations: [RemoteMethodDirective],
@@ -426,13 +426,13 @@ class RemoteMethodTemplateCollectionDirective {
426
426
  }
427
427
  }
428
428
  }
429
- RemoteMethodTemplateCollectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.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 });
430
- RemoteMethodTemplateCollectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.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 });
429
+ RemoteMethodTemplateCollectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.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 });
430
+ RemoteMethodTemplateCollectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.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 });
431
431
  __decorate([
432
432
  Required,
433
433
  __metadata("design:type", Object)
434
434
  ], RemoteMethodTemplateCollectionDirective.prototype, "_remoteMethodOrIdOrToken", void 0);
435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
436
436
  type: Directive,
437
437
  args: [{
438
438
  selector: '[rxapRemoteMethodCollection]',
@@ -489,10 +489,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
489
489
  }], _remoteMethodOrIdOrToken: [] } });
490
490
  class RemoteMethodTemplateCollectionDirectiveModule {
491
491
  }
492
- RemoteMethodTemplateCollectionDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
493
- RemoteMethodTemplateCollectionDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] });
494
- RemoteMethodTemplateCollectionDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule });
495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
492
+ RemoteMethodTemplateCollectionDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
493
+ RemoteMethodTemplateCollectionDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] });
494
+ RemoteMethodTemplateCollectionDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule });
495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
496
496
  type: NgModule,
497
497
  args: [{
498
498
  declarations: [RemoteMethodTemplateCollectionDirective],
@@ -613,8 +613,8 @@ class RemoteMethodTemplateDirective {
613
613
  this.cdr.detectChanges();
614
614
  }
615
615
  }
616
- RemoteMethodTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.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 });
617
- RemoteMethodTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.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 });
616
+ RemoteMethodTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.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 });
617
+ RemoteMethodTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.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 });
618
618
  __decorate([
619
619
  Required,
620
620
  __metadata("design:type", Object)
@@ -625,7 +625,7 @@ __decorate([
625
625
  __metadata("design:paramtypes", [Object]),
626
626
  __metadata("design:returntype", void 0)
627
627
  ], RemoteMethodTemplateDirective.prototype, "call", null);
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
629
629
  type: Directive,
630
630
  args: [{
631
631
  selector: '[rxapRemoteMethod]',
@@ -687,10 +687,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
687
687
  }], call: [] } });
688
688
  class RemoteMethodTemplateDirectiveModule {
689
689
  }
690
- RemoteMethodTemplateDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
691
- RemoteMethodTemplateDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] });
692
- RemoteMethodTemplateDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule });
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
690
+ RemoteMethodTemplateDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
691
+ RemoteMethodTemplateDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] });
692
+ RemoteMethodTemplateDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule });
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
694
694
  type: NgModule,
695
695
  args: [{
696
696
  declarations: [RemoteMethodTemplateDirective],
@@ -1 +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;;MC+B5F,qBAAqB;IA2ChC,YAEqB,kBAAsC,EAExC,WAAqB,QAAQ,CAAC,IAAI,EAIlC,iBAAuB;QANrB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAExC,aAAQ,GAAR,QAAQ,CAA0B;QAIlC,sBAAiB,GAAjB,iBAAi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AQ;mBAAC;oBACR,YAAY,EAAE,CAAC,6BAA6B,CAAC;oBAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;iBACzC;;;MCrNY,uCAAuC,qBAAqB;IAEvE,YAAY,OAAe,EAAE,IAAa,EAAE,KAAc;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,EAAE,KAAK,CAAC,CAAC;KACnC;;;ACNH;;;;;;"}
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;;MC+B5F,qBAAqB,CAAA;IA2ChC,WAEqB,CAAA,kBAAsC,EAExC,QAAA,GAAqB,QAAQ,CAAC,IAAI,EAIlC,iBAAuB,EAAA;AANrB,QAAA,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;AAExC,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;AAIlC,QAAA,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;AAG7C,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAOpC;;AAEG;AACI,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;AAKhC,QAAA,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC;QAYnC,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC1B,YAAA,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,CAAC;AACxD,SAAA;KACF;IArDD,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;IA2BM,QAAQ,GAA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C,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAA7B,6BAA6B,CAAA,EAAA,CAAA,CAAA;iIA2K7B,mCAAmC,EAAA,CAAA,CAAA;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;iBACzC,CAAA;;;ACrNK,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;AACxD,QAAA,KAAK,CAAC,OAAO,EAAE,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,KAAA,CAAA,GAAA,IAAI,GAAI,EAAE,EAAE,KAAK,CAAC,CAAC;KACnC;AAEF;;ACRD;;AAEG;;;;"}
@@ -40,9 +40,9 @@ class HttpRemoteMethodDirective extends RemoteMethodDirective {
40
40
  }
41
41
  }
42
42
  }
43
- HttpRemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
44
- HttpRemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.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: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
43
+ HttpRemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
44
+ HttpRemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.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 });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
46
46
  type: Directive,
47
47
  args: [{
48
48
  selector: 'button[rxapHttpRemoteMethod]'
@@ -71,10 +71,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
71
71
  }] } });
72
72
  class HttpRemoteMethodDirectiveModule {
73
73
  }
74
- HttpRemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
75
- HttpRemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule, declarations: [HttpRemoteMethodDirective], exports: [HttpRemoteMethodDirective] });
76
- HttpRemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule });
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodDirectiveModule, decorators: [{
74
+ HttpRemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
75
+ HttpRemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, declarations: [HttpRemoteMethodDirective], exports: [HttpRemoteMethodDirective] });
76
+ HttpRemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule });
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodDirectiveModule, decorators: [{
78
78
  type: NgModule,
79
79
  args: [{
80
80
  declarations: [HttpRemoteMethodDirective],
@@ -101,8 +101,8 @@ class ContenteditableDirective {
101
101
  return Promise.resolve();
102
102
  }
103
103
  }
104
- ContenteditableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirective, deps: [{ token: HttpRemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Directive });
105
- ContenteditableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.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 });
104
+ ContenteditableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirective, deps: [{ token: HttpRemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Directive });
105
+ ContenteditableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.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 });
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: "13.2.3", ngImport: i0, type: ContenteditableDirective, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirective, decorators: [{
125
125
  type: Directive,
126
126
  args: [{
127
127
  selector: '[rxapContenteditable]',
@@ -153,10 +153,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
153
153
  */
154
154
  class ContenteditableDirectiveModule {
155
155
  }
156
- ContenteditableDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
157
- ContenteditableDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] });
158
- ContenteditableDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule });
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
156
+ ContenteditableDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
157
+ ContenteditableDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] });
158
+ ContenteditableDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirectiveModule });
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
160
160
  type: NgModule,
161
161
  args: [{
162
162
  declarations: [ContenteditableDirective],
@@ -1 +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":";;;;;;;;MAiBa,kCAA0H,qBAAsE;IAE3M,IACW,OAAO,CAAC,OAA6C;QAC9D,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACpC;IAED,IACW,cAAc,CAAC,cAA2D;QACnF,IAAI,CAAC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;KAC3C;IAED,IACW,MAAM,CAAC,MAA2C;QAC3D,IAAI,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;KACnC;IAED,IACW,YAAY,CAAC,YAAuD;QAC7E,IAAI,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KACzC;IAED,IACW,eAAe,CAAC,eAA6D;QACtF,IAAI,CAAC,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC;KAC5C;IAED,IACW,IAAI,CAAC,IAAuC;QACrD,IAAI,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;KACjC;IAED,IACW,UAAU,CAAC,UAAmD;QACvE,IAAI,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;KACvC;IAED,IACW,SAAS,CAAC,SAAiD;QACpE,IAAI,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;KACtC;IAED,IACW,UAAU,CAAC,UAAmD;QACvE,IAAI,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;KACvC;IAED,IACW,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AI,CAAC,QAAQ,GAAG,KAAK,EAAE;aACjC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KAC1B;;qHArCU,wBAAwB,kBAiBzB,sBAAsB;yGAjBrB,wBAAwB;AAMnC;IADC,QAAQ;;gEACsB;AAI/B;IADC,QAAQ;;0DACgB;AAIzB;IADC,QAAQ;;sDACY;AAcrB;IADC,YAAY,CAAC,IAAI,CAAC;;;;uDAUlB;2FArCU,wBAAwB;kBAHpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;iBAClC;;;8BAkBI,MAAM;+BAAC,sBAAsB;;yBAfzB,eAAe;sBADrB,WAAW;uBAAC,sBAAsB;gBAK5B,cAAc;sBAFpB,KAAK;uBAAC,qBAAqB;gBAMrB,QAAQ;sBAFd,KAAK;gBAMC,IAAI;sBAFV,KAAK;gBAUC,OAAO;sBADb,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAO1B,OAAO;sBAFb,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;AAcnC;;;MAOa,8BAA8B;;2HAA9B,8BAA8B;4HAA9B,8BAA8B,iBA/C9B,wBAAwB,aAAxB,wBAAwB;4HA+CxB,8BAA8B;2FAA9B,8BAA8B;kBAJ1C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACpC;;;AC5DD;;;;;;"}
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":";;;;;;;;AAiBM,MAAO,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,EAA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BAAwB,CAAC;iBACpC,CAAA;;;AC5DD;;AAEG;;;;"}
@@ -63,9 +63,9 @@ class BaseHttpRemoteMethod extends BaseRemoteMethod {
63
63
  return url;
64
64
  }
65
65
  }
66
- BaseHttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
67
- BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BaseHttpRemoteMethod });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
66
+ BaseHttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
67
+ BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
69
69
  type: Injectable
70
70
  }], ctorParameters: function () {
71
71
  return [{ type: i1.HttpClient, decorators: [{
@@ -117,9 +117,9 @@ class HttpRemoteMethod extends BaseHttpRemoteMethod {
117
117
  return response;
118
118
  }
119
119
  }
120
- HttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
121
- HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethod });
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethod, decorators: [{
120
+ HttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
121
+ HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod });
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod, decorators: [{
123
123
  type: Injectable
124
124
  }] });
125
125
 
@@ -138,9 +138,9 @@ class HttpRemoteMethodLoader {
138
138
  return remoteMethod.call(parameters);
139
139
  }
140
140
  }
141
- HttpRemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodLoader, deps: [{ token: RemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Injectable });
142
- HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' });
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
141
+ HttpRemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, deps: [{ token: RemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Injectable });
142
+ HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' });
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
144
144
  type: Injectable,
145
145
  args: [{ providedIn: 'root' }]
146
146
  }], ctorParameters: function () {
@@ -1 +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":";;;;;;;;;MAiDsB,6BAIZ,gBAAiD;IAMzD,YACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI;;QAExE,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAJU,SAAI,GAAJ,IAAI,CAAY;QAH/C,YAAO,GAAG,EAAE,GAAG,IAAI,CAAC;QAQzB,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,mCAAI,IAAI,CAAC,OAAO,CAAC;QACrD,IAAI,IAAI,KAAK,SAAS,EAAE;YACtB,MAAM,IAAI,qBAAqB,CAAC,oFAAoF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAClJ;QACD,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;YACjC,MAAM,IAAI,qBAAqB,CAAC,+EAA+E,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC7I;KACF;IAES,aAAa;QACrB,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,UAAU,EAAE;YAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;KAC1B;IAEM,IAAI;QACT,KAAK,CAAC,IAAI,EAAE,CAAC;QACb,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CACjC,IAAI,CAAC,QAAQ,CAAC,MAAM,EACpB,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,EACJ;YACE,OAAO,EAAU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AAsB,cADT,MAAM;2FACnB,sBAAsB;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;8BAMnB,MAAM;+BAAC,kBAAkB;;;;ACrBxC;;;;;;"}
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":";;;;;;;;;AAiDM,MAAgB,oBAIpB,SAAQ,gBAAiD,CAAA;AAMzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAJU,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAH/C,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;AAQzB,QAAA,IAAI,CAAC,OAAO,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,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,I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