@rxap/remote-method 14.0.2 → 16.0.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/directive/lib/remote-method-template-collection.directive.d.ts +1 -1
  2. package/directive/lib/remote-method-template.directive.d.ts +1 -1
  3. package/directive/lib/remote-method.directive.d.ts +1 -1
  4. package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +335 -0
  5. package/esm2022/directive/lib/remote-method-template.directive.mjs +203 -0
  6. package/esm2022/directive/lib/remote-method.directive.mjs +167 -0
  7. package/esm2022/http/directive/lib/contenteditable.directive.mjs +88 -0
  8. package/esm2022/http/directive/lib/http-remote-method.directive.mjs +81 -0
  9. package/esm2022/http/lib/base-http.remote-method.mjs +83 -0
  10. package/esm2022/http/lib/http-remote-method.loader.mjs +31 -0
  11. package/esm2022/http/lib/http.remote-method.mjs +46 -0
  12. package/esm2022/lib/base.remote-method.mjs +74 -0
  13. package/esm2022/lib/proxy.remote-method.mjs +30 -0
  14. package/esm2022/lib/remote-method-loader.mjs +18 -0
  15. package/{fesm2020 → fesm2022}/rxap-remote-method-directive.mjs +91 -91
  16. package/{fesm2020 → fesm2022}/rxap-remote-method-directive.mjs.map +1 -1
  17. package/{fesm2020 → fesm2022}/rxap-remote-method-http-directive.mjs +14 -14
  18. package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -0
  19. package/{fesm2020 → fesm2022}/rxap-remote-method-http.mjs +9 -9
  20. package/{fesm2020 → fesm2022}/rxap-remote-method-http.mjs.map +1 -1
  21. package/{fesm2020 → fesm2022}/rxap-remote-method.mjs +9 -9
  22. package/{fesm2020 → fesm2022}/rxap-remote-method.mjs.map +1 -1
  23. package/http/directive/lib/contenteditable.directive.d.ts +1 -1
  24. package/http/directive/lib/http-remote-method.directive.d.ts +1 -1
  25. package/package.json +30 -43
  26. package/testing/lib/remote-method-testing-loader.d.ts +1 -1
  27. package/esm2020/directive/lib/remote-method-template-collection.directive.mjs +0 -333
  28. package/esm2020/directive/lib/remote-method-template.directive.mjs +0 -201
  29. package/esm2020/directive/lib/remote-method.directive.mjs +0 -165
  30. package/esm2020/http/directive/lib/contenteditable.directive.mjs +0 -86
  31. package/esm2020/http/directive/lib/http-remote-method.directive.mjs +0 -79
  32. package/esm2020/http/lib/base-http.remote-method.mjs +0 -82
  33. package/esm2020/http/lib/http-remote-method.loader.mjs +0 -30
  34. package/esm2020/http/lib/http.remote-method.mjs +0 -45
  35. package/esm2020/lib/base.remote-method.mjs +0 -73
  36. package/esm2020/lib/proxy.remote-method.mjs +0 -29
  37. package/esm2020/lib/remote-method-loader.mjs +0 -17
  38. package/fesm2015/rxap-remote-method-directive.mjs +0 -712
  39. package/fesm2015/rxap-remote-method-directive.mjs.map +0 -1
  40. package/fesm2015/rxap-remote-method-http-directive.mjs +0 -172
  41. package/fesm2015/rxap-remote-method-http-directive.mjs.map +0 -1
  42. package/fesm2015/rxap-remote-method-http.mjs +0 -158
  43. package/fesm2015/rxap-remote-method-http.mjs.map +0 -1
  44. package/fesm2015/rxap-remote-method-testing.mjs +0 -60
  45. package/fesm2015/rxap-remote-method-testing.mjs.map +0 -1
  46. package/fesm2015/rxap-remote-method.mjs +0 -137
  47. package/fesm2015/rxap-remote-method.mjs.map +0 -1
  48. package/fesm2020/rxap-remote-method-http-directive.mjs.map +0 -1
  49. /package/{esm2020 → esm2022}/directive/lib/error.mjs +0 -0
  50. /package/{esm2020 → esm2022}/directive/lib/tokens.mjs +0 -0
  51. /package/{esm2020 → esm2022}/directive/public_api.mjs +0 -0
  52. /package/{esm2020 → esm2022}/directive/rxap-remote-method-directive.mjs +0 -0
  53. /package/{esm2020 → esm2022}/http/directive/public_api.mjs +0 -0
  54. /package/{esm2020 → esm2022}/http/directive/rxap-remote-method-http-directive.mjs +0 -0
  55. /package/{esm2020 → esm2022}/http/public_api.mjs +0 -0
  56. /package/{esm2020 → esm2022}/http/rxap-remote-method-http.mjs +0 -0
  57. /package/{esm2020 → esm2022}/index.mjs +0 -0
  58. /package/{esm2020 → esm2022}/lib/error.mjs +0 -0
  59. /package/{esm2020 → esm2022}/lib/tokens.mjs +0 -0
  60. /package/{esm2020 → esm2022}/rxap-remote-method.mjs +0 -0
  61. /package/{esm2020 → esm2022}/testing/lib/remote-method-testing-loader.mjs +0 -0
  62. /package/{esm2020 → esm2022}/testing/public_api.mjs +0 -0
  63. /package/{esm2020 → esm2022}/testing/rxap-remote-method-testing.mjs +0 -0
  64. /package/{fesm2020 → fesm2022}/rxap-remote-method-testing.mjs +0 -0
  65. /package/{fesm2020 → fesm2022}/rxap-remote-method-testing.mjs.map +0 -0
@@ -1,137 +0,0 @@
1
- import { __awaiter } from 'tslib';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, Injector, InjectFlags, INJECTOR, Injectable, Optional, Inject } from '@angular/core';
4
- import { DefinitionMetadata, BaseDefinition, DefinitionLoader } from '@rxap/definition';
5
- import { Subject } from 'rxjs';
6
- import { RxapError } from '@rxap/utilities';
7
- import { CounterSubject } from '@rxap/utilities/rxjs';
8
-
9
- const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');
10
- const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');
11
-
12
- class RxapRemoteMethodError extends RxapError {
13
- constructor(message, code, className) {
14
- super('@rxap/remote-method', message, code, className);
15
- }
16
- }
17
-
18
- function RxapRemoteMethod(metadataOrId, className = 'BaseRemoteMethod', packageName = '@rxap/remote-method') {
19
- return function (target) {
20
- DefinitionMetadata(metadataOrId, className, packageName)(target);
21
- };
22
- }
23
- class BaseRemoteMethod extends BaseDefinition {
24
- constructor(injector = null, metaData = null) {
25
- super(metaData);
26
- this.executed$ = new Subject();
27
- this.executionsInProgress$ = new CounterSubject();
28
- this._pauseRefresh = false;
29
- if (injector === undefined) {
30
- throw new RxapRemoteMethodError('Injector is undefined. Ensure that the Injector is added to the deps property!', '', this.constructor.name);
31
- }
32
- this.injector = injector !== null && injector !== void 0 ? injector : Injector.NULL;
33
- if (typeof this.injector.get !== 'function') {
34
- throw new RxapRemoteMethodError('The property injector is not Injector like. Check the deps property!', '', this.constructor.name);
35
- }
36
- }
37
- call(parameters) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- this.init();
40
- this.executionsInProgress$.increase();
41
- const result = yield this._call(parameters);
42
- this.executionsInProgress$.decrease();
43
- this.executed$.next(result);
44
- this.executed(result);
45
- return result;
46
- });
47
- }
48
- executed(result) {
49
- if (!this._pauseRefresh) {
50
- this.refresh();
51
- }
52
- }
53
- pauseRefresh() {
54
- this._pauseRefresh = true;
55
- }
56
- resumeRefresh() {
57
- this._pauseRefresh = false;
58
- }
59
- refresh() {
60
- if (this.metadata.refresh) {
61
- for (const refresh of this.metadata.refresh) {
62
- const canRefresh = this.injector.get(refresh, null, InjectFlags.Optional);
63
- if (canRefresh) {
64
- canRefresh.refresh();
65
- }
66
- }
67
- }
68
- }
69
- }
70
- BaseRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
71
- BaseRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod });
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod, decorators: [{
73
- type: Injectable
74
- }], ctorParameters: function () {
75
- return [{ type: i0.Injector, decorators: [{
76
- type: Optional
77
- }, {
78
- type: Inject,
79
- args: [INJECTOR]
80
- }] }, { type: undefined, decorators: [{
81
- type: Optional
82
- }, {
83
- type: Inject,
84
- args: [REMOTE_METHOD_META_DATA]
85
- }] }];
86
- } });
87
-
88
- class RemoteMethodLoader extends DefinitionLoader {
89
- call$(remoteMethodIdOrInstanceOrToken, parameters, metadata, injector, notFoundValue, flags) {
90
- return __awaiter(this, void 0, void 0, function* () {
91
- return this
92
- .load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags)
93
- .call(parameters);
94
- });
95
- }
96
- }
97
- RemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
98
- RemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' });
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, decorators: [{
100
- type: Injectable,
101
- args: [{ providedIn: 'root' }]
102
- }] });
103
-
104
- class ProxyRemoteMethod extends BaseRemoteMethod {
105
- constructor(remoteMethod, injector = null, metadata = remoteMethod.metadata) {
106
- super(injector, metadata);
107
- this.remoteMethod = remoteMethod;
108
- }
109
- _call(parameters) {
110
- return __awaiter(this, void 0, void 0, function* () {
111
- return this.remoteMethod.call(yield this.transformParameters(parameters));
112
- });
113
- }
114
- }
115
- ProxyRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable });
116
- ProxyRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
118
- type: Injectable
119
- }], ctorParameters: function () {
120
- return [{ type: BaseRemoteMethod, decorators: [{
121
- type: Inject,
122
- args: [RXAP_PROXY_REMOTE_METHOD_TARGET]
123
- }] }, { type: i0.Injector, decorators: [{
124
- type: Inject,
125
- args: [INJECTOR]
126
- }] }, { type: undefined, decorators: [{
127
- type: Inject,
128
- args: [REMOTE_METHOD_META_DATA]
129
- }] }];
130
- } });
131
-
132
- /**
133
- * Generated bundle index. Do not edit.
134
- */
135
-
136
- export { BaseRemoteMethod, ProxyRemoteMethod, REMOTE_METHOD_META_DATA, RXAP_PROXY_REMOTE_METHOD_TARGET, RemoteMethodLoader, RxapRemoteMethod, RxapRemoteMethodError };
137
- //# sourceMappingURL=rxap-remote-method.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../libs/remote-method/src/lib/tokens.ts","../../../../libs/remote-method/src/lib/error.ts","../../../../libs/remote-method/src/lib/base.remote-method.ts","../../../../libs/remote-method/src/lib/remote-method-loader.ts","../../../../libs/remote-method/src/lib/proxy.remote-method.ts","../../../../libs/remote-method/src/rxap-remote-method.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');\nexport const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');\n","import { RxapError } from '@rxap/utilities';\n\nexport class RxapRemoteMethodError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/remote-method', message, code, className);\n }\n\n}\n\n","import {\n Injectable,\n Optional,\n Inject,\n Injector,\n Type,\n InjectionToken,\n AbstractType,\n InjectFlags,\n INJECTOR\n} from '@angular/core';\nimport { REMOTE_METHOD_META_DATA } from './tokens';\nimport {\n BaseDefinition,\n BaseDefinitionMetadata,\n DefinitionMetadata\n} from '@rxap/definition';\nimport { Subject } from 'rxjs';\nimport { RxapRemoteMethodError } from './error';\nimport { Refreshable } from '@rxap/utilities';\nimport { CounterSubject } from '@rxap/utilities/rxjs';\n\nexport interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {\n refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;\n}\n\nexport function RxapRemoteMethod<MetaData extends BaseDefinitionMetadata = BaseDefinitionMetadata>(\n metadataOrId: MetaData | string,\n className: string = 'BaseRemoteMethod',\n packageName: string = '@rxap/remote-method'\n) {\n return function(target: any) {\n DefinitionMetadata(metadataOrId, className, packageName)(target);\n };\n}\n\n@Injectable()\nexport abstract class BaseRemoteMethod<ReturnType = any,\n Parameter = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> extends BaseDefinition<Metadata> {\n\n public executed$: Subject<ReturnType> = new Subject<ReturnType>();\n\n public executionsInProgress$: CounterSubject = new CounterSubject();\n\n public readonly injector: Injector;\n\n private _pauseRefresh = false;\n\n constructor(\n @Optional()\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Optional()\n @Inject(REMOTE_METHOD_META_DATA)\n metaData: any | null = null\n ) {\n super(metaData);\n if (injector === undefined) {\n throw new RxapRemoteMethodError('Injector is undefined. Ensure that the Injector is added to the deps property!', '', this.constructor.name);\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError('The property injector is not Injector like. Check the deps property!', '', this.constructor.name);\n }\n }\n\n public async call(parameters?: Parameter): Promise<ReturnType> {\n this.init();\n this.executionsInProgress$.increase();\n const result = await this._call(parameters);\n this.executionsInProgress$.decrease();\n this.executed$.next(result);\n this.executed(result);\n return result;\n }\n\n public executed(result: ReturnType): void {\n if (!this._pauseRefresh) {\n this.refresh();\n }\n }\n\n public pauseRefresh(): void {\n this._pauseRefresh = true;\n }\n\n public resumeRefresh(): void {\n this._pauseRefresh = false;\n }\n\n public refresh(): void {\n if (this.metadata.refresh) {\n for (const refresh of this.metadata.refresh) {\n const canRefresh = this.injector.get(refresh, null, InjectFlags.Optional);\n if (canRefresh) {\n canRefresh.refresh();\n }\n }\n }\n }\n\n protected abstract _call(parameters?: Parameter): Promise<ReturnType> | ReturnType;\n\n}\n\n\n","import {\n Injectable,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n DefinitionLoader,\n IdOrInstanceOrToken\n} from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteMethodLoader extends DefinitionLoader {\n\n public async call$<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 ): Promise<ReturnType> {\n return this\n .load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n )\n .call(parameters);\n }\n\n}\n","import {\n Injectable,\n Inject,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n RXAP_PROXY_REMOTE_METHOD_TARGET,\n REMOTE_METHOD_META_DATA\n} from './tokens';\n\n@Injectable()\nexport abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter>\n extends BaseRemoteMethod<ReturnType, SourceParameter> {\n\n constructor(\n @Inject(RXAP_PROXY_REMOTE_METHOD_TARGET)\n private readonly remoteMethod: BaseRemoteMethod,\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Inject(REMOTE_METHOD_META_DATA)\n metadata: BaseRemoteMethodMetadata = remoteMethod.metadata,\n ) {\n super(injector, metadata);\n }\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\n\n public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CAAC,4CAA4C,EAAE;MAC3F,+BAA+B,GAAG,IAAI,cAAc,CAAC,iCAAiC;;ACD7F,MAAO,qBAAsB,SAAQ,SAAS,CAAA;AAElD,IAAA,WAAA,CAAY,OAAe,EAAE,IAAY,EAAE,SAAkB,EAAA;QAC3D,KAAK,CAAC,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KACxD;AAEF;;ACkBK,SAAU,gBAAgB,CAC9B,YAA+B,EAC/B,SAAsB,GAAA,kBAAkB,EACxC,WAAA,GAAsB,qBAAqB,EAAA;AAE3C,IAAA,OAAO,UAAS,MAAW,EAAA;QACzB,kBAAkB,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AACnE,KAAC,CAAC;AACJ,CAAC;AAGK,MAAgB,gBAEkD,SAAQ,cAAwB,CAAA;AAUtG,IAAA,WAAA,CAGI,QAA4B,GAAA,IAAI,EAGhC,QAAA,GAAuB,IAAI,EAAA;QAE7B,KAAK,CAAC,QAAQ,CAAC,CAAC;AAhBX,QAAA,IAAA,CAAA,SAAS,GAAwB,IAAI,OAAO,EAAc,CAAC;AAE3D,QAAA,IAAA,CAAA,qBAAqB,GAAmB,IAAI,cAAc,EAAE,CAAC;AAI5D,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;QAW5B,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,YAAA,MAAM,IAAI,qBAAqB,CAAC,gFAAgF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC9I,SAAA;AACD,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,KAAR,IAAA,IAAA,QAAQ,KAAR,KAA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EAAE,MAAM,EAAE,CAAA;;;ACE5B,MAAgB,iBACpB,SAAQ,gBAA6C,CAAA;IAErD,WAEmB,CAAA,YAA8B,EAE7C,QAA4B,GAAA,IAAI,EAEhC,QAAqC,GAAA,YAAY,CAAC,QAAQ,EAAA;AAE5D,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AANT,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;KAOhD;AAEe,IAAA,KAAK,CAAC,UAA4B,EAAA;;AAChD,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;SAC3E,CAAA,CAAA;AAAA,KAAA;;AAhBmB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAI3B,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,+BAA+B,EAE/B,EAAA,EAAA,KAAA,EAAA,QAAQ,aAER,uBAAuB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;;;8BAKN,MAAM;+BAAC,+BAA+B,CAAA;;8BAEtC,MAAM;+BAAC,QAAQ,CAAA;;8BAEf,MAAM;+BAAC,uBAAuB,CAAA;;;;ACxBnC;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-remote-method-http-directive.mjs","sources":["../../../../libs/remote-method/http/directive/src/lib/http-remote-method.directive.ts","../../../../libs/remote-method/http/directive/src/lib/contenteditable.directive.ts","../../../../libs/remote-method/http/directive/src/rxap-remote-method-http-directive.ts"],"sourcesContent":["import {\n Directive,\n Input,\n NgModule\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\nimport { RemoteMethodDirective } from '@rxap/remote-method/directive';\nimport {\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from '@rxap/remote-method/http';\nimport { BaseRemoteMethod } from '@rxap/remote-method';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Directive({\n selector: 'button[rxapHttpRemoteMethod]'\n})\nexport class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {\n\n @Input()\n public set headers(headers: HttpRemoteMethodParameter['headers']) {\n this.updateParameters({ headers });\n }\n\n @Input()\n public set reportProgress(reportProgress: HttpRemoteMethodParameter['reportProgress']) {\n this.updateParameters({ reportProgress });\n }\n\n @Input()\n public set params(params: HttpRemoteMethodParameter['params']) {\n this.updateParameters({ params });\n }\n\n @Input()\n public set responseType(responseType: HttpRemoteMethodParameter['responseType']) {\n this.updateParameters({ responseType });\n }\n\n @Input()\n public set withCredentials(withCredentials: HttpRemoteMethodParameter['withCredentials']) {\n this.updateParameters({ withCredentials });\n }\n\n @Input()\n public set body(body: HttpRemoteMethodParameter['body']) {\n this.updateParameters({ body });\n }\n\n @Input()\n public set setHeaders(setHeaders: HttpRemoteMethodParameter['setHeaders']) {\n this.updateParameters({ setHeaders });\n }\n\n @Input()\n public set setParams(setParams: HttpRemoteMethodParameter['setParams']) {\n this.updateParameters({ setParams });\n }\n\n @Input()\n public set pathParams(pathParams: HttpRemoteMethodParameter['pathParams']) {\n this.updateParameters({ pathParams });\n }\n\n @Input('rxapHttpRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n}\n\n@NgModule({\n declarations: [ HttpRemoteMethodDirective ],\n exports: [ HttpRemoteMethodDirective ]\n})\nexport class HttpRemoteMethodDirectiveModule {}\n","import {\n Directive,\n Input,\n HostListener,\n NgModule,\n HostBinding,\n Inject,\n} from '@angular/core';\nimport { Required, DebounceCall } from '@rxap/utilities';\nimport { HttpRemoteMethodLoader } from '@rxap/remote-method/http';\n\n@Directive({\n selector: '[rxapContenteditable]',\n})\nexport class ContenteditableDirective {\n @HostBinding('attr.contenteditable')\n public contenteditable = true;\n\n @Input('rxapContenteditable')\n @Required\n public remoteMethodId!: string;\n\n @Input()\n @Required\n public property!: string;\n\n @Input()\n @Required\n public uuid!: string;\n\n constructor(\n @Inject(HttpRemoteMethodLoader)\n private readonly httpRemoteMethodLoader: HttpRemoteMethodLoader\n ) {}\n\n @HostListener('click', ['$event'])\n public onClick($event: Event) {\n $event.stopPropagation();\n }\n\n @HostListener('input', ['$event'])\n @DebounceCall(1000)\n public onInput($event: any) {\n const value = ($event.target as HTMLElement).textContent;\n if (value && value.length > 3) {\n return this.httpRemoteMethodLoader.request$(this.remoteMethodId, {\n pathParams: { uuid: this.uuid },\n body: { [this.property]: value },\n });\n }\n return Promise.resolve();\n }\n}\n\n/**\n * @deprecated removed\n */\n@NgModule({\n declarations: [ContenteditableDirective],\n exports: [ContenteditableDirective],\n})\nexport class ContenteditableDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAiBM,MAAO,yBAAkH,SAAQ,qBAAsE,CAAA;IAE3M,IACW,OAAO,CAAC,OAA6C,EAAA;AAC9D,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;KACpC;IAED,IACW,cAAc,CAAC,cAA2D,EAAA;AACnF,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;KAC3C;IAED,IACW,MAAM,CAAC,MAA2C,EAAA;AAC3D,QAAA,IAAI,CAAC,gBAAgB,CAAC,EAAE,MAAM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BAA8B,EAAA,UAAA,EAAA,CAAA;kBAJ1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA,CAAA;;;AC5DD;;AAEG;;;;"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes