@rxap/remote-method 12.0.9-next.0 → 13.0.0-next.1

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 (125) hide show
  1. package/directive/package.json +5 -5
  2. package/esm2020/directive/lib/error.mjs +7 -0
  3. package/esm2020/directive/lib/remote-method-template-collection.directive.mjs +333 -0
  4. package/esm2020/directive/lib/remote-method-template.directive.mjs +201 -0
  5. package/esm2020/directive/lib/remote-method.directive.mjs +165 -0
  6. package/esm2020/directive/lib/tokens.mjs +3 -0
  7. package/esm2020/directive/public_api.mjs +6 -0
  8. package/esm2020/directive/rxap-remote-method-directive.mjs +5 -0
  9. package/esm2020/http/directive/lib/contenteditable.directive.mjs +86 -0
  10. package/esm2020/http/directive/lib/http-remote-method.directive.mjs +79 -0
  11. package/esm2020/http/directive/public_api.mjs +3 -0
  12. package/esm2020/http/directive/rxap-remote-method-http-directive.mjs +5 -0
  13. package/esm2020/http/lib/base-http.remote-method.mjs +82 -0
  14. package/esm2020/http/lib/http-remote-method.loader.mjs +30 -0
  15. package/esm2020/http/lib/http.remote-method.mjs +45 -0
  16. package/esm2020/http/public_api.mjs +4 -0
  17. package/esm2020/http/rxap-remote-method-http.mjs +5 -0
  18. package/esm2020/index.mjs +6 -0
  19. package/esm2020/lib/base.remote-method.mjs +73 -0
  20. package/esm2020/lib/error.mjs +7 -0
  21. package/esm2020/lib/proxy.remote-method.mjs +29 -0
  22. package/esm2020/lib/remote-method-loader.mjs +17 -0
  23. package/esm2020/lib/tokens.mjs +4 -0
  24. package/esm2020/rxap-remote-method.mjs +5 -0
  25. package/esm2020/testing/lib/remote-method-testing-loader.mjs +47 -0
  26. package/esm2020/testing/public_api.mjs +2 -0
  27. package/esm2020/testing/rxap-remote-method-testing.mjs +5 -0
  28. package/fesm2015/rxap-remote-method-directive.mjs +712 -0
  29. package/fesm2015/rxap-remote-method-directive.mjs.map +1 -0
  30. package/fesm2015/rxap-remote-method-http-directive.mjs +172 -0
  31. package/fesm2015/rxap-remote-method-http-directive.mjs.map +1 -0
  32. package/fesm2015/rxap-remote-method-http.mjs +158 -0
  33. package/fesm2015/rxap-remote-method-http.mjs.map +1 -0
  34. package/fesm2015/{rxap-remote-method-testing.js → rxap-remote-method-testing.mjs} +1 -1
  35. package/fesm2015/rxap-remote-method-testing.mjs.map +1 -0
  36. package/fesm2015/{rxap-remote-method.js → rxap-remote-method.mjs} +35 -31
  37. package/fesm2015/rxap-remote-method.mjs.map +1 -0
  38. package/{fesm2015/rxap-remote-method-directive.js → fesm2020/rxap-remote-method-directive.mjs} +64 -72
  39. package/fesm2020/rxap-remote-method-directive.mjs.map +1 -0
  40. package/{fesm2015/rxap-remote-method-http-directive.js → fesm2020/rxap-remote-method-http-directive.mjs} +15 -15
  41. package/fesm2020/rxap-remote-method-http-directive.mjs.map +1 -0
  42. package/{fesm2015/rxap-remote-method-http.js → fesm2020/rxap-remote-method-http.mjs} +18 -16
  43. package/fesm2020/rxap-remote-method-http.mjs.map +1 -0
  44. package/{esm2015/testing/lib/remote-method-testing-loader.js → fesm2020/rxap-remote-method-testing.mjs} +18 -17
  45. package/fesm2020/rxap-remote-method-testing.mjs.map +1 -0
  46. package/fesm2020/rxap-remote-method.mjs +126 -0
  47. package/fesm2020/rxap-remote-method.mjs.map +1 -0
  48. package/http/directive/package.json +5 -5
  49. package/http/package.json +5 -5
  50. package/package.json +62 -14
  51. package/src/schematics/base/index.js +9 -9
  52. package/src/schematics/base/index.js.map +1 -1
  53. package/src/schematics/directive/index.js +6 -6
  54. package/src/schematics/directive/index.js.map +1 -1
  55. package/src/schematics/http/index.js +7 -7
  56. package/src/schematics/http/index.js.map +1 -1
  57. package/src/schematics/ng-add/index.js +1 -1
  58. package/src/schematics/ng-add/index.js.map +1 -1
  59. package/testing/package.json +5 -5
  60. package/bundles/rxap-remote-method-directive.umd.js +0 -1150
  61. package/bundles/rxap-remote-method-directive.umd.js.map +0 -1
  62. package/bundles/rxap-remote-method-http-directive.umd.js +0 -565
  63. package/bundles/rxap-remote-method-http-directive.umd.js.map +0 -1
  64. package/bundles/rxap-remote-method-http.umd.js +0 -520
  65. package/bundles/rxap-remote-method-http.umd.js.map +0 -1
  66. package/bundles/rxap-remote-method-testing.umd.js +0 -388
  67. package/bundles/rxap-remote-method-testing.umd.js.map +0 -1
  68. package/bundles/rxap-remote-method.umd.js +0 -527
  69. package/bundles/rxap-remote-method.umd.js.map +0 -1
  70. package/esm2015/directive/lib/error.js +0 -7
  71. package/esm2015/directive/lib/error.js.map +0 -1
  72. package/esm2015/directive/lib/remote-method-template-collection.directive.js +0 -333
  73. package/esm2015/directive/lib/remote-method-template-collection.directive.js.map +0 -1
  74. package/esm2015/directive/lib/remote-method-template.directive.js +0 -204
  75. package/esm2015/directive/lib/remote-method-template.directive.js.map +0 -1
  76. package/esm2015/directive/lib/remote-method.directive.js +0 -170
  77. package/esm2015/directive/lib/remote-method.directive.js.map +0 -1
  78. package/esm2015/directive/lib/tokens.js +0 -3
  79. package/esm2015/directive/lib/tokens.js.map +0 -1
  80. package/esm2015/directive/public_api.js +0 -6
  81. package/esm2015/directive/public_api.js.map +0 -1
  82. package/esm2015/directive/rxap-remote-method-directive.js +0 -5
  83. package/esm2015/directive/rxap-remote-method-directive.js.map +0 -1
  84. package/esm2015/http/directive/lib/contenteditable.directive.js +0 -86
  85. package/esm2015/http/directive/lib/contenteditable.directive.js.map +0 -1
  86. package/esm2015/http/directive/lib/http-remote-method.directive.js +0 -79
  87. package/esm2015/http/directive/lib/http-remote-method.directive.js.map +0 -1
  88. package/esm2015/http/directive/public_api.js +0 -3
  89. package/esm2015/http/directive/public_api.js.map +0 -1
  90. package/esm2015/http/directive/rxap-remote-method-http-directive.js +0 -5
  91. package/esm2015/http/directive/rxap-remote-method-http-directive.js.map +0 -1
  92. package/esm2015/http/lib/base-http.remote-method.js +0 -79
  93. package/esm2015/http/lib/base-http.remote-method.js.map +0 -1
  94. package/esm2015/http/lib/http-remote-method.loader.js +0 -30
  95. package/esm2015/http/lib/http-remote-method.loader.js.map +0 -1
  96. package/esm2015/http/lib/http.remote-method.js +0 -46
  97. package/esm2015/http/lib/http.remote-method.js.map +0 -1
  98. package/esm2015/http/public_api.js +0 -4
  99. package/esm2015/http/public_api.js.map +0 -1
  100. package/esm2015/http/rxap-remote-method-http.js +0 -5
  101. package/esm2015/http/rxap-remote-method-http.js.map +0 -1
  102. package/esm2015/index.js +0 -6
  103. package/esm2015/index.js.map +0 -1
  104. package/esm2015/lib/base.remote-method.js +0 -76
  105. package/esm2015/lib/base.remote-method.js.map +0 -1
  106. package/esm2015/lib/error.js +0 -7
  107. package/esm2015/lib/error.js.map +0 -1
  108. package/esm2015/lib/proxy.remote-method.js +0 -32
  109. package/esm2015/lib/proxy.remote-method.js.map +0 -1
  110. package/esm2015/lib/remote-method-loader.js +0 -20
  111. package/esm2015/lib/remote-method-loader.js.map +0 -1
  112. package/esm2015/lib/tokens.js +0 -4
  113. package/esm2015/lib/tokens.js.map +0 -1
  114. package/esm2015/rxap-remote-method.js +0 -5
  115. package/esm2015/rxap-remote-method.js.map +0 -1
  116. package/esm2015/testing/lib/remote-method-testing-loader.js.map +0 -1
  117. package/esm2015/testing/public_api.js +0 -2
  118. package/esm2015/testing/public_api.js.map +0 -1
  119. package/esm2015/testing/rxap-remote-method-testing.js +0 -5
  120. package/esm2015/testing/rxap-remote-method-testing.js.map +0 -1
  121. package/fesm2015/rxap-remote-method-directive.js.map +0 -1
  122. package/fesm2015/rxap-remote-method-http-directive.js.map +0 -1
  123. package/fesm2015/rxap-remote-method-http.js.map +0 -1
  124. package/fesm2015/rxap-remote-method-testing.js.map +0 -1
  125. package/fesm2015/rxap-remote-method.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { __awaiter, __decorate, __metadata } from 'tslib';
1
+ import { __decorate, __metadata } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Injector, EventEmitter, 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';
@@ -51,31 +51,28 @@ class RemoteMethodDirective {
51
51
  console.debug('skip remote method call. Wait for confirmation.');
52
52
  }
53
53
  }
54
- execute() {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- this.executing$.enable();
57
- try {
58
- const result = yield this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
59
- this.executed(result);
60
- this.successful(result);
61
- }
62
- catch (error) {
63
- if (isDevMode()) {
64
- console.error(`Remote method directive execution failed:`, error.message);
65
- }
66
- this.failure(error);
67
- }
68
- finally {
69
- this.executing$.disable();
54
+ async execute() {
55
+ this.executing$.enable();
56
+ try {
57
+ const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
58
+ this.executed(result);
59
+ this.successful(result);
60
+ }
61
+ catch (error) {
62
+ if (isDevMode()) {
63
+ console.error(`Remote method directive execution failed:`, error.message);
70
64
  }
71
- });
65
+ this.failure(error);
66
+ }
67
+ finally {
68
+ this.executing$.disable();
69
+ }
72
70
  }
73
71
  setParameter(parameterKey, value) {
74
72
  this.updateParameters({ [parameterKey]: value });
75
73
  }
76
74
  updateParameters(parameters) {
77
- var _a;
78
- this.parameters = Object.assign(Object.assign({}, ((_a = this.parameters) !== null && _a !== void 0 ? _a : {})), parameters);
75
+ this.parameters = { ...(this.parameters ?? {}), ...parameters };
79
76
  }
80
77
  executed(result) {
81
78
  this.executed$.emit(result);
@@ -90,17 +87,15 @@ class RemoteMethodDirective {
90
87
  * @deprecated removed
91
88
  * @protected
92
89
  */
93
- call() {
94
- return __awaiter(this, void 0, void 0, function* () {
95
- this.executing$.enable();
96
- const result = yield this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
97
- this.executing$.disable();
98
- return result;
99
- });
90
+ async call() {
91
+ this.executing$.enable();
92
+ const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
93
+ this.executing$.disable();
94
+ return result;
100
95
  }
101
96
  }
102
- RemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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: "12.0.1", 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 });
97
+ 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 });
98
+ 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 });
104
99
  __decorate([
105
100
  Required,
106
101
  __metadata("design:type", Object)
@@ -111,7 +106,7 @@ __decorate([
111
106
  __metadata("design:paramtypes", []),
112
107
  __metadata("design:returntype", Promise)
113
108
  ], RemoteMethodDirective.prototype, "call", null);
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodDirective, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirective, decorators: [{
115
110
  type: Directive,
116
111
  args: [{
117
112
  selector: '[rxapRemoteMethod]',
@@ -160,10 +155,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
160
155
  }], call: [] } });
161
156
  class RemoteMethodDirectiveModule {
162
157
  }
163
- RemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
164
- RemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] });
165
- RemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodDirectiveModule });
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
158
+ RemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
159
+ RemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, declarations: [RemoteMethodDirective], exports: [RemoteMethodDirective] });
160
+ RemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule });
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodDirectiveModule, decorators: [{
167
162
  type: NgModule,
168
163
  args: [{
169
164
  declarations: [RemoteMethodDirective],
@@ -410,7 +405,7 @@ class RemoteMethodTemplateCollectionDirective {
410
405
  try {
411
406
  this._differ = this.differs.find(value).create(this.trackBy);
412
407
  }
413
- catch (_a) {
408
+ catch {
414
409
  throw new Error(`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
415
410
  }
416
411
  }
@@ -424,13 +419,13 @@ class RemoteMethodTemplateCollectionDirective {
424
419
  }
425
420
  }
426
421
  }
427
- RemoteMethodTemplateCollectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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 });
428
- RemoteMethodTemplateCollectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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 });
422
+ 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 });
423
+ 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
424
  __decorate([
430
425
  Required,
431
426
  __metadata("design:type", Object)
432
427
  ], RemoteMethodTemplateCollectionDirective.prototype, "_remoteMethodOrIdOrToken", void 0);
433
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
434
429
  type: Directive,
435
430
  args: [{
436
431
  selector: '[rxapRemoteMethodCollection]',
@@ -485,10 +480,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
485
480
  }], _remoteMethodOrIdOrToken: [] } });
486
481
  class RemoteMethodTemplateCollectionDirectiveModule {
487
482
  }
488
- RemoteMethodTemplateCollectionDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
489
- RemoteMethodTemplateCollectionDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] });
490
- RemoteMethodTemplateCollectionDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule });
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
483
+ RemoteMethodTemplateCollectionDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
484
+ RemoteMethodTemplateCollectionDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, declarations: [RemoteMethodTemplateCollectionDirective], exports: [RemoteMethodTemplateCollectionDirective] });
485
+ RemoteMethodTemplateCollectionDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule });
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirectiveModule, decorators: [{
492
487
  type: NgModule,
493
488
  args: [{
494
489
  declarations: [RemoteMethodTemplateCollectionDirective],
@@ -543,26 +538,24 @@ class RemoteMethodTemplateDirective {
543
538
  this.execute();
544
539
  }
545
540
  }
546
- execute(parameters = this.parameters) {
547
- return __awaiter(this, void 0, void 0, function* () {
548
- this.executing$.enable();
549
- this.renderLoadingTemplate();
550
- try {
551
- const result = yield this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, parameters, this.metadata, this.injector);
552
- this.executed(result);
553
- this.renderTemplate(result);
554
- this.successful(result);
555
- }
556
- catch (error) {
557
- if (isDevMode()) {
558
- console.error(`Remote method directive execution failed:`, error.message);
559
- }
560
- this.failure(error);
561
- }
562
- finally {
563
- this.executing$.disable();
541
+ async execute(parameters = this.parameters) {
542
+ this.executing$.enable();
543
+ this.renderLoadingTemplate();
544
+ try {
545
+ const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, parameters, this.metadata, this.injector);
546
+ this.executed(result);
547
+ this.renderTemplate(result);
548
+ this.successful(result);
549
+ }
550
+ catch (error) {
551
+ if (isDevMode()) {
552
+ console.error(`Remote method directive execution failed:`, error.message);
564
553
  }
565
- });
554
+ this.failure(error);
555
+ }
556
+ finally {
557
+ this.executing$.disable();
558
+ }
566
559
  }
567
560
  /**
568
561
  * @deprecated removed
@@ -576,8 +569,7 @@ class RemoteMethodTemplateDirective {
576
569
  this.updateParameters({ [parameterKey]: value });
577
570
  }
578
571
  updateParameters(parameters) {
579
- var _a;
580
- this.parameters = Object.assign(Object.assign({}, ((_a = this.parameters) !== null && _a !== void 0 ? _a : {})), parameters);
572
+ this.parameters = { ...(this.parameters ?? {}), ...parameters };
581
573
  }
582
574
  renderLoadingTemplate() {
583
575
  if (this.loadingTemplate) {
@@ -609,8 +601,8 @@ class RemoteMethodTemplateDirective {
609
601
  this.cdr.detectChanges();
610
602
  }
611
603
  }
612
- RemoteMethodTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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 });
613
- RemoteMethodTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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 });
604
+ 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 });
605
+ 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 });
614
606
  __decorate([
615
607
  Required,
616
608
  __metadata("design:type", Object)
@@ -621,7 +613,7 @@ __decorate([
621
613
  __metadata("design:paramtypes", [Object]),
622
614
  __metadata("design:returntype", void 0)
623
615
  ], RemoteMethodTemplateDirective.prototype, "call", null);
624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
625
617
  type: Directive,
626
618
  args: [{
627
619
  selector: '[rxapRemoteMethod]',
@@ -681,10 +673,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
681
673
  }], call: [] } });
682
674
  class RemoteMethodTemplateDirectiveModule {
683
675
  }
684
- RemoteMethodTemplateDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
685
- RemoteMethodTemplateDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] });
686
- RemoteMethodTemplateDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateDirectiveModule });
687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
676
+ RemoteMethodTemplateDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
677
+ RemoteMethodTemplateDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, declarations: [RemoteMethodTemplateDirective], exports: [RemoteMethodTemplateDirective] });
678
+ RemoteMethodTemplateDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule });
679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RemoteMethodTemplateDirectiveModule, decorators: [{
688
680
  type: NgModule,
689
681
  args: [{
690
682
  declarations: [RemoteMethodTemplateDirective],
@@ -694,7 +686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
694
686
 
695
687
  class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
696
688
  constructor(message, code, scope) {
697
- super(message, code !== null && code !== void 0 ? code : '', scope);
689
+ super(message, code ?? '', scope);
698
690
  }
699
691
  }
700
692
 
@@ -703,4 +695,4 @@ class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
703
695
  */
704
696
 
705
697
  export { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, RemoteMethodDirective, RemoteMethodDirectiveModule, RemoteMethodTemplateCollectionDirective, RemoteMethodTemplateCollectionDirectiveContext, RemoteMethodTemplateCollectionDirectiveModule, RemoteMethodTemplateDirective, RemoteMethodTemplateDirectiveModule, RxapRemoteMethodDirectiveError };
706
- //# sourceMappingURL=rxap-remote-method-directive.js.map
698
+ //# sourceMappingURL=rxap-remote-method-directive.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../libs/remote-method/directive/src/lib/tokens.ts","../../../../libs/remote-method/directive/src/lib/remote-method.directive.ts","../../../../libs/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../libs/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../libs/remote-method/directive/src/lib/error.ts","../../../../libs/remote-method/directive/src/rxap-remote-method-directive.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');\n","import {\n Input,\n NgModule,\n Output,\n EventEmitter,\n Directive,\n OnInit,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n isDevMode,\n Optional,\n Self\n} from '@angular/core';\nimport {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport {\n Required,\n coerceBoolean,\n Deprecated\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/utilities/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod'\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n\n @Input('rxapRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n @Input()\n public parameters?: Parameters;\n\n @Input()\n public metadata?: Metadata;\n\n @Output('executed')\n public executed$ = new EventEmitter();\n\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n\n @Input()\n public immediately: boolean = false;\n\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n private _hasConfirmDirective = false;\n\n constructor(\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector = Injector.NULL,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnInit(): void {\n if (this.immediately) {\n this.execute();\n }\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n this.execute();\n }\n\n @HostListener('click')\n public onClick() {\n if (!this._hasConfirmDirective) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public async execute(): Promise<void> {\n this.executing$.enable();\n try {\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);\n this.executed(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n protected async call(): Promise<any> {\n this.executing$.enable();\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);\n this.executing$.disable();\n return result;\n }\n\n}\n\n@NgModule({\n declarations: [ RemoteMethodDirective ],\n exports: [ RemoteMethodDirective ]\n})\nexport class RemoteMethodDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n Inject,\n Input,\n Injector,\n INJECTOR,\n ViewContainerRef,\n ChangeDetectorRef,\n NgModule,\n SimpleChanges,\n OnChanges,\n EmbeddedViewRef,\n TrackByFunction,\n isDevMode,\n IterableDiffer,\n IterableDiffers,\n IterableChanges,\n IterableChangeRecord,\n DoCheck,\n OnInit,\n NgZone,\n Optional,\n Self\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader\n} from '@rxap/remote-method';\nimport { Required } from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n first,\n tap,\n take\n} from 'rxjs/operators';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\n\nexport class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {\n constructor(\n public $implicit: ReturnType,\n public index: number,\n public count: number,\n ) {}\n\n get first(): boolean {\n return this.index === 0;\n }\n\n get last(): boolean {\n return this.index === this.count - 1;\n }\n\n get even(): boolean {\n return this.index % 2 === 0;\n }\n\n get odd(): boolean {\n return !this.even;\n }\n}\n\nexport interface RemoteMethodTemplateCollectionDirectiveErrorContext {\n $implicit: Error;\n message?: string;\n name?: string;\n}\n\nfunction getTypeName(type: any): string {\n return type['name'] || typeof type;\n}\n\nclass RecordViewTuple<T> {\n constructor(public record: any, public view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<T>>) {}\n}\n\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection'\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, DoCheck, OnInit {\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateCollectionDirectiveContext<T> {\n return true;\n }\n\n @Input('rxapRemoteMethodCollectionCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n /**\n * A function that defines how to track changes for items in the iterable.\n *\n * When items are added, moved, or removed in the iterable,\n * the directive must re-render the appropriate DOM nodes.\n * To minimize churn in the DOM, only nodes that have changed\n * are re-rendered.\n *\n * By default, the change detector assumes that\n * the object instance identifies the node in the iterable.\n * When this function is supplied, the directive uses\n * the result of calling this function to identify the item node,\n * rather than the identity of the object itself.\n *\n * The function receives two inputs,\n * the iteration index and the node object ID.\n */\n @Input('rxapRemoteMethodCollectionTrackBy')\n set trackBy(fn: TrackByFunction<ReturnType>) {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (<any>console && <any>console.warn) {\n console.warn(\n `trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n }\n this._trackByFn = fn;\n }\n\n get trackBy(): TrackByFunction<ReturnType> {\n return this._trackByFn;\n }\n\n @Input('rxapRemoteMethodCollectionParameters')\n public parameters?: Parameters;\n\n @Input('rxapRemoteMethodCollectionEmpty')\n public emptyTemplate?: TemplateRef<void>;\n\n @Input('rxapRemoteMethodCollectionError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;\n\n @Input('rxapRemoteMethodCollectionWithoutParameters')\n public withoutParameters: boolean = false;\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\n\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _trackByFn!: TrackByFunction<ReturnType>;\n\n /**\n * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n private _dirty = true;\n\n /**\n * Indicates that the remote method returned a empty collection\n *\n * true - is empty\n * false - is NOT empty\n * null - unknown\n *\n * @private\n */\n private _empty: boolean | null = null;\n\n /**\n * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\n\n /**\n * Holds the empty template view ref.\n *\n * Is used to determine if a empty template is added to the\n * view. And used to destruct the empty template if the remote method\n * changes from empty to not empty.\n *\n * @private\n */\n private _emptyTemplateViewRef: EmbeddedViewRef<void> | null = null;\n\n /**\n * Holds the error template view ref.\n *\n * Is used to determine if a error template is added to the\n * view. And used to destruct the error template if the remote method\n * is called again with an error.\n *\n * @private\n */\n private _errorTemplateViewRef: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveErrorContext> | null = null;\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Inject(IterableDiffers)\n private readonly differs: IterableDiffers,\n @Inject(NgZone)\n private readonly zone: NgZone,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes.parameters;\n if (parametersChanges) {\n this.call(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n if (this.withoutParameters) {\n this.call();\n }\n }\n\n public call(parameters?: Parameters): void {\n this.zone.onStable.pipe(\n take(1),\n tap(() => {\n this.zone.run(() => {\n this.remoteMethodLoader\n .call$(this._remoteMethodOrIdOrToken, parameters, undefined, this.injector)\n .then(response => {\n this._empty = response.length === 0;\n this._data = response;\n this.cdr.detectChanges();\n })\n .catch(error => {\n this._error = error;\n this.cdr.detectChanges();\n });\n });\n })\n ).subscribe();\n }\n\n protected applyChanges(changes: IterableChanges<ReturnType>) {\n\n const insertTuples: RecordViewTuple<ReturnType>[] = [];\n changes.forEachOperation(\n (item: IterableChangeRecord<any>, adjustedPreviousIndex: number | null, currentIndex: number | null) => {\n\n if (item.previousIndex == null) {\n\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n const view = this.viewContainerRef.createEmbeddedView(\n this.template,\n new RemoteMethodTemplateCollectionDirectiveContext<ReturnType>(null!, -1, -1),\n currentIndex === null ? undefined : currentIndex\n );\n const tuple = new RecordViewTuple<ReturnType>(item, view);\n insertTuples.push(tuple);\n\n } else if (currentIndex == null) {\n\n this.viewContainerRef.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n\n } else if (adjustedPreviousIndex !== null) {\n\n const view = this.viewContainerRef.get(adjustedPreviousIndex)!;\n this.viewContainerRef.move(view, currentIndex);\n const tuple = new RecordViewTuple(item, <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view);\n insertTuples.push(tuple);\n\n }\n\n });\n\n for (let i = 0; i < insertTuples.length; i++) {\n this.perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n\n for (let i = 0, ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n }\n\n changes.forEachIdentityChange((record: any) => {\n const viewRef =\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n\n }\n\n private perViewChange(\n view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>, record: IterableChangeRecord<any>) {\n view.context.$implicit = record.item;\n }\n\n /**\n * Applies the changes when needed.\n */\n public ngDoCheck(): void {\n if (this._error !== null) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n if (this.errorTemplate) {\n this._errorTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.errorTemplate, { $implicit: this._error, message: this._error.message, name: this._error.name });\n }\n\n } else if (this._empty === true) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n // attaches the empty template if the data source is empty\n if (this.emptyTemplate) {\n this._emptyTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.emptyTemplate);\n }\n\n } else if (this._empty === false) {\n\n // detach and destroy the empty template if the data source is not\n // empty any more\n if (this._emptyTemplateViewRef) {\n this._emptyTemplateViewRef.detach();\n this._emptyTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._errorTemplateViewRef) {\n this._errorTemplateViewRef.detach();\n this._errorTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._data) {\n this._dirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._data;\n if (!this._differ && value) {\n try {\n this._differ = this.differs.find(value).create(this.trackBy);\n } catch {\n throw new Error(`Cannot find a differ supporting object '${value}' of type '${\n getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._data);\n if (changes) {\n this.applyChanges(changes);\n }\n }\n }\n }\n\n}\n\n@NgModule({\n declarations: [RemoteMethodTemplateCollectionDirective],\n exports: [RemoteMethodTemplateCollectionDirective]\n})\nexport class RemoteMethodTemplateCollectionDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n Inject,\n Input,\n Injector,\n INJECTOR,\n ViewContainerRef,\n ChangeDetectorRef,\n NgModule,\n OnChanges,\n SimpleChanges,\n OnInit,\n EventEmitter,\n Output,\n isDevMode,\n Optional,\n Self\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader\n} from '@rxap/remote-method';\nimport {\n Required,\n Deprecated\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/utilities/rxjs';\n\nexport interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {\n $implicit: ReturnType;\n}\n\nexport interface RemoteMethodTemplateDirectiveErrorContext {\n $implicit: Error;\n message: string;\n}\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod'\n})\nexport class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, OnInit {\n\n // TODO : remove template context Guard\n // the template context Guard must be defined with a concrete context type\n // else the context guard is resolved to any\n // For each child directive that should have a template context guard\n // the template context guard must be defined\n // !! add generation of concrete template context guard to openapi schematics !!\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateDirectiveContext<T> {\n return true;\n }\n\n @Input('rxapRemoteMethodCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n @Output('executed')\n public executed$ = new EventEmitter();\n\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n\n @Input('rxapRemoteMethodMetadata')\n public metadata?: Metadata;\n\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n @Input('rxapRemoteMethodParameters')\n public parameters?: Parameters;\n\n @Input('rxapRemoteMethodError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;\n\n @Input('rxapRemoteMethodLoading')\n public loadingTemplate?: TemplateRef<void>;\n\n @Input('rxapRemoteMethodWithoutParameters')\n public withoutParameters: boolean = false;\n\n @Required\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n @Output()\n public embedded = new EventEmitter();\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes.parameters;\n if (parametersChanges) {\n this.execute(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n this.renderLoadingTemplate();\n if (this.withoutParameters) {\n this.execute();\n }\n }\n\n public async execute(parameters: Parameters | undefined = this.parameters): Promise<void> {\n this.executing$.enable();\n this.renderLoadingTemplate();\n try {\n const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, parameters, this.metadata, this.injector);\n this.executed(result);\n this.renderTemplate(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n public call(parameters?: Parameters): void {\n this.execute(parameters)\n .catch(error => console.error('Remote method template rendering failed: ' + error.message));\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [ parameterKey ]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n private renderLoadingTemplate() {\n if (this.loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.loadingTemplate);\n }\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n protected renderTemplate(result: ReturnType) {\n\n this.viewContainerRef.clear();\n\n try {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });\n } catch (error: any) {\n if (this.errorTemplate) {\n this.viewContainerRef.createEmbeddedView(this.errorTemplate, { $implicit: error, message: error.message });\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n}\n\n@NgModule({\n declarations: [RemoteMethodTemplateDirective],\n exports: [RemoteMethodTemplateDirective]\n})\nexport class RemoteMethodTemplateDirectiveModule {}\n","import { RxapRemoteMethodError } from '@rxap/remote-method';\n\nexport class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {\n\n constructor(message: string, code?: string, scope?: string) {\n super(message, code ?? '', scope);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";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AC,yBAAyB;gBAIzB,iBAAiB;sBADvB,KAAK;uBAAC,mCAAmC;gBAIhC,wBAAwB,MAG3B,QAAQ;sBADd,MAAM;gBA6DA,IAAI;MAyDA,mCAAmC;;gIAAnC,mCAAmC;iIAAnC,mCAAmC,iBA3KnC,6BAA6B,aAA7B,6BAA6B;iIA2K7B,mCAAmC;2FAAnC,mCAAmC;kBAJ/C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,6BAA6B,CAAC;oBAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;iBACzC;;;MCrNY,8BAA+B,SAAQ,qBAAqB;IAEvE,YAAY,OAAe,EAAE,IAAa,EAAE,KAAc;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;KACnC;;;ACNH;;;;;;"}
@@ -40,9 +40,9 @@ class HttpRemoteMethodDirective extends RemoteMethodDirective {
40
40
  }
41
41
  }
42
42
  }
43
- HttpRemoteMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
44
- HttpRemoteMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
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: [{
46
46
  type: Directive,
47
47
  args: [{
48
48
  selector: 'button[rxapHttpRemoteMethod]'
@@ -71,10 +71,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
71
71
  }] } });
72
72
  class HttpRemoteMethodDirectiveModule {
73
73
  }
74
- HttpRemoteMethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
75
- HttpRemoteMethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirectiveModule, declarations: [HttpRemoteMethodDirective], exports: [HttpRemoteMethodDirective] });
76
- HttpRemoteMethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirectiveModule });
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodDirectiveModule, decorators: [{
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: [{
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: "12.0.1", ngImport: i0, type: ContenteditableDirective, deps: [{ token: HttpRemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Directive });
105
- ContenteditableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", 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: "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 });
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: "12.0.1", ngImport: i0, type: ContenteditableDirective, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirective, decorators: [{
125
125
  type: Directive,
126
126
  args: [{
127
127
  selector: '[rxapContenteditable]',
@@ -151,10 +151,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
151
151
  */
152
152
  class ContenteditableDirectiveModule {
153
153
  }
154
- ContenteditableDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ContenteditableDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
- ContenteditableDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] });
156
- ContenteditableDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ContenteditableDirectiveModule });
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
154
+ ContenteditableDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
+ ContenteditableDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, declarations: [ContenteditableDirective], exports: [ContenteditableDirective] });
156
+ ContenteditableDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule });
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContenteditableDirectiveModule, decorators: [{
158
158
  type: NgModule,
159
159
  args: [{
160
160
  declarations: [ContenteditableDirective],
@@ -167,4 +167,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
167
167
  */
168
168
 
169
169
  export { ContenteditableDirective, ContenteditableDirectiveModule, HttpRemoteMethodDirective, HttpRemoteMethodDirectiveModule };
170
- //# sourceMappingURL=rxap-remote-method-http-directive.js.map
170
+ //# sourceMappingURL=rxap-remote-method-http-directive.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxap-remote-method-http-directive.mjs","sources":["../../../../libs/remote-method/http/directive/src/lib/http-remote-method.directive.ts","../../../../libs/remote-method/http/directive/src/lib/contenteditable.directive.ts","../../../../libs/remote-method/http/directive/src/rxap-remote-method-http-directive.ts"],"sourcesContent":["import {\n Directive,\n Input,\n NgModule\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\nimport { RemoteMethodDirective } from '@rxap/remote-method/directive';\nimport {\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from '@rxap/remote-method/http';\nimport { BaseRemoteMethod } from '@rxap/remote-method';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Directive({\n selector: 'button[rxapHttpRemoteMethod]'\n})\nexport class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {\n\n @Input()\n public set headers(headers: HttpRemoteMethodParameter['headers']) {\n this.updateParameters({ headers });\n }\n\n @Input()\n public set reportProgress(reportProgress: HttpRemoteMethodParameter['reportProgress']) {\n this.updateParameters({ reportProgress });\n }\n\n @Input()\n public set params(params: HttpRemoteMethodParameter['params']) {\n this.updateParameters({ params });\n }\n\n @Input()\n public set responseType(responseType: HttpRemoteMethodParameter['responseType']) {\n this.updateParameters({ responseType });\n }\n\n @Input()\n public set withCredentials(withCredentials: HttpRemoteMethodParameter['withCredentials']) {\n this.updateParameters({ withCredentials });\n }\n\n @Input()\n public set body(body: HttpRemoteMethodParameter['body']) {\n this.updateParameters({ body });\n }\n\n @Input()\n public set setHeaders(setHeaders: HttpRemoteMethodParameter['setHeaders']) {\n this.updateParameters({ setHeaders });\n }\n\n @Input()\n public set setParams(setParams: HttpRemoteMethodParameter['setParams']) {\n this.updateParameters({ setParams });\n }\n\n @Input()\n public set pathParams(pathParams: HttpRemoteMethodParameter['pathParams']) {\n this.updateParameters({ pathParams });\n }\n\n @Input('rxapHttpRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n}\n\n@NgModule({\n declarations: [ HttpRemoteMethodDirective ],\n exports: [ HttpRemoteMethodDirective ]\n})\nexport class HttpRemoteMethodDirectiveModule {}\n","import {\n Directive,\n Input,\n HostListener,\n NgModule,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport { Required, DebounceCall } from '@rxap/utilities';\nimport { HttpRemoteMethodLoader } from '@rxap/remote-method/http';\n\n@Directive({\n selector: '[rxapContenteditable]',\n})\nexport class ContenteditableDirective {\n @HostBinding('attr.contenteditable')\n public contenteditable = true;\n\n @Input('rxapContenteditable')\n @Required\n public remoteMethodId!: string;\n\n @Input()\n @Required\n public property!: string;\n\n @Input()\n @Required\n public uuid!: string;\n\n constructor(\n @Inject(HttpRemoteMethodLoader)\n private readonly httpRemoteMethodLoader: HttpRemoteMethodLoader\n ) {}\n\n @HostListener('click', ['$event'])\n public onClick($event: Event) {\n $event.stopPropagation();\n }\n\n @HostListener('input', ['$event'])\n @DebounceCall(1000)\n public onInput($event: any) {\n const value = ($event.target as HTMLElement).textContent;\n if (value && value.length > 3) {\n return this.httpRemoteMethodLoader.request$(this.remoteMethodId, {\n pathParams: { uuid: this.uuid },\n body: { [this.property]: value },\n });\n }\n return Promise.resolve();\n }\n}\n\n/**\n * @deprecated removed\n */\n@NgModule({\n declarations: [ContenteditableDirective],\n exports: [ContenteditableDirective],\n})\nexport class ContenteditableDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAiBa,yBAAkH,SAAQ,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,CAA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
11
  constructor(http, injector, metaData = null) {
12
- var _a;
13
12
  super(injector, metaData);
14
13
  this.http = http;
15
14
  this.timeout = 60 * 1000;
16
- this.timeout = (_a = this.metadata.timeout) !== null && _a !== void 0 ? _a : this.timeout;
15
+ this.timeout = this.metadata.timeout ?? this.timeout;
17
16
  if (http === undefined) {
18
17
  throw new RxapRemoteMethodError('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);
19
18
  }
@@ -42,7 +41,11 @@ class BaseHttpRemoteMethod extends BaseRemoteMethod {
42
41
  if (parameters && parameters.hasOwnProperty('pathParams')) {
43
42
  url = this.buildUrlWithParams(url, parameters.pathParams);
44
43
  }
45
- return this._httpRequest.clone(Object.assign(Object.assign({ withCredentials: this.metadata.withCredentials }, parameters), { url }));
44
+ return this._httpRequest.clone({
45
+ withCredentials: this.metadata.withCredentials,
46
+ ...parameters,
47
+ url
48
+ });
46
49
  }
47
50
  buildUrlWithParams(url, pathParams) {
48
51
  if (pathParams) {
@@ -63,9 +66,9 @@ class BaseHttpRemoteMethod extends BaseRemoteMethod {
63
66
  return url;
64
67
  }
65
68
  }
66
- BaseHttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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: "12.0.1", ngImport: i0, type: BaseHttpRemoteMethod });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
69
+ 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 });
70
+ BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BaseHttpRemoteMethod });
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
69
72
  type: Injectable
70
73
  }], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
71
74
  type: Inject,
@@ -82,8 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
82
85
 
83
86
  class HttpRemoteMethod extends BaseHttpRemoteMethod {
84
87
  _call(parameters) {
85
- var _a;
86
- return this.http.request(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(retry((_a = this.metadata.retry) !== null && _a !== void 0 ? _a : 0), tap(event => {
88
+ return this.http.request(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(retry(this.metadata.retry ?? 0), tap(event => {
87
89
  switch (event.type) {
88
90
  case HttpEventType.Sent:
89
91
  this.onSentEvent(event);
@@ -109,15 +111,15 @@ class HttpRemoteMethod extends BaseHttpRemoteMethod {
109
111
  onProgressEvent(event) { }
110
112
  // TODO : make abstract to force implementation to handel parameter transformation
111
113
  createHttpRequestParameters(parameters) {
112
- return parameters !== null && parameters !== void 0 ? parameters : {};
114
+ return parameters ?? {};
113
115
  }
114
116
  transformer(response) {
115
117
  return response;
116
118
  }
117
119
  }
118
- HttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
119
- HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethod });
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethod, decorators: [{
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: [{
121
123
  type: Injectable
122
124
  }] });
123
125
 
@@ -136,9 +138,9 @@ class HttpRemoteMethodLoader {
136
138
  return remoteMethod.call(parameters);
137
139
  }
138
140
  }
139
- HttpRemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodLoader, deps: [{ token: RemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Injectable });
140
- HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' });
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
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: [{
142
144
  type: Injectable,
143
145
  args: [{ providedIn: 'root' }]
144
146
  }], ctorParameters: function () { return [{ type: i1$1.RemoteMethodLoader, decorators: [{
@@ -151,4 +153,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
151
153
  */
152
154
 
153
155
  export { BaseHttpRemoteMethod, HttpRemoteMethod, HttpRemoteMethodLoader };
154
- //# sourceMappingURL=rxap-remote-method-http.js.map
156
+ //# sourceMappingURL=rxap-remote-method-http.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../libs/remote-method/http/src/lib/base-http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../libs/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Injectable,\n Optional,\n Inject,\n Injector\n} from '@angular/core';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n public timeout = 60 * 1000;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);\n }\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n public init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials\n }\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters.hasOwnProperty('pathParams')) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n ...parameters,\n url\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);\n }\n\n const matches = url.match(/\\{[^\\}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (!pathParams.hasOwnProperty(param)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);\n }\n url = url.replace(match, encodeURIComponent(pathParams[ param ]));\n }\n }\n }\n\n return url;\n }\n\n}\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpSentEvent,\n HttpHeaderResponse,\n HttpResponse,\n HttpProgressEvent,\n HttpEventType\n} from '@angular/common/http';\nimport {\n tap,\n filter,\n map,\n timeout,\n retry\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from './base-http.remote-method';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ).toPromise();\n }\n\n public onSentEvent(event: HttpSentEvent): void {}\n\n public onHeaderResponse(event: HttpHeaderResponse): void {}\n\n public onResponse(event: HttpResponse<ReturnType>): void {}\n\n public onProgressEvent(event: HttpProgressEvent): void {}\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n}\n","import {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n RxapRemoteMethodError,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Injectable,\n Inject,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {}\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectFlags\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAiDsB,oBAIpB,SAAQ,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,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,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,CA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