diff --git a/dist/vue-tree-navigation.js b/dist/vue-tree-navigation.js index 19843a3..f07b7f1 100644 --- a/dist/vue-tree-navigation.js +++ b/dist/vue-tree-navigation.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueTreeNavigation=t():e.VueTreeNavigation=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t,n){"use strict";function r(e,t,n,r,i,a,o,s){var u=typeof(e=e||{}).default;"object"!==u&&"function"!==u||(e=e.default);var p,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),a&&(l._scopeId=a),o?(p=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=p):i&&(p=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),p)if(l.functional){l._injectStyles=p;var c=l.render;l.render=function(e,t){return p.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,p):[p]}return{exports:e,options:l}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(i=0;ili:not(:first-child){display:none}",""])},function(e,t,n){var r=n(19);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n(1).default)("486a06cd",r,!0,{})},function(e,t,n){"use strict";n.r(t);var r=n(5),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,function(){return r[e]})}(a);var o=n(6),s=n(0);var u=function(e){n(20)},p=Object(s.a)(i.a,o.a,o.b,!1,u,null,null);t.default=p.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getItemMetadata=t.insertMetadataToItems=t.isItemUrlChildOfCurrentUrl=t.renderLevelAsOpen=t.generateLevel=void 0;var r=s(n(21)),i=s(n(10)),a=n(9),o=n(13);function s(e){return e&&e.__esModule?e:{default:e}}t.generateLevel=function e(t,n,a,o){var s=[];return n.forEach(function(n){if(n.hasOwnProperty("children")){var p=t(r.default,{props:{level:a,open:u(n,a,o),parentItem:n}},[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=t)return!0;var r=(0,o.getRelativeUrl)(window.location.href,window.location.origin);if(!0===p(e,r))return!0;for(var i=0;in.parts.length&&(i.parts.length=n.parts.length)}else{var o=[];for(r=0;r=t)return!0;var i=(0,a.getRelativeUrl)(window.location.href,window.location.origin);if(""!==e.meta.target&&!0===(0,a.startsWithUrl)(i,e.meta.target))return!0;for(var r=0;r\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of \n","\n\n\n\n\n","\n\n\n\n\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{staticClass:\"NavigationLevel\",class:_vm.classes},[_c('li',[_c('NavigationToggle',{attrs:{\"open\":_vm.isOpen},nativeOn:{\"click\":function($event){return _vm.onToggleClick($event)}}}),_vm._v(\" \"),_c('NavigationItem',{attrs:{\"item\":_vm.parentItem},nativeOn:{\"click\":function($event){return _vm.onItemClick($event)}}})],1),_vm._v(\" \"),_vm._t(\"default\")],2)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"NavigationItem\",class:_vm.classes},[(_vm.showText)?_c('span',[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showHyperLink)?_c('a',{attrs:{\"href\":_vm.item.meta.path}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showExternalHyperLink)?_c('a',{attrs:{\"href\":_vm.item.meta.path,\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showRouterLink)?_c('router-link',{staticClass:\"router-link\",attrs:{\"to\":_vm.item.meta.path}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e()],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"NavigationToggle\",class:{ 'NavigationToggle--closed': !this.open }},[_c('span',{staticClass:\"NavigationToggle__icon\",class:{ 'NavigationToggle__icon--closed': !this.open }})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","export const PATH_TYPE_NONE = 'none';\nexport const PATH_TYPE_ELEMENT = 'element';\nexport const PATH_TYPE_ROUTE = 'route';\nexport const PATH_TYPE_EXTERNAL = 'external';\n","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NavigationItem.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavigationItem.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavigationItem.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-e1c1fed6\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./NavigationItem.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".TreeNavigation{display:inline-block;padding:0;margin:0}.TreeNavigation ul{padding:0;margin:0;list-style-type:none}.TreeNavigation ul ul li:not(:first-child){padding-left:20px}\", \"\"]);\n\n// exports\n","// style-loader: Adds some css to the DOM by adding a \n","\n\n\n\n\n","\n\n\n\n\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"NavigationLevel\",class:_vm.classes},[_c('div',{staticClass:\"NavigationLevel__parent\"},[_c('NavigationToggle',{attrs:{\"open\":_vm.isOpen},nativeOn:{\"click\":function($event){return _vm.onToggleClick($event)}}}),_vm._v(\" \"),_c('NavigationItem',{attrs:{\"item\":_vm.parentItem},nativeOn:{\"click\":function($event){return _vm.onItemClick($event)}}})],1),_vm._v(\" \"),_c('ul',{staticClass:\"NavigationLevel__children\"},[_vm._t(\"default\")],2)])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"NavigationItem\",class:_vm.classes},[(_vm.showLabel)?_c('span',{staticClass:\"NavigationItem__label\"},[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showRouterLink)?_c('router-link',{staticClass:\"NavigationItem__router-link\",attrs:{\"to\":_vm.item.meta.target}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showHyperLink)?_c('a',{staticClass:\"NavigationItem__link\",attrs:{\"href\":_vm.item.meta.target}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e(),_vm._v(\" \"),(_vm.showExternalHyperLink)?_c('a',{staticClass:\"NavigationItem__external-link\",attrs:{\"href\":_vm.item.meta.target,\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.item.name))]):_vm._e()],1)}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:\"NavigationToggle\",class:{ 'NavigationToggle--closed': !this.open }},[_c('span',{staticClass:\"NavigationToggle__icon\",class:{ 'NavigationToggle__icon--closed': !this.open }})])}\nvar staticRenderFns = []\nexport { render, staticRenderFns }","function injectStyle (context) {\n require(\"!!vue-style-loader!css-loader!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"optionsId\\\":\\\"0\\\",\\\"vue\\\":true,\\\"scoped\\\":false,\\\"sourceMap\\\":false}!sass-loader!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NavigationItem.vue\")\n}\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavigationItem.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./NavigationItem.vue\"\n/* template */\nimport {render as __vue_render__, staticRenderFns as __vue_static_render_fns__} from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7412a8ac\\\",\\\"hasScoped\\\":false,\\\"optionsId\\\":\\\"0\\\",\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./NavigationItem.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nimport normalizeComponent from \"!../../../node_modules/vue-loader/lib/runtime/component-normalizer\"\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_render__,\n __vue_static_render_fns__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".TreeNavigation{display:inline-block;padding:0;margin:0}.TreeNavigation ul{padding:0;margin:0;list-style-type:none}.TreeNavigation li{padding-left:20px}\", \"\"]);\n\n// exports\n","// style-loader: Adds some css to the DOM by adding a