@tayeh/vue-components
Advanced tools
Comparing version 1.0.8-alpha to 1.0.81-alpha
@@ -963,35 +963,40 @@ 'use strict'; | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$7 = { | ||
name: 'TyButton', | ||
name: 'TyAcardion', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
color: { | ||
height: { | ||
type: String, | ||
default: 'primary' | ||
default: 'auto' | ||
}, | ||
type: { | ||
open: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
return { | ||
current: null | ||
}; | ||
}, | ||
provide: function provide() { | ||
return { | ||
open: this.getCurrentlyOpen | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
hasHeaderSlot: function hasHeaderSlot() { | ||
return !!this.$slots['header']; | ||
}, | ||
hasFooterSlot: function hasFooterSlot() { | ||
return !!this.$slots['footer']; | ||
} | ||
@@ -1001,10 +1006,15 @@ }, | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
this.$on('TyAcardionItemOpen', function (index) { | ||
_this.current = index; | ||
}); | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
getCurrentlyOpen: function getCurrentlyOpen() { | ||
return this.current || this.open; | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
} | ||
}; | ||
@@ -1016,3 +1026,3 @@ | ||
/* template */ | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion"},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"ty-acardion__header"},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"ty-acardion__content"},[_vm._t("default",null,{"open":"1"})],2),_vm._v(" "),(_vm.hasFooterSlot)?_c('div',{staticClass:"ty-acardion__footer"},[_vm._t("footer")],2):_vm._e()])}; | ||
var __vue_staticRenderFns__$7 = []; | ||
@@ -1034,3 +1044,3 @@ | ||
var Button = normalizeComponent_1( | ||
var Acardion = normalizeComponent_1( | ||
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 }, | ||
@@ -1062,35 +1072,41 @@ __vue_inject_styles__$7, | ||
var script$8 = { | ||
name: 'TyTable', | ||
name: 'TyAcardionItem', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
label: { | ||
type: String, | ||
required: true | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
index: { | ||
type: String, | ||
required: true | ||
}, | ||
maxHeight: { | ||
type: String, | ||
default: '500px' | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
indexValue: null | ||
}; | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
computed: { | ||
active: function active() { | ||
return this.index == this.open(); | ||
} | ||
}, | ||
inject: ['open'], | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
openItem: function openItem() { | ||
// this.indexValue = this.index; | ||
// this.$emit('TyAcardionItemOpen', this.index); | ||
console.log(this.open, this.index); | ||
this.$parent.$emit('TyAcardionItemOpen', this.open() == this.index ? 'close' : this.index); | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
@@ -1104,3 +1120,3 @@ watch: {} | ||
/* template */ | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion-item"},[_c('div',{staticClass:"ty-acardion-item__header",on:{"click":_vm.openItem}},[_c('div',[_vm._v(_vm._s(_vm.label))]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__icon",class:{active: _vm.active}},[_c('i',{class:['ty-icon','ty-icon-arrow-right']})])]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__content",class:{inactive: !_vm.active},style:({maxHeight: _vm.maxHeight})},[_vm._t("default")],2)])}; | ||
var __vue_staticRenderFns__$8 = []; | ||
@@ -1122,3 +1138,3 @@ | ||
var Table = normalizeComponent_1( | ||
var AcardionItem = normalizeComponent_1( | ||
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 }, | ||
@@ -1140,22 +1156,48 @@ __vue_inject_styles__$8, | ||
// | ||
// | ||
var script$9 = { | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
name: 'TyButton', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
direction: String | ||
color: { | ||
type: String, | ||
default: 'primary' | ||
}, | ||
type: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
} | ||
} | ||
}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1167,3 +1209,3 @@ | ||
/* template */ | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$9 = []; | ||
@@ -1185,3 +1227,3 @@ | ||
var Container = normalizeComponent_1( | ||
var Button = normalizeComponent_1( | ||
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 }, | ||
@@ -1203,5 +1245,47 @@ __vue_inject_styles__$9, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$a = { | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
name: 'TyTable', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1213,3 +1297,3 @@ | ||
/* template */ | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_staticRenderFns__$a = []; | ||
@@ -1231,3 +1315,3 @@ | ||
var Main = normalizeComponent_1( | ||
var Table = normalizeComponent_1( | ||
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a }, | ||
@@ -1250,8 +1334,19 @@ __vue_inject_styles__$a, | ||
var script$b = { | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
props: { | ||
width: { | ||
type: String, | ||
default: '300px' | ||
direction: String | ||
}, | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
} | ||
@@ -1265,3 +1360,3 @@ } | ||
/* template */ | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$b = []; | ||
@@ -1283,3 +1378,3 @@ | ||
var Aside = normalizeComponent_1( | ||
var Container = normalizeComponent_1( | ||
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b }, | ||
@@ -1302,10 +1397,4 @@ __vue_inject_styles__$b, | ||
var script$c = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
}; | ||
@@ -1317,3 +1406,3 @@ | ||
/* template */ | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$c = []; | ||
@@ -1335,3 +1424,3 @@ | ||
var Header = normalizeComponent_1( | ||
var Main = normalizeComponent_1( | ||
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c }, | ||
@@ -1354,8 +1443,8 @@ __vue_inject_styles__$c, | ||
var script$d = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
props: { | ||
height: { | ||
width: { | ||
type: String, | ||
default: '60px' | ||
default: '300px' | ||
} | ||
@@ -1369,3 +1458,3 @@ } | ||
/* template */ | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$d = []; | ||
@@ -1387,3 +1476,3 @@ | ||
var Footer = normalizeComponent_1( | ||
var Aside = normalizeComponent_1( | ||
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d }, | ||
@@ -1399,2 +1488,100 @@ __vue_inject_styles__$d, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$e = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$e = script$e; | ||
/* template */ | ||
var __vue_render__$e = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$e = []; | ||
/* style */ | ||
const __vue_inject_styles__$e = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$e = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$e = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$e = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Header = normalizeComponent_1( | ||
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e }, | ||
__vue_inject_styles__$e, | ||
__vue_script__$e, | ||
__vue_scope_id__$e, | ||
__vue_is_functional_template__$e, | ||
__vue_module_identifier__$e, | ||
undefined, | ||
undefined | ||
); | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$f = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$f = script$f; | ||
/* template */ | ||
var __vue_render__$f = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$f = []; | ||
/* style */ | ||
const __vue_inject_styles__$f = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$f = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$f = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$f = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Footer = normalizeComponent_1( | ||
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f }, | ||
__vue_inject_styles__$f, | ||
__vue_script__$f, | ||
__vue_scope_id__$f, | ||
__vue_is_functional_template__$f, | ||
__vue_module_identifier__$f, | ||
undefined, | ||
undefined | ||
); | ||
var Row = { | ||
@@ -1521,4 +1708,71 @@ name: 'TyRow', | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col]; | ||
// | ||
// | ||
// | ||
var script$g = { | ||
name: 'TyIframe', | ||
props: ['src', 'width', 'height', 'scrollable'], | ||
data: function data() { | ||
return { | ||
html: null, | ||
scrolling: false | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
return new Promise(function ($return, $error) { | ||
var res; | ||
if (typeof this.scrollable == 'boolean') this.scrolling = this.scrollable; | ||
return Promise.resolve(fetch(this.src)).then(function ($await_1) { | ||
try { | ||
return Promise.resolve($await_1.json()).then(function ($await_2) { | ||
try { | ||
res = $await_2; | ||
this.$refs.frame.contentDocument.write(res.data); | ||
this.$refs.frame.style.height = this.$refs.frame.contentWindow.document.documentElement.scrollHeight + 'px'; | ||
return $return(); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
}.bind(this)); | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$g = script$g; | ||
/* template */ | ||
var __vue_render__$g = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('iframe',{ref:"frame",attrs:{"sandbox":"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms","scrolling":_vm.scrolling,"frameborder":"0","width":_vm.width,"height":_vm.height}})}; | ||
var __vue_staticRenderFns__$g = []; | ||
/* style */ | ||
const __vue_inject_styles__$g = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$g = "data-v-1dee95ea"; | ||
/* module identifier */ | ||
const __vue_module_identifier__$g = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$g = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Iframe = normalizeComponent_1( | ||
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g }, | ||
__vue_inject_styles__$g, | ||
__vue_script__$g, | ||
__vue_scope_id__$g, | ||
__vue_is_functional_template__$g, | ||
__vue_module_identifier__$g, | ||
undefined, | ||
undefined | ||
); | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col, Acardion, AcardionItem, Iframe]; | ||
var install = function install(Vue) { | ||
@@ -1552,5 +1806,8 @@ components.forEach(function (component) { | ||
Row: Row, | ||
Col: Col | ||
Col: Col, | ||
Acardion: Acardion, | ||
AcardionItem: AcardionItem, | ||
Iframe: Iframe | ||
}; | ||
module.exports = index; |
@@ -961,35 +961,40 @@ function _broadcast(componentName, eventName, params) { | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$7 = { | ||
name: 'TyButton', | ||
name: 'TyAcardion', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
color: { | ||
height: { | ||
type: String, | ||
default: 'primary' | ||
default: 'auto' | ||
}, | ||
type: { | ||
open: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
return { | ||
current: null | ||
}; | ||
}, | ||
provide: function provide() { | ||
return { | ||
open: this.getCurrentlyOpen | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
hasHeaderSlot: function hasHeaderSlot() { | ||
return !!this.$slots['header']; | ||
}, | ||
hasFooterSlot: function hasFooterSlot() { | ||
return !!this.$slots['footer']; | ||
} | ||
@@ -999,10 +1004,15 @@ }, | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
this.$on('TyAcardionItemOpen', function (index) { | ||
_this.current = index; | ||
}); | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
getCurrentlyOpen: function getCurrentlyOpen() { | ||
return this.current || this.open; | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
} | ||
}; | ||
@@ -1014,3 +1024,3 @@ | ||
/* template */ | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion"},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"ty-acardion__header"},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"ty-acardion__content"},[_vm._t("default",null,{"open":"1"})],2),_vm._v(" "),(_vm.hasFooterSlot)?_c('div',{staticClass:"ty-acardion__footer"},[_vm._t("footer")],2):_vm._e()])}; | ||
var __vue_staticRenderFns__$7 = []; | ||
@@ -1032,3 +1042,3 @@ | ||
var Button = normalizeComponent_1( | ||
var Acardion = normalizeComponent_1( | ||
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 }, | ||
@@ -1060,35 +1070,41 @@ __vue_inject_styles__$7, | ||
var script$8 = { | ||
name: 'TyTable', | ||
name: 'TyAcardionItem', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
label: { | ||
type: String, | ||
required: true | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
index: { | ||
type: String, | ||
required: true | ||
}, | ||
maxHeight: { | ||
type: String, | ||
default: '500px' | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
indexValue: null | ||
}; | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
computed: { | ||
active: function active() { | ||
return this.index == this.open(); | ||
} | ||
}, | ||
inject: ['open'], | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
openItem: function openItem() { | ||
// this.indexValue = this.index; | ||
// this.$emit('TyAcardionItemOpen', this.index); | ||
console.log(this.open, this.index); | ||
this.$parent.$emit('TyAcardionItemOpen', this.open() == this.index ? 'close' : this.index); | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
@@ -1102,3 +1118,3 @@ watch: {} | ||
/* template */ | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion-item"},[_c('div',{staticClass:"ty-acardion-item__header",on:{"click":_vm.openItem}},[_c('div',[_vm._v(_vm._s(_vm.label))]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__icon",class:{active: _vm.active}},[_c('i',{class:['ty-icon','ty-icon-arrow-right']})])]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__content",class:{inactive: !_vm.active},style:({maxHeight: _vm.maxHeight})},[_vm._t("default")],2)])}; | ||
var __vue_staticRenderFns__$8 = []; | ||
@@ -1120,3 +1136,3 @@ | ||
var Table = normalizeComponent_1( | ||
var AcardionItem = normalizeComponent_1( | ||
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 }, | ||
@@ -1138,22 +1154,48 @@ __vue_inject_styles__$8, | ||
// | ||
// | ||
var script$9 = { | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
name: 'TyButton', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
direction: String | ||
color: { | ||
type: String, | ||
default: 'primary' | ||
}, | ||
type: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
} | ||
} | ||
}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1165,3 +1207,3 @@ | ||
/* template */ | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$9 = []; | ||
@@ -1183,3 +1225,3 @@ | ||
var Container = normalizeComponent_1( | ||
var Button = normalizeComponent_1( | ||
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 }, | ||
@@ -1201,5 +1243,47 @@ __vue_inject_styles__$9, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$a = { | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
name: 'TyTable', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1211,3 +1295,3 @@ | ||
/* template */ | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_staticRenderFns__$a = []; | ||
@@ -1229,3 +1313,3 @@ | ||
var Main = normalizeComponent_1( | ||
var Table = normalizeComponent_1( | ||
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a }, | ||
@@ -1248,8 +1332,19 @@ __vue_inject_styles__$a, | ||
var script$b = { | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
props: { | ||
width: { | ||
type: String, | ||
default: '300px' | ||
direction: String | ||
}, | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
} | ||
@@ -1263,3 +1358,3 @@ } | ||
/* template */ | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$b = []; | ||
@@ -1281,3 +1376,3 @@ | ||
var Aside = normalizeComponent_1( | ||
var Container = normalizeComponent_1( | ||
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b }, | ||
@@ -1300,10 +1395,4 @@ __vue_inject_styles__$b, | ||
var script$c = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
}; | ||
@@ -1315,3 +1404,3 @@ | ||
/* template */ | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$c = []; | ||
@@ -1333,3 +1422,3 @@ | ||
var Header = normalizeComponent_1( | ||
var Main = normalizeComponent_1( | ||
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c }, | ||
@@ -1352,8 +1441,8 @@ __vue_inject_styles__$c, | ||
var script$d = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
props: { | ||
height: { | ||
width: { | ||
type: String, | ||
default: '60px' | ||
default: '300px' | ||
} | ||
@@ -1367,3 +1456,3 @@ } | ||
/* template */ | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$d = []; | ||
@@ -1385,3 +1474,3 @@ | ||
var Footer = normalizeComponent_1( | ||
var Aside = normalizeComponent_1( | ||
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d }, | ||
@@ -1397,2 +1486,100 @@ __vue_inject_styles__$d, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$e = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$e = script$e; | ||
/* template */ | ||
var __vue_render__$e = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$e = []; | ||
/* style */ | ||
const __vue_inject_styles__$e = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$e = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$e = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$e = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Header = normalizeComponent_1( | ||
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e }, | ||
__vue_inject_styles__$e, | ||
__vue_script__$e, | ||
__vue_scope_id__$e, | ||
__vue_is_functional_template__$e, | ||
__vue_module_identifier__$e, | ||
undefined, | ||
undefined | ||
); | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$f = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$f = script$f; | ||
/* template */ | ||
var __vue_render__$f = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$f = []; | ||
/* style */ | ||
const __vue_inject_styles__$f = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$f = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$f = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$f = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Footer = normalizeComponent_1( | ||
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f }, | ||
__vue_inject_styles__$f, | ||
__vue_script__$f, | ||
__vue_scope_id__$f, | ||
__vue_is_functional_template__$f, | ||
__vue_module_identifier__$f, | ||
undefined, | ||
undefined | ||
); | ||
var Row = { | ||
@@ -1519,4 +1706,71 @@ name: 'TyRow', | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col]; | ||
// | ||
// | ||
// | ||
var script$g = { | ||
name: 'TyIframe', | ||
props: ['src', 'width', 'height', 'scrollable'], | ||
data: function data() { | ||
return { | ||
html: null, | ||
scrolling: false | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
return new Promise(function ($return, $error) { | ||
var res; | ||
if (typeof this.scrollable == 'boolean') this.scrolling = this.scrollable; | ||
return Promise.resolve(fetch(this.src)).then(function ($await_1) { | ||
try { | ||
return Promise.resolve($await_1.json()).then(function ($await_2) { | ||
try { | ||
res = $await_2; | ||
this.$refs.frame.contentDocument.write(res.data); | ||
this.$refs.frame.style.height = this.$refs.frame.contentWindow.document.documentElement.scrollHeight + 'px'; | ||
return $return(); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
}.bind(this)); | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$g = script$g; | ||
/* template */ | ||
var __vue_render__$g = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('iframe',{ref:"frame",attrs:{"sandbox":"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms","scrolling":_vm.scrolling,"frameborder":"0","width":_vm.width,"height":_vm.height}})}; | ||
var __vue_staticRenderFns__$g = []; | ||
/* style */ | ||
const __vue_inject_styles__$g = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$g = "data-v-1dee95ea"; | ||
/* module identifier */ | ||
const __vue_module_identifier__$g = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$g = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Iframe = normalizeComponent_1( | ||
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g }, | ||
__vue_inject_styles__$g, | ||
__vue_script__$g, | ||
__vue_scope_id__$g, | ||
__vue_is_functional_template__$g, | ||
__vue_module_identifier__$g, | ||
undefined, | ||
undefined | ||
); | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col, Acardion, AcardionItem, Iframe]; | ||
var install = function install(Vue) { | ||
@@ -1550,5 +1804,8 @@ components.forEach(function (component) { | ||
Row: Row, | ||
Col: Col | ||
Col: Col, | ||
Acardion: Acardion, | ||
AcardionItem: AcardionItem, | ||
Iframe: Iframe | ||
}; | ||
export default index; |
@@ -967,35 +967,40 @@ (function (global, factory) { | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$7 = { | ||
name: 'TyButton', | ||
name: 'TyAcardion', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
color: { | ||
height: { | ||
type: String, | ||
default: 'primary' | ||
default: 'auto' | ||
}, | ||
type: { | ||
open: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
return { | ||
current: null | ||
}; | ||
}, | ||
provide: function provide() { | ||
return { | ||
open: this.getCurrentlyOpen | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
hasHeaderSlot: function hasHeaderSlot() { | ||
return !!this.$slots['header']; | ||
}, | ||
hasFooterSlot: function hasFooterSlot() { | ||
return !!this.$slots['footer']; | ||
} | ||
@@ -1005,10 +1010,15 @@ }, | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
this.$on('TyAcardionItemOpen', function (index) { | ||
_this.current = index; | ||
}); | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
getCurrentlyOpen: function getCurrentlyOpen() { | ||
return this.current || this.open; | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
} | ||
}; | ||
@@ -1020,3 +1030,3 @@ | ||
/* template */ | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion"},[(_vm.hasHeaderSlot)?_c('div',{staticClass:"ty-acardion__header"},[_vm._t("header")],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"ty-acardion__content"},[_vm._t("default",null,{"open":"1"})],2),_vm._v(" "),(_vm.hasFooterSlot)?_c('div',{staticClass:"ty-acardion__footer"},[_vm._t("footer")],2):_vm._e()])}; | ||
var __vue_staticRenderFns__$7 = []; | ||
@@ -1038,3 +1048,3 @@ | ||
var Button = normalizeComponent_1( | ||
var Acardion = normalizeComponent_1( | ||
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 }, | ||
@@ -1066,35 +1076,41 @@ __vue_inject_styles__$7, | ||
var script$8 = { | ||
name: 'TyTable', | ||
name: 'TyAcardionItem', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
label: { | ||
type: String, | ||
required: true | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
index: { | ||
type: String, | ||
required: true | ||
}, | ||
maxHeight: { | ||
type: String, | ||
default: '500px' | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
indexValue: null | ||
}; | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
computed: { | ||
active: function active() { | ||
return this.index == this.open(); | ||
} | ||
}, | ||
inject: ['open'], | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
openItem: function openItem() { | ||
// this.indexValue = this.index; | ||
// this.$emit('TyAcardionItemOpen', this.index); | ||
console.log(this.open, this.index); | ||
this.$parent.$emit('TyAcardionItemOpen', this.open() == this.index ? 'close' : this.index); | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
@@ -1108,3 +1124,3 @@ watch: {} | ||
/* template */ | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ty-acardion-item"},[_c('div',{staticClass:"ty-acardion-item__header",on:{"click":_vm.openItem}},[_c('div',[_vm._v(_vm._s(_vm.label))]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__icon",class:{active: _vm.active}},[_c('i',{class:['ty-icon','ty-icon-arrow-right']})])]),_vm._v(" "),_c('div',{staticClass:"ty-acardion-item__content",class:{inactive: !_vm.active},style:({maxHeight: _vm.maxHeight})},[_vm._t("default")],2)])}; | ||
var __vue_staticRenderFns__$8 = []; | ||
@@ -1126,3 +1142,3 @@ | ||
var Table = normalizeComponent_1( | ||
var AcardionItem = normalizeComponent_1( | ||
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 }, | ||
@@ -1144,22 +1160,48 @@ __vue_inject_styles__$8, | ||
// | ||
// | ||
var script$9 = { | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
name: 'TyButton', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
direction: String | ||
color: { | ||
type: String, | ||
default: 'primary' | ||
}, | ||
type: { | ||
type: String, | ||
default: 'simple' | ||
}, | ||
size: { | ||
type: String, | ||
default: 'medium' | ||
}, | ||
icon: { | ||
type: String, | ||
default: null | ||
}, | ||
disabled: Boolean, | ||
default: false | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return {}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
typeCss: function typeCss() { | ||
if (this.type == 'simple') return ["ty-bg-".concat(this.color)]; | ||
if (this.type == 'clear') return ['clear', "ty-color-".concat(this.color)]; | ||
if (this.type == 'outline') return ['outline', "ty-color-".concat(this.color), "ty-outline-".concat(this.color)]; | ||
} | ||
} | ||
}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: { | ||
handleClick: function handleClick(event) { | ||
this.$emit('click', event); | ||
} | ||
}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1171,3 +1213,3 @@ | ||
/* template */ | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:"ty-button ty-hoverable",class:_vm.typeCss.concat( [_vm.type], [_vm.size]),on:{"click":function($event){$event.stopPropagation();return _vm.handleClick($event)}}},[(_vm.icon)?_c('i',{staticClass:"ty-button__icon ty-icon",class:_vm.icon}):_vm._e(),_vm._v(" "),_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$9 = []; | ||
@@ -1189,3 +1231,3 @@ | ||
var Container = normalizeComponent_1( | ||
var Button = normalizeComponent_1( | ||
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 }, | ||
@@ -1207,5 +1249,47 @@ __vue_inject_styles__$9, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$a = { | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
name: 'TyTable', | ||
// *----------------------- P r o p s ---------------------------------------------------------- | ||
props: { | ||
data: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
}, | ||
coloumns: { | ||
type: Array, | ||
default: function _default() { | ||
return []; | ||
} | ||
} | ||
}, | ||
// *----------------------- D a t a ----------------------------------------------------------- | ||
data: function data() { | ||
return { | ||
columnLabels: [] | ||
}; | ||
}, | ||
// *----------------------- C o m p u t e d --------------------------------------------------- | ||
computed: {}, | ||
// *----------------------- L i f e c i r c l e --------------------------------------------- | ||
created: function created() {}, | ||
mounted: function mounted() { | ||
if (this.coloumns.length === 0) { | ||
this.columnLabels = this.data.length > 0 ? Object.keys(this.data[0]) : []; | ||
} | ||
}, | ||
// *----------------------- M e t h o d s ----------------------------------------------------- | ||
methods: {}, | ||
// *----------------------- W a t c h --------------------------------------------------------- | ||
watch: {} | ||
}; | ||
@@ -1217,3 +1301,3 @@ | ||
/* template */ | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('table',[_c('tr',_vm._l((_vm.columnLabels),function(item){return _c('th',{key:item},[_vm._v("\n\t\t\t\t"+_vm._s(item)+"\n\t\t\t")])}),0),_vm._v(" "),_vm._l((_vm.data),function(item,i){return _c('tr',{key:i},[_c('th')])})],2)])}; | ||
var __vue_staticRenderFns__$a = []; | ||
@@ -1235,3 +1319,3 @@ | ||
var Main = normalizeComponent_1( | ||
var Table = normalizeComponent_1( | ||
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a }, | ||
@@ -1254,8 +1338,19 @@ __vue_inject_styles__$a, | ||
var script$b = { | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
name: 'TyContainer', | ||
componentName: 'TyContainer', | ||
props: { | ||
width: { | ||
type: String, | ||
default: '300px' | ||
direction: String | ||
}, | ||
computed: { | ||
isVertical: function isVertical() { | ||
if (this.direction === 'vertical') { | ||
return true; | ||
} else if (this.direction === 'horizontal') { | ||
return false; | ||
} | ||
return this.$slots && this.$slots.default ? this.$slots.default.some(function (vnode) { | ||
var tag = vnode.componentOptions && vnode.componentOptions.tag; | ||
return tag === 'ty-header' || tag === 'ty-footer'; | ||
}) : false; | ||
} | ||
@@ -1269,3 +1364,3 @@ } | ||
/* template */ | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:"ty-container",class:{ 'is-vertical': _vm.isVertical }},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$b = []; | ||
@@ -1287,3 +1382,3 @@ | ||
var Aside = normalizeComponent_1( | ||
var Container = normalizeComponent_1( | ||
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b }, | ||
@@ -1306,10 +1401,4 @@ __vue_inject_styles__$b, | ||
var script$c = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
name: 'TyMain', | ||
componentName: 'TyMain' | ||
}; | ||
@@ -1321,3 +1410,3 @@ | ||
/* template */ | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('main',{staticClass:"ty-main"},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$c = []; | ||
@@ -1339,3 +1428,3 @@ | ||
var Header = normalizeComponent_1( | ||
var Main = normalizeComponent_1( | ||
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c }, | ||
@@ -1358,8 +1447,8 @@ __vue_inject_styles__$c, | ||
var script$d = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
name: 'TyAside', | ||
componentName: 'TyAside', | ||
props: { | ||
height: { | ||
width: { | ||
type: String, | ||
default: '60px' | ||
default: '300px' | ||
} | ||
@@ -1373,3 +1462,3 @@ } | ||
/* template */ | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('aside',{staticClass:"ty-aside",style:({ width: _vm.width })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$d = []; | ||
@@ -1391,3 +1480,3 @@ | ||
var Footer = normalizeComponent_1( | ||
var Aside = normalizeComponent_1( | ||
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d }, | ||
@@ -1403,2 +1492,100 @@ __vue_inject_styles__$d, | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$e = { | ||
name: 'TyHeader', | ||
componentName: 'TyHeader', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$e = script$e; | ||
/* template */ | ||
var __vue_render__$e = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"ty-header",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$e = []; | ||
/* style */ | ||
const __vue_inject_styles__$e = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$e = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$e = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$e = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Header = normalizeComponent_1( | ||
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e }, | ||
__vue_inject_styles__$e, | ||
__vue_script__$e, | ||
__vue_scope_id__$e, | ||
__vue_is_functional_template__$e, | ||
__vue_module_identifier__$e, | ||
undefined, | ||
undefined | ||
); | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
var script$f = { | ||
name: 'TyFooter', | ||
componentName: 'TyFooter', | ||
props: { | ||
height: { | ||
type: String, | ||
default: '60px' | ||
} | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$f = script$f; | ||
/* template */ | ||
var __vue_render__$f = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:"ty-footer",style:({ height: _vm.height })},[_vm._t("default")],2)}; | ||
var __vue_staticRenderFns__$f = []; | ||
/* style */ | ||
const __vue_inject_styles__$f = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$f = undefined; | ||
/* module identifier */ | ||
const __vue_module_identifier__$f = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$f = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Footer = normalizeComponent_1( | ||
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f }, | ||
__vue_inject_styles__$f, | ||
__vue_script__$f, | ||
__vue_scope_id__$f, | ||
__vue_is_functional_template__$f, | ||
__vue_module_identifier__$f, | ||
undefined, | ||
undefined | ||
); | ||
var Row = { | ||
@@ -1525,4 +1712,71 @@ name: 'TyRow', | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col]; | ||
// | ||
// | ||
// | ||
var script$g = { | ||
name: 'TyIframe', | ||
props: ['src', 'width', 'height', 'scrollable'], | ||
data: function data() { | ||
return { | ||
html: null, | ||
scrolling: false | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
return new Promise(function ($return, $error) { | ||
var res; | ||
if (typeof this.scrollable == 'boolean') this.scrolling = this.scrollable; | ||
return Promise.resolve(fetch(this.src)).then(function ($await_1) { | ||
try { | ||
return Promise.resolve($await_1.json()).then(function ($await_2) { | ||
try { | ||
res = $await_2; | ||
this.$refs.frame.contentDocument.write(res.data); | ||
this.$refs.frame.style.height = this.$refs.frame.contentWindow.document.documentElement.scrollHeight + 'px'; | ||
return $return(); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
}.bind(this)); | ||
} | ||
}; | ||
/* script */ | ||
const __vue_script__$g = script$g; | ||
/* template */ | ||
var __vue_render__$g = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('iframe',{ref:"frame",attrs:{"sandbox":"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms","scrolling":_vm.scrolling,"frameborder":"0","width":_vm.width,"height":_vm.height}})}; | ||
var __vue_staticRenderFns__$g = []; | ||
/* style */ | ||
const __vue_inject_styles__$g = undefined; | ||
/* scoped */ | ||
const __vue_scope_id__$g = "data-v-1dee95ea"; | ||
/* module identifier */ | ||
const __vue_module_identifier__$g = undefined; | ||
/* functional template */ | ||
const __vue_is_functional_template__$g = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
var Iframe = normalizeComponent_1( | ||
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g }, | ||
__vue_inject_styles__$g, | ||
__vue_script__$g, | ||
__vue_scope_id__$g, | ||
__vue_is_functional_template__$g, | ||
__vue_module_identifier__$g, | ||
undefined, | ||
undefined | ||
); | ||
var components = [Input, CurrencyInput, EditableText, EditableNumber, Select, Card, Border, Button, Table, Container, Main, Aside, Header, Footer, Row, Col, Acardion, AcardionItem, Iframe]; | ||
var install = function install(Vue) { | ||
@@ -1556,3 +1810,6 @@ components.forEach(function (component) { | ||
Row: Row, | ||
Col: Col | ||
Col: Col, | ||
Acardion: Acardion, | ||
AcardionItem: AcardionItem, | ||
Iframe: Iframe | ||
}; | ||
@@ -1559,0 +1816,0 @@ |
{ | ||
"name": "@tayeh/vue-components", | ||
"version": "1.0.8-alpha", | ||
"version": "1.0.81-alpha", | ||
"author": "Aref Akbari", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -47,3 +47,3 @@ <br> | ||
# installing package | ||
npm install --save @tayeh/panel-components | ||
npm install --save @tayeh/vue-components | ||
``` | ||
@@ -50,0 +50,0 @@ |
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
Network access
Supply chain riskThis module accesses the network.
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
244207
8123
4