druxt-router 0.27.2 → 0.28.0
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/nuxt/index.js +2 -2
- package/package.json +2 -2
- package/templates/druxt-router.stories.js +12 -2
package/nuxt/index.js
CHANGED
|
@@ -18,6 +18,7 @@ const DruxtRouterNuxtModule = async function(moduleOptions = {}) {
|
|
|
18
18
|
...moduleOptions
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
+
await this.addModule(["druxt", options]);
|
|
21
22
|
this.nuxt.hook("components:dirs", (dirs) => {
|
|
22
23
|
dirs.push({ path: path.join(__dirname, "../dist/components") });
|
|
23
24
|
});
|
|
@@ -36,7 +37,7 @@ const DruxtRouterNuxtModule = async function(moduleOptions = {}) {
|
|
|
36
37
|
proxy: { ...options.proxy || {}, api: false }
|
|
37
38
|
});
|
|
38
39
|
const languageResourceType = "configurable_language--configurable_language";
|
|
39
|
-
if (await druxt$1.getIndex(languageResourceType)) {
|
|
40
|
+
if ((await druxt$1.getIndex(languageResourceType) || {}).href) {
|
|
40
41
|
const query = new drupalJsonapiParams.DrupalJsonApiParams().addFields(languageResourceType, ["drupal_internal__id"]);
|
|
41
42
|
languages = (await druxt$1.getCollectionAll(languageResourceType, query) || []).map((o) => o.data).flat().filter((o) => !["und", "zxx"].includes(((o || {}).attributes || {}).drupal_internal__id));
|
|
42
43
|
}
|
|
@@ -63,7 +64,6 @@ const DruxtRouterNuxtModule = async function(moduleOptions = {}) {
|
|
|
63
64
|
fileName: "druxt-router.js",
|
|
64
65
|
options
|
|
65
66
|
});
|
|
66
|
-
this.options.store = true;
|
|
67
67
|
this.addPlugin({
|
|
68
68
|
src: path.resolve(__dirname, "../templates/store.js"),
|
|
69
69
|
fileName: "store/druxt-router.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "druxt-router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Drupal router for Nuxt, powered by the Drupal Decoupled Router module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"templates"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"druxt": "^0.
|
|
45
|
+
"druxt": "^0.20.0",
|
|
46
46
|
"url-parse": "^1.5.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import DruxtRouter from 'druxt-router/dist/components/DruxtRouter.vue'
|
|
2
|
+
import DruxtModule from 'druxt/dist/components/DruxtModule.vue'
|
|
3
|
+
|
|
4
|
+
DruxtRouter.__docgenInfo.props = [
|
|
5
|
+
...DruxtModule.__docgenInfo.props,
|
|
6
|
+
...DruxtRouter.__docgenInfo.props,
|
|
7
|
+
].sort((a, b) => a.name < b.name ? -1 : 1).filter((o) => o.name !== 'v-model')
|
|
2
8
|
|
|
3
9
|
export default {
|
|
4
10
|
title: 'Druxt/Router/DruxtRouter',
|
|
@@ -40,7 +46,9 @@ export const Wrapper = (args, { argTypes }) => ({
|
|
|
40
46
|
})
|
|
41
47
|
Wrapper.parameters = {
|
|
42
48
|
docs: {
|
|
43
|
-
|
|
49
|
+
description: {
|
|
50
|
+
story: 'The DruxtRouter component can be themed by using a Druxt Wrapper component.\n\nCreate an appropriately named component, using the relevant component option, with the following boilerplate:\n\n```jsx\n' + code + '\n```',
|
|
51
|
+
},
|
|
44
52
|
source: { code }
|
|
45
53
|
}
|
|
46
54
|
}
|
|
@@ -59,7 +67,9 @@ export const TemplateInjection = (args, { argTypes }) => ({
|
|
|
59
67
|
})
|
|
60
68
|
TemplateInjection.parameters = {
|
|
61
69
|
docs: {
|
|
62
|
-
|
|
70
|
+
description: {
|
|
71
|
+
story: 'The DruxtRouter component can be themed by injecting the default template into the compomnent.\n\n```jsx\n' + code + '\n```',
|
|
72
|
+
},
|
|
63
73
|
source: { code }
|
|
64
74
|
}
|
|
65
75
|
}
|