@symbo.ls/create 3.0.6 → 3.1.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/dist/cjs/ferchOnCreate.js +2 -2
- package/dist/cjs/index.js +26 -5
- package/dist/cjs/router.js +6 -6
- package/dist/esm/ferchOnCreate.js +2 -2
- package/dist/esm/index.js +14 -2
- package/dist/esm/router.js +5 -5
- package/package.json +14 -14
- package/src/ferchOnCreate.js +2 -2
- package/src/index.js +51 -13
- package/src/router.js +12 -12
|
@@ -38,8 +38,8 @@ const fetchAsync = (app, key, options, callback) => {
|
|
|
38
38
|
try {
|
|
39
39
|
if (options.editor.async) {
|
|
40
40
|
(0, import_fetch.fetchProjectAsync)(key, options, callback || ((data) => {
|
|
41
|
-
if ((0, import_utils.isObject)(data.
|
|
42
|
-
options.utils.init(data.
|
|
41
|
+
if ((0, import_utils.isObject)(data.designSystem)) {
|
|
42
|
+
options.utils.init(data.designSystem);
|
|
43
43
|
}
|
|
44
44
|
if ((0, import_utils.isObject)(data.state)) {
|
|
45
45
|
app.state.set(data.state);
|
package/dist/cjs/index.js
CHANGED
|
@@ -47,25 +47,46 @@ const mergeWithLocalFile = (options, optionsExternalFile) => (0, import_utils.de
|
|
|
47
47
|
(0, import_utils.isObject)(optionsExternalFile) ? optionsExternalFile : import_dynamic.default || {}
|
|
48
48
|
);
|
|
49
49
|
const create = (App, options = import_options.default, optionsExternalFile) => {
|
|
50
|
-
const redefinedOptions = {
|
|
50
|
+
const redefinedOptions = {
|
|
51
|
+
...import_options.default,
|
|
52
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
53
|
+
};
|
|
51
54
|
const domqlApp = (0, import_createDomql.createDomqlElement)(App, redefinedOptions);
|
|
52
55
|
(0, import_router.popStateRouter)(domqlApp, redefinedOptions);
|
|
53
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
56
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
57
|
+
redefinedOptions.on.create(
|
|
58
|
+
domqlApp,
|
|
59
|
+
domqlApp.state,
|
|
60
|
+
domqlApp.context,
|
|
61
|
+
redefinedOptions
|
|
62
|
+
);
|
|
54
63
|
return domqlApp;
|
|
55
64
|
};
|
|
56
65
|
const createAsync = (App, options = import_options.default, optionsExternalFile) => {
|
|
57
66
|
const domqlApp = create(App, options, optionsExternalFile);
|
|
58
|
-
const redefinedOptions = {
|
|
67
|
+
const redefinedOptions = {
|
|
68
|
+
...import_options.default,
|
|
69
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
70
|
+
};
|
|
59
71
|
const key = redefinedOptions.key;
|
|
60
72
|
(0, import_ferchOnCreate.fetchAsync)(domqlApp, key, { utils, ...redefinedOptions });
|
|
61
73
|
return domqlApp;
|
|
62
74
|
};
|
|
63
75
|
const createSync = async (App, options = import_options.default, optionsExternalFile) => {
|
|
64
|
-
const redefinedOptions = {
|
|
76
|
+
const redefinedOptions = {
|
|
77
|
+
...import_options.default,
|
|
78
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
79
|
+
};
|
|
65
80
|
const key = options.key;
|
|
66
81
|
await (0, import_ferchOnCreate.fetchSync)(key, redefinedOptions);
|
|
67
82
|
const domqlApp = await (0, import_createDomql.createDomqlElement)(App, redefinedOptions);
|
|
68
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
83
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
84
|
+
await redefinedOptions.on.create(
|
|
85
|
+
domqlApp,
|
|
86
|
+
domqlApp.state,
|
|
87
|
+
domqlApp.context,
|
|
88
|
+
redefinedOptions
|
|
89
|
+
);
|
|
69
90
|
return domqlApp;
|
|
70
91
|
};
|
|
71
92
|
const createSkeleton = (App = {}, options = import_options.default, optionsExternalFile) => {
|
package/dist/cjs/router.js
CHANGED
|
@@ -25,7 +25,6 @@ __export(router_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(router_exports);
|
|
26
26
|
var import_router = require("@domql/router");
|
|
27
27
|
var import_utils = require("@domql/utils");
|
|
28
|
-
var import_uikit = require("@symbo.ls/uikit");
|
|
29
28
|
const DEFAULT_ROUTING_OPTIONS = {
|
|
30
29
|
initRouter: true,
|
|
31
30
|
injectRouterInLinkComponent: true,
|
|
@@ -37,10 +36,10 @@ const initRouter = (element, context) => {
|
|
|
37
36
|
else (0, import_utils.merge)(context.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
38
37
|
const routerOptions = context.router;
|
|
39
38
|
const router = context.utils && context.utils.router ? context.utils.router : import_router.router;
|
|
40
|
-
const onRouterRenderDefault = (el, s) => {
|
|
39
|
+
const onRouterRenderDefault = async (el, s) => {
|
|
41
40
|
const { pathname, search, hash } = import_utils.window.location;
|
|
42
41
|
const url = pathname + search + hash;
|
|
43
|
-
if (el.routes) router(url, el, {}, { initialRender: true });
|
|
42
|
+
if (el.routes) await router(url, el, {}, { initialRender: true });
|
|
44
43
|
};
|
|
45
44
|
const hasRenderRouter = element.on && !(0, import_utils.isUndefined)(element.on.renderRouter) || !(0, import_utils.isUndefined)(element.onRenderRouter);
|
|
46
45
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
@@ -52,7 +51,7 @@ const initRouter = (element, context) => {
|
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
injectRouterInLinkComponent(routerOptions);
|
|
54
|
+
injectRouterInLinkComponent(context, routerOptions);
|
|
56
55
|
return routerOptions;
|
|
57
56
|
};
|
|
58
57
|
let popStateFired;
|
|
@@ -68,8 +67,9 @@ const popStateRouter = (element, context) => {
|
|
|
68
67
|
router(url, element, {}, { pushState: false, scrollToTop: false, level: 0 });
|
|
69
68
|
};
|
|
70
69
|
};
|
|
71
|
-
const injectRouterInLinkComponent = (routerOptions) => {
|
|
70
|
+
const injectRouterInLinkComponent = (context, routerOptions) => {
|
|
71
|
+
const { Link, RouterLink } = context.components;
|
|
72
72
|
if (routerOptions && routerOptions.injectRouterInLinkComponent) {
|
|
73
|
-
return (0, import_utils.deepMerge)(
|
|
73
|
+
return (0, import_utils.deepMerge)(Link, RouterLink);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
@@ -14,8 +14,8 @@ const fetchAsync = (app, key, options, callback) => {
|
|
|
14
14
|
try {
|
|
15
15
|
if (options.editor.async) {
|
|
16
16
|
fetchProjectAsync(key, options, callback || ((data) => {
|
|
17
|
-
if (isObject(data.
|
|
18
|
-
options.utils.init(data.
|
|
17
|
+
if (isObject(data.designSystem)) {
|
|
18
|
+
options.utils.init(data.designSystem);
|
|
19
19
|
}
|
|
20
20
|
if (isObject(data.state)) {
|
|
21
21
|
app.state.set(data.state);
|
package/dist/esm/index.js
CHANGED
|
@@ -29,7 +29,13 @@ const create = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
|
|
29
29
|
const redefinedOptions = __spreadValues(__spreadValues({}, DEFAULT_CREATE_OPTIONS), mergeWithLocalFile(options, optionsExternalFile));
|
|
30
30
|
const domqlApp = createDomqlElement(App, redefinedOptions);
|
|
31
31
|
popStateRouter(domqlApp, redefinedOptions);
|
|
32
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
32
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
33
|
+
redefinedOptions.on.create(
|
|
34
|
+
domqlApp,
|
|
35
|
+
domqlApp.state,
|
|
36
|
+
domqlApp.context,
|
|
37
|
+
redefinedOptions
|
|
38
|
+
);
|
|
33
39
|
return domqlApp;
|
|
34
40
|
};
|
|
35
41
|
const createAsync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
|
@@ -44,7 +50,13 @@ const createSync = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExternal
|
|
|
44
50
|
const key = options.key;
|
|
45
51
|
await fetchSync(key, redefinedOptions);
|
|
46
52
|
const domqlApp = await createDomqlElement(App, redefinedOptions);
|
|
47
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
53
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
54
|
+
await redefinedOptions.on.create(
|
|
55
|
+
domqlApp,
|
|
56
|
+
domqlApp.state,
|
|
57
|
+
domqlApp.context,
|
|
58
|
+
redefinedOptions
|
|
59
|
+
);
|
|
48
60
|
return domqlApp;
|
|
49
61
|
};
|
|
50
62
|
const createSkeleton = (App = {}, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
package/dist/esm/router.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { router as defaultRouter } from "@domql/router";
|
|
2
2
|
import { window, deepMerge, merge, isUndefined } from "@domql/utils";
|
|
3
|
-
import { Link, RouterLink } from "@symbo.ls/uikit";
|
|
4
3
|
const DEFAULT_ROUTING_OPTIONS = {
|
|
5
4
|
initRouter: true,
|
|
6
5
|
injectRouterInLinkComponent: true,
|
|
@@ -12,10 +11,10 @@ const initRouter = (element, context) => {
|
|
|
12
11
|
else merge(context.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
13
12
|
const routerOptions = context.router;
|
|
14
13
|
const router = context.utils && context.utils.router ? context.utils.router : defaultRouter;
|
|
15
|
-
const onRouterRenderDefault = (el, s) => {
|
|
14
|
+
const onRouterRenderDefault = async (el, s) => {
|
|
16
15
|
const { pathname, search, hash } = window.location;
|
|
17
16
|
const url = pathname + search + hash;
|
|
18
|
-
if (el.routes) router(url, el, {}, { initialRender: true });
|
|
17
|
+
if (el.routes) await router(url, el, {}, { initialRender: true });
|
|
19
18
|
};
|
|
20
19
|
const hasRenderRouter = element.on && !isUndefined(element.on.renderRouter) || !isUndefined(element.onRenderRouter);
|
|
21
20
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
@@ -27,7 +26,7 @@ const initRouter = (element, context) => {
|
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
injectRouterInLinkComponent(routerOptions);
|
|
29
|
+
injectRouterInLinkComponent(context, routerOptions);
|
|
31
30
|
return routerOptions;
|
|
32
31
|
};
|
|
33
32
|
let popStateFired;
|
|
@@ -43,7 +42,8 @@ const popStateRouter = (element, context) => {
|
|
|
43
42
|
router(url, element, {}, { pushState: false, scrollToTop: false, level: 0 });
|
|
44
43
|
};
|
|
45
44
|
};
|
|
46
|
-
const injectRouterInLinkComponent = (routerOptions) => {
|
|
45
|
+
const injectRouterInLinkComponent = (context, routerOptions) => {
|
|
46
|
+
const { Link, RouterLink } = context.components;
|
|
47
47
|
if (routerOptions && routerOptions.injectRouterInLinkComponent) {
|
|
48
48
|
return deepMerge(Link, RouterLink);
|
|
49
49
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "39fb7a8c07355468ccce79e2f787ca3fa0715692",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"main": "src/index.js",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"prepublish": "npm run build; npm run copy:package:cjs"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@domql/emotion": "^3.
|
|
33
|
-
"@domql/event": "^3.
|
|
34
|
-
"@domql/report": "^3.
|
|
35
|
-
"@domql/router": "^3.
|
|
36
|
-
"@symbo.ls/fetch": "^3.
|
|
37
|
-
"@symbo.ls/init": "^3.
|
|
38
|
-
"@symbo.ls/scratch": "^3.
|
|
39
|
-
"@symbo.ls/sync": "^3.
|
|
40
|
-
"@symbo.ls/uikit": "^3.
|
|
41
|
-
"@symbo.ls/utils": "^3.
|
|
42
|
-
"domql": "^3.
|
|
32
|
+
"@domql/emotion": "^3.1.1",
|
|
33
|
+
"@domql/event": "^3.1.1",
|
|
34
|
+
"@domql/report": "^3.1.1",
|
|
35
|
+
"@domql/router": "^3.1.1",
|
|
36
|
+
"@symbo.ls/fetch": "^3.1.1",
|
|
37
|
+
"@symbo.ls/init": "^3.1.1",
|
|
38
|
+
"@symbo.ls/scratch": "^3.1.1",
|
|
39
|
+
"@symbo.ls/sync": "^3.1.1",
|
|
40
|
+
"@symbo.ls/uikit": "^3.1.1",
|
|
41
|
+
"@symbo.ls/utils": "^3.1.1",
|
|
42
|
+
"domql": "^3.1.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@babel/core": "^7.
|
|
45
|
+
"@babel/core": "^7.26.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/src/ferchOnCreate.js
CHANGED
|
@@ -18,8 +18,8 @@ export const fetchAsync = (app, key, options, callback) => {
|
|
|
18
18
|
try {
|
|
19
19
|
if (options.editor.async) {
|
|
20
20
|
fetchProjectAsync(key, options, callback || ((data) => {
|
|
21
|
-
if (isObject(data.
|
|
22
|
-
options.utils.init(data.
|
|
21
|
+
if (isObject(data.designSystem)) {
|
|
22
|
+
options.utils.init(data.designSystem)
|
|
23
23
|
}
|
|
24
24
|
if (isObject(data.state)) {
|
|
25
25
|
app.state.set(data.state)
|
package/src/index.js
CHANGED
|
@@ -11,27 +11,48 @@ import DEFAULT_CREATE_OPTIONS from './options'
|
|
|
11
11
|
import DYNAMIC_JSON from '@symbo.ls/init/dynamic.json'
|
|
12
12
|
import { createDomqlElement } from './createDomql'
|
|
13
13
|
|
|
14
|
-
const mergeWithLocalFile = (options, optionsExternalFile) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
)
|
|
14
|
+
const mergeWithLocalFile = (options, optionsExternalFile) =>
|
|
15
|
+
deepMerge(
|
|
16
|
+
options,
|
|
17
|
+
isObject(optionsExternalFile) ? optionsExternalFile : DYNAMIC_JSON || {}
|
|
18
|
+
)
|
|
18
19
|
|
|
19
|
-
export const create = (
|
|
20
|
-
|
|
20
|
+
export const create = (
|
|
21
|
+
App,
|
|
22
|
+
options = DEFAULT_CREATE_OPTIONS,
|
|
23
|
+
optionsExternalFile
|
|
24
|
+
) => {
|
|
25
|
+
const redefinedOptions = {
|
|
26
|
+
...DEFAULT_CREATE_OPTIONS,
|
|
27
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
28
|
+
}
|
|
21
29
|
|
|
22
30
|
const domqlApp = createDomqlElement(App, redefinedOptions)
|
|
23
31
|
|
|
24
32
|
popStateRouter(domqlApp, redefinedOptions)
|
|
25
33
|
|
|
26
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
34
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
35
|
+
redefinedOptions.on.create(
|
|
36
|
+
domqlApp,
|
|
37
|
+
domqlApp.state,
|
|
38
|
+
domqlApp.context,
|
|
39
|
+
redefinedOptions
|
|
40
|
+
)
|
|
27
41
|
|
|
28
42
|
return domqlApp
|
|
29
43
|
}
|
|
30
44
|
|
|
31
|
-
export const createAsync = (
|
|
45
|
+
export const createAsync = (
|
|
46
|
+
App,
|
|
47
|
+
options = DEFAULT_CREATE_OPTIONS,
|
|
48
|
+
optionsExternalFile
|
|
49
|
+
) => {
|
|
32
50
|
const domqlApp = create(App, options, optionsExternalFile)
|
|
33
51
|
|
|
34
|
-
const redefinedOptions = {
|
|
52
|
+
const redefinedOptions = {
|
|
53
|
+
...DEFAULT_CREATE_OPTIONS,
|
|
54
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
55
|
+
}
|
|
35
56
|
// const SYMBOLS_KEY = process.env.SYMBOLS_KEY
|
|
36
57
|
const key = redefinedOptions.key
|
|
37
58
|
fetchAsync(domqlApp, key, { utils, ...redefinedOptions })
|
|
@@ -39,20 +60,37 @@ export const createAsync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExtern
|
|
|
39
60
|
return domqlApp
|
|
40
61
|
}
|
|
41
62
|
|
|
42
|
-
export const createSync = async (
|
|
43
|
-
|
|
63
|
+
export const createSync = async (
|
|
64
|
+
App,
|
|
65
|
+
options = DEFAULT_CREATE_OPTIONS,
|
|
66
|
+
optionsExternalFile
|
|
67
|
+
) => {
|
|
68
|
+
const redefinedOptions = {
|
|
69
|
+
...DEFAULT_CREATE_OPTIONS,
|
|
70
|
+
...mergeWithLocalFile(options, optionsExternalFile)
|
|
71
|
+
}
|
|
44
72
|
|
|
45
73
|
// const SYMBOLS_KEY = process.env.SYMBOLS_KEY
|
|
46
74
|
const key = options.key
|
|
47
75
|
await fetchSync(key, redefinedOptions)
|
|
48
76
|
|
|
49
77
|
const domqlApp = await createDomqlElement(App, redefinedOptions)
|
|
50
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
78
|
+
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
79
|
+
await redefinedOptions.on.create(
|
|
80
|
+
domqlApp,
|
|
81
|
+
domqlApp.state,
|
|
82
|
+
domqlApp.context,
|
|
83
|
+
redefinedOptions
|
|
84
|
+
)
|
|
51
85
|
|
|
52
86
|
return domqlApp
|
|
53
87
|
}
|
|
54
88
|
|
|
55
|
-
export const createSkeleton = (
|
|
89
|
+
export const createSkeleton = (
|
|
90
|
+
App = {},
|
|
91
|
+
options = DEFAULT_CREATE_OPTIONS,
|
|
92
|
+
optionsExternalFile
|
|
93
|
+
) => {
|
|
56
94
|
return create(
|
|
57
95
|
{
|
|
58
96
|
deps: { isUndefined },
|
package/src/router.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { router as defaultRouter } from '@domql/router'
|
|
4
4
|
import { window, deepMerge, merge, isUndefined } from '@domql/utils'
|
|
5
|
-
import { Link, RouterLink } from '@symbo.ls/uikit'
|
|
6
5
|
|
|
7
6
|
const DEFAULT_ROUTING_OPTIONS = {
|
|
8
7
|
initRouter: true,
|
|
@@ -16,17 +15,18 @@ export const initRouter = (element, context) => {
|
|
|
16
15
|
else merge(context.router || {}, DEFAULT_ROUTING_OPTIONS)
|
|
17
16
|
|
|
18
17
|
const routerOptions = context.router
|
|
19
|
-
const router =
|
|
18
|
+
const router =
|
|
19
|
+
context.utils && context.utils.router ? context.utils.router : defaultRouter
|
|
20
20
|
|
|
21
|
-
const onRouterRenderDefault = (el, s) => {
|
|
21
|
+
const onRouterRenderDefault = async (el, s) => {
|
|
22
22
|
const { pathname, search, hash } = window.location
|
|
23
23
|
const url = pathname + search + hash
|
|
24
|
-
if (el.routes) router(url, el, {}, { initialRender: true })
|
|
24
|
+
if (el.routes) await router(url, el, {}, { initialRender: true })
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const hasRenderRouter =
|
|
28
|
+
(element.on && !isUndefined(element.on.renderRouter)) ||
|
|
29
|
+
!isUndefined(element.onRenderRouter) // || element.on.renderRouter
|
|
30
30
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
31
31
|
if (element.on) {
|
|
32
32
|
element.on.renderRouter = onRouterRenderDefault
|
|
@@ -37,7 +37,7 @@ export const initRouter = (element, context) => {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
injectRouterInLinkComponent(routerOptions)
|
|
40
|
+
injectRouterInLinkComponent(context, routerOptions)
|
|
41
41
|
|
|
42
42
|
return routerOptions
|
|
43
43
|
}
|
|
@@ -48,9 +48,8 @@ export const popStateRouter = (element, context) => {
|
|
|
48
48
|
popStateFired = true
|
|
49
49
|
const routerOptions = context.router || DEFAULT_ROUTING_OPTIONS
|
|
50
50
|
if (!routerOptions.popState) return
|
|
51
|
-
const router =
|
|
52
|
-
? context.utils.router
|
|
53
|
-
: defaultRouter
|
|
51
|
+
const router =
|
|
52
|
+
context.utils && context.utils.router ? context.utils.router : defaultRouter
|
|
54
53
|
window.onpopstate = e => {
|
|
55
54
|
const { pathname, search, hash } = window.location
|
|
56
55
|
const url = pathname + search + hash
|
|
@@ -58,7 +57,8 @@ export const popStateRouter = (element, context) => {
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
export const injectRouterInLinkComponent = (routerOptions) => {
|
|
60
|
+
export const injectRouterInLinkComponent = (context, routerOptions) => {
|
|
61
|
+
const { Link, RouterLink } = context.components
|
|
62
62
|
if (routerOptions && routerOptions.injectRouterInLinkComponent) {
|
|
63
63
|
return deepMerge(Link, RouterLink)
|
|
64
64
|
}
|