@dpapejs/dpvue-ui
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var e={d:function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e&&"string"==typeof e.className&&e.className.indexOf(t)>=0)return e;for(var n=null,i=e.parentNode;i&&9!==i.nodeType;){if(i.className.indexOf(t)>=0){n=i;break}i=i.parentNode}return n}function o(e,t,n,i,r,o,a,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}e.r(t),e.d(t,{default:function(){return f}});var a=o({name:"dpCheckbox",props:{value:{type:[Array,Boolean],default:!1},disabled:{type:Boolean,default:!1},groups:{type:[Array],default:void 0},max:{type:Number,default:void 0},checkAll:{type:Boolean,default:!1},half:{type:Boolean,default:!1}},watch:{checkAll:function(e){this.setCheckAll(e)}},created:function(){this.init()},methods:{init:function(){this.setCheckAll(this.checkAll)},setCheckAll:function(e){if(this.groups&&this.groups instanceof Array){var t=this.groups.map((function(e){return"string"==typeof e?e:e.value||e.name}));this.$emit("input",e?t:[])}},getDisabledStatus:function(e,t){return this.disabled||t||this.max&&!this.value.includes(e)&&this.value.length>=this.max}},render:function(e){var t=this;return e("div",{class:"dp-checkbox"},[this.groups?this.groups.map((function(n,i){var r="string"==typeof n?{name:n,value:n}:n,o=r.name,a=r.value,s=r.disabled,l=t.value;if(l instanceof Array)return e("label",{key:i,class:["dp-checkbox--item",{active:l.includes(a),disabled:t.getDisabledStatus(a,s)}],on:{click:function(){if(!t.getDisabledStatus(a,s)){var e=l.indexOf(a);e>=0?l.splice(e,1):l.push(a),t.$emit("update:checkAll",l.length===t.groups.length),t.$emit("input",l),t.$emit("change",l)}}}},[e("span",{class:["dp-checkbox__input",t.half?"is-half":"is-checkbox"]}),o?e("span",{class:"dp-checkbox__text"},[o]):void 0])})):e("label",{class:["dp-checkbox--item",{active:this.value,disabled:this.disabled}],on:{click:function(){if(!t.disabled){var e=!t.value;t.$emit("input",e),t.$emit("change",e)}}}},[e("span",{class:["dp-checkbox__input",this.half?"is-half":"is-checkbox"]}),this.$slots.default?e("span",{class:"dp-checkbox__text"},[this.$slots.default]):void 0])])}},undefined,undefined,!1,null,null,null);a.options.__file="src/modules/checkbox/index.vue";var s=a.exports,l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=n.children,o=[];return t.forEach((function(t){t.id&&o.push(t.id);var a=t[r];a&&o.push.apply(o,i(e(a,n)))})),o},c={name:"dpTree",props:{value:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}},choose:{type:Boolean,default:!1},propConfig:{type:Object,default:function(){return{label:"label",children:"children"}}}},components:{Checkbox:s},data:function(){return{openLevel:[]}},methods:{setChangeNode:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[],i=this.propConfig.children,r=function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.forEach((function(r){var o=r.id,a=r[i];a&&0!==a.length&&(n.push({value:l(a,e.propConfig),key:o}),t(a))}))};r(this.options),n.reverse().forEach((function(e){var n=e.key,i=e.value;if(0!==t.filter((function(e){return i.includes(e)})).length)!t.includes(n)&&t.push(n);else{var r=t.indexOf(n);r>=0&&t.splice(r,1)}})),this.$emit("input",t)},chooseNode:function(e){var t=e.disabled,n=e.id,r=e[this.propConfig.children];if(!t&&void 0!==n){var o=this.value.indexOf(n),a=l(r,this.propConfig);if(o<0)this.setChangeNode([].concat(i(this.value),[n],i(a)));else{var s=[n].concat(i(a));this.setChangeNode(this.value.filter((function(e){return!s.includes(e)})))}}},getCheckStatus:function(e){return void 0!==this.value.find((function(t){return t===e}))},setShowChildren:function(e){var t=this.openLevel,n=t.indexOf(e);n>=0?t.splice(n,1):t.push(e),this.openLevel=t},getHalfStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return!1;var t=l(e,this.propConfig),n=this.value.filter((function(e){return t.includes(e)}));return t=Array.from(new Set(t)),0!==(n=Array.from(new Set(n))).length&&n.length!==t.length}},render:function(e){var t=this,n=function n(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=t.propConfig,l=a.label,c=a.children,u=i.id,d=i.disabled,f=i[l],h=i[c],p=24,v=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0;return t.forEach((function(t){n+=24,t[c]&&(n+=e(t[c]))})),n};return p+=v(h),e("div",{class:"dp-tree--item"},[e("div",{class:"dp-tree__node",on:{click:function(e){r(e.target,"dp-tree--checkbox")||(e&&e.preventDefault(),h&&t.setShowChildren(u))}},style:{paddingLeft:"".concat(18*o,"px")}},[e("i",{class:["dp-icon-md-arrow-dropright",{"no-children":!h||0===h.length},{open:h&&h.length&&t.openLevel.indexOf(u)>=0}]}),t.choose?e("span",{class:"dp-tree--checkbox",on:{click:t.chooseNode.bind(t,i)}},[e(s,{attrs:{value:t.getHalfStatus(h)||t.getCheckStatus(u),disabled:d,half:t.getHalfStatus(h)}})]):void 0,e("span",[f])]),h&&e("transition",{attrs:{name:"dp-tree__fade"}},[e("div",{class:"dp-tree--gloup",style:p?{maxHeight:"".concat(p,"px")}:{},directives:[{name:"show",value:t.openLevel.indexOf(u)>=0}]},[h.map((function(e){return n(e,o+1)}))])])])};return e("div",{class:"dp-tree"},[this.options.map((function(e){return n(e)}))])}},u=o(c,undefined,undefined,!1,null,null,null);u.options.__file="src/modules/tree/index.vue";var d=u.exports;d.install=function(e){e.component(d.name,d)};var f=d;module.exports=t}(); | ||
!function(){"use strict";var e={d:function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e&&"string"==typeof e.className&&e.className.indexOf(t)>=0)return e;for(var n=null,i=e.parentNode;i&&9!==i.nodeType;){if(i.className.indexOf(t)>=0){n=i;break}i=i.parentNode}return n}function o(e,t,n,i,r,o,a,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}e.r(t),e.d(t,{default:function(){return f}});var a=o({name:"dpCheckbox",props:{value:{type:[Array,Boolean],default:!1},disabled:{type:Boolean,default:!1},groups:{type:[Array],default:void 0},max:{type:Number,default:void 0},checkAll:{type:Boolean,default:!1},half:{type:Boolean,default:!1}},watch:{checkAll:function(e){this.setCheckAll(e)}},created:function(){this.init()},methods:{init:function(){this.setCheckAll(this.checkAll)},setCheckAll:function(e){if(this.groups&&this.groups instanceof Array){var t=this.groups.map((function(e){return"string"==typeof e?e:e.value||e.name}));this.$emit("input",e?t:[])}},getDisabledStatus:function(e,t){return this.disabled||t||this.max&&!this.value.includes(e)&&this.value.length>=this.max}},render:function(e){var t=this;return e("div",{class:"dp-checkbox"},[this.groups?this.groups.map((function(n,i){var r="string"==typeof n?{name:n,value:n}:n,o=r.name,a=r.value,s=r.disabled,l=t.value;if(l instanceof Array)return e("label",{key:i,class:["dp-checkbox--item",{active:l.includes(a),disabled:t.getDisabledStatus(a,s)}],on:{click:function(){if(!t.getDisabledStatus(a,s)){var e=l.indexOf(a);e>=0?l.splice(e,1):l.push(a),t.$emit("update:checkAll",l.length===t.groups.length),t.$emit("input",l),t.$emit("change",l)}}}},[e("span",{class:["dp-checkbox__input",t.half?"is-half":"is-checkbox"]}),o?e("span",{class:"dp-checkbox__text"},[o]):void 0])})):e("label",{class:["dp-checkbox--item",{active:this.value,disabled:this.disabled}],on:{click:function(){if(!t.disabled){var e=!t.value;t.$emit("input",e),t.$emit("change",e)}}}},[e("span",{class:["dp-checkbox__input",this.half?"is-half":"is-checkbox"]}),this.$slots.default?e("span",{class:"dp-checkbox__text"},[this.$slots.default]):void 0])])}},undefined,undefined,!1,null,null,null);a.options.__file="src/modules/checkbox/index.vue";var s=a.exports,l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=n.children,o=[];return t.forEach((function(t){t.id&&o.push(t.id);var a=t[r]||[];a&&o.push.apply(o,i(e(a,n)))})),o},c={name:"dpTree",props:{value:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}},choose:{type:Boolean,default:!1},propConfig:{type:Object,default:function(){return{label:"label",children:"children"}}}},components:{Checkbox:s},data:function(){return{openLevel:[]}},methods:{setChangeNode:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[],i=this.propConfig.children,r=function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.forEach((function(r){var o=r.id,a=r[i]||[];a&&0!==a.length&&(n.push({value:l(a,e.propConfig),key:o}),t(a))}))};r(this.options),n.reverse().forEach((function(e){var n=e.key,i=e.value;if(0!==t.filter((function(e){return i.includes(e)})).length)!t.includes(n)&&t.push(n);else{var r=t.indexOf(n);r>=0&&t.splice(r,1)}})),this.$emit("input",t)},chooseNode:function(e){var t=e.disabled,n=e.id,r=e[this.propConfig.children]||[];if(!t&&void 0!==n){var o=this.value.indexOf(n),a=l(r,this.propConfig);if(o<0)this.setChangeNode([].concat(i(this.value),[n],i(a)));else{var s=[n].concat(i(a));this.setChangeNode(this.value.filter((function(e){return!s.includes(e)})))}}},getCheckStatus:function(e){return void 0!==this.value.find((function(t){return t===e}))},setShowChildren:function(e){var t=this.openLevel,n=t.indexOf(e);n>=0?t.splice(n,1):t.push(e),this.openLevel=t},getHalfStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return!1;var t=l(e,this.propConfig),n=this.value.filter((function(e){return t.includes(e)}));return t=Array.from(new Set(t)),0!==(n=Array.from(new Set(n))).length&&n.length!==t.length}},render:function(e){var t=this,n=function n(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=t.propConfig,l=a.label,c=a.children,u=i.id,d=i.disabled,f=i[l],h=i[c]||[],p=24,v=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0;return t.forEach((function(t){n+=24,t[c]&&(n+=e(t[c]))})),n};return p+=v(h),e("div",{class:"dp-tree--item"},[e("div",{class:"dp-tree__node",on:{click:function(e){r(e.target,"dp-tree--checkbox")||(e&&e.preventDefault(),h&&t.setShowChildren(u))}},style:{paddingLeft:"".concat(18*o,"px")}},[e("i",{class:["dp-icon-md-arrow-dropright",{"no-children":!h||0===h.length},{open:h&&h.length&&t.openLevel.indexOf(u)>=0}]}),t.choose?e("span",{class:"dp-tree--checkbox",on:{click:t.chooseNode.bind(t,i)}},[e(s,{attrs:{value:t.getHalfStatus(h)||t.getCheckStatus(u),disabled:d,half:t.getHalfStatus(h)}})]):void 0,e("span",[f])]),h&&e("transition",{attrs:{name:"dp-tree__fade"}},[e("div",{class:"dp-tree--gloup",style:p?{maxHeight:"".concat(p,"px")}:{},directives:[{name:"show",value:t.openLevel.indexOf(u)>=0}]},[h.map((function(e){return n(e,o+1)}))])])])};return e("div",{class:"dp-tree"},[this.options.map((function(e){return n(e)}))])}},u=o(c,undefined,undefined,!1,null,null,null);u.options.__file="src/modules/tree/index.vue";var d=u.exports;d.install=function(e){e.component(d.name,d)};var f=d;module.exports=t}(); |
{ | ||
"name": "@dpapejs/dpvue-ui", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "A Component Library for VueJs2.x", | ||
@@ -5,0 +5,0 @@ "main": "es/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
501177
129
414