@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.
- package/CHANGELOG.md +295 -0
- package/LICENSE +621 -24
- package/LICENSE.md +621 -0
- package/README.md +8 -73
- package/directive/index.d.ts +5 -5
- package/directive/lib/remote-method-template-collection.directive.d.ts +38 -43
- package/directive/lib/remote-method-template.directive.d.ts +7 -12
- package/directive/lib/remote-method.directive.d.ts +7 -12
- package/esm2022/directive/index.mjs +6 -0
- package/esm2022/directive/lib/error.mjs +1 -1
- package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +115 -129
- package/esm2022/directive/lib/remote-method-template.directive.mjs +45 -55
- package/esm2022/directive/lib/remote-method.directive.mjs +28 -41
- package/esm2022/directive/lib/tokens.mjs +1 -1
- package/esm2022/directive/rxap-remote-method-directive.mjs +2 -2
- package/esm2022/http/directive/index.mjs +3 -0
- package/esm2022/http/directive/lib/contenteditable.directive.mjs +16 -39
- package/esm2022/http/directive/lib/http-remote-method.directive.mjs +8 -21
- package/esm2022/http/directive/rxap-remote-method-http-directive.mjs +2 -2
- package/esm2022/http/index.mjs +4 -0
- package/esm2022/http/lib/base-http.remote-method.mjs +19 -20
- package/esm2022/http/lib/http-remote-method.loader.mjs +7 -8
- package/esm2022/http/lib/http.remote-method.mjs +31 -22
- package/esm2022/http/rxap-remote-method-http.mjs +2 -2
- package/esm2022/index.mjs +1 -1
- package/esm2022/lib/base.remote-method.mjs +8 -9
- package/esm2022/lib/error.mjs +1 -1
- package/esm2022/lib/proxy.remote-method.mjs +8 -9
- package/esm2022/lib/remote-method-loader.mjs +7 -8
- package/esm2022/lib/tokens.mjs +1 -1
- package/esm2022/rxap-remote-method.mjs +1 -1
- package/esm2022/testing/index.mjs +2 -0
- package/esm2022/testing/lib/remote-method-testing-loader.mjs +3 -3
- package/esm2022/testing/rxap-remote-method-testing.mjs +2 -2
- package/fesm2022/rxap-remote-method-directive.mjs +175 -204
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http-directive.mjs +20 -52
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http.mjs +43 -33
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2022/rxap-remote-method.mjs +10 -10
- package/fesm2022/rxap-remote-method.mjs.map +1 -1
- package/http/directive/index.d.ts +2 -5
- package/http/directive/lib/contenteditable.directive.d.ts +1 -9
- package/http/directive/lib/http-remote-method.directive.d.ts +2 -7
- package/http/index.d.ts +3 -5
- package/http/lib/base-http.remote-method.d.ts +3 -3
- package/http/lib/http-remote-method.loader.d.ts +2 -2
- package/http/lib/http.remote-method.d.ts +3 -3
- package/lib/base.remote-method.d.ts +2 -2
- package/lib/proxy.remote-method.d.ts +1 -1
- package/lib/remote-method-loader.d.ts +1 -1
- package/package.json +51 -42
- package/testing/index.d.ts +1 -5
- package/testing/lib/remote-method-testing-loader.d.ts +2 -2
- package/theme.css +1 -0
- package/collection.json +0 -25
- package/directive/public_api.d.ts +0 -5
- package/esm2022/directive/public_api.mjs +0 -6
- package/esm2022/http/directive/public_api.mjs +0 -3
- package/esm2022/http/public_api.mjs +0 -4
- package/esm2022/testing/public_api.mjs +0 -2
- package/http/directive/public_api.d.ts +0 -2
- package/http/public_api.d.ts +0 -3
- package/migration.json +0 -4
- package/src/schematics/base/files/__name@dasherize__.remote-method.ts.template +0 -14
- package/src/schematics/base/index.d.ts +0 -12
- package/src/schematics/base/index.js +0 -116
- package/src/schematics/base/index.js.map +0 -1
- package/src/schematics/base/schema.json +0 -54
- package/src/schematics/directive/index.d.ts +0 -18
- package/src/schematics/directive/index.js +0 -346
- package/src/schematics/directive/index.js.map +0 -1
- package/src/schematics/directive/schema.json +0 -50
- package/src/schematics/http/files/__name@dasherize__.remote-method.ts.template +0 -16
- package/src/schematics/http/index.d.ts +0 -3
- package/src/schematics/http/index.js +0 -26
- package/src/schematics/http/index.js.map +0 -1
- package/src/schematics/http/schema.json +0 -30
- package/src/schematics/ng-add/index.d.ts +0 -2
- package/src/schematics/ng-add/index.js +0 -8
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -7
- package/testing/public_api.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@rxap/remote-method
|
|
2
|
-
|
|
1
|
+
# @rxap/remote-method
|
|
2
|
+
> Provides the RemoteMethod concept for RxAP.
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/@rxap/remote-method)
|
|
5
5
|
[](https://commitizen.github.io/cz-cli/)
|
|
@@ -8,80 +8,15 @@
|
|
|
8
8
|

|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
> Provides the RemoteMethod concept for RxAP.
|
|
12
|
-
|
|
13
11
|
- [Installation](#installation)
|
|
14
|
-
- [Schematics](#schematics)
|
|
15
12
|
|
|
16
13
|
# Installation
|
|
17
14
|
|
|
15
|
+
**Add the package to your workspace:**
|
|
16
|
+
```bash
|
|
17
|
+
yarn add @rxap/remote-method
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
*Setup the package @rxap/remote-method for the workspace.*
|
|
23
|
-
|
|
24
|
-
# Schematics
|
|
25
|
-
|
|
26
|
-
## ng-add
|
|
27
|
-
> Setup the package @rxap/remote-method for the workspace.
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
ng g @rxap/remote-method:ng-add
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Option | Type | Default | Description
|
|
34
|
-
--- | --- | --- | ---
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## base
|
|
38
|
-
> create a base remote method
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
ng g @rxap/remote-method:base
|
|
19
|
+
**Install peer dependencies:**
|
|
20
|
+
```bash
|
|
21
|
+
yarn add @angular/common@^16.1.4 @angular/core@^16.1.4 @rxap/definition@^16.0.0-dev.10 @rxap/rxjs@^1.0.1-dev.5 @rxap/utilities@^16.0.0-dev.13 rxjs@^7.8.0
|
|
42
22
|
```
|
|
43
|
-
|
|
44
|
-
Option | Type | Default | Description
|
|
45
|
-
--- | --- | --- | ---
|
|
46
|
-
name | string | |
|
|
47
|
-
path | string | |
|
|
48
|
-
template | boolean | false |
|
|
49
|
-
collection | boolean | false |
|
|
50
|
-
parametersType | string | any |
|
|
51
|
-
returnType | string | any |
|
|
52
|
-
export | boolean | true |
|
|
53
|
-
project | string | |
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## http
|
|
57
|
-
> Creates a http remote method
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
ng g @rxap/remote-method:http
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Option | Type | Default | Description
|
|
64
|
-
--- | --- | --- | ---
|
|
65
|
-
name | string | |
|
|
66
|
-
path | string | |
|
|
67
|
-
project | string | |
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## directive
|
|
71
|
-
> add a directive for the remote method
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
ng g @rxap/remote-method:directive
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Option | Type | Default | Description
|
|
78
|
-
--- | --- | --- | ---
|
|
79
|
-
name | string | |
|
|
80
|
-
path | string | |
|
|
81
|
-
template | boolean | false |
|
|
82
|
-
collection | boolean | false |
|
|
83
|
-
parametersType | string | any |
|
|
84
|
-
returnType | string | any |
|
|
85
|
-
project | string | |
|
|
86
|
-
|
|
87
|
-
|
package/directive/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, DoCheck, Injector, IterableChanges, IterableDiffers, NgZone, OnChanges, OnInit, SimpleChanges, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
3
3
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -26,46 +26,12 @@ export declare class RemoteMethodTemplateCollectionDirective<ReturnType = any, P
|
|
|
26
26
|
private readonly differs;
|
|
27
27
|
private readonly zone;
|
|
28
28
|
private readonly remoteMethodToken?;
|
|
29
|
-
/**
|
|
30
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
31
|
-
*
|
|
32
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
33
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
34
|
-
*/
|
|
35
|
-
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any): ctx is RemoteMethodTemplateCollectionDirectiveContext<T>;
|
|
36
|
-
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>);
|
|
37
|
-
/**
|
|
38
|
-
* A function that defines how to track changes for items in the iterable.
|
|
39
|
-
*
|
|
40
|
-
* When items are added, moved, or removed in the iterable,
|
|
41
|
-
* the directive must re-render the appropriate DOM nodes.
|
|
42
|
-
* To minimize churn in the DOM, only nodes that have changed
|
|
43
|
-
* are re-rendered.
|
|
44
|
-
*
|
|
45
|
-
* By default, the change detector assumes that
|
|
46
|
-
* the object instance identifies the node in the iterable.
|
|
47
|
-
* When this function is supplied, the directive uses
|
|
48
|
-
* the result of calling this function to identify the item node,
|
|
49
|
-
* rather than the identity of the object itself.
|
|
50
|
-
*
|
|
51
|
-
* The function receives two inputs,
|
|
52
|
-
* the iteration index and the node object ID.
|
|
53
|
-
*/
|
|
54
|
-
set trackBy(fn: TrackByFunction<ReturnType>);
|
|
55
|
-
get trackBy(): TrackByFunction<ReturnType>;
|
|
56
29
|
parameters?: Parameters;
|
|
57
30
|
emptyTemplate?: TemplateRef<void>;
|
|
58
31
|
errorTemplate?: TemplateRef<RemoteMethodTemplateCollectionDirectiveErrorContext>;
|
|
59
32
|
withoutParameters: boolean;
|
|
60
|
-
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;
|
|
61
|
-
protected set data(data: ReturnType[]);
|
|
62
33
|
private _differ;
|
|
63
34
|
private _trackByFn;
|
|
64
|
-
/**
|
|
65
|
-
* Holds the data that should be displayed
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
private _data;
|
|
69
35
|
private _dirty;
|
|
70
36
|
/**
|
|
71
37
|
* Indicates that the remote method returned a empty collection
|
|
@@ -104,20 +70,49 @@ export declare class RemoteMethodTemplateCollectionDirective<ReturnType = any, P
|
|
|
104
70
|
*/
|
|
105
71
|
private _errorTemplateViewRef;
|
|
106
72
|
constructor(template: TemplateRef<RemoteMethodTemplateCollectionDirectiveContext<ReturnType>>, remoteMethodLoader: RemoteMethodLoader, injector: Injector, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, differs: IterableDiffers, zone: NgZone, remoteMethodToken?: any);
|
|
73
|
+
get trackBy(): TrackByFunction<ReturnType>;
|
|
74
|
+
/**
|
|
75
|
+
* A function that defines how to track changes for items in the iterable.
|
|
76
|
+
*
|
|
77
|
+
* When items are added, moved, or removed in the iterable,
|
|
78
|
+
* the directive must re-render the appropriate DOM nodes.
|
|
79
|
+
* To minimize churn in the DOM, only nodes that have changed
|
|
80
|
+
* are re-rendered.
|
|
81
|
+
*
|
|
82
|
+
* By default, the change detector assumes that
|
|
83
|
+
* the object instance identifies the node in the iterable.
|
|
84
|
+
* When this function is supplied, the directive uses
|
|
85
|
+
* the result of calling this function to identify the item node,
|
|
86
|
+
* rather than the identity of the object itself.
|
|
87
|
+
*
|
|
88
|
+
* The function receives two inputs,
|
|
89
|
+
* the iteration index and the node object ID.
|
|
90
|
+
*/
|
|
91
|
+
set trackBy(fn: TrackByFunction<ReturnType>);
|
|
92
|
+
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>;
|
|
93
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType[], Parameters, Metadata>>);
|
|
94
|
+
/**
|
|
95
|
+
* Holds the data that should be displayed
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
private _data;
|
|
99
|
+
protected set data(data: ReturnType[]);
|
|
100
|
+
/**
|
|
101
|
+
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
102
|
+
*
|
|
103
|
+
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
104
|
+
* `NgForOf` structural directive renders its template with a specific context type.
|
|
105
|
+
*/
|
|
106
|
+
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateCollectionDirective<T>, ctx: any): ctx is RemoteMethodTemplateCollectionDirectiveContext<T>;
|
|
107
107
|
ngOnChanges(changes: SimpleChanges): void;
|
|
108
108
|
ngOnInit(): void;
|
|
109
109
|
call(parameters?: Parameters): void;
|
|
110
|
-
protected applyChanges(changes: IterableChanges<ReturnType>): void;
|
|
111
|
-
private perViewChange;
|
|
112
110
|
/**
|
|
113
111
|
* Applies the changes when needed.
|
|
114
112
|
*/
|
|
115
113
|
ngDoCheck(): void;
|
|
114
|
+
protected applyChanges(changes: IterableChanges<ReturnType>): void;
|
|
115
|
+
private perViewChange;
|
|
116
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, [null, null, null, null, null, null, null, { optional: true; self: true; }]>;
|
|
117
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, "[rxapRemoteMethodCollection]", ["rxapRemoteMethodCollection"], { "
|
|
118
|
-
}
|
|
119
|
-
export declare class RemoteMethodTemplateCollectionDirectiveModule {
|
|
120
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateCollectionDirectiveModule, never>;
|
|
121
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RemoteMethodTemplateCollectionDirectiveModule, [typeof RemoteMethodTemplateCollectionDirective], never, [typeof RemoteMethodTemplateCollectionDirective]>;
|
|
122
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<RemoteMethodTemplateCollectionDirectiveModule>;
|
|
117
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateCollectionDirective<any, any, any>, "[rxapRemoteMethodCollection]", ["rxapRemoteMethodCollection"], { "parameters": { "alias": "rxapRemoteMethodCollectionParameters"; "required": false; }; "emptyTemplate": { "alias": "rxapRemoteMethodCollectionEmpty"; "required": false; }; "errorTemplate": { "alias": "rxapRemoteMethodCollectionError"; "required": false; }; "withoutParameters": { "alias": "rxapRemoteMethodCollectionWithoutParameters"; "required": false; }; "trackBy": { "alias": "rxapRemoteMethodCollectionTrackBy"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCollectionCall"; "required": false; }; }, {}, never, never, true, never>;
|
|
123
118
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, Injector, OnChanges, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
3
3
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
|
-
import { ToggleSubject } from '@rxap/
|
|
4
|
+
import { ToggleSubject } from '@rxap/rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface RemoteMethodTemplateDirectiveContext<ReturnType = any> {
|
|
7
7
|
$implicit: ReturnType;
|
|
@@ -17,8 +17,6 @@ export declare class RemoteMethodTemplateDirective<ReturnType = any, Parameters
|
|
|
17
17
|
private readonly viewContainerRef;
|
|
18
18
|
protected readonly cdr: ChangeDetectorRef;
|
|
19
19
|
private readonly remoteMethodToken?;
|
|
20
|
-
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any): ctx is RemoteMethodTemplateDirectiveContext<T>;
|
|
21
|
-
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
22
20
|
executed$: EventEmitter<any>;
|
|
23
21
|
failure$: EventEmitter<Error>;
|
|
24
22
|
successful$: EventEmitter<ReturnType>;
|
|
@@ -31,9 +29,11 @@ export declare class RemoteMethodTemplateDirective<ReturnType = any, Parameters
|
|
|
31
29
|
errorTemplate?: TemplateRef<RemoteMethodTemplateDirectiveErrorContext>;
|
|
32
30
|
loadingTemplate?: TemplateRef<void>;
|
|
33
31
|
withoutParameters: boolean;
|
|
34
|
-
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
|
|
35
32
|
embedded: EventEmitter<any>;
|
|
36
33
|
constructor(template: TemplateRef<RemoteMethodTemplateDirectiveContext<ReturnType>>, remoteMethodLoader: RemoteMethodLoader, injector: Injector, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, remoteMethodToken?: any);
|
|
34
|
+
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
|
|
35
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
36
|
+
static ngTemplateContextGuard<T>(dir: RemoteMethodTemplateDirective<T>, ctx: any): ctx is RemoteMethodTemplateDirectiveContext<T>;
|
|
37
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
38
38
|
ngOnInit(): void;
|
|
39
39
|
execute(parameters?: Parameters | undefined): Promise<void>;
|
|
@@ -44,16 +44,11 @@ export declare class RemoteMethodTemplateDirective<ReturnType = any, Parameters
|
|
|
44
44
|
call(parameters?: Parameters): void;
|
|
45
45
|
setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void;
|
|
46
46
|
updateParameters(parameters: Partial<Parameters>): void;
|
|
47
|
-
private renderLoadingTemplate;
|
|
48
47
|
protected executed(result: any): void;
|
|
49
48
|
protected failure(error: Error): void;
|
|
50
49
|
protected successful(result: ReturnType): void;
|
|
51
50
|
protected renderTemplate(result: ReturnType): void;
|
|
51
|
+
private renderLoadingTemplate;
|
|
52
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateDirective<any, any, any>, [null, null, null, null, null, { optional: true; self: true; }]>;
|
|
53
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "
|
|
54
|
-
}
|
|
55
|
-
export declare class RemoteMethodTemplateDirectiveModule {
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodTemplateDirectiveModule, never>;
|
|
57
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RemoteMethodTemplateDirectiveModule, [typeof RemoteMethodTemplateDirective], never, [typeof RemoteMethodTemplateDirective]>;
|
|
58
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<RemoteMethodTemplateDirectiveModule>;
|
|
53
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodTemplateDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "metadata": { "alias": "rxapRemoteMethodMetadata"; "required": false; }; "parameters": { "alias": "rxapRemoteMethodParameters"; "required": false; }; "errorTemplate": { "alias": "rxapRemoteMethodError"; "required": false; }; "loadingTemplate": { "alias": "rxapRemoteMethodLoading"; "required": false; }; "withoutParameters": { "alias": "rxapRemoteMethodWithoutParameters"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethodCall"; "required": false; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; "embedded": "embedded"; }, never, never, true, never>;
|
|
59
54
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
2
|
-
import {
|
|
1
|
+
import { EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
|
+
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
3
3
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
|
-
import { ToggleSubject } from '@rxap/
|
|
4
|
+
import { ToggleSubject } from '@rxap/rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class RemoteMethodDirective<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> implements OnInit {
|
|
7
7
|
protected readonly remoteMethodLoader: RemoteMethodLoader;
|
|
8
8
|
private readonly injector;
|
|
9
9
|
private readonly remoteMethodToken?;
|
|
10
|
-
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
11
10
|
parameters?: Parameters;
|
|
12
11
|
metadata?: Metadata;
|
|
13
12
|
executed$: EventEmitter<any>;
|
|
14
13
|
failure$: EventEmitter<Error>;
|
|
15
14
|
successful$: EventEmitter<ReturnType>;
|
|
16
15
|
immediately: boolean;
|
|
17
|
-
set hasConfirmDirective(value: any);
|
|
18
16
|
/**
|
|
19
17
|
* true - a remote method call is in progress
|
|
20
18
|
*/
|
|
21
19
|
executing$: ToggleSubject;
|
|
20
|
+
constructor(remoteMethodLoader: RemoteMethodLoader, injector?: Injector, remoteMethodToken?: any);
|
|
22
21
|
protected _remoteMethodOrIdOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>;
|
|
22
|
+
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>);
|
|
23
23
|
private _hasConfirmDirective;
|
|
24
|
-
|
|
24
|
+
set hasConfirmDirective(value: any);
|
|
25
25
|
ngOnInit(): void;
|
|
26
26
|
onConfirmed(): void;
|
|
27
27
|
onClick(): void;
|
|
@@ -37,10 +37,5 @@ export declare class RemoteMethodDirective<ReturnType = any, Parameters = any, M
|
|
|
37
37
|
*/
|
|
38
38
|
protected call(): Promise<any>;
|
|
39
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodDirective<any, any, any>, [null, null, { optional: true; self: true; }]>;
|
|
40
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "
|
|
41
|
-
}
|
|
42
|
-
export declare class RemoteMethodDirectiveModule {
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteMethodDirectiveModule, never>;
|
|
44
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RemoteMethodDirectiveModule, [typeof RemoteMethodDirective], never, [typeof RemoteMethodDirective]>;
|
|
45
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<RemoteMethodDirectiveModule>;
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoteMethodDirective<any, any, any>, "[rxapRemoteMethod]", ["rxapRemoteMethod"], { "parameters": { "alias": "parameters"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "immediately": { "alias": "immediately"; "required": false; }; "remoteMethodOrIdOrToken": { "alias": "rxapRemoteMethod"; "required": false; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; }; }, { "executed$": "executed"; "failure$": "failure"; "successful$": "successful"; }, never, never, true, never>;
|
|
46
41
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyL3JlbW90ZS1tZXRob2QvZGlyZWN0aXZlL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsbURBQW1ELENBQUM7QUFDbEUsY0FBYyx3Q0FBd0MsQ0FBQztBQUN2RCxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL3JlbW90ZS1tZXRob2QuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3JlbW90ZS1tZXRob2QtdGVtcGxhdGUtY29sbGVjdGlvbi5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcmVtb3RlLW1ldGhvZC10ZW1wbGF0ZS5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZXJyb3InO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdG9rZW5zJztcbiJdfQ==
|
|
@@ -4,4 +4,4 @@ export class RxapRemoteMethodDirectiveError extends RxapRemoteMethodError {
|
|
|
4
4
|
super(message, code ?? '', scope);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyL3JlbW90ZS1tZXRob2QvZGlyZWN0aXZlL3NyYy9saWIvZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFNUQsTUFBTSxPQUFPLDhCQUErQixTQUFRLHFCQUFxQjtJQUV2RSxZQUFZLE9BQWUsRUFBRSxJQUFhLEVBQUUsS0FBYztRQUN4RCxLQUFLLENBQUMsT0FBTyxFQUFFLElBQUksSUFBSSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDcEMsQ0FBQztDQUVGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUnhhcFJlbW90ZU1ldGhvZEVycm9yIH0gZnJvbSAnQHJ4YXAvcmVtb3RlLW1ldGhvZCc7XG5cbmV4cG9ydCBjbGFzcyBSeGFwUmVtb3RlTWV0aG9kRGlyZWN0aXZlRXJyb3IgZXh0ZW5kcyBSeGFwUmVtb3RlTWV0aG9kRXJyb3Ige1xuXG4gIGNvbnN0cnVjdG9yKG1lc3NhZ2U6IHN0cmluZywgY29kZT86IHN0cmluZywgc2NvcGU/OiBzdHJpbmcpIHtcbiAgICBzdXBlcihtZXNzYWdlLCBjb2RlID8/ICcnLCBzY29wZSk7XG4gIH1cblxufVxuIl19
|