@rxap/directives 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 +36 -0
- package/compodoc/changelog.html +34 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/directives/AvatarBackgroundImageDirective.html +216 -386
- package/compodoc/directives/BackgroundImageDirective.html +230 -243
- package/compodoc/directives/ConfirmClick.html +466 -0
- package/compodoc/directives/ContenteditableDirective.html +137 -373
- package/compodoc/directives/FullWidthDirective.html +8 -139
- package/compodoc/directives/IfTruthyDirective.html +136 -182
- package/compodoc/directives/IsDevModeDirective.html +4 -74
- package/compodoc/directives/MethodDirective.html +272 -346
- package/compodoc/directives/MethodTemplateDirective.html +736 -697
- package/compodoc/directives/MovableDividerDirective.html +103 -243
- package/compodoc/directives/PreventDefaultDirective.html +6 -65
- package/compodoc/directives/ShareButtonDirective.html +14 -62
- package/compodoc/directives/StopImmediatePropagationDirective.html +6 -65
- package/compodoc/directives/StopPropagationDirective.html +6 -65
- package/compodoc/injectables/ShareService.html +6 -5
- package/compodoc/interfaces/ContenteditableEvent.html +25 -32
- package/compodoc/interfaces/IfTruthyDirectiveTemplateContext.html +22 -36
- package/compodoc/interfaces/MethodTemplateDirectiveContext.html +42 -66
- package/compodoc/interfaces/MethodTemplateDirectiveErrorContext.html +42 -66
- package/compodoc/interfaces/ShareData.html +3 -2
- package/compodoc/js/menu-wc.js +3 -3
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/overview.html +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +2282 -2793
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AvatarBackgroundImageDirective.html +9 -16
- package/docs/html/classes/BackgroundImageDirective.html +8 -17
- package/docs/html/classes/ConfirmClick.html +3 -3
- package/docs/html/classes/ContenteditableDirective.html +8 -7
- package/docs/html/classes/FullWidthDirective.html +2 -3
- package/docs/html/classes/IfTruthyDirective.html +3 -9
- package/docs/html/classes/IsDevModeDirective.html +4 -4
- package/docs/html/classes/MethodDirective.html +8 -7
- package/docs/html/classes/MethodTemplateDirective.html +10 -15
- package/docs/html/classes/MovableDividerDirective.html +3 -13
- package/docs/html/classes/PreventDefaultDirective.html +2 -2
- package/docs/html/classes/ShareButtonDirective.html +2 -2
- package/docs/html/classes/ShareService.html +2 -2
- package/docs/html/classes/StopImmediatePropagationDirective.html +2 -2
- package/docs/html/classes/StopPropagationDirective.html +2 -2
- package/docs/html/enums/BackgroundPositionOptions.html +2 -2
- package/docs/html/enums/BackgroundRepeatOptions.html +2 -2
- package/docs/html/enums/BackgroundSizeOptions.html +2 -2
- package/docs/html/enums/GlobalStyleOptions.html +2 -2
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ContenteditableEvent.html +2 -2
- package/docs/html/interfaces/IfTruthyDirectiveTemplateContext.html +2 -2
- package/docs/html/interfaces/MethodTemplateDirectiveContext.html +2 -2
- package/docs/html/interfaces/MethodTemplateDirectiveErrorContext.html +2 -2
- package/docs/html/interfaces/ShareData.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/BackgroundPosition.html +1 -1
- package/docs/html/types/BackgroundRepeat.html +1 -1
- package/docs/html/types/BackgroundSize.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AvatarBackgroundImageDirective.md +40 -103
- package/docs/markdown/classes/BackgroundImageDirective.md +24 -83
- package/docs/markdown/classes/ConfirmClick.md +8 -20
- package/docs/markdown/classes/ContenteditableDirective.md +21 -34
- package/docs/markdown/classes/FullWidthDirective.md +2 -10
- package/docs/markdown/classes/IfTruthyDirective.md +14 -71
- package/docs/markdown/classes/IsDevModeDirective.md +5 -17
- package/docs/markdown/classes/MethodDirective.md +40 -44
- package/docs/markdown/classes/MethodTemplateDirective.md +50 -86
- package/docs/markdown/classes/MovableDividerDirective.md +11 -71
- package/docs/markdown/classes/PreventDefaultDirective.md +3 -3
- package/docs/markdown/classes/ShareButtonDirective.md +9 -9
- package/docs/markdown/classes/ShareService.md +4 -4
- package/docs/markdown/classes/StopImmediatePropagationDirective.md +3 -3
- package/docs/markdown/classes/StopPropagationDirective.md +3 -3
- package/docs/markdown/enumerations/BackgroundPositionOptions.md +4 -4
- package/docs/markdown/enumerations/BackgroundRepeatOptions.md +3 -3
- package/docs/markdown/enumerations/BackgroundSizeOptions.md +5 -5
- package/docs/markdown/enumerations/GlobalStyleOptions.md +4 -4
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/ContenteditableEvent.md +4 -4
- package/docs/markdown/interfaces/IfTruthyDirectiveTemplateContext.md +3 -3
- package/docs/markdown/interfaces/MethodTemplateDirectiveContext.md +3 -3
- package/docs/markdown/interfaces/MethodTemplateDirectiveErrorContext.md +4 -4
- package/docs/markdown/interfaces/ShareData.md +6 -6
- package/docs/markdown/type-aliases/BackgroundPosition.md +2 -2
- package/docs/markdown/type-aliases/BackgroundRepeat.md +2 -2
- package/docs/markdown/type-aliases/BackgroundSize.md +2 -2
- package/docs/wiki/Class.AvatarBackgroundImageDirective.md +39 -102
- package/docs/wiki/Class.BackgroundImageDirective.md +23 -82
- package/docs/wiki/Class.ConfirmClick.md +7 -19
- package/docs/wiki/Class.ContenteditableDirective.md +20 -33
- package/docs/wiki/Class.FullWidthDirective.md +1 -9
- package/docs/wiki/Class.IfTruthyDirective.md +13 -70
- package/docs/wiki/Class.IsDevModeDirective.md +4 -16
- package/docs/wiki/Class.MethodDirective.md +39 -43
- package/docs/wiki/Class.MethodTemplateDirective.md +49 -85
- package/docs/wiki/Class.MovableDividerDirective.md +10 -70
- package/docs/wiki/Class.PreventDefaultDirective.md +2 -2
- package/docs/wiki/Class.ShareButtonDirective.md +8 -8
- package/docs/wiki/Class.ShareService.md +3 -3
- package/docs/wiki/Class.StopImmediatePropagationDirective.md +2 -2
- package/docs/wiki/Class.StopPropagationDirective.md +2 -2
- package/docs/wiki/Enumeration.BackgroundPositionOptions.md +3 -3
- package/docs/wiki/Enumeration.BackgroundRepeatOptions.md +2 -2
- package/docs/wiki/Enumeration.BackgroundSizeOptions.md +4 -4
- package/docs/wiki/Enumeration.GlobalStyleOptions.md +3 -3
- package/docs/wiki/Interface.ContenteditableEvent.md +3 -3
- package/docs/wiki/Interface.IfTruthyDirectiveTemplateContext.md +2 -2
- package/docs/wiki/Interface.MethodTemplateDirectiveContext.md +2 -2
- package/docs/wiki/Interface.MethodTemplateDirectiveErrorContext.md +3 -3
- package/docs/wiki/Interface.ShareData.md +5 -5
- package/docs/wiki/TypeAlias.BackgroundPosition.md +1 -1
- package/docs/wiki/TypeAlias.BackgroundRepeat.md +1 -1
- package/docs/wiki/TypeAlias.BackgroundSize.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-directives.mjs +291 -392
- package/fesm2022/rxap-directives.mjs.map +1 -1
- package/package.json +22 -17
- package/types/rxap-directives.d.ts +272 -0
- package/index.d.ts +0 -14
- package/lib/avatar-background-image.directive.d.ts +0 -14
- package/lib/background-image.directive.d.ts +0 -42
- package/lib/confirm-click.d.ts +0 -10
- package/lib/contenteditable.directive.d.ts +0 -21
- package/lib/full-width.directive.d.ts +0 -6
- package/lib/if-truthy.directive.d.ts +0 -28
- package/lib/is-dev-mode.directive.d.ts +0 -12
- package/lib/method-template.directive.d.ts +0 -46
- package/lib/method.directive.d.ts +0 -29
- package/lib/movable-divider.directive.d.ts +0 -28
- package/lib/prevent-default.directive.d.ts +0 -6
- package/lib/share-button.directive.d.ts +0 -25
- package/lib/stop-immediate-propagation.directive.d.ts +0 -6
- package/lib/stop-propagation.directive.d.ts +0 -6
|
@@ -195,15 +195,7 @@
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
198
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
199
|
-
ChangeDetectorRef,
|
|
200
|
-
Directive,
|
|
201
|
-
Input,
|
|
202
|
-
OnChanges,
|
|
203
|
-
SimpleChanges,
|
|
204
|
-
TemplateRef,
|
|
205
|
-
ViewContainerRef,
|
|
206
|
-
} from '@angular/core';
|
|
198
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, effect, inject, input, TemplateRef, untracked, ViewContainerRef } from '@angular/core';
|
|
207
199
|
import { Method } from '@rxap/pattern';
|
|
208
200
|
|
|
209
201
|
export interface IfTruthyDirectiveTemplateContext<Data> {
|
|
@@ -216,22 +208,15 @@ export interface IfTruthyDirectiveTemplateContext<Data> {
|
|
|
216
208
|
selector: '[rxapIfTruthy]',
|
|
217
209
|
standalone: true,
|
|
218
210
|
})
|
|
219
|
-
export class IfTruthyDirective<Data, Parameters = any>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
public method!: Method<Data, Parameters>;
|
|
223
|
-
@Input('rxapIfTruthyParameters')
|
|
224
|
-
public parameters!: Parameters;
|
|
225
|
-
@Input('rxapIfTruthyTrackBy')
|
|
226
|
-
public trackBy!: (data: Data) => any;
|
|
227
|
-
private _last?: Data;
|
|
211
|
+
export class IfTruthyDirective<Data, Parameters = any> {
|
|
212
|
+
private readonly templateRef = inject<TemplateRef<IfTruthyDirectiveTemplateContext<Data>>>(TemplateRef);
|
|
213
|
+
private readonly viewContainerRef = inject(ViewContainerRef);
|
|
228
214
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
215
|
+
|
|
216
|
+
public readonly method = input.required<Method<Data, Parameters>>({ alias: "rxapIfTruthy" });
|
|
217
|
+
public readonly parameters = input.required<Parameters>({ alias: "rxapIfTruthyParameters" });
|
|
218
|
+
public readonly trackBy = input<((data: Data) => any) | undefined>(undefined, { alias: "rxapIfTruthyTrackBy" });
|
|
219
|
+
private _last?: Data;
|
|
235
220
|
|
|
236
221
|
/**
|
|
237
222
|
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
@@ -246,24 +231,26 @@ export class IfTruthyDirective<Data, Parameters = any> implements OnC
|
|
|
246
231
|
return true;
|
|
247
232
|
}
|
|
248
233
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.
|
|
253
|
-
|
|
254
|
-
|
|
234
|
+
constructor() {
|
|
235
|
+
effect(() => {
|
|
236
|
+
const method = this.method();
|
|
237
|
+
const parameters = this.parameters();
|
|
238
|
+
if (method && parameters) {
|
|
239
|
+
untracked(() => this.execute());
|
|
240
|
+
}
|
|
241
|
+
});
|
|
255
242
|
}
|
|
256
243
|
|
|
257
244
|
protected async execute() {
|
|
258
245
|
|
|
259
|
-
const result = await this.method.call(this.parameters);
|
|
246
|
+
const result = await this.method().call(this.parameters());
|
|
260
247
|
|
|
261
248
|
if (this.hasChanged(result)) {
|
|
262
249
|
|
|
263
250
|
this.viewContainerRef.clear();
|
|
264
251
|
|
|
265
252
|
if (result) {
|
|
266
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result });
|
|
253
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result }).markForCheck();
|
|
267
254
|
}
|
|
268
255
|
|
|
269
256
|
// remember the last applied result so unchanged values don't rebuild the view
|
|
@@ -271,14 +258,13 @@ export class IfTruthyDirective<Data, Parameters = any> implements OnC
|
|
|
271
258
|
|
|
272
259
|
}
|
|
273
260
|
|
|
274
|
-
this.cdr.detectChanges();
|
|
275
|
-
|
|
276
261
|
}
|
|
277
262
|
|
|
278
263
|
protected hasChanged(current: Data) {
|
|
279
264
|
if (this._last !== undefined) {
|
|
280
|
-
const
|
|
281
|
-
const
|
|
265
|
+
const trackBy = this.trackBy();
|
|
266
|
+
const currentTrackBy = trackBy ? trackBy(current) : current;
|
|
267
|
+
const lastTrackBy = trackBy ? trackBy(this._last) : this._last;
|
|
282
268
|
return currentTrackBy !== lastTrackBy;
|
|
283
269
|
}
|
|
284
270
|
|
|
@@ -195,21 +195,8 @@
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
198
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
199
|
-
|
|
200
|
-
Directive,
|
|
201
|
-
EventEmitter,
|
|
202
|
-
HostListener,
|
|
203
|
-
Inject,
|
|
204
|
-
Input,
|
|
205
|
-
isDevMode,
|
|
206
|
-
OnChanges,
|
|
207
|
-
OnInit,
|
|
208
|
-
Output,
|
|
209
|
-
SimpleChanges,
|
|
210
|
-
TemplateRef,
|
|
211
|
-
ViewContainerRef,
|
|
212
|
-
} from '@angular/core';
|
|
198
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, isDevMode, OnInit, TemplateRef, ViewContainerRef, input, output, inject, linkedSignal, effect, untracked } from '@angular/core';
|
|
199
|
+
import { outputFromObservable } from '@angular/core/rxjs-interop';
|
|
213
200
|
import { ToggleSubject } from '@rxap/rxjs';
|
|
214
201
|
import { Method } from '@rxap/pattern';
|
|
215
202
|
|
|
@@ -226,73 +213,62 @@ export interface MethodTemplateDirectiveErrorContext {
|
|
|
226
213
|
selector: '[rxapMethod]',
|
|
227
214
|
exportAs: 'rxapMethod',
|
|
228
215
|
standalone: true,
|
|
216
|
+
host: {
|
|
217
|
+
'(confirmed)': 'onConfirmed()',
|
|
218
|
+
},
|
|
229
219
|
})
|
|
230
|
-
export class MethodTemplateDirective<ReturnType = any, Parameters = any> implements OnInit
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
public
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
public loadingTemplate
|
|
240
|
-
|
|
241
|
-
public
|
|
242
|
-
|
|
243
|
-
public
|
|
244
|
-
|
|
245
|
-
public executed$ = new EventEmitter();
|
|
246
|
-
@Output('failure')
|
|
247
|
-
public failure$ = new EventEmitter<Error>();
|
|
248
|
-
@Output('successful')
|
|
249
|
-
public successful$ = new EventEmitter<ReturnType>();
|
|
220
|
+
export class MethodTemplateDirective<ReturnType = any, Parameters = any> implements OnInit {
|
|
221
|
+
private readonly template = inject<TemplateRef<MethodTemplateDirectiveContext<ReturnType>>>(TemplateRef);
|
|
222
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
public readonly method = input.required<Method<ReturnType, Parameters>>({ alias: "rxapMethodCall" });
|
|
226
|
+
public readonly parameters = input<Parameters>(undefined, { alias: "rxapMethodParameters" });
|
|
227
|
+
protected readonly currentParameters = linkedSignal(() => this.parameters());
|
|
228
|
+
public readonly errorTemplate = input<TemplateRef<MethodTemplateDirectiveErrorContext>>(undefined, { alias: "rxapMethodError" });
|
|
229
|
+
public readonly loadingTemplate = input<TemplateRef<void>>(undefined, { alias: "rxapMethodLoading" });
|
|
230
|
+
public readonly withoutParameters = input(false, { alias: "rxapMethodWithoutParameters" });
|
|
231
|
+
public readonly immediately = input(false);
|
|
232
|
+
public readonly executed$ = output({ alias: 'executed' });
|
|
233
|
+
public readonly failure$ = output<Error>({ alias: 'failure' });
|
|
234
|
+
public readonly successful$ = output<ReturnType>({ alias: 'successful' });
|
|
250
235
|
/**
|
|
251
236
|
* true - a remote method call is in progress
|
|
252
237
|
*/
|
|
253
|
-
@Output('executing')
|
|
254
238
|
public executing$ = new ToggleSubject();
|
|
255
|
-
|
|
256
|
-
public embedded =
|
|
257
|
-
|
|
258
|
-
constructor(
|
|
259
|
-
@Inject(TemplateRef)
|
|
260
|
-
private readonly template: TemplateRef<MethodTemplateDirectiveContext<ReturnType>>,
|
|
261
|
-
@Inject(ViewContainerRef)
|
|
262
|
-
private readonly viewContainerRef: ViewContainerRef,
|
|
263
|
-
@Inject(ChangeDetectorRef)
|
|
264
|
-
protected readonly cdr: ChangeDetectorRef,
|
|
265
|
-
) {
|
|
266
|
-
}
|
|
239
|
+
public readonly executing = outputFromObservable(this.executing$, { alias: 'executing' });
|
|
240
|
+
public readonly embedded = output();
|
|
267
241
|
|
|
268
242
|
static ngTemplateContextGuard<T>(dir: MethodTemplateDirective<T>, ctx: any):
|
|
269
243
|
ctx is MethodTemplateDirectiveContext<T> {
|
|
270
244
|
return true;
|
|
271
245
|
}
|
|
272
246
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
this.
|
|
277
|
-
|
|
247
|
+
constructor() {
|
|
248
|
+
// re-run whenever the bound parameters change
|
|
249
|
+
effect(() => {
|
|
250
|
+
const parameters = this.parameters();
|
|
251
|
+
if (parameters !== undefined) {
|
|
252
|
+
untracked(() => this.execute(parameters));
|
|
253
|
+
}
|
|
254
|
+
});
|
|
278
255
|
}
|
|
279
256
|
|
|
280
257
|
public ngOnInit() {
|
|
281
258
|
this.renderLoadingTemplate();
|
|
282
|
-
if (this.withoutParameters) {
|
|
259
|
+
if (this.withoutParameters()) {
|
|
283
260
|
this.execute();
|
|
284
261
|
}
|
|
285
262
|
}
|
|
286
263
|
|
|
287
|
-
@HostListener('confirmed')
|
|
288
264
|
public onConfirmed() {
|
|
289
265
|
return this.execute();
|
|
290
266
|
}
|
|
291
267
|
|
|
292
|
-
public async execute(parameters: Parameters | undefined = this.
|
|
268
|
+
public async execute(parameters: Parameters | undefined = this.currentParameters()): Promise<void> {
|
|
293
269
|
this.executing$.enable();
|
|
294
270
|
try {
|
|
295
|
-
const result = await this.method.call(parameters);
|
|
271
|
+
const result = await this.method().call(parameters);
|
|
296
272
|
this.executed(result);
|
|
297
273
|
this.renderTemplate(result);
|
|
298
274
|
this.successful(result);
|
|
@@ -312,7 +288,7 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
312
288
|
}
|
|
313
289
|
|
|
314
290
|
public updateParameters(parameters: Partial<Parameters>): void {
|
|
315
|
-
this.
|
|
291
|
+
this.currentParameters.set({ ...(this.currentParameters() ?? {}), ...parameters } as any);
|
|
316
292
|
}
|
|
317
293
|
|
|
318
294
|
protected executed(result: any) {
|
|
@@ -328,10 +304,11 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
328
304
|
}
|
|
329
305
|
|
|
330
306
|
protected renderErrorTemplate(error: Error) {
|
|
331
|
-
|
|
307
|
+
const errorTemplate = this.errorTemplate();
|
|
308
|
+
if (errorTemplate) {
|
|
332
309
|
this.viewContainerRef.clear();
|
|
333
|
-
if (
|
|
334
|
-
this.viewContainerRef.createEmbeddedView(
|
|
310
|
+
if (errorTemplate) {
|
|
311
|
+
this.viewContainerRef.createEmbeddedView(errorTemplate,
|
|
335
312
|
{
|
|
336
313
|
$implicit: error,
|
|
337
314
|
message: error.message,
|
|
@@ -346,7 +323,7 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
346
323
|
this.viewContainerRef.clear();
|
|
347
324
|
|
|
348
325
|
try {
|
|
349
|
-
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
326
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result }).markForCheck();
|
|
350
327
|
} catch (error: any) {
|
|
351
328
|
this.renderErrorTemplate(error);
|
|
352
329
|
console.error(error.message);
|
|
@@ -355,14 +332,13 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
355
332
|
|
|
356
333
|
this.embedded.emit();
|
|
357
334
|
|
|
358
|
-
this.cdr.detectChanges();
|
|
359
|
-
|
|
360
335
|
}
|
|
361
336
|
|
|
362
337
|
private renderLoadingTemplate() {
|
|
363
|
-
|
|
338
|
+
const loadingTemplate = this.loadingTemplate();
|
|
339
|
+
if (loadingTemplate) {
|
|
364
340
|
this.viewContainerRef.clear();
|
|
365
|
-
this.viewContainerRef.createEmbeddedView(
|
|
341
|
+
this.viewContainerRef.createEmbeddedView(loadingTemplate);
|
|
366
342
|
}
|
|
367
343
|
}
|
|
368
344
|
|
|
@@ -234,21 +234,8 @@
|
|
|
234
234
|
|
|
235
235
|
|
|
236
236
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
237
|
-
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
238
|
-
|
|
239
|
-
Directive,
|
|
240
|
-
EventEmitter,
|
|
241
|
-
HostListener,
|
|
242
|
-
Inject,
|
|
243
|
-
Input,
|
|
244
|
-
isDevMode,
|
|
245
|
-
OnChanges,
|
|
246
|
-
OnInit,
|
|
247
|
-
Output,
|
|
248
|
-
SimpleChanges,
|
|
249
|
-
TemplateRef,
|
|
250
|
-
ViewContainerRef,
|
|
251
|
-
} from '@angular/core';
|
|
237
|
+
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Directive, isDevMode, OnInit, TemplateRef, ViewContainerRef, input, output, inject, linkedSignal, effect, untracked } from '@angular/core';
|
|
238
|
+
import { outputFromObservable } from '@angular/core/rxjs-interop';
|
|
252
239
|
import { ToggleSubject } from '@rxap/rxjs';
|
|
253
240
|
import { Method } from '@rxap/pattern';
|
|
254
241
|
|
|
@@ -265,73 +252,62 @@ export interface MethodTemplateDirectiveErrorContext {
|
|
|
265
252
|
selector: '[rxapMethod]',
|
|
266
253
|
exportAs: 'rxapMethod',
|
|
267
254
|
standalone: true,
|
|
255
|
+
host: {
|
|
256
|
+
'(confirmed)': 'onConfirmed()',
|
|
257
|
+
},
|
|
268
258
|
})
|
|
269
|
-
export class MethodTemplateDirective<ReturnType = any, Parameters = any> implements OnInit
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
public
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
public loadingTemplate
|
|
279
|
-
|
|
280
|
-
public
|
|
281
|
-
|
|
282
|
-
public
|
|
283
|
-
|
|
284
|
-
public executed$ = new EventEmitter();
|
|
285
|
-
@Output('failure')
|
|
286
|
-
public failure$ = new EventEmitter<Error>();
|
|
287
|
-
@Output('successful')
|
|
288
|
-
public successful$ = new EventEmitter<ReturnType>();
|
|
259
|
+
export class MethodTemplateDirective<ReturnType = any, Parameters = any> implements OnInit {
|
|
260
|
+
private readonly template = inject<TemplateRef<MethodTemplateDirectiveContext<ReturnType>>>(TemplateRef);
|
|
261
|
+
private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
public readonly method = input.required<Method<ReturnType, Parameters>>({ alias: "rxapMethodCall" });
|
|
265
|
+
public readonly parameters = input<Parameters>(undefined, { alias: "rxapMethodParameters" });
|
|
266
|
+
protected readonly currentParameters = linkedSignal(() => this.parameters());
|
|
267
|
+
public readonly errorTemplate = input<TemplateRef<MethodTemplateDirectiveErrorContext>>(undefined, { alias: "rxapMethodError" });
|
|
268
|
+
public readonly loadingTemplate = input<TemplateRef<void>>(undefined, { alias: "rxapMethodLoading" });
|
|
269
|
+
public readonly withoutParameters = input(false, { alias: "rxapMethodWithoutParameters" });
|
|
270
|
+
public readonly immediately = input(false);
|
|
271
|
+
public readonly executed$ = output({ alias: 'executed' });
|
|
272
|
+
public readonly failure$ = output<Error>({ alias: 'failure' });
|
|
273
|
+
public readonly successful$ = output<ReturnType>({ alias: 'successful' });
|
|
289
274
|
/**
|
|
290
275
|
* true - a remote method call is in progress
|
|
291
276
|
*/
|
|
292
|
-
@Output('executing')
|
|
293
277
|
public executing$ = new ToggleSubject();
|
|
294
|
-
|
|
295
|
-
public embedded =
|
|
296
|
-
|
|
297
|
-
constructor(
|
|
298
|
-
@Inject(TemplateRef)
|
|
299
|
-
private readonly template: TemplateRef<MethodTemplateDirectiveContext<ReturnType>>,
|
|
300
|
-
@Inject(ViewContainerRef)
|
|
301
|
-
private readonly viewContainerRef: ViewContainerRef,
|
|
302
|
-
@Inject(ChangeDetectorRef)
|
|
303
|
-
protected readonly cdr: ChangeDetectorRef,
|
|
304
|
-
) {
|
|
305
|
-
}
|
|
278
|
+
public readonly executing = outputFromObservable(this.executing$, { alias: 'executing' });
|
|
279
|
+
public readonly embedded = output();
|
|
306
280
|
|
|
307
281
|
static ngTemplateContextGuard<T>(dir: MethodTemplateDirective<T>, ctx: any):
|
|
308
282
|
ctx is MethodTemplateDirectiveContext<T> {
|
|
309
283
|
return true;
|
|
310
284
|
}
|
|
311
285
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
this.
|
|
316
|
-
|
|
286
|
+
constructor() {
|
|
287
|
+
// re-run whenever the bound parameters change
|
|
288
|
+
effect(() => {
|
|
289
|
+
const parameters = this.parameters();
|
|
290
|
+
if (parameters !== undefined) {
|
|
291
|
+
untracked(() => this.execute(parameters));
|
|
292
|
+
}
|
|
293
|
+
});
|
|
317
294
|
}
|
|
318
295
|
|
|
319
296
|
public ngOnInit() {
|
|
320
297
|
this.renderLoadingTemplate();
|
|
321
|
-
if (this.withoutParameters) {
|
|
298
|
+
if (this.withoutParameters()) {
|
|
322
299
|
this.execute();
|
|
323
300
|
}
|
|
324
301
|
}
|
|
325
302
|
|
|
326
|
-
@HostListener('confirmed')
|
|
327
303
|
public onConfirmed() {
|
|
328
304
|
return this.execute();
|
|
329
305
|
}
|
|
330
306
|
|
|
331
|
-
public async execute(parameters: Parameters | undefined = this.
|
|
307
|
+
public async execute(parameters: Parameters | undefined = this.currentParameters()): Promise<void> {
|
|
332
308
|
this.executing$.enable();
|
|
333
309
|
try {
|
|
334
|
-
const result = await this.method.call(parameters);
|
|
310
|
+
const result = await this.method().call(parameters);
|
|
335
311
|
this.executed(result);
|
|
336
312
|
this.renderTemplate(result);
|
|
337
313
|
this.successful(result);
|
|
@@ -351,7 +327,7 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
351
327
|
}
|
|
352
328
|
|
|
353
329
|
public updateParameters(parameters: Partial<Parameters>): void {
|
|
354
|
-
this.
|
|
330
|
+
this.currentParameters.set({ ...(this.currentParameters() ?? {}), ...parameters } as any);
|
|
355
331
|
}
|
|
356
332
|
|
|
357
333
|
protected executed(result: any) {
|
|
@@ -367,10 +343,11 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
367
343
|
}
|
|
368
344
|
|
|
369
345
|
protected renderErrorTemplate(error: Error) {
|
|
370
|
-
|
|
346
|
+
const errorTemplate = this.errorTemplate();
|
|
347
|
+
if (errorTemplate) {
|
|
371
348
|
this.viewContainerRef.clear();
|
|
372
|
-
if (
|
|
373
|
-
this.viewContainerRef.createEmbeddedView(
|
|
349
|
+
if (errorTemplate) {
|
|
350
|
+
this.viewContainerRef.createEmbeddedView(errorTemplate,
|
|
374
351
|
{
|
|
375
352
|
$implicit: error,
|
|
376
353
|
message: error.message,
|
|
@@ -385,7 +362,7 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
385
362
|
this.viewContainerRef.clear();
|
|
386
363
|
|
|
387
364
|
try {
|
|
388
|
-
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result });
|
|
365
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: result }).markForCheck();
|
|
389
366
|
} catch (error: any) {
|
|
390
367
|
this.renderErrorTemplate(error);
|
|
391
368
|
console.error(error.message);
|
|
@@ -394,14 +371,13 @@ export class MethodTemplateDirective<ReturnType = any, Parameters =
|
|
|
394
371
|
|
|
395
372
|
this.embedded.emit();
|
|
396
373
|
|
|
397
|
-
this.cdr.detectChanges();
|
|
398
|
-
|
|
399
374
|
}
|
|
400
375
|
|
|
401
376
|
private renderLoadingTemplate() {
|
|
402
|
-
|
|
377
|
+
const loadingTemplate = this.loadingTemplate();
|
|
378
|
+
if (loadingTemplate) {
|
|
403
379
|
this.viewContainerRef.clear();
|
|
404
|
-
this.viewContainerRef.createEmbeddedView(
|
|
380
|
+
this.viewContainerRef.createEmbeddedView(loadingTemplate);
|
|
405
381
|
}
|
|
406
382
|
}
|
|
407
383
|
|
|
@@ -338,7 +338,6 @@
|
|
|
338
338
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
339
339
|
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
340
340
|
Directive,
|
|
341
|
-
HostListener,
|
|
342
341
|
inject,
|
|
343
342
|
Injectable,
|
|
344
343
|
input,
|
|
@@ -383,6 +382,9 @@ export class ShareService {
|
|
|
383
382
|
@Directive({
|
|
384
383
|
selector: '[rxapShareButton],[rxapShare]',
|
|
385
384
|
standalone: true,
|
|
385
|
+
host: {
|
|
386
|
+
'(click)': 'share()',
|
|
387
|
+
},
|
|
386
388
|
})
|
|
387
389
|
export class ShareButtonDirective {
|
|
388
390
|
|
|
@@ -396,7 +398,6 @@ export class ShareButtonDirective {
|
|
|
396
398
|
|
|
397
399
|
private readonly shareService = inject(ShareService);
|
|
398
400
|
|
|
399
|
-
@HostListener('click')
|
|
400
401
|
async share() {
|
|
401
402
|
try {
|
|
402
403
|
await this.shareService.share({
|
package/compodoc/js/menu-wc.js
CHANGED
|
@@ -74,6 +74,9 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
74
74
|
<li class="link">
|
|
75
75
|
<a href="directives/BackgroundImageDirective.html" data-type="entity-link" >BackgroundImageDirective</a>
|
|
76
76
|
</li>
|
|
77
|
+
<li class="link">
|
|
78
|
+
<a href="directives/ConfirmClick.html" data-type="entity-link" >ConfirmClick</a>
|
|
79
|
+
</li>
|
|
77
80
|
<li class="link">
|
|
78
81
|
<a href="directives/ContenteditableDirective.html" data-type="entity-link" >ContenteditableDirective</a>
|
|
79
82
|
</li>
|
|
@@ -117,9 +120,6 @@ customElements.define('compodoc-menu', class extends HTMLElement {
|
|
|
117
120
|
<span class="icon ion-ios-arrow-down"></span>
|
|
118
121
|
</div>
|
|
119
122
|
<ul class="links collapse " ${ isNormalMode ? 'id="injectables-links"' : 'id="xs-injectables-links"' }>
|
|
120
|
-
<li class="link">
|
|
121
|
-
<a href="injectables/ConfirmClick.html" data-type="entity-link" >ConfirmClick</a>
|
|
122
|
-
</li>
|
|
123
123
|
<li class="link">
|
|
124
124
|
<a href="injectables/ShareService.html" data-type="entity-link" >ShareService</a>
|
|
125
125
|
</li>
|
|
@@ -33,7 +33,7 @@ customElements.define('compodoc-menu', /*#__PURE__*/function (_HTMLElement) {
|
|
|
33
33
|
}, {
|
|
34
34
|
key: "render",
|
|
35
35
|
value: function render(isNormalMode) {
|
|
36
|
-
var tp = lithtml.html("\n <nav>\n <ul class=\"list\">\n <li class=\"title\">\n <a href=\"index.html\" data-type=\"index-link\">angular-directives</a>\n </li>\n\n <li class=\"divider\"></li>\n ".concat(isNormalMode ? "<div id=\"book-search-input\" role=\"search\"><input type=\"text\" placeholder=\"Type to search\"></div>" : '', "\n <li class=\"chapter\">\n <a data-type=\"chapter-link\" href=\"index.html\"><span class=\"icon ion-ios-home\"></span>Getting started</a>\n <ul class=\"links\">\n <li class=\"link\">\n <a href=\"overview.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-keypad\"></span>Overview\n </a>\n </li>\n <li class=\"link\">\n <a href=\"index.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>README\n </a>\n </li>\n <li class=\"link\">\n <a href=\"changelog.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>CHANGELOG\n </a>\n </li>\n <li class=\"link\">\n <a href=\"license.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>LICENSE\n </a>\n </li>\n <li class=\"link\">\n <a href=\"todo.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>TODO\n </a>\n </li>\n <li class=\"link\">\n <a href=\"dependencies.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-list\"></span>Dependencies\n </a>\n </li>\n <li class=\"link\">\n <a href=\"properties.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-apps\"></span>Properties\n </a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#directives-links"' : 'data-bs-target="#xs-directives-links"', ">\n <span class=\"icon ion-md-code-working\"></span>\n <span>Directives</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="directives-links"' : 'id="xs-directives-links"', ">\n <li class=\"link\">\n <a href=\"directives/AvatarBackgroundImageDirective.html\" data-type=\"entity-link\" >AvatarBackgroundImageDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/BackgroundImageDirective.html\" data-type=\"entity-link\" >BackgroundImageDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/ContenteditableDirective.html\" data-type=\"entity-link\" >ContenteditableDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/FullWidthDirective.html\" data-type=\"entity-link\" >FullWidthDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/IfTruthyDirective.html\" data-type=\"entity-link\" >IfTruthyDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/IsDevModeDirective.html\" data-type=\"entity-link\" >IsDevModeDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MethodDirective.html\" data-type=\"entity-link\" >MethodDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MethodTemplateDirective.html\" data-type=\"entity-link\" >MethodTemplateDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MovableDividerDirective.html\" data-type=\"entity-link\" >MovableDividerDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/PreventDefaultDirective.html\" data-type=\"entity-link\" >PreventDefaultDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/ShareButtonDirective.html\" data-type=\"entity-link\" >ShareButtonDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/StopImmediatePropagationDirective.html\" data-type=\"entity-link\" >StopImmediatePropagationDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/StopPropagationDirective.html\" data-type=\"entity-link\" >StopPropagationDirective</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#injectables-links"' : 'data-bs-target="#xs-injectables-links"', ">\n <span class=\"icon ion-md-arrow-round-down\"></span>\n <span>Injectables</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="injectables-links"' : 'id="xs-injectables-links"', ">\n <li class=\"link\">\n <a href=\"injectables/ConfirmClick.html\" data-type=\"entity-link\" >ConfirmClick</a>\n </li>\n <li class=\"link\">\n <a href=\"injectables/ShareService.html\" data-type=\"entity-link\" >ShareService</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#interfaces-links"' : 'data-bs-target="#xs-interfaces-links"', ">\n <span class=\"icon ion-md-information-circle-outline\"></span>\n <span>Interfaces</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? ' id="interfaces-links"' : 'id="xs-interfaces-links"', ">\n <li class=\"link\">\n <a href=\"interfaces/ContenteditableEvent.html\" data-type=\"entity-link\" >ContenteditableEvent</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/IfTruthyDirectiveTemplateContext.html\" data-type=\"entity-link\" >IfTruthyDirectiveTemplateContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/MethodTemplateDirectiveContext.html\" data-type=\"entity-link\" >MethodTemplateDirectiveContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/MethodTemplateDirectiveErrorContext.html\" data-type=\"entity-link\" >MethodTemplateDirectiveErrorContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/ShareData.html\" data-type=\"entity-link\" >ShareData</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#miscellaneous-links"' : 'data-bs-target="#xs-miscellaneous-links"', ">\n <span class=\"icon ion-ios-cube\"></span>\n <span>Miscellaneous</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="miscellaneous-links"' : 'id="xs-miscellaneous-links"', ">\n <li class=\"link\">\n <a href=\"miscellaneous/enumerations.html\" data-type=\"entity-link\">Enums</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/functions.html\" data-type=\"entity-link\">Functions</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/typealiases.html\" data-type=\"entity-link\">Type aliases</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/variables.html\" data-type=\"entity-link\">Variables</a>\n </li>\n </ul>\n </li>\n <li class=\"divider\"></li>\n <li class=\"copyright\">\n Documentation generated using <a href=\"https://compodoc.app/\" target=\"_blank\" rel=\"noopener noreferrer\">\n <img data-src=\"images/compodoc-vectorise.png\" class=\"img-responsive\" data-type=\"compodoc-logo\">\n </a>\n </li>\n </ul>\n </nav>\n "));
|
|
36
|
+
var tp = lithtml.html("\n <nav>\n <ul class=\"list\">\n <li class=\"title\">\n <a href=\"index.html\" data-type=\"index-link\">angular-directives</a>\n </li>\n\n <li class=\"divider\"></li>\n ".concat(isNormalMode ? "<div id=\"book-search-input\" role=\"search\"><input type=\"text\" placeholder=\"Type to search\"></div>" : '', "\n <li class=\"chapter\">\n <a data-type=\"chapter-link\" href=\"index.html\"><span class=\"icon ion-ios-home\"></span>Getting started</a>\n <ul class=\"links\">\n <li class=\"link\">\n <a href=\"overview.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-keypad\"></span>Overview\n </a>\n </li>\n <li class=\"link\">\n <a href=\"index.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>README\n </a>\n </li>\n <li class=\"link\">\n <a href=\"changelog.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>CHANGELOG\n </a>\n </li>\n <li class=\"link\">\n <a href=\"license.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>LICENSE\n </a>\n </li>\n <li class=\"link\">\n <a href=\"todo.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-paper\"></span>TODO\n </a>\n </li>\n <li class=\"link\">\n <a href=\"dependencies.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-list\"></span>Dependencies\n </a>\n </li>\n <li class=\"link\">\n <a href=\"properties.html\" data-type=\"chapter-link\">\n <span class=\"icon ion-ios-apps\"></span>Properties\n </a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#directives-links"' : 'data-bs-target="#xs-directives-links"', ">\n <span class=\"icon ion-md-code-working\"></span>\n <span>Directives</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="directives-links"' : 'id="xs-directives-links"', ">\n <li class=\"link\">\n <a href=\"directives/AvatarBackgroundImageDirective.html\" data-type=\"entity-link\" >AvatarBackgroundImageDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/BackgroundImageDirective.html\" data-type=\"entity-link\" >BackgroundImageDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/ConfirmClick.html\" data-type=\"entity-link\" >ConfirmClick</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/ContenteditableDirective.html\" data-type=\"entity-link\" >ContenteditableDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/FullWidthDirective.html\" data-type=\"entity-link\" >FullWidthDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/IfTruthyDirective.html\" data-type=\"entity-link\" >IfTruthyDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/IsDevModeDirective.html\" data-type=\"entity-link\" >IsDevModeDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MethodDirective.html\" data-type=\"entity-link\" >MethodDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MethodTemplateDirective.html\" data-type=\"entity-link\" >MethodTemplateDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/MovableDividerDirective.html\" data-type=\"entity-link\" >MovableDividerDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/PreventDefaultDirective.html\" data-type=\"entity-link\" >PreventDefaultDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/ShareButtonDirective.html\" data-type=\"entity-link\" >ShareButtonDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/StopImmediatePropagationDirective.html\" data-type=\"entity-link\" >StopImmediatePropagationDirective</a>\n </li>\n <li class=\"link\">\n <a href=\"directives/StopPropagationDirective.html\" data-type=\"entity-link\" >StopPropagationDirective</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#injectables-links"' : 'data-bs-target="#xs-injectables-links"', ">\n <span class=\"icon ion-md-arrow-round-down\"></span>\n <span>Injectables</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="injectables-links"' : 'id="xs-injectables-links"', ">\n <li class=\"link\">\n <a href=\"injectables/ShareService.html\" data-type=\"entity-link\" >ShareService</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#interfaces-links"' : 'data-bs-target="#xs-interfaces-links"', ">\n <span class=\"icon ion-md-information-circle-outline\"></span>\n <span>Interfaces</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? ' id="interfaces-links"' : 'id="xs-interfaces-links"', ">\n <li class=\"link\">\n <a href=\"interfaces/ContenteditableEvent.html\" data-type=\"entity-link\" >ContenteditableEvent</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/IfTruthyDirectiveTemplateContext.html\" data-type=\"entity-link\" >IfTruthyDirectiveTemplateContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/MethodTemplateDirectiveContext.html\" data-type=\"entity-link\" >MethodTemplateDirectiveContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/MethodTemplateDirectiveErrorContext.html\" data-type=\"entity-link\" >MethodTemplateDirectiveErrorContext</a>\n </li>\n <li class=\"link\">\n <a href=\"interfaces/ShareData.html\" data-type=\"entity-link\" >ShareData</a>\n </li>\n </ul>\n </li>\n <li class=\"chapter\">\n <div class=\"simple menu-toggler\" data-bs-toggle=\"collapse\" ").concat(isNormalMode ? 'data-bs-target="#miscellaneous-links"' : 'data-bs-target="#xs-miscellaneous-links"', ">\n <span class=\"icon ion-ios-cube\"></span>\n <span>Miscellaneous</span>\n <span class=\"icon ion-ios-arrow-down\"></span>\n </div>\n <ul class=\"links collapse \" ").concat(isNormalMode ? 'id="miscellaneous-links"' : 'id="xs-miscellaneous-links"', ">\n <li class=\"link\">\n <a href=\"miscellaneous/enumerations.html\" data-type=\"entity-link\">Enums</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/functions.html\" data-type=\"entity-link\">Functions</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/typealiases.html\" data-type=\"entity-link\">Type aliases</a>\n </li>\n <li class=\"link\">\n <a href=\"miscellaneous/variables.html\" data-type=\"entity-link\">Variables</a>\n </li>\n </ul>\n </li>\n <li class=\"divider\"></li>\n <li class=\"copyright\">\n Documentation generated using <a href=\"https://compodoc.app/\" target=\"_blank\" rel=\"noopener noreferrer\">\n <img data-src=\"images/compodoc-vectorise.png\" class=\"img-responsive\" data-type=\"compodoc-logo\">\n </a>\n </li>\n </ul>\n </nav>\n "));
|
|
37
37
|
this.innerHTML = tp.strings;
|
|
38
38
|
}
|
|
39
39
|
}]);
|