@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.
- package/CHANGELOG.md +34 -0
- package/compodoc/changelog.html +32 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/injectables/BaseRemoteMethod.html +20 -21
- package/compodoc/injectables/ProxyRemoteMethod.html +10 -10
- package/compodoc/injectables/RemoteMethodLoader.html +5 -5
- package/compodoc/interfaces/BaseRemoteMethodMetadata.html +2 -3
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +404 -418
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/classes/BaseRemoteMethod.html +10 -10
- package/docs/html/classes/ProxyRemoteMethod.html +10 -10
- package/docs/html/classes/RemoteMethodLoader.html +2 -2
- package/docs/html/classes/RxapRemoteMethodError.html +6 -5
- package/docs/html/functions/RxapRemoteMethod.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/BaseRemoteMethodMetadata.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/REMOTE_METHOD_META_DATA.html +1 -1
- package/docs/html/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/BaseRemoteMethod.md +31 -31
- package/docs/markdown/classes/ProxyRemoteMethod.md +32 -32
- package/docs/markdown/classes/RemoteMethodLoader.md +7 -15
- package/docs/markdown/classes/RxapRemoteMethodError.md +25 -13
- package/docs/markdown/functions/RxapRemoteMethod.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/BaseRemoteMethodMetadata.md +5 -5
- package/docs/markdown/variables/REMOTE_METHOD_META_DATA.md +2 -2
- package/docs/markdown/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.md +2 -2
- package/docs/wiki/Class.BaseRemoteMethod.md +30 -30
- package/docs/wiki/Class.ProxyRemoteMethod.md +31 -31
- package/docs/wiki/Class.RemoteMethodLoader.md +6 -14
- package/docs/wiki/Class.RxapRemoteMethodError.md +24 -12
- package/docs/wiki/Function.RxapRemoteMethod.md +1 -1
- package/docs/wiki/Interface.BaseRemoteMethodMetadata.md +4 -4
- package/docs/wiki/Variable.REMOTE_METHOD_META_DATA.md +1 -1
- package/docs/wiki/Variable.RXAP_PROXY_REMOTE_METHOD_TARGET.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-remote-method-directive.mjs +162 -308
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http-directive.mjs +52 -91
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http.mjs +13 -20
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2022/rxap-remote-method.mjs +12 -12
- package/fesm2022/rxap-remote-method.mjs.map +1 -1
- package/package.json +25 -24
- package/types/rxap-remote-method-directive.d.ts +211 -0
- package/types/rxap-remote-method-http-directive.d.ts +40 -0
- package/types/rxap-remote-method-http.d.ts +68 -0
- package/{testing/lib/remote-method-testing-loader.d.ts → types/rxap-remote-method-testing.d.ts} +9 -5
- package/types/rxap-remote-method.d.ts +53 -0
- package/directive/index.d.ts +0 -5
- package/directive/lib/error.d.ts +0 -4
- package/directive/lib/remote-method-template-collection.directive.d.ts +0 -118
- package/directive/lib/remote-method-template.directive.d.ts +0 -54
- package/directive/lib/remote-method.directive.d.ts +0 -41
- package/directive/lib/tokens.d.ts +0 -2
- package/http/directive/index.d.ts +0 -2
- package/http/directive/lib/contenteditable.directive.d.ts +0 -14
- package/http/directive/lib/http-remote-method.directive.d.ts +0 -19
- package/http/index.d.ts +0 -3
- package/http/lib/base-http.remote-method.d.ts +0 -44
- package/http/lib/http-remote-method.loader.d.ts +0 -11
- package/http/lib/http.remote-method.d.ts +0 -14
- package/index.d.ts +0 -5
- package/lib/base.remote-method.d.ts +0 -27
- package/lib/error.d.ts +0 -4
- package/lib/proxy.remote-method.d.ts +0 -11
- package/lib/remote-method-loader.d.ts +0 -9
- package/lib/tokens.d.ts +0 -3
- package/testing/index.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../../packages/angular/remote-method/directive/src/lib/error.ts","../../../../../packages/angular/remote-method/directive/src/lib/tokens.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method.directive.ts","../../../../../packages/angular/remote-method/directive/src/index.ts","../../../../../packages/angular/remote-method/directive/src/rxap-remote-method-directive.ts"],"sourcesContent":["import { RxapRemoteMethodError } from '@rxap/remote-method';\n\nexport class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {\n\n constructor(message: string, code?: string, scope?: string) {\n super(message, code ?? '', scope);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');\n","import {\n ChangeDetectorRef,\n Directive,\n DoCheck,\n EmbeddedViewRef,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnChanges,\n OnInit,\n Optional,\n Self,\n SimpleChanges,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport { Required } from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n take,\n tap,\n} from 'rxjs/operators';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\n\nexport class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {\n constructor(\n public $implicit: ReturnType,\n public index: number,\n public count: number,\n ) {\n }\n\n get first(): boolean {\n return this.index === 0;\n }\n\n get last(): boolean {\n return this.index === this.count - 1;\n }\n\n get even(): boolean {\n return this.index % 2 === 0;\n }\n\n get odd(): boolean {\n return !this.even;\n }\n}\n\nexport interface RemoteMethodTemplateCollectionDirectiveErrorContext {\n $implicit: Error;\n message?: string;\n name?: string;\n}\n\nfunction getTypeName(type: any): string {\n return type['name'] || typeof type;\n}\n\nclass RecordViewTuple<T> {\n constructor(public record: any, public view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<T>>) {\n }\n}\n\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection',\n standalone: true,\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, DoCheck, OnInit {\n\n @Input('rxapRemoteMethodCollectionParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionEmpty')\n public emptyTemplate?: TemplateRef<void>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;\n @Input('rxapRemoteMethodCollectionWithoutParameters')\n public withoutParameters = false;\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _trackByFn!: TrackByFunction<ReturnType>;\n private _dirty = true;\n /**\n * Indicates that the remote method returned a empty collection\n *\n * true - is empty\n * false - is NOT empty\n * null - unknown\n *\n * @private\n */\n private _empty: boolean | null = null;\n /**\n * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\n /**\n * Holds the empty template view ref.\n *\n * Is used to determine if a empty template is added to the\n * view. And used to destruct the empty template if the remote method\n * changes from empty to not empty.\n *\n * @private\n */\n private _emptyTemplateViewRef: EmbeddedViewRef<void> | null = null;\n /**\n * Holds the error template view ref.\n *\n * Is used to determine if a error template is added to the\n * view. And used to destruct the error template if the remote method\n * is called again with an error.\n *\n * @private\n */\n private _errorTemplateViewRef: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveErrorContext> | null = null;\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Inject(IterableDiffers)\n private readonly differs: IterableDiffers,\n @Inject(NgZone)\n private readonly zone: NgZone,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any,\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n get trackBy(): TrackByFunction<ReturnType> {\n return this._trackByFn;\n }\n\n /**\n * A function that defines how to track changes for items in the iterable.\n *\n * When items are added, moved, or removed in the iterable,\n * the directive must re-render the appropriate DOM nodes.\n * To minimize churn in the DOM, only nodes that have changed\n * are re-rendered.\n *\n * By default, the change detector assumes that\n * the object instance identifies the node in the iterable.\n * When this function is supplied, the directive uses\n * the result of calling this function to identify the item node,\n * rather than the identity of the object itself.\n *\n * The function receives two inputs,\n * the iteration index and the node object ID.\n */\n @Input('rxapRemoteMethodCollectionTrackBy')\n set trackBy(fn: TrackByFunction<ReturnType>) {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (<any>console && <any>console.warn) {\n console.warn(\n `trackBy must be a function, but received ${ JSON.stringify(fn) }. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n }\n this._trackByFn = fn;\n }\n\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCollectionCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n /**\n * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateCollectionDirectiveContext<T> {\n return true;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes['parameters'];\n if (parametersChanges) {\n this.call(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n if (this.withoutParameters) {\n this.call();\n }\n }\n\n public call(parameters?: Parameters): void {\n this.zone.onStable.pipe(\n take(1),\n tap(() => {\n this.zone.run(() => {\n this.remoteMethodLoader\n .call$(this._remoteMethodOrIdOrToken, parameters, undefined, this.injector)\n .then(response => {\n // guard against non-array responses (null/undefined/scalar) to\n // avoid reading .length off a non-iterable and crashing\n const isArray = Array.isArray(response);\n this._empty = !isArray || response.length === 0;\n this._data = isArray ? response : [];\n this.cdr.detectChanges();\n })\n .catch(error => {\n this._error = error;\n this.cdr.detectChanges();\n });\n });\n }),\n ).subscribe();\n }\n\n /**\n * Applies the changes when needed.\n */\n public ngDoCheck(): void {\n if (this._error !== null) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n if (this.errorTemplate) {\n this._errorTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.errorTemplate, {\n $implicit: this._error,\n message: this._error.message,\n name: this._error.name,\n });\n }\n\n } else if (this._empty === true) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n // attaches the empty template if the data source is empty\n if (this.emptyTemplate) {\n this._emptyTemplateViewRef = this.viewContainerRef.createEmbeddedView(this.emptyTemplate);\n }\n\n } else if (this._empty === false) {\n\n // detach and destroy the empty template if the data source is not\n // empty any more\n if (this._emptyTemplateViewRef) {\n this._emptyTemplateViewRef.detach();\n this._emptyTemplateViewRef.destroy();\n this._emptyTemplateViewRef = null;\n }\n\n if (this._errorTemplateViewRef) {\n this._errorTemplateViewRef.detach();\n this._errorTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._data) {\n this._dirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._data;\n if (!this._differ && value) {\n try {\n this._differ = this.differs.find(value).create(this.trackBy);\n } catch {\n throw new Error(`Cannot find a differ supporting object '${ value }' of type '${\n getTypeName(value) }'. NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._data);\n if (changes) {\n this.applyChanges(changes);\n }\n }\n }\n }\n\n protected applyChanges(changes: IterableChanges<ReturnType>) {\n\n const insertTuples: RecordViewTuple<ReturnType>[] = [];\n changes.forEachOperation(\n (item: IterableChangeRecord<any>, adjustedPreviousIndex: number | null, currentIndex: number | null) => {\n\n if (item.previousIndex == null) {\n\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n const view = this.viewContainerRef.createEmbeddedView(\n this.template,\n new RemoteMethodTemplateCollectionDirectiveContext<ReturnType>(null!, -1, -1),\n currentIndex === null ? undefined : currentIndex,\n );\n const tuple = new RecordViewTuple<ReturnType>(item, view);\n insertTuples.push(tuple);\n\n } else if (currentIndex == null) {\n\n this.viewContainerRef.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n\n } else if (adjustedPreviousIndex !== null) {\n\n const view = this.viewContainerRef.get(adjustedPreviousIndex)!;\n this.viewContainerRef.move(view, currentIndex);\n const tuple = new RecordViewTuple(\n item,\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view,\n );\n insertTuples.push(tuple);\n\n }\n\n });\n\n for (let i = 0; i < insertTuples.length; i++) {\n this.perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n\n for (let i = 0,\n ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(\n i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n }\n\n changes.forEachIdentityChange((record: any) => {\n const viewRef =\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n\n }\n\n private perViewChange(\n view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>,\n record: IterableChangeRecord<any>,\n ) {\n view.context.$implicit = record.item;\n }\n\n}\n\n\n","import {\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnChanges,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\nexport interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {\n $implicit: ReturnType;\n}\n\nexport interface RemoteMethodTemplateDirectiveErrorContext {\n $implicit: Error;\n message: string;\n}\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n})\nexport class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnChanges, OnInit {\n\n // TODO : remove template context Guard\n // the template context Guard must be defined with a concrete context type\n // else the context guard is resolved to any\n // For each child directive that should have a template context guard\n // the template context guard must be defined\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input('rxapRemoteMethodMetadata')\n public metadata?: Metadata;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n @Input('rxapRemoteMethodParameters')\n public parameters?: Parameters;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodError')\n public errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodLoading')\n public loadingTemplate?: TemplateRef<void>;\n @Input('rxapRemoteMethodWithoutParameters')\n public withoutParameters = false;\n @Output()\n public embedded = new EventEmitter();\n\n constructor(\n @Inject(TemplateRef)\n private readonly template: TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>,\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any,\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapRemoteMethodCall')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n // !! add generation of concrete template context guard to openapi schematics !!\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateDirectiveContext<T> {\n return true;\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const parametersChanges = changes['parameters'];\n if (parametersChanges) {\n this.execute(parametersChanges.currentValue);\n }\n }\n\n public ngOnInit() {\n this.renderLoadingTemplate();\n if (this.withoutParameters) {\n this.execute();\n }\n }\n\n public async execute(parameters: Parameters | undefined = this.parameters): Promise<void> {\n this.executing$.enable();\n this.renderLoadingTemplate();\n try {\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken,\n parameters,\n this.metadata,\n this.injector,\n );\n this.executed(result);\n this.renderTemplate(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n public call(parameters?: Parameters): void {\n this.execute(parameters)\n .catch(error => console.error('Remote method template rendering failed: ' + error.message));\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n protected renderTemplate(result: ReturnType) {\n\n this.viewContainerRef.clear();\n\n try {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });\n } catch (error: any) {\n if (this.errorTemplate) {\n this.viewContainerRef.createEmbeddedView(\n this.errorTemplate,\n {\n $implicit: error,\n message: error.message,\n },\n );\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n private renderLoadingTemplate() {\n if (this.loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(this.loadingTemplate);\n }\n }\n\n}\n\n\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n coerceBoolean,\n Deprecated,\n Required,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n\n @Input()\n public parameters?: Parameters;\n @Input()\n public metadata?: Metadata;\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('executed')\n public executed$ = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n @Input()\n public immediately = false;\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n constructor(\n @Inject(RemoteMethodLoader)\n protected readonly remoteMethodLoader: RemoteMethodLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector = Injector.NULL,\n @Optional()\n @Self()\n @Inject(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN)\n private readonly remoteMethodToken?: any,\n ) {\n if (this.remoteMethodToken) {\n this._remoteMethodOrIdOrToken = this.remoteMethodToken;\n }\n }\n\n protected _remoteMethodOrIdOrToken!: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;\n\n @Input('rxapRemoteMethod')\n public set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>) {\n if (value) {\n this._remoteMethodOrIdOrToken = value;\n }\n }\n\n private _hasConfirmDirective = false;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n public ngOnInit(): void {\n if (this.immediately) {\n this.execute();\n }\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n this.execute();\n }\n\n @HostListener('click')\n public onClick() {\n if (!this._hasConfirmDirective) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public async execute(): Promise<void> {\n this.executing$.enable();\n try {\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\n this.executed(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n protected async call(): Promise<any> {\n this.executing$.enable();\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken,\n this.parameters,\n this.metadata,\n this.injector,\n );\n this.executing$.disable();\n return result;\n }\n\n}\n\n\n","// region \nexport * from './lib/error';\nexport * from './lib/remote-method-template-collection.directive';\nexport * from './lib/remote-method-template.directive';\nexport * from './lib/remote-method.directive';\nexport * from './lib/tokens';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC;;AAGpC;;MCNY,kCAAkC,GAAG,IAAI,cAAc,CAAC,oCAAoC;;MCmC5F,8CAA8C,CAAA;AACzD,IAAA,WAAA,CACS,SAAqB,EACrB,KAAa,EACb,KAAa,EAAA;QAFb,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAK,CAAA,KAAA,GAAL,KAAK;;AAId,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,KAAK,KAAK,CAAC;;AAGzB,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC;;AAGtC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;;AAG7B,IAAA,IAAI,GAAG,GAAA;AACL,QAAA,OAA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AQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;0BAyBI,MAAM;2BAAC,kBAAkB;;0BAEzB,MAAM;2BAAC,QAAQ;;0BAEf;;0BACA;;0BACA,MAAM;2BAAC,kCAAkC;yCA1BrC,UAAU,EAAA,CAAA;sBADhB;gBAGM,QAAQ,EAAA,CAAA;sBADd;gBAIM,SAAS,EAAA,CAAA;sBADf,MAAM;uBAAC,UAAU;gBAIX,QAAQ,EAAA,CAAA;sBADd,MAAM;uBAAC,SAAS;gBAIV,WAAW,EAAA,CAAA;sBADjB,MAAM;uBAAC,YAAY;gBAGb,WAAW,EAAA,CAAA;sBADjB;gBAyBU,uBAAuB,EAAA,CAAA;sBADjC,KAAK;uBAAC,kBAAkB;gBAWd,mBAAmB,EAAA,CAAA;sBAD7B,KAAK;uBAAC,aAAa;gBAYb,WAAW,EAAA,CAAA;sBADjB,YAAY;uBAAC,WAAW;gBAMlB,OAAO,EAAA,CAAA;sBADb,YAAY;uBAAC,OAAO;gBAuDL,IAAI,EAAA,EAAA,EAAA,EAAA,CAAA;;AC1JtB;AAMA;;ACNA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-directive.mjs","sources":["../../../../../packages/angular/remote-method/directive/src/lib/error.ts","../../../../../packages/angular/remote-method/directive/src/lib/tokens.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template-collection.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method-template.directive.ts","../../../../../packages/angular/remote-method/directive/src/lib/remote-method.directive.ts","../../../../../packages/angular/remote-method/directive/src/index.ts","../../../../../packages/angular/remote-method/directive/src/rxap-remote-method-directive.ts"],"sourcesContent":["import { RxapRemoteMethodError } from '@rxap/remote-method';\n\nexport class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {\n\n constructor(message: string, code?: string, scope?: string) {\n super(message, code ?? '', scope);\n }\n\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN = new InjectionToken('rxap/remote-method/directive/token');\n","import { ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Injector, INJECTOR, isDevMode, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, OnInit, TemplateRef, TrackByFunction, ViewContainerRef, input, inject, computed, effect, untracked } from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\n\nexport class RemoteMethodTemplateCollectionDirectiveContext<ReturnType = any> {\n constructor(\n public $implicit: ReturnType,\n public index: number,\n public count: number,\n ) {\n }\n\n get first(): boolean {\n return this.index === 0;\n }\n\n get last(): boolean {\n return this.index === this.count - 1;\n }\n\n get even(): boolean {\n return this.index % 2 === 0;\n }\n\n get odd(): boolean {\n return !this.even;\n }\n}\n\nexport interface RemoteMethodTemplateCollectionDirectiveErrorContext {\n $implicit: Error;\n message?: string;\n name?: string;\n}\n\nfunction getTypeName(type: any): string {\n return type['name'] || typeof type;\n}\n\nclass RecordViewTuple<T> {\n constructor(public record: any, public view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<T>>) {\n }\n}\n\n@Directive({\n selector: '[rxapRemoteMethodCollection]',\n exportAs: 'rxapRemoteMethodCollection',\n standalone: true,\n})\nexport class RemoteMethodTemplateCollectionDirective<ReturnType = any,\n Parameters = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements DoCheck, OnInit {\n private readonly template = inject<TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>(TemplateRef);\n protected readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n private readonly injector = inject<Injector>(INJECTOR);\n private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);\n protected readonly cdr = inject<ChangeDetectorRef>(ChangeDetectorRef);\n private readonly differs = inject<IterableDiffers>(IterableDiffers);\n private readonly remoteMethodToken = inject<any>(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, { optional: true, self: true });\n\n\n public readonly parameters = input<Parameters>(undefined, { alias: \"rxapRemoteMethodCollectionParameters\" });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly emptyTemplate = input<TemplateRef<void>>(undefined, { alias: \"rxapRemoteMethodCollectionEmpty\" });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly errorTemplate = input<TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>>(undefined, { alias: \"rxapRemoteMethodCollectionError\" });\n public readonly withoutParameters = input(false, { alias: \"rxapRemoteMethodCollectionWithoutParameters\" });\n private _differ: IterableDiffer<ReturnType> | null = null;\n private _dirty = true;\n /**\n * Indicates that the remote method returned a empty collection\n *\n * true - is empty\n * false - is NOT empty\n * null - unknown\n *\n * @private\n */\n private _empty: boolean | null = null;\n /**\n * Holds the error that call of the remote method throws\n *\n * @private\n */\n private _error: Error | null = null;\n /**\n * Holds the empty template view ref.\n *\n * Is used to determine if a empty template is added to the\n * view. And used to destruct the empty template if the remote method\n * changes from empty to not empty.\n *\n * @private\n */\n private _emptyTemplateViewRef: EmbeddedViewRef<void> | null = null;\n /**\n * Holds the error template view ref.\n *\n * Is used to determine if a error template is added to the\n * view. And used to destruct the error template if the remote method\n * is called again with an error.\n *\n * @private\n */\n private _errorTemplateViewRef: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveErrorContext> | null = null;\n\n /**\n * A function that defines how to track changes for items in the iterable.\n *\n * When items are added, moved, or removed in the iterable,\n * the directive must re-render the appropriate DOM nodes.\n * To minimize churn in the DOM, only nodes that have changed\n * are re-rendered.\n *\n * By default, the change detector assumes that\n * the object instance identifies the node in the iterable.\n * When this function is supplied, the directive uses\n * the result of calling this function to identify the item node,\n * rather than the identity of the object itself.\n *\n * The function receives two inputs,\n * the iteration index and the node object ID.\n */\n public readonly trackBy = input<TrackByFunction<ReturnType>, TrackByFunction<ReturnType> | undefined>(\n undefined as any,\n {\n alias: 'rxapRemoteMethodCollectionTrackBy',\n transform: (fn) => {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n console.warn(\n `trackBy must be a function, but received ${ JSON.stringify(fn) }. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n }\n return fn as TrackByFunction<ReturnType>;\n },\n },\n );\n\n public readonly remoteMethodOrIdOrToken = input<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>>(undefined, { alias: 'rxapRemoteMethodCollectionCall' });\n\n protected readonly _remoteMethodOrIdOrToken = computed(() => this.remoteMethodOrIdOrToken() || this.remoteMethodToken);\n\n /**\n * Holds the data that should be displayed\n * @private\n */\n private _data: ReturnType[] | null = null;\n\n protected set data(data: ReturnType[]) {\n this._data = data;\n this._dirty = true;\n }\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateCollectionDirectiveContext<T> {\n return true;\n }\n\n constructor() {\n // re-run whenever the bound parameters change\n effect(() => {\n const parameters = this.parameters();\n if (parameters !== undefined) {\n untracked(() => this.call(parameters));\n }\n });\n }\n\n public ngOnInit() {\n if (this.withoutParameters()) {\n this.call();\n }\n }\n\n public call(parameters?: Parameters): void {\n this.remoteMethodLoader\n .call$(this._remoteMethodOrIdOrToken(), parameters, undefined, this.injector)\n .then(response => {\n // guard against non-array responses (null/undefined/scalar) to\n // avoid reading .length off a non-iterable and crashing\n const isArray = Array.isArray(response);\n // a successful call clears a previous error, otherwise the error template sticks forever\n this._error = null;\n this._empty = !isArray || response.length === 0;\n this._data = isArray ? response : [];\n this.cdr.detectChanges();\n })\n .catch(error => {\n this._error = error;\n this.cdr.detectChanges();\n });\n }\n\n /**\n * Applies the changes when needed.\n */\n public ngDoCheck(): void {\n if (this._error !== null) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n const errorTemplate = this.errorTemplate();\n if (errorTemplate) {\n this._errorTemplateViewRef = this.viewContainerRef.createEmbeddedView(errorTemplate, {\n $implicit: this._error,\n message: this._error.message,\n name: this._error.name,\n });\n }\n\n } else if (this._empty === true) {\n\n this.viewContainerRef.clear();\n this._differ = null;\n\n // attaches the empty template if the data source is empty\n const emptyTemplate = this.emptyTemplate();\n if (emptyTemplate) {\n this._emptyTemplateViewRef = this.viewContainerRef.createEmbeddedView(emptyTemplate);\n }\n\n } else if (this._empty === false) {\n\n // detach and destroy the empty template if the data source is not\n // empty any more\n if (this._emptyTemplateViewRef) {\n this._emptyTemplateViewRef.detach();\n this._emptyTemplateViewRef.destroy();\n this._emptyTemplateViewRef = null;\n }\n\n if (this._errorTemplateViewRef) {\n this._errorTemplateViewRef.detach();\n this._errorTemplateViewRef.destroy();\n this._errorTemplateViewRef = null;\n }\n\n if (this._data) {\n this._dirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._data;\n if (!this._differ && value) {\n try {\n this._differ = this.differs.find(value).create(this.trackBy());\n } catch {\n throw new Error(`Cannot find a differ supporting object '${ value }' of type '${\n getTypeName(value) }'. NgFor only supports binding to Iterables such as Arrays.`);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._data);\n if (changes) {\n this.applyChanges(changes);\n }\n }\n }\n }\n\n protected applyChanges(changes: IterableChanges<ReturnType>) {\n\n const insertTuples: RecordViewTuple<ReturnType>[] = [];\n changes.forEachOperation(\n (item: IterableChangeRecord<any>, adjustedPreviousIndex: number | null, currentIndex: number | null) => {\n\n if (item.previousIndex == null) {\n\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n const view = this.viewContainerRef.createEmbeddedView(\n this.template,\n new RemoteMethodTemplateCollectionDirectiveContext<ReturnType>(null!, -1, -1),\n currentIndex === null ? undefined : currentIndex,\n );\n const tuple = new RecordViewTuple<ReturnType>(item, view);\n insertTuples.push(tuple);\n\n } else if (currentIndex == null) {\n\n this.viewContainerRef.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n\n } else if (adjustedPreviousIndex !== null) {\n\n const view = this.viewContainerRef.get(adjustedPreviousIndex)!;\n this.viewContainerRef.move(view, currentIndex);\n const tuple = new RecordViewTuple(\n item,\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>view,\n );\n insertTuples.push(tuple);\n\n }\n\n });\n\n for (let i = 0; i < insertTuples.length; i++) {\n this.perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n\n for (let i = 0,\n ilen = this.viewContainerRef.length; i < ilen; i++) {\n const viewRef = <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(\n i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n }\n\n changes.forEachIdentityChange((record: any) => {\n const viewRef =\n <EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>>this.viewContainerRef.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n\n }\n\n private perViewChange(\n view: EmbeddedViewRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>,\n record: IterableChangeRecord<any>,\n ) {\n view.context.$implicit = record.item;\n }\n\n}\n\n\n","import { ChangeDetectorRef, Directive, Injector, INJECTOR, isDevMode, OnInit, TemplateRef, ViewContainerRef, input, output, inject, linkedSignal, computed, effect, untracked } from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n Deprecated,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\nexport interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {\n $implicit: ReturnType;\n}\n\nexport interface RemoteMethodTemplateDirectiveErrorContext {\n $implicit: Error;\n message: string;\n}\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n})\nexport class RemoteMethodTemplateDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n private readonly template = inject<TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>>(TemplateRef);\n protected readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n private readonly injector = inject<Injector>(INJECTOR);\n private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);\n protected readonly cdr = inject<ChangeDetectorRef>(ChangeDetectorRef);\n private readonly remoteMethodToken = inject<any>(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, { optional: true, self: true });\n\n\n // TODO : remove template context Guard\n // the template context Guard must be defined with a concrete context type\n // else the context guard is resolved to any\n // For each child directive that should have a template context guard\n // the template context guard must be defined\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly executed$ = output({ alias: 'executed' });\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly failure$ = output<Error>({ alias: 'failure' });\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly successful$ = output<ReturnType>({ alias: 'successful' });\n public readonly metadata = input<Metadata>(undefined, { alias: \"rxapRemoteMethodMetadata\" });\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n public readonly parameters = input<Parameters>(undefined, { alias: \"rxapRemoteMethodParameters\" });\n protected readonly currentParameters = linkedSignal(() => this.parameters());\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly errorTemplate = input<TemplateRef<RemoteMethodTemplateDirectiveErrorContext>>(undefined, { alias: \"rxapRemoteMethodError\" });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly loadingTemplate = input<TemplateRef<void>>(undefined, { alias: \"rxapRemoteMethodLoading\" });\n public readonly withoutParameters = input(false, { alias: \"rxapRemoteMethodWithoutParameters\" });\n public readonly embedded = output();\n\n public readonly remoteMethodOrIdOrToken = input<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>>(undefined, { alias: 'rxapRemoteMethodCall' });\n\n protected readonly _remoteMethodOrIdOrToken = computed(() => this.remoteMethodOrIdOrToken() || this.remoteMethodToken);\n\n // !! add generation of concrete template context guard to openapi schematics !!\n static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any):\n ctx is RemoteMethodTemplateDirectiveContext<T> {\n return true;\n }\n\n constructor() {\n // re-run whenever the bound parameters change\n effect(() => {\n const parameters = this.parameters();\n if (parameters !== undefined) {\n untracked(() => this.execute(parameters));\n }\n });\n }\n\n public ngOnInit() {\n this.renderLoadingTemplate();\n if (this.withoutParameters()) {\n this.execute();\n }\n }\n\n public async execute(parameters: Parameters | undefined = this.currentParameters()): Promise<void> {\n this.executing$.enable();\n this.renderLoadingTemplate();\n try {\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken(),\n parameters,\n this.metadata(),\n this.injector,\n );\n this.executed(result);\n this.renderTemplate(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n public call(parameters?: Parameters): void {\n this.execute(parameters)\n .catch(error => console.error('Remote method template rendering failed: ' + error.message));\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.currentParameters.set({ ...(this.currentParameters() ?? {}), ...parameters } as any);\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n protected renderTemplate(result: ReturnType) {\n\n this.viewContainerRef.clear();\n\n try {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });\n } catch (error: any) {\n const errorTemplate = this.errorTemplate();\n if (errorTemplate) {\n this.viewContainerRef.createEmbeddedView(\n errorTemplate,\n {\n $implicit: error,\n message: error.message,\n },\n );\n }\n console.error(error.message);\n }\n\n this.embedded.emit();\n\n this.cdr.detectChanges();\n\n }\n\n private renderLoadingTemplate() {\n const loadingTemplate = this.loadingTemplate();\n if (loadingTemplate) {\n this.viewContainerRef.clear();\n this.viewContainerRef.createEmbeddedView(loadingTemplate);\n }\n }\n\n}\n\n\n","import { Directive, Injector, INJECTOR, isDevMode, OnInit, input, output, inject, linkedSignal, computed } from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n coerceBoolean,\n Deprecated,\n} from '@rxap/utilities';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN } from './tokens';\nimport { ToggleSubject } from '@rxap/rxjs';\n\n@Directive({\n selector: '[rxapRemoteMethod]',\n exportAs: 'rxapRemoteMethod',\n standalone: true,\n host: {\n '(confirmed)': 'onConfirmed()',\n '(click)': 'onClick()',\n },\n})\nexport class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>\n implements OnInit {\n protected readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n private readonly injector = inject<Injector>(INJECTOR) ?? Injector.NULL;\n private readonly remoteMethodToken = inject<any>(RXAP_REMOTE_METHOD_DIRECTIVE_TOKEN, { optional: true, self: true });\n\n\n public readonly parameters = input<Parameters>();\n protected readonly currentParameters = linkedSignal(() => this.parameters());\n public readonly metadata = input<Metadata>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly executed$ = output({ alias: 'executed' });\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly failure$ = output<Error>({ alias: 'failure' });\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly successful$ = output<ReturnType>({ alias: 'successful' });\n public readonly immediately = input(false);\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n public readonly remoteMethodOrIdOrToken = input<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>>(undefined, { alias: 'rxapRemoteMethod' });\n\n protected readonly _remoteMethodOrIdOrToken = computed(() => this.remoteMethodOrIdOrToken() || this.remoteMethodToken);\n\n public readonly hasConfirmDirective = input(false, { alias: 'rxapConfirm', transform: coerceBoolean });\n\n public ngOnInit(): void {\n if (this.immediately()) {\n this.execute();\n }\n }\n\n public onConfirmed() {\n this.execute();\n }\n\n public onClick() {\n if (!this.hasConfirmDirective()) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public async execute(): Promise<void> {\n this.executing$.enable();\n try {\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken(),\n this.currentParameters(),\n this.metadata(),\n this.injector,\n );\n this.executed(result);\n this.successful(result);\n } catch (error: any) {\n if (isDevMode()) {\n console.error(`Remote method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [parameterKey]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.currentParameters.set({ ...(this.currentParameters() ?? {}), ...parameters } as any);\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n /**\n * @deprecated removed\n * @protected\n */\n @Deprecated('removed')\n protected async call(): Promise<any> {\n this.executing$.enable();\n const result = await this.remoteMethodLoader.call$(\n this._remoteMethodOrIdOrToken(),\n this.currentParameters(),\n this.metadata(),\n this.injector,\n );\n this.executing$.disable();\n return result;\n }\n\n}\n\n\n","// region \nexport * from './lib/error';\nexport * from './lib/remote-method-template-collection.directive';\nexport * from './lib/remote-method-template.directive';\nexport * from './lib/remote-method.directive';\nexport * from './lib/tokens';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAO,8BAA+B,SAAQ,qBAAqB,CAAA;AAEvE,IAAA,WAAA,CAAY,OAAe,EAAE,IAAa,EAAE,KAAc,EAAA;QACxD,KAAK,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC;IACnC;AAED;;MCNY,kCAAkC,GAAG,IAAI,cAAc,CAAC,oCAAoC;;MCO5F,8CAA8C,CAAA;AACzD,IAAA,WAAA,CACS,SAAqB,EACrB,KAAa,EACb,KAAa,EAAA;QAFb,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,KAAK,GAAL,KAAK;IAEd;AAEA,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,KAAK,KAAK,CAAC;IACzB;AAEA,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC;IACtC;AAEA,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;IAC7B;AAEA,IAAA,IAAI,GAAG,GAAA;AACL,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI;IACnB;AACD;AAQD,SAAS,WAAW,CAAC,IAAS,EAAA;AA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,WAAA,EAAA,eAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;AA4FhB,UAAA,CAAA;IADf,UAAU,CAAC,SAAS,CAAC;;;;AAWrB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,IAAA,CAAA;2FAtGU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBATjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,aAAa,EAAE,eAAe;AAC9B,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACtBD;AAMA;;ACNA;;AAEG;;;;"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { inject, input, Directive, effect, untracked } from '@angular/core';
|
|
4
4
|
import { DebounceCall } from '@rxap/utilities';
|
|
5
|
-
import * as i1 from '@rxap/remote-method/http';
|
|
6
5
|
import { HttpRemoteMethodLoader } from '@rxap/remote-method/http';
|
|
7
6
|
import { RemoteMethodDirective } from '@rxap/remote-method/directive';
|
|
8
7
|
|
|
9
8
|
class ContenteditableDirective {
|
|
10
|
-
constructor(
|
|
11
|
-
this.httpRemoteMethodLoader =
|
|
9
|
+
constructor() {
|
|
10
|
+
this.httpRemoteMethodLoader = inject(HttpRemoteMethodLoader);
|
|
12
11
|
this.contenteditable = true;
|
|
12
|
+
this.remoteMethodId = input.required({ ...(ngDevMode ? { debugName: "remoteMethodId" } : /* istanbul ignore next */ {}), alias: "rxapContenteditable" });
|
|
13
|
+
this.property = input.required(...(ngDevMode ? [{ debugName: "property" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.uuid = input.required(...(ngDevMode ? [{ debugName: "uuid" }] : /* istanbul ignore next */ []));
|
|
13
15
|
}
|
|
14
16
|
onClick($event) {
|
|
15
17
|
$event.stopPropagation();
|
|
@@ -17,15 +19,15 @@ class ContenteditableDirective {
|
|
|
17
19
|
onInput($event) {
|
|
18
20
|
const value = $event.target.textContent;
|
|
19
21
|
if (value && value.length > 3) {
|
|
20
|
-
return this.httpRemoteMethodLoader.request$(this.remoteMethodId, {
|
|
21
|
-
pathParams: { uuid: this.uuid },
|
|
22
|
-
body: { [this.property]: value },
|
|
22
|
+
return this.httpRemoteMethodLoader.request$(this.remoteMethodId(), {
|
|
23
|
+
pathParams: { uuid: this.uuid() },
|
|
24
|
+
body: { [this.property()]: value },
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
27
|
return Promise.resolve();
|
|
26
28
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ContenteditableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
30
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: ContenteditableDirective, isStandalone: true, selector: "[rxapContenteditable]", inputs: { remoteMethodId: { classPropertyName: "remoteMethodId", publicName: "rxapContenteditable", isSignal: true, isRequired: true, transformFunction: null }, property: { classPropertyName: "property", publicName: "property", isSignal: true, isRequired: true, transformFunction: null }, uuid: { classPropertyName: "uuid", publicName: "uuid", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "input": "onInput($event)" }, properties: { "attr.contenteditable": "contenteditable" } }, ngImport: i0 }); }
|
|
29
31
|
}
|
|
30
32
|
__decorate([
|
|
31
33
|
DebounceCall(1000),
|
|
@@ -33,102 +35,61 @@ __decorate([
|
|
|
33
35
|
__metadata("design:paramtypes", [Object]),
|
|
34
36
|
__metadata("design:returntype", void 0)
|
|
35
37
|
], ContenteditableDirective.prototype, "onInput", null);
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ContenteditableDirective, decorators: [{
|
|
37
39
|
type: Directive,
|
|
38
40
|
args: [{
|
|
39
41
|
selector: '[rxapContenteditable]',
|
|
40
42
|
standalone: true,
|
|
43
|
+
host: {
|
|
44
|
+
'[attr.contenteditable]': 'contenteditable',
|
|
45
|
+
'(click)': 'onClick($event)',
|
|
46
|
+
'(input)': 'onInput($event)',
|
|
47
|
+
},
|
|
41
48
|
}]
|
|
42
|
-
}],
|
|
43
|
-
type: Inject,
|
|
44
|
-
args: [HttpRemoteMethodLoader]
|
|
45
|
-
}] }], propDecorators: { contenteditable: [{
|
|
46
|
-
type: HostBinding,
|
|
47
|
-
args: ['attr.contenteditable']
|
|
48
|
-
}], remoteMethodId: [{
|
|
49
|
-
type: Input,
|
|
50
|
-
args: [{
|
|
51
|
-
required: true,
|
|
52
|
-
alias: 'rxapContenteditable',
|
|
53
|
-
}]
|
|
54
|
-
}], property: [{
|
|
55
|
-
type: Input,
|
|
56
|
-
args: [{ required: true }]
|
|
57
|
-
}], uuid: [{
|
|
58
|
-
type: Input,
|
|
59
|
-
args: [{ required: true }]
|
|
60
|
-
}], onClick: [{
|
|
61
|
-
type: HostListener,
|
|
62
|
-
args: ['click', ['$event']]
|
|
63
|
-
}], onInput: [{
|
|
64
|
-
type: HostListener,
|
|
65
|
-
args: ['input', ['$event']]
|
|
66
|
-
}] } });
|
|
49
|
+
}], propDecorators: { remoteMethodId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapContenteditable", required: true }] }], property: [{ type: i0.Input, args: [{ isSignal: true, alias: "property", required: true }] }], uuid: [{ type: i0.Input, args: [{ isSignal: true, alias: "uuid", required: true }] }], onInput: [] } });
|
|
67
50
|
|
|
68
51
|
class HttpRemoteMethodDirective extends RemoteMethodDirective {
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
constructor() {
|
|
53
|
+
super();
|
|
54
|
+
this.headers = input(...(ngDevMode ? [undefined, { debugName: "headers" }] : /* istanbul ignore next */ []));
|
|
55
|
+
this.reportProgress = input(...(ngDevMode ? [undefined, { debugName: "reportProgress" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.params = input(...(ngDevMode ? [undefined, { debugName: "params" }] : /* istanbul ignore next */ []));
|
|
57
|
+
this.responseType = input(...(ngDevMode ? [undefined, { debugName: "responseType" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.withCredentials = input(...(ngDevMode ? [undefined, { debugName: "withCredentials" }] : /* istanbul ignore next */ []));
|
|
59
|
+
this.body = input(...(ngDevMode ? [undefined, { debugName: "body" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.setHeaders = input(...(ngDevMode ? [undefined, { debugName: "setHeaders" }] : /* istanbul ignore next */ []));
|
|
61
|
+
this.setParams = input(...(ngDevMode ? [undefined, { debugName: "setParams" }] : /* istanbul ignore next */ []));
|
|
62
|
+
this.pathParams = input(...(ngDevMode ? [undefined, { debugName: "pathParams" }] : /* istanbul ignore next */ []));
|
|
63
|
+
this.remoteMethodOrIdOrToken = input(undefined, { ...(ngDevMode ? { debugName: "remoteMethodOrIdOrToken" } : /* istanbul ignore next */ {}), alias: 'rxapHttpRemoteMethod' });
|
|
64
|
+
// merge the bound http parameters into the current parameters
|
|
65
|
+
effect(() => {
|
|
66
|
+
const parameters = {
|
|
67
|
+
headers: this.headers(),
|
|
68
|
+
reportProgress: this.reportProgress(),
|
|
69
|
+
params: this.params(),
|
|
70
|
+
responseType: this.responseType(),
|
|
71
|
+
withCredentials: this.withCredentials(),
|
|
72
|
+
body: this.body(),
|
|
73
|
+
setHeaders: this.setHeaders(),
|
|
74
|
+
setParams: this.setParams(),
|
|
75
|
+
pathParams: this.pathParams(),
|
|
76
|
+
};
|
|
77
|
+
const bound = Object.fromEntries(Object.entries(parameters).filter(([, value]) => value !== undefined));
|
|
78
|
+
if (Object.keys(bound).length) {
|
|
79
|
+
untracked(() => this.updateParameters(bound));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
71
82
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
set params(params) {
|
|
76
|
-
this.updateParameters({ params });
|
|
77
|
-
}
|
|
78
|
-
set responseType(responseType) {
|
|
79
|
-
this.updateParameters({ responseType });
|
|
80
|
-
}
|
|
81
|
-
set withCredentials(withCredentials) {
|
|
82
|
-
this.updateParameters({ withCredentials });
|
|
83
|
-
}
|
|
84
|
-
set body(body) {
|
|
85
|
-
this.updateParameters({ body });
|
|
86
|
-
}
|
|
87
|
-
set setHeaders(setHeaders) {
|
|
88
|
-
this.updateParameters({ setHeaders });
|
|
89
|
-
}
|
|
90
|
-
set setParams(setParams) {
|
|
91
|
-
this.updateParameters({ setParams });
|
|
92
|
-
}
|
|
93
|
-
set pathParams(pathParams) {
|
|
94
|
-
this.updateParameters({ pathParams });
|
|
95
|
-
}
|
|
96
|
-
set remoteMethodOrIdOrToken(value) {
|
|
97
|
-
if (value) {
|
|
98
|
-
this._remoteMethodOrIdOrToken = value;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: HttpRemoteMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
102
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: HttpRemoteMethodDirective, isStandalone: true, selector: "button[rxapHttpRemoteMethod]", inputs: { headers: "headers", reportProgress: "reportProgress", params: "params", responseType: "responseType", withCredentials: "withCredentials", body: "body", setHeaders: "setHeaders", setParams: "setParams", pathParams: "pathParams", remoteMethodOrIdOrToken: ["rxapHttpRemoteMethod", "remoteMethodOrIdOrToken"] }, usesInheritance: true, ngImport: i0 }); }
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
84
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: HttpRemoteMethodDirective, isStandalone: true, selector: "button[rxapHttpRemoteMethod]", inputs: { headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: false, transformFunction: null }, reportProgress: { classPropertyName: "reportProgress", publicName: "reportProgress", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, responseType: { classPropertyName: "responseType", publicName: "responseType", isSignal: true, isRequired: false, transformFunction: null }, withCredentials: { classPropertyName: "withCredentials", publicName: "withCredentials", isSignal: true, isRequired: false, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: false, transformFunction: null }, setHeaders: { classPropertyName: "setHeaders", publicName: "setHeaders", isSignal: true, isRequired: false, transformFunction: null }, setParams: { classPropertyName: "setParams", publicName: "setParams", isSignal: true, isRequired: false, transformFunction: null }, pathParams: { classPropertyName: "pathParams", publicName: "pathParams", isSignal: true, isRequired: false, transformFunction: null }, remoteMethodOrIdOrToken: { classPropertyName: "remoteMethodOrIdOrToken", publicName: "rxapHttpRemoteMethod", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
103
85
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodDirective, decorators: [{
|
|
105
87
|
type: Directive,
|
|
106
88
|
args: [{
|
|
107
89
|
selector: 'button[rxapHttpRemoteMethod]',
|
|
108
90
|
standalone: true,
|
|
109
91
|
}]
|
|
110
|
-
}], propDecorators: { headers: [{
|
|
111
|
-
type: Input
|
|
112
|
-
}], reportProgress: [{
|
|
113
|
-
type: Input
|
|
114
|
-
}], params: [{
|
|
115
|
-
type: Input
|
|
116
|
-
}], responseType: [{
|
|
117
|
-
type: Input
|
|
118
|
-
}], withCredentials: [{
|
|
119
|
-
type: Input
|
|
120
|
-
}], body: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], setHeaders: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], setParams: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], pathParams: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], remoteMethodOrIdOrToken: [{
|
|
129
|
-
type: Input,
|
|
130
|
-
args: ['rxapHttpRemoteMethod']
|
|
131
|
-
}] } });
|
|
92
|
+
}], ctorParameters: () => [], propDecorators: { headers: [{ type: i0.Input, args: [{ isSignal: true, alias: "headers", required: false }] }], reportProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportProgress", required: false }] }], params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: false }] }], responseType: [{ type: i0.Input, args: [{ isSignal: true, alias: "responseType", required: false }] }], withCredentials: [{ type: i0.Input, args: [{ isSignal: true, alias: "withCredentials", required: false }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: false }] }], setHeaders: [{ type: i0.Input, args: [{ isSignal: true, alias: "setHeaders", required: false }] }], setParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "setParams", required: false }] }], pathParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "pathParams", required: false }] }], remoteMethodOrIdOrToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapHttpRemoteMethod", required: false }] }] } });
|
|
132
93
|
|
|
133
94
|
// region
|
|
134
95
|
// endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-remote-method-http-directive.mjs","sources":["../../../../../packages/angular/remote-method/http/directive/src/lib/contenteditable.directive.ts","../../../../../packages/angular/remote-method/http/directive/src/lib/http-remote-method.directive.ts","../../../../../packages/angular/remote-method/http/directive/src/index.ts","../../../../../packages/angular/remote-method/http/directive/src/rxap-remote-method-http-directive.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-http-directive.mjs","sources":["../../../../../packages/angular/remote-method/http/directive/src/lib/contenteditable.directive.ts","../../../../../packages/angular/remote-method/http/directive/src/lib/http-remote-method.directive.ts","../../../../../packages/angular/remote-method/http/directive/src/index.ts","../../../../../packages/angular/remote-method/http/directive/src/rxap-remote-method-http-directive.ts"],"sourcesContent":["import { Directive, input, inject } from '@angular/core';\nimport {\n DebounceCall,\n Required,\n} from '@rxap/utilities';\nimport { HttpRemoteMethodLoader } from '@rxap/remote-method/http';\n\n@Directive({\n selector: '[rxapContenteditable]',\n standalone: true,\n host: {\n '[attr.contenteditable]': 'contenteditable',\n '(click)': 'onClick($event)',\n '(input)': 'onInput($event)',\n },\n})\nexport class ContenteditableDirective {\n private readonly httpRemoteMethodLoader = inject<HttpRemoteMethodLoader>(HttpRemoteMethodLoader);\n\n public contenteditable = true;\n\n public readonly remoteMethodId = input.required<string>({ alias: \"rxapContenteditable\" });\n\n public readonly property = input.required<string>();\n\n public readonly uuid = input.required<string>();\n\n public onClick($event: Event) {\n $event.stopPropagation();\n }\n\n @DebounceCall(1000)\n public onInput($event: any) {\n const value = ($event.target as HTMLElement).textContent;\n if (value && value.length > 3) {\n return this.httpRemoteMethodLoader.request$(this.remoteMethodId(), {\n pathParams: { uuid: this.uuid() },\n body: { [this.property()]: value },\n });\n }\n return Promise.resolve();\n }\n}\n\n/**\n * @deprecated removed\n */\n\n","import {\n Directive,\n effect,\n input,\n untracked,\n} from '@angular/core';\nimport { RemoteMethodDirective } from '@rxap/remote-method/directive';\nimport {\n HttpRemoteMethodMetadata,\n HttpRemoteMethodParameter,\n} from '@rxap/remote-method/http';\nimport { BaseRemoteMethod } from '@rxap/remote-method';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Directive({\n selector: 'button[rxapHttpRemoteMethod]',\n standalone: true,\n})\nexport class HttpRemoteMethodDirective<ReturnType = any, Metadata extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends RemoteMethodDirective<ReturnType, HttpRemoteMethodParameter, Metadata> {\n\n public readonly headers = input<HttpRemoteMethodParameter['headers']>();\n public readonly reportProgress = input<HttpRemoteMethodParameter['reportProgress']>();\n public readonly params = input<HttpRemoteMethodParameter['params']>();\n public readonly responseType = input<HttpRemoteMethodParameter['responseType']>();\n public readonly withCredentials = input<HttpRemoteMethodParameter['withCredentials']>();\n public readonly body = input<HttpRemoteMethodParameter['body']>();\n public readonly setHeaders = input<HttpRemoteMethodParameter['setHeaders']>();\n public readonly setParams = input<HttpRemoteMethodParameter['setParams']>();\n public readonly pathParams = input<HttpRemoteMethodParameter['pathParams']>();\n\n public override readonly remoteMethodOrIdOrToken = input<IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>>(\n undefined,\n { alias: 'rxapHttpRemoteMethod' },\n );\n\n constructor() {\n super();\n // merge the bound http parameters into the current parameters\n effect(() => {\n const parameters: Partial<HttpRemoteMethodParameter> = {\n headers: this.headers(),\n reportProgress: this.reportProgress(),\n params: this.params(),\n responseType: this.responseType(),\n withCredentials: this.withCredentials(),\n body: this.body(),\n setHeaders: this.setHeaders(),\n setParams: this.setParams(),\n pathParams: this.pathParams(),\n };\n const bound = Object.fromEntries(Object.entries(parameters).filter(([ , value ]) => value !== undefined));\n if (Object.keys(bound).length) {\n untracked(() => this.updateParameters(bound));\n }\n });\n }\n\n}\n","// region \nexport * from './lib/contenteditable.directive';\nexport * from './lib/http-remote-method.directive';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */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BAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACjBD;AAGA;;ACHA;;AAEG;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injector,
|
|
2
|
+
import { Injector, Inject, Optional, Injectable, inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpClient, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
|
|
5
|
-
import * as i1$1 from '@rxap/remote-method';
|
|
6
5
|
import { BaseRemoteMethod, RxapRemoteMethodError, REMOTE_METHOD_META_DATA, RemoteMethodLoader } from '@rxap/remote-method';
|
|
7
6
|
import { hasIndexSignature } from '@rxap/utilities';
|
|
8
7
|
import { retry, tap, filter, map, timeout } from 'rxjs/operators';
|
|
@@ -67,10 +66,10 @@ class BaseHttpRemoteMethod extends BaseRemoteMethod {
|
|
|
67
66
|
}
|
|
68
67
|
return this.metadata.url;
|
|
69
68
|
}
|
|
70
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
71
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
70
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod }); }
|
|
72
71
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
|
|
74
73
|
type: Injectable
|
|
75
74
|
}], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
|
|
76
75
|
type: Inject,
|
|
@@ -127,19 +126,16 @@ class HttpRemoteMethod extends BaseHttpRemoteMethod {
|
|
|
127
126
|
}
|
|
128
127
|
}), filter((event) => event instanceof HttpResponse), map((event) => event.body), map(body => this.transformer(body)), timeout(this.timeout)));
|
|
129
128
|
}
|
|
130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
131
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
129
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
130
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod }); }
|
|
132
131
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod, decorators: [{
|
|
134
133
|
type: Injectable
|
|
135
134
|
}] });
|
|
136
135
|
|
|
137
136
|
class HttpRemoteMethodLoader {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// the RefreshService will not trigger a refresh for HttpRemoteMethod's
|
|
141
|
-
constructor(remoteMethodLoader) {
|
|
142
|
-
this.remoteMethodLoader = remoteMethodLoader;
|
|
137
|
+
constructor() {
|
|
138
|
+
this.remoteMethodLoader = inject(RemoteMethodLoader);
|
|
143
139
|
}
|
|
144
140
|
request$(remoteMethodIdOrInstanceOrToken, parameters, metadata, injector, notFoundValue, flags) {
|
|
145
141
|
const remoteMethod = this.remoteMethodLoader.load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags);
|
|
@@ -148,16 +144,13 @@ class HttpRemoteMethodLoader {
|
|
|
148
144
|
}
|
|
149
145
|
return remoteMethod.call(parameters);
|
|
150
146
|
}
|
|
151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
152
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' }); }
|
|
153
149
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
|
|
155
151
|
type: Injectable,
|
|
156
152
|
args: [{ providedIn: 'root' }]
|
|
157
|
-
}]
|
|
158
|
-
type: Inject,
|
|
159
|
-
args: [RemoteMethodLoader]
|
|
160
|
-
}] }] });
|
|
153
|
+
}] });
|
|
161
154
|
|
|
162
155
|
// region
|
|
163
156
|
// endregion
|