@lwrjs/router 0.24.2 → 0.24.3
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/build/cjs/modules/lwr/contextProvider/contextProvider.cjs +25 -22
- package/build/cjs/modules/lwr/contextUtils/contextInfo.cjs +59 -8
- package/build/cjs/modules/lwr/contextUtils/contextUtils.cjs +57 -22
- package/build/cjs/modules/lwr/contextUtils/navigationApiStore.cjs +16 -19
- package/build/cjs/modules/lwr/currentPageReference/currentPageReference.cjs +18 -19
- package/build/cjs/modules/lwr/currentView/currentView.cjs +16 -19
- package/build/cjs/modules/lwr/domRouter/domRouter.cjs +175 -54
- package/build/cjs/modules/lwr/domRouterUtils/domRouterUtils.cjs +16 -19
- package/build/cjs/modules/lwr/domRouterUtils/historyUtils.cjs +17 -4
- package/build/cjs/modules/lwr/domRouterUtils/types.cjs +15 -2
- package/build/cjs/modules/lwr/domRouterUtils/uriUtils.cjs +16 -18
- package/build/cjs/modules/lwr/historyRouter/historyRouter.cjs +37 -20
- package/build/cjs/modules/lwr/navigation/constants.cjs +21 -8
- package/build/cjs/modules/lwr/navigation/navigation.cjs +20 -23
- package/build/cjs/modules/lwr/navigation/navigationApi.cjs +15 -18
- package/build/cjs/modules/lwr/navigation/navigationMixin.cjs +30 -29
- package/build/cjs/modules/lwr/navigationContext/navigationContext.cjs +15 -18
- package/build/cjs/modules/lwr/navigationMixinHacks/navigationMixinHacks.cjs +15 -18
- package/build/cjs/modules/lwr/observable/observable.cjs +17 -4
- package/build/cjs/modules/lwr/outlet/outlet.cjs +30 -34
- package/build/cjs/modules/lwr/router/router.cjs +122 -38
- package/build/cjs/modules/lwr/routerBridge/routerBridge.cjs +25 -19
- package/build/cjs/modules/lwr/routerContainer/routerContainer.cjs +49 -29
- package/build/cjs/modules/lwr/routerContainer/utils.cjs +41 -20
- package/build/cjs/modules/lwr/routerErrors/routerErrors.cjs +17 -4
- package/build/cjs/modules/lwr/routerUtils/domUtils.cjs +17 -4
- package/build/cjs/modules/lwr/routerUtils/filterUtils.cjs +36 -17
- package/build/cjs/modules/lwr/routerUtils/parseUtils.cjs +27 -30
- package/build/cjs/modules/lwr/routerUtils/pathToRegexp.cjs +64 -52
- package/build/cjs/modules/lwr/routerUtils/routeDefUtils.cjs +26 -28
- package/build/cjs/modules/lwr/routerUtils/routeUtils.cjs +31 -34
- package/build/cjs/modules/lwr/routerUtils/routerUtils.cjs +22 -25
- package/build/cjs/modules/lwr/routerUtils/typeUtils.cjs +22 -7
- package/build/cjs/modules/lwr/routerUtils/types.cjs +15 -2
- package/build/cjs/modules/lwr/routerUtils/uriUtils.cjs +18 -5
- package/build/cjs/modules/lwr/serverRouter/serverRouter.cjs +57 -27
- package/build/cjs/services/index.cjs +47 -37
- package/build/cjs/services/module-provider/index.cjs +36 -29
- package/build/cjs/services/module-provider/utils.cjs +38 -31
- package/package.json +6 -6
|
@@ -1,19 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
6
|
var __export = (target, all) => {
|
|
4
7
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
9
|
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
7
19
|
|
|
8
20
|
// packages/@lwrjs/router/src/modules/lwr/navigation/constants.ts
|
|
9
|
-
|
|
10
|
-
__export(
|
|
21
|
+
var constants_exports = {};
|
|
22
|
+
__export(constants_exports, {
|
|
11
23
|
GenerateUrl: () => GenerateUrl,
|
|
12
24
|
GetContext: () => GetContext,
|
|
13
25
|
NavContext: () => NavContext,
|
|
14
26
|
Navigate: () => Navigate
|
|
15
27
|
});
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
28
|
+
module.exports = __toCommonJS(constants_exports);
|
|
29
|
+
var Navigate = /* @__PURE__ */ Symbol("Navigate");
|
|
30
|
+
var GenerateUrl = /* @__PURE__ */ Symbol("GenerateUrl");
|
|
31
|
+
var NavContext = /* @__PURE__ */ Symbol("NavContext");
|
|
32
|
+
var GetContext = /* @__PURE__ */ Symbol("NavContext");
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// packages/@lwrjs/router/src/modules/lwr/navigation/navigation.ts
|
|
25
|
-
|
|
26
|
-
__export(
|
|
21
|
+
var navigation_exports = {};
|
|
22
|
+
__export(navigation_exports, {
|
|
27
23
|
ContextInfo: () => import_contextUtils.ContextInfo,
|
|
28
24
|
CurrentPageReference: () => import_currentPageReference.CurrentPageReference,
|
|
29
25
|
CurrentView: () => import_currentView.CurrentView,
|
|
@@ -35,9 +31,10 @@ __export(exports, {
|
|
|
35
31
|
navigate: () => import_navigationApi.navigate,
|
|
36
32
|
registerNavigationHelm: () => import_contextUtils.registerNavigationHelm
|
|
37
33
|
});
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(navigation_exports);
|
|
35
|
+
var import_navigationContext = require("lwr/navigationContext");
|
|
36
|
+
var import_currentPageReference = require("lwr/currentPageReference");
|
|
37
|
+
var import_currentView = require("lwr/currentView");
|
|
38
|
+
var import_contextUtils = require("lwr/contextUtils");
|
|
39
|
+
var import_navigationApi = require("./navigationApi.cjs");
|
|
40
|
+
var import_navigationMixin = require("./navigationMixin.cjs");
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// packages/@lwrjs/router/src/modules/lwr/navigation/navigationApi.ts
|
|
25
|
-
|
|
26
|
-
__export(
|
|
21
|
+
var navigationApi_exports = {};
|
|
22
|
+
__export(navigationApi_exports, {
|
|
27
23
|
generateUrl: () => generateUrl,
|
|
28
24
|
generateUrlAsync: () => generateUrlAsync,
|
|
29
25
|
navigate: () => navigate
|
|
30
26
|
});
|
|
31
|
-
|
|
27
|
+
module.exports = __toCommonJS(navigationApi_exports);
|
|
28
|
+
var import_contextUtils = require("lwr/contextUtils");
|
|
32
29
|
function navigate(context, pageReference, replace, options) {
|
|
33
30
|
const api = (0, import_contextUtils.getNavigationHelm)(context);
|
|
34
31
|
api.navigate(pageReference, replace, options);
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// packages/@lwrjs/router/src/modules/lwr/navigation/navigationMixin.ts
|
|
25
|
-
|
|
26
|
-
__export(
|
|
21
|
+
var navigationMixin_exports = {};
|
|
22
|
+
__export(navigationMixin_exports, {
|
|
27
23
|
NavigationMixin: () => NavigationMixin
|
|
28
24
|
});
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
25
|
+
module.exports = __toCommonJS(navigationMixin_exports);
|
|
26
|
+
var import_routerErrors = require("lwr/routerErrors");
|
|
27
|
+
var import_navigationApi = require("./navigationApi.cjs");
|
|
28
|
+
var import_navigationMixinHacks = require("lwr/navigationMixinHacks");
|
|
29
|
+
var import_constants = require("./constants.cjs");
|
|
33
30
|
var isSSR = typeof window === "undefined";
|
|
34
31
|
function NavigationMixin(Base) {
|
|
35
32
|
(0, import_routerErrors.invariant)(typeof Base.prototype.dispatchEvent === "function", import_routerErrors.messages.INVALID_MIXIN_CMP, [
|
|
@@ -38,15 +35,19 @@ function NavigationMixin(Base) {
|
|
|
38
35
|
class Mixin extends Base {
|
|
39
36
|
[import_constants.GetContext]() {
|
|
40
37
|
if (!this[import_constants.NavContext]) {
|
|
41
|
-
this.dispatchEvent(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
this.dispatchEvent(
|
|
39
|
+
// eslint exception reason: this code is safe to be imported into the priming environment, but is not runnable, and not expected to be runnable
|
|
40
|
+
// eslint-disable-next-line no-undef
|
|
41
|
+
new CustomEvent(import_navigationMixinHacks.CONTEXT_ID_BACKDOOR, {
|
|
42
|
+
bubbles: true,
|
|
43
|
+
composed: true,
|
|
44
|
+
detail: {
|
|
45
|
+
callback: (contextId) => {
|
|
46
|
+
this[import_constants.NavContext] = contextId;
|
|
47
|
+
}
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
49
|
+
})
|
|
50
|
+
);
|
|
50
51
|
if (!this[import_constants.NavContext]) {
|
|
51
52
|
throw new Error((0, import_routerErrors.generateMessage)(import_routerErrors.messages.MISSING_CONTEXT));
|
|
52
53
|
}
|
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// packages/@lwrjs/router/src/modules/lwr/navigationContext/navigationContext.ts
|
|
25
|
-
|
|
26
|
-
__export(
|
|
21
|
+
var navigationContext_exports = {};
|
|
22
|
+
__export(navigationContext_exports, {
|
|
27
23
|
NavigationContext: () => NavigationContext
|
|
28
24
|
});
|
|
29
|
-
|
|
25
|
+
module.exports = __toCommonJS(navigationContext_exports);
|
|
26
|
+
var import_contextUtils = require("lwr/contextUtils");
|
|
30
27
|
var NAVIGATION_CONTEXT = new import_contextUtils.ContextInfo(void 0);
|
|
31
28
|
var NavigationContext = (0, import_contextUtils.generateContextualWireAdapter)(NAVIGATION_CONTEXT);
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// packages/@lwrjs/router/src/modules/lwr/navigationMixinHacks/navigationMixinHacks.ts
|
|
25
|
-
|
|
26
|
-
__export(
|
|
21
|
+
var navigationMixinHacks_exports = {};
|
|
22
|
+
__export(navigationMixinHacks_exports, {
|
|
27
23
|
CONTEXT_ID_BACKDOOR: () => CONTEXT_ID_BACKDOOR
|
|
28
24
|
});
|
|
29
|
-
|
|
25
|
+
module.exports = __toCommonJS(navigationMixinHacks_exports);
|
|
26
|
+
var import_routerUtils = require("lwr/routerUtils");
|
|
30
27
|
var CONTEXT_ID_BACKDOOR = `universalcontainergetnavigationcontext${(0, import_routerUtils.guid)()}`;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
6
|
var __export = (target, all) => {
|
|
4
7
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
9
|
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
7
19
|
|
|
8
20
|
// packages/@lwrjs/router/src/modules/lwr/observable/observable.ts
|
|
9
|
-
|
|
10
|
-
__export(
|
|
21
|
+
var observable_exports = {};
|
|
22
|
+
__export(observable_exports, {
|
|
11
23
|
createObservable: () => createObservable
|
|
12
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(observable_exports);
|
|
13
26
|
function createObservable() {
|
|
14
27
|
let currentValue = void 0;
|
|
15
28
|
let currentError = void 0;
|
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
9
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
16
|
+
return to;
|
|
22
17
|
};
|
|
23
|
-
var
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
24
20
|
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
25
21
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
26
22
|
if (decorator = decorators[i])
|
|
27
23
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
28
|
-
if (kind && result)
|
|
29
|
-
__defProp(target, key, result);
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
30
25
|
return result;
|
|
31
26
|
};
|
|
32
27
|
|
|
33
28
|
// packages/@lwrjs/router/src/modules/lwr/outlet/outlet.ts
|
|
34
|
-
|
|
35
|
-
__export(
|
|
36
|
-
default: () =>
|
|
29
|
+
var outlet_exports = {};
|
|
30
|
+
__export(outlet_exports, {
|
|
31
|
+
default: () => Outlet
|
|
37
32
|
});
|
|
38
|
-
|
|
39
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(outlet_exports);
|
|
34
|
+
var import_lwc = require("lwc");
|
|
35
|
+
var import_navigation = require("lwr/navigation");
|
|
40
36
|
var Outlet = class extends import_lwc.LightningElement {
|
|
41
37
|
constructor() {
|
|
42
38
|
super(...arguments);
|
|
@@ -46,6 +42,9 @@ var Outlet = class extends import_lwc.LightningElement {
|
|
|
46
42
|
this.previousViewCtor = void 0;
|
|
47
43
|
this.hasError = false;
|
|
48
44
|
}
|
|
45
|
+
static {
|
|
46
|
+
this.renderMode = "light";
|
|
47
|
+
}
|
|
49
48
|
setView(currentView) {
|
|
50
49
|
this.hasError = false;
|
|
51
50
|
this.viewCtor = currentView;
|
|
@@ -54,13 +53,13 @@ var Outlet = class extends import_lwc.LightningElement {
|
|
|
54
53
|
renderedCallback() {
|
|
55
54
|
if (this.viewCtor !== this.previousViewCtor) {
|
|
56
55
|
this.previousViewCtor = this.viewCtor;
|
|
57
|
-
const viewChangedEvent = new CustomEvent("viewchange", {detail: this.viewCtor});
|
|
56
|
+
const viewChangedEvent = new CustomEvent("viewchange", { detail: this.viewCtor });
|
|
58
57
|
this.dispatchEvent(viewChangedEvent);
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
errorCallback(e, stack) {
|
|
62
61
|
this.hasError = true;
|
|
63
|
-
const viewErrorEvent = new CustomEvent("viewerror", {detail: {error: e, stack}});
|
|
62
|
+
const viewErrorEvent = new CustomEvent("viewerror", { detail: { error: e, stack } });
|
|
64
63
|
this.dispatchEvent(viewErrorEvent);
|
|
65
64
|
if (this.outletErrorCallback) {
|
|
66
65
|
this.outletErrorCallback(e, stack);
|
|
@@ -71,22 +70,19 @@ var Outlet = class extends import_lwc.LightningElement {
|
|
|
71
70
|
refocus() {
|
|
72
71
|
if (!this.refocusOff) {
|
|
73
72
|
const region = this.refs?.outlet;
|
|
74
|
-
if (region)
|
|
75
|
-
region.focus();
|
|
73
|
+
if (region) region.focus();
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
76
|
};
|
|
79
|
-
|
|
80
|
-
__decorate([
|
|
77
|
+
__decorateClass([
|
|
81
78
|
import_lwc.api
|
|
82
79
|
], Outlet.prototype, "refocusOff", 2);
|
|
83
|
-
|
|
80
|
+
__decorateClass([
|
|
84
81
|
import_lwc.api
|
|
85
82
|
], Outlet.prototype, "outletErrorCallback", 2);
|
|
86
|
-
|
|
83
|
+
__decorateClass([
|
|
87
84
|
import_lwc.api
|
|
88
85
|
], Outlet.prototype, "viewName", 2);
|
|
89
|
-
|
|
90
|
-
(0, import_lwc.wire)(import_navigation.CurrentView, {viewName: "$viewName"})
|
|
86
|
+
__decorateClass([
|
|
87
|
+
(0, import_lwc.wire)(import_navigation.CurrentView, { viewName: "$viewName" })
|
|
91
88
|
], Outlet.prototype, "setView", 1);
|
|
92
|
-
var outlet_default = Outlet;
|