@rxap/remote-method 16.0.3-dev.0 → 17.0.1-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/directive/index.d.ts +2 -2
  4. package/esm2022/directive/index.mjs +5 -3
  5. package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +6 -6
  6. package/esm2022/directive/lib/remote-method-template.directive.mjs +6 -6
  7. package/esm2022/directive/lib/remote-method.directive.mjs +6 -6
  8. package/esm2022/http/directive/index.mjs +4 -2
  9. package/esm2022/http/directive/lib/contenteditable.directive.mjs +6 -6
  10. package/esm2022/http/directive/lib/http-remote-method.directive.mjs +4 -4
  11. package/esm2022/http/index.mjs +5 -3
  12. package/esm2022/http/lib/base-http.remote-method.mjs +6 -6
  13. package/esm2022/http/lib/http-remote-method.loader.mjs +6 -6
  14. package/esm2022/http/lib/http.remote-method.mjs +4 -4
  15. package/esm2022/index.mjs +5 -3
  16. package/esm2022/lib/base.remote-method.mjs +6 -6
  17. package/esm2022/lib/proxy.remote-method.mjs +6 -6
  18. package/esm2022/lib/remote-method-loader.mjs +4 -4
  19. package/esm2022/testing/index.mjs +3 -1
  20. package/esm2022/testing/lib/remote-method-testing-loader.mjs +1 -1
  21. package/fesm2022/rxap-remote-method-directive.mjs +167 -164
  22. package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
  23. package/fesm2022/rxap-remote-method-http-directive.mjs +67 -64
  24. package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
  25. package/fesm2022/rxap-remote-method-http.mjs +17 -14
  26. package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
  27. package/fesm2022/rxap-remote-method-testing.mjs +3 -0
  28. package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
  29. package/fesm2022/rxap-remote-method.mjs +27 -24
  30. package/fesm2022/rxap-remote-method.mjs.map +1 -1
  31. package/http/directive/index.d.ts +1 -1
  32. package/http/index.d.ts +2 -2
  33. package/index.d.ts +2 -2
  34. package/package.json +14 -15
@@ -1,159 +1,19 @@
1
- import { __decorate, __metadata } from 'tslib';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, EventEmitter, Injector, isDevMode, INJECTOR, Directive, Inject, Optional, Self, Input, Output, HostListener, TemplateRef, ViewContainerRef, ChangeDetectorRef, IterableDiffers, NgZone } from '@angular/core';
4
1
  import * as i1 from '@rxap/remote-method';
5
- import { RemoteMethodLoader, RxapRemoteMethodError } from '@rxap/remote-method';
6
- import { coerceBoolean, Deprecated } from '@rxap/utilities';
7
- import { ToggleSubject } from '@rxap/rxjs';
2
+ import { RxapRemoteMethodError, RemoteMethodLoader } from '@rxap/remote-method';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, isDevMode, TemplateRef, INJECTOR, ViewContainerRef, ChangeDetectorRef, IterableDiffers, NgZone, Directive, Inject, Optional, Self, Input, EventEmitter, Output, Injector, HostListener } from '@angular/core';
8
5
  import { take, tap } from 'rxjs/operators';
6
+ import { __decorate, __metadata } from 'tslib';
7
+ import { Deprecated, coerceBoolean } from '@rxap/utilities';
8
+ import { ToggleSubject } from '@rxap/rxjs';
9
9
 
10
- const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');
11
-
12
- class RemoteMethodDirective {
13
- constructor(remoteMethodLoader, injector = Injector.NULL, remoteMethodToken) {
14
- this.remoteMethodLoader = remoteMethodLoader;
15
- this.injector = injector;
16
- this.remoteMethodToken = remoteMethodToken;
17
- // eslint-disable-next-line @angular-eslint/no-output-rename
18
- this.executed$ = new EventEmitter();
19
- // eslint-disable-next-line @angular-eslint/no-output-rename
20
- this.failure$ = new EventEmitter();
21
- // eslint-disable-next-line @angular-eslint/no-output-rename
22
- this.successful$ = new EventEmitter();
23
- this.immediately = false;
24
- /**
25
- * true - a remote method call is in progress
26
- */
27
- this.executing$ = new ToggleSubject();
28
- this._hasConfirmDirective = false;
29
- if (this.remoteMethodToken) {
30
- this._remoteMethodOrIdOrToken = this.remoteMethodToken;
31
- }
32
- }
33
- set remoteMethodOrIdOrToken(value) {
34
- if (value) {
35
- this._remoteMethodOrIdOrToken = value;
36
- }
37
- }
38
- // eslint-disable-next-line @angular-eslint/no-input-rename
39
- set hasConfirmDirective(value) {
40
- this._hasConfirmDirective = coerceBoolean(value);
41
- }
42
- ngOnInit() {
43
- if (this.immediately) {
44
- this.execute();
45
- }
46
- }
47
- onConfirmed() {
48
- this.execute();
49
- }
50
- onClick() {
51
- if (!this._hasConfirmDirective) {
52
- this.execute();
53
- }
54
- else {
55
- console.debug('skip remote method call. Wait for confirmation.');
56
- }
57
- }
58
- async execute() {
59
- this.executing$.enable();
60
- try {
61
- const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
62
- this.executed(result);
63
- this.successful(result);
64
- }
65
- catch (error) {
66
- if (isDevMode()) {
67
- console.error(`Remote method directive execution failed:`, error.message);
68
- }
69
- this.failure(error);
70
- }
71
- finally {
72
- this.executing$.disable();
73
- }
74
- }
75
- setParameter(parameterKey, value) {
76
- this.updateParameters({ [parameterKey]: value });
77
- }
78
- updateParameters(parameters) {
79
- this.parameters = { ...(this.parameters ?? {}), ...parameters };
80
- }
81
- executed(result) {
82
- this.executed$.emit(result);
83
- }
84
- failure(error) {
85
- this.failure$.emit(error);
86
- }
87
- successful(result) {
88
- this.successful$.emit(result);
89
- }
90
- /**
91
- * @deprecated removed
92
- * @protected
93
- */
94
- async call() {
95
- this.executing$.enable();
96
- const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
97
- this.executing$.disable();
98
- return result;
10
+ class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
11
+ constructor(message, code, scope) {
12
+ super(message, code ?? '', scope);
99
13
  }
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
101
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RemoteMethodDirective, isStandalone: true, selector: "[rxapRemoteMethod]", inputs: { parameters: "parameters", metadata: "metadata", immediately: "immediately", remoteMethodOrIdOrToken: ["rxapRemoteMethod", "remoteMethodOrIdOrToken"], hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, exportAs: ["rxapRemoteMethod"], ngImport: i0 }); }
102
14
  }
103
- __decorate([
104
- Deprecated('removed'),
105
- __metadata("design:type", Function),
106
- __metadata("design:paramtypes", []),
107
- __metadata("design:returntype", Promise)
108
- ], RemoteMethodDirective.prototype, "call", null);
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoteMethodDirective, decorators: [{
110
- type: Directive,
111
- args: [{
112
- selector: '[rxapRemoteMethod]',
113
- exportAs: 'rxapRemoteMethod',
114
- standalone: true,
115
- }]
116
- }], ctorParameters: function () { return [{ type: i1.RemoteMethodLoader, decorators: [{
117
- type: Inject,
118
- args: [RemoteMethodLoader]
119
- }] }, { type: i0.Injector, decorators: [{
120
- type: Inject,
121
- args: [INJECTOR]
122
- }] }, { type: undefined, decorators: [{
123
- type: Optional
124
- }, {
125
- type: Self
126
- }, {
127
- type: Inject,
128
- args: [RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN]
129
- }] }]; }, propDecorators: { parameters: [{
130
- type: Input
131
- }], metadata: [{
132
- type: Input
133
- }], executed$: [{
134
- type: Output,
135
- args: ['executed']
136
- }], failure$: [{
137
- type: Output,
138
- args: ['failure']
139
- }], successful$: [{
140
- type: Output,
141
- args: ['successful']
142
- }], immediately: [{
143
- type: Input
144
- }], remoteMethodOrIdOrToken: [{
145
- type: Input,
146
- args: ['rxapRemoteMethod']
147
- }], hasConfirmDirective: [{
148
- type: Input,
149
- args: ['rxapConfirm']
150
- }], onConfirmed: [{
151
- type: HostListener,
152
- args: ['confirmed']
153
- }], onClick: [{
154
- type: HostListener,
155
- args: ['click']
156
- }], call: [] } });
15
+
16
+ const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');
157
17
 
158
18
  class RemoteMethodTemplateCollectionDirectiveContext {
159
19
  constructor($implicit, index, count) {
@@ -412,17 +272,17 @@ class RemoteMethodTemplateCollectionDirective {
412
272
  perViewChange(view, record) {
413
273
  view.context.$implicit = record.item;
414
274
  }
415
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
416
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RemoteMethodTemplateCollectionDirective, isStandalone: true, selector: "[rxapRemoteMethodCollection]", inputs: { parameters: ["rxapRemoteMethodCollectionParameters", "parameters"], emptyTemplate: ["rxapRemoteMethodCollectionEmpty", "emptyTemplate"], errorTemplate: ["rxapRemoteMethodCollectionError", "errorTemplate"], withoutParameters: ["rxapRemoteMethodCollectionWithoutParameters", "withoutParameters"], trackBy: ["rxapRemoteMethodCollectionTrackBy", "trackBy"], remoteMethodOrIdOrToken: ["rxapRemoteMethodCollectionCall", "remoteMethodOrIdOrToken"] }, exportAs: ["rxapRemoteMethodCollection"], usesOnChanges: true, ngImport: i0 }); }
275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.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 }); }
276
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: RemoteMethodTemplateCollectionDirective, isStandalone: true, selector: "[rxapRemoteMethodCollection]", inputs: { parameters: ["rxapRemoteMethodCollectionParameters", "parameters"], emptyTemplate: ["rxapRemoteMethodCollectionEmpty", "emptyTemplate"], errorTemplate: ["rxapRemoteMethodCollectionError", "errorTemplate"], withoutParameters: ["rxapRemoteMethodCollectionWithoutParameters", "withoutParameters"], trackBy: ["rxapRemoteMethodCollectionTrackBy", "trackBy"], remoteMethodOrIdOrToken: ["rxapRemoteMethodCollectionCall", "remoteMethodOrIdOrToken"] }, exportAs: ["rxapRemoteMethodCollection"], usesOnChanges: true, ngImport: i0 }); }
417
277
  }
418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: RemoteMethodTemplateCollectionDirective, decorators: [{
419
279
  type: Directive,
420
280
  args: [{
421
281
  selector: '[rxapRemoteMethodCollection]',
422
282
  exportAs: 'rxapRemoteMethodCollection',
423
283
  standalone: true,
424
284
  }]
425
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
285
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
426
286
  type: Inject,
427
287
  args: [TemplateRef]
428
288
  }] }, { type: i1.RemoteMethodLoader, decorators: [{
@@ -450,7 +310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
450
310
  }, {
451
311
  type: Inject,
452
312
  args: [RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN]
453
- }] }]; }, propDecorators: { parameters: [{
313
+ }] }], propDecorators: { parameters: [{
454
314
  type: Input,
455
315
  args: ['rxapRemoteMethodCollectionParameters']
456
316
  }], emptyTemplate: [{
@@ -586,8 +446,8 @@ class RemoteMethodTemplateDirective {
586
446
  this.viewContainerRef.createEmbeddedView(this.loadingTemplate);
587
447
  }
588
448
  }
589
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
590
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RemoteMethodTemplateDirective, isStandalone: true, selector: "[rxapRemoteMethod]", inputs: { metadata: ["rxapRemoteMethodMetadata", "metadata"], parameters: ["rxapRemoteMethodParameters", "parameters"], errorTemplate: ["rxapRemoteMethodError", "errorTemplate"], loadingTemplate: ["rxapRemoteMethodLoading", "loadingTemplate"], withoutParameters: ["rxapRemoteMethodWithoutParameters", "withoutParameters"], remoteMethodOrIdOrToken: ["rxapRemoteMethodCall", "remoteMethodOrIdOrToken"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful", embedded: "embedded" }, exportAs: ["rxapRemoteMethod"], usesOnChanges: true, ngImport: i0 }); }
449
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.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 }); }
450
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: RemoteMethodTemplateDirective, isStandalone: true, selector: "[rxapRemoteMethod]", inputs: { metadata: ["rxapRemoteMethodMetadata", "metadata"], parameters: ["rxapRemoteMethodParameters", "parameters"], errorTemplate: ["rxapRemoteMethodError", "errorTemplate"], loadingTemplate: ["rxapRemoteMethodLoading", "loadingTemplate"], withoutParameters: ["rxapRemoteMethodWithoutParameters", "withoutParameters"], remoteMethodOrIdOrToken: ["rxapRemoteMethodCall", "remoteMethodOrIdOrToken"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful", embedded: "embedded" }, exportAs: ["rxapRemoteMethod"], usesOnChanges: true, ngImport: i0 }); }
591
451
  }
592
452
  __decorate([
593
453
  Deprecated('removed'),
@@ -595,14 +455,14 @@ __decorate([
595
455
  __metadata("design:paramtypes", [Object]),
596
456
  __metadata("design:returntype", void 0)
597
457
  ], RemoteMethodTemplateDirective.prototype, "call", null);
598
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: RemoteMethodTemplateDirective, decorators: [{
599
459
  type: Directive,
600
460
  args: [{
601
461
  selector: '[rxapRemoteMethod]',
602
462
  exportAs: 'rxapRemoteMethod',
603
463
  standalone: true,
604
464
  }]
605
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
465
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
606
466
  type: Inject,
607
467
  args: [TemplateRef]
608
468
  }] }, { type: i1.RemoteMethodLoader, decorators: [{
@@ -624,7 +484,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
624
484
  }, {
625
485
  type: Inject,
626
486
  args: [RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN]
627
- }] }]; }, propDecorators: { executed$: [{
487
+ }] }], propDecorators: { executed$: [{
628
488
  type: Output,
629
489
  args: ['executed']
630
490
  }], failure$: [{
@@ -655,11 +515,154 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
655
515
  args: ['rxapRemoteMethodCall']
656
516
  }], call: [] } });
657
517
 
658
- class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
659
- constructor(message, code, scope) {
660
- super(message, code ?? '', scope);
518
+ class RemoteMethodDirective {
519
+ constructor(remoteMethodLoader, injector = Injector.NULL, remoteMethodToken) {
520
+ this.remoteMethodLoader = remoteMethodLoader;
521
+ this.injector = injector;
522
+ this.remoteMethodToken = remoteMethodToken;
523
+ // eslint-disable-next-line @angular-eslint/no-output-rename
524
+ this.executed$ = new EventEmitter();
525
+ // eslint-disable-next-line @angular-eslint/no-output-rename
526
+ this.failure$ = new EventEmitter();
527
+ // eslint-disable-next-line @angular-eslint/no-output-rename
528
+ this.successful$ = new EventEmitter();
529
+ this.immediately = false;
530
+ /**
531
+ * true - a remote method call is in progress
532
+ */
533
+ this.executing$ = new ToggleSubject();
534
+ this._hasConfirmDirective = false;
535
+ if (this.remoteMethodToken) {
536
+ this._remoteMethodOrIdOrToken = this.remoteMethodToken;
537
+ }
538
+ }
539
+ set remoteMethodOrIdOrToken(value) {
540
+ if (value) {
541
+ this._remoteMethodOrIdOrToken = value;
542
+ }
543
+ }
544
+ // eslint-disable-next-line @angular-eslint/no-input-rename
545
+ set hasConfirmDirective(value) {
546
+ this._hasConfirmDirective = coerceBoolean(value);
547
+ }
548
+ ngOnInit() {
549
+ if (this.immediately) {
550
+ this.execute();
551
+ }
552
+ }
553
+ onConfirmed() {
554
+ this.execute();
555
+ }
556
+ onClick() {
557
+ if (!this._hasConfirmDirective) {
558
+ this.execute();
559
+ }
560
+ else {
561
+ console.debug('skip remote method call. Wait for confirmation.');
562
+ }
563
+ }
564
+ async execute() {
565
+ this.executing$.enable();
566
+ try {
567
+ const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
568
+ this.executed(result);
569
+ this.successful(result);
570
+ }
571
+ catch (error) {
572
+ if (isDevMode()) {
573
+ console.error(`Remote method directive execution failed:`, error.message);
574
+ }
575
+ this.failure(error);
576
+ }
577
+ finally {
578
+ this.executing$.disable();
579
+ }
580
+ }
581
+ setParameter(parameterKey, value) {
582
+ this.updateParameters({ [parameterKey]: value });
583
+ }
584
+ updateParameters(parameters) {
585
+ this.parameters = { ...(this.parameters ?? {}), ...parameters };
586
+ }
587
+ executed(result) {
588
+ this.executed$.emit(result);
661
589
  }
590
+ failure(error) {
591
+ this.failure$.emit(error);
592
+ }
593
+ successful(result) {
594
+ this.successful$.emit(result);
595
+ }
596
+ /**
597
+ * @deprecated removed
598
+ * @protected
599
+ */
600
+ async call() {
601
+ this.executing$.enable();
602
+ const result = await this.remoteMethodLoader.call$(this._remoteMethodOrIdOrToken, this.parameters, this.metadata, this.injector);
603
+ this.executing$.disable();
604
+ return result;
605
+ }
606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: RemoteMethodDirective, deps: [{ token: RemoteMethodLoader }, { token: INJECTOR }, { token: RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
607
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: RemoteMethodDirective, isStandalone: true, selector: "[rxapRemoteMethod]", inputs: { parameters: "parameters", metadata: "metadata", immediately: "immediately", remoteMethodOrIdOrToken: ["rxapRemoteMethod", "remoteMethodOrIdOrToken"], hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, exportAs: ["rxapRemoteMethod"], ngImport: i0 }); }
662
608
  }
609
+ __decorate([
610
+ Deprecated('removed'),
611
+ __metadata("design:type", Function),
612
+ __metadata("design:paramtypes", []),
613
+ __metadata("design:returntype", Promise)
614
+ ], RemoteMethodDirective.prototype, "call", null);
615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: RemoteMethodDirective, decorators: [{
616
+ type: Directive,
617
+ args: [{
618
+ selector: '[rxapRemoteMethod]',
619
+ exportAs: 'rxapRemoteMethod',
620
+ standalone: true,
621
+ }]
622
+ }], ctorParameters: () => [{ type: i1.RemoteMethodLoader, decorators: [{
623
+ type: Inject,
624
+ args: [RemoteMethodLoader]
625
+ }] }, { type: i0.Injector, decorators: [{
626
+ type: Inject,
627
+ args: [INJECTOR]
628
+ }] }, { type: undefined, decorators: [{
629
+ type: Optional
630
+ }, {
631
+ type: Self
632
+ }, {
633
+ type: Inject,
634
+ args: [RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN]
635
+ }] }], propDecorators: { parameters: [{
636
+ type: Input
637
+ }], metadata: [{
638
+ type: Input
639
+ }], executed$: [{
640
+ type: Output,
641
+ args: ['executed']
642
+ }], failure$: [{
643
+ type: Output,
644
+ args: ['failure']
645
+ }], successful$: [{
646
+ type: Output,
647
+ args: ['successful']
648
+ }], immediately: [{
649
+ type: Input
650
+ }], remoteMethodOrIdOrToken: [{
651
+ type: Input,
652
+ args: ['rxapRemoteMethod']
653
+ }], hasConfirmDirective: [{
654
+ type: Input,
655
+ args: ['rxapConfirm']
656
+ }], onConfirmed: [{
657
+ type: HostListener,
658
+ args: ['confirmed']
659
+ }], onClick: [{
660
+ type: HostListener,
661
+ args: ['click']
662
+ }], call: [] } });
663
+
664
+ // region
665
+ // endregion
663
666
 
664
667
  /**
665
668
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../../packages/angular/remote-method/directive/src/lib/tokens.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/error.ts","../../../../../packages/angular/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 Directive,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n coerceBoolean,\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n\n @Input()\n public parameters?: Parameters;\n @Input()\n public metadata?: Metadata;\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input()\n public immediately = false;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\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 private _hasConfirmDirective = false;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\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$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\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$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\n this.executing$.disable();\n return result;\n }\n\n}\n\n\n","import {\n ChangeDetectorRef,\n Directive,\n DoCheck,\n EmbeddedViewRef,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnChanges,\n OnInit,\n Optional,\n Self,\n SimpleChanges,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\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 take,\n tap,\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\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\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection',\n standalone: true,\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, DoCheck, OnInit {\n\n @Input('rxapRemoteMethodCollectionParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionEmpty')\n public emptyTemplate?: TemplateRef<void>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;\n @Input('rxapRemoteMethodCollectionWithoutParameters')\n public withoutParameters = false;\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _trackByFn!: TrackByFunction<ReturnType>;\n private _dirty = true;\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 * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\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 * 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 get trackBy(): TrackByFunction<ReturnType> {\n return this._trackByFn;\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\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 * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\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 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 /**\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, {\n $implicit: this._error,\n message: this._error.message,\n name: this._error.name,\n });\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 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(\n item,\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view,\n );\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,\n ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(\n 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>>,\n record: IterableChangeRecord<any>,\n ) {\n view.context.$implicit = record.item;\n }\n\n}\n\n\n","import {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnChanges,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/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 standalone: true,\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 // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input('rxapRemoteMethodMetadata')\n public metadata?: Metadata;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n @Input('rxapRemoteMethodParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodLoading')\n public loadingTemplate?: TemplateRef<void>;\n @Input('rxapRemoteMethodWithoutParameters')\n public withoutParameters = false;\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\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 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$(\n this._remoteMethodOrIdOrToken,\n parameters,\n this.metadata,\n this.injector,\n );\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 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(\n this.errorTemplate,\n {\n $implicit: error,\n message: error.message,\n },\n );\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n private renderLoadingTemplate() {\n if (this.loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.loadingTemplate);\n }\n }\n\n}\n\n\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,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AC,iBAAiB,CAAA;;0BAExB,QAAQ;;0BACR,IAAI;;0BACJ,MAAM;2BAAC,kCAAkC,CAAA;4CAvCrC,SAAS,EAAA,CAAA;sBADf,MAAM;uBAAC,UAAU,CAAA;gBAIX,QAAQ,EAAA,CAAA;sBADd,MAAM;uBAAC,SAAS,CAAA;gBAIV,WAAW,EAAA,CAAA;sBADjB,MAAM;uBAAC,YAAY,CAAA;gBAGb,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,0BAA0B,CAAA;gBAO1B,UAAU,EAAA,CAAA;sBADhB,KAAK;uBAAC,4BAA4B,CAAA;gBAI5B,aAAa,EAAA,CAAA;sBADnB,KAAK;uBAAC,uBAAuB,CAAA;gBAIvB,eAAe,EAAA,CAAA;sBADrB,KAAK;uBAAC,yBAAyB,CAAA;gBAGzB,iBAAiB,EAAA,CAAA;sBADvB,KAAK;uBAAC,mCAAmC,CAAA;gBAGnC,QAAQ,EAAA,CAAA;sBADd,MAAM;gBA4BI,uBAAuB,EAAA,CAAA;sBADjC,KAAK;uBAAC,sBAAsB,CAAA;gBAuDtB,IAAI,EAAA,EAAA,EAAA,EAAA,CAAA;;AC9JP,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;KACnC;AAEF;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../../packages/angular/remote-method/directive/src/lib/error.ts","../../../../../packages/angular/remote-method/directive/src/lib/tokens.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method.directive.ts","../../../../../packages/angular/remote-method/directive/src/index.ts","../../../../../packages/angular/remote-method/directive/src/rxap-remote-method-directive.ts"],"sourcesContent":["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","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');\n","import {\n ChangeDetectorRef,\n Directive,\n DoCheck,\n EmbeddedViewRef,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnChanges,\n OnInit,\n Optional,\n Self,\n SimpleChanges,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\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 take,\n tap,\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\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\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection',\n standalone: true,\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, DoCheck, OnInit {\n\n @Input('rxapRemoteMethodCollectionParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionEmpty')\n public emptyTemplate?: TemplateRef<void>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;\n @Input('rxapRemoteMethodCollectionWithoutParameters')\n public withoutParameters = false;\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _trackByFn!: TrackByFunction<ReturnType>;\n private _dirty = true;\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 * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\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 * 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 get trackBy(): TrackByFunction<ReturnType> {\n return this._trackByFn;\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\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 * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\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 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 /**\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, {\n $implicit: this._error,\n message: this._error.message,\n name: this._error.name,\n });\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 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(\n item,\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view,\n );\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,\n ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(\n 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>>,\n record: IterableChangeRecord<any>,\n ) {\n view.context.$implicit = record.item;\n }\n\n}\n\n\n","import {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnChanges,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/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 standalone: true,\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 // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input('rxapRemoteMethodMetadata')\n public metadata?: Metadata;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n @Input('rxapRemoteMethodParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodLoading')\n public loadingTemplate?: TemplateRef<void>;\n @Input('rxapRemoteMethodWithoutParameters')\n public withoutParameters = false;\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\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 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$(\n this._remoteMethodOrIdOrToken,\n parameters,\n this.metadata,\n this.injector,\n );\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 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(\n this.errorTemplate,\n {\n $implicit: error,\n message: error.message,\n },\n );\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n private renderLoadingTemplate() {\n if (this.loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.loadingTemplate);\n }\n }\n\n}\n\n\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n coerceBoolean,\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n\n @Input()\n public parameters?: Parameters;\n @Input()\n public metadata?: Metadata;\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input()\n public immediately = false;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\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 protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\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 private _hasConfirmDirective = false;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\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$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\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$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\n this.executing$.disable();\n return result;\n }\n\n}\n\n\n","// region \nexport * from './lib/error';\nexport * from './lib/remote-method-template-collection.directive';\nexport * from './lib/remote-method-template.directive';\nexport * from './lib/remote-method.directive';\nexport * from './lib/tokens';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;QACxD,K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