a zip code crypto-currency system good for red ONLY

url-serializer.d.ts 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { InjectionToken } from '@angular/core';
  2. import { App } from '../components/app/app';
  3. import { NavigationContainer } from './navigation-container';
  4. import { DeepLinkConfig, DehydratedSegment, DehydratedSegmentPair, NavGroup, NavLink, NavSegment } from './nav-util';
  5. /**
  6. * @hidden
  7. */
  8. export declare class UrlSerializer {
  9. _app: App;
  10. links: NavLink[];
  11. constructor(_app: App, config: DeepLinkConfig);
  12. /**
  13. * Parse the URL into a Path, which is made up of multiple NavSegments.
  14. * Match which components belong to each segment.
  15. */
  16. parse(browserUrl: string): NavSegment[];
  17. createSegmentFromName(navContainer: NavigationContainer, nameOrComponent: any): NavSegment;
  18. getLinkFromName(nameOrComponent: any): NavLink;
  19. /**
  20. * Serialize a path, which is made up of multiple NavSegments,
  21. * into a URL string. Turn each segment into a string and concat them to a URL.
  22. */
  23. serialize(segments: NavSegment[]): string;
  24. /**
  25. * Serializes a component and its data into a NavSegment.
  26. */
  27. serializeComponent(navContainer: NavigationContainer, component: any, data: any): NavSegment;
  28. /**
  29. * @internal
  30. */
  31. _createSegment(app: App, navContainer: NavigationContainer, configLink: NavLink, data: any): NavSegment;
  32. }
  33. export declare function formatUrlPart(name: string): string;
  34. export declare const isPartMatch: (urlPart: string, configLinkPart: string) => boolean;
  35. export declare const createMatchedData: (matchedUrlParts: string[], link: NavLink) => any;
  36. export declare const findLinkByComponentData: (links: NavLink[], component: any, instanceData: any) => NavLink;
  37. export declare const normalizeLinks: (links: NavLink[]) => NavLink[];
  38. /**
  39. * @hidden
  40. */
  41. export declare const DeepLinkConfigToken: InjectionToken<any>;
  42. export declare function setupUrlSerializer(app: App, userDeepLinkConfig: any): UrlSerializer;
  43. export declare function navGroupStringtoObjects(navGroupStrings: string[]): NavGroup[];
  44. export declare function urlToNavGroupStrings(url: string): string[];
  45. export declare function convertUrlToSegments(app: App, url: string, navLinks: NavLink[]): NavSegment[];
  46. export declare function convertUrlToDehydratedSegments(url: string, navLinks: NavLink[]): DehydratedSegmentPair[];
  47. export declare function hydrateSegmentsWithNav(app: App, dehydratedSegmentPairs: DehydratedSegmentPair[]): NavSegment[];
  48. export declare function getNavFromNavGroup(navGroup: NavGroup, app: App): NavigationContainer[];
  49. export declare function getSegmentsFromNavGroups(navGroups: NavGroup[], navLinks: NavLink[]): DehydratedSegmentPair[];
  50. export declare function getSegmentsFromUrlPieces(urlSections: string[], navLink: NavLink): DehydratedSegment;
  51. export declare function hydrateSegment(segment: DehydratedSegment, nav: NavigationContainer): NavSegment;
  52. export declare function getNonHydratedSegmentIfLinkAndUrlMatch(urlChunks: string[], navLink: NavLink): DehydratedSegment;