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

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 (86) hide show
  1. package/CHANGELOG.md +295 -0
  2. package/LICENSE +621 -24
  3. package/LICENSE.md +621 -0
  4. package/README.md +8 -73
  5. package/directive/index.d.ts +5 -5
  6. package/directive/lib/remote-method-template-collection.directive.d.ts +38 -43
  7. package/directive/lib/remote-method-template.directive.d.ts +7 -12
  8. package/directive/lib/remote-method.directive.d.ts +7 -12
  9. package/esm2022/directive/index.mjs +6 -0
  10. package/esm2022/directive/lib/error.mjs +1 -1
  11. package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +115 -129
  12. package/esm2022/directive/lib/remote-method-template.directive.mjs +45 -55
  13. package/esm2022/directive/lib/remote-method.directive.mjs +28 -41
  14. package/esm2022/directive/lib/tokens.mjs +1 -1
  15. package/esm2022/directive/rxap-remote-method-directive.mjs +2 -2
  16. package/esm2022/http/directive/index.mjs +3 -0
  17. package/esm2022/http/directive/lib/contenteditable.directive.mjs +16 -39
  18. package/esm2022/http/directive/lib/http-remote-method.directive.mjs +8 -21
  19. package/esm2022/http/directive/rxap-remote-method-http-directive.mjs +2 -2
  20. package/esm2022/http/index.mjs +4 -0
  21. package/esm2022/http/lib/base-http.remote-method.mjs +19 -20
  22. package/esm2022/http/lib/http-remote-method.loader.mjs +7 -8
  23. package/esm2022/http/lib/http.remote-method.mjs +31 -22
  24. package/esm2022/http/rxap-remote-method-http.mjs +2 -2
  25. package/esm2022/index.mjs +1 -1
  26. package/esm2022/lib/base.remote-method.mjs +8 -9
  27. package/esm2022/lib/error.mjs +1 -1
  28. package/esm2022/lib/proxy.remote-method.mjs +8 -9
  29. package/esm2022/lib/remote-method-loader.mjs +7 -8
  30. package/esm2022/lib/tokens.mjs +1 -1
  31. package/esm2022/rxap-remote-method.mjs +1 -1
  32. package/esm2022/testing/index.mjs +2 -0
  33. package/esm2022/testing/lib/remote-method-testing-loader.mjs +3 -3
  34. package/esm2022/testing/rxap-remote-method-testing.mjs +2 -2
  35. package/fesm2022/rxap-remote-method-directive.mjs +175 -204
  36. package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
  37. package/fesm2022/rxap-remote-method-http-directive.mjs +20 -52
  38. package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
  39. package/fesm2022/rxap-remote-method-http.mjs +43 -33
  40. package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
  41. package/fesm2022/rxap-remote-method-testing.mjs +1 -1
  42. package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
  43. package/fesm2022/rxap-remote-method.mjs +10 -10
  44. package/fesm2022/rxap-remote-method.mjs.map +1 -1
  45. package/http/directive/index.d.ts +2 -5
  46. package/http/directive/lib/contenteditable.directive.d.ts +1 -9
  47. package/http/directive/lib/http-remote-method.directive.d.ts +2 -7
  48. package/http/index.d.ts +3 -5
  49. package/http/lib/base-http.remote-method.d.ts +3 -3
  50. package/http/lib/http-remote-method.loader.d.ts +2 -2
  51. package/http/lib/http.remote-method.d.ts +3 -3
  52. package/lib/base.remote-method.d.ts +2 -2
  53. package/lib/proxy.remote-method.d.ts +1 -1
  54. package/lib/remote-method-loader.d.ts +1 -1
  55. package/package.json +51 -42
  56. package/testing/index.d.ts +1 -5
  57. package/testing/lib/remote-method-testing-loader.d.ts +2 -2
  58. package/theme.css +1 -0
  59. package/collection.json +0 -25
  60. package/directive/public_api.d.ts +0 -5
  61. package/esm2022/directive/public_api.mjs +0 -6
  62. package/esm2022/http/directive/public_api.mjs +0 -3
  63. package/esm2022/http/public_api.mjs +0 -4
  64. package/esm2022/testing/public_api.mjs +0 -2
  65. package/http/directive/public_api.d.ts +0 -2
  66. package/http/public_api.d.ts +0 -3
  67. package/migration.json +0 -4
  68. package/src/schematics/base/files/__name@dasherize__.remote-method.ts.template +0 -14
  69. package/src/schematics/base/index.d.ts +0 -12
  70. package/src/schematics/base/index.js +0 -116
  71. package/src/schematics/base/index.js.map +0 -1
  72. package/src/schematics/base/schema.json +0 -54
  73. package/src/schematics/directive/index.d.ts +0 -18
  74. package/src/schematics/directive/index.js +0 -346
  75. package/src/schematics/directive/index.js.map +0 -1
  76. package/src/schematics/directive/schema.json +0 -50
  77. package/src/schematics/http/files/__name@dasherize__.remote-method.ts.template +0 -16
  78. package/src/schematics/http/index.d.ts +0 -3
  79. package/src/schematics/http/index.js +0 -26
  80. package/src/schematics/http/index.js.map +0 -1
  81. package/src/schematics/http/schema.json +0 -30
  82. package/src/schematics/ng-add/index.d.ts +0 -2
  83. package/src/schematics/ng-add/index.js +0 -8
  84. package/src/schematics/ng-add/index.js.map +0 -1
  85. package/src/schematics/ng-add/schema.json +0 -7
  86. package/testing/public_api.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../libs/remote-method/http/src/lib/base-http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../libs/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Injectable,\n Optional,\n Inject,\n Injector\n} from '@angular/core';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n public timeout = 60 * 1000;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);\n }\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n public init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials\n }\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters.hasOwnProperty('pathParams')) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n ...parameters,\n url\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);\n }\n\n const matches = url.match(/\\{[^\\}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (!pathParams.hasOwnProperty(param)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);\n }\n url = url.replace(match, encodeURIComponent(pathParams[ param ]));\n }\n }\n }\n\n return url;\n }\n\n}\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [ name: string ]: string | string[];\n };\n setParams?: {\n [ param: string ]: string;\n };\n pathParams?: PathParams;\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpSentEvent,\n HttpHeaderResponse,\n HttpResponse,\n HttpProgressEvent,\n HttpEventType\n} from '@angular/common/http';\nimport {\n tap,\n filter,\n map,\n timeout,\n retry\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from './base-http.remote-method';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ).toPromise();\n }\n\n public onSentEvent(event: HttpSentEvent): void {}\n\n public onHeaderResponse(event: HttpHeaderResponse): void {}\n\n public onResponse(event: HttpResponse<ReturnType>): void {}\n\n public onProgressEvent(event: HttpProgressEvent): void {}\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n}\n","import {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n RxapRemoteMethodError,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Injectable,\n Inject,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {}\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectFlags\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAgDA,MACsB,oBAIpB,SAAQ,gBAAiD,CAAA;AAMzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAJU,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAH/C,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;AAQzB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QACrD,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,qBAAqB,CAAC,oFAAoF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClJ,SAAA;AACD,QAAA,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,qBAAqB,CAAC,+EAA+E,EAAE,EAAE,EAA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,qBAAqB,CAAC,CAAA,2CAAA,CAA6C,EAAE,EAAE,EAAE,wBAAwB,CAAC,CAAC;AAC9G,SAAA;AAED,QAAA,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACtC;AA7BU,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAKb,kBAAkB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAL3B,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,EAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;0BAMnB,MAAM;2BAAC,kBAAkB,CAAA;;;ACrBxC;;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/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n HttpClient,\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}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n 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 ...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\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpEventType,\n HttpHeaderResponse,\n HttpProgressEvent,\n HttpResponse,\n HttpSentEvent,\n} 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiDM,MAAgB,oBAIpB,SAAQ,gBAAiD,CAAA;AAKzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QA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CAAA;;0BAMnB,MAAM;2BAAC,kBAAkB,CAAA;;;ACrBxC;;AAEG;;;;"}
@@ -43,7 +43,7 @@ class RemoteMethodTestingLoader extends RemoteMethodLoader {
43
43
  }
44
44
  const REMOTE_METHOD_TESTING_LOADER_PROVIDER = {
45
45
  provide: RemoteMethodLoader,
46
- useClass: RemoteMethodTestingLoader
46
+ useClass: RemoteMethodTestingLoader,
47
47
  };
48
48
 
49
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../libs/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../libs/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n RemoteMethodLoader,\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from '@rxap/remote-method';\nimport {\n Provider,\n Type,\n InjectionToken,\n AbstractType\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 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;AAcM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAAjE,IAAA,WAAA,GAAA;;AAEU,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA4B,CAAC;KAkDnE;IAhDQ,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC,CAAC;AACrC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG,MAAM,gBAAgB,CAAC;AACzC,SAAA;AAAM,aAAA;YACL,cAAc,GAAG,gBAAgB,CAAC;AACnC,SAAA;QACD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;KAC9D;IAEM,UAAU,GAAA;AACf,QAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;KAClC;AAEM,IAAA,UAAU,CAAC,cAAsB,EAAA;QACtC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;KACxD;AAEM,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;KACrD;AAEM,IAAA,OAAO,CAAC,cAAsB,EAAA;AACnC,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAqC,cAAc,CAAA,mBAAA,CAAqB,CAAC,CAAC;AAC3F,SAAA;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAE,CAAC;KACtD;AAEM,IAAA,MAAM,KAAK,CAChB,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,CAAC;AAC9D,gBAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACnD,aAAA;YACD,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEnE,SAAA;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;KACnE;AAEF,CAAA;AAEY,MAAA,qCAAqC,GAAa;AAC7D,IAAA,OAAO,EAAG,kBAAkB;AAC5B,IAAA,QAAQ,EAAE,yBAAyB;;;ACtErC;;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/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","/**\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,CAAC;KAkDnE;IAhDQ,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC,CAAC;AACrC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG,MAAM,gBAAgB,CAAC;AACzC,SAAA;AAAM,aAAA;YACL,cAAc,GAAG,gBAAgB,CAAC;AACnC,SAAA;QACD,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;KAC9D;IAEM,UAAU,GAAA;AACf,QAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;KAClC;AAEM,IAAA,UAAU,CAAC,cAAsB,EAAA;QACtC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;KACxD;AAEM,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;KACrD;AAEM,IAAA,OAAO,CAAC,cAAsB,EAAA;AACnC,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAsC,cAAe,CAAA,mBAAA,CAAqB,CAAC,CAAC;AAC7F,SAAA;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAE,CAAC;KACtD;AAEe,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,CAAC;AAC9D,gBAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACnD,aAAA;YACD,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEnE,SAAA;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;KACnE;AAEF,CAAA;AAEY,MAAA,qCAAqC,GAAa;AAC7D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAE,yBAAyB;;;ACtErC;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { InjectionToken, Injector, InjectFlags, INJECTOR, Injectable, Optional,
3
3
  import { DefinitionMetadata, BaseDefinition, DefinitionLoader } from '@rxap/definition';
4
4
  import { Subject } from 'rxjs';
5
5
  import { RxapError } from '@rxap/utilities';
6
- import { CounterSubject } from '@rxap/utilities/rxjs';
6
+ import { CounterSubject } from '@rxap/rxjs';
7
7
 
8
8
  const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');
9
9
  const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');
@@ -63,10 +63,10 @@ class BaseRemoteMethod extends BaseDefinition {
63
63
  }
64
64
  }
65
65
  }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseRemoteMethod }); }
66
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
67
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod }); }
68
68
  }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: BaseRemoteMethod, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod, decorators: [{
70
70
  type: Injectable
71
71
  }], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
72
72
  type: Optional
@@ -86,10 +86,10 @@ class RemoteMethodLoader extends DefinitionLoader {
86
86
  .load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags)
87
87
  .call(parameters);
88
88
  }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
90
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
90
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' }); }
91
91
  }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RemoteMethodLoader, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, decorators: [{
93
93
  type: Injectable,
94
94
  args: [{ providedIn: 'root' }]
95
95
  }] });
@@ -102,10 +102,10 @@ class ProxyRemoteMethod extends BaseRemoteMethod {
102
102
  async _call(parameters) {
103
103
  return this.remoteMethod.call(await this.transformParameters(parameters));
104
104
  }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
106
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ProxyRemoteMethod }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
106
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProxyRemoteMethod }); }
107
107
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
109
109
  type: Injectable
110
110
  }], ctorParameters: function () { return [{ type: BaseRemoteMethod, decorators: [{
111
111
  type: Inject,
@@ -1 +1 @@
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;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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,EAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;;0BAKN,MAAM;2BAAC,+BAA+B,CAAA;;0BAEtC,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,uBAAuB,CAAA;;;ACxBnC;;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/remote-method-loader.ts","../../../../../packages/angular/remote-method/src/lib/proxy.remote-method.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 Inject,\n Injectable,\n InjectFlags,\n InjectionToken,\n Injector,\n INJECTOR,\n Optional,\n Type,\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/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 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 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 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","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","/**\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,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,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;QAI5D,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;QAW5B,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,YAAA,MAAM,IAAI,qBAAqB,CAC7B,gFAAgF,EAChF,EAAE,EAC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kB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,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;QANT,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;KAOhD;IAIS,MAAM,KAAK,CAAC,UAA4B,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;KAC3E;AAlBmB,IAAA,SAAA,IAAA,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,EAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;;0BAKN,MAAM;2BAAC,+BAA+B,CAAA;;0BAEtC,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,uBAAuB,CAAA;;;ACxBnC;;AAEG;;;;"}
@@ -1,5 +1,2 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@rxap/remote-method/http/directive" />
5
- export * from './public_api';
1
+ export * from './lib/http-remote-method.directive';
2
+ export * from './lib/contenteditable.directive';
@@ -10,13 +10,5 @@ export declare class ContenteditableDirective {
10
10
  onClick($event: Event): void;
11
11
  onInput($event: any): Promise<any>;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<ContenteditableDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": { "alias": "rxapContenteditable"; "required": false; }; "property": { "alias": "property"; "required": false; }; "uuid": { "alias": "uuid"; "required": false; }; }, {}, never, never, false, never>;
14
- }
15
- /**
16
- * @deprecated removed
17
- */
18
- export declare class ContenteditableDirectiveModule {
19
- static ɵfac: i0.ɵɵFactoryDeclaration<ContenteditableDirectiveModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<ContenteditableDirectiveModule, [typeof ContenteditableDirective], never, [typeof ContenteditableDirective]>;
21
- static ɵinj: i0.ɵɵInjectorDeclaration<ContenteditableDirectiveModule>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": { "alias": "rxapContenteditable"; "required": true; }; "property": { "alias": "property"; "required": true; }; "uuid": { "alias": "uuid"; "required": true; }; }, {}, never, never, true, never>;
22
14
  }
@@ -1,5 +1,5 @@
1
1
  import { RemoteMethodDirective } from '@rxap/remote-method/directive';
2
- import { HttpRemoteMethodParameter, HttpRemoteMethodMetadata } from '@rxap/remote-method/http';
2
+ import { HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from '@rxap/remote-method/http';
3
3
  import { BaseRemoteMethod } from '@rxap/remote-method';
4
4
  import { IdOrInstanceOrToken } from '@rxap/definition';
5
5
  import * as i0 from "@angular/core";
@@ -15,10 +15,5 @@ export declare class HttpRemoteMethodDirective<ReturnType = any, Metadata extend
15
15
  set pathParams(pathParams: HttpRemoteMethodParameter['pathParams']);
16
16
  set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>);
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodDirective<any, any>, never>;
18
- static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": { "alias": "headers"; "required": false; }; "reportProgress": { "alias": "reportProgress"; "required": false; }; "params": { "alias": "params"; "required": false; }; "responseType": { "alias": "responseType"; "required": false; }; "withCredentials": { "alias": "withCredentials"; "required": false; }; "body": { "alias": "body"; "required": false; }; "setHeaders": { "alias": "setHeaders"; "required": false; }; "setParams": { "alias": "setParams"; "required": false; }; "pathParams": { "alias": "pathParams"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapHttpRemoteMethod"; "required": false; }; }, {}, never, never, false, never>;
19
- }
20
- export declare class HttpRemoteMethodDirectiveModule {
21
- static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodDirectiveModule, never>;
22
- static ɵmod: i0.ɵɵNgModuleDeclaration<HttpRemoteMethodDirectiveModule, [typeof HttpRemoteMethodDirective], never, [typeof HttpRemoteMethodDirective]>;
23
- static ɵinj: i0.ɵɵInjectorDeclaration<HttpRemoteMethodDirectiveModule>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": { "alias": "headers"; "required": false; }; "reportProgress": { "alias": "reportProgress"; "required": false; }; "params": { "alias": "params"; "required": false; }; "responseType": { "alias": "responseType"; "required": false; }; "withCredentials": { "alias": "withCredentials"; "required": false; }; "body": { "alias": "body"; "required": false; }; "setHeaders": { "alias": "setHeaders"; "required": false; }; "setParams": { "alias": "setParams"; "required": false; }; "pathParams": { "alias": "pathParams"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapHttpRemoteMethod"; "required": false; }; }, {}, never, never, true, never>;
24
19
  }
package/http/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@rxap/remote-method/http" />
5
- export * from './public_api';
1
+ export * from './lib/http.remote-method';
2
+ export * from './lib/http-remote-method.loader';
3
+ export * from './lib/base-http.remote-method';
@@ -1,5 +1,5 @@
1
1
  import { Injector } from '@angular/core';
2
- import { HttpClient, HttpRequest, HttpHeaders, HttpParams } from '@angular/common/http';
2
+ import { HttpClient, HttpHeaders, HttpParams, HttpRequest } from '@angular/common/http';
3
3
  import { BaseRemoteMethod, BaseRemoteMethodMetadata } from '@rxap/remote-method';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {
@@ -30,13 +30,13 @@ export interface HttpRemoteMethodParameter<PathParams = any> {
30
30
  }
31
31
  export declare abstract class BaseHttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {
32
32
  readonly http: HttpClient;
33
- protected _httpRequest: HttpRequest<ReturnType>;
34
33
  timeout: number;
34
+ protected _httpRequest: HttpRequest<ReturnType>;
35
35
  constructor(http: HttpClient, injector: Injector, metaData?: any | null);
36
- protected getRequestUrl(): string;
37
36
  init(): void;
38
37
  updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType>;
39
38
  buildUrlWithParams(url: string, pathParams?: PathParams): string;
39
+ protected getRequestUrl(): string;
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseHttpRemoteMethod<any, any, any, any>, [null, null, { optional: true; }]>;
41
41
  static ɵprov: i0.ɵɵInjectableDeclaration<BaseHttpRemoteMethod<any, any, any, any>>;
42
42
  }
@@ -1,5 +1,5 @@
1
- import { RemoteMethodLoader, BaseRemoteMethodMetadata, BaseRemoteMethod } from '@rxap/remote-method';
2
- import { Injector, InjectFlags } from '@angular/core';
1
+ import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
2
+ import { InjectFlags, Injector } from '@angular/core';
3
3
  import { IdOrInstanceOrToken } from '@rxap/definition';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class HttpRemoteMethodLoader {
@@ -1,14 +1,14 @@
1
- import { HttpSentEvent, HttpHeaderResponse, HttpResponse, HttpProgressEvent } from '@angular/common/http';
2
- import { BaseHttpRemoteMethod, HttpRemoteMethodParameter, HttpRemoteMethodMetadata } from './base-http.remote-method';
1
+ import { HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';
2
+ import { BaseHttpRemoteMethod, HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from './base-http.remote-method';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class HttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {
5
- protected _call(parameters?: Parameter): Promise<ReturnType>;
6
5
  onSentEvent(event: HttpSentEvent): void;
7
6
  onHeaderResponse(event: HttpHeaderResponse): void;
8
7
  onResponse(event: HttpResponse<ReturnType>): void;
9
8
  onProgressEvent(event: HttpProgressEvent): void;
10
9
  createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter>;
11
10
  transformer(response: any): ReturnType;
11
+ protected _call(parameters?: Parameter): Promise<ReturnType>;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethod<any, any, any, any>, never>;
13
13
  static ɵprov: i0.ɵɵInjectableDeclaration<HttpRemoteMethod<any, any, any, any>>;
14
14
  }
@@ -1,8 +1,8 @@
1
- import { Injector, Type, InjectionToken, AbstractType } from '@angular/core';
1
+ import { AbstractType, InjectionToken, Injector, Type } from '@angular/core';
2
2
  import { BaseDefinition, BaseDefinitionMetadata } from '@rxap/definition';
3
3
  import { Subject } from 'rxjs';
4
4
  import { Refreshable } from '@rxap/utilities';
5
- import { CounterSubject } from '@rxap/utilities/rxjs';
5
+ import { CounterSubject } from '@rxap/rxjs';
6
6
  import * as i0 from "@angular/core";
7
7
  export interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {
8
8
  refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;
@@ -4,8 +4,8 @@ import * as i0 from "@angular/core";
4
4
  export declare abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter> extends BaseRemoteMethod<ReturnType, SourceParameter> {
5
5
  private readonly remoteMethod;
6
6
  constructor(remoteMethod: BaseRemoteMethod, injector?: Injector | null, metadata?: BaseRemoteMethodMetadata);
7
- protected _call(parameters?: SourceParameter): Promise<any>;
8
7
  abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;
8
+ protected _call(parameters?: SourceParameter): Promise<any>;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<ProxyRemoteMethod<any, any, any>, never>;
10
10
  static ɵprov: i0.ɵɵInjectableDeclaration<ProxyRemoteMethod<any, any, any>>;
11
11
  }
@@ -1,4 +1,4 @@
1
- import { Injector, InjectFlags } from '@angular/core';
1
+ import { InjectFlags, Injector } from '@angular/core';
2
2
  import { BaseRemoteMethod, BaseRemoteMethodMetadata } from './base.remote-method';
3
3
  import { DefinitionLoader, IdOrInstanceOrToken } from '@rxap/definition';
4
4
  import * as i0 from "@angular/core";
package/package.json CHANGED
@@ -1,55 +1,64 @@
1
1
  {
2
2
  "name": "@rxap/remote-method",
3
- "version": "16.0.0-dev.0",
4
- "private": false,
5
- "author": "Merzough Münker",
6
- "homepage": "https://gitlab.com/rxap/packages/libs/remote-method",
7
- "repository": "git@gitlab.com:rxap/packages.git",
3
+ "version": "16.0.0-dev.10",
4
+ "peerDependencies": {
5
+ "@angular/common": "^16.1.4",
6
+ "@angular/core": "^16.1.4",
7
+ "@rxap/definition": "^16.0.0-dev.10",
8
+ "@rxap/rxjs": "^1.0.1-dev.5",
9
+ "@rxap/utilities": "^16.0.0-dev.13",
10
+ "rxjs": "^7.8.0",
11
+ "@angular/platform-browser": "16.1.4"
12
+ },
13
+ "sideEffects": false,
14
+ "dependencies": {
15
+ "tslib": "2.5.3"
16
+ },
17
+ "description": "Provides the RemoteMethod concept for RxAP.",
18
+ "publishConfig": {
19
+ "access": "public",
20
+ "directory": "../../../dist/packages/angular/remote-method"
21
+ },
8
22
  "keywords": [
9
23
  "rxap",
24
+ "angular",
25
+ "ngx",
26
+ "packages",
10
27
  "remote-method",
11
- "angular"
28
+ "angular-remote-method"
12
29
  ],
13
- "license": "BSD-3-Clause",
30
+ "homepage": "https:/gitlab.com/rxap/packages/packages/angular/remote-method",
14
31
  "bugs": {
15
32
  "url": "https://gitlab.com/rxap/packages/-/issues",
16
33
  "email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
17
34
  },
18
- "description": "Provides the RemoteMethod concept for RxAP.",
19
- "peerDependencies": {
20
- "@angular-devkit/core": "^15.0.3",
21
- "@angular-devkit/schematics": "^15.0.3",
22
- "@angular/common": "^16.0.2",
23
- "@angular/core": "^16.0.2",
24
- "@angular/platform-browser": "^16.0.2",
25
- "@angular/platform-browser-dynamic": "^16.0.2",
26
- "@rxap/definition": "^16.0.0-dev.0",
27
- "@rxap/utilities": "^16.0.0-dev.0",
28
- "@schematics/angular": "^15.0.3",
29
- "reflect-metadata": "^0.1.13",
30
- "rxjs": "^6.6.0"
35
+ "license": "GPL-3.0-or-later",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://gitlab.com/rxap/packages.git",
39
+ "directory": "packages/angular/remote-method"
31
40
  },
32
- "schematics": "./collection.json",
33
- "ng-update": {
34
- "migrations": "./migration.json",
41
+ "author": {
42
+ "name": "Merzough Münker",
43
+ "email": "mmuenker@digitaix.com"
44
+ },
45
+ "nx-migrations": {
35
46
  "packageGroup": [
36
- "@rxap/definition",
37
- "@rxap/remote-method",
38
- "@rxap/utilities"
47
+ {
48
+ "package": "@rxap/utilities",
49
+ "version": "16.0.0-dev.13"
50
+ },
51
+ {
52
+ "package": "@rxap/definition",
53
+ "version": "16.0.0-dev.10"
54
+ },
55
+ {
56
+ "package": "@rxap/rxjs",
57
+ "version": "1.0.1-dev.5"
58
+ }
39
59
  ]
40
60
  },
41
- "publishConfig": {
42
- "directory": "../../dist/libs/remote-method",
43
- "access": "public"
44
- },
45
- "ng-add": {
46
- "save": "dependencies"
47
- },
48
- "dependencies": {
49
- "@rxap/schematics-utilities": "^16.0.0-dev.0",
50
- "ts-morph": "^13.0.3",
51
- "tslib": "^2.3.1"
52
- },
61
+ "gitHead": "3d49d0a2548a0c403ad55c564108b54ba734a677",
53
62
  "module": "fesm2022/rxap-remote-method.mjs",
54
63
  "typings": "index.d.ts",
55
64
  "exports": {
@@ -85,7 +94,7 @@
85
94
  "esm2022": "./esm2022/http/directive/rxap-remote-method-http-directive.mjs",
86
95
  "esm": "./esm2022/http/directive/rxap-remote-method-http-directive.mjs",
87
96
  "default": "./fesm2022/rxap-remote-method-http-directive.mjs"
88
- }
89
- },
90
- "sideEffects": false
91
- }
97
+ },
98
+ "./theme": "./theme.css"
99
+ }
100
+ }
@@ -1,5 +1 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@rxap/remote-method/testing" />
5
- export * from './public_api';
1
+ export * from './lib/remote-method-testing-loader';
@@ -1,5 +1,5 @@
1
- import { RemoteMethodLoader, BaseRemoteMethod, BaseRemoteMethodMetadata } from '@rxap/remote-method';
2
- import { Provider, Type, InjectionToken, AbstractType } from '@angular/core';
1
+ import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
2
+ import { AbstractType, InjectionToken, Provider, Type } from '@angular/core';
3
3
  export type MockRemoteMethod = (parameters?: any, metadata?: any) => any;
4
4
  export declare class RemoteMethodTestingLoader extends RemoteMethodLoader {
5
5
  private mockedRemoteMethods;
package/theme.css ADDED
@@ -0,0 +1 @@
1
+ .static{position:static}.sticky{position:sticky}.block{display:block}.inline{display:inline}.contents{display:contents}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.capitalize{text-transform:capitalize}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}
package/collection.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "schematics": {
3
- "ng-add": {
4
- "description": "Setup the package @rxap/remote-method for the workspace.",
5
- "factory": "./src/schematics/ng-add/index",
6
- "schema": "./src/schematics/ng-add/schema.json"
7
- },
8
- "base": {
9
- "description": "create a base remote method",
10
- "factory": "./src/schematics/base/index",
11
- "schema": "./src/schematics/base/schema.json"
12
- },
13
- "http": {
14
- "description": "Creates a http remote method",
15
- "factory": "./src/schematics/http/index",
16
- "schema": "./src/schematics/http/schema.json"
17
- },
18
- "directive": {
19
- "description": "add a directive for the remote method",
20
- "factory": "./src/schematics/directive/index",
21
- "schema": "./src/schematics/directive/schema.json"
22
- }
23
- },
24
- "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
25
- }
@@ -1,5 +0,0 @@
1
- export * from './lib/remote-method.directive';
2
- export * from './lib/remote-method-template-collection.directive';
3
- export * from './lib/remote-method-template.directive';
4
- export * from './lib/error';
5
- export * from './lib/tokens';
@@ -1,6 +0,0 @@
1
- export * from './lib/remote-method.directive';
2
- export * from './lib/remote-method-template-collection.directive';
3
- export * from './lib/remote-method-template.directive';
4
- export * from './lib/error';
5
- export * from './lib/tokens';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9kaXJlY3RpdmUvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLG1EQUFtRCxDQUFDO0FBQ2xFLGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLXRlbXBsYXRlLWNvbGxlY3Rpb24uZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3JlbW90ZS1tZXRob2QtdGVtcGxhdGUuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Vycm9yJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3Rva2Vucyc7XG4iXX0=
@@ -1,3 +0,0 @@
1
- export * from './lib/http-remote-method.directive';
2
- export * from './lib/contenteditable.directive';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9odHRwL2RpcmVjdGl2ZS9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9DQUFvQyxDQUFDO0FBQ25ELGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9odHRwLXJlbW90ZS1tZXRob2QuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbnRlbnRlZGl0YWJsZS5kaXJlY3RpdmUnO1xuIl19
@@ -1,4 +0,0 @@
1
- export * from './lib/http.remote-method';
2
- export * from './lib/http-remote-method.loader';
3
- export * from './lib/base-http.remote-method';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9odHRwL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLCtCQUErQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvaHR0cC5yZW1vdGUtbWV0aG9kJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2h0dHAtcmVtb3RlLW1ldGhvZC5sb2FkZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYmFzZS1odHRwLnJlbW90ZS1tZXRob2QnO1xuIl19
@@ -1,2 +0,0 @@
1
- export * from './lib/remote-method-testing-loader';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC90ZXN0aW5nL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0NBQW9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLXRlc3RpbmctbG9hZGVyJztcbiJdfQ==
@@ -1,2 +0,0 @@
1
- export * from './lib/http-remote-method.directive';
2
- export * from './lib/contenteditable.directive';
@@ -1,3 +0,0 @@
1
- export * from './lib/http.remote-method';
2
- export * from './lib/http-remote-method.loader';
3
- export * from './lib/base-http.remote-method';
package/migration.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "schematics": {},
3
- "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
4
- }
@@ -1,14 +0,0 @@
1
- import { RxapRemoteMethod, BaseRemoteMethod } from '@rxap/remote-method';
2
- import { Injectable } from '@angular/core';
3
-
4
- @RxapRemoteMethod({
5
- id: '<%= dasherize(name) %>'
6
- })
7
- @Injectable()
8
- export class <%= classify(name) %>RemoteMethod extends BaseRemoteMethod {
9
-
10
- protected async _call(parameters?: any): Promise<any> {
11
- return parameters;
12
- }
13
-
14
- }
@@ -1,12 +0,0 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- import { BaseSchema } from './schema';
3
- export interface CreateRemoteMethodOptions {
4
- filePath: string;
5
- name: string;
6
- parametersType: string;
7
- returnType: string;
8
- collection: boolean;
9
- }
10
- export declare function CreateRemoteMethod({ filePath, name, parametersType, returnType, collection }: CreateRemoteMethodOptions): Rule;
11
- export declare function AddExport(basePath: string, filePath: string): Rule;
12
- export default function (options: BaseSchema): Rule;