@rxap/remote-method 21.0.1 → 22.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/compodoc/changelog.html +5 -0
- package/compodoc/dependencies.html +4 -4
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +130 -130
- 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 +5 -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 +4 -4
- package/docs/markdown/classes/RxapRemoteMethodError.md +16 -16
- package/docs/markdown/functions/RxapRemoteMethod.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/BaseRemoteMethodMetadata.md +4 -4
- 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 +3 -3
- package/docs/wiki/Class.RxapRemoteMethodError.md +15 -15
- package/docs/wiki/Function.RxapRemoteMethod.md +1 -1
- package/docs/wiki/Interface.BaseRemoteMethodMetadata.md +3 -3
- 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 +804 -522
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http-directive.mjs +352 -99
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http.mjs +206 -162
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs +37 -54
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2022/rxap-remote-method.mjs +199 -134
- package/fesm2022/rxap-remote-method.mjs.map +1 -1
- package/package.json +8 -8
- package/types/rxap-remote-method-directive.d.ts +295 -203
- package/types/rxap-remote-method-http-directive.d.ts +104 -39
- package/types/rxap-remote-method-http.d.ts +63 -64
- package/types/rxap-remote-method-testing.d.ts +15 -16
- package/types/rxap-remote-method.d.ts +47 -48
|
@@ -1,102 +1,355 @@
|
|
|
1
|
-
import { __decorate, __metadata } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { DebounceCall } from
|
|
5
|
-
import { HttpRemoteMethodLoader } from
|
|
6
|
-
import { RemoteMethodDirective } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Directive, effect, inject, input, untracked } from "@angular/core";
|
|
4
|
+
import { DebounceCall } from "@rxap/utilities";
|
|
5
|
+
import { HttpRemoteMethodLoader } from "@rxap/remote-method/http";
|
|
6
|
+
import { RemoteMethodDirective } from "@rxap/remote-method/directive";
|
|
7
|
+
var ContenteditableDirective = class ContenteditableDirective {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.httpRemoteMethodLoader = inject(HttpRemoteMethodLoader);
|
|
10
|
+
this.contenteditable = true;
|
|
11
|
+
this.remoteMethodId = input.required({
|
|
12
|
+
...ngDevMode ? { debugName: "remoteMethodId" } : /* istanbul ignore next */ {},
|
|
13
|
+
alias: "rxapContenteditable"
|
|
14
|
+
});
|
|
15
|
+
this.property = input.required(...ngDevMode ? [{ debugName: "property" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.uuid = input.required(...ngDevMode ? [{ debugName: "uuid" }] : /* istanbul ignore next */ []);
|
|
17
|
+
}
|
|
18
|
+
onClick($event) {
|
|
19
|
+
$event.stopPropagation();
|
|
20
|
+
}
|
|
21
|
+
onInput($event) {
|
|
22
|
+
const value = $event.target.textContent;
|
|
23
|
+
if (value && value.length > 3) return this.httpRemoteMethodLoader.request$(this.remoteMethodId(), {
|
|
24
|
+
pathParams: { uuid: this.uuid() },
|
|
25
|
+
body: { [this.property()]: value }
|
|
26
|
+
});
|
|
27
|
+
return Promise.resolve();
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.3.0",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: ContenteditableDirective,
|
|
35
|
+
deps: [],
|
|
36
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
41
|
+
minVersion: "17.1.0",
|
|
42
|
+
version: "22.3.0",
|
|
43
|
+
type: ContenteditableDirective,
|
|
44
|
+
isStandalone: true,
|
|
45
|
+
selector: "[rxapContenteditable]",
|
|
46
|
+
inputs: {
|
|
47
|
+
remoteMethodId: {
|
|
48
|
+
classPropertyName: "remoteMethodId",
|
|
49
|
+
publicName: "rxapContenteditable",
|
|
50
|
+
isSignal: true,
|
|
51
|
+
isRequired: true,
|
|
52
|
+
transformFunction: null
|
|
53
|
+
},
|
|
54
|
+
property: {
|
|
55
|
+
classPropertyName: "property",
|
|
56
|
+
publicName: "property",
|
|
57
|
+
isSignal: true,
|
|
58
|
+
isRequired: true,
|
|
59
|
+
transformFunction: null
|
|
60
|
+
},
|
|
61
|
+
uuid: {
|
|
62
|
+
classPropertyName: "uuid",
|
|
63
|
+
publicName: "uuid",
|
|
64
|
+
isSignal: true,
|
|
65
|
+
isRequired: true,
|
|
66
|
+
transformFunction: null
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
host: {
|
|
70
|
+
listeners: {
|
|
71
|
+
"click": "onClick($event)",
|
|
72
|
+
"input": "onInput($event)"
|
|
73
|
+
},
|
|
74
|
+
properties: { "attr.contenteditable": "contenteditable" }
|
|
75
|
+
},
|
|
76
|
+
ngImport: i0
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
32
80
|
__decorate([
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
81
|
+
DebounceCall(1e3),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object]),
|
|
84
|
+
__metadata("design:returntype", void 0)
|
|
37
85
|
], ContenteditableDirective.prototype, "onInput", null);
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
87
|
+
minVersion: "12.0.0",
|
|
88
|
+
version: "22.3.0",
|
|
89
|
+
ngImport: i0,
|
|
90
|
+
type: ContenteditableDirective,
|
|
91
|
+
decorators: [{
|
|
92
|
+
type: Directive,
|
|
93
|
+
args: [{
|
|
94
|
+
selector: "[rxapContenteditable]",
|
|
95
|
+
standalone: true,
|
|
96
|
+
host: {
|
|
97
|
+
"[attr.contenteditable]": "contenteditable",
|
|
98
|
+
"(click)": "onClick($event)",
|
|
99
|
+
"(input)": "onInput($event)"
|
|
100
|
+
}
|
|
101
|
+
}]
|
|
102
|
+
}],
|
|
103
|
+
propDecorators: {
|
|
104
|
+
remoteMethodId: [{
|
|
105
|
+
type: i0.Input,
|
|
106
|
+
args: [{
|
|
107
|
+
isSignal: true,
|
|
108
|
+
alias: "rxapContenteditable",
|
|
109
|
+
required: true
|
|
110
|
+
}]
|
|
111
|
+
}],
|
|
112
|
+
property: [{
|
|
113
|
+
type: i0.Input,
|
|
114
|
+
args: [{
|
|
115
|
+
isSignal: true,
|
|
116
|
+
alias: "property",
|
|
117
|
+
required: true
|
|
118
|
+
}]
|
|
119
|
+
}],
|
|
120
|
+
uuid: [{
|
|
121
|
+
type: i0.Input,
|
|
122
|
+
args: [{
|
|
123
|
+
isSignal: true,
|
|
124
|
+
alias: "uuid",
|
|
125
|
+
required: true
|
|
126
|
+
}]
|
|
127
|
+
}],
|
|
128
|
+
onInput: []
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var HttpRemoteMethodDirective = class HttpRemoteMethodDirective extends RemoteMethodDirective {
|
|
132
|
+
constructor() {
|
|
133
|
+
super();
|
|
134
|
+
this.headers = input(...ngDevMode ? [void 0, { debugName: "headers" }] : /* istanbul ignore next */ []);
|
|
135
|
+
this.reportProgress = input(...ngDevMode ? [void 0, { debugName: "reportProgress" }] : /* istanbul ignore next */ []);
|
|
136
|
+
this.params = input(...ngDevMode ? [void 0, { debugName: "params" }] : /* istanbul ignore next */ []);
|
|
137
|
+
this.responseType = input(...ngDevMode ? [void 0, { debugName: "responseType" }] : /* istanbul ignore next */ []);
|
|
138
|
+
this.withCredentials = input(...ngDevMode ? [void 0, { debugName: "withCredentials" }] : /* istanbul ignore next */ []);
|
|
139
|
+
this.body = input(...ngDevMode ? [void 0, { debugName: "body" }] : /* istanbul ignore next */ []);
|
|
140
|
+
this.setHeaders = input(...ngDevMode ? [void 0, { debugName: "setHeaders" }] : /* istanbul ignore next */ []);
|
|
141
|
+
this.setParams = input(...ngDevMode ? [void 0, { debugName: "setParams" }] : /* istanbul ignore next */ []);
|
|
142
|
+
this.pathParams = input(...ngDevMode ? [void 0, { debugName: "pathParams" }] : /* istanbul ignore next */ []);
|
|
143
|
+
this.remoteMethodOrIdOrToken = input(void 0, {
|
|
144
|
+
...ngDevMode ? { debugName: "remoteMethodOrIdOrToken" } : /* istanbul ignore next */ {},
|
|
145
|
+
alias: "rxapHttpRemoteMethod"
|
|
146
|
+
});
|
|
147
|
+
effect(() => {
|
|
148
|
+
const parameters = {
|
|
149
|
+
headers: this.headers(),
|
|
150
|
+
reportProgress: this.reportProgress(),
|
|
151
|
+
params: this.params(),
|
|
152
|
+
responseType: this.responseType(),
|
|
153
|
+
withCredentials: this.withCredentials(),
|
|
154
|
+
body: this.body(),
|
|
155
|
+
setHeaders: this.setHeaders(),
|
|
156
|
+
setParams: this.setParams(),
|
|
157
|
+
pathParams: this.pathParams()
|
|
158
|
+
};
|
|
159
|
+
const bound = Object.fromEntries(Object.entries(parameters).filter(([, value]) => value !== void 0));
|
|
160
|
+
if (Object.keys(bound).length) untracked(() => this.updateParameters(bound));
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
static {
|
|
164
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
165
|
+
minVersion: "12.0.0",
|
|
166
|
+
version: "22.3.0",
|
|
167
|
+
ngImport: i0,
|
|
168
|
+
type: HttpRemoteMethodDirective,
|
|
169
|
+
deps: [],
|
|
170
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
static {
|
|
174
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
175
|
+
minVersion: "17.1.0",
|
|
176
|
+
version: "22.3.0",
|
|
177
|
+
type: HttpRemoteMethodDirective,
|
|
178
|
+
isStandalone: true,
|
|
179
|
+
selector: "button[rxapHttpRemoteMethod]",
|
|
180
|
+
inputs: {
|
|
181
|
+
headers: {
|
|
182
|
+
classPropertyName: "headers",
|
|
183
|
+
publicName: "headers",
|
|
184
|
+
isSignal: true,
|
|
185
|
+
isRequired: false,
|
|
186
|
+
transformFunction: null
|
|
187
|
+
},
|
|
188
|
+
reportProgress: {
|
|
189
|
+
classPropertyName: "reportProgress",
|
|
190
|
+
publicName: "reportProgress",
|
|
191
|
+
isSignal: true,
|
|
192
|
+
isRequired: false,
|
|
193
|
+
transformFunction: null
|
|
194
|
+
},
|
|
195
|
+
params: {
|
|
196
|
+
classPropertyName: "params",
|
|
197
|
+
publicName: "params",
|
|
198
|
+
isSignal: true,
|
|
199
|
+
isRequired: false,
|
|
200
|
+
transformFunction: null
|
|
201
|
+
},
|
|
202
|
+
responseType: {
|
|
203
|
+
classPropertyName: "responseType",
|
|
204
|
+
publicName: "responseType",
|
|
205
|
+
isSignal: true,
|
|
206
|
+
isRequired: false,
|
|
207
|
+
transformFunction: null
|
|
208
|
+
},
|
|
209
|
+
withCredentials: {
|
|
210
|
+
classPropertyName: "withCredentials",
|
|
211
|
+
publicName: "withCredentials",
|
|
212
|
+
isSignal: true,
|
|
213
|
+
isRequired: false,
|
|
214
|
+
transformFunction: null
|
|
215
|
+
},
|
|
216
|
+
body: {
|
|
217
|
+
classPropertyName: "body",
|
|
218
|
+
publicName: "body",
|
|
219
|
+
isSignal: true,
|
|
220
|
+
isRequired: false,
|
|
221
|
+
transformFunction: null
|
|
222
|
+
},
|
|
223
|
+
setHeaders: {
|
|
224
|
+
classPropertyName: "setHeaders",
|
|
225
|
+
publicName: "setHeaders",
|
|
226
|
+
isSignal: true,
|
|
227
|
+
isRequired: false,
|
|
228
|
+
transformFunction: null
|
|
229
|
+
},
|
|
230
|
+
setParams: {
|
|
231
|
+
classPropertyName: "setParams",
|
|
232
|
+
publicName: "setParams",
|
|
233
|
+
isSignal: true,
|
|
234
|
+
isRequired: false,
|
|
235
|
+
transformFunction: null
|
|
236
|
+
},
|
|
237
|
+
pathParams: {
|
|
238
|
+
classPropertyName: "pathParams",
|
|
239
|
+
publicName: "pathParams",
|
|
240
|
+
isSignal: true,
|
|
241
|
+
isRequired: false,
|
|
242
|
+
transformFunction: null
|
|
243
|
+
},
|
|
244
|
+
remoteMethodOrIdOrToken: {
|
|
245
|
+
classPropertyName: "remoteMethodOrIdOrToken",
|
|
246
|
+
publicName: "rxapHttpRemoteMethod",
|
|
247
|
+
isSignal: true,
|
|
248
|
+
isRequired: false,
|
|
249
|
+
transformFunction: null
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
usesInheritance: true,
|
|
253
|
+
ngImport: i0
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
258
|
+
minVersion: "12.0.0",
|
|
259
|
+
version: "22.3.0",
|
|
260
|
+
ngImport: i0,
|
|
261
|
+
type: HttpRemoteMethodDirective,
|
|
262
|
+
decorators: [{
|
|
263
|
+
type: Directive,
|
|
264
|
+
args: [{
|
|
265
|
+
selector: "button[rxapHttpRemoteMethod]",
|
|
266
|
+
standalone: true
|
|
267
|
+
}]
|
|
268
|
+
}],
|
|
269
|
+
ctorParameters: () => [],
|
|
270
|
+
propDecorators: {
|
|
271
|
+
headers: [{
|
|
272
|
+
type: i0.Input,
|
|
273
|
+
args: [{
|
|
274
|
+
isSignal: true,
|
|
275
|
+
alias: "headers",
|
|
276
|
+
required: false
|
|
277
|
+
}]
|
|
278
|
+
}],
|
|
279
|
+
reportProgress: [{
|
|
280
|
+
type: i0.Input,
|
|
281
|
+
args: [{
|
|
282
|
+
isSignal: true,
|
|
283
|
+
alias: "reportProgress",
|
|
284
|
+
required: false
|
|
285
|
+
}]
|
|
286
|
+
}],
|
|
287
|
+
params: [{
|
|
288
|
+
type: i0.Input,
|
|
289
|
+
args: [{
|
|
290
|
+
isSignal: true,
|
|
291
|
+
alias: "params",
|
|
292
|
+
required: false
|
|
293
|
+
}]
|
|
294
|
+
}],
|
|
295
|
+
responseType: [{
|
|
296
|
+
type: i0.Input,
|
|
297
|
+
args: [{
|
|
298
|
+
isSignal: true,
|
|
299
|
+
alias: "responseType",
|
|
300
|
+
required: false
|
|
301
|
+
}]
|
|
302
|
+
}],
|
|
303
|
+
withCredentials: [{
|
|
304
|
+
type: i0.Input,
|
|
305
|
+
args: [{
|
|
306
|
+
isSignal: true,
|
|
307
|
+
alias: "withCredentials",
|
|
308
|
+
required: false
|
|
309
|
+
}]
|
|
310
|
+
}],
|
|
311
|
+
body: [{
|
|
312
|
+
type: i0.Input,
|
|
313
|
+
args: [{
|
|
314
|
+
isSignal: true,
|
|
315
|
+
alias: "body",
|
|
316
|
+
required: false
|
|
317
|
+
}]
|
|
318
|
+
}],
|
|
319
|
+
setHeaders: [{
|
|
320
|
+
type: i0.Input,
|
|
321
|
+
args: [{
|
|
322
|
+
isSignal: true,
|
|
323
|
+
alias: "setHeaders",
|
|
324
|
+
required: false
|
|
325
|
+
}]
|
|
326
|
+
}],
|
|
327
|
+
setParams: [{
|
|
328
|
+
type: i0.Input,
|
|
329
|
+
args: [{
|
|
330
|
+
isSignal: true,
|
|
331
|
+
alias: "setParams",
|
|
332
|
+
required: false
|
|
333
|
+
}]
|
|
334
|
+
}],
|
|
335
|
+
pathParams: [{
|
|
336
|
+
type: i0.Input,
|
|
337
|
+
args: [{
|
|
338
|
+
isSignal: true,
|
|
339
|
+
alias: "pathParams",
|
|
340
|
+
required: false
|
|
341
|
+
}]
|
|
342
|
+
}],
|
|
343
|
+
remoteMethodOrIdOrToken: [{
|
|
344
|
+
type: i0.Input,
|
|
345
|
+
args: [{
|
|
346
|
+
isSignal: true,
|
|
347
|
+
alias: "rxapHttpRemoteMethod",
|
|
348
|
+
required: false
|
|
349
|
+
}]
|
|
350
|
+
}]
|
|
351
|
+
}
|
|
352
|
+
});
|
|
101
353
|
export { ContenteditableDirective, HttpRemoteMethodDirective };
|
|
102
|
-
|
|
354
|
+
|
|
355
|
+
//# sourceMappingURL=rxap-remote-method-http-directive.mjs.map
|
|
@@ -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"
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-http-directive.mjs","names":[],"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"],"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"],"mappings":";;;;;;AAgBA,IAAa,2BAAb,MAAa,yBAAwB;CATrC,cAAA;EAUmB,KAAA,yBAAyB,OAA+B,sBAAsB;EAExF,KAAA,kBAAkB;EAET,KAAA,iBAAiB,MAAM,SAAQ;GAAA,GAAA,YAAA,EAAA,WAAA,iBAAA,+BAAA,CAAA;GAAW,OAAO;EAAqB,CAAA;EAEtE,KAAA,WAAW,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAEnC,KAAA,OAAO,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAiBhD;CAfQ,QAAQ,QAAa;EAC1B,OAAO,gBAAe;CACxB;CAGO,QAAQ,QAAW;EACxB,MAAM,QAAS,OAAO,OAAuB;EAC7C,IAAI,SAAS,MAAM,SAAS,GAC1B,OAAO,KAAK,uBAAuB,SAA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