@rxap/remote-method 19.2.0 → 21.0.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/compodoc/changelog.html +32 -0
  3. package/compodoc/dependencies.html +7 -7
  4. package/compodoc/injectables/BaseRemoteMethod.html +20 -21
  5. package/compodoc/injectables/ProxyRemoteMethod.html +10 -10
  6. package/compodoc/injectables/RemoteMethodLoader.html +5 -5
  7. package/compodoc/interfaces/BaseRemoteMethodMetadata.html +2 -3
  8. package/compodoc/js/search/search_index.js +2 -2
  9. package/compodoc/properties.html +1 -1
  10. package/docs/documentation.json +404 -418
  11. package/docs/html/assets/hierarchy.js +1 -1
  12. package/docs/html/classes/BaseRemoteMethod.html +10 -10
  13. package/docs/html/classes/ProxyRemoteMethod.html +10 -10
  14. package/docs/html/classes/RemoteMethodLoader.html +2 -2
  15. package/docs/html/classes/RxapRemoteMethodError.html +6 -5
  16. package/docs/html/functions/RxapRemoteMethod.html +1 -1
  17. package/docs/html/hierarchy.html +1 -1
  18. package/docs/html/index.html +2 -2
  19. package/docs/html/interfaces/BaseRemoteMethodMetadata.html +2 -2
  20. package/docs/html/modules.html +1 -1
  21. package/docs/html/variables/REMOTE_METHOD_META_DATA.html +1 -1
  22. package/docs/html/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.html +1 -1
  23. package/docs/markdown/README.md +1 -1
  24. package/docs/markdown/classes/BaseRemoteMethod.md +31 -31
  25. package/docs/markdown/classes/ProxyRemoteMethod.md +32 -32
  26. package/docs/markdown/classes/RemoteMethodLoader.md +7 -15
  27. package/docs/markdown/classes/RxapRemoteMethodError.md +25 -13
  28. package/docs/markdown/functions/RxapRemoteMethod.md +2 -2
  29. package/docs/markdown/globals.md +2 -2
  30. package/docs/markdown/interfaces/BaseRemoteMethodMetadata.md +5 -5
  31. package/docs/markdown/variables/REMOTE_METHOD_META_DATA.md +2 -2
  32. package/docs/markdown/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.md +2 -2
  33. package/docs/wiki/Class.BaseRemoteMethod.md +30 -30
  34. package/docs/wiki/Class.ProxyRemoteMethod.md +31 -31
  35. package/docs/wiki/Class.RemoteMethodLoader.md +6 -14
  36. package/docs/wiki/Class.RxapRemoteMethodError.md +24 -12
  37. package/docs/wiki/Function.RxapRemoteMethod.md +1 -1
  38. package/docs/wiki/Interface.BaseRemoteMethodMetadata.md +4 -4
  39. package/docs/wiki/Variable.REMOTE_METHOD_META_DATA.md +1 -1
  40. package/docs/wiki/Variable.RXAP_PROXY_REMOTE_METHOD_TARGET.md +1 -1
  41. package/docs/wiki/globals.md +1 -1
  42. package/fesm2022/rxap-remote-method-directive.mjs +162 -308
  43. package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
  44. package/fesm2022/rxap-remote-method-http-directive.mjs +52 -91
  45. package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
  46. package/fesm2022/rxap-remote-method-http.mjs +13 -20
  47. package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
  48. package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
  49. package/fesm2022/rxap-remote-method.mjs +12 -12
  50. package/fesm2022/rxap-remote-method.mjs.map +1 -1
  51. package/package.json +25 -24
  52. package/types/rxap-remote-method-directive.d.ts +211 -0
  53. package/types/rxap-remote-method-http-directive.d.ts +40 -0
  54. package/types/rxap-remote-method-http.d.ts +68 -0
  55. package/{testing/lib/remote-method-testing-loader.d.ts → types/rxap-remote-method-testing.d.ts} +9 -5
  56. package/types/rxap-remote-method.d.ts +53 -0
  57. package/directive/index.d.ts +0 -5
  58. package/directive/lib/error.d.ts +0 -4
  59. package/directive/lib/remote-method-template-collection.directive.d.ts +0 -118
  60. package/directive/lib/remote-method-template.directive.d.ts +0 -54
  61. package/directive/lib/remote-method.directive.d.ts +0 -41
  62. package/directive/lib/tokens.d.ts +0 -2
  63. package/http/directive/index.d.ts +0 -2
  64. package/http/directive/lib/contenteditable.directive.d.ts +0 -14
  65. package/http/directive/lib/http-remote-method.directive.d.ts +0 -19
  66. package/http/index.d.ts +0 -3
  67. package/http/lib/base-http.remote-method.d.ts +0 -44
  68. package/http/lib/http-remote-method.loader.d.ts +0 -11
  69. package/http/lib/http.remote-method.d.ts +0 -14
  70. package/index.d.ts +0 -5
  71. package/lib/base.remote-method.d.ts +0 -27
  72. package/lib/error.d.ts +0 -4
  73. package/lib/proxy.remote-method.d.ts +0 -11
  74. package/lib/remote-method-loader.d.ts +0 -9
  75. package/lib/tokens.d.ts +0 -3
  76. package/testing/index.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../../packages/angular/remote-method/http/src/lib/base-http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../../packages/angular/remote-method/http/src/index.ts","../../../../../packages/angular/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n HttpClient,\n HttpContext,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n context?: HttpContext;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n context?: HttpContext;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n public timeout = 60 * 1000;\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null,\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError(\n 'HttpClient is undefined. Ensure that the HttpClient is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError(\n 'The property http is not an instance of HttpClinent. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public override init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials,\n },\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters['pathParams']) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n context: this.metadata.context,\n ...parameters,\n url,\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not an index signature`,\n '',\n this.constructor.name,\n );\n }\n\n const matches = url.match(/\\{[^}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (pathParams[param] === undefined) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not a defined value for '${ param }'`,\n '',\n this.constructor.name,\n );\n }\n url = url.replace(match, encodeURIComponent(pathParams[param]));\n }\n }\n }\n\n return url;\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';\nimport {\n filter,\n map,\n retry,\n tap,\n timeout,\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodMetadata,\n HttpRemoteMethodParameter,\n} from './base-http.remote-method';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onSentEvent(event: HttpSentEvent): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onHeaderResponse(event: HttpHeaderResponse): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onResponse(event: HttpResponse<ReturnType>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onProgressEvent(event: HttpProgressEvent): void {\n }\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return firstValueFrom(this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters)))\n .pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ));\n }\n\n}\n","import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Inject,\n Injectable,\n InjectFlags,\n Injector,\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {\n }\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectFlags,\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags,\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","// region \nexport * from './lib/base-http.remote-method';\nexport * from './lib/http-remote-method.loader';\nexport * from './lib/http.remote-method';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAoDM,MAAgB,oBAIpB,SAAQ,gBAAiD,CAAA;AAKzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAJW,IAAI,CAAA,IAAA,GAAJ,IAAI;AAJnC,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI;AASxB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;AACpD,QAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,qBAAqB,CAC7B,oFAAoF,EACpF,EAAE,EACF,IAAI,CAAC,WAAW,CAAC,IAAI,CACtB;;AAEH,QAAA,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,qBAAqB,CAC7B,+EAA+E,EAC/E,EAAE,EACF,IAAI,CAAC,WAAW,CAAC,IAAI,CACtB;;;IAIW,IAAI,GAAA;QAClB,KAAK,CAAC,IAAI,EAAE;AACZ,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CACjC,IAAI,CAAC,QAAQ,CAAC,MAAM,EACpB,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,EACJ;AAC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IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA;;4FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAMnB,MAAM;2BAAC,kBAAkB;;;ACrBxC;AAIA;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../../packages/angular/remote-method/http/src/lib/base-http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../../packages/angular/remote-method/http/src/index.ts","../../../../../packages/angular/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n HttpClient,\n HttpContext,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n context?: HttpContext;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n context?: HttpContext;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n public timeout = 60 * 1000;\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null,\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError(\n 'HttpClient is undefined. Ensure that the HttpClient is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError(\n 'The property http is not an instance of HttpClinent. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public override init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials,\n },\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters['pathParams']) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n context: this.metadata.context,\n ...parameters,\n url,\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not an index signature`,\n '',\n this.constructor.name,\n );\n }\n\n const matches = url.match(/\\{[^}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (pathParams[param] === undefined) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not a defined value for '${ param }'`,\n '',\n this.constructor.name,\n );\n }\n url = url.replace(match, encodeURIComponent(pathParams[param]));\n }\n }\n }\n\n return url;\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';\nimport {\n filter,\n map,\n retry,\n tap,\n timeout,\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodMetadata,\n HttpRemoteMethodParameter,\n} from './base-http.remote-method';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onSentEvent(event: HttpSentEvent): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onHeaderResponse(event: HttpHeaderResponse): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onResponse(event: HttpResponse<ReturnType>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onProgressEvent(event: HttpProgressEvent): void {\n }\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return firstValueFrom(this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters)))\n .pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ));\n }\n\n}\n","import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport { Injectable, InjectOptions, Injector, inject } from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n private readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectOptions,\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags,\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","// region \nexport * from './lib/base-http.remote-method';\nexport * from './lib/http-remote-method.loader';\nexport * from './lib/http.remote-method';\n// endregion\n","/**\n * Gener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,EAAA,UAAA,EAAA,CAAA;kBAD5B;;;MCLY,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAqB,kBAAkB,CAAC;AA2BrF,IAAA;IAxBQ,QAAQ,CACb,+BAAwG,EACxG,UAAsB,EACtB,QAA4C,EAC5C,QAAmB,EACnB,aAAkE,EAClE,KAAqB,EAAA;AAGrB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,KAAK,CACN;AAED,QAAA,IAAI,EAAE,YAAY,YAAY,gBAAgB,CAAC,EAAE;YAC/C,MAAM,IAAI,qBAAqB,CAAC,CAAA,2CAAA,CAA6C,EAAE,EAAE,EAAE,wBAAwB,CAAC;QAC9G;AAEA,QAAA,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;IACtC;8GA1BW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACVlC;AAIA;;ACJA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../../packages/angular/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../../packages/angular/remote-method/testing/src/index.ts","../../../../../packages/angular/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n AbstractType,\n InjectionToken,\n Provider,\n Type,\n} from '@angular/core';\n\nexport type MockRemoteMethod = (parameters?: any, metadata?: any) => any;\n\nexport class RemoteMethodTestingLoader extends RemoteMethodLoader {\n\n private mockedRemoteMethods = new Map<string, MockRemoteMethod>();\n\n public mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void {\n let resultFunction: MockRemoteMethod;\n if (typeof resultOrFunction !== 'function') {\n resultFunction = () => resultOrFunction;\n } else {\n resultFunction = resultOrFunction;\n }\n this.mockedRemoteMethods.set(remoteMethodId, resultFunction);\n }\n\n public clearMocks(): void {\n this.mockedRemoteMethods.clear();\n }\n\n public deleteMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.delete(remoteMethodId);\n }\n\n public hasMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.has(remoteMethodId);\n }\n\n public getMock(remoteMethodId: string): MockRemoteMethod {\n if (!this.hasMock(remoteMethodId)) {\n throw new Error(`A remote method mock with the id '${ remoteMethodId }' is not registered`);\n }\n return this.mockedRemoteMethods.get(remoteMethodId)!;\n }\n\n public override async call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters?: Parameters,\n metadata?: Metadata,\n ): Promise<ReturnType> {\n\n if (typeof remoteMethodOrIdOrToken === 'string') {\n\n if (this.hasMock(remoteMethodOrIdOrToken)) {\n const resultFunction = this.getMock(remoteMethodOrIdOrToken)!;\n return await resultFunction(parameters, metadata);\n }\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n\n }\n\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n }\n\n}\n\nexport const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider = {\n provide: RemoteMethodLoader,\n useClass: RemoteMethodTestingLoader,\n};\n","// region \nexport * from './lib/remote-method-testing-loader';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAcM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAAjE,IAAA,WAAA,GAAA;;AAEU,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA4B;;IAE1D,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC;AACpC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG,MAAM,gBAAgB;;aAClC;YACL,cAAc,GAAG,gBAAgB;;QAEnC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC;;IAGvD,UAAU,GAAA;AACf,QAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE;;AAG3B,IAAA,UAAU,CAAC,cAAsB,EAAA;QACtC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC;;AAGjD,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAC;;AAG9C,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAsC,cAAe,CAAA,mBAAA,CAAqB,CAAC;;QAE7F,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAE;;AAGtC,IAAA,MAAM,KAAK,CACzB,uBAAuR,EACvR,UAAuB,EACvB,QAAmB,EAAA;AAGnB,QAAA,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE;AAE/C,YAAA,IAAI,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE;gBACzC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAE;AAC7D,gBAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC;;YAEnD,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC;;QAInE,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC;;AAGpE;AAEY,MAAA,qCAAqC,GAAa;AAC7D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAE,yBAAyB;;;ACtErC;AAEA;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../../packages/angular/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../../packages/angular/remote-method/testing/src/index.ts","../../../../../packages/angular/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n AbstractType,\n InjectionToken,\n Provider,\n Type,\n} from '@angular/core';\n\nexport type MockRemoteMethod = (parameters?: any, metadata?: any) => any;\n\nexport class RemoteMethodTestingLoader extends RemoteMethodLoader {\n\n private mockedRemoteMethods = new Map<string, MockRemoteMethod>();\n\n public mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void {\n let resultFunction: MockRemoteMethod;\n if (typeof resultOrFunction !== 'function') {\n resultFunction = () => resultOrFunction;\n } else {\n resultFunction = resultOrFunction;\n }\n this.mockedRemoteMethods.set(remoteMethodId, resultFunction);\n }\n\n public clearMocks(): void {\n this.mockedRemoteMethods.clear();\n }\n\n public deleteMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.delete(remoteMethodId);\n }\n\n public hasMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.has(remoteMethodId);\n }\n\n public getMock(remoteMethodId: string): MockRemoteMethod {\n if (!this.hasMock(remoteMethodId)) {\n throw new Error(`A remote method mock with the id '${ remoteMethodId }' is not registered`);\n }\n return this.mockedRemoteMethods.get(remoteMethodId)!;\n }\n\n public override async call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters?: Parameters,\n metadata?: Metadata,\n ): Promise<ReturnType> {\n\n if (typeof remoteMethodOrIdOrToken === 'string') {\n\n if (this.hasMock(remoteMethodOrIdOrToken)) {\n const resultFunction = this.getMock(remoteMethodOrIdOrToken)!;\n return await resultFunction(parameters, metadata);\n }\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n\n }\n\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n }\n\n}\n\nexport const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider = {\n provide: RemoteMethodLoader,\n useClass: RemoteMethodTestingLoader,\n};\n","// region \nexport * from './lib/remote-method-testing-loader';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAcM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAAjE,IAAA,WAAA,GAAA;;AAEU,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA4B;IAkDnE;IAhDS,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC;AACpC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG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QAAQ,EAAE,yBAAyB;;;ACtErC;AAEA;;ACFA;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, computed, Injector, InjectFlags, INJECTOR, Injectable, Optional, Inject } from '@angular/core';
2
+ import { InjectionToken, computed, Injector, INJECTOR, Optional, Inject, Injectable } from '@angular/core';
3
3
  import { toSignal } from '@angular/core/rxjs-interop';
4
4
  import { DefinitionMetadata, BaseDefinition, DefinitionLoader } from '@rxap/definition';
5
5
  import { Subject } from 'rxjs';
@@ -26,7 +26,7 @@ class BaseRemoteMethod extends BaseDefinition {
26
26
  this.executed$ = new Subject();
27
27
  this.executionsInProgress$ = new CounterSubject();
28
28
  this.executionsInProgress = toSignal(this.executionsInProgress$, { initialValue: 0 });
29
- this.executing = computed(() => this.executionsInProgress() > 0);
29
+ this.executing = computed(() => this.executionsInProgress() > 0, ...(ngDevMode ? [{ debugName: "executing" }] : /* istanbul ignore next */ []));
30
30
  this._pauseRefresh = false;
31
31
  if (injector === undefined) {
32
32
  throw new RxapRemoteMethodError('Injector is undefined. Ensure that the Injector is added to the deps property!', '', this.constructor.name);
@@ -63,17 +63,17 @@ class BaseRemoteMethod extends BaseDefinition {
63
63
  refresh() {
64
64
  if (this.metadata.refresh) {
65
65
  for (const refresh of this.metadata.refresh) {
66
- const canRefresh = this.injector.get(refresh, null, InjectFlags.Optional);
66
+ const canRefresh = this.injector.get(refresh, null, { optional: true });
67
67
  if (canRefresh) {
68
68
  canRefresh.refresh();
69
69
  }
70
70
  }
71
71
  }
72
72
  }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
74
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: BaseRemoteMethod }); }
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
74
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseRemoteMethod }); }
75
75
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: BaseRemoteMethod, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseRemoteMethod, decorators: [{
77
77
  type: Injectable
78
78
  }], ctorParameters: () => [{ type: i0.Injector, decorators: [{
79
79
  type: Optional
@@ -95,10 +95,10 @@ class ProxyRemoteMethod extends BaseRemoteMethod {
95
95
  async _call(parameters) {
96
96
  return this.remoteMethod.call(await this.transformParameters(parameters));
97
97
  }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
99
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ProxyRemoteMethod }); }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
99
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ProxyRemoteMethod }); }
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
102
102
  type: Injectable
103
103
  }], ctorParameters: () => [{ type: BaseRemoteMethod, decorators: [{
104
104
  type: Inject,
@@ -117,10 +117,10 @@ class RemoteMethodLoader extends DefinitionLoader {
117
117
  .load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags)
118
118
  .call(parameters);
119
119
  }
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
121
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' }); }
120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
121
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' }); }
122
122
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: RemoteMethodLoader, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RemoteMethodLoader, decorators: [{
124
124
  type: Injectable,
125
125
  args: [{ providedIn: 'root' }]
126
126
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../../packages/angular/remote-method/src/lib/tokens.ts","../../../../../packages/angular/remote-method/src/lib/error.ts","../../../../../packages/angular/remote-method/src/lib/base.remote-method.ts","../../../../../packages/angular/remote-method/src/lib/proxy.remote-method.ts","../../../../../packages/angular/remote-method/src/lib/remote-method-loader.ts","../../../../../packages/angular/remote-method/src/index.ts","../../../../../packages/angular/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 AbstractType,\n computed,\n Inject,\n Injectable,\n InjectFlags,\n InjectionToken,\n Injector,\n INJECTOR,\n Optional,\n Type,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\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/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 = 'BaseRemoteMethod',\n packageName = '@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 executionsInProgress = toSignal(this.executionsInProgress$, { initialValue: 0 });\n\n executing = computed(() => this.executionsInProgress() > 0);\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(\n 'Injector is undefined. Ensure that the Injector is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError(\n 'The property injector is not Injector like. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public async call(parameters?: Parameter): Promise<ReturnType> {\n this.init();\n this.executionsInProgress$.increase();\n try {\n const result = await this._call(parameters);\n this.executed$.next(result);\n this.executed(result);\n return result;\n } finally {\n this.executionsInProgress$.decrease();\n }\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 Inject,\n Injectable,\n INJECTOR,\n Injector,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n} from './base.remote-method';\nimport {\n REMOTE_METHOD_META_DATA,\n RXAP_PROXY_REMOTE_METHOD_TARGET,\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 public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\n\n}\n","import {\n Injectable,\n InjectFlags,\n Injector,\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","// region \nexport * from './lib/base.remote-method';\nexport * from './lib/error';\nexport * from './lib/proxy.remote-method';\nexport * from './lib/remote-method-loader';\nexport * from './lib/tokens';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CAAC,4CAA4C;MACzF,+BAA+B,GAAG,IAAI,cAAc,CAAC,iCAAiC;;ACD7F,MAAO,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KAAmB,EAAA;AAEnB,QAAA,OAAO;aACJ,IAAI,CACH,+BAA+B,EAC/B,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,KAAK;aAEN,IAAI,CAAC,UAAU,CAAC;;+GAlBV,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADL,MAAM,EAAA,CAAA,CAAA;;4FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACdlC;AAMA;;ACNA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../../packages/angular/remote-method/src/lib/tokens.ts","../../../../../packages/angular/remote-method/src/lib/error.ts","../../../../../packages/angular/remote-method/src/lib/base.remote-method.ts","../../../../../packages/angular/remote-method/src/lib/proxy.remote-method.ts","../../../../../packages/angular/remote-method/src/lib/remote-method-loader.ts","../../../../../packages/angular/remote-method/src/index.ts","../../../../../packages/angular/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 AbstractType,\n computed,\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n INJECTOR,\n Optional,\n Type\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\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/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 = 'BaseRemoteMethod',\n packageName = '@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 executionsInProgress = toSignal(this.executionsInProgress$, { initialValue: 0 });\n\n executing = computed(() => this.executionsInProgress() > 0);\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(\n 'Injector is undefined. Ensure that the Injector is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError(\n 'The property injector is not Injector like. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public async call(parameters?: Parameter): Promise<ReturnType> {\n this.init();\n this.executionsInProgress$.increase();\n try {\n const result = await this._call(parameters);\n this.executed$.next(result);\n this.executed(result);\n return result;\n } finally {\n this.executionsInProgress$.decrease();\n }\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, { optional: true });\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 Inject,\n Injectable,\n INJECTOR,\n Injector,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n} from './base.remote-method';\nimport {\n REMOTE_METHOD_META_DATA,\n RXAP_PROXY_REMOTE_METHOD_TARGET,\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 public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\n\n}\n","import {\n Injectable,\n InjectOptions,\n Injector\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?: InjectOptions,\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","// region \nexport * from './lib/base.remote-method';\nexport * from './lib/error';\nexport * from './lib/proxy.remote-method';\nexport * from './lib/remote-method-loader';\nexport * from './lib/tokens';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CAAC,4CAA4C;MACzF,+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;IACxD;AAED;;ACmBK,SAAU,gBAAgB,CAC9B,YAA+B,EAC/B,SAAS,GAAG,kBAAkB,EAC9B,WAAW,GAAG,qBAAqB,EAAA;AAEnC,IAAA,OAAO,UAAU,MAAW,EAAA;QAC1B,kBAAkB,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC;AAClE,IAAA,CAAC;AACH;AAGM,MAAgB,gBAEkD,SAAQ,cAAwB,CAAA;AActG,IAAA,WAAA,CAGI,QAAA,GAA4B,IAAI,EAGhC,QAAA,GAAuB,IAAI,EAAA;QAE7B,KAAK,CAAC,QAAQ,CAAC;AApBV,QAA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EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACdlC;AAMA;;ACNA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "version": "19.2.0",
2
+ "version": "21.0.1-dev.1",
3
3
  "name": "@rxap/remote-method",
4
4
  "description": "This package provides abstractions for defining and executing remote methods in Angular applications. It includes features such as automatic refreshing, proxying, and error handling. It offers a structured way to manage remote calls and their dependencies.\n",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "dependencies": {
7
- "@nx/devkit": "20.5.0",
7
+ "@nx/devkit": "22.7.5",
8
8
  "tslib": "2.6.2"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/common": "^19.2.1",
12
- "@angular/core": "^19.2.1",
13
- "@rxap/definition": "^19.0.5",
14
- "@rxap/rxjs": "^1.1.17",
15
- "@rxap/utilities": "^16.5.1",
16
- "rxjs": "^7.8.1"
11
+ "@angular/common": "^21.2.9",
12
+ "@angular/core": "^21.2.9",
13
+ "@rxap/definition": "^21.0.1-dev.1",
14
+ "@rxap/rxjs": "^1.1.18-dev.1",
15
+ "@rxap/utilities": "^16.5.2-dev.1",
16
+ "rxjs": "^7.8.2"
17
17
  },
18
18
  "author": {
19
19
  "name": "Merzough Münker",
@@ -38,27 +38,27 @@
38
38
  "packageGroup": [
39
39
  {
40
40
  "package": "@angular/common",
41
- "version": "19.2.16"
41
+ "version": "21.2.9"
42
42
  },
43
43
  {
44
44
  "package": "@angular/core",
45
- "version": "19.2.16"
45
+ "version": "21.2.9"
46
46
  },
47
47
  {
48
48
  "package": "@rxap/definition",
49
- "version": "19.0.5"
49
+ "version": "21.0.1-dev.1"
50
50
  },
51
51
  {
52
52
  "package": "@rxap/reflect-metadata",
53
- "version": "1.0.17"
53
+ "version": "1.0.18-dev.1"
54
54
  },
55
55
  {
56
56
  "package": "@rxap/rxjs",
57
- "version": "1.1.17"
57
+ "version": "1.1.18-dev.1"
58
58
  },
59
59
  {
60
60
  "package": "@rxap/utilities",
61
- "version": "16.5.1"
61
+ "version": "16.5.2-dev.1"
62
62
  }
63
63
  ]
64
64
  },
@@ -74,31 +74,32 @@
74
74
  "schematics": "./generators.json",
75
75
  "sideEffects": false,
76
76
  "module": "fesm2022/rxap-remote-method.mjs",
77
- "typings": "index.d.ts",
77
+ "typings": "types/rxap-remote-method.d.ts",
78
78
  "exports": {
79
79
  "./package.json": {
80
80
  "default": "./package.json"
81
81
  },
82
82
  ".": {
83
- "types": "./index.d.ts",
83
+ "types": "./types/rxap-remote-method.d.ts",
84
84
  "default": "./fesm2022/rxap-remote-method.mjs"
85
85
  },
86
86
  "./directive": {
87
- "types": "./directive/index.d.ts",
87
+ "types": "./types/rxap-remote-method-directive.d.ts",
88
88
  "default": "./fesm2022/rxap-remote-method-directive.mjs"
89
89
  },
90
90
  "./http": {
91
- "types": "./http/index.d.ts",
91
+ "types": "./types/rxap-remote-method-http.d.ts",
92
92
  "default": "./fesm2022/rxap-remote-method-http.mjs"
93
93
  },
94
- "./testing": {
95
- "types": "./testing/index.d.ts",
96
- "default": "./fesm2022/rxap-remote-method-testing.mjs"
97
- },
98
94
  "./http/directive": {
99
- "types": "./http/directive/index.d.ts",
95
+ "types": "./types/rxap-remote-method-http-directive.d.ts",
100
96
  "default": "./fesm2022/rxap-remote-method-http-directive.mjs"
101
97
  },
98
+ "./testing": {
99
+ "types": "./types/rxap-remote-method-testing.d.ts",
100
+ "default": "./fesm2022/rxap-remote-method-testing.mjs"
101
+ },
102
102
  "./theme": "./theme.css"
103
- }
103
+ },
104
+ "type": "module"
104
105
  }
@@ -0,0 +1,211 @@
1
+ import { RxapRemoteMethodError, BaseRemoteMethodMetadata, RemoteMethodLoader, BaseRemoteMethod } from '@rxap/remote-method';
2
+ import * as _angular_core from '@angular/core';
3
+ import { DoCheck, OnInit, ChangeDetectorRef, TemplateRef, TrackByFunction, IterableChanges, InjectionToken } from '@angular/core';
4
+ import { IdOrInstanceOrToken } from '@rxap/definition';
5
+ import { ToggleSubject } from '@rxap/rxjs';
6
+
7
+ declare class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
8
+ constructor(message: string, code?: string, scope?: string);
9
+ }
10
+
11
+ declare class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {
12
+ $implicit: ReturnType;
13
+ index: number;
14
+ count: number;
15
+ constructor($implicit: ReturnType, index: number, count: number);
16
+ get first(): boolean;
17
+ get last(): boolean;
18
+ get even(): boolean;
19
+ get odd(): boolean;
20
+ }
21
+ interface RemoteMethodTemplateCollectionDirectiveErrorContext {
22
+ $implicit: Error;
23
+ message?: string;
24
+ name?: string;
25
+ }
26
+ declare class RemoteMethodTemplateCollectionDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements DoCheck, OnInit {
27
+ private readonly template;
28
+ protected readonly remoteMethodLoader: RemoteMethodLoader;
29
+ private readonly injector;
30
+ private readonly viewContainerRef;
31
+ protected readonly cdr: ChangeDetectorRef;
32
+ private readonly differs;
33
+ private readonly remoteMethodToken;
34
+ readonly parameters: _angular_core.InputSignal<Parameters | undefined>;
35
+ readonly emptyTemplate: _angular_core.InputSignal<TemplateRef<void> | undefined>;
36
+ readonly errorTemplate: _angular_core.InputSignal<TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext> | undefined>;
37
+ readonly withoutParameters: _angular_core.InputSignal<boolean>;
38
+ private _differ;
39
+ private _dirty;
40
+ /**
41
+ * Indicates that the remote method returned a empty collection
42
+ *
43
+ * true - is empty
44
+ * false - is NOT empty
45
+ * null - unknown
46
+ *
47
+ * @private
48
+ */
49
+ private _empty;
50
+ /**
51
+ * Holds the error that call of the remote method throws
52
+ *
53
+ * @private
54
+ */
55
+ private _error;
56
+ /**
57
+ * Holds the empty template view ref.
58
+ *
59
+ * Is used to determine if a empty template is added to the
60
+ * view. And used to destruct the empty template if the remote method
61
+ * changes from empty to not empty.
62
+ *
63
+ * @private
64
+ */
65
+ private _emptyTemplateViewRef;
66
+ /**
67
+ * Holds the error template view ref.
68
+ *
69
+ * Is used to determine if a error template is added to the
70
+ * view. And used to destruct the error template if the remote method
71
+ * is called again with an error.
72
+ *
73
+ * @private
74
+ */
75
+ private _errorTemplateViewRef;
76
+ /**
77
+ * A function that defines how to track changes for items in the iterable.
78
+ *
79
+ * When items are added, moved, or removed in the iterable,
80
+ * the directive must re-render the appropriate DOM nodes.
81
+ * To minimize churn in the DOM, only nodes that have changed
82
+ * are re-rendered.
83
+ *
84
+ * By default, the change detector assumes that
85
+ * the object instance identifies the node in the iterable.
86
+ * When this function is supplied, the directive uses
87
+ * the result of calling this function to identify the item node,
88
+ * rather than the identity of the object itself.
89
+ *
90
+ * The function receives two inputs,
91
+ * the iteration index and the node object ID.
92
+ */
93
+ readonly trackBy: _angular_core.InputSignalWithTransform<TrackByFunction<ReturnType>, TrackByFunction<ReturnType> | undefined>;
94
+ readonly remoteMethodOrIdOrToken: _angular_core.InputSignal<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>> | undefined>;
95
+ protected readonly _remoteMethodOrIdOrToken: _angular_core.Signal<any>;
96
+ /**
97
+ * Holds the data that should be displayed
98
+ * @private
99
+ */
100
+ private _data;
101
+ protected set data(data: ReturnType[]);
102
+ /**
103
+ * Asserts the correct type of the context for the template that `NgForOf` will render.
104
+ *
105
+ * The presence of this method is a signal to the Ivy template type-check compiler that the
106
+ * `NgForOf` structural directive renders its template with a specific context type.
107
+ */
108
+ static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any): ctx is RemoteMethodTemplateCollectionDirectiveContext<T>;
109
+ constructor();
110
+ ngOnInit(): void;
111
+ call(parameters?: Parameters): void;
112
+ /**
113
+ * Applies the changes when needed.
114
+ */
115
+ ngDoCheck(): void;
116
+ protected applyChanges(changes: IterableChanges<ReturnType>): void;
117
+ private perViewChange;
118
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, never>;
119
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, "[rxapRemoteMethodCollection]", ["rxapRemoteMethodCollection"], { "parameters": { "alias": "rxapRemoteMethodCollectionParameters"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "rxapRemoteMethodCollectionEmpty"; "required": false; "isSignal": true; }; "errorTemplate": { "alias": "rxapRemoteMethodCollectionError"; "required": false; "isSignal": true; }; "withoutParameters": { "alias": "rxapRemoteMethodCollectionWithoutParameters"; "required": false; "isSignal": true; }; "trackBy": { "alias": "rxapRemoteMethodCollectionTrackBy"; "required": false; "isSignal": true; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCollectionCall"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
120
+ }
121
+
122
+ interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {
123
+ $implicit: ReturnType;
124
+ }
125
+ interface RemoteMethodTemplateDirectiveErrorContext {
126
+ $implicit: Error;
127
+ message: string;
128
+ }
129
+ declare class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnInit {
130
+ private readonly template;
131
+ protected readonly remoteMethodLoader: RemoteMethodLoader;
132
+ private readonly injector;
133
+ private readonly viewContainerRef;
134
+ protected readonly cdr: ChangeDetectorRef;
135
+ private readonly remoteMethodToken;
136
+ readonly executed$: _angular_core.OutputEmitterRef<void>;
137
+ readonly failure$: _angular_core.OutputEmitterRef<Error>;
138
+ readonly successful$: _angular_core.OutputEmitterRef<ReturnType>;
139
+ readonly metadata: _angular_core.InputSignal<Metadata | undefined>;
140
+ /**
141
+ * true - a remote method call is in progress
142
+ */
143
+ executing$: ToggleSubject;
144
+ readonly parameters: _angular_core.InputSignal<Parameters | undefined>;
145
+ protected readonly currentParameters: _angular_core.WritableSignal<Parameters | undefined>;
146
+ readonly errorTemplate: _angular_core.InputSignal<TemplateRef<RemoteMethodTemplateDirectiveErrorContext> | undefined>;
147
+ readonly loadingTemplate: _angular_core.InputSignal<TemplateRef<void> | undefined>;
148
+ readonly withoutParameters: _angular_core.InputSignal<boolean>;
149
+ readonly embedded: _angular_core.OutputEmitterRef<void>;
150
+ readonly remoteMethodOrIdOrToken: _angular_core.InputSignal<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | undefined>;
151
+ protected readonly _remoteMethodOrIdOrToken: _angular_core.Signal<any>;
152
+ static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any): ctx is RemoteMethodTemplateDirectiveContext<T>;
153
+ constructor();
154
+ ngOnInit(): void;
155
+ execute(parameters?: Parameters | undefined): Promise<void>;
156
+ /**
157
+ * @deprecated removed
158
+ * @protected
159
+ */
160
+ call(parameters?: Parameters): void;
161
+ setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
162
+ updateParameters(parameters: Partial<Parameters>): void;
163
+ protected executed(result: any): void;
164
+ protected failure(error: Error): void;
165
+ protected successful(result: ReturnType): void;
166
+ protected renderTemplate(result: ReturnType): void;
167
+ private renderLoadingTemplate;
168
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RemoteMethodTemplateDirective<any, any, any>, never>;
169
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RemoteMethodTemplateDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "metadata": { "alias": "rxapRemoteMethodMetadata"; "required": false; "isSignal": true; }; "parameters": { "alias": "rxapRemoteMethodParameters"; "required": false; "isSignal": true; }; "errorTemplate": { "alias": "rxapRemoteMethodError"; "required": false; "isSignal": true; }; "loadingTemplate": { "alias": "rxapRemoteMethodLoading"; "required": false; "isSignal": true; }; "withoutParameters": { "alias": "rxapRemoteMethodWithoutParameters"; "required": false; "isSignal": true; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCall"; "required": false; "isSignal": true; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; "embedded": "embedded"; }, never, never, true, never>;
170
+ }
171
+
172
+ declare class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnInit {
173
+ protected readonly remoteMethodLoader: RemoteMethodLoader;
174
+ private readonly injector;
175
+ private readonly remoteMethodToken;
176
+ readonly parameters: _angular_core.InputSignal<Parameters | undefined>;
177
+ protected readonly currentParameters: _angular_core.WritableSignal<Parameters | undefined>;
178
+ readonly metadata: _angular_core.InputSignal<Metadata | undefined>;
179
+ readonly executed$: _angular_core.OutputEmitterRef<void>;
180
+ readonly failure$: _angular_core.OutputEmitterRef<Error>;
181
+ readonly successful$: _angular_core.OutputEmitterRef<ReturnType>;
182
+ readonly immediately: _angular_core.InputSignal<boolean>;
183
+ /**
184
+ * true - a remote method call is in progress
185
+ */
186
+ executing$: ToggleSubject;
187
+ readonly remoteMethodOrIdOrToken: _angular_core.InputSignal<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | undefined>;
188
+ protected readonly _remoteMethodOrIdOrToken: _angular_core.Signal<any>;
189
+ readonly hasConfirmDirective: _angular_core.InputSignalWithTransform<boolean, any>;
190
+ ngOnInit(): void;
191
+ onConfirmed(): void;
192
+ onClick(): void;
193
+ execute(): Promise<void>;
194
+ setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
195
+ updateParameters(parameters: Partial<Parameters>): void;
196
+ protected executed(result: any): void;
197
+ protected failure(error: Error): void;
198
+ protected successful(result: ReturnType): void;
199
+ /**
200
+ * @deprecated removed
201
+ * @protected
202
+ */
203
+ protected call(): Promise<any>;
204
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RemoteMethodDirective<any, any, any>, never>;
205
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RemoteMethodDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "immediately": { "alias": "immediately"; "required": false; "isSignal": true; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethod"; "required": false; "isSignal": true; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; "isSignal": true; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; }, never, never, true, never>;
206
+ }
207
+
208
+ declare const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN: InjectionToken<unknown>;
209
+
210
+ export { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, RemoteMethodDirective, RemoteMethodTemplateCollectionDirective, RemoteMethodTemplateCollectionDirectiveContext, RemoteMethodTemplateDirective, RxapRemoteMethodDirectiveError };
211
+ export type { RemoteMethodTemplateCollectionDirectiveErrorContext, RemoteMethodTemplateDirectiveContext, RemoteMethodTemplateDirectiveErrorContext };
@@ -0,0 +1,40 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _angular_common_http from '@angular/common/http';
3
+ import { RemoteMethodDirective } from '@rxap/remote-method/directive';
4
+ import { HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from '@rxap/remote-method/http';
5
+ import { BaseRemoteMethod } from '@rxap/remote-method';
6
+ import { IdOrInstanceOrToken } from '@rxap/definition';
7
+
8
+ declare class ContenteditableDirective {
9
+ private readonly httpRemoteMethodLoader;
10
+ contenteditable: boolean;
11
+ readonly remoteMethodId: _angular_core.InputSignal<string>;
12
+ readonly property: _angular_core.InputSignal<string>;
13
+ readonly uuid: _angular_core.InputSignal<string>;
14
+ onClick($event: Event): void;
15
+ onInput($event: any): Promise<any>;
16
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContenteditableDirective, never>;
17
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": { "alias": "rxapContenteditable"; "required": true; "isSignal": true; }; "property": { "alias": "property"; "required": true; "isSignal": true; }; "uuid": { "alias": "uuid"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
18
+ }
19
+
20
+ declare class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {
21
+ readonly headers: _angular_core.InputSignal<_angular_common_http.HttpHeaders | undefined>;
22
+ readonly reportProgress: _angular_core.InputSignal<boolean | undefined>;
23
+ readonly params: _angular_core.InputSignal<_angular_common_http.HttpParams | undefined>;
24
+ readonly responseType: _angular_core.InputSignal<"arraybuffer" | "blob" | "json" | "text" | undefined>;
25
+ readonly withCredentials: _angular_core.InputSignal<boolean | undefined>;
26
+ readonly body: _angular_core.InputSignal<any>;
27
+ readonly setHeaders: _angular_core.InputSignal<{
28
+ [name: string]: string | string[];
29
+ } | undefined>;
30
+ readonly setParams: _angular_core.InputSignal<{
31
+ [param: string]: string;
32
+ } | undefined>;
33
+ readonly pathParams: _angular_core.InputSignal<any>;
34
+ readonly remoteMethodOrIdOrToken: _angular_core.InputSignal<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter<any>, Metadata>> | undefined>;
35
+ constructor();
36
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpRemoteMethodDirective<any, any>, never>;
37
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": { "alias": "headers"; "required": false; "isSignal": true; }; "reportProgress": { "alias": "reportProgress"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "responseType": { "alias": "responseType"; "required": false; "isSignal": true; }; "withCredentials": { "alias": "withCredentials"; "required": false; "isSignal": true; }; "body": { "alias": "body"; "required": false; "isSignal": true; }; "setHeaders": { "alias": "setHeaders"; "required": false; "isSignal": true; }; "setParams": { "alias": "setParams"; "required": false; "isSignal": true; }; "pathParams": { "alias": "pathParams"; "required": false; "isSignal": true; }; "remoteMethodOrIdOrToken": { "alias": "rxapHttpRemoteMethod"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
38
+ }
39
+
40
+ export { ContenteditableDirective, HttpRemoteMethodDirective };