@lwrjs/router 0.13.0-alpha.14 → 0.13.0-alpha.16

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.
Files changed (52) hide show
  1. package/build/cjs/modules/lwr/contextUtils/contextUtils.cjs +2 -2
  2. package/build/cjs/modules/lwr/domRouterUtils/domRouterUtils.cjs +2 -2
  3. package/build/cjs/modules/lwr/navigation/navigation.cjs +2 -2
  4. package/build/cjs/modules/lwr/navigation/navigationMixin.cjs +1 -1
  5. package/build/cjs/modules/lwr/routerContainer/routerContainer.cjs +1 -1
  6. package/build/cjs/modules/lwr/routerUtils/parseUtils.cjs +2 -2
  7. package/build/cjs/modules/lwr/routerUtils/routeDefUtils.cjs +1 -1
  8. package/build/cjs/modules/lwr/routerUtils/routeUtils.cjs +2 -2
  9. package/build/cjs/modules/lwr/routerUtils/routerUtils.cjs +8 -8
  10. package/build/es/modules/lwr/contextUtils/contextInfo.d.ts +1 -1
  11. package/build/es/modules/lwr/contextUtils/contextUtils.d.ts +3 -3
  12. package/build/es/modules/lwr/contextUtils/contextUtils.js +2 -2
  13. package/build/es/modules/lwr/contextUtils/navigationApiStore.d.ts +1 -1
  14. package/build/es/modules/lwr/domRouter/domRouter.d.ts +1 -1
  15. package/build/es/modules/lwr/domRouter/domRouter.js +2 -2
  16. package/build/es/modules/lwr/domRouterUtils/domRouterUtils.d.ts +3 -3
  17. package/build/es/modules/lwr/domRouterUtils/domRouterUtils.js +2 -2
  18. package/build/es/modules/lwr/domRouterUtils/historyUtils.d.ts +1 -1
  19. package/build/es/modules/lwr/domRouterUtils/uriUtils.d.ts +1 -1
  20. package/build/es/modules/lwr/historyRouter/historyRouter.d.ts +1 -1
  21. package/build/es/modules/lwr/navigation/navigation.d.ts +2 -2
  22. package/build/es/modules/lwr/navigation/navigation.js +2 -2
  23. package/build/es/modules/lwr/navigation/navigationApi.d.ts +1 -1
  24. package/build/es/modules/lwr/navigation/navigationMixin.js +1 -1
  25. package/build/es/modules/lwr/routerContainer/routerContainer.d.ts +1 -1
  26. package/build/es/modules/lwr/routerContainer/routerContainer.js +1 -1
  27. package/build/es/modules/lwr/routerErrors/routerErrors.d.ts +1 -1
  28. package/build/es/modules/lwr/routerUtils/parseUtils.d.ts +1 -1
  29. package/build/es/modules/lwr/routerUtils/parseUtils.js +2 -2
  30. package/build/es/modules/lwr/routerUtils/routeDefUtils.d.ts +1 -1
  31. package/build/es/modules/lwr/routerUtils/routeDefUtils.js +1 -1
  32. package/build/es/modules/lwr/routerUtils/routeUtils.d.ts +1 -1
  33. package/build/es/modules/lwr/routerUtils/routeUtils.js +2 -2
  34. package/build/es/modules/lwr/routerUtils/routerUtils.d.ts +11 -11
  35. package/build/es/modules/lwr/routerUtils/routerUtils.js +8 -8
  36. package/build/es/modules/lwr/routerUtils/types.d.ts +1 -1
  37. package/build/es/modules/lwr/routerUtils/uriUtils.d.ts +1 -1
  38. package/build/es/modules/lwr/serverRouter/serverRouter.d.ts +1 -1
  39. package/build/es/modules/lwr/serverRouter/serverRouter.js +2 -2
  40. package/build/es/services/index.d.ts +1 -1
  41. package/build/modules/lwr/contextUtils/contextUtils.js +2 -2
  42. package/build/modules/lwr/domRouter/domRouter.js +2 -2
  43. package/build/modules/lwr/domRouterUtils/domRouterUtils.js +2 -2
  44. package/build/modules/lwr/navigation/navigation.js +2 -2
  45. package/build/modules/lwr/navigation/navigationMixin.js +1 -1
  46. package/build/modules/lwr/routerContainer/routerContainer.js +1 -1
  47. package/build/modules/lwr/routerUtils/parseUtils.js +2 -2
  48. package/build/modules/lwr/routerUtils/routeDefUtils.js +1 -1
  49. package/build/modules/lwr/routerUtils/routeUtils.js +2 -2
  50. package/build/modules/lwr/routerUtils/routerUtils.js +8 -8
  51. package/build/modules/lwr/serverRouter/serverRouter.js +2 -2
  52. package/package.json +6 -6
@@ -29,8 +29,8 @@ __export(exports, {
29
29
  getNavigationHelm: () => import_navigationApiStore.getNavigationHelm,
30
30
  registerNavigationHelm: () => import_navigationApiStore.registerNavigationHelm
31
31
  });
32
- var import_contextInfo = __toModule(require("./contextInfo"));
33
- var import_navigationApiStore = __toModule(require("./navigationApiStore"));
32
+ var import_contextInfo = __toModule(require("./contextInfo.cjs"));
33
+ var import_navigationApiStore = __toModule(require("./navigationApiStore.cjs"));
34
34
  function generateContextualWireAdapter(contextInstance) {
35
35
  var _a;
36
36
  const Adapter = (_a = class {
@@ -28,5 +28,5 @@ __export(exports, {
28
28
  replace: () => import_historyUtils.replace,
29
29
  set: () => import_historyUtils.set
30
30
  });
31
- var import_uriUtils = __toModule(require("./uriUtils"));
32
- var import_historyUtils = __toModule(require("./historyUtils"));
31
+ var import_uriUtils = __toModule(require("./uriUtils.cjs"));
32
+ var import_historyUtils = __toModule(require("./historyUtils.cjs"));
@@ -39,5 +39,5 @@ var import_navigationContext = __toModule(require("lwr/navigationContext"));
39
39
  var import_currentPageReference = __toModule(require("lwr/currentPageReference"));
40
40
  var import_currentView = __toModule(require("lwr/currentView"));
41
41
  var import_contextUtils = __toModule(require("lwr/contextUtils"));
42
- var import_navigationApi = __toModule(require("./navigationApi"));
43
- var import_navigationMixin = __toModule(require("./navigationMixin"));
42
+ var import_navigationApi = __toModule(require("./navigationApi.cjs"));
43
+ var import_navigationMixin = __toModule(require("./navigationMixin.cjs"));
@@ -27,7 +27,7 @@ __export(exports, {
27
27
  NavigationMixin: () => NavigationMixin
28
28
  });
29
29
  var import_routerErrors = __toModule(require("lwr/routerErrors"));
30
- var import_navigationApi = __toModule(require("./navigationApi"));
30
+ var import_navigationApi = __toModule(require("./navigationApi.cjs"));
31
31
  var import_navigationMixinHacks = __toModule(require("lwr/navigationMixinHacks"));
32
32
  var isSSR = typeof window === "undefined";
33
33
  var Navigate = Symbol("Navigate");
@@ -36,7 +36,7 @@ __export(exports, {
36
36
  default: () => routerContainer_default
37
37
  });
38
38
  var import_lwc = __toModule(require("lwc"));
39
- var import_utils = __toModule(require("./utils"));
39
+ var import_utils = __toModule(require("./utils.cjs"));
40
40
  var import_routerUtils = __toModule(require("lwr/routerUtils"));
41
41
  var RouterContainer = class extends import_lwc.LightningElement {
42
42
  constructor() {
@@ -29,8 +29,8 @@ __export(exports, {
29
29
  parseRoutes: () => parseRoutes
30
30
  });
31
31
  var import_routerErrors = __toModule(require("lwr/routerErrors"));
32
- var import_pathToRegexp = __toModule(require("./pathToRegexp"));
33
- var import_uriUtils = __toModule(require("./uriUtils"));
32
+ var import_pathToRegexp = __toModule(require("./pathToRegexp.cjs"));
33
+ var import_uriUtils = __toModule(require("./uriUtils.cjs"));
34
34
  var {
35
35
  INVALID_ROUTE_QUERY,
36
36
  MISSING_ROUTE_TEMPLATE,
@@ -29,7 +29,7 @@ __export(exports, {
29
29
  getQueryParams: () => getQueryParams,
30
30
  matchRouteDefinitionByPageReference: () => matchRouteDefinitionByPageReference
31
31
  });
32
- var import_uriUtils = __toModule(require("./uriUtils"));
32
+ var import_uriUtils = __toModule(require("./uriUtils.cjs"));
33
33
  function matchRouteDefinitionByPageReference(pageReference, routeDefs) {
34
34
  if (!pageReference) {
35
35
  return null;
@@ -30,8 +30,8 @@ __export(exports, {
30
30
  getUrlFromPageReferenceAndRouteDef: () => getUrlFromPageReferenceAndRouteDef,
31
31
  matchRouteByUrl: () => matchRouteByUrl
32
32
  });
33
- var import_uriUtils = __toModule(require("./uriUtils"));
34
- var import_routeDefUtils = __toModule(require("./routeDefUtils"));
33
+ var import_uriUtils = __toModule(require("./uriUtils.cjs"));
34
+ var import_routeDefUtils = __toModule(require("./routeDefUtils.cjs"));
35
35
  var DEFAULT_I18N_ROUTER_CONFIG = {
36
36
  locale: "en-US",
37
37
  defaultLocale: "en-US"
@@ -44,14 +44,14 @@ __export(exports, {
44
44
  parseRoutes: () => import_parseUtils.parseRoutes,
45
45
  pathToRegexp: () => pathToRegexp
46
46
  });
47
- var import_filterUtils = __toModule(require("./filterUtils"));
48
- var import_routeDefUtils = __toModule(require("./routeDefUtils"));
49
- var import_routeUtils = __toModule(require("./routeUtils"));
50
- var import_typeUtils = __toModule(require("./typeUtils"));
51
- var import_parseUtils = __toModule(require("./parseUtils"));
52
- var import_pathToRegexp = __toModule(require("./pathToRegexp"));
53
- var import_uriUtils = __toModule(require("./uriUtils"));
54
- var import_domUtils = __toModule(require("./domUtils"));
47
+ var import_filterUtils = __toModule(require("./filterUtils.cjs"));
48
+ var import_routeDefUtils = __toModule(require("./routeDefUtils.cjs"));
49
+ var import_routeUtils = __toModule(require("./routeUtils.cjs"));
50
+ var import_typeUtils = __toModule(require("./typeUtils.cjs"));
51
+ var import_parseUtils = __toModule(require("./parseUtils.cjs"));
52
+ var import_pathToRegexp = __toModule(require("./pathToRegexp.cjs"));
53
+ var import_uriUtils = __toModule(require("./uriUtils.cjs"));
54
+ var import_domUtils = __toModule(require("./domUtils.cjs"));
55
55
  var pathToRegexp = {
56
56
  pathToRegexp: import_pathToRegexp.pathToRegexp,
57
57
  compile: import_pathToRegexp.compile
@@ -1,4 +1,4 @@
1
- import type { LwcContextConsumer } from './contextUtils';
1
+ import type { LwcContextConsumer } from './contextUtils.js';
2
2
  /**
3
3
  * Manages context for various providers
4
4
  */
@@ -1,8 +1,8 @@
1
1
  import type { ContextConsumer, Contextualizer } from 'lwc';
2
- import { ContextInfo } from './contextInfo';
2
+ import { ContextInfo } from './contextInfo.js';
3
3
  export { ContextInfo };
4
- export type { NavigationHelm } from './navigationApiStore';
5
- export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore';
4
+ export type { NavigationHelm } from './navigationApiStore.js';
5
+ export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore.js';
6
6
  export interface WireAdapter<TContext, TConfig, TEmit> {
7
7
  _callback(value: TEmit): void;
8
8
  update(config: TConfig, context: TContext): void;
@@ -1,6 +1,6 @@
1
- import { ContextInfo } from './contextInfo';
1
+ import { ContextInfo } from './contextInfo.js';
2
2
  export { ContextInfo };
3
- export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore';
3
+ export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore.js';
4
4
  export function generateContextualWireAdapter(contextInstance) {
5
5
  var _a;
6
6
  const Adapter = (_a = class Adapter {
@@ -7,7 +7,7 @@
7
7
  import type { RouteCallback, PageReference } from 'lwr/router';
8
8
  import type { Unsubscriber } from 'lwr/observable';
9
9
  import type { ContextId } from 'lwr/navigationContext';
10
- import type { NavigateOptions } from '../routerUtils/types';
10
+ import type { NavigateOptions } from '../routerUtils/types.js';
11
11
  /**
12
12
  * Provides the ability for a given context provider to find its NavigationHelm
13
13
  * provider by just an ID. Having access to the NavigationHelm allows the consumer
@@ -9,7 +9,7 @@ import type { ContextId } from 'lwr/navigationContext';
9
9
  import type { Filter, MessageObject } from 'lwr/routerUtils';
10
10
  import type { PageReference, Router, RouteCallback, RoutingMatch, RoutingResult } from 'lwr/router';
11
11
  import type { Observable, Unsubscriber } from 'lwr/observable';
12
- import type { NavigateOptions } from '../routerUtils/types';
12
+ import type { NavigateOptions } from '../routerUtils/types.js';
13
13
  export declare const NAV_EVENT: string;
14
14
  export declare const PARENT_EVENT: string;
15
15
  interface RouterParent {
@@ -9,8 +9,8 @@ import { CurrentPageReference, CurrentView, NavigationContext, registerNavigatio
9
9
  import { currentPageReferenceContextualizer, currentViewContextualizer, navigationContextContextualizer, provideContext, } from 'lwr/contextProvider';
10
10
  import { generateMessageObject, invariant, messages } from 'lwr/routerErrors';
11
11
  import { createFilterChain, guid, hasDocument } from 'lwr/routerUtils';
12
- import { createObservable } from 'lwr/observable'; // @ts-ignore Need to import from client-modules package
13
- import { ROUTER_ERROR, ROUTER_NAV, ROUTER_VIEW } from 'lwr/metrics'; // @ts-ignore
12
+ import { createObservable } from 'lwr/observable';
13
+ import { ROUTER_ERROR, ROUTER_NAV, ROUTER_VIEW } from 'lwr/metrics';
14
14
  import { logOperationStart, logOperationEnd } from 'lwr/profiler';
15
15
  import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
16
16
  // Event fired when a component calls navigate()
@@ -1,4 +1,4 @@
1
- export { getRelativeUrl } from './uriUtils';
2
- export { set, replace } from './historyUtils';
3
- export type { DomRouterConfig, NavigationHandler, RouteChange } from './types';
1
+ export { getRelativeUrl } from './uriUtils.js';
2
+ export { set, replace } from './historyUtils.js';
3
+ export type { DomRouterConfig, NavigationHandler, RouteChange } from './types.js';
4
4
  //# sourceMappingURL=domRouterUtils.d.ts.map
@@ -1,3 +1,3 @@
1
- export { getRelativeUrl } from './uriUtils';
2
- export { set, replace } from './historyUtils';
1
+ export { getRelativeUrl } from './uriUtils.js';
2
+ export { set, replace } from './historyUtils.js';
3
3
  //# sourceMappingURL=domRouterUtils.js.map
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import type { RouteInstance } from '../routerUtils/types';
7
+ import type { RouteInstance } from '../routerUtils/types.js';
8
8
  /**
9
9
  * Sets a history state.
10
10
 
@@ -1,4 +1,4 @@
1
- import type { UrlObject } from './types';
1
+ import type { UrlObject } from './types.js';
2
2
  /**
3
3
  * helper: f(url) -> new URL
4
4
  * Query parameter values are URI decoded.
@@ -7,7 +7,7 @@
7
7
  import { DomRouterImpl } from 'lwr/domRouter';
8
8
  import type { Router, PageReference } from 'lwr/router';
9
9
  import type { DomRouterConfig } from 'lwr/domRouterUtils';
10
- import type { NavigateOptions } from '../routerUtils/types';
10
+ import type { NavigateOptions } from '../routerUtils/types.js';
11
11
  export declare class HistoryRouter extends DomRouterImpl {
12
12
  historyDisabled: boolean;
13
13
  /**
@@ -11,6 +11,6 @@ export type { ContextId } from 'lwr/navigationContext';
11
11
  export type { PageReference, RouteInstance } from 'lwr/router';
12
12
  export type { Constructable } from 'lwr/routerUtils';
13
13
  export { ContextInfo, getNavigationHelm, registerNavigationHelm, generateContextualWireAdapter, } from 'lwr/contextUtils';
14
- export { navigate, generateUrl } from './navigationApi';
15
- export { NavigationMixin } from './navigationMixin';
14
+ export { navigate, generateUrl } from './navigationApi.js';
15
+ export { NavigationMixin } from './navigationMixin.js';
16
16
  //# sourceMappingURL=navigation.d.ts.map
@@ -15,6 +15,6 @@ export { CurrentView } from 'lwr/currentView'; // Provides Constructable
15
15
  export { ContextInfo, getNavigationHelm, registerNavigationHelm, generateContextualWireAdapter, } from 'lwr/contextUtils';
16
16
  // NavigationMixin has a dependency on navigate and generateUrl
17
17
  // They need to be sibling exports in order to avoid a circular dependency
18
- export { navigate, generateUrl } from './navigationApi';
19
- export { NavigationMixin } from './navigationMixin';
18
+ export { navigate, generateUrl } from './navigationApi.js';
19
+ export { NavigationMixin } from './navigationMixin.js';
20
20
  //# sourceMappingURL=navigation.js.map
@@ -1,6 +1,6 @@
1
1
  import type { ContextId } from 'lwr/navigationContext';
2
2
  import type { PageReference } from 'lwr/router';
3
- import type { NavigateOptions } from '../routerUtils/types';
3
+ import type { NavigateOptions } from '../routerUtils/types.js';
4
4
  /**
5
5
  * Navigate programmatically to a page reference.
6
6
  * The Promise used within is deliberately not returned.
@@ -8,7 +8,7 @@
8
8
  // symbols as indexes, which typescript does not like, necessitating 'any'
9
9
  /* eslint-disable @typescript-eslint/no-explicit-any */
10
10
  import { invariant, generateMessage, messages } from 'lwr/routerErrors';
11
- import { generateUrl, navigate } from './navigationApi';
11
+ import { generateUrl, navigate } from './navigationApi.js';
12
12
  import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
13
13
  // eslint-disable-next-line lwr/no-unguarded-apis
14
14
  const isSSR = typeof window === 'undefined';
@@ -5,7 +5,7 @@
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
7
  import { LightningElement } from 'lwc';
8
- import type { RouterApi } from './utils';
8
+ import type { RouterApi } from './utils.js';
9
9
  import type { MessageObject } from 'lwr/routerUtils';
10
10
  import type { PageReference, Router, RoutingResult } from 'lwr/router';
11
11
  import type { RouteChange } from 'lwr/domRouterUtils';
@@ -11,7 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
11
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12
12
  };
13
13
  import { LightningElement, api } from 'lwc';
14
- import { createNavigationContext } from './utils';
14
+ import { createNavigationContext } from './utils.js';
15
15
  import { hasDocument } from 'lwr/routerUtils';
16
16
  /*
17
17
  * Provides a LWC router component. These can be nested and all report to the root router.
@@ -5,7 +5,7 @@
5
5
  * SPDX-License-Identifier: MIT
6
6
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7
7
  */
8
- import type { MessageObject } from '../routerUtils/types';
8
+ import type { MessageObject } from '../routerUtils/types.js';
9
9
  export declare function generateMessage(info: MessageObject, args?: string[]): string;
10
10
  export declare function generateMessageObject(info: MessageObject, args?: string[]): MessageObject;
11
11
  export declare function invariant(condition: boolean, errorInfo: MessageObject, args?: string[]): void;
@@ -1,5 +1,5 @@
1
1
  import type { CompiledRouteDefinition, RouterSerializationConfig } from 'lwr/routerUtils';
2
- import type { QueryObject, CompiledQuery, QueryMatcher } from './types';
2
+ import type { QueryObject, CompiledQuery, QueryMatcher } from './types.js';
3
3
  /**
4
4
  * Parse the route definitions with path-to-regex functionality for paths, and
5
5
  * query parameter validation
@@ -1,6 +1,6 @@
1
1
  import { messages, invariant } from 'lwr/routerErrors';
2
- import { pathToRegexp, compile } from './pathToRegexp';
3
- import { getQueryFromUrl, getPathFromUrl, isParam, getParamName, getQueryNames } from './uriUtils';
2
+ import { pathToRegexp, compile } from './pathToRegexp.js';
3
+ import { getQueryFromUrl, getPathFromUrl, isParam, getParamName, getQueryNames } from './uriUtils.js';
4
4
  const { INVALID_ROUTE_QUERY, MISSING_ROUTE_TEMPLATE, MISSING_PAGE_BINDING, INVALID_PAGE_BINDING, INVALID_URI_SYNTAX, } = messages;
5
5
  /**
6
6
  * Parse the route definitions with path-to-regex functionality for paths, and
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import type { CompiledRouteDefinition, PageReference, StringAttributes, QueryObject, NullableStringAttributes } from './types';
7
+ import type { CompiledRouteDefinition, PageReference, StringAttributes, QueryObject, NullableStringAttributes } from './types.js';
8
8
  /**
9
9
  * f(route, routes[]) -> RouteDef
10
10
  * Match a route's id to a Route Definition id from the given list.
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import { decode, getPathFromUrl, getQueryFromUrl, isParam } from './uriUtils';
7
+ import { decode, getPathFromUrl, getQueryFromUrl, isParam } from './uriUtils.js';
8
8
  /**
9
9
  * f(route, routes[]) -> RouteDef
10
10
  * Match a route's id to a Route Definition id from the given list.
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import type { CompiledRouteDefinition, CompiledRoutingMatch, I18nRouterConfig, NavigateOptions, PageReference } from './types';
7
+ import type { CompiledRouteDefinition, CompiledRoutingMatch, I18nRouterConfig, NavigateOptions, PageReference } from './types.js';
8
8
  export declare const DEFAULT_I18N_ROUTER_CONFIG: I18nRouterConfig;
9
9
  /**
10
10
  * f(URL, routes[]?) -> route
@@ -4,8 +4,8 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import { getPathFromUrl, getQueryFromUrl, getQueryString, isParam, getParamName, getQueryNames, } from './uriUtils';
8
- import { getPageReferenceFromUriAndRouteDef, matchRouteDefinitionByPageReference, getPathParams, getQueryParams, } from './routeDefUtils';
7
+ import { getPathFromUrl, getQueryFromUrl, getQueryString, isParam, getParamName, getQueryNames, } from './uriUtils.js';
8
+ import { getPageReferenceFromUriAndRouteDef, matchRouteDefinitionByPageReference, getPathParams, getQueryParams, } from './routeDefUtils.js';
9
9
  export const DEFAULT_I18N_ROUTER_CONFIG = {
10
10
  locale: 'en-US',
11
11
  defaultLocale: 'en-US',
@@ -4,19 +4,19 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- export { createFilterChain } from './filterUtils';
8
- export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils';
9
- export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef, } from './routeUtils';
10
- export { isObject, freeze, guid, isValidRoute } from './typeUtils';
11
- export { parseRoutes } from './parseUtils';
12
- import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp';
7
+ export { createFilterChain } from './filterUtils.js';
8
+ export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils.js';
9
+ export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef, } from './routeUtils.js';
10
+ export { isObject, freeze, guid, isValidRoute } from './typeUtils.js';
11
+ export { parseRoutes } from './parseUtils.js';
12
+ import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp.js';
13
13
  export declare const pathToRegexp: {
14
14
  pathToRegexp: typeof ptr;
15
15
  compile: typeof ptrCompile;
16
16
  };
17
- export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils';
18
- export { hasDocument } from './domUtils';
19
- export type { Key } from './pathToRegexp';
20
- export type { Filter, FilterChain } from './filterUtils';
21
- export type { CompiledRouteDefinition, CompiledRoutingMatch, Constructor, Constructable, MessageObject, Module, PageReference, RouteCallback, RouteDefinition, RouteHandler, RouteHandlerCallback, RouteHandlerClass, RouteHandlerModule, Router, RouterConfig, RouteDestination, RouteInstance, RoutingMatch, RoutingResult, StringAttributes, UrlMapper, ViewSet, ViewInfo, RouterSerializationConfig, } from './types';
17
+ export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils.js';
18
+ export { hasDocument } from './domUtils.js';
19
+ export type { Key } from './pathToRegexp.js';
20
+ export type { Filter, FilterChain } from './filterUtils.js';
21
+ export type { CompiledRouteDefinition, CompiledRoutingMatch, Constructor, Constructable, MessageObject, Module, PageReference, RouteCallback, RouteDefinition, RouteHandler, RouteHandlerCallback, RouteHandlerClass, RouteHandlerModule, Router, RouterConfig, RouteDestination, RouteInstance, RoutingMatch, RoutingResult, StringAttributes, UrlMapper, ViewSet, ViewInfo, RouterSerializationConfig, } from './types.js';
22
22
  //# sourceMappingURL=routerUtils.d.ts.map
@@ -4,16 +4,16 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- export { createFilterChain } from './filterUtils';
8
- export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils';
9
- export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef, } from './routeUtils';
10
- export { isObject, freeze, guid, isValidRoute } from './typeUtils';
11
- export { parseRoutes } from './parseUtils';
12
- import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp';
7
+ export { createFilterChain } from './filterUtils.js';
8
+ export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils.js';
9
+ export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef, } from './routeUtils.js';
10
+ export { isObject, freeze, guid, isValidRoute } from './typeUtils.js';
11
+ export { parseRoutes } from './parseUtils.js';
12
+ import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp.js';
13
13
  export const pathToRegexp = {
14
14
  pathToRegexp: ptr,
15
15
  compile: ptrCompile,
16
16
  };
17
- export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils';
18
- export { hasDocument } from './domUtils';
17
+ export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils.js';
18
+ export { hasDocument } from './domUtils.js';
19
19
  //# sourceMappingURL=routerUtils.js.map
@@ -1,4 +1,4 @@
1
- import type { Key, PathFunction } from './pathToRegexp';
1
+ import type { Key, PathFunction } from './pathToRegexp.js';
2
2
  import type { ContextId } from 'lwr/navigationContext';
3
3
  import type { Unsubscriber } from 'lwr/observable';
4
4
  export type Module = Record<string | symbol | number, unknown>;
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
- import type { QueryObject, CompiledQuery } from './types';
7
+ import type { QueryObject, CompiledQuery } from './types.js';
8
8
  /**
9
9
  * f("one two &") -> "one%20two%20%26"
10
10
  *
@@ -2,7 +2,7 @@ import type { RouteChange } from 'lwr/domRouterUtils';
2
2
  import type { ContextId } from 'lwr/navigation';
3
3
  import type { PageReference, Router, RouterConfig, RoutingMatch } from 'lwr/router';
4
4
  import type { MessageObject } from 'lwr/routerUtils';
5
- import type { NavigateOptions } from '../routerUtils/types';
5
+ import type { NavigateOptions } from '../routerUtils/types.js';
6
6
  type HandleNavFunction = (p: PageReference) => boolean;
7
7
  type PreNavFunction = (r: RouteChange) => boolean | Promise<boolean>;
8
8
  type ErrorNavFunction = (m: MessageObject) => void;
@@ -1,7 +1,7 @@
1
- import { currentPageReferenceContextualizer, navigationContextContextualizer, provideContext, } from 'lwr/contextProvider'; // @ts-ignore - import from client-modules package
1
+ import { currentPageReferenceContextualizer, navigationContextContextualizer, provideContext, } from 'lwr/contextProvider';
2
2
  import { ROUTER_ERROR } from 'lwr/metrics';
3
3
  import { CurrentPageReference, NavigationContext, registerNavigationHelm } from 'lwr/navigation';
4
- import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks'; // @ts-ignore - import from client-modules package
4
+ import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
5
5
  import { logOperationStart } from 'lwr/profiler';
6
6
  import { createRouter } from 'lwr/router';
7
7
  import { generateMessageObject, messages } from 'lwr/routerErrors';
@@ -1,4 +1,4 @@
1
- import type { I18nRouterConfig } from '../modules/lwr/routerUtils/types';
1
+ import type { I18nRouterConfig } from '../modules/lwr/routerUtils/types.js';
2
2
  export declare const DEFAULT_SCHEMA = "pageReference_v1";
3
3
  export interface LwrRouterConfig {
4
4
  caseSensitive?: boolean;
@@ -1,9 +1,9 @@
1
1
  // Wire adapters follow LWC types, which come from a non-portable module
2
2
  // eslint-disable-next-line lwr/only-allowed-type-imports
3
3
 
4
- import { ContextInfo } from './contextInfo';
4
+ import { ContextInfo } from './contextInfo.js';
5
5
  export { ContextInfo };
6
- export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore';
6
+ export { getNavigationHelm, registerNavigationHelm } from './navigationApiStore.js';
7
7
 
8
8
  /**
9
9
  * Interface for contextual wire adapters to subscribe to context changes
@@ -10,8 +10,8 @@ import { CurrentPageReference, CurrentView, NavigationContext, registerNavigatio
10
10
  import { currentPageReferenceContextualizer, currentViewContextualizer, navigationContextContextualizer, provideContext } from 'lwr/contextProvider';
11
11
  import { generateMessageObject, invariant, messages } from 'lwr/routerErrors';
12
12
  import { createFilterChain, guid, hasDocument } from 'lwr/routerUtils';
13
- import { createObservable } from 'lwr/observable'; // @ts-ignore Need to import from client-modules package
14
- import { ROUTER_ERROR, ROUTER_NAV, ROUTER_VIEW } from 'lwr/metrics'; // @ts-ignore
13
+ import { createObservable } from 'lwr/observable';
14
+ import { ROUTER_ERROR, ROUTER_NAV, ROUTER_VIEW } from 'lwr/metrics';
15
15
  import { logOperationStart, logOperationEnd } from 'lwr/profiler';
16
16
  import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
17
17
  // Event fired when a component calls navigate()
@@ -1,2 +1,2 @@
1
- export { getRelativeUrl } from './uriUtils';
2
- export { set, replace } from './historyUtils';
1
+ export { getRelativeUrl } from './uriUtils.js';
2
+ export { set, replace } from './historyUtils.js';
@@ -18,5 +18,5 @@ export { ContextInfo, getNavigationHelm, registerNavigationHelm, generateContext
18
18
 
19
19
  // NavigationMixin has a dependency on navigate and generateUrl
20
20
  // They need to be sibling exports in order to avoid a circular dependency
21
- export { navigate, generateUrl } from './navigationApi';
22
- export { NavigationMixin } from './navigationMixin';
21
+ export { navigate, generateUrl } from './navigationApi.js';
22
+ export { NavigationMixin } from './navigationMixin.js';
@@ -10,7 +10,7 @@
10
10
  /* eslint-disable @typescript-eslint/no-explicit-any */
11
11
 
12
12
  import { invariant, generateMessage, messages } from 'lwr/routerErrors';
13
- import { generateUrl, navigate } from './navigationApi';
13
+ import { generateUrl, navigate } from './navigationApi.js';
14
14
  import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
15
15
  // eslint-disable-next-line lwr/no-unguarded-apis
16
16
  const isSSR = typeof window === 'undefined';
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { LightningElement, api } from 'lwc';
9
- import { createNavigationContext } from './utils';
9
+ import { createNavigationContext } from './utils.js';
10
10
  import { hasDocument } from 'lwr/routerUtils';
11
11
  /*
12
12
  * Provides a LWC router component. These can be nested and all report to the root router.
@@ -1,6 +1,6 @@
1
1
  import { messages, invariant } from 'lwr/routerErrors';
2
- import { pathToRegexp, compile } from './pathToRegexp';
3
- import { getQueryFromUrl, getPathFromUrl, isParam, getParamName, getQueryNames } from './uriUtils';
2
+ import { pathToRegexp, compile } from './pathToRegexp.js';
3
+ import { getQueryFromUrl, getPathFromUrl, isParam, getParamName, getQueryNames } from './uriUtils.js';
4
4
  const {
5
5
  INVALID_ROUTE_QUERY,
6
6
  MISSING_ROUTE_TEMPLATE,
@@ -5,7 +5,7 @@
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
7
 
8
- import { decode, getPathFromUrl, getQueryFromUrl, isParam } from './uriUtils';
8
+ import { decode, getPathFromUrl, getQueryFromUrl, isParam } from './uriUtils.js';
9
9
  /**
10
10
  * f(route, routes[]) -> RouteDef
11
11
  * Match a route's id to a Route Definition id from the given list.
@@ -5,8 +5,8 @@
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
7
 
8
- import { getPathFromUrl, getQueryFromUrl, getQueryString, isParam, getParamName, getQueryNames } from './uriUtils';
9
- import { getPageReferenceFromUriAndRouteDef, matchRouteDefinitionByPageReference, getPathParams, getQueryParams } from './routeDefUtils';
8
+ import { getPathFromUrl, getQueryFromUrl, getQueryString, isParam, getParamName, getQueryNames } from './uriUtils.js';
9
+ import { getPageReferenceFromUriAndRouteDef, matchRouteDefinitionByPageReference, getPathParams, getQueryParams } from './routeDefUtils.js';
10
10
  export const DEFAULT_I18N_ROUTER_CONFIG = {
11
11
  locale: 'en-US',
12
12
  defaultLocale: 'en-US'
@@ -5,15 +5,15 @@
5
5
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6
6
  */
7
7
 
8
- export { createFilterChain } from './filterUtils';
9
- export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils';
10
- export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef } from './routeUtils';
11
- export { isObject, freeze, guid, isValidRoute } from './typeUtils';
12
- export { parseRoutes } from './parseUtils';
13
- import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp';
8
+ export { createFilterChain } from './filterUtils.js';
9
+ export { getPageReferenceFromUriAndRouteDef } from './routeDefUtils.js';
10
+ export { DEFAULT_I18N_ROUTER_CONFIG, getUrlFromPageReference, getPageReferenceFromUrl, matchRouteByUrl, getUrlFromPageReferenceAndRouteDef } from './routeUtils.js';
11
+ export { isObject, freeze, guid, isValidRoute } from './typeUtils.js';
12
+ export { parseRoutes } from './parseUtils.js';
13
+ import { pathToRegexp as ptr, compile as ptrCompile } from './pathToRegexp.js';
14
14
  export const pathToRegexp = {
15
15
  pathToRegexp: ptr,
16
16
  compile: ptrCompile
17
17
  };
18
- export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils';
19
- export { hasDocument } from './domUtils';
18
+ export { getPathFromUrl, getQueryFromUrl, getQueryString, encode, decode } from './uriUtils.js';
19
+ export { hasDocument } from './domUtils.js';
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/ban-ts-comment */
2
2
 
3
- import { currentPageReferenceContextualizer, navigationContextContextualizer, provideContext } from 'lwr/contextProvider'; // @ts-ignore - import from client-modules package
3
+ import { currentPageReferenceContextualizer, navigationContextContextualizer, provideContext } from 'lwr/contextProvider';
4
4
  import { ROUTER_ERROR } from 'lwr/metrics';
5
5
  import { CurrentPageReference, NavigationContext, registerNavigationHelm } from 'lwr/navigation';
6
- import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks'; // @ts-ignore - import from client-modules package
6
+ import { CONTEXT_ID_BACKDOOR } from 'lwr/navigationMixinHacks';
7
7
  import { logOperationStart } from 'lwr/profiler';
8
8
  import { createRouter } from 'lwr/router';
9
9
  import { generateMessageObject, messages } from 'lwr/routerErrors';
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "version": "0.13.0-alpha.14",
8
+ "version": "0.13.0-alpha.16",
9
9
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
10
10
  "repository": {
11
11
  "type": "git",
@@ -53,14 +53,14 @@
53
53
  "test:server": "jest --config ./jest.server.config.cjs"
54
54
  },
55
55
  "dependencies": {
56
- "@lwrjs/client-modules": "0.13.0-alpha.14",
57
- "@lwrjs/diagnostics": "0.13.0-alpha.14",
58
- "@lwrjs/shared-utils": "0.13.0-alpha.14",
56
+ "@lwrjs/client-modules": "0.13.0-alpha.16",
57
+ "@lwrjs/diagnostics": "0.13.0-alpha.16",
58
+ "@lwrjs/shared-utils": "0.13.0-alpha.16",
59
59
  "ajv": "6.12.6"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@lwc/jest-preset": "^16.0.0",
63
- "@lwrjs/fs-watch": "0.13.0-alpha.14",
63
+ "@lwrjs/fs-watch": "0.13.0-alpha.16",
64
64
  "@rollup/plugin-typescript": "^11.1.6",
65
65
  "jest": "^26.6.3",
66
66
  "rollup": "^2.78.0",
@@ -98,5 +98,5 @@
98
98
  "volta": {
99
99
  "extends": "../../../package.json"
100
100
  },
101
- "gitHead": "7276973cd522d9117256026fbd35ca12a9032304"
101
+ "gitHead": "5aabb958d70a4a962b207da21e852d7a801d7d44"
102
102
  }