Commit ac6044d7 authored by Tobias Pierschel's avatar Tobias Pierschel
Browse files

Merge branch '38699-manual' into '4.0'

38699 - Add manual & store infos

Closes #1

See merge request !2
parents fb7a2fea 08d1c20d
.idea
node_modules
/.build/plugins/
/.build/tmp/
/.build/update/
/*.zip
/dist
/manual/docs/.vuepress/dist
/manual/docs/.vuepress/public/manual.css
/src/Resources/app/storefront/dist
/src/Resources/app/storefront/src/plugins/*/dist
/src/Resources/app/storefront/src/plugins/*/node_modules
/src/Resources/public/administration/css/*.css
/src/Resources/public/administration/js/*.js
/src/Resources/store/de.md
/src/Resources/store/en.md
/templates*
# 4.0.0
- [#38671] Erste Veröffentlichung
# 4.0.0
- [#38671] Initial release
......@@ -16,17 +16,39 @@
"minimum-stability": "RC",
"extra": {
"shopware-plugin-class": "NetInventors\\NetiNextToolKit\\NetiNextToolKit",
"plugin-icon": "src/Resources/config/plugin.png",
"label": {
"de-DE": "ToolKit",
"en-GB": "ToolKit"
"de-DE": "Smarte Tools für Shopware - ToolKit",
"en-GB": "Smart Tools for Shopware - Toolkit"
},
"description": {
"de-DE": "",
"en-GB": ""
"de-DE": "Nützliche Helfer für Shopware.",
"en-GB": "Useful helpers for Shopware."
},
"manufacturerLink": {
"de-DE": "https://www.netinventors.de/",
"en-GB": "https://www.netinventors.de/"
},
"supportLink": {
"de-DE": "https://support.netinventors.de/hc/",
"en-GB": "https://support.netinventors.de/hc/"
},
"netinventors": {
"package-mapping": false,
"links": {
"report-bug": {
"de-DE": "https://support.netinventors.de/hc/de/requests/new",
"en-GB": "https://support.netinventors.de/hc/en/requests/new"
},
"gitlab": {
"de-DE": "https://gitlab.netinventors.de/shopware6/plugins/NetiNextToolKit",
"en-GB": "https://gitlab.netinventors.de/shopware6/plugins/NetiNextToolKit"
},
"buy-now": {
"de-DE": "",
"en-GB": ""
}
}
}
},
"autoload": {
......
# Installation
```shell
npm install
```
# Development
## Prerequisites
* Checkout ~~https://gitlab.netinventors.de/shopware6/plugins/cdn~~ https://gitlab.netinventors.de/cdn/vue-press separately
* Remember the path to the checked out project above as `PATH_TO_CDN_PROJECT`
* Start development npm script from `PATH_TO_CDN_PROJECT`
```sh
cd PATH_TO_CDN_PROJECT
npm install
npm run css:dev
```
* Create a link to PATH_TO_CDN_PROJECT/dist/css/manual.css to PROJECT_ROOT/manual/docs/.vuepress/public/manual.css
```sh
ln -s PATH_TO_CDN_PROJECT/dist/css/manual.css PROJECT_ROOT/manual/docs/.vuepress/public/manual.css
```
## Start developing
```shell
npm run docs:dev
```
# Build
```shell
npm run docs:build
```
# Important notices
* Included files have to begin with `inc.` e.g. `inc.description.md`.
const path = require('path');
const localesConfig = require('./locales');
const composerJson = require('../../../composer.json');
const locales = {};
const sidebar = {};
const stylesheetSource = 'production' === process.env.NODE_ENV
? 'https://cdn.io.netinventors.de/vue-press/css/manual.min.css'
: '/manual.css';
const base = process.env.CI_PAGES_URL
? new URL(process.env.CI_PAGES_URL).pathname
: '';
const extraWatchFiles = [
path.resolve(__dirname, 'public/manual.css'),
];
localesConfig.forEach(locale => {
const langPath = `/${locale.lang}/`;
locales[langPath] = { lang: locale.locale };
sidebar[langPath] = require(`./nav/${locale.lang}/sidebar`);
extraWatchFiles.push(
path.resolve(__dirname, 'nav', locale.lang, '*.js')
);
});
const plugin = (() => {
const name = composerJson.extra['shopware-plugin-class'].substring(
composerJson.extra['shopware-plugin-class'].lastIndexOf('\\') + 1
);
const version = composerJson.version;
return {
name,
version,
};
})();
module.exports = {
base: `${base}/`,
locales,
title: `${plugin.name}`,
head: [
[
'link',
{
rel: 'preload',
href: stylesheetSource,
as: 'style'
},
], [
'link',
{
rel: 'stylesheet',
href: stylesheetSource,
},
],
],
themeConfig: {
logo: '/logo.svg',
sidebar: 'auto',
locales: sidebar,
},
plugins: [
'@vuepress/active-header-links',
[ '@vuepress/medium-zoom', { selector: 'main :not(a) > img' } ],
[ '@vuepress/back-to-top', true ],
],
markdown: {
lineNumbers: true,
plugins: [
[ 'markdown-it-include' ],
],
},
patterns: [
'**/!(inc.)*.md',
'**/*.vue',
],
extraWatchFiles: [
...extraWatchFiles
],
configureWebpack: (config, isServer) => {},
chainWebpack: (config, isServer) => {},
};
import localesConfig from './locales';
export default ({ router }) => {
const defaultLang = localesConfig.find(lang => lang.default) || localesConfig[0];
router.onReady(() => {
if ('/' === router.currentRoute.path) {
router.push(`/${defaultLang.lang}/`);
}
});
}
\ No newline at end of file
module.exports = [
{
default: true,
lang: 'en',
locale: 'en-GB',
}, {
lang: 'de',
locale: 'de-DE',
},
];
\ No newline at end of file
const composerJson = require(require('path').resolve(__dirname, '../../../../..', 'composer.json'));
const get = require('lodash/get');
const reportBug = get(composerJson, 'extra.netinventors.links.report-bug.de-DE');
const gitlab = get(composerJson, 'extra.netinventors.links.gitlab.de-DE');
const buyNow = get(composerJson, 'extra.netinventors.links.buy-now.de-DE');
module.exports = [
{
text: 'Jetzt starten',
items: [
{
text: 'Installation',
link: '/de/installation/',
}, {
text: 'Update',
link: '/de/update/',
}, {
text: 'Konfiguration',
link: '/de/configuration/',
}, {
text: 'FAQ',
link: '/de/faq/',
},
],
}, {
text: 'Changelog',
link: '/de/changelog/',
}, {
text: 'Mitwirken',
items: [
{
text: 'Fehler melden',
link: reportBug,
}, {
text: 'GitLab',
link: gitlab,
},
],
}, {
text: 'Jetzt kaufen',
link: buyNow,
},
];
module.exports = {
label: 'Deutsch',
selectText: 'Sprache',
ariaLabel: 'Wähle eine Sprache',
nav: require('./main'),
sidebar: [
{
title: 'Installation',
path: '/de/installation/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'Update',
path: '/de/update/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'Konfiguration',
path: '/de/configuration/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'FAQ',
path: '/de/faq/',
collapsable: true,
sidebarDepth: 1,
children: [],
},
],
};
const composerJson = require(require('path').resolve(__dirname, '../../../../..', 'composer.json'));
const get = require('lodash/get');
const reportBug = get(composerJson, 'extra.netinventors.links.report-bug.en-GB');
const gitlab = get(composerJson, 'extra.netinventors.links.gitlab.en-GB');
const buyNow = get(composerJson, 'extra.netinventors.links.buy-now.en-GB');
module.exports = [
{
text: 'Get started',
items: [
{
text: 'Installation',
link: '/en/installation/',
}, {
text: 'Update',
link: '/en/update/',
}, {
text: 'Configuration',
link: '/en/configuration/',
}, {
text: 'FAQ',
link: '/en/faq/',
},
],
}, {
text: 'Changelog',
link: '/en/changelog/',
}, {
text: 'Contribute',
items: [
{
text: 'Report a bug',
link: reportBug,
}, {
text: 'GitLab',
link: gitlab,
},
],
}, {
text: 'Buy now',
link: buyNow,
},
];
module.exports = {
label: 'English',
selectText: 'Language',
ariaLabel: 'Select language',
nav: require('./main'),
sidebar: [
{
title: 'Installation',
path: '/en/installation/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'Update',
path: '/en/update/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'Configuration',
path: '/en/configuration/',
collapsable: false,
sidebarDepth: 1,
children: [],
}, {
title: 'FAQ',
path: '/en/faq/',
collapsable: true,
sidebarDepth: 1,
children: [],
},
],
};
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="243pt" height="43pt" viewBox="0 0 243 43" version="1.1">
<defs>
<clipPath id="clip1">
<path d="M 0 10 L 242.785156 10 L 242.785156 32 L 0 32 Z M 0 10 "/>
</clipPath>
<clipPath id="clip2">
<path d="M 46 0.0390625 L 80 0.0390625 L 80 43 L 46 43 Z M 46 0.0390625 "/>
</clipPath>
</defs>
<g id="surface1">
<g clip-path="url(#clip1)" clip-rule="nonzero">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 229.421875 27.191406 L 228.054688 29.34375 C 229.132812 30.1875 230.285156 30.828125 231.503906 31.261719 C 232.726562 31.691406 234.015625 31.90625 235.378906 31.90625 C 236.058594 31.90625 236.714844 31.851562 237.347656 31.742188 C 237.980469 31.632812 238.570312 31.460938 239.121094 31.234375 C 239.667969 31.003906 240.167969 30.722656 240.617188 30.382812 C 241.066406 30.042969 241.453125 29.648438 241.773438 29.195312 C 242.097656 28.742188 242.34375 28.230469 242.523438 27.660156 C 242.699219 27.089844 242.785156 26.464844 242.785156 25.78125 C 242.785156 25.023438 242.683594 24.367188 242.472656 23.8125 C 242.261719 23.257812 241.980469 22.777344 241.621094 22.371094 C 241.265625 21.96875 240.847656 21.625 240.367188 21.339844 C 239.886719 21.058594 239.378906 20.816406 238.839844 20.613281 C 238.304688 20.40625 237.75 20.230469 237.179688 20.078125 C 236.609375 19.925781 236.054688 19.769531 235.519531 19.613281 C 234.980469 19.457031 234.472656 19.289062 233.992188 19.113281 C 233.511719 18.9375 233.09375 18.71875 232.738281 18.460938 C 232.382812 18.203125 232.097656 17.898438 231.886719 17.542969 C 231.675781 17.1875 231.570312 16.757812 231.570312 16.246094 C 231.570312 15.714844 231.6875 15.246094 231.917969 14.847656 C 232.148438 14.449219 232.460938 14.113281 232.851562 13.847656 C 233.238281 13.582031 233.6875 13.382812 234.195312 13.25 C 234.703125 13.117188 235.234375 13.050781 235.785156 13.050781 C 236.222656 13.050781 236.679688 13.09375 237.15625 13.171875 C 237.632812 13.253906 238.105469 13.371094 238.574219 13.519531 C 239.042969 13.671875 239.492188 13.855469 239.925781 14.074219 C 240.355469 14.292969 240.742188 14.535156 241.085938 14.808594 L 242.4375 12.703125 C 241.96875 12.335938 241.460938 12.011719 240.914062 11.734375 C 240.367188 11.453125 239.804688 11.21875 239.21875 11.03125 C 238.632812 10.84375 238.039062 10.699219 237.433594 10.597656 C 236.824219 10.5 236.226562 10.449219 235.632812 10.449219 C 234.652344 10.449219 233.738281 10.582031 232.890625 10.847656 C 232.042969 11.109375 231.304688 11.5 230.679688 12.011719 C 230.058594 12.527344 229.566406 13.15625 229.203125 13.90625 C 228.84375 14.65625 228.664062 15.519531 228.664062 16.488281 C 228.664062 17.234375 228.769531 17.878906 228.976562 18.425781 C 229.183594 18.972656 229.464844 19.445312 229.824219 19.84375 C 230.1875 20.242188 230.601562 20.582031 231.078125 20.859375 C 231.550781 21.140625 232.058594 21.382812 232.59375 21.585938 C 233.132812 21.789062 233.683594 21.96875 234.25 22.125 C 234.816406 22.28125 235.367188 22.4375 235.90625 22.597656 C 236.441406 22.757812 236.949219 22.929688 237.421875 23.113281 C 237.898438 23.300781 238.3125 23.527344 238.675781 23.789062 C 239.035156 24.054688 239.316406 24.367188 239.523438 24.734375 C 239.730469 25.101562 239.835938 25.542969 239.835938 26.058594 C 239.835938 26.632812 239.710938 27.125 239.457031 27.53125 C 239.203125 27.933594 238.867188 28.265625 238.445312 28.523438 C 238.019531 28.78125 237.535156 28.972656 236.984375 29.089844 C 236.4375 29.210938 235.867188 29.269531 235.28125 29.269531 C 234.21875 29.269531 233.1875 29.09375 232.191406 28.734375 C 231.195312 28.378906 230.273438 27.863281 229.421875 27.191406 Z M 213.226562 20.964844 L 213.226562 13.347656 L 217.238281 13.347656 C 217.910156 13.347656 218.527344 13.429688 219.082031 13.59375 C 219.636719 13.753906 220.113281 13.992188 220.511719 14.3125 C 220.910156 14.632812 221.222656 15.03125 221.441406 15.507812 C 221.664062 15.984375 221.777344 16.542969 221.777344 17.179688 C 221.777344 17.785156 221.671875 18.324219 221.464844 18.792969 C 221.257812 19.261719 220.960938 19.65625 220.574219 19.976562 C 220.1875 20.296875 219.710938 20.542969 219.148438 20.710938 C 218.585938 20.878906 217.949219 20.964844 217.238281 20.964844 Z M 210.316406 31.609375 L 213.226562 31.609375 L 213.226562 23.566406 L 217.167969 23.566406 L 221.847656 31.609375 L 225.359375 31.609375 L 220.253906 23.214844 C 220.957031 22.996094 221.585938 22.695312 222.136719 22.308594 C 222.6875 21.921875 223.15625 21.464844 223.546875 20.941406 C 223.933594 20.414062 224.226562 19.832031 224.433594 19.1875 C 224.636719 18.539062 224.738281 17.851562 224.738281 17.121094 C 224.738281 16.207031 224.578125 15.363281 224.261719 14.585938 C 223.941406 13.808594 223.484375 13.136719 222.882812 12.566406 C 222.28125 11.996094 221.550781 11.550781 220.6875 11.230469 C 219.824219 10.90625 218.84375 10.746094 217.742188 10.746094 L 210.316406 10.746094 Z M 192.910156 29.011719 C 192.253906 28.824219 191.644531 28.558594 191.082031 28.21875 C 190.515625 27.875 190.007812 27.460938 189.554688 26.976562 C 189.101562 26.488281 188.714844 25.945312 188.398438 25.34375 C 188.078125 24.738281 187.835938 24.089844 187.664062 23.390625 C 187.492188 22.691406 187.40625 21.953125 187.40625 21.179688 C 187.40625 20.40625 187.496094 19.667969 187.667969 18.964844 C 187.84375 18.261719 188.089844 17.613281 188.40625 17.011719 C 188.726562 16.410156 189.109375 15.867188 189.5625 15.382812 C 190.015625 14.898438 190.527344 14.484375 191.089844 14.144531 C 191.652344 13.804688 192.265625 13.542969 192.921875 13.359375 C 193.578125 13.171875 194.269531 13.078125 194.996094 13.078125 C 195.722656 13.078125 196.414062 13.171875 197.070312 13.359375 C 197.726562 13.542969 198.335938 13.808594 198.898438 14.148438 C 199.460938 14.492188 199.964844 14.90625 200.417969 15.386719 C 200.871094 15.871094 201.257812 16.410156 201.578125 17.011719 C 201.902344 17.613281 202.148438 18.261719 202.316406 18.964844 C 202.488281 19.667969 202.574219 20.40625 202.574219 21.179688 C 202.574219 21.953125 202.488281 22.691406 202.316406 23.390625 C 202.148438 24.089844 201.902344 24.738281 201.585938 25.339844 C 201.265625 25.9375 200.882812 26.480469 200.429688 26.96875 C 199.976562 27.453125 199.46875 27.867188 198.90625 28.214844 C 198.347656 28.558594 197.738281 28.824219 197.078125 29.011719 C 196.421875 29.195312 195.726562 29.289062 194.996094 29.289062 C 194.265625 29.289062 193.570312 29.195312 192.910156 29.011719 Z M 197.882812 31.535156 C 198.796875 31.285156 199.644531 30.933594 200.433594 30.476562 C 201.21875 30.019531 201.929688 29.472656 202.566406 28.828125 C 203.203125 28.179688 203.746094 27.460938 204.195312 26.660156 C 204.644531 25.863281 204.992188 25 205.234375 24.070312 C 205.476562 23.140625 205.597656 22.164062 205.597656 21.144531 C 205.597656 20.121094 205.476562 19.152344 205.234375 18.222656 C 204.992188 17.296875 204.644531 16.4375 204.195312 15.644531 C 203.746094 14.851562 203.203125 14.136719 202.566406 13.496094 C 201.929688 12.859375 201.222656 12.3125 200.441406 11.859375 C 199.660156 11.40625 198.816406 11.058594 197.902344 10.816406 C 196.992188 10.574219 196.035156 10.449219 195.039062 10.449219 C 194.046875 10.449219 193.089844 10.574219 192.175781 10.816406 C 191.257812 11.058594 190.410156 11.40625 189.621094 11.855469 C 188.835938 12.304688 188.121094 12.851562 187.480469 13.492188 C 186.839844 14.136719 186.289062 14.851562 185.839844 15.648438 C 185.386719 16.445312 185.03125 17.304688 184.785156 18.234375 C 184.535156 19.164062 184.410156 20.144531 184.410156 21.171875 C 184.410156 22.183594 184.53125 23.15625 184.777344 24.082031 C 185.019531 25.007812 185.363281 25.871094 185.8125 26.664062 C 186.257812 27.460938 186.796875 28.179688 187.429688 28.828125 C 188.0625 29.472656 188.773438 30.019531 189.558594 30.476562 C 190.347656 30.933594 191.195312 31.285156 192.109375 31.535156 C 193.027344 31.785156 193.988281 31.90625 194.996094 31.90625 C 196.003906 31.90625 196.964844 31.785156 197.882812 31.535156 Z M 182.078125 10.746094 L 166.039062 10.746094 L 166.039062 13.347656 L 172.574219 13.347656 L 172.574219 31.609375 L 175.535156 31.609375 L 175.535156 13.347656 L 182.078125 13.347656 Z M 147.6875 15.292969 L 158.164062 31.609375 L 161.421875 31.609375 L 161.421875 10.746094 L 158.625 10.746094 L 158.660156 27.164062 L 148.128906 10.746094 L 144.90625 10.746094 L 144.90625 31.609375 L 147.722656 31.609375 Z M 126.835938 31.609375 L 139.960938 31.609375 L 139.960938 29.011719 L 129.777344 29.011719 L 129.777344 22.386719 L 138.421875 22.386719 L 138.421875 19.800781 L 129.777344 19.800781 L 129.777344 13.347656 L 139.699219 13.347656 L 139.699219 10.746094 L 126.835938 10.746094 Z M 108.230469 10.746094 L 105.046875 10.746094 L 112.246094 31.609375 L 115.019531 31.609375 L 122.246094 10.746094 L 119.203125 10.746094 L 113.703125 27.34375 Z M 86.710938 15.292969 L 97.1875 31.609375 L 100.445312 31.609375 L 100.445312 10.746094 L 97.644531 10.746094 L 97.683594 27.164062 L 87.152344 10.746094 L 83.929688 10.746094 L 83.929688 31.609375 L 86.746094 31.609375 Z M 75.613281 31.609375 L 78.566406 31.609375 L 78.566406 10.746094 L 75.613281 10.746094 Z M 54.792969 10.746094 L 38.753906 10.746094 L 38.753906 13.347656 L 45.289062 13.347656 L 45.289062 31.609375 L 48.25 31.609375 L 48.25 13.347656 L 54.792969 13.347656 Z M 21.582031 31.609375 L 34.703125 31.609375 L 34.703125 29.011719 L 24.523438 29.011719 L 24.523438 22.386719 L 33.164062 22.386719 L 33.164062 19.800781 L 24.523438 19.800781 L 24.523438 13.347656 L 34.441406 13.347656 L 34.441406 10.746094 L 21.582031 10.746094 Z M 2.78125 15.292969 L 13.257812 31.609375 L 16.515625 31.609375 L 16.515625 10.746094 L 13.71875 10.746094 L 13.753906 27.164062 L 3.222656 10.746094 L 0 10.746094 L 0 31.609375 L 2.816406 31.609375 L 2.78125 15.292969 "/>
</g>
<g clip-path="url(#clip2)" clip-rule="nonzero">
<path style="fill:none;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(100%,100%,100%);stroke-opacity:1;stroke-miterlimit:4;" d="M 735.15625 427.695312 L 574.648438 41.367188 M 679.140625 388.242188 L 518.632812 1.914062 " transform="matrix(0.1,0,0,-0.1,0,43)"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="12" height="13"><g stroke-width="2" stroke="#000" fill="none"><path d="M11.29 11.71l-4-4"/><circle cx="5" cy="5" r="4"/></g></svg>
<template>
<form
id="search-form"
class="algolia-search-wrapper search-box"
role="search"
>
<input
id="algolia-search-input"
class="search-query"
:placeholder="placeholder"
>
</form>
</template>
<script>
export default {
name: 'AlgoliaSearchBox',
props: [ 'options' ],
data() {
return {
placeholder: undefined,
};
},
watch: {
$lang(newValue) {
this.update(this.options, newValue);
},
options(newValue) {
this.update(newValue, this.$lang);
}
},
mounted() {
this.initialize(this.options, this.$lang);
this.placeholder = this.$site.themeConfig.searchPlaceholder || '';
},
methods: {
initialize(userOptions, lang) {
Promise.all([
import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.js'),
import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.css')
]).then(([ docsearch ]) => {
docsearch = docsearch.default;
const { algoliaOptions = {} } = userOptions;
docsearch(Object.assign(
{},
userOptions,
{
inputSelector: '#algolia-search-input',
// #697 Make docsearch work well at i18n mode.
algoliaOptions: Object.assign({
'facetFilters': [ `lang:${ lang }` ].concat(algoliaOptions.facetFilters || [])
}, algoliaOptions),
handleSelected: (input, event, suggestion) => {
const { pathname, hash } = new URL(suggestion.url);
const routepath = pathname.replace(this.$site.base, '/');
const _hash = decodeURIComponent(hash);
this.$router.push(`${ routepath }${ _hash }`);
}
}
));
});
},
update(options, lang) {
this.$el.innerHTML = '<input id="algolia-search-input" class="search-query">';
this.initialize(options, lang);
}
}
};
</script>
<template>
<div
class="dropdown-wrapper"
:class="{ open }"
>
<button
class="dropdown-title"
type="button"
:aria-label="dropdownAriaLabel"
@click="handleDropdown"
>
<span class="title">{{ item.text }}</span>
<span
class="arrow down"
/>
</button>
<button
class="mobile-dropdown-title"
type="button"
:aria-label="dropdownAriaLabel"
@click="setOpen(!open)"
>
<span class="title">{{ item.text }}</span>
<span
class="arrow"
:class="open ? 'down' : 'right'"
/>
</button>
<DropdownTransition>
<ul
v-show="open"
class="nav-dropdown"
>
<li
v-for="(subItem, index) in item.items"
:key="subItem.link || index"
class="dropdown-item"
:class="{ 'has-child': subItem.items }"
>
<NavLink
v-if="subItem.type === 'links'"
:item="subItem"
@focusout="isLastItemOfArray(subItem, item.items) && setOpen(false)"
/>
<ul
v-if="subItem.type === 'links'"
class="dropdown-subitem-wrapper"
>
<li
v-for="childSubItem in subItem.items"
:key="childSubItem.link"
class="dropdown-subitem"
>
<NavLink
:item="childSubItem"
@focusout="
isLastItemOfArray(childSubItem, subItem.items) &&
isLastItemOfArray(subItem, item.items) &&
setOpen(false)
"
/>
</li>
</ul>
<NavLink
v-else
:item="subItem"
@focusout="isLastItemOfArray(subItem, item.items) && setOpen(false)"
/>
</li>
</ul>
</DropdownTransition>
</div>
</template>
<script>
import NavLink from '@theme/components/NavLink.vue'
import DropdownTransition from '@theme/components/DropdownTransition.vue'
import last from 'lodash/last'
export default {
name: 'DropdownLink',
components: {
NavLink,
DropdownTransition
},
props: {
item: {
required: true
}
},
data () {
return {
open: false
}
},
computed: {
dropdownAriaLabel () {