@nstudio/nativescript-compiler-angular 9.2.0-alpha.10 → 9.2.0-alpha.11

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.
@@ -341,10 +341,12 @@ export class Router {
341
341
  }
342
342
  }
343
343
 
344
+ export type RedirectFunction = (redirectData: { params: Params; queryParams: Params; [key: string]: any }) => string | UrlTree;
345
+ export type RouterFeatures = any;
344
346
  export interface Route {
345
347
  path?: string;
346
348
  component?: any;
347
- redirectTo?: string;
349
+ redirectTo?: string | RedirectFunction;
348
350
  pathMatch?: string;
349
351
  outlet?: string;
350
352
  data?: Record<string, any>;
@@ -431,6 +433,23 @@ export { NativeDialogService as NativeDialog };
431
433
 
432
434
  export const NativeDialogModule: any = undefined;
433
435
  export function registerElement(_name: string, _resolver: () => any, _meta?: any): void {}
436
+ export function getViewClass(_elementName: string): any { return undefined; }
437
+ export function getViewMeta(_nodeName: string): any { return undefined; }
438
+ export function isKnownView(_elementName: string): boolean { return false; }
439
+ export class ModalDialogParams {
440
+ context: any;
441
+ closeCallback: (...args: any[]) => any;
442
+ constructor(context: any, closeCallback: (...args: any[]) => any) {
443
+ this.context = context;
444
+ this.closeCallback = closeCallback;
445
+ }
446
+ }
447
+ export class ModalDialogService {
448
+ static readonly shared = new ModalDialogService();
449
+ showModal(_type: any, _options: any): Promise<any> {
450
+ return Promise.resolve(undefined);
451
+ }
452
+ }
434
453
  /** A release build never restores routes for hot module replacement. */
435
454
  export function isAngularHmrRestoringRoute(): boolean {
436
455
  return false;
@@ -462,7 +481,9 @@ export function platformNativeScript(): { bootstrapModule(module: any, options?:
462
481
  }
463
482
  export const PageRouterOutlet: any = undefined;
464
483
  export const RouterOutlet: any = undefined;
465
- export const RouterLink: any = undefined;
484
+ export class RouterLink {
485
+ [key: string]: any;
486
+ }
466
487
  export const RouterLinkActive: any = undefined;
467
488
  export const NSRouterLink: any = undefined;
468
489
  export const NSRouterLinkActive: any = undefined;
@@ -495,6 +516,21 @@ export function toObservable<T>(source: Signal<T>, _options?: { injector?: any }
495
516
  return subject.asObservable();
496
517
  }
497
518
 
519
+ export function outputToObservable<T>(ref: { subscribe(fn: (value: T) => void): { unsubscribe(): void } }): Observable<T> {
520
+ return new Observable<T>((subscriber) => {
521
+ const sub = ref.subscribe((v) => subscriber.next(v));
522
+ return () => sub.unsubscribe();
523
+ });
524
+ }
525
+
526
+ export function outputFromObservable<T>(observable: Observable<T>, _opts?: any): { subscribe(fn: (value: T) => void): { unsubscribe(): void } } {
527
+ return {
528
+ subscribe(fn: (value: T) => void) {
529
+ return observable.subscribe(fn);
530
+ },
531
+ };
532
+ }
533
+
498
534
  export function takeUntilDestroyed<T>(destroyRef?: DestroyRef): OperatorFunction<T, T> {
499
535
  const ref = destroyRef ?? inject(DestroyRef);
500
536
  return (source: Observable<T>) =>