vuetify eingebunden + erster Versuch Combobox
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2019 John Jeremy Leider
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+10652
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+25973
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+5
File diff suppressed because one or more lines are too long
+6
File diff suppressed because one or more lines are too long
+114
@@ -0,0 +1,114 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_alerts.styl');
|
||||
|
||||
var _VIcon = require('../VIcon');
|
||||
|
||||
var _VIcon2 = _interopRequireDefault(_VIcon);
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _toggleable = require('../../mixins/toggleable');
|
||||
|
||||
var _toggleable2 = _interopRequireDefault(_toggleable);
|
||||
|
||||
var _transitionable = require('../../mixins/transitionable');
|
||||
|
||||
var _transitionable2 = _interopRequireDefault(_transitionable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
|
||||
// Mixins
|
||||
// Styles
|
||||
exports.default = (0, _mixins2.default)(_colorable2.default, _toggleable2.default, _transitionable2.default).extend({
|
||||
name: 'v-alert',
|
||||
props: {
|
||||
dismissible: Boolean,
|
||||
icon: String,
|
||||
outline: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
validator: function validator(val) {
|
||||
return ['info', 'error', 'success', 'warning'].includes(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
computedColor: function computedColor() {
|
||||
return this.type && !this.color ? this.type : this.color || 'error';
|
||||
},
|
||||
computedIcon: function computedIcon() {
|
||||
if (this.icon || !this.type) return this.icon;
|
||||
switch (this.type) {
|
||||
case 'info':
|
||||
return '$vuetify.icons.info';
|
||||
case 'error':
|
||||
return '$vuetify.icons.error';
|
||||
case 'success':
|
||||
return '$vuetify.icons.success';
|
||||
case 'warning':
|
||||
return '$vuetify.icons.warning';
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
genIcon: function genIcon() {
|
||||
if (!this.computedIcon) return null;
|
||||
return this.$createElement(_VIcon2.default, {
|
||||
'class': 'v-alert__icon'
|
||||
}, this.computedIcon);
|
||||
},
|
||||
genDismissible: function genDismissible() {
|
||||
var _this = this;
|
||||
|
||||
if (!this.dismissible) return null;
|
||||
return this.$createElement('a', {
|
||||
'class': 'v-alert__dismissible',
|
||||
on: { click: function click() {
|
||||
_this.isActive = false;
|
||||
} }
|
||||
}, [this.$createElement(_VIcon2.default, {
|
||||
props: {
|
||||
right: true
|
||||
}
|
||||
}, '$vuetify.icons.cancel')]);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var children = [this.genIcon(), h('div', this.$slots.default), this.genDismissible()];
|
||||
var setColor = this.outline ? this.setTextColor : this.setBackgroundColor;
|
||||
var alert = h('div', setColor(this.computedColor, {
|
||||
staticClass: 'v-alert',
|
||||
'class': {
|
||||
'v-alert--outline': this.outline
|
||||
},
|
||||
directives: [{
|
||||
name: 'show',
|
||||
value: this.isActive
|
||||
}],
|
||||
on: this.$listeners
|
||||
}), children);
|
||||
if (!this.transition) return alert;
|
||||
return h('transition', {
|
||||
props: {
|
||||
name: this.transition,
|
||||
origin: this.origin,
|
||||
mode: this.mode
|
||||
}
|
||||
}, [alert]);
|
||||
}
|
||||
});
|
||||
// Components
|
||||
//# sourceMappingURL=VAlert.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VAlert/VAlert.ts"],"names":[],"mappings":";;;;;;AACA;;AAGA;;;;AAGA;;;;AACA;;;;AACA;;;;AAIA;;;;;;AAEA;;AATA;;kBAUe,sBAAO,mBAAP,EAAkB,oBAAlB,EAA8B,wBAA9B,EAA8C,MAA9C,CAAqD;AAClE,UAAM,SAD4D;AAGlE,WAAO;AACL,qBAAa,OADR;AAEL,cAAM,MAFD;AAGL,iBAAS,OAHJ;AAIL,cAAM;AACJ,kBAAM,MADF;AAEJ,qBAFI,qBAEO,GAFP,EAEkB;AACpB,uBAAO,CACL,MADK,EAEL,OAFK,EAGL,SAHK,EAIL,SAJK,EAKL,QALK,CAKI,GALJ,CAAP;AAMD;AATG;AAJD,KAH2D;AAoBlE,cAAU;AACR,qBADQ,2BACK;AACX,mBAAQ,KAAK,IAAL,IAAa,CAAC,KAAK,KAApB,GAA6B,KAAK,IAAlC,GAA0C,KAAK,KAAL,IAAc,OAA/D;AACD,SAHO;AAIR,oBAJQ,0BAII;AACV,gBAAI,KAAK,IAAL,IAAa,CAAC,KAAK,IAAvB,EAA6B,OAAO,KAAK,IAAZ;AAE7B,oBAAQ,KAAK,IAAb;AACE,qBAAK,MAAL;AAAa,2BAAO,qBAAP;AACb,qBAAK,OAAL;AAAc,2BAAO,sBAAP;AACd,qBAAK,SAAL;AAAgB,2BAAO,wBAAP;AAChB,qBAAK,SAAL;AAAgB,2BAAO,wBAAP;AAJlB;AAMD;AAbO,KApBwD;AAoClE,aAAS;AACP,eADO,qBACA;AACL,gBAAI,CAAC,KAAK,YAAV,EAAwB,OAAO,IAAP;AAExB,mBAAO,KAAK,cAAL,CAAoB,eAApB,EAA2B;AAChC,yBAAS;AADuB,aAA3B,EAEJ,KAAK,YAFD,CAAP;AAGD,SAPM;AASP,sBATO,4BASO;AAAA;;AACZ,gBAAI,CAAC,KAAK,WAAV,EAAuB,OAAO,IAAP;AAEvB,mBAAO,KAAK,cAAL,CAAoB,GAApB,EAAyB;AAC9B,yBAAS,sBADqB;AAE9B,oBAAI,EAAE,OAAO,iBAAK;AAAG,8BAAK,QAAL,GAAgB,KAAhB;AAAuB,qBAAxC;AAF0B,aAAzB,EAGJ,CACD,KAAK,cAAL,CAAoB,eAApB,EAA2B;AACzB,uBAAO;AACL,2BAAO;AADF;AADkB,aAA3B,EAIG,uBAJH,CADC,CAHI,CAAP;AAUD;AAtBM,KApCyD;AA6DlE,UA7DkE,kBA6D1D,CA7D0D,EA6DzD;AACP,YAAM,WAAW,CACf,KAAK,OAAL,EADe,EAEf,EAAE,KAAF,EAAS,KAAK,MAAL,CAAY,OAArB,CAFe,EAGf,KAAK,cAAL,EAHe,CAAjB;AAKA,YAAM,WAAW,KAAK,OAAL,GAAe,KAAK,YAApB,GAAmC,KAAK,kBAAzD;AACA,YAAM,QAAQ,EAAE,KAAF,EAAS,SAAS,KAAK,aAAd,EAA6B;AAClD,yBAAa,SADqC;AAElD,qBAAS;AACP,oCAAoB,KAAK;AADlB,aAFyC;AAKlD,wBAAY,CAAC;AACX,sBAAM,MADK;AAEX,uBAAO,KAAK;AAFD,aAAD,CALsC;AASlD,gBAAI,KAAK;AATyC,SAA7B,CAAT,EAUV,QAVU,CAAd;AAYA,YAAI,CAAC,KAAK,UAAV,EAAsB,OAAO,KAAP;AAEtB,eAAO,EAAE,YAAF,EAAgB;AACrB,mBAAO;AACL,sBAAM,KAAK,UADN;AAEL,wBAAQ,KAAK,MAFR;AAGL,sBAAM,KAAK;AAHN;AADc,SAAhB,EAMJ,CAAC,KAAD,CANI,CAAP;AAOD;AAzFiE,CAArD,C;AAbf","sourcesContent":["// Styles\nimport '../../stylus/components/_alerts.styl'\n\n// Components\nimport VIcon from '../VIcon'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Toggleable from '../../mixins/toggleable'\nimport Transitionable from '../../mixins/transitionable'\n\n// Types\nimport { VNode } from 'vue/types'\nimport mixins from '../../util/mixins'\n\n/* @vue/component */\nexport default mixins(Colorable, Toggleable, Transitionable).extend({\n name: 'v-alert',\n\n props: {\n dismissible: Boolean,\n icon: String,\n outline: Boolean,\n type: {\n type: String,\n validator (val: string) {\n return [\n 'info',\n 'error',\n 'success',\n 'warning'\n ].includes(val)\n }\n }\n },\n\n computed: {\n computedColor (): string {\n return (this.type && !this.color) ? this.type : (this.color || 'error')\n },\n computedIcon (): string | void {\n if (this.icon || !this.type) return this.icon\n\n switch (this.type) {\n case 'info': return '$vuetify.icons.info'\n case 'error': return '$vuetify.icons.error'\n case 'success': return '$vuetify.icons.success'\n case 'warning': return '$vuetify.icons.warning'\n }\n }\n },\n\n methods: {\n genIcon (): VNode | null {\n if (!this.computedIcon) return null\n\n return this.$createElement(VIcon, {\n 'class': 'v-alert__icon'\n }, this.computedIcon)\n },\n\n genDismissible (): VNode | null {\n if (!this.dismissible) return null\n\n return this.$createElement('a', {\n 'class': 'v-alert__dismissible',\n on: { click: () => { this.isActive = false } }\n }, [\n this.$createElement(VIcon, {\n props: {\n right: true\n }\n }, '$vuetify.icons.cancel')\n ])\n }\n },\n\n render (h): VNode {\n const children = [\n this.genIcon(),\n h('div', this.$slots.default),\n this.genDismissible()\n ] as any\n const setColor = this.outline ? this.setTextColor : this.setBackgroundColor\n const alert = h('div', setColor(this.computedColor, {\n staticClass: 'v-alert',\n 'class': {\n 'v-alert--outline': this.outline\n },\n directives: [{\n name: 'show',\n value: this.isActive\n }],\n on: this.$listeners\n }), children)\n\n if (!this.transition) return alert\n\n return h('transition', {\n props: {\n name: this.transition,\n origin: this.origin,\n mode: this.mode\n }\n }, [alert])\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VAlert = undefined;
|
||||
|
||||
var _VAlert = require('./VAlert');
|
||||
|
||||
var _VAlert2 = _interopRequireDefault(_VAlert);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VAlert = _VAlert2.default;
|
||||
exports.default = _VAlert2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VAlert/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,M,GAAA,gB;kBACM,gB","sourcesContent":["import VAlert from './VAlert'\n\nexport { VAlert }\nexport default VAlert\n"],"sourceRoot":""}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
// Component level mixins
|
||||
|
||||
// Directives
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_app.styl');
|
||||
|
||||
var _appTheme = require('./mixins/app-theme');
|
||||
|
||||
var _appTheme2 = _interopRequireDefault(_appTheme);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _resize = require('../../directives/resize');
|
||||
|
||||
var _resize2 = _interopRequireDefault(_resize);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = {
|
||||
name: 'v-app',
|
||||
directives: {
|
||||
Resize: _resize2.default
|
||||
},
|
||||
mixins: [_appTheme2.default, _themeable2.default],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'app'
|
||||
},
|
||||
dark: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'application--is-rtl': this.$vuetify.rtl
|
||||
}, this.themeClasses);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dark: function dark() {
|
||||
this.$vuetify.dark = this.dark;
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
this.$vuetify.dark = this.dark;
|
||||
},
|
||||
render: function render(h) {
|
||||
var data = {
|
||||
staticClass: 'application',
|
||||
'class': this.classes,
|
||||
attrs: { 'data-app': true },
|
||||
domProps: { id: this.id }
|
||||
};
|
||||
var wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default);
|
||||
return h('div', data, [wrapper]);
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=VApp.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VApp/VApp.js"],"names":[],"mappings":";;;;;;;AAEA;;AAKA;;;;;AAJA;;;;AAEA;;;;AAGA;;;;;;AAEA;kBACe;AACb,UAAM,OADO;AAGb,gBAAY;AACV;AADU,KAHC;AAOb,YAAQ,CACN,kBADM,EAEN,mBAFM,CAPK;AAYb,WAAO;AACL,YAAI;AACF,kBAAM,MADJ;AAEF,qBAAS;AAFP,SADC;AAKL,cAAM;AALD,KAZM;AAoBb,cAAU;AACR,eADQ,qBACD;AACL;AACE,uCAAuB,KAAK,QAAL,CAAc;AADvC,eAEK,KAAK,YAFV;AAID;AANO,KApBG;AA6Bb,WAAO;AACL,YADK,kBACD;AACF,iBAAK,QAAL,CAAc,IAAd,GAAqB,KAAK,IAA1B;AACD;AAHI,KA7BM;AAmCb,WAnCa,qBAmCN;AACL,aAAK,QAAL,CAAc,IAAd,GAAqB,KAAK,IAA1B;AACD,KArCY;AAuCb,UAvCa,kBAuCL,CAvCK,EAuCJ;AACP,YAAM,OAAO;AACX,yBAAa,aADF;AAEX,qBAAS,KAAK,OAFH;AAGX,mBAAO,EAAE,YAAY,IAAd,EAHI;AAIX,sBAAU,EAAE,IAAI,KAAK,EAAX;AAJC,SAAb;AAOA,YAAM,UAAU,EAAE,KAAF,EAAS,EAAE,aAAa,mBAAf,EAAT,EAA+C,KAAK,MAAL,CAAY,OAA3D,CAAhB;AAEA,eAAO,EAAE,KAAF,EAAS,IAAT,EAAe,CAAC,OAAD,CAAf,CAAP;AACD;AAlDY,C","sourcesContent":["import '../../stylus/components/_app.styl'\n\n// Component level mixins\nimport AppTheme from './mixins/app-theme'\n\nimport Themeable from '../../mixins/themeable'\n\n// Directives\nimport Resize from '../../directives/resize'\n\n/* @vue/component */\nexport default {\n name: 'v-app',\n\n directives: {\n Resize\n },\n\n mixins: [\n AppTheme,\n Themeable\n ],\n\n props: {\n id: {\n type: String,\n default: 'app'\n },\n dark: Boolean\n },\n\n computed: {\n classes () {\n return {\n 'application--is-rtl': this.$vuetify.rtl,\n ...this.themeClasses\n }\n }\n },\n\n watch: {\n dark () {\n this.$vuetify.dark = this.dark\n }\n },\n\n mounted () {\n this.$vuetify.dark = this.dark\n },\n\n render (h) {\n const data = {\n staticClass: 'application',\n 'class': this.classes,\n attrs: { 'data-app': true },\n domProps: { id: this.id }\n }\n\n const wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default)\n\n return h('div', data, [wrapper])\n }\n}\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VApp = undefined;
|
||||
|
||||
var _VApp = require('./VApp');
|
||||
|
||||
var _VApp2 = _interopRequireDefault(_VApp);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VApp = _VApp2.default;
|
||||
exports.default = _VApp2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VApp/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,I,GAAA,c;kBACM,c","sourcesContent":["import VApp from './VApp'\n\nexport { VApp }\nexport default VApp\n"],"sourceRoot":""}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _theme = require('../../../util/theme');
|
||||
|
||||
var Theme = _interopRequireWildcard(_theme);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
exports.default = {
|
||||
data: function data() {
|
||||
return {
|
||||
style: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
parsedTheme: function parsedTheme() {
|
||||
return Theme.parse(this.$vuetify.theme);
|
||||
},
|
||||
|
||||
/** @return string */
|
||||
generatedStyles: function generatedStyles() {
|
||||
var theme = this.parsedTheme;
|
||||
var css = void 0;
|
||||
if (this.$vuetify.options.themeCache != null) {
|
||||
css = this.$vuetify.options.themeCache.get(theme);
|
||||
if (css != null) return css;
|
||||
}
|
||||
css = Theme.genStyles(theme, this.$vuetify.options.customProperties);
|
||||
if (this.$vuetify.options.minifyTheme != null) {
|
||||
css = this.$vuetify.options.minifyTheme(css);
|
||||
}
|
||||
if (this.$vuetify.options.themeCache != null) {
|
||||
this.$vuetify.options.themeCache.set(theme, css);
|
||||
}
|
||||
return css;
|
||||
},
|
||||
vueMeta: function vueMeta() {
|
||||
if (this.$vuetify.theme === false) return {};
|
||||
var options = {
|
||||
cssText: this.generatedStyles,
|
||||
id: 'vuetify-theme-stylesheet',
|
||||
type: 'text/css'
|
||||
};
|
||||
if (this.$vuetify.options.cspNonce) {
|
||||
options.nonce = this.$vuetify.options.cspNonce;
|
||||
}
|
||||
return {
|
||||
style: [options]
|
||||
};
|
||||
}
|
||||
},
|
||||
// Regular vue-meta
|
||||
metaInfo: function metaInfo() {
|
||||
return this.vueMeta;
|
||||
},
|
||||
|
||||
// Nuxt
|
||||
head: function head() {
|
||||
return this.vueMeta;
|
||||
},
|
||||
|
||||
watch: {
|
||||
generatedStyles: function generatedStyles() {
|
||||
!this.meta && this.applyTheme();
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
if (this.$vuetify.theme === false) return;
|
||||
if (this.$meta) {
|
||||
// Vue-meta
|
||||
// Handled by metaInfo()/nuxt()
|
||||
} else if (typeof document === 'undefined' && this.$ssrContext) {
|
||||
// SSR
|
||||
var nonce = this.$vuetify.options.cspNonce ? ' nonce="' + this.$vuetify.options.cspNonce + '"' : '';
|
||||
this.$ssrContext.head = this.$ssrContext.head || '';
|
||||
this.$ssrContext.head += '<style type="text/css" id="vuetify-theme-stylesheet"' + nonce + '>' + this.generatedStyles + '</style>';
|
||||
} else if (typeof document !== 'undefined') {
|
||||
// Client-side
|
||||
this.genStyle();
|
||||
this.applyTheme();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
applyTheme: function applyTheme() {
|
||||
if (this.style) this.style.innerHTML = this.generatedStyles;
|
||||
},
|
||||
genStyle: function genStyle() {
|
||||
var style = document.getElementById('vuetify-theme-stylesheet');
|
||||
if (!style) {
|
||||
style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.id = 'vuetify-theme-stylesheet';
|
||||
if (this.$vuetify.options.cspNonce) {
|
||||
style.setAttribute('nonce', this.$vuetify.options.cspNonce);
|
||||
}
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
this.style = style;
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=app-theme.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+323
@@ -0,0 +1,323 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Extensions
|
||||
|
||||
// Utils
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_autocompletes.styl');
|
||||
|
||||
var _VSelect = require('../VSelect/VSelect');
|
||||
|
||||
var _VSelect2 = _interopRequireDefault(_VSelect);
|
||||
|
||||
var _VTextField = require('../VTextField/VTextField');
|
||||
|
||||
var _VTextField2 = _interopRequireDefault(_VTextField);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var defaultMenuProps = _extends({}, _VSelect.defaultMenuProps, {
|
||||
offsetY: true,
|
||||
offsetOverflow: true,
|
||||
transition: false
|
||||
});
|
||||
/* @vue/component */
|
||||
exports.default = _VSelect2.default.extend({
|
||||
name: 'v-autocomplete',
|
||||
props: {
|
||||
allowOverflow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
browserAutocomplete: {
|
||||
type: String,
|
||||
default: 'off'
|
||||
},
|
||||
filter: {
|
||||
type: Function,
|
||||
default: function _default(item, queryText, itemText) {
|
||||
return itemText.toLocaleLowerCase().indexOf(queryText.toLocaleLowerCase()) > -1;
|
||||
}
|
||||
},
|
||||
hideNoData: Boolean,
|
||||
noFilter: Boolean,
|
||||
searchInput: {
|
||||
default: undefined
|
||||
},
|
||||
menuProps: {
|
||||
type: _VSelect2.default.options.props.menuProps.type,
|
||||
default: function _default() {
|
||||
return defaultMenuProps;
|
||||
}
|
||||
},
|
||||
autoSelectFirst: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data: function data(vm) {
|
||||
return {
|
||||
attrsInput: null,
|
||||
lazySearch: vm.searchInput
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return Object.assign({}, _VSelect2.default.options.computed.classes.call(this), {
|
||||
'v-autocomplete': true,
|
||||
'v-autocomplete--is-selecting-index': this.selectedIndex > -1
|
||||
});
|
||||
},
|
||||
computedItems: function computedItems() {
|
||||
return this.filteredItems;
|
||||
},
|
||||
selectedValues: function selectedValues() {
|
||||
var _this = this;
|
||||
|
||||
return this.selectedItems.map(function (item) {
|
||||
return _this.getValue(item);
|
||||
});
|
||||
},
|
||||
hasDisplayedItems: function hasDisplayedItems() {
|
||||
var _this2 = this;
|
||||
|
||||
return this.hideSelected ? this.filteredItems.some(function (item) {
|
||||
return !_this2.hasItem(item);
|
||||
}) : this.filteredItems.length > 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* The range of the current input text
|
||||
*
|
||||
* @return {Number}
|
||||
*/
|
||||
currentRange: function currentRange() {
|
||||
if (this.selectedItem == null) return 0;
|
||||
return this.getText(this.selectedItem).toString().length;
|
||||
},
|
||||
filteredItems: function filteredItems() {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this.isSearching || this.noFilter || this.internalSearch == null) return this.allItems;
|
||||
return this.allItems.filter(function (item) {
|
||||
return _this3.filter(item, _this3.internalSearch.toString(), _this3.getText(item).toString());
|
||||
});
|
||||
},
|
||||
|
||||
internalSearch: {
|
||||
get: function get() {
|
||||
return this.lazySearch;
|
||||
},
|
||||
set: function set(val) {
|
||||
this.lazySearch = val;
|
||||
this.$emit('update:searchInput', val);
|
||||
}
|
||||
},
|
||||
isAnyValueAllowed: function isAnyValueAllowed() {
|
||||
return false;
|
||||
},
|
||||
isDirty: function isDirty() {
|
||||
return this.searchIsDirty || this.selectedItems.length > 0;
|
||||
},
|
||||
isSearching: function isSearching() {
|
||||
if (this.multiple) return this.searchIsDirty;
|
||||
return this.searchIsDirty && this.internalSearch !== this.getText(this.selectedItem);
|
||||
},
|
||||
menuCanShow: function menuCanShow() {
|
||||
if (!this.isFocused) return false;
|
||||
return this.hasDisplayedItems || !this.hideNoData;
|
||||
},
|
||||
$_menuProps: function $_menuProps() {
|
||||
var props = _VSelect2.default.options.computed.$_menuProps.call(this);
|
||||
props.contentClass = ('v-autocomplete__content ' + (props.contentClass || '')).trim();
|
||||
return _extends({}, defaultMenuProps, props);
|
||||
},
|
||||
searchIsDirty: function searchIsDirty() {
|
||||
return this.internalSearch != null && this.internalSearch !== '';
|
||||
},
|
||||
selectedItem: function selectedItem() {
|
||||
var _this4 = this;
|
||||
|
||||
if (this.multiple) return null;
|
||||
return this.selectedItems.find(function (i) {
|
||||
return _this4.valueComparator(_this4.getValue(i), _this4.getValue(_this4.internalValue));
|
||||
});
|
||||
},
|
||||
listData: function listData() {
|
||||
var data = _VSelect2.default.options.computed.listData.call(this);
|
||||
Object.assign(data.props, {
|
||||
items: this.virtualizedItems,
|
||||
noFilter: this.noFilter || !this.isSearching || !this.filteredItems.length,
|
||||
searchInput: this.internalSearch
|
||||
});
|
||||
return data;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filteredItems: function filteredItems(val) {
|
||||
this.onFilteredItemsChanged(val);
|
||||
},
|
||||
internalValue: function internalValue() {
|
||||
this.setSearch();
|
||||
},
|
||||
isFocused: function isFocused(val) {
|
||||
if (val) {
|
||||
this.$refs.input && this.$refs.input.select();
|
||||
} else {
|
||||
this.updateSelf();
|
||||
}
|
||||
},
|
||||
isMenuActive: function isMenuActive(val) {
|
||||
if (val || !this.hasSlot) return;
|
||||
this.lazySearch = null;
|
||||
},
|
||||
items: function items(val, oldVal) {
|
||||
// If we are focused, the menu
|
||||
// is not active, hide no data is enabled,
|
||||
// and items change
|
||||
// User is probably async loading
|
||||
// items, try to activate the menu
|
||||
if (!(oldVal && oldVal.length) && this.hideNoData && this.isFocused && !this.isMenuActive && val.length) this.activateMenu();
|
||||
},
|
||||
searchInput: function searchInput(val) {
|
||||
this.lazySearch = val;
|
||||
},
|
||||
internalSearch: function internalSearch(val) {
|
||||
this.onInternalSearchChanged(val);
|
||||
},
|
||||
itemText: function itemText() {
|
||||
this.updateSelf();
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
this.setSearch();
|
||||
},
|
||||
|
||||
methods: {
|
||||
onFilteredItemsChanged: function onFilteredItemsChanged(val) {
|
||||
var _this5 = this;
|
||||
|
||||
this.setMenuIndex(-1);
|
||||
this.$nextTick(function () {
|
||||
_this5.setMenuIndex(val.length > 0 && (val.length === 1 || _this5.autoSelectFirst) ? 0 : -1);
|
||||
});
|
||||
},
|
||||
onInternalSearchChanged: function onInternalSearchChanged(val) {
|
||||
this.updateMenuDimensions();
|
||||
},
|
||||
updateMenuDimensions: function updateMenuDimensions() {
|
||||
if (this.isMenuActive && this.$refs.menu) {
|
||||
this.$refs.menu.updateDimensions();
|
||||
}
|
||||
},
|
||||
changeSelectedIndex: function changeSelectedIndex(keyCode) {
|
||||
// Do not allow changing of selectedIndex
|
||||
// when search is dirty
|
||||
if (this.searchIsDirty) return;
|
||||
if (![_helpers.keyCodes.backspace, _helpers.keyCodes.left, _helpers.keyCodes.right, _helpers.keyCodes.delete].includes(keyCode)) return;
|
||||
var indexes = this.selectedItems.length - 1;
|
||||
if (keyCode === _helpers.keyCodes.left) {
|
||||
this.selectedIndex = this.selectedIndex === -1 ? indexes : this.selectedIndex - 1;
|
||||
} else if (keyCode === _helpers.keyCodes.right) {
|
||||
this.selectedIndex = this.selectedIndex >= indexes ? -1 : this.selectedIndex + 1;
|
||||
} else if (this.selectedIndex === -1) {
|
||||
this.selectedIndex = indexes;
|
||||
return;
|
||||
}
|
||||
var currentItem = this.selectedItems[this.selectedIndex];
|
||||
if ([_helpers.keyCodes.backspace, _helpers.keyCodes.delete].includes(keyCode) && !this.getDisabled(currentItem)) {
|
||||
var newIndex = this.selectedIndex === indexes ? this.selectedIndex - 1 : this.selectedItems[this.selectedIndex + 1] ? this.selectedIndex : -1;
|
||||
if (newIndex === -1) {
|
||||
this.setValue(this.multiple ? [] : undefined);
|
||||
} else {
|
||||
this.selectItem(currentItem);
|
||||
}
|
||||
this.selectedIndex = newIndex;
|
||||
}
|
||||
},
|
||||
clearableCallback: function clearableCallback() {
|
||||
this.internalSearch = undefined;
|
||||
_VSelect2.default.options.methods.clearableCallback.call(this);
|
||||
},
|
||||
genInput: function genInput() {
|
||||
var input = _VTextField2.default.options.methods.genInput.call(this);
|
||||
input.data.attrs.role = 'combobox';
|
||||
input.data.domProps.value = this.internalSearch;
|
||||
return input;
|
||||
},
|
||||
genSelections: function genSelections() {
|
||||
return this.hasSlot || this.multiple ? _VSelect2.default.options.methods.genSelections.call(this) : [];
|
||||
},
|
||||
onClick: function onClick() {
|
||||
if (this.isDisabled) return;
|
||||
this.selectedIndex > -1 ? this.selectedIndex = -1 : this.onFocus();
|
||||
this.activateMenu();
|
||||
},
|
||||
onEnterDown: function onEnterDown() {
|
||||
// Avoid invoking this method
|
||||
// will cause updateSelf to
|
||||
// be called emptying search
|
||||
},
|
||||
onInput: function onInput(e) {
|
||||
if (this.selectedIndex > -1) return;
|
||||
// If typing and menu is not currently active
|
||||
if (e.target.value) {
|
||||
this.activateMenu();
|
||||
if (!this.isAnyValueAllowed) this.setMenuIndex(0);
|
||||
}
|
||||
this.mask && this.resetSelections(e.target);
|
||||
this.internalSearch = e.target.value;
|
||||
this.badInput = e.target.validity && e.target.validity.badInput;
|
||||
},
|
||||
onKeyDown: function onKeyDown(e) {
|
||||
var keyCode = e.keyCode;
|
||||
_VSelect2.default.options.methods.onKeyDown.call(this, e);
|
||||
// The ordering is important here
|
||||
// allows new value to be updated
|
||||
// and then moves the index to the
|
||||
// proper location
|
||||
this.changeSelectedIndex(keyCode);
|
||||
},
|
||||
onTabDown: function onTabDown(e) {
|
||||
_VSelect2.default.options.methods.onTabDown.call(this, e);
|
||||
this.updateSelf();
|
||||
},
|
||||
setSelectedItems: function setSelectedItems() {
|
||||
_VSelect2.default.options.methods.setSelectedItems.call(this);
|
||||
// #4273 Don't replace if searching
|
||||
// #4403 Don't replace if focused
|
||||
if (!this.isFocused) this.setSearch();
|
||||
},
|
||||
setSearch: function setSearch() {
|
||||
var _this6 = this;
|
||||
|
||||
// Wait for nextTick so selectedItem
|
||||
// has had time to update
|
||||
this.$nextTick(function () {
|
||||
_this6.internalSearch = _this6.multiple && _this6.internalSearch && _this6.isMenuActive ? _this6.internalSearch : !_this6.selectedItems.length || _this6.multiple || _this6.hasSlot ? null : _this6.getText(_this6.selectedItem);
|
||||
});
|
||||
},
|
||||
updateSelf: function updateSelf() {
|
||||
this.updateAutocomplete();
|
||||
},
|
||||
updateAutocomplete: function updateAutocomplete() {
|
||||
if (!this.searchIsDirty && !this.internalValue) return;
|
||||
if (!this.valueComparator(this.internalSearch, this.getValue(this.internalValue))) {
|
||||
this.setSearch();
|
||||
}
|
||||
},
|
||||
hasItem: function hasItem(item) {
|
||||
return this.selectedValues.indexOf(this.getValue(item)) > -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VAutocomplete.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VAutocomplete = undefined;
|
||||
|
||||
var _VAutocomplete = require('./VAutocomplete');
|
||||
|
||||
var _VAutocomplete2 = _interopRequireDefault(_VAutocomplete);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VAutocomplete = _VAutocomplete2.default;
|
||||
exports.default = _VAutocomplete2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VAutocomplete/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,a,GAAA,uB;kBACM,uB","sourcesContent":["import VAutocomplete from './VAutocomplete'\n\nexport { VAutocomplete }\nexport default VAutocomplete\n"],"sourceRoot":""}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
// Mixins
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_avatars.styl');
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = (0, _mixins2.default)(_colorable2.default).extend({
|
||||
name: 'v-avatar',
|
||||
functional: true,
|
||||
props: {
|
||||
// TODO: inherit these
|
||||
color: String,
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 48
|
||||
},
|
||||
tile: Boolean
|
||||
},
|
||||
render: function render(h, _ref) {
|
||||
var data = _ref.data,
|
||||
props = _ref.props,
|
||||
children = _ref.children;
|
||||
|
||||
data.staticClass = ('v-avatar ' + (data.staticClass || '')).trim();
|
||||
if (props.tile) data.staticClass += ' v-avatar--tile';
|
||||
var size = (0, _helpers.convertToUnit)(props.size);
|
||||
data.style = _extends({
|
||||
height: size,
|
||||
width: size
|
||||
}, data.style);
|
||||
return h('div', _colorable2.default.options.methods.setBackgroundColor(props.color, data), children);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VAvatar.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VAvatar/VAvatar.ts"],"names":[],"mappings":";;;;;;;AAEA;;;;;AACA;;;;AACA;;AAIA;;;;;;AAEA;kBACe,sBAAO,mBAAP,EAAkB,MAAlB,CAAyB;AACtC,UAAM,UADgC;AAGtC,gBAAY,IAH0B;AAKtC,WAAO;AACL;AACA,eAAO,MAFF;AAIL,cAAM;AACJ,kBAAM,CAAC,MAAD,EAAS,MAAT,CADF;AAEJ,qBAAS;AAFL,SAJD;AAQL,cAAM;AARD,KAL+B;AAgBtC,UAhBsC,kBAgB9B,CAhB8B,QAgBF;AAAA,YAAvB,IAAuB,QAAvB,IAAuB;AAAA,YAAjB,KAAiB,QAAjB,KAAiB;AAAA,YAAV,QAAU,QAAV,QAAU;;AAClC,aAAK,WAAL,GAAmB,gBAAa,KAAK,WAAL,IAAoB,EAAjC,GAAuC,IAAvC,EAAnB;AAEA,YAAI,MAAM,IAAV,EAAgB,KAAK,WAAL,IAAoB,iBAApB;AAEhB,YAAM,OAAO,4BAAc,MAAM,IAApB,CAAb;AACA,aAAK,KAAL;AACE,oBAAQ,IADV;AAEE,mBAAO;AAFT,WAGK,KAAK,KAHV;AAMA,eAAO,EAAE,KAAF,EAAS,oBAAU,OAAV,CAAkB,OAAlB,CAA0B,kBAA1B,CAA6C,MAAM,KAAnD,EAA0D,IAA1D,CAAT,EAA0E,QAA1E,CAAP;AACD;AA7BqC,CAAzB,C","sourcesContent":["import '../../stylus/components/_avatars.styl'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport { convertToUnit } from '../../util/helpers'\n\n// Types\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n/* @vue/component */\nexport default mixins(Colorable).extend({\n name: 'v-avatar',\n\n functional: true,\n\n props: {\n // TODO: inherit these\n color: String,\n\n size: {\n type: [Number, String],\n default: 48\n },\n tile: Boolean\n },\n\n render (h, { data, props, children }): VNode {\n data.staticClass = (`v-avatar ${data.staticClass || ''}`).trim()\n\n if (props.tile) data.staticClass += ' v-avatar--tile'\n\n const size = convertToUnit(props.size)\n data.style = {\n height: size,\n width: size,\n ...data.style as object\n }\n\n return h('div', Colorable.options.methods.setBackgroundColor(props.color, data), children)\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VAvatar = undefined;
|
||||
|
||||
var _VAvatar = require('./VAvatar');
|
||||
|
||||
var _VAvatar2 = _interopRequireDefault(_VAvatar);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VAvatar = _VAvatar2.default;
|
||||
exports.default = _VAvatar2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VAvatar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,O,GAAA,iB;kBACM,iB","sourcesContent":["import VAvatar from './VAvatar'\n\nexport { VAvatar }\nexport default VAvatar\n"],"sourceRoot":""}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_badges.styl');
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _toggleable = require('../../mixins/toggleable');
|
||||
|
||||
var _toggleable2 = _interopRequireDefault(_toggleable);
|
||||
|
||||
var _positionable = require('../../mixins/positionable');
|
||||
|
||||
var _transitionable = require('../../mixins/transitionable');
|
||||
|
||||
var _transitionable2 = _interopRequireDefault(_transitionable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// Styles
|
||||
exports.default = (0, _mixins2.default)(_colorable2.default, _toggleable2.default, (0, _positionable.factory)(['left', 'bottom']), _transitionable2.default
|
||||
/* @vue/component */
|
||||
).extend({
|
||||
name: 'v-badge',
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
},
|
||||
overlap: Boolean,
|
||||
transition: {
|
||||
type: String,
|
||||
default: 'fab-transition'
|
||||
},
|
||||
value: {
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return {
|
||||
'v-badge--bottom': this.bottom,
|
||||
'v-badge--left': this.left,
|
||||
'v-badge--overlap': this.overlap
|
||||
};
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var badge = this.$slots.badge && [h('span', this.setBackgroundColor(this.color, {
|
||||
staticClass: 'v-badge__badge',
|
||||
attrs: this.$attrs,
|
||||
directives: [{
|
||||
name: 'show',
|
||||
value: this.isActive
|
||||
}]
|
||||
}), this.$slots.badge)];
|
||||
return h('span', {
|
||||
staticClass: 'v-badge',
|
||||
'class': this.classes
|
||||
}, [this.$slots.default, h('transition', {
|
||||
props: {
|
||||
name: this.transition,
|
||||
origin: this.origin,
|
||||
mode: this.mode
|
||||
}
|
||||
}, badge)]);
|
||||
}
|
||||
});
|
||||
// Mixins
|
||||
//# sourceMappingURL=VBadge.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBadge/VBadge.ts"],"names":[],"mappings":";;;;;;AACA;;AAGA;;;;AACA;;;;AACA;;AACA;;;;AAIA;;;;;;;kBAEe,sBACb,mBADa,EAEb,oBAFa,EAGb,2BAAoB,CAAC,MAAD,EAAS,QAAT,CAApB,CAHa,EAIb;AACF;AALe,EAMb,MANa,CAMN;AACP,UAAM,SADC;AAGP,WAAO;AACL,eAAO;AACL,kBAAM,MADD;AAEL,qBAAS;AAFJ,SADF;AAKL,iBAAS,OALJ;AAML,oBAAY;AACV,kBAAM,MADI;AAEV,qBAAS;AAFC,SANP;AAUL,eAAO;AACL,qBAAS;AADJ;AAVF,KAHA;AAkBP,cAAU;AACR,eADQ,qBACD;AACL,mBAAO;AACL,mCAAmB,KAAK,MADnB;AAEL,iCAAiB,KAAK,IAFjB;AAGL,oCAAoB,KAAK;AAHpB,aAAP;AAKD;AAPO,KAlBH;AA4BP,UA5BO,kBA4BC,CA5BD,EA4BE;AACP,YAAM,QAAQ,KAAK,MAAL,CAAY,KAAZ,IAAqB,CAAC,EAAE,MAAF,EAAU,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC;AAChF,yBAAa,gBADmE;AAEhF,mBAAO,KAAK,MAFoE;AAGhF,wBAAY,CAAC;AACX,sBAAM,MADK;AAEX,uBAAO,KAAK;AAFD,aAAD;AAHoE,SAApC,CAAV,EAOhC,KAAK,MAAL,CAAY,KAPoB,CAAD,CAAnC;AASA,eAAO,EAAE,MAAF,EAAU;AACf,yBAAa,SADE;AAEf,qBAAS,KAAK;AAFC,SAAV,EAGJ,CACD,KAAK,MAAL,CAAY,OADX,EAED,EAAE,YAAF,EAAgB;AACd,mBAAO;AACL,sBAAM,KAAK,UADN;AAEL,wBAAQ,KAAK,MAFR;AAGL,sBAAM,KAAK;AAHN;AADO,SAAhB,EAMG,KANH,CAFC,CAHI,CAAP;AAaD;AAnDM,CANM,C;AAVf","sourcesContent":["// Styles\nimport '../../stylus/components/_badges.styl'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Toggleable from '../../mixins/toggleable'\nimport { factory as PositionableFactory } from '../../mixins/positionable'\nimport Transitionable from '../../mixins/transitionable'\n\n// Types\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\nexport default mixins(\n Colorable,\n Toggleable,\n PositionableFactory(['left', 'bottom']),\n Transitionable\n/* @vue/component */\n).extend({\n name: 'v-badge',\n\n props: {\n color: {\n type: String,\n default: 'primary'\n },\n overlap: Boolean,\n transition: {\n type: String,\n default: 'fab-transition'\n },\n value: {\n default: true\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-badge--bottom': this.bottom,\n 'v-badge--left': this.left,\n 'v-badge--overlap': this.overlap\n }\n }\n },\n\n render (h): VNode {\n const badge = this.$slots.badge && [h('span', this.setBackgroundColor(this.color, {\n staticClass: 'v-badge__badge',\n attrs: this.$attrs,\n directives: [{\n name: 'show',\n value: this.isActive\n }]\n }), this.$slots.badge)]\n\n return h('span', {\n staticClass: 'v-badge',\n 'class': this.classes\n }, [\n this.$slots.default,\n h('transition', {\n props: {\n name: this.transition,\n origin: this.origin,\n mode: this.mode\n }\n }, badge)\n ])\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBadge = undefined;
|
||||
|
||||
var _VBadge = require('./VBadge');
|
||||
|
||||
var _VBadge2 = _interopRequireDefault(_VBadge);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBadge = _VBadge2.default;
|
||||
exports.default = _VBadge2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBadge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,M,GAAA,gB;kBACM,gB","sourcesContent":["import VBadge from './VBadge'\n\nexport { VBadge }\nexport default VBadge\n"],"sourceRoot":""}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_bottom-navs.styl');
|
||||
|
||||
var _applicationable = require('../../mixins/applicationable');
|
||||
|
||||
var _applicationable2 = _interopRequireDefault(_applicationable);
|
||||
|
||||
var _buttonGroup = require('../../mixins/button-group');
|
||||
|
||||
var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// Styles
|
||||
exports.default = (0, _mixins2.default)((0, _applicationable2.default)('bottom', ['height', 'value']), _colorable2.default, _themeable2.default
|
||||
/* @vue/component */
|
||||
).extend({
|
||||
name: 'v-bottom-nav',
|
||||
props: {
|
||||
active: [Number, String],
|
||||
mandatory: Boolean,
|
||||
height: {
|
||||
default: 56,
|
||||
type: [Number, String],
|
||||
validator: function validator(v) {
|
||||
return !isNaN(parseInt(v));
|
||||
}
|
||||
},
|
||||
shift: Boolean,
|
||||
value: null
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return {
|
||||
'v-bottom-nav--absolute': this.absolute,
|
||||
'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),
|
||||
'v-bottom-nav--shift': this.shift,
|
||||
'v-bottom-nav--active': this.value
|
||||
};
|
||||
},
|
||||
computedHeight: function computedHeight() {
|
||||
return parseInt(this.height);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateApplication: function updateApplication() {
|
||||
return !this.value ? 0 : this.computedHeight;
|
||||
},
|
||||
updateValue: function updateValue(val) {
|
||||
this.$emit('update:active', val);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
return h(_buttonGroup2.default, this.setBackgroundColor(this.color, {
|
||||
staticClass: 'v-bottom-nav',
|
||||
class: this.classes,
|
||||
style: {
|
||||
height: parseInt(this.computedHeight) + 'px'
|
||||
},
|
||||
props: {
|
||||
mandatory: Boolean(this.mandatory || this.active !== undefined),
|
||||
value: this.active
|
||||
},
|
||||
on: { change: this.updateValue }
|
||||
}), this.$slots.default);
|
||||
}
|
||||
});
|
||||
// Util
|
||||
|
||||
// Mixins
|
||||
//# sourceMappingURL=VBottomNav.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomNav/VBottomNav.ts"],"names":[],"mappings":";;;;;;AACA;;AAGA;;;;AACA;;;;AACA;;;;AACA;;;;AAGA;;;;;;;kBAMe,sBACb,+BAAgB,QAAhB,EAA0B,CACxB,QADwB,EAExB,OAFwB,CAA1B,CADa,EAKb,mBALa,EAMb;AACA;AAPa,EAQb,MARa,CAQN;AACP,UAAM,cADC;AAGP,WAAO;AACL,gBAAQ,CAAC,MAAD,EAAS,MAAT,CADH;AAEL,mBAAW,OAFN;AAGL,gBAAQ;AACN,qBAAS,EADH;AAEN,kBAAM,CAAC,MAAD,EAAS,MAAT,CAFA;AAGN,uBAAW,mBAAC,CAAD;AAAA,uBAAiC,CAAC,MAAM,SAAS,CAAT,CAAN,CAAlC;AAAA;AAHL,SAHH;AAQL,eAAO,OARF;AASL,eAAO;AATF,KAHA;AAeP,cAAU;AACR,eADQ,qBACD;AACL,mBAAO;AACL,0CAA0B,KAAK,QAD1B;AAEL,uCAAuB,CAAC,KAAK,QAAN,KAAmB,KAAK,GAAL,IAAY,KAAK,KAApC,CAFlB;AAGL,uCAAuB,KAAK,KAHvB;AAIL,wCAAwB,KAAK;AAJxB,aAAP;AAMD,SARO;AASR,sBATQ,4BASM;AACZ,mBAAO,SAAS,KAAK,MAAd,CAAP;AACD;AAXO,KAfH;AA6BP,aAAS;AACP,yBADO,+BACU;AACf,mBAAO,CAAC,KAAK,KAAN,GACH,CADG,GAEH,KAAK,cAFT;AAGD,SALM;AAMP,mBANO,uBAMM,GANN,EAMc;AACnB,iBAAK,KAAL,CAAW,eAAX,EAA4B,GAA5B;AACD;AARM,KA7BF;AAwCP,UAxCO,kBAwCC,CAxCD,EAwCE;AACP,eAAO,EAAE,qBAAF,EAAe,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC;AACxD,yBAAa,cAD2C;AAExD,mBAAO,KAAK,OAF4C;AAGxD,mBAAO;AACL,wBAAW,SAAS,KAAK,cAAd,CAAX;AADK,aAHiD;AAMxD,mBAAO;AACL,2BAAW,QAAQ,KAAK,SAAL,IAAkB,KAAK,MAAL,KAAgB,SAA1C,CADN;AAEL,uBAAO,KAAK;AAFP,aANiD;AAUxD,gBAAI,EAAE,QAAQ,KAAK,WAAf;AAVoD,SAApC,CAAf,EAWH,KAAK,MAAL,CAAY,OAXT,CAAP;AAYD;AArDM,CARM,C;AAPf;;AANA","sourcesContent":["// Styles\nimport '../../stylus/components/_bottom-navs.styl'\n\n// Mixins\nimport Applicationable from '../../mixins/applicationable'\nimport ButtonGroup from '../../mixins/button-group'\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\n\n// Util\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\nexport default mixins(\n Applicationable('bottom', [\n 'height',\n 'value'\n ]),\n Colorable,\n Themeable\n /* @vue/component */\n).extend({\n name: 'v-bottom-nav',\n\n props: {\n active: [Number, String],\n mandatory: Boolean,\n height: {\n default: 56,\n type: [Number, String],\n validator: (v: string | number): boolean => !isNaN(parseInt(v))\n },\n shift: Boolean,\n value: null as any as PropValidator<any>\n },\n\n computed: {\n classes (): object {\n return {\n 'v-bottom-nav--absolute': this.absolute,\n 'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),\n 'v-bottom-nav--shift': this.shift,\n 'v-bottom-nav--active': this.value\n }\n },\n computedHeight (): number {\n return parseInt(this.height)\n }\n },\n\n methods: {\n updateApplication (): number {\n return !this.value\n ? 0\n : this.computedHeight\n },\n updateValue (val: any) {\n this.$emit('update:active', val)\n }\n },\n\n render (h): VNode {\n return h(ButtonGroup, this.setBackgroundColor(this.color, {\n staticClass: 'v-bottom-nav',\n class: this.classes,\n style: {\n height: `${parseInt(this.computedHeight)}px`\n },\n props: {\n mandatory: Boolean(this.mandatory || this.active !== undefined),\n value: this.active\n },\n on: { change: this.updateValue }\n }), this.$slots.default)\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBottomNav = undefined;
|
||||
|
||||
var _VBottomNav = require('./VBottomNav');
|
||||
|
||||
var _VBottomNav2 = _interopRequireDefault(_VBottomNav);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBottomNav = _VBottomNav2.default;
|
||||
exports.default = _VBottomNav2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomNav/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,U,GAAA,oB;kBACM,oB","sourcesContent":["import VBottomNav from './VBottomNav'\n\nexport { VBottomNav }\nexport default VBottomNav\n"],"sourceRoot":""}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
|
||||
require('../../../src/stylus/components/_bottom-sheets.styl');
|
||||
|
||||
var _VDialog = require('../VDialog/VDialog');
|
||||
|
||||
var _VDialog2 = _interopRequireDefault(_VDialog);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = {
|
||||
name: 'v-bottom-sheet',
|
||||
props: {
|
||||
disabled: Boolean,
|
||||
fullWidth: Boolean,
|
||||
hideOverlay: Boolean,
|
||||
inset: Boolean,
|
||||
lazy: Boolean,
|
||||
maxWidth: {
|
||||
type: [String, Number],
|
||||
default: 'auto'
|
||||
},
|
||||
persistent: Boolean,
|
||||
value: null
|
||||
},
|
||||
render: function render(h) {
|
||||
var activator = h('template', {
|
||||
slot: 'activator'
|
||||
}, this.$slots.activator);
|
||||
var contentClass = ['v-bottom-sheet', this.inset ? 'v-bottom-sheet--inset' : ''].join(' ');
|
||||
return h(_VDialog2.default, {
|
||||
attrs: _extends({}, this.$props),
|
||||
on: _extends({}, this.$listeners),
|
||||
props: {
|
||||
contentClass: contentClass,
|
||||
noClickAnimation: true,
|
||||
transition: 'bottom-sheet-transition',
|
||||
value: this.value
|
||||
}
|
||||
}, [activator, this.$slots.default]);
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=VBottomSheet.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomSheet/VBottomSheet.js"],"names":[],"mappings":";;;;;;;;;;AAEA;;;;;;AAEA;kBACe;AACb,UAAM,gBADO;AAGb,WAAO;AACL,kBAAU,OADL;AAEL,mBAAW,OAFN;AAGL,qBAAa,OAHR;AAIL,eAAO,OAJF;AAKL,cAAM,OALD;AAML,kBAAU;AACR,kBAAM,CAAC,MAAD,EAAS,MAAT,CADE;AAER,qBAAS;AAFD,SANL;AAUL,oBAAY,OAVP;AAWL,eAAO;AAXF,KAHM;AAiBb,UAjBa,kBAiBL,CAjBK,EAiBJ;AACP,YAAM,YAAY,EAAE,UAAF,EAAc;AAC9B,kBAAM;AADwB,SAAd,EAEf,KAAK,MAAL,CAAY,SAFG,CAAlB;AAIA,YAAM,eAAe,CACnB,gBADmB,EAEnB,KAAK,KAAL,GAAa,uBAAb,GAAuC,EAFpB,EAGnB,IAHmB,CAGd,GAHc,CAArB;AAKA,eAAO,EAAE,iBAAF,EAAW;AAChB,gCACK,KAAK,MADV,CADgB;AAIhB,6BACK,KAAK,UADV,CAJgB;AAOhB,mBAAO;AACL,0CADK;AAEL,kCAAkB,IAFb;AAGL,4BAAY,yBAHP;AAIL,uBAAO,KAAK;AAJP;AAPS,SAAX,EAaJ,CAAC,SAAD,EAAY,KAAK,MAAL,CAAY,OAAxB,CAbI,CAAP;AAcD;AAzCY,C","sourcesContent":["import '../../stylus/components/_bottom-sheets.styl'\n\nimport VDialog from '../VDialog/VDialog'\n\n/* @vue/component */\nexport default {\n name: 'v-bottom-sheet',\n\n props: {\n disabled: Boolean,\n fullWidth: Boolean,\n hideOverlay: Boolean,\n inset: Boolean,\n lazy: Boolean,\n maxWidth: {\n type: [String, Number],\n default: 'auto'\n },\n persistent: Boolean,\n value: null\n },\n\n render (h) {\n const activator = h('template', {\n slot: 'activator'\n }, this.$slots.activator)\n\n const contentClass = [\n 'v-bottom-sheet',\n this.inset ? 'v-bottom-sheet--inset' : ''\n ].join(' ')\n\n return h(VDialog, {\n attrs: {\n ...this.$props\n },\n on: {\n ...this.$listeners\n },\n props: {\n contentClass,\n noClickAnimation: true,\n transition: 'bottom-sheet-transition',\n value: this.value\n }\n }, [activator, this.$slots.default])\n }\n}\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBottomSheet = undefined;
|
||||
|
||||
var _VBottomSheet = require('./VBottomSheet');
|
||||
|
||||
var _VBottomSheet2 = _interopRequireDefault(_VBottomSheet);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBottomSheet = _VBottomSheet2.default;
|
||||
exports.default = _VBottomSheet2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomSheet/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,Y,GAAA,sB;kBACM,sB","sourcesContent":["import VBottomSheet from './VBottomSheet'\n\nexport { VBottomSheet }\nexport default VBottomSheet\n"],"sourceRoot":""}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Components
|
||||
|
||||
// Mixins
|
||||
|
||||
// Utils
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_breadcrumbs.styl');
|
||||
|
||||
var _ = require('.');
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _console = require('../../util/console');
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.default = (0, _mixins2.default)(_themeable2.default
|
||||
/* @vue/component */
|
||||
).extend({
|
||||
name: 'v-breadcrumbs',
|
||||
props: {
|
||||
divider: {
|
||||
type: String,
|
||||
default: '/'
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: function _default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
large: Boolean,
|
||||
justifyCenter: Boolean,
|
||||
justifyEnd: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'v-breadcrumbs--large': this.large,
|
||||
'justify-center': this.justifyCenter,
|
||||
'justify-end': this.justifyEnd
|
||||
}, this.themeClasses);
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
if (this.justifyCenter) (0, _console.deprecate)('justify-center', 'class="justify-center"', this);
|
||||
if (this.justifyEnd) (0, _console.deprecate)('justify-end', 'class="justify-end"', this);
|
||||
if (this.$slots.default) (0, _console.deprecate)('default slot', ':items and scoped slot "item"', this);
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* @deprecated */
|
||||
genChildren /* istanbul ignore next */: function genChildren() {
|
||||
if (!this.$slots.default) return undefined;
|
||||
var children = [];
|
||||
var createDividers = false;
|
||||
for (var i = 0; i < this.$slots.default.length; i++) {
|
||||
var elm = this.$slots.default[i];
|
||||
if (!elm.componentOptions || elm.componentOptions.Ctor.options.name !== 'v-breadcrumbs-item') {
|
||||
children.push(elm);
|
||||
} else {
|
||||
if (createDividers) {
|
||||
children.push(this.genDivider());
|
||||
}
|
||||
children.push(elm);
|
||||
createDividers = true;
|
||||
}
|
||||
}
|
||||
return children;
|
||||
},
|
||||
genDivider: function genDivider() {
|
||||
return this.$createElement(_.VBreadcrumbsDivider, this.$slots.divider ? this.$slots.divider : this.divider);
|
||||
},
|
||||
genItems: function genItems() {
|
||||
var items = [];
|
||||
var hasSlot = !!this.$scopedSlots.item;
|
||||
var keys = [];
|
||||
for (var i = 0; i < this.items.length; i++) {
|
||||
var item = this.items[i];
|
||||
keys.push(item.text);
|
||||
if (hasSlot) items.push(this.$scopedSlots.item({ item: item }));else items.push(this.$createElement(_.VBreadcrumbsItem, { key: keys.join('.'), props: item }, [item.text]));
|
||||
if (i < this.items.length - 1) items.push(this.genDivider());
|
||||
}
|
||||
return items;
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var children = this.$slots.default ? this.genChildren() : this.genItems();
|
||||
return h('ul', {
|
||||
staticClass: 'v-breadcrumbs',
|
||||
'class': this.classes
|
||||
}, children);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBreadcrumbs.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+45
@@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _routable = require('../../mixins/routable');
|
||||
|
||||
var _routable2 = _interopRequireDefault(_routable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = (0, _mixins2.default)(_routable2.default).extend({
|
||||
name: 'v-breadcrumbs-item',
|
||||
props: {
|
||||
// In a breadcrumb, the currently
|
||||
// active item should be dimmed
|
||||
activeClass: {
|
||||
type: String,
|
||||
default: 'v-breadcrumbs__item--disabled'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _defineProperty({
|
||||
'v-breadcrumbs__item': true
|
||||
}, this.activeClass, this.disabled);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var _generateRouteLink = this.generateRouteLink(this.classes),
|
||||
tag = _generateRouteLink.tag,
|
||||
data = _generateRouteLink.data;
|
||||
|
||||
return h('li', [h(tag, data, this.$slots.default)]);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBreadcrumbsItem.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBreadcrumbs/VBreadcrumbsItem.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;;;;;;;AAGA;kBACe,sBAAO,kBAAP,EAAiB,MAAjB,CAAwB;AACrC,UAAM,oBAD+B;AAGrC,WAAO;AACL;AACA;AACA,qBAAa;AACX,kBAAM,MADK;AAEX,qBAAS;AAFE;AAHR,KAH8B;AAYrC,cAAU;AACR,eADQ,qBACD;AACL;AACE,uCAAuB;AADzB,eAEG,KAAK,WAFR,EAEsB,KAAK,QAF3B;AAID;AANO,KAZ2B;AAqBrC,UArBqC,kBAqB7B,CArB6B,EAqB5B;AAAA,iCACe,KAAK,iBAAL,CAAuB,KAAK,OAA5B,CADf;AAAA,YACC,GADD,sBACC,GADD;AAAA,YACM,IADN,sBACM,IADN;;AAGP,eAAO,EAAE,IAAF,EAAQ,CACb,EAAE,GAAF,EAAO,IAAP,EAAa,KAAK,MAAL,CAAY,OAAzB,CADa,CAAR,CAAP;AAGD;AA3BoC,CAAxB,C","sourcesContent":["import Routable from '../../mixins/routable'\n\nimport mixins from '../../util/mixins'\nimport { VNode } from 'vue'\n\n/* @vue/component */\nexport default mixins(Routable).extend({\n name: 'v-breadcrumbs-item',\n\n props: {\n // In a breadcrumb, the currently\n // active item should be dimmed\n activeClass: {\n type: String,\n default: 'v-breadcrumbs__item--disabled'\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-breadcrumbs__item': true,\n [this.activeClass]: this.disabled\n }\n }\n },\n\n render (h): VNode {\n const { tag, data } = this.generateRouteLink(this.classes)\n\n return h('li', [\n h(tag, data, this.$slots.default)\n ])\n }\n})\n"],"sourceRoot":""}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBreadcrumbsDivider = exports.VBreadcrumbsItem = exports.VBreadcrumbs = undefined;
|
||||
|
||||
var _VBreadcrumbs = require('./VBreadcrumbs');
|
||||
|
||||
var _VBreadcrumbs2 = _interopRequireDefault(_VBreadcrumbs);
|
||||
|
||||
var _VBreadcrumbsItem = require('./VBreadcrumbsItem');
|
||||
|
||||
var _VBreadcrumbsItem2 = _interopRequireDefault(_VBreadcrumbsItem);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var VBreadcrumbsDivider = (0, _helpers.createSimpleFunctional)('v-breadcrumbs__divider', 'li');
|
||||
exports.VBreadcrumbs = _VBreadcrumbs2.default;
|
||||
exports.VBreadcrumbsItem = _VBreadcrumbsItem2.default;
|
||||
exports.VBreadcrumbsDivider = VBreadcrumbsDivider;
|
||||
exports.default = {
|
||||
$_vuetify_subcomponents: {
|
||||
VBreadcrumbs: _VBreadcrumbs2.default,
|
||||
VBreadcrumbsItem: _VBreadcrumbsItem2.default,
|
||||
VBreadcrumbsDivider: VBreadcrumbsDivider
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBreadcrumbs/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA;;;;AACA;;;;AAEA,IAAM,sBAAsB,qCAAuB,wBAAvB,EAAiD,IAAjD,CAA5B;QAES,Y,GAAA,sB;QAAc,gB,GAAA,0B;QAAkB,mB,GAAA,mB;kBAE1B;AACb,6BAAyB;AACvB,4CADuB;AAEvB,oDAFuB;AAGvB;AAHuB;AADZ,C","sourcesContent":["import VBreadcrumbs from './VBreadcrumbs'\nimport VBreadcrumbsItem from './VBreadcrumbsItem'\nimport { createSimpleFunctional } from '../../util/helpers'\n\nconst VBreadcrumbsDivider = createSimpleFunctional('v-breadcrumbs__divider', 'li')\n\nexport { VBreadcrumbs, VBreadcrumbsItem, VBreadcrumbsDivider }\n\nexport default {\n $_vuetify_subcomponents: {\n VBreadcrumbs,\n VBreadcrumbsItem,\n VBreadcrumbsDivider\n }\n}\n"],"sourceRoot":""}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Components
|
||||
|
||||
// Mixins
|
||||
|
||||
// Utilities
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_buttons.styl');
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
var _VProgressCircular = require('../VProgressCircular');
|
||||
|
||||
var _VProgressCircular2 = _interopRequireDefault(_VProgressCircular);
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _groupable = require('../../mixins/groupable');
|
||||
|
||||
var _positionable = require('../../mixins/positionable');
|
||||
|
||||
var _positionable2 = _interopRequireDefault(_positionable);
|
||||
|
||||
var _routable = require('../../mixins/routable');
|
||||
|
||||
var _routable2 = _interopRequireDefault(_routable);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _toggleable = require('../../mixins/toggleable');
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
var baseMixins = (0, _mixins2.default)(_colorable2.default, _routable2.default, _positionable2.default, _themeable2.default, (0, _groupable.factory)('btnToggle'), (0, _toggleable.factory)('inputValue')
|
||||
/* @vue/component */
|
||||
);
|
||||
exports.default = baseMixins.extend().extend({
|
||||
name: 'v-btn',
|
||||
props: {
|
||||
activeClass: {
|
||||
type: String,
|
||||
default: 'v-btn--active'
|
||||
},
|
||||
block: Boolean,
|
||||
depressed: Boolean,
|
||||
fab: Boolean,
|
||||
flat: Boolean,
|
||||
icon: Boolean,
|
||||
large: Boolean,
|
||||
loading: Boolean,
|
||||
outline: Boolean,
|
||||
ripple: {
|
||||
type: [Boolean, Object],
|
||||
default: null
|
||||
},
|
||||
round: Boolean,
|
||||
small: Boolean,
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'button'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'button'
|
||||
},
|
||||
value: null
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
var _extends2;
|
||||
|
||||
return _extends((_extends2 = {
|
||||
'v-btn': true
|
||||
}, _defineProperty(_extends2, this.activeClass, this.isActive), _defineProperty(_extends2, 'v-btn--absolute', this.absolute), _defineProperty(_extends2, 'v-btn--block', this.block), _defineProperty(_extends2, 'v-btn--bottom', this.bottom), _defineProperty(_extends2, 'v-btn--disabled', this.disabled), _defineProperty(_extends2, 'v-btn--flat', this.flat), _defineProperty(_extends2, 'v-btn--floating', this.fab), _defineProperty(_extends2, 'v-btn--fixed', this.fixed), _defineProperty(_extends2, 'v-btn--icon', this.icon), _defineProperty(_extends2, 'v-btn--large', this.large), _defineProperty(_extends2, 'v-btn--left', this.left), _defineProperty(_extends2, 'v-btn--loader', this.loading), _defineProperty(_extends2, 'v-btn--outline', this.outline), _defineProperty(_extends2, 'v-btn--depressed', this.depressed && !this.flat || this.outline), _defineProperty(_extends2, 'v-btn--right', this.right), _defineProperty(_extends2, 'v-btn--round', this.round), _defineProperty(_extends2, 'v-btn--router', this.to), _defineProperty(_extends2, 'v-btn--small', this.small), _defineProperty(_extends2, 'v-btn--top', this.top), _extends2), this.themeClasses);
|
||||
},
|
||||
computedRipple: function computedRipple() {
|
||||
var defaultRipple = this.icon || this.fab ? { circle: true } : true;
|
||||
if (this.disabled) return false;else return this.ripple !== null ? this.ripple : defaultRipple;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': 'onRouteChange'
|
||||
},
|
||||
methods: {
|
||||
// Prevent focus to match md spec
|
||||
click: function click(e) {
|
||||
!this.fab && e.detail && this.$el.blur();
|
||||
this.$emit('click', e);
|
||||
this.btnToggle && this.toggle();
|
||||
},
|
||||
genContent: function genContent() {
|
||||
return this.$createElement('div', { 'class': 'v-btn__content' }, this.$slots.default);
|
||||
},
|
||||
genLoader: function genLoader() {
|
||||
return this.$createElement('span', {
|
||||
class: 'v-btn__loading'
|
||||
}, this.$slots.loader || [this.$createElement(_VProgressCircular2.default, {
|
||||
props: {
|
||||
indeterminate: true,
|
||||
size: 23,
|
||||
width: 2
|
||||
}
|
||||
})]);
|
||||
},
|
||||
onRouteChange: function onRouteChange() {
|
||||
var _this = this;
|
||||
|
||||
if (!this.to || !this.$refs.link) return;
|
||||
var path = '_vnode.data.class.' + this.activeClass;
|
||||
this.$nextTick(function () {
|
||||
if ((0, _helpers.getObjectValueByPath)(_this.$refs.link, path)) {
|
||||
_this.toggle();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var setColor = !this.outline && !this.flat && !this.disabled ? this.setBackgroundColor : this.setTextColor;
|
||||
|
||||
var _generateRouteLink = this.generateRouteLink(this.classes),
|
||||
tag = _generateRouteLink.tag,
|
||||
data = _generateRouteLink.data;
|
||||
|
||||
var children = [this.genContent(), this.loading && this.genLoader()];
|
||||
if (tag === 'button') data.attrs.type = this.type;
|
||||
data.attrs.value = ['string', 'number'].includes(_typeof(this.value)) ? this.value : JSON.stringify(this.value);
|
||||
if (this.btnToggle) {
|
||||
data.ref = 'link';
|
||||
}
|
||||
return h(tag, setColor(this.color, data), children);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBtn.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBtn = undefined;
|
||||
|
||||
var _VBtn = require('./VBtn');
|
||||
|
||||
var _VBtn2 = _interopRequireDefault(_VBtn);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBtn = _VBtn2.default;
|
||||
exports.default = _VBtn2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBtn/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,I,GAAA,c;kBACM,c","sourcesContent":["import VBtn from './VBtn'\n\nexport { VBtn }\nexport default VBtn\n"],"sourceRoot":""}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Mixins
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_button-toggle.styl');
|
||||
|
||||
var _buttonGroup = require('../../mixins/button-group');
|
||||
|
||||
var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _buttonGroup2.default.extend({
|
||||
name: 'v-btn-toggle',
|
||||
props: {
|
||||
activeClass: {
|
||||
type: String,
|
||||
default: 'v-btn--active'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({}, _buttonGroup2.default.options.computed.classes.call(this), {
|
||||
'v-btn-toggle': true,
|
||||
'v-btn-toggle--only-child': this.selectedItems.length === 1,
|
||||
'v-btn-toggle--selected': this.selectedItems.length > 0
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBtnToggle.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBtnToggle/VBtnToggle.ts"],"names":[],"mappings":";;;;;;;;AAGA;;;AAFA;;AAGA;;;;;;AAEA;kBACe,sBAAY,MAAZ,CAAmB;AAChC,UAAM,cAD0B;AAGhC,WAAO;AACL,qBAAa;AACX,kBAAM,MADK;AAEX,qBAAS;AAFE;AADR,KAHyB;AAUhC,cAAU;AACR,eADQ,qBACD;AACL,gCACK,sBAAY,OAAZ,CAAoB,QAApB,CAA6B,OAA7B,CAAqC,IAArC,CAA0C,IAA1C,CADL;AAEE,gCAAgB,IAFlB;AAGE,4CAA4B,KAAK,aAAL,CAAmB,MAAnB,KAA8B,CAH5D;AAIE,0CAA0B,KAAK,aAAL,CAAmB,MAAnB,GAA4B;AAJxD;AAMD;AARO;AAVsB,CAAnB,C","sourcesContent":["// Styles\nimport '../../stylus/components/_button-toggle.styl'\n\n// Mixins\nimport ButtonGroup from '../../mixins/button-group'\n\n/* @vue/component */\nexport default ButtonGroup.extend({\n name: 'v-btn-toggle',\n\n props: {\n activeClass: {\n type: String,\n default: 'v-btn--active'\n }\n },\n\n computed: {\n classes (): object {\n return {\n ...ButtonGroup.options.computed.classes.call(this),\n 'v-btn-toggle': true,\n 'v-btn-toggle--only-child': this.selectedItems.length === 1,\n 'v-btn-toggle--selected': this.selectedItems.length > 0\n }\n }\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBtnToggle = undefined;
|
||||
|
||||
var _VBtnToggle = require('./VBtnToggle');
|
||||
|
||||
var _VBtnToggle2 = _interopRequireDefault(_VBtnToggle);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBtnToggle = _VBtnToggle2.default;
|
||||
exports.default = _VBtnToggle2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBtnToggle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,U,GAAA,oB;kBACM,oB","sourcesContent":["import VBtnToggle from './VBtnToggle'\n\nexport { VBtnToggle }\nexport default VBtnToggle\n"],"sourceRoot":""}
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
// import '../../stylus/components/_calendar-daily.styl'
|
||||
// Mixins
|
||||
|
||||
// Util
|
||||
|
||||
// Calendars
|
||||
|
||||
|
||||
var _calendarBase = require('./mixins/calendar-base');
|
||||
|
||||
var _calendarBase2 = _interopRequireDefault(_calendarBase);
|
||||
|
||||
var _props = require('./util/props');
|
||||
|
||||
var _props2 = _interopRequireDefault(_props);
|
||||
|
||||
var _timestamp = require('./util/timestamp');
|
||||
|
||||
var _VCalendarMonthly = require('./VCalendarMonthly');
|
||||
|
||||
var _VCalendarMonthly2 = _interopRequireDefault(_VCalendarMonthly);
|
||||
|
||||
var _VCalendarDaily = require('./VCalendarDaily');
|
||||
|
||||
var _VCalendarDaily2 = _interopRequireDefault(_VCalendarDaily);
|
||||
|
||||
var _VCalendarWeekly = require('./VCalendarWeekly');
|
||||
|
||||
var _VCalendarWeekly2 = _interopRequireDefault(_VCalendarWeekly);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _calendarBase2.default.extend({
|
||||
name: 'v-calendar',
|
||||
props: _extends({}, _props2.default.calendar, _props2.default.weeks, _props2.default.intervals),
|
||||
data: function data() {
|
||||
return {
|
||||
lastStart: null,
|
||||
lastEnd: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
parsedValue: function parsedValue() {
|
||||
return (0, _timestamp.parseTimestamp)(this.value) || this.parsedStart || this.times.today;
|
||||
},
|
||||
renderProps: function renderProps() {
|
||||
var around = this.parsedValue;
|
||||
var component = 'div';
|
||||
var maxDays = this.maxDays;
|
||||
var start = around;
|
||||
var end = around;
|
||||
switch (this.type) {
|
||||
case 'month':
|
||||
component = _VCalendarMonthly2.default;
|
||||
start = (0, _timestamp.getStartOfMonth)(around);
|
||||
end = (0, _timestamp.getEndOfMonth)(around);
|
||||
break;
|
||||
case 'week':
|
||||
component = _VCalendarDaily2.default;
|
||||
start = this.getStartOfWeek(around);
|
||||
end = this.getEndOfWeek(around);
|
||||
maxDays = 7;
|
||||
break;
|
||||
case 'day':
|
||||
component = _VCalendarDaily2.default;
|
||||
maxDays = 1;
|
||||
break;
|
||||
case '4day':
|
||||
component = _VCalendarDaily2.default;
|
||||
end = (0, _timestamp.relativeDays)((0, _timestamp.copyTimestamp)(end), _timestamp.nextDay, 4);
|
||||
(0, _timestamp.updateFormatted)(end);
|
||||
maxDays = 4;
|
||||
break;
|
||||
case 'custom-weekly':
|
||||
component = _VCalendarWeekly2.default;
|
||||
start = this.parsedStart || around;
|
||||
end = this.parsedEnd;
|
||||
break;
|
||||
case 'custom-daily':
|
||||
component = _VCalendarDaily2.default;
|
||||
start = this.parsedStart || around;
|
||||
end = this.parsedEnd;
|
||||
break;
|
||||
}
|
||||
return { component: component, start: start, end: end, maxDays: maxDays };
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
renderProps: 'checkChange'
|
||||
},
|
||||
methods: {
|
||||
checkChange: function checkChange() {
|
||||
var _renderProps = this.renderProps,
|
||||
start = _renderProps.start,
|
||||
end = _renderProps.end;
|
||||
|
||||
if (start !== this.lastStart || end !== this.lastEnd) {
|
||||
this.lastStart = start;
|
||||
this.lastEnd = end;
|
||||
this.$emit('change', { start: start, end: end });
|
||||
}
|
||||
},
|
||||
move: function move() {
|
||||
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
||||
|
||||
var moved = (0, _timestamp.copyTimestamp)(this.parsedValue);
|
||||
var forward = amount > 0;
|
||||
var mover = forward ? _timestamp.nextDay : _timestamp.prevDay;
|
||||
var limit = forward ? _timestamp.DAYS_IN_MONTH_MAX : _timestamp.DAY_MIN;
|
||||
var times = forward ? amount : -amount;
|
||||
while (--times >= 0) {
|
||||
switch (this.type) {
|
||||
case 'month':
|
||||
moved.day = limit;
|
||||
mover(moved);
|
||||
break;
|
||||
case 'week':
|
||||
(0, _timestamp.relativeDays)(moved, mover, _timestamp.DAYS_IN_WEEK);
|
||||
break;
|
||||
case 'day':
|
||||
mover(moved);
|
||||
break;
|
||||
case '4day':
|
||||
(0, _timestamp.relativeDays)(moved, mover, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
(0, _timestamp.updateWeekday)(moved);
|
||||
(0, _timestamp.updateFormatted)(moved);
|
||||
(0, _timestamp.updateRelative)(moved, this.times.now);
|
||||
this.$emit('input', moved.date);
|
||||
this.$emit('moved', moved);
|
||||
},
|
||||
next: function next() {
|
||||
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
||||
|
||||
this.move(amount);
|
||||
},
|
||||
prev: function prev() {
|
||||
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
||||
|
||||
this.move(-amount);
|
||||
},
|
||||
timeToY: function timeToY(time) {
|
||||
var clamp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
||||
|
||||
var c = this.$children[0];
|
||||
if (c && c.timeToY) {
|
||||
return c.timeToY(time, clamp);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
minutesToPixels: function minutesToPixels(minutes) {
|
||||
var c = this.$children[0];
|
||||
if (c && c.minutesToPixels) {
|
||||
return c.minutesToPixels(minutes);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
},
|
||||
scrollToTime: function scrollToTime(time) {
|
||||
var c = this.$children[0];
|
||||
if (c && c.scrollToTime) {
|
||||
return c.scrollToTime(time);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var _this = this;
|
||||
|
||||
var _renderProps2 = this.renderProps,
|
||||
start = _renderProps2.start,
|
||||
end = _renderProps2.end,
|
||||
maxDays = _renderProps2.maxDays,
|
||||
component = _renderProps2.component;
|
||||
|
||||
return h(component, {
|
||||
staticClass: 'v-calendar',
|
||||
props: _extends({}, this.$props, {
|
||||
start: start.date,
|
||||
end: end.date,
|
||||
maxDays: maxDays
|
||||
}),
|
||||
on: _extends({}, this.$listeners, {
|
||||
'click:date': function clickDate(day) {
|
||||
if (_this.$listeners['input']) {
|
||||
_this.$emit('input', day.date);
|
||||
}
|
||||
if (_this.$listeners['click:date']) {
|
||||
_this.$emit('click:date', day);
|
||||
}
|
||||
}
|
||||
}),
|
||||
scopedSlots: this.$scopedSlots
|
||||
});
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCalendar.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+218
@@ -0,0 +1,218 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Directives
|
||||
|
||||
// Mixins
|
||||
|
||||
// Util
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_calendar-daily.styl');
|
||||
|
||||
var _resize = require('../../directives/resize');
|
||||
|
||||
var _resize2 = _interopRequireDefault(_resize);
|
||||
|
||||
var _calendarWithIntervals = require('./mixins/calendar-with-intervals');
|
||||
|
||||
var _calendarWithIntervals2 = _interopRequireDefault(_calendarWithIntervals);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _calendarWithIntervals2.default.extend({
|
||||
name: 'v-calendar-daily',
|
||||
directives: { Resize: _resize2.default },
|
||||
data: function data() {
|
||||
return {
|
||||
scrollPush: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'v-calendar-daily': true
|
||||
}, this.themeClasses);
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init: function init() {
|
||||
this.$nextTick(this.onResize);
|
||||
},
|
||||
onResize: function onResize() {
|
||||
this.scrollPush = this.getScrollPush();
|
||||
},
|
||||
getScrollPush: function getScrollPush() {
|
||||
var area = this.$refs.scrollArea;
|
||||
var pane = this.$refs.pane;
|
||||
return area && pane ? area.offsetWidth - pane.offsetWidth : 0;
|
||||
},
|
||||
genHead: function genHead() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-calendar-daily__head',
|
||||
style: {
|
||||
marginRight: this.scrollPush + 'px'
|
||||
}
|
||||
}, [this.genHeadIntervals()].concat(_toConsumableArray(this.genHeadDays())));
|
||||
},
|
||||
genHeadIntervals: function genHeadIntervals() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-calendar-daily__intervals-head'
|
||||
});
|
||||
},
|
||||
genHeadDays: function genHeadDays() {
|
||||
return this.days.map(this.genHeadDay);
|
||||
},
|
||||
genHeadDay: function genHeadDay(day) {
|
||||
var _this = this;
|
||||
|
||||
var slot = this.$scopedSlots.dayHeader;
|
||||
return this.$createElement('div', {
|
||||
key: day.date,
|
||||
staticClass: 'v-calendar-daily_head-day',
|
||||
class: this.getRelativeClasses(day),
|
||||
on: this.getDefaultMouseEventHandlers(':day', function (_e) {
|
||||
return _this.getSlotScope(day);
|
||||
})
|
||||
}, [this.genHeadWeekday(day), this.genHeadDayLabel(day), slot ? slot(day) : '']);
|
||||
},
|
||||
genHeadWeekday: function genHeadWeekday(day) {
|
||||
var color = day.present ? this.color : undefined;
|
||||
return this.$createElement('div', this.setTextColor(color, {
|
||||
staticClass: 'v-calendar-daily_head-weekday'
|
||||
}), this.weekdayFormatter(day, this.shortWeekdays));
|
||||
},
|
||||
genHeadDayLabel: function genHeadDayLabel(day) {
|
||||
var color = day.present ? this.color : undefined;
|
||||
return this.$createElement('div', this.setTextColor(color, {
|
||||
staticClass: 'v-calendar-daily_head-day-label',
|
||||
on: this.getMouseEventHandlers({
|
||||
'click:date': { event: 'click', stop: true },
|
||||
'contextmenu:date': { event: 'contextmenu', stop: true, prevent: true, result: false }
|
||||
}, function (_e) {
|
||||
return day;
|
||||
})
|
||||
}), this.dayFormatter(day, false));
|
||||
},
|
||||
genBody: function genBody() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-calendar-daily__body'
|
||||
}, [this.genScrollArea()]);
|
||||
},
|
||||
genScrollArea: function genScrollArea() {
|
||||
return this.$createElement('div', {
|
||||
ref: 'scrollArea',
|
||||
staticClass: 'v-calendar-daily__scroll-area'
|
||||
}, [this.genPane()]);
|
||||
},
|
||||
genPane: function genPane() {
|
||||
return this.$createElement('div', {
|
||||
ref: 'pane',
|
||||
staticClass: 'v-calendar-daily__pane',
|
||||
style: {
|
||||
height: (0, _helpers.convertToUnit)(this.bodyHeight)
|
||||
}
|
||||
}, [this.genDayContainer()]);
|
||||
},
|
||||
genDayContainer: function genDayContainer() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-calendar-daily__day-container'
|
||||
}, [this.genBodyIntervals()].concat(_toConsumableArray(this.genDays())));
|
||||
},
|
||||
genDays: function genDays() {
|
||||
return this.days.map(this.genDay);
|
||||
},
|
||||
genDay: function genDay(day, index) {
|
||||
var _this2 = this;
|
||||
|
||||
var slot = this.$scopedSlots.dayBody;
|
||||
var scope = this.getSlotScope(day);
|
||||
return this.$createElement('div', {
|
||||
key: day.date,
|
||||
staticClass: 'v-calendar-daily__day',
|
||||
class: this.getRelativeClasses(day),
|
||||
on: this.getDefaultMouseEventHandlers(':time', function (e) {
|
||||
return _this2.getSlotScope(_this2.getTimestampAtEvent(e, day));
|
||||
})
|
||||
}, [].concat(_toConsumableArray(this.genDayIntervals(index)), [slot ? slot(scope) : '']));
|
||||
},
|
||||
genDayIntervals: function genDayIntervals(index) {
|
||||
return this.intervals[index].map(this.genDayInterval);
|
||||
},
|
||||
genDayInterval: function genDayInterval(interval) {
|
||||
var height = (0, _helpers.convertToUnit)(this.intervalHeight);
|
||||
var styler = this.intervalStyle || this.intervalStyleDefault;
|
||||
var slot = this.$scopedSlots.interval;
|
||||
var scope = this.getSlotScope(interval);
|
||||
var data = {
|
||||
key: interval.time,
|
||||
staticClass: 'v-calendar-daily__day-interval',
|
||||
style: _extends({
|
||||
height: height
|
||||
}, styler(interval))
|
||||
};
|
||||
var children = slot ? slot(scope) : undefined;
|
||||
return this.$createElement('div', data, children);
|
||||
},
|
||||
genBodyIntervals: function genBodyIntervals() {
|
||||
var _this3 = this;
|
||||
|
||||
var data = {
|
||||
staticClass: 'v-calendar-daily__intervals-body',
|
||||
on: this.getDefaultMouseEventHandlers(':interval', function (e) {
|
||||
return _this3.getTimestampAtEvent(e, _this3.parsedStart);
|
||||
})
|
||||
};
|
||||
return this.$createElement('div', data, this.genIntervalLabels());
|
||||
},
|
||||
genIntervalLabels: function genIntervalLabels() {
|
||||
return this.intervals[0].map(this.genIntervalLabel);
|
||||
},
|
||||
genIntervalLabel: function genIntervalLabel(interval) {
|
||||
var height = (0, _helpers.convertToUnit)(this.intervalHeight);
|
||||
var short = this.shortIntervals;
|
||||
var shower = this.showIntervalLabel || this.showIntervalLabelDefault;
|
||||
var show = shower(interval);
|
||||
var label = show ? this.intervalFormatter(interval, short) : undefined;
|
||||
return this.$createElement('div', {
|
||||
key: interval.time,
|
||||
staticClass: 'v-calendar-daily__interval',
|
||||
style: {
|
||||
height: height
|
||||
}
|
||||
}, [this.$createElement('div', {
|
||||
staticClass: 'v-calendar-daily__interval-text'
|
||||
}, label)]);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
return h('div', {
|
||||
class: this.classes,
|
||||
nativeOn: {
|
||||
dragstart: function dragstart(e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
directives: [{
|
||||
modifiers: { quiet: true },
|
||||
name: 'resize',
|
||||
value: this.onResize
|
||||
}]
|
||||
}, [!this.hideHeader ? this.genHead() : '', this.genBody()]);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCalendarDaily.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+36
@@ -0,0 +1,36 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_calendar-weekly.styl');
|
||||
|
||||
var _VCalendarWeekly = require('./VCalendarWeekly');
|
||||
|
||||
var _VCalendarWeekly2 = _interopRequireDefault(_VCalendarWeekly);
|
||||
|
||||
var _timestamp = require('./util/timestamp');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
|
||||
// Mixins
|
||||
exports.default = _VCalendarWeekly2.default.extend({
|
||||
name: 'v-calendar-monthly',
|
||||
computed: {
|
||||
staticClass: function staticClass() {
|
||||
return 'v-calendar-monthly v-calendar-weekly';
|
||||
},
|
||||
parsedStart: function parsedStart() {
|
||||
return (0, _timestamp.getStartOfMonth)((0, _timestamp.parseTimestamp)(this.start));
|
||||
},
|
||||
parsedEnd: function parsedEnd() {
|
||||
return (0, _timestamp.getEndOfMonth)((0, _timestamp.parseTimestamp)(this.end));
|
||||
}
|
||||
}
|
||||
});
|
||||
// Util
|
||||
// Styles
|
||||
//# sourceMappingURL=VCalendarMonthly.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCalendar/VCalendarMonthly.ts"],"names":[],"mappings":";;;;;;AACA;;AAGA;;;;AAGA;;;;AAEA;;AANA;kBAOe,0BAAgB,MAAhB,CAAuB;AACpC,UAAM,oBAD8B;AAGpC,cAAU;AACR,mBADQ,yBACG;AACT,mBAAO,sCAAP;AACD,SAHO;AAIR,mBAJQ,yBAIG;AACT,mBAAO,gCAAgB,+BAAe,KAAK,KAApB,CAAhB,CAAP;AACD,SANO;AAOR,iBAPQ,uBAOC;AACP,mBAAO,8BAAc,+BAAe,KAAK,GAApB,CAAd,CAAP;AACD;AATO;AAH0B,CAAvB,C;AAJf","sourcesContent":["// Styles\nimport '../../stylus/components/_calendar-weekly.styl'\n\n// Mixins\nimport VCalendarWeekly from './VCalendarWeekly'\n\n// Util\nimport { VTimestamp, parseTimestamp, getStartOfMonth, getEndOfMonth } from './util/timestamp'\n\n/* @vue/component */\nexport default VCalendarWeekly.extend({\n name: 'v-calendar-monthly',\n\n computed: {\n staticClass (): string {\n return 'v-calendar-monthly v-calendar-weekly'\n },\n parsedStart (): VTimestamp {\n return getStartOfMonth(parseTimestamp(this.start) as VTimestamp)\n },\n parsedEnd (): VTimestamp {\n return getEndOfMonth(parseTimestamp(this.end) as VTimestamp)\n }\n }\n\n})\n"],"sourceRoot":""}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Mixins
|
||||
|
||||
// Util
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_calendar-weekly.styl');
|
||||
|
||||
var _calendarBase = require('./mixins/calendar-base');
|
||||
|
||||
var _calendarBase2 = _interopRequireDefault(_calendarBase);
|
||||
|
||||
var _props = require('./util/props');
|
||||
|
||||
var _props2 = _interopRequireDefault(_props);
|
||||
|
||||
var _timestamp = require('./util/timestamp');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _calendarBase2.default.extend({
|
||||
name: 'v-calendar-weekly',
|
||||
props: _props2.default.weeks,
|
||||
computed: {
|
||||
staticClass: function staticClass() {
|
||||
return 'v-calendar-weekly';
|
||||
},
|
||||
classes: function classes() {
|
||||
return this.themeClasses;
|
||||
},
|
||||
parsedMinWeeks: function parsedMinWeeks() {
|
||||
return parseInt(this.minWeeks);
|
||||
},
|
||||
days: function days() {
|
||||
var minDays = this.parsedMinWeeks * this.weekdays.length;
|
||||
var start = this.getStartOfWeek(this.parsedStart);
|
||||
var end = this.getEndOfWeek(this.parsedEnd);
|
||||
return (0, _timestamp.createDayList)(start, end, this.times.today, this.weekdaySkips, Number.MAX_SAFE_INTEGER, minDays);
|
||||
},
|
||||
todayWeek: function todayWeek() {
|
||||
var today = this.times.today;
|
||||
var start = this.getStartOfWeek(today);
|
||||
var end = this.getEndOfWeek(today);
|
||||
return (0, _timestamp.createDayList)(start, end, today, this.weekdaySkips, this.weekdays.length, this.weekdays.length);
|
||||
},
|
||||
monthFormatter: function monthFormatter() {
|
||||
if (this.monthFormat) {
|
||||
return this.monthFormat;
|
||||
}
|
||||
var longOptions = { timeZone: 'UTC', month: 'long' };
|
||||
var shortOptions = { timeZone: 'UTC', month: 'short' };
|
||||
return (0, _timestamp.createNativeLocaleFormatter)(this.locale, function (_tms, short) {
|
||||
return short ? shortOptions : longOptions;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isOutside: function isOutside(day) {
|
||||
var dayIdentifier = (0, _timestamp.getDayIdentifier)(day);
|
||||
return dayIdentifier < (0, _timestamp.getDayIdentifier)(this.parsedStart) || dayIdentifier > (0, _timestamp.getDayIdentifier)(this.parsedEnd);
|
||||
},
|
||||
genHead: function genHead() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-calendar-weekly__head'
|
||||
}, this.genHeadDays());
|
||||
},
|
||||
genHeadDays: function genHeadDays() {
|
||||
return this.todayWeek.map(this.genHeadDay);
|
||||
},
|
||||
genHeadDay: function genHeadDay(day, index) {
|
||||
var outside = this.isOutside(this.days[index]);
|
||||
var color = day.present ? this.color : undefined;
|
||||
return this.$createElement('div', this.setTextColor(color, {
|
||||
key: day.date,
|
||||
staticClass: 'v-calendar-weekly__head-weekday',
|
||||
class: this.getRelativeClasses(day, outside)
|
||||
}), this.weekdayFormatter(day, this.shortWeekdays));
|
||||
},
|
||||
genWeeks: function genWeeks() {
|
||||
var days = this.days;
|
||||
var weekDays = this.weekdays.length;
|
||||
var weeks = [];
|
||||
for (var i = 0; i < days.length; i += weekDays) {
|
||||
weeks.push(this.genWeek(days.slice(i, i + weekDays)));
|
||||
}
|
||||
return weeks;
|
||||
},
|
||||
genWeek: function genWeek(week) {
|
||||
return this.$createElement('div', {
|
||||
key: week[0].date,
|
||||
staticClass: 'v-calendar-weekly__week'
|
||||
}, week.map(this.genDay));
|
||||
},
|
||||
genDay: function genDay(day) {
|
||||
var outside = this.isOutside(day);
|
||||
var slot = this.$scopedSlots.day;
|
||||
var slotData = _extends({ outside: outside }, day);
|
||||
var hasMonth = day.day === 1 && this.showMonthOnFirst;
|
||||
return this.$createElement('div', {
|
||||
key: day.date,
|
||||
staticClass: 'v-calendar-weekly__day',
|
||||
class: this.getRelativeClasses(day, outside),
|
||||
on: this.getDefaultMouseEventHandlers(':day', function (_e) {
|
||||
return day;
|
||||
})
|
||||
}, [this.genDayLabel(day), hasMonth ? this.genDayMonth(day) : '', slot ? slot(slotData) : '']);
|
||||
},
|
||||
genDayLabel: function genDayLabel(day) {
|
||||
var color = day.present ? this.color : undefined;
|
||||
var slot = this.$scopedSlots.dayLabel;
|
||||
return this.$createElement('div', this.setTextColor(color, {
|
||||
staticClass: 'v-calendar-weekly__day-label',
|
||||
on: this.getMouseEventHandlers({
|
||||
'click:date': { event: 'click', stop: true },
|
||||
'contextmenu:date': { event: 'contextmenu', stop: true, prevent: true, result: false }
|
||||
}, function (_e) {
|
||||
return day;
|
||||
})
|
||||
}), slot ? slot(day) : this.dayFormatter(day, false));
|
||||
},
|
||||
genDayMonth: function genDayMonth(day) {
|
||||
var color = day.present ? this.color : undefined;
|
||||
var slot = this.$scopedSlots.dayMonth;
|
||||
return this.$createElement('div', this.setTextColor(color, {
|
||||
staticClass: 'v-calendar-weekly__day-month'
|
||||
}), slot ? slot(day) : this.monthFormatter(day, this.shortMonths));
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
return h('div', {
|
||||
staticClass: this.staticClass,
|
||||
class: this.classes,
|
||||
nativeOn: {
|
||||
dragstart: function dragstart(e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}, [!this.hideHeader ? this.genHead() : ''].concat(_toConsumableArray(this.genWeeks())));
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCalendarWeekly.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+38
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VCalendarMonthly = exports.VCalendarWeekly = exports.VCalendarDaily = exports.VCalendar = undefined;
|
||||
|
||||
var _VCalendar = require('./VCalendar');
|
||||
|
||||
var _VCalendar2 = _interopRequireDefault(_VCalendar);
|
||||
|
||||
var _VCalendarDaily = require('./VCalendarDaily');
|
||||
|
||||
var _VCalendarDaily2 = _interopRequireDefault(_VCalendarDaily);
|
||||
|
||||
var _VCalendarWeekly = require('./VCalendarWeekly');
|
||||
|
||||
var _VCalendarWeekly2 = _interopRequireDefault(_VCalendarWeekly);
|
||||
|
||||
var _VCalendarMonthly = require('./VCalendarMonthly');
|
||||
|
||||
var _VCalendarMonthly2 = _interopRequireDefault(_VCalendarMonthly);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VCalendar = _VCalendar2.default;
|
||||
exports.VCalendarDaily = _VCalendarDaily2.default;
|
||||
exports.VCalendarWeekly = _VCalendarWeekly2.default;
|
||||
exports.VCalendarMonthly = _VCalendarMonthly2.default;
|
||||
exports.default = {
|
||||
$_vuetify_subcomponents: {
|
||||
VCalendar: _VCalendar2.default,
|
||||
VCalendarDaily: _VCalendarDaily2.default,
|
||||
VCalendarWeekly: _VCalendarWeekly2.default,
|
||||
VCalendarMonthly: _VCalendarMonthly2.default
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCalendar/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA;;;;AACA;;;;AACA;;;;;;QAES,S,GAAA,mB;QAAW,c,GAAA,wB;QAAgB,e,GAAA,yB;QAAiB,gB,GAAA,0B;kBAEtC;AACb,6BAAyB;AACvB,sCADuB;AAEvB,gDAFuB;AAGvB,kDAHuB;AAIvB;AAJuB;AADZ,C","sourcesContent":["import VCalendar from './VCalendar'\nimport VCalendarDaily from './VCalendarDaily'\nimport VCalendarWeekly from './VCalendarWeekly'\nimport VCalendarMonthly from './VCalendarMonthly'\n\nexport { VCalendar, VCalendarDaily, VCalendarWeekly, VCalendarMonthly }\n\nexport default {\n $_vuetify_subcomponents: {\n VCalendar,\n VCalendarDaily,\n VCalendarWeekly,\n VCalendarMonthly\n }\n}\n"],"sourceRoot":""}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _mixins = require('../../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
var _themeable = require('../../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _colorable = require('../../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _times = require('./times');
|
||||
|
||||
var _times2 = _interopRequireDefault(_times);
|
||||
|
||||
var _mouse = require('./mouse');
|
||||
|
||||
var _mouse2 = _interopRequireDefault(_mouse);
|
||||
|
||||
var _props = require('../util/props');
|
||||
|
||||
var _props2 = _interopRequireDefault(_props);
|
||||
|
||||
var _timestamp = require('../util/timestamp');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
|
||||
// Util
|
||||
exports.default = (0, _mixins2.default)(_colorable2.default, _themeable2.default, _times2.default, _mouse2.default).extend({
|
||||
name: 'calendar-base',
|
||||
props: _props2.default.base,
|
||||
computed: {
|
||||
weekdaySkips: function weekdaySkips() {
|
||||
return (0, _timestamp.getWeekdaySkips)(this.weekdays);
|
||||
},
|
||||
parsedStart: function parsedStart() {
|
||||
return (0, _timestamp.parseTimestamp)(this.start);
|
||||
},
|
||||
parsedEnd: function parsedEnd() {
|
||||
return (0, _timestamp.parseTimestamp)(this.end);
|
||||
},
|
||||
days: function days() {
|
||||
return (0, _timestamp.createDayList)(this.parsedStart, this.parsedEnd, this.times.today, this.weekdaySkips);
|
||||
},
|
||||
dayFormatter: function dayFormatter() {
|
||||
if (this.dayFormat) {
|
||||
return this.dayFormat;
|
||||
}
|
||||
var options = { timeZone: 'UTC', day: 'numeric' };
|
||||
return (0, _timestamp.createNativeLocaleFormatter)(this.locale, function (_tms, _short) {
|
||||
return options;
|
||||
});
|
||||
},
|
||||
weekdayFormatter: function weekdayFormatter() {
|
||||
if (this.weekdayFormat) {
|
||||
return this.weekdayFormat;
|
||||
}
|
||||
var longOptions = { timeZone: 'UTC', weekday: 'long' };
|
||||
var shortOptions = { timeZone: 'UTC', weekday: 'short' };
|
||||
return (0, _timestamp.createNativeLocaleFormatter)(this.locale, function (_tms, short) {
|
||||
return short ? shortOptions : longOptions;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getRelativeClasses: function getRelativeClasses(timestamp) {
|
||||
var outside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
|
||||
return {
|
||||
'v-present': timestamp.present,
|
||||
'v-past': timestamp.past,
|
||||
'v-future': timestamp.future,
|
||||
'v-outside': outside
|
||||
};
|
||||
},
|
||||
getStartOfWeek: function getStartOfWeek(timestamp) {
|
||||
return (0, _timestamp.getStartOfWeek)(timestamp, this.weekdays, this.times.today);
|
||||
},
|
||||
getEndOfWeek: function getEndOfWeek(timestamp) {
|
||||
return (0, _timestamp.getEndOfWeek)(timestamp, this.weekdays, this.times.today);
|
||||
}
|
||||
}
|
||||
}); // Mixins
|
||||
//# sourceMappingURL=calendar-base.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/VCalendar/mixins/calendar-base.ts"],"names":[],"mappings":";;;;;;AAEA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAGA;;;;AACA;;;;AAWA;;AAbA;kBAce,sBAAO,mBAAP,EAAkB,mBAAlB,EAA6B,eAA7B,EAAoC,eAApC,EAA2C,MAA3C,CAAkD;AAC/D,UAAM,eADyD;AAG/D,WAAO,gBAAM,IAHkD;AAK/D,cAAU;AACR,oBADQ,0BACI;AACV,mBAAO,gCAAgB,KAAK,QAArB,CAAP;AACD,SAHO;AAIR,mBAJQ,yBAIG;AACT,mBAAO,+BAAe,KAAK,KAApB,CAAP;AACD,SANO;AAOR,iBAPQ,uBAOC;AACP,mBAAO,+BAAe,KAAK,GAApB,CAAP;AACD,SATO;AAUR,YAVQ,kBAUJ;AACF,mBAAO,8BACL,KAAK,WADA,EAEL,KAAK,SAFA,EAGL,KAAK,KAAL,CAAW,KAHN,EAIL,KAAK,YAJA,CAAP;AAMD,SAjBO;AAkBR,oBAlBQ,0BAkBI;AACV,gBAAI,KAAK,SAAT,EAAoB;AAClB,uBAAO,KAAK,SAAZ;AACD;AAED,gBAAM,UAAU,EAAE,UAAU,KAAZ,EAAmB,KAAK,SAAxB,EAAhB;AAEA,mBAAO,4CACL,KAAK,MADA,EAEL,UAAC,IAAD,EAAO,MAAP;AAAA,uBAAkB,OAAlB;AAAA,aAFK,CAAP;AAID,SA7BO;AA8BR,wBA9BQ,8BA8BQ;AACd,gBAAI,KAAK,aAAT,EAAwB;AACtB,uBAAO,KAAK,aAAZ;AACD;AAED,gBAAM,cAAc,EAAE,UAAU,KAAZ,EAAmB,SAAS,MAA5B,EAApB;AACA,gBAAM,eAAe,EAAE,UAAU,KAAZ,EAAmB,SAAS,OAA5B,EAArB;AAEA,mBAAO,4CACL,KAAK,MADA,EAEL,UAAC,IAAD,EAAO,KAAP;AAAA,uBAAiB,QAAQ,YAAR,GAAuB,WAAxC;AAAA,aAFK,CAAP;AAID;AA1CO,KALqD;AAkD/D,aAAS;AACP,0BADO,8BACa,SADb,EACmD;AAAA,gBAAf,OAAe,uEAAL,KAAK;;AACxD,mBAAO;AACL,6BAAa,UAAU,OADlB;AAEL,0BAAU,UAAU,IAFf;AAGL,4BAAY,UAAU,MAHjB;AAIL,6BAAa;AAJR,aAAP;AAMD,SARM;AASP,sBATO,0BASS,SATT,EAS8B;AACnC,mBAAO,+BAAe,SAAf,EAA0B,KAAK,QAA/B,EAAyC,KAAK,KAAL,CAAW,KAApD,CAAP;AACD,SAXM;AAYP,oBAZO,wBAYO,SAZP,EAY4B;AACjC,mBAAO,6BAAa,SAAb,EAAwB,KAAK,QAA7B,EAAuC,KAAK,KAAL,CAAW,KAAlD,CAAP;AACD;AAdM;AAlDsD,CAAlD,C","sourcesContent":["\n// Mixins\nimport mixins from '../../../util/mixins'\nimport Themeable from '../../../mixins/themeable'\nimport Colorable from '../../../mixins/colorable'\nimport Times from './times'\nimport Mouse from './mouse'\n\n// Util\nimport props from '../util/props'\nimport {\n VTimestamp,\n VTimestampFormatter,\n parseTimestamp,\n getWeekdaySkips,\n createDayList,\n createNativeLocaleFormatter,\n getStartOfWeek,\n getEndOfWeek\n} from '../util/timestamp'\n\n/* @vue/component */\nexport default mixins(Colorable, Themeable, Times, Mouse).extend({\n name: 'calendar-base',\n\n props: props.base,\n\n computed: {\n weekdaySkips (): number[] {\n return getWeekdaySkips(this.weekdays)\n },\n parsedStart (): VTimestamp {\n return parseTimestamp(this.start) as VTimestamp\n },\n parsedEnd (): VTimestamp {\n return parseTimestamp(this.end) as VTimestamp\n },\n days (): VTimestamp[] {\n return createDayList(\n this.parsedStart,\n this.parsedEnd,\n this.times.today,\n this.weekdaySkips\n )\n },\n dayFormatter (): VTimestampFormatter {\n if (this.dayFormat) {\n return this.dayFormat as VTimestampFormatter\n }\n\n const options = { timeZone: 'UTC', day: 'numeric' }\n\n return createNativeLocaleFormatter(\n this.locale,\n (_tms, _short) => options\n )\n },\n weekdayFormatter (): VTimestampFormatter {\n if (this.weekdayFormat) {\n return this.weekdayFormat as VTimestampFormatter\n }\n\n const longOptions = { timeZone: 'UTC', weekday: 'long' }\n const shortOptions = { timeZone: 'UTC', weekday: 'short' }\n\n return createNativeLocaleFormatter(\n this.locale,\n (_tms, short) => short ? shortOptions : longOptions\n )\n }\n },\n\n methods: {\n getRelativeClasses (timestamp: VTimestamp, outside = false): object {\n return {\n 'v-present': timestamp.present,\n 'v-past': timestamp.past,\n 'v-future': timestamp.future,\n 'v-outside': outside\n }\n },\n getStartOfWeek (timestamp: VTimestamp): VTimestamp {\n return getStartOfWeek(timestamp, this.weekdays, this.times.today)\n },\n getEndOfWeek (timestamp: VTimestamp): VTimestamp {\n return getEndOfWeek(timestamp, this.weekdays, this.times.today)\n }\n }\n})\n"],"sourceRoot":""}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _calendarBase = require('./calendar-base');
|
||||
|
||||
var _calendarBase2 = _interopRequireDefault(_calendarBase);
|
||||
|
||||
var _props = require('../util/props');
|
||||
|
||||
var _props2 = _interopRequireDefault(_props);
|
||||
|
||||
var _timestamp = require('../util/timestamp');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
|
||||
// Util
|
||||
exports.default = _calendarBase2.default.extend({
|
||||
name: 'calendar-with-intervals',
|
||||
props: _props2.default.intervals,
|
||||
computed: {
|
||||
parsedFirstInterval: function parsedFirstInterval() {
|
||||
return parseInt(this.firstInterval);
|
||||
},
|
||||
parsedIntervalMinutes: function parsedIntervalMinutes() {
|
||||
return parseInt(this.intervalMinutes);
|
||||
},
|
||||
parsedIntervalCount: function parsedIntervalCount() {
|
||||
return parseInt(this.intervalCount);
|
||||
},
|
||||
parsedIntervalHeight: function parsedIntervalHeight() {
|
||||
return parseFloat(this.intervalHeight);
|
||||
},
|
||||
firstMinute: function firstMinute() {
|
||||
return this.parsedFirstInterval * this.parsedIntervalMinutes;
|
||||
},
|
||||
bodyHeight: function bodyHeight() {
|
||||
return this.parsedIntervalCount * this.parsedIntervalHeight;
|
||||
},
|
||||
days: function days() {
|
||||
return (0, _timestamp.createDayList)(this.parsedStart, this.parsedEnd, this.times.today, this.weekdaySkips, this.maxDays);
|
||||
},
|
||||
intervals: function intervals() {
|
||||
var days = this.days;
|
||||
var first = this.parsedFirstInterval;
|
||||
var minutes = this.parsedIntervalMinutes;
|
||||
var count = this.parsedIntervalCount;
|
||||
var now = this.times.now;
|
||||
return days.map(function (d) {
|
||||
return (0, _timestamp.createIntervalList)(d, first, minutes, count, now);
|
||||
});
|
||||
},
|
||||
intervalFormatter: function intervalFormatter() {
|
||||
if (this.intervalFormat) {
|
||||
return this.intervalFormat;
|
||||
}
|
||||
var longOptions = { timeZone: 'UTC', hour12: true, hour: '2-digit', minute: '2-digit' };
|
||||
var shortOptions = { timeZone: 'UTC', hour12: true, hour: 'numeric', minute: '2-digit' };
|
||||
var shortHourOptions = { timeZone: 'UTC', hour12: true, hour: 'numeric' };
|
||||
return (0, _timestamp.createNativeLocaleFormatter)(this.locale, function (tms, short) {
|
||||
return short ? tms.minute === 0 ? shortHourOptions : shortOptions : longOptions;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showIntervalLabelDefault: function showIntervalLabelDefault(interval) {
|
||||
var first = this.intervals[0][0];
|
||||
var isFirst = first.hour === interval.hour && first.minute === interval.minute;
|
||||
return !isFirst && interval.minute === 0;
|
||||
},
|
||||
intervalStyleDefault: function intervalStyleDefault(_interval) {
|
||||
return undefined;
|
||||
},
|
||||
getTimestampAtEvent: function getTimestampAtEvent(e, day) {
|
||||
var timestamp = (0, _timestamp.copyTimestamp)(day);
|
||||
var bounds = e.currentTarget.getBoundingClientRect();
|
||||
var baseMinutes = this.firstMinute;
|
||||
var touchEvent = e;
|
||||
var mouseEvent = e;
|
||||
var touches = touchEvent.changedTouches || touchEvent.touches;
|
||||
var clientY = touches && touches[0] ? touches[0].clientY : mouseEvent.clientY;
|
||||
var addIntervals = (clientY - bounds.top) / this.parsedIntervalHeight;
|
||||
var addMinutes = Math.floor(addIntervals * this.parsedIntervalMinutes);
|
||||
var minutes = baseMinutes + addMinutes;
|
||||
return (0, _timestamp.updateMinutes)(timestamp, minutes, this.times.now);
|
||||
},
|
||||
getSlotScope: function getSlotScope(timestamp) {
|
||||
var scope = (0, _timestamp.copyTimestamp)(timestamp);
|
||||
scope.timeToY = this.timeToY;
|
||||
scope.minutesToPixels = this.minutesToPixels;
|
||||
return scope;
|
||||
},
|
||||
scrollToTime: function scrollToTime(time) {
|
||||
var y = this.timeToY(time);
|
||||
var pane = this.$refs.scrollArea;
|
||||
if (y === false || !pane) {
|
||||
return false;
|
||||
}
|
||||
pane.scrollTop = y;
|
||||
return true;
|
||||
},
|
||||
minutesToPixels: function minutesToPixels(minutes) {
|
||||
return minutes / this.parsedIntervalMinutes * this.parsedIntervalHeight;
|
||||
},
|
||||
timeToY: function timeToY(time) {
|
||||
var clamp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
||||
|
||||
var minutes = (0, _timestamp.parseTime)(time);
|
||||
if (minutes === false) {
|
||||
return false;
|
||||
}
|
||||
var min = this.firstMinute;
|
||||
var gap = this.parsedIntervalCount * this.parsedIntervalMinutes;
|
||||
var delta = (minutes - min) / gap;
|
||||
var y = delta * this.bodyHeight;
|
||||
if (clamp) {
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
if (y > this.bodyHeight) {
|
||||
y = this.bodyHeight;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}); // Mixins
|
||||
//# sourceMappingURL=calendar-with-intervals.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
+67
@@ -0,0 +1,67 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _vue = require('vue');
|
||||
|
||||
var _vue2 = _interopRequireDefault(_vue);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
exports.default = _vue2.default.extend({
|
||||
name: 'mouse',
|
||||
methods: {
|
||||
getDefaultMouseEventHandlers: function getDefaultMouseEventHandlers(suffix, getEvent) {
|
||||
var _getMouseEventHandler;
|
||||
|
||||
return this.getMouseEventHandlers((_getMouseEventHandler = {}, _defineProperty(_getMouseEventHandler, 'click' + suffix, { event: 'click' }), _defineProperty(_getMouseEventHandler, 'contextmenu' + suffix, { event: 'contextmenu', prevent: true, result: false }), _defineProperty(_getMouseEventHandler, 'mousedown' + suffix, { event: 'mousedown' }), _defineProperty(_getMouseEventHandler, 'mousemove' + suffix, { event: 'mousemove' }), _defineProperty(_getMouseEventHandler, 'mouseup' + suffix, { event: 'mouseup' }), _defineProperty(_getMouseEventHandler, 'mouseenter' + suffix, { event: 'mouseenter' }), _defineProperty(_getMouseEventHandler, 'mouseleave' + suffix, { event: 'mouseleave' }), _defineProperty(_getMouseEventHandler, 'touchstart' + suffix, { event: 'touchstart' }), _defineProperty(_getMouseEventHandler, 'touchmove' + suffix, { event: 'touchmove' }), _defineProperty(_getMouseEventHandler, 'touchend' + suffix, { event: 'touchend' }), _getMouseEventHandler), getEvent);
|
||||
},
|
||||
getMouseEventHandlers: function getMouseEventHandlers(events, getEvent) {
|
||||
var _this = this;
|
||||
|
||||
var on = {};
|
||||
|
||||
var _loop = function _loop(event) {
|
||||
var eventOptions = events[event];
|
||||
if (!_this.$listeners[event]) return 'continue';
|
||||
// TODO somehow pull in modifiers
|
||||
var prefix = eventOptions.passive ? '&' : (eventOptions.once ? '~' : '') + (eventOptions.capture ? '!' : '');
|
||||
var key = prefix + eventOptions.event;
|
||||
var handler = function handler(e) {
|
||||
var mouseEvent = e;
|
||||
if (eventOptions.button === undefined || mouseEvent.buttons > 0 && mouseEvent.button === eventOptions.button) {
|
||||
if (eventOptions.prevent) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (eventOptions.stop) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
_this.$emit(event, getEvent(e));
|
||||
}
|
||||
return eventOptions.result;
|
||||
};
|
||||
if (key in on) {
|
||||
if (Array.isArray(on[key])) {
|
||||
on[key].push(handler);
|
||||
} else {
|
||||
on[key] = [on[key], handler];
|
||||
}
|
||||
} else {
|
||||
on[key] = handler;
|
||||
}
|
||||
};
|
||||
|
||||
for (var event in events) {
|
||||
var _ret = _loop(event);
|
||||
|
||||
if (_ret === 'continue') continue;
|
||||
}
|
||||
return on;
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=mouse.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/VCalendar/mixins/mouse.ts"],"names":[],"mappings":";;;;;;;;;;;;;;kBAqBe,cAAI,MAAJ,CAAW;AACxB,UAAM,OADkB;AAGxB,aAAS;AACP,oCADO,wCACuB,MADvB,EACuC,QADvC,EAC6D;AAAA;;AAClE,mBAAO,KAAK,qBAAL,qEACJ,UAAU,MADN,EACe,EAAE,OAAO,OAAT,EADf,0CAEJ,gBAAgB,MAFZ,EAEqB,EAAE,OAAO,aAAT,EAAwB,SAAS,IAAjC,EAAuC,QAAQ,KAA/C,EAFrB,0CAGJ,cAAc,MAHV,EAGmB,EAAE,OAAO,WAAT,EAHnB,0CAIJ,cAAc,MAJV,EAImB,EAAE,OAAO,WAAT,EAJnB,0CAKJ,YAAY,MALR,EAKiB,EAAE,OAAO,SAAT,EALjB,0CAMJ,eAAe,MANX,EAMoB,EAAE,OAAO,YAAT,EANpB,0CAOJ,eAAe,MAPX,EAOoB,EAAE,OAAO,YAAT,EAPpB,0CAQJ,eAAe,MARX,EAQoB,EAAE,OAAO,YAAT,EARpB,0CASJ,cAAc,MATV,EASmB,EAAE,OAAO,WAAT,EATnB,0CAUJ,aAAa,MAVT,EAUkB,EAAE,OAAO,UAAT,EAVlB,2BAWJ,QAXI,CAAP;AAYD,SAdM;AAeP,6BAfO,iCAegB,MAfhB,EAeqC,QAfrC,EAe2D;AAAA;;AAChE,gBAAM,KAAqB,EAA3B;;AADgE,uCAGrD,KAHqD;AAI9D,oBAAM,eAAe,OAAO,KAAP,CAArB;AAEA,oBAAI,CAAC,MAAK,UAAL,CAAgB,KAAhB,CAAL,EAA6B;AAE7B;AAEA,oBAAM,SAAS,aAAa,OAAb,GAAuB,GAAvB,GAA8B,CAAC,aAAa,IAAb,GAAoB,GAApB,GAA0B,EAA3B,KAAkC,aAAa,OAAb,GAAuB,GAAvB,GAA6B,EAA/D,CAA7C;AACA,oBAAM,MAAM,SAAS,aAAa,KAAlC;AAEA,oBAAM,UAAwB,SAAxB,OAAwB,IAAI;AAChC,wBAAM,aAAyB,CAA/B;AACA,wBAAI,aAAa,MAAb,KAAwB,SAAxB,IAAsC,WAAW,OAAX,GAAqB,CAArB,IAA0B,WAAW,MAAX,KAAsB,aAAa,MAAvG,EAAgH;AAC9G,4BAAI,aAAa,OAAjB,EAA0B;AACxB,8BAAE,cAAF;AACD;AACD,4BAAI,aAAa,IAAjB,EAAuB;AACrB,8BAAE,eAAF;AACD;AACD,8BAAK,KAAL,CAAW,KAAX,EAAkB,SAAS,CAAT,CAAlB;AACD;AAED,2BAAO,aAAa,MAApB;AACD,iBAbD;AAeA,oBAAI,OAAO,EAAX,EAAe;AACb,wBAAI,MAAM,OAAN,CAAc,GAAG,GAAH,CAAd,CAAJ,EAA4B;AACzB,2BAAG,GAAH,EAA2B,IAA3B,CAAgC,OAAhC;AACF,qBAFD,MAEO;AACL,2BAAG,GAAH,IAAU,CAAC,GAAG,GAAH,CAAD,EAAU,OAAV,CAAV;AACD;AACF,iBAND,MAMO;AACL,uBAAG,GAAH,IAAU,OAAV;AACD;AApC6D;;AAGhE,iBAAK,IAAM,KAAX,IAAoB,MAApB,EAA4B;AAAA,iCAAjB,KAAiB;;AAAA,yCAGG;AA+B9B;AAED,mBAAO,EAAP;AACD;AAvDM;AAHe,CAAX,C","sourcesContent":["import Vue from 'vue'\n\nexport type MouseHandler = (e: MouseEvent | TouchEvent) => any\n\nexport type MouseEvents = {\n [event: string]: {\n event: string\n passive?: boolean\n capture?: boolean\n once?: boolean\n stop?: boolean\n prevent?: boolean\n button?: number\n result?: any\n }\n}\n\nexport type MouseEventsMap = {\n [event: string]: MouseHandler | MouseHandler[]\n}\n\nexport default Vue.extend({\n name: 'mouse',\n\n methods: {\n getDefaultMouseEventHandlers (suffix: string, getEvent: MouseHandler): MouseEventsMap {\n return this.getMouseEventHandlers({\n ['click' + suffix]: { event: 'click' },\n ['contextmenu' + suffix]: { event: 'contextmenu', prevent: true, result: false },\n ['mousedown' + suffix]: { event: 'mousedown' },\n ['mousemove' + suffix]: { event: 'mousemove' },\n ['mouseup' + suffix]: { event: 'mouseup' },\n ['mouseenter' + suffix]: { event: 'mouseenter' },\n ['mouseleave' + suffix]: { event: 'mouseleave' },\n ['touchstart' + suffix]: { event: 'touchstart' },\n ['touchmove' + suffix]: { event: 'touchmove' },\n ['touchend' + suffix]: { event: 'touchend' }\n }, getEvent)\n },\n getMouseEventHandlers (events: MouseEvents, getEvent: MouseHandler): MouseEventsMap {\n const on: MouseEventsMap = {}\n\n for (const event in events) {\n const eventOptions = events[event]\n\n if (!this.$listeners[event]) continue\n\n // TODO somehow pull in modifiers\n\n const prefix = eventOptions.passive ? '&' : ((eventOptions.once ? '~' : '') + (eventOptions.capture ? '!' : ''))\n const key = prefix + eventOptions.event\n\n const handler: MouseHandler = e => {\n const mouseEvent: MouseEvent = e as MouseEvent\n if (eventOptions.button === undefined || (mouseEvent.buttons > 0 && mouseEvent.button === eventOptions.button)) {\n if (eventOptions.prevent) {\n e.preventDefault()\n }\n if (eventOptions.stop) {\n e.stopPropagation()\n }\n this.$emit(event, getEvent(e))\n }\n\n return eventOptions.result\n }\n\n if (key in on) {\n if (Array.isArray(on[key])) {\n (on[key] as MouseHandler[]).push(handler)\n } else {\n on[key] = [on[key], handler] as MouseHandler[]\n }\n } else {\n on[key] = handler\n }\n }\n\n return on\n }\n }\n})\n"],"sourceRoot":""}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _vue = require('vue');
|
||||
|
||||
var _vue2 = _interopRequireDefault(_vue);
|
||||
|
||||
var _timestamp = require('../util/timestamp');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.default = _vue2.default.extend({
|
||||
name: 'times',
|
||||
props: {
|
||||
now: {
|
||||
type: String,
|
||||
validator: _timestamp.validateTimestamp
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
times: {
|
||||
now: (0, _timestamp.parseTimestamp)('0000-00-00 00:00'),
|
||||
today: (0, _timestamp.parseTimestamp)('0000-00-00')
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
parsedNow: function parsedNow() {
|
||||
return this.now ? (0, _timestamp.parseTimestamp)(this.now) : null;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
parsedNow: 'updateTimes'
|
||||
},
|
||||
created: function created() {
|
||||
this.updateTimes();
|
||||
this.setPresent();
|
||||
},
|
||||
|
||||
methods: {
|
||||
setPresent: function setPresent() {
|
||||
this.times.now.present = this.times.today.present = true;
|
||||
this.times.now.past = this.times.today.past = false;
|
||||
this.times.now.future = this.times.today.future = false;
|
||||
},
|
||||
updateTimes: function updateTimes() {
|
||||
var now = this.parsedNow || this.getNow();
|
||||
this.updateDay(now, this.times.now);
|
||||
this.updateTime(now, this.times.now);
|
||||
this.updateDay(now, this.times.today);
|
||||
},
|
||||
getNow: function getNow() {
|
||||
return (0, _timestamp.parseDate)(new Date());
|
||||
},
|
||||
updateDay: function updateDay(now, target) {
|
||||
if (now.date !== target.date) {
|
||||
target.year = now.year;
|
||||
target.month = now.month;
|
||||
target.day = now.day;
|
||||
target.weekday = now.weekday;
|
||||
target.date = now.date;
|
||||
}
|
||||
},
|
||||
updateTime: function updateTime(now, target) {
|
||||
if (now.time !== target.time) {
|
||||
target.hour = now.hour;
|
||||
target.minute = now.minute;
|
||||
target.time = now.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=times.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/VCalendar/mixins/times.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;;;kBAOe,cAAI,MAAJ,CAAW;AACxB,UAAM,OADkB;AAGxB,WAAO;AACL,aAAK;AACH,kBAAM,MADH;AAEH,uBAAW;AAFR;AADA,KAHiB;AAUxB,UAAM;AAAA,eAAO;AACX,mBAAO;AACL,qBAAK,+BAAe,kBAAf,CADA;AAEL,uBAAO,+BAAe,YAAf;AAFF;AADI,SAAP;AAAA,KAVkB;AAiBxB,cAAU;AACR,iBADQ,uBACC;AACP,mBAAO,KAAK,GAAL,GAAW,+BAAe,KAAK,GAApB,CAAX,GAAsC,IAA7C;AACD;AAHO,KAjBc;AAuBxB,WAAO;AACL,mBAAW;AADN,KAvBiB;AA2BxB,WA3BwB,qBA2BjB;AACL,aAAK,WAAL;AACA,aAAK,UAAL;AACD,KA9BuB;;AAgCxB,aAAS;AACP,kBADO,wBACG;AACR,iBAAK,KAAL,CAAW,GAAX,CAAe,OAAf,GAAyB,KAAK,KAAL,CAAW,KAAX,CAAiB,OAAjB,GAA2B,IAApD;AACA,iBAAK,KAAL,CAAW,GAAX,CAAe,IAAf,GAAsB,KAAK,KAAL,CAAW,KAAX,CAAiB,IAAjB,GAAwB,KAA9C;AACA,iBAAK,KAAL,CAAW,GAAX,CAAe,MAAf,GAAwB,KAAK,KAAL,CAAW,KAAX,CAAiB,MAAjB,GAA0B,KAAlD;AACD,SALM;AAMP,mBANO,yBAMI;AACT,gBAAM,MAAkB,KAAK,SAAL,IAAkB,KAAK,MAAL,EAA1C;AACA,iBAAK,SAAL,CAAe,GAAf,EAAoB,KAAK,KAAL,CAAW,GAA/B;AACA,iBAAK,UAAL,CAAgB,GAAhB,EAAqB,KAAK,KAAL,CAAW,GAAhC;AACA,iBAAK,SAAL,CAAe,GAAf,EAAoB,KAAK,KAAL,CAAW,KAA/B;AACD,SAXM;AAYP,cAZO,oBAYD;AACJ,mBAAO,0BAAU,IAAI,IAAJ,EAAV,CAAP;AACD,SAdM;AAeP,iBAfO,qBAeI,GAfJ,EAeqB,MAfrB,EAeuC;AAC5C,gBAAI,IAAI,IAAJ,KAAa,OAAO,IAAxB,EAA8B;AAC5B,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACA,uBAAO,KAAP,GAAe,IAAI,KAAnB;AACA,uBAAO,GAAP,GAAa,IAAI,GAAjB;AACA,uBAAO,OAAP,GAAiB,IAAI,OAArB;AACA,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACD;AACF,SAvBM;AAwBP,kBAxBO,sBAwBK,GAxBL,EAwBsB,MAxBtB,EAwBwC;AAC7C,gBAAI,IAAI,IAAJ,KAAa,OAAO,IAAxB,EAA8B;AAC5B,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACA,uBAAO,MAAP,GAAgB,IAAI,MAApB;AACA,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACD;AACF;AA9BM;AAhCe,CAAX,C","sourcesContent":["import Vue from 'vue'\n\nimport {\n VTimestamp,\n validateTimestamp,\n parseTimestamp,\n parseDate\n} from '../util/timestamp'\n\nexport default Vue.extend({\n name: 'times',\n\n props: {\n now: {\n type: String,\n validator: validateTimestamp\n }\n },\n\n data: () => ({\n times: {\n now: parseTimestamp('0000-00-00 00:00') as VTimestamp,\n today: parseTimestamp('0000-00-00') as VTimestamp\n }\n }),\n\n computed: {\n parsedNow (): VTimestamp | null {\n return this.now ? parseTimestamp(this.now) : null\n }\n },\n\n watch: {\n parsedNow: 'updateTimes'\n },\n\n created () {\n this.updateTimes()\n this.setPresent()\n },\n\n methods: {\n setPresent (): void {\n this.times.now.present = this.times.today.present = true\n this.times.now.past = this.times.today.past = false\n this.times.now.future = this.times.today.future = false\n },\n updateTimes (): void {\n const now: VTimestamp = this.parsedNow || this.getNow()\n this.updateDay(now, this.times.now)\n this.updateTime(now, this.times.now)\n this.updateDay(now, this.times.today)\n },\n getNow (): VTimestamp {\n return parseDate(new Date())\n },\n updateDay (now: VTimestamp, target: VTimestamp): void {\n if (now.date !== target.date) {\n target.year = now.year\n target.month = now.month\n target.day = now.day\n target.weekday = now.weekday\n target.date = now.date\n }\n },\n updateTime (now: VTimestamp, target: VTimestamp): void {\n if (now.time !== target.time) {\n target.hour = now.hour\n target.minute = now.minute\n target.time = now.time\n }\n }\n }\n})\n"],"sourceRoot":""}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _timestamp = require('./timestamp');
|
||||
|
||||
exports.default = {
|
||||
base: {
|
||||
start: {
|
||||
type: String,
|
||||
validate: _timestamp.validateTimestamp,
|
||||
default: function _default() {
|
||||
return (0, _timestamp.parseDate)(new Date()).date;
|
||||
}
|
||||
},
|
||||
end: {
|
||||
type: String,
|
||||
validate: _timestamp.validateTimestamp,
|
||||
default: '0000-00-00'
|
||||
},
|
||||
weekdays: {
|
||||
type: Array,
|
||||
default: function _default() {
|
||||
return [0, 1, 2, 3, 4, 5, 6];
|
||||
}
|
||||
},
|
||||
hideHeader: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
shortWeekdays: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
weekdayFormat: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
dayFormat: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
locale: {
|
||||
type: String,
|
||||
default: 'en-us'
|
||||
}
|
||||
},
|
||||
intervals: {
|
||||
maxDays: {
|
||||
type: Number,
|
||||
default: 7
|
||||
},
|
||||
shortIntervals: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
intervalHeight: {
|
||||
type: [Number, String],
|
||||
default: 40,
|
||||
validate: validateNumber
|
||||
},
|
||||
intervalMinutes: {
|
||||
type: [Number, String],
|
||||
default: 60,
|
||||
validate: validateNumber
|
||||
},
|
||||
firstInterval: {
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
validate: validateNumber
|
||||
},
|
||||
intervalCount: {
|
||||
type: [Number, String],
|
||||
default: 24,
|
||||
validate: validateNumber
|
||||
},
|
||||
intervalFormat: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
intervalStyle: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
showIntervalLabel: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
weeks: {
|
||||
minWeeks: {
|
||||
validate: validateNumber,
|
||||
default: 1
|
||||
},
|
||||
shortMonths: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showMonthOnFirst: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
monthFormat: {
|
||||
type: Function,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'month'
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
validate: _timestamp.validateTimestamp
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function validateNumber(input) {
|
||||
return isFinite(parseInt(input));
|
||||
}
|
||||
//# sourceMappingURL=props.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/VCalendar/util/props.ts"],"names":[],"mappings":";;;;;;;;kBAGe;AACb,UAAM;AACJ,eAAO;AACL,kBAAM,MADD;AAEL,sBAAU,4BAFL;AAGL,qBAAS;AAAA,uBAAM,0BAAU,IAAI,IAAJ,EAAV,EAAsB,IAA5B;AAAA;AAHJ,SADH;AAMJ,aAAK;AACH,kBAAM,MADH;AAEH,sBAAU,4BAFP;AAGH,qBAAS;AAHN,SAND;AAWJ,kBAAU;AACR,kBAAM,KADE;AAER,qBAAS;AAAA,uBAAM,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,EAAmB,CAAnB,CAAN;AAAA;AAFD,SAXN;AAeJ,oBAAY;AACV,kBAAM,OADI;AAEV,qBAAS;AAFC,SAfR;AAmBJ,uBAAe;AACb,kBAAM,OADO;AAEb,qBAAS;AAFI,SAnBX;AAuBJ,uBAAe;AACb,kBAAM,QADO;AAEb,qBAAS;AAFI,SAvBX;AA2BJ,mBAAW;AACT,kBAAM,QADG;AAET,qBAAS;AAFA,SA3BP;AA+BJ,gBAAQ;AACN,kBAAM,MADA;AAEN,qBAAS;AAFH;AA/BJ,KADO;AAqCb,eAAW;AACT,iBAAS;AACP,kBAAM,MADC;AAEP,qBAAS;AAFF,SADA;AAKT,wBAAgB;AACd,kBAAM,OADQ;AAEd,qBAAS;AAFK,SALP;AAST,wBAAgB;AACd,kBAAM,CAAC,MAAD,EAAS,MAAT,CADQ;AAEd,qBAAS,EAFK;AAGd,sBAAU;AAHI,SATP;AAcT,yBAAiB;AACf,kBAAM,CAAC,MAAD,EAAS,MAAT,CADS;AAEf,qBAAS,EAFM;AAGf,sBAAU;AAHK,SAdR;AAmBT,uBAAe;AACb,kBAAM,CAAC,MAAD,EAAS,MAAT,CADO;AAEb,qBAAS,CAFI;AAGb,sBAAU;AAHG,SAnBN;AAwBT,uBAAe;AACb,kBAAM,CAAC,MAAD,EAAS,MAAT,CADO;AAEb,qBAAS,EAFI;AAGb,sBAAU;AAHG,SAxBN;AA6BT,wBAAgB;AACd,kBAAM,QADQ;AAEd,qBAAS;AAFK,SA7BP;AAiCT,uBAAe;AACb,kBAAM,QADO;AAEb,qBAAS;AAFI,SAjCN;AAqCT,2BAAmB;AACjB,kBAAM,QADW;AAEjB,qBAAS;AAFQ;AArCV,KArCE;AA+Eb,WAAO;AACL,kBAAU;AACR,sBAAU,cADF;AAER,qBAAS;AAFD,SADL;AAKL,qBAAa;AACX,kBAAM,OADK;AAEX,qBAAS;AAFE,SALR;AASL,0BAAkB;AAChB,kBAAM,OADU;AAEhB,qBAAS;AAFO,SATb;AAaL,qBAAa;AACX,kBAAM,QADK;AAEX,qBAAS;AAFE;AAbR,KA/EM;AAiGb,cAAU;AACR,cAAM;AACJ,kBAAM,MADF;AAEJ,qBAAS;AAFL,SADE;AAKR,eAAO;AACL,kBAAM,MADD;AAEL,sBAAU;AAFL;AALC;AAjGG,C;;AA6Gf,SAAS,cAAT,CAAyB,KAAzB,EAAmC;AACjC,WAAO,SAAS,SAAS,KAAT,CAAT,CAAP;AACD","sourcesContent":["\nimport { validateTimestamp, parseDate } from './timestamp'\n\nexport default {\n base: {\n start: {\n type: String,\n validate: validateTimestamp,\n default: () => parseDate(new Date()).date\n },\n end: {\n type: String,\n validate: validateTimestamp,\n default: '0000-00-00'\n },\n weekdays: {\n type: Array as () => number[],\n default: () => [0, 1, 2, 3, 4, 5, 6]\n },\n hideHeader: {\n type: Boolean,\n default: false\n },\n shortWeekdays: {\n type: Boolean,\n default: true\n },\n weekdayFormat: {\n type: Function, // VTimestampFormatter,\n default: null\n },\n dayFormat: {\n type: Function, // VTimestampFormatter,\n default: null\n },\n locale: {\n type: String,\n default: 'en-us'\n }\n },\n intervals: {\n maxDays: {\n type: Number,\n default: 7\n },\n shortIntervals: {\n type: Boolean,\n default: true\n },\n intervalHeight: {\n type: [Number, String],\n default: 40,\n validate: validateNumber\n },\n intervalMinutes: {\n type: [Number, String],\n default: 60,\n validate: validateNumber\n },\n firstInterval: {\n type: [Number, String],\n default: 0,\n validate: validateNumber\n },\n intervalCount: {\n type: [Number, String],\n default: 24,\n validate: validateNumber\n },\n intervalFormat: {\n type: Function, // VTimestampFormatter,\n default: null\n },\n intervalStyle: {\n type: Function, // (interval: VTimestamp): object\n default: null\n },\n showIntervalLabel: {\n type: Function, // (interval: VTimestamp): boolean\n default: null\n }\n },\n weeks: {\n minWeeks: {\n validate: validateNumber,\n default: 1\n },\n shortMonths: {\n type: Boolean,\n default: true\n },\n showMonthOnFirst: {\n type: Boolean,\n default: true\n },\n monthFormat: {\n type: Function, // VTimestampFormatter,\n default: null\n }\n },\n calendar: {\n type: {\n type: String,\n default: 'month'\n },\n value: {\n type: String,\n validate: validateTimestamp\n }\n }\n}\n\nfunction validateNumber (input: any): boolean {\n return isFinite(parseInt(input))\n}\n"],"sourceRoot":""}
|
||||
+372
@@ -0,0 +1,372 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
exports.getStartOfWeek = getStartOfWeek;
|
||||
exports.getEndOfWeek = getEndOfWeek;
|
||||
exports.getStartOfMonth = getStartOfMonth;
|
||||
exports.getEndOfMonth = getEndOfMonth;
|
||||
exports.parseTime = parseTime;
|
||||
exports.validateTimestamp = validateTimestamp;
|
||||
exports.parseTimestamp = parseTimestamp;
|
||||
exports.parseDate = parseDate;
|
||||
exports.getDayIdentifier = getDayIdentifier;
|
||||
exports.getTimeIdentifier = getTimeIdentifier;
|
||||
exports.updateRelative = updateRelative;
|
||||
exports.updateMinutes = updateMinutes;
|
||||
exports.updateWeekday = updateWeekday;
|
||||
exports.updateFormatted = updateFormatted;
|
||||
exports.getWeekday = getWeekday;
|
||||
exports.isLeapYear = isLeapYear;
|
||||
exports.daysInMonth = daysInMonth;
|
||||
exports.copyTimestamp = copyTimestamp;
|
||||
exports.padNumber = padNumber;
|
||||
exports.getDate = getDate;
|
||||
exports.getTime = getTime;
|
||||
exports.nextMinutes = nextMinutes;
|
||||
exports.nextDay = nextDay;
|
||||
exports.prevDay = prevDay;
|
||||
exports.relativeDays = relativeDays;
|
||||
exports.findWeekday = findWeekday;
|
||||
exports.getWeekdaySkips = getWeekdaySkips;
|
||||
exports.createDayList = createDayList;
|
||||
exports.createIntervalList = createIntervalList;
|
||||
exports.createNativeLocaleFormatter = createNativeLocaleFormatter;
|
||||
var PARSE_REGEX = exports.PARSE_REGEX = /^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/;
|
||||
var PARSE_TIME = exports.PARSE_TIME = /(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/;
|
||||
var DAYS_IN_MONTH = exports.DAYS_IN_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
var DAYS_IN_MONTH_LEAP = exports.DAYS_IN_MONTH_LEAP = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
var DAYS_IN_MONTH_MIN = exports.DAYS_IN_MONTH_MIN = 28;
|
||||
var DAYS_IN_MONTH_MAX = exports.DAYS_IN_MONTH_MAX = 31;
|
||||
var MONTH_MAX = exports.MONTH_MAX = 12;
|
||||
var MONTH_MIN = exports.MONTH_MIN = 1;
|
||||
var DAY_MIN = exports.DAY_MIN = 1;
|
||||
var DAYS_IN_WEEK = exports.DAYS_IN_WEEK = 7;
|
||||
var MINUTES_IN_HOUR = exports.MINUTES_IN_HOUR = 60;
|
||||
var HOURS_IN_DAY = exports.HOURS_IN_DAY = 24;
|
||||
var FIRST_HOUR = exports.FIRST_HOUR = 0;
|
||||
function getStartOfWeek(timestamp, weekdays, today) {
|
||||
var start = copyTimestamp(timestamp);
|
||||
findWeekday(start, weekdays[0], prevDay);
|
||||
updateFormatted(start);
|
||||
if (today) {
|
||||
updateRelative(start, today, start.hasTime);
|
||||
}
|
||||
return start;
|
||||
}
|
||||
function getEndOfWeek(timestamp, weekdays, today) {
|
||||
var end = copyTimestamp(timestamp);
|
||||
findWeekday(end, weekdays[weekdays.length - 1]);
|
||||
updateFormatted(end);
|
||||
if (today) {
|
||||
updateRelative(end, today, end.hasTime);
|
||||
}
|
||||
return end;
|
||||
}
|
||||
function getStartOfMonth(timestamp) {
|
||||
var start = copyTimestamp(timestamp);
|
||||
start.day = DAY_MIN;
|
||||
updateWeekday(start);
|
||||
updateFormatted(start);
|
||||
return start;
|
||||
}
|
||||
function getEndOfMonth(timestamp) {
|
||||
var end = copyTimestamp(timestamp);
|
||||
end.day = daysInMonth(end.year, end.month);
|
||||
updateWeekday(end);
|
||||
updateFormatted(end);
|
||||
return end;
|
||||
}
|
||||
function parseTime(input) {
|
||||
if (typeof input === 'number') {
|
||||
// when a number is given, it's minutes since 12:00am
|
||||
return input;
|
||||
} else if (typeof input === 'string') {
|
||||
// when a string is given, it's a hh:mm:ss format where seconds are optional
|
||||
var parts = PARSE_TIME.exec(input);
|
||||
if (!parts) {
|
||||
return false;
|
||||
}
|
||||
return parseInt(parts[1]) * 60 + parseInt(parts[3] || 0);
|
||||
} else if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object') {
|
||||
// when an object is given, it must have hour and minute
|
||||
if (typeof input.hour !== 'number' || typeof input.minute !== 'number') {
|
||||
return false;
|
||||
}
|
||||
return input.hour * 60 + input.minute;
|
||||
} else {
|
||||
// unsupported type
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function validateTimestamp(input) {
|
||||
return !!PARSE_REGEX.exec(input);
|
||||
}
|
||||
function parseTimestamp(input, now) {
|
||||
// YYYY-MM-DD hh:mm:ss
|
||||
var parts = PARSE_REGEX.exec(input);
|
||||
if (!parts) return null;
|
||||
var timestamp = {
|
||||
date: input,
|
||||
time: '',
|
||||
year: parseInt(parts[1]),
|
||||
month: parseInt(parts[2]),
|
||||
day: parseInt(parts[4]) || 1,
|
||||
hour: parseInt(parts[6]) || 0,
|
||||
minute: parseInt(parts[8]) || 0,
|
||||
weekday: 0,
|
||||
hasDay: !!parts[4],
|
||||
hasTime: !!(parts[6] && parts[8]),
|
||||
past: false,
|
||||
present: false,
|
||||
future: false
|
||||
};
|
||||
updateWeekday(timestamp);
|
||||
updateFormatted(timestamp);
|
||||
if (now) {
|
||||
updateRelative(timestamp, now, timestamp.hasTime);
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
function parseDate(date) {
|
||||
return updateFormatted({
|
||||
date: '',
|
||||
time: '',
|
||||
year: date.getFullYear(),
|
||||
month: date.getMonth() + 1,
|
||||
day: date.getDate(),
|
||||
weekday: date.getDay(),
|
||||
hour: date.getHours(),
|
||||
minute: date.getMinutes(),
|
||||
hasDay: true,
|
||||
hasTime: true,
|
||||
past: false,
|
||||
present: true,
|
||||
future: false
|
||||
});
|
||||
}
|
||||
function getDayIdentifier(timestamp) {
|
||||
return timestamp.year * 10000 + timestamp.month * 100 + timestamp.day;
|
||||
}
|
||||
function getTimeIdentifier(timestamp) {
|
||||
return timestamp.hour * 100 + timestamp.minute;
|
||||
}
|
||||
function updateRelative(timestamp, now) {
|
||||
var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
||||
|
||||
var a = getDayIdentifier(now);
|
||||
var b = getDayIdentifier(timestamp);
|
||||
var present = a === b;
|
||||
if (timestamp.hasTime && time && present) {
|
||||
a = getTimeIdentifier(now);
|
||||
b = getTimeIdentifier(timestamp);
|
||||
present = a === b;
|
||||
}
|
||||
timestamp.past = b < a;
|
||||
timestamp.present = present;
|
||||
timestamp.future = b > a;
|
||||
return timestamp;
|
||||
}
|
||||
function updateMinutes(timestamp, minutes, now) {
|
||||
timestamp.hasTime = true;
|
||||
timestamp.hour = Math.floor(minutes / MINUTES_IN_HOUR);
|
||||
timestamp.minute = minutes % MINUTES_IN_HOUR;
|
||||
timestamp.time = getTime(timestamp);
|
||||
if (now) {
|
||||
updateRelative(timestamp, now, true);
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
function updateWeekday(timestamp) {
|
||||
timestamp.weekday = getWeekday(timestamp);
|
||||
return timestamp;
|
||||
}
|
||||
function updateFormatted(timestamp) {
|
||||
timestamp.time = getTime(timestamp);
|
||||
timestamp.date = getDate(timestamp);
|
||||
return timestamp;
|
||||
}
|
||||
function getWeekday(timestamp) {
|
||||
if (timestamp.hasDay) {
|
||||
var _ = Math.floor;
|
||||
var k = timestamp.day;
|
||||
var m = (timestamp.month + 9) % MONTH_MAX + 1;
|
||||
var C = _(timestamp.year / 100);
|
||||
var Y = timestamp.year % 100 - (timestamp.month <= 2 ? 1 : 0);
|
||||
return ((k + _(2.6 * m - 0.2) - 2 * C + Y + _(Y / 4) + _(C / 4)) % 7 + 7) % 7;
|
||||
}
|
||||
return timestamp.weekday;
|
||||
}
|
||||
function isLeapYear(year) {
|
||||
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
||||
}
|
||||
function daysInMonth(year, month) {
|
||||
return isLeapYear(year) ? DAYS_IN_MONTH_LEAP[month] : DAYS_IN_MONTH[month];
|
||||
}
|
||||
function copyTimestamp(timestamp) {
|
||||
var date = timestamp.date,
|
||||
time = timestamp.time,
|
||||
year = timestamp.year,
|
||||
month = timestamp.month,
|
||||
day = timestamp.day,
|
||||
weekday = timestamp.weekday,
|
||||
hour = timestamp.hour,
|
||||
minute = timestamp.minute,
|
||||
hasDay = timestamp.hasDay,
|
||||
hasTime = timestamp.hasTime,
|
||||
past = timestamp.past,
|
||||
present = timestamp.present,
|
||||
future = timestamp.future;
|
||||
|
||||
return { date: date, time: time, year: year, month: month, day: day, weekday: weekday, hour: hour, minute: minute, hasDay: hasDay, hasTime: hasTime, past: past, present: present, future: future };
|
||||
}
|
||||
function padNumber(x, length) {
|
||||
var padded = String(x);
|
||||
while (padded.length < length) {
|
||||
padded = '0' + padded;
|
||||
}
|
||||
return padded;
|
||||
}
|
||||
function getDate(timestamp) {
|
||||
var str = padNumber(timestamp.year, 4) + '-' + padNumber(timestamp.month, 2);
|
||||
if (timestamp.hasDay) str += '-' + padNumber(timestamp.day, 2);
|
||||
return str;
|
||||
}
|
||||
function getTime(timestamp) {
|
||||
if (!timestamp.hasTime) {
|
||||
return '';
|
||||
}
|
||||
return padNumber(timestamp.hour, 2) + ':' + padNumber(timestamp.minute, 2);
|
||||
}
|
||||
function nextMinutes(timestamp, minutes) {
|
||||
timestamp.minute += minutes;
|
||||
while (timestamp.minute > MINUTES_IN_HOUR) {
|
||||
timestamp.minute -= MINUTES_IN_HOUR;
|
||||
timestamp.hour++;
|
||||
if (timestamp.hour >= HOURS_IN_DAY) {
|
||||
nextDay(timestamp);
|
||||
timestamp.hour = FIRST_HOUR;
|
||||
}
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
function nextDay(timestamp) {
|
||||
timestamp.day++;
|
||||
timestamp.weekday = (timestamp.weekday + 1) % DAYS_IN_WEEK;
|
||||
if (timestamp.day > DAYS_IN_MONTH_MIN && timestamp.day > daysInMonth(timestamp.year, timestamp.month)) {
|
||||
timestamp.day = DAY_MIN;
|
||||
timestamp.month++;
|
||||
if (timestamp.month > MONTH_MAX) {
|
||||
timestamp.month = MONTH_MIN;
|
||||
timestamp.year++;
|
||||
}
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
function prevDay(timestamp) {
|
||||
timestamp.day--;
|
||||
timestamp.weekday = (timestamp.weekday + 6) % DAYS_IN_WEEK;
|
||||
if (timestamp.day < DAY_MIN) {
|
||||
timestamp.month--;
|
||||
if (timestamp.month < MONTH_MIN) {
|
||||
timestamp.year--;
|
||||
timestamp.month = MONTH_MAX;
|
||||
}
|
||||
timestamp.day = daysInMonth(timestamp.year, timestamp.month);
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
function relativeDays(timestamp) {
|
||||
var mover = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : nextDay;
|
||||
var days = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
||||
|
||||
while (--days >= 0) {
|
||||
mover(timestamp);
|
||||
}return timestamp;
|
||||
}
|
||||
function findWeekday(timestamp, weekday) {
|
||||
var mover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : nextDay;
|
||||
var maxDays = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 6;
|
||||
|
||||
while (timestamp.weekday !== weekday && --maxDays >= 0) {
|
||||
mover(timestamp);
|
||||
}return timestamp;
|
||||
}
|
||||
function getWeekdaySkips(weekdays) {
|
||||
var skips = [1, 1, 1, 1, 1, 1, 1];
|
||||
var filled = [0, 0, 0, 0, 0, 0, 0];
|
||||
for (var i = 0; i < weekdays.length; i++) {
|
||||
filled[weekdays[i]] = 1;
|
||||
}
|
||||
for (var k = 0; k < DAYS_IN_WEEK; k++) {
|
||||
var skip = 1;
|
||||
for (var j = 1; j < DAYS_IN_WEEK; j++) {
|
||||
var next = (k + j) % DAYS_IN_WEEK;
|
||||
if (filled[next]) {
|
||||
break;
|
||||
}
|
||||
skip++;
|
||||
}
|
||||
skips[k] = filled[k] * skip;
|
||||
}
|
||||
return skips;
|
||||
}
|
||||
function createDayList(start, end, now, weekdaySkips) {
|
||||
var max = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 42;
|
||||
var min = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
||||
|
||||
var stop = getDayIdentifier(end);
|
||||
var days = [];
|
||||
var current = copyTimestamp(start);
|
||||
var currentIdentifier = 0;
|
||||
var stopped = currentIdentifier === stop;
|
||||
if (stop < getDayIdentifier(start)) {
|
||||
return days;
|
||||
}
|
||||
while ((!stopped || days.length < min) && days.length < max) {
|
||||
currentIdentifier = getDayIdentifier(current);
|
||||
stopped = stopped || currentIdentifier === stop;
|
||||
if (weekdaySkips[current.weekday] === 0) {
|
||||
current = nextDay(current);
|
||||
continue;
|
||||
}
|
||||
var day = copyTimestamp(current);
|
||||
updateFormatted(day);
|
||||
updateRelative(day, now);
|
||||
days.push(day);
|
||||
current = relativeDays(current, nextDay, weekdaySkips[current.weekday]);
|
||||
}
|
||||
return days;
|
||||
}
|
||||
function createIntervalList(timestamp, first, minutes, count, now) {
|
||||
var intervals = [];
|
||||
for (var i = 0; i < count; i++) {
|
||||
var mins = (first + i) * minutes;
|
||||
var int = copyTimestamp(timestamp);
|
||||
intervals.push(updateMinutes(int, mins, now));
|
||||
}
|
||||
return intervals;
|
||||
}
|
||||
function createNativeLocaleFormatter(locale, getOptions) {
|
||||
var emptyFormatter = function emptyFormatter(_t, _s) {
|
||||
return '';
|
||||
};
|
||||
if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
|
||||
return emptyFormatter;
|
||||
}
|
||||
return function (timestamp, short) {
|
||||
try {
|
||||
var intlFormatter = new Intl.DateTimeFormat(locale || undefined, getOptions(timestamp, short));
|
||||
var time = padNumber(timestamp.hour, 2) + ':' + padNumber(timestamp.minute, 2);
|
||||
var date = timestamp.date;
|
||||
return intlFormatter.format(new Date(date + 'T' + time + ':00+00:00'));
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=timestamp.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+66
@@ -0,0 +1,66 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Extensions
|
||||
|
||||
// Mixins
|
||||
|
||||
// Helpers
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_cards.styl');
|
||||
|
||||
var _VSheet = require('../VSheet');
|
||||
|
||||
var _VSheet2 = _interopRequireDefault(_VSheet);
|
||||
|
||||
var _routable = require('../../mixins/routable');
|
||||
|
||||
var _routable2 = _interopRequireDefault(_routable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = (0, _mixins2.default)(_routable2.default, _VSheet2.default).extend({
|
||||
name: 'v-card',
|
||||
props: {
|
||||
flat: Boolean,
|
||||
hover: Boolean,
|
||||
img: String,
|
||||
raised: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'v-card': true,
|
||||
'v-card--flat': this.flat,
|
||||
'v-card--hover': this.hover
|
||||
}, _VSheet2.default.options.computed.classes.call(this));
|
||||
},
|
||||
styles: function styles() {
|
||||
var style = _extends({}, _VSheet2.default.options.computed.styles.call(this));
|
||||
if (this.img) {
|
||||
style.background = 'url("' + this.img + '") center center / cover no-repeat';
|
||||
}
|
||||
return style;
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var _generateRouteLink = this.generateRouteLink(this.classes),
|
||||
tag = _generateRouteLink.tag,
|
||||
data = _generateRouteLink.data;
|
||||
|
||||
data.style = this.styles;
|
||||
return h(tag, this.setBackgroundColor(this.color, data), this.$slots.default);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCard.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCard/VCard.ts"],"names":[],"mappings":";;;;;;;;AAGA;;AAGA;;AAGA;;;AARA;;AAGA;;;;AAGA;;;;AAGA;;;;;;AAKA;kBACe,sBACb,kBADa,EAEb,gBAFa,EAGb,MAHa,CAGN;AACP,UAAM,QADC;AAGP,WAAO;AACL,cAAM,OADD;AAEL,eAAO,OAFF;AAGL,aAAK,MAHA;AAIL,gBAAQ;AAJH,KAHA;AAUP,cAAU;AACR,eADQ,qBACD;AACL;AACE,0BAAU,IADZ;AAEE,gCAAgB,KAAK,IAFvB;AAGE,iCAAiB,KAAK;AAHxB,eAIK,iBAAO,OAAP,CAAe,QAAf,CAAwB,OAAxB,CAAgC,IAAhC,CAAqC,IAArC,CAJL;AAMD,SARO;AASR,cATQ,oBASF;AACJ,gBAAM,qBACD,iBAAO,OAAP,CAAe,QAAf,CAAwB,MAAxB,CAA+B,IAA/B,CAAoC,IAApC,CADC,CAAN;AAIA,gBAAI,KAAK,GAAT,EAAc;AACZ,sBAAM,UAAN,aAA2B,KAAK,GAAhC;AACD;AAED,mBAAO,KAAP;AACD;AAnBO,KAVH;AAgCP,UAhCO,kBAgCC,CAhCD,EAgCE;AAAA,iCACe,KAAK,iBAAL,CAAuB,KAAK,OAA5B,CADf;AAAA,YACC,GADD,sBACC,GADD;AAAA,YACM,IADN,sBACM,IADN;;AAGP,aAAK,KAAL,GAAa,KAAK,MAAlB;AAEA,eAAO,EAAE,GAAF,EAAO,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC,IAApC,CAAP,EAAkD,KAAK,MAAL,CAAY,OAA9D,CAAP;AACD;AAtCM,CAHM,C","sourcesContent":["// Styles\nimport '../../stylus/components/_cards.styl'\n\n// Extensions\nimport VSheet from '../VSheet'\n\n// Mixins\nimport Routable from '../../mixins/routable'\n\n// Helpers\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\n\n/* @vue/component */\nexport default mixins(\n Routable,\n VSheet\n).extend({\n name: 'v-card',\n\n props: {\n flat: Boolean,\n hover: Boolean,\n img: String,\n raised: Boolean\n },\n\n computed: {\n classes (): object {\n return {\n 'v-card': true,\n 'v-card--flat': this.flat,\n 'v-card--hover': this.hover,\n ...VSheet.options.computed.classes.call(this)\n }\n },\n styles (): object {\n const style: Dictionary<string> = {\n ...VSheet.options.computed.styles.call(this)\n }\n\n if (this.img) {\n style.background = `url(\"${this.img}\") center center / cover no-repeat`\n }\n\n return style\n }\n },\n\n render (h): VNode {\n const { tag, data } = this.generateRouteLink(this.classes)\n\n data.style = this.styles\n\n return h(tag, this.setBackgroundColor(this.color, data), this.$slots.default)\n }\n})\n"],"sourceRoot":""}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _VImg = require('../VImg/VImg');
|
||||
|
||||
var _VImg2 = _interopRequireDefault(_VImg);
|
||||
|
||||
var _console = require('../../util/console');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* istanbul ignore next */
|
||||
/* @vue/component */
|
||||
// Components
|
||||
exports.default = _VImg2.default.extend({
|
||||
name: 'v-card-media',
|
||||
mounted: function mounted() {
|
||||
(0, _console.deprecate)('v-card-media', this.src ? 'v-img' : 'v-responsive', this);
|
||||
}
|
||||
});
|
||||
// Utils
|
||||
//# sourceMappingURL=VCardMedia.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCard/VCardMedia.ts"],"names":[],"mappings":";;;;;;AACA;;;;AAGA;;;;AAEA;AACA;;kBACe,eAAK,MAAL,CAAY;AACzB,UAAM,cADmB;AAGzB,WAHyB,qBAGlB;AACL,gCAAU,cAAV,EAA0B,KAAK,GAAL,GAAW,OAAX,GAAqB,cAA/C,EAA+D,IAA/D;AACD;AALwB,CAAZ,C;AALf","sourcesContent":["// Components\nimport VImg from '../VImg/VImg'\n\n// Utils\nimport { deprecate } from '../../util/console'\n\n/* istanbul ignore next */\n/* @vue/component */\nexport default VImg.extend({\n name: 'v-card-media',\n\n mounted () {\n deprecate('v-card-media', this.src ? 'v-img' : 'v-responsive', this)\n }\n})\n"],"sourceRoot":""}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _vue = require('vue');
|
||||
|
||||
var _vue2 = _interopRequireDefault(_vue);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _vue2.default.extend({
|
||||
name: 'v-card-title',
|
||||
functional: true,
|
||||
props: {
|
||||
primaryTitle: Boolean
|
||||
},
|
||||
render: function render(h, _ref) {
|
||||
var data = _ref.data,
|
||||
props = _ref.props,
|
||||
children = _ref.children;
|
||||
|
||||
data.staticClass = ('v-card__title ' + (data.staticClass || '')).trim();
|
||||
if (props.primaryTitle) data.staticClass += ' v-card__title--primary';
|
||||
return h('div', data, children);
|
||||
}
|
||||
}); // Types
|
||||
//# sourceMappingURL=VCardTitle.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCard/VCardTitle.ts"],"names":[],"mappings":";;;;;;AACA;;;;;;AAEA;kBACe,cAAI,MAAJ,CAAW;AACxB,UAAM,cADkB;AAGxB,gBAAY,IAHY;AAKxB,WAAO;AACL,sBAAc;AADT,KALiB;AASxB,UATwB,kBAShB,CATgB,QASY;AAAA,YAAvB,IAAuB,QAAvB,IAAuB;AAAA,YAAjB,KAAiB,QAAjB,KAAiB;AAAA,YAAV,QAAU,QAAV,QAAU;;AAClC,aAAK,WAAL,GAAmB,qBAAkB,KAAK,WAAL,IAAoB,EAAtC,GAA4C,IAA5C,EAAnB;AAEA,YAAI,MAAM,YAAV,EAAwB,KAAK,WAAL,IAAoB,yBAApB;AAExB,eAAO,EAAE,KAAF,EAAS,IAAT,EAAe,QAAf,CAAP;AACD;AAfuB,CAAX,C","sourcesContent":["// Types\nimport Vue, { VNode } from 'vue'\n\n/* @vue/component */\nexport default Vue.extend({\n name: 'v-card-title',\n\n functional: true,\n\n props: {\n primaryTitle: Boolean\n },\n\n render (h, { data, props, children }): VNode {\n data.staticClass = (`v-card__title ${data.staticClass || ''}`).trim()\n\n if (props.primaryTitle) data.staticClass += ' v-card__title--primary'\n\n return h('div', data, children)\n }\n})\n"],"sourceRoot":""}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VCardText = exports.VCardActions = exports.VCardTitle = exports.VCardMedia = exports.VCard = undefined;
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
var _VCard = require('./VCard');
|
||||
|
||||
var _VCard2 = _interopRequireDefault(_VCard);
|
||||
|
||||
var _VCardMedia = require('./VCardMedia');
|
||||
|
||||
var _VCardMedia2 = _interopRequireDefault(_VCardMedia);
|
||||
|
||||
var _VCardTitle = require('./VCardTitle');
|
||||
|
||||
var _VCardTitle2 = _interopRequireDefault(_VCardTitle);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var VCardActions = (0, _helpers.createSimpleFunctional)('v-card__actions');
|
||||
var VCardText = (0, _helpers.createSimpleFunctional)('v-card__text');
|
||||
exports.VCard = _VCard2.default;
|
||||
exports.VCardMedia = _VCardMedia2.default;
|
||||
exports.VCardTitle = _VCardTitle2.default;
|
||||
exports.VCardActions = VCardActions;
|
||||
exports.VCardText = VCardText;
|
||||
exports.default = {
|
||||
$_vuetify_subcomponents: {
|
||||
VCard: _VCard2.default,
|
||||
VCardMedia: _VCardMedia2.default,
|
||||
VCardTitle: _VCardTitle2.default,
|
||||
VCardActions: VCardActions,
|
||||
VCardText: VCardText
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCard/index.ts"],"names":[],"mappings":";;;;;;;;;AACA;;;;AACA;;;;AACA;;;;;;AAEA,IAAM,eAAe,qCAAuB,iBAAvB,CAArB;AACA,IAAM,YAAY,qCAAuB,cAAvB,CAAlB;QAES,K,GAAA,e;QAAO,U,GAAA,oB;QAAY,U,GAAA,oB;QAAY,Y,GAAA,Y;QAAc,S,GAAA,S;kBAEvC;AACb,6BAAyB;AACvB,8BADuB;AAEvB,wCAFuB;AAGvB,wCAHuB;AAIvB,kCAJuB;AAKvB;AALuB;AADZ,C","sourcesContent":["import { createSimpleFunctional } from '../../util/helpers'\nimport VCard from './VCard'\nimport VCardMedia from './VCardMedia'\nimport VCardTitle from './VCardTitle'\n\nconst VCardActions = createSimpleFunctional('v-card__actions')\nconst VCardText = createSimpleFunctional('v-card__text')\n\nexport { VCard, VCardMedia, VCardTitle, VCardActions, VCardText }\n\nexport default {\n $_vuetify_subcomponents: {\n VCard,\n VCardMedia,\n VCardTitle,\n VCardActions,\n VCardText\n }\n}\n"],"sourceRoot":""}
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_carousel.styl');
|
||||
|
||||
var _VWindow = require('../VWindow/VWindow');
|
||||
|
||||
var _VWindow2 = _interopRequireDefault(_VWindow);
|
||||
|
||||
var _VBtn = require('../VBtn');
|
||||
|
||||
var _VBtn2 = _interopRequireDefault(_VBtn);
|
||||
|
||||
var _VIcon = require('../VIcon');
|
||||
|
||||
var _VIcon2 = _interopRequireDefault(_VIcon);
|
||||
|
||||
var _buttonGroup = require('../../mixins/button-group');
|
||||
|
||||
var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
var _console = require('../../util/console');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// Utilities
|
||||
|
||||
// Extensions
|
||||
exports.default = _VWindow2.default.extend({
|
||||
name: 'v-carousel',
|
||||
props: {
|
||||
cycle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
delimiterIcon: {
|
||||
type: String,
|
||||
default: '$vuetify.icons.delimiter'
|
||||
},
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 500
|
||||
},
|
||||
hideControls: Boolean,
|
||||
hideDelimiters: Boolean,
|
||||
interval: {
|
||||
type: [Number, String],
|
||||
default: 6000,
|
||||
validator: function validator(value) {
|
||||
return value > 0;
|
||||
}
|
||||
},
|
||||
mandatory: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
nextIcon: {
|
||||
type: [Boolean, String],
|
||||
default: '$vuetify.icons.next'
|
||||
},
|
||||
prevIcon: {
|
||||
type: [Boolean, String],
|
||||
default: '$vuetify.icons.prev'
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
changedByDelimiters: false,
|
||||
internalHeight: this.height,
|
||||
slideTimeout: undefined
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
isDark: function isDark() {
|
||||
return this.dark || !this.light;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
internalValue: function internalValue(val) {
|
||||
this.restartTimeout();
|
||||
/* @deprecate */
|
||||
/* istanbul ignore else */
|
||||
if (!this.$listeners['input']) return;
|
||||
this.$emit('input', val);
|
||||
},
|
||||
|
||||
interval: 'restartTimeout',
|
||||
height: function height(val, oldVal) {
|
||||
if (val === oldVal || !val) return;
|
||||
this.internalHeight = val;
|
||||
},
|
||||
cycle: function cycle(val) {
|
||||
if (val) {
|
||||
this.restartTimeout();
|
||||
} else {
|
||||
clearTimeout(this.slideTimeout);
|
||||
this.slideTimeout = undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
/* @deprecate */
|
||||
/* istanbul ignore next */
|
||||
if (this.$listeners['input']) {
|
||||
(0, _console.deprecate)('@input', '@change', this);
|
||||
}
|
||||
this.startTimeout();
|
||||
},
|
||||
|
||||
methods: {
|
||||
genDelimiters: function genDelimiters() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-carousel__controls'
|
||||
}, [this.genItems()]);
|
||||
},
|
||||
genIcon: function genIcon(direction, icon, fn) {
|
||||
var _this = this;
|
||||
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-carousel__' + direction
|
||||
}, [this.$createElement(_VBtn2.default, {
|
||||
props: {
|
||||
icon: true
|
||||
},
|
||||
attrs: {
|
||||
'aria-label': this.$vuetify.t('$vuetify.carousel.' + direction)
|
||||
},
|
||||
on: {
|
||||
click: function click() {
|
||||
_this.changedByDelimiters = true;
|
||||
fn();
|
||||
}
|
||||
}
|
||||
}, [this.$createElement(_VIcon2.default, {
|
||||
props: { 'size': '46px' }
|
||||
}, icon)])]);
|
||||
},
|
||||
genIcons: function genIcons() {
|
||||
var icons = [];
|
||||
var prevIcon = this.$vuetify.rtl ? this.nextIcon : this.prevIcon;
|
||||
if (prevIcon && typeof prevIcon === 'string') {
|
||||
icons.push(this.genIcon('prev', prevIcon, this.prev));
|
||||
}
|
||||
var nextIcon = this.$vuetify.rtl ? this.prevIcon : this.nextIcon;
|
||||
if (nextIcon && typeof nextIcon === 'string') {
|
||||
icons.push(this.genIcon('next', nextIcon, this.next));
|
||||
}
|
||||
return icons;
|
||||
},
|
||||
genItems: function genItems() {
|
||||
var _this2 = this;
|
||||
|
||||
var length = this.items.length;
|
||||
var children = [];
|
||||
for (var i = 0; i < length; i++) {
|
||||
var child = this.$createElement(_VBtn2.default, {
|
||||
class: {
|
||||
'v-carousel__controls__item': true
|
||||
},
|
||||
props: {
|
||||
icon: true,
|
||||
small: true,
|
||||
value: this.getValue(this.items[i], i)
|
||||
}
|
||||
}, [this.$createElement(_VIcon2.default, {
|
||||
props: { size: 18 }
|
||||
}, this.delimiterIcon)]);
|
||||
children.push(child);
|
||||
}
|
||||
return this.$createElement(_buttonGroup2.default, {
|
||||
props: {
|
||||
value: this.internalValue
|
||||
},
|
||||
on: {
|
||||
change: function change(val) {
|
||||
_this2.internalValue = val;
|
||||
}
|
||||
}
|
||||
}, children);
|
||||
},
|
||||
restartTimeout: function restartTimeout() {
|
||||
this.slideTimeout && clearTimeout(this.slideTimeout);
|
||||
this.slideTimeout = undefined;
|
||||
var raf = requestAnimationFrame || setTimeout;
|
||||
raf(this.startTimeout);
|
||||
},
|
||||
startTimeout: function startTimeout() {
|
||||
if (!this.cycle) return;
|
||||
this.slideTimeout = window.setTimeout(this.next, +this.interval > 0 ? +this.interval : 6000);
|
||||
},
|
||||
updateReverse: function updateReverse(val, oldVal) {
|
||||
if (this.changedByDelimiters) {
|
||||
this.changedByDelimiters = false;
|
||||
return;
|
||||
}
|
||||
_VWindow2.default.options.methods.updateReverse.call(this, val, oldVal);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var children = [];
|
||||
var data = {
|
||||
staticClass: 'v-window v-carousel',
|
||||
style: {
|
||||
height: (0, _helpers.convertToUnit)(this.height)
|
||||
},
|
||||
directives: []
|
||||
};
|
||||
if (!this.touchless) {
|
||||
data.directives.push({
|
||||
name: 'touch',
|
||||
value: {
|
||||
left: this.next,
|
||||
right: this.prev
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!this.hideControls) {
|
||||
children.push(this.genIcons());
|
||||
}
|
||||
if (!this.hideDelimiters) {
|
||||
children.push(this.genDelimiters());
|
||||
}
|
||||
return h('div', data, [this.genContainer(), children]);
|
||||
}
|
||||
});
|
||||
// Mixins
|
||||
// TODO: Move this into core components v2.0
|
||||
|
||||
// Components
|
||||
// Styles
|
||||
//# sourceMappingURL=VCarousel.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+41
@@ -0,0 +1,41 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Extensions
|
||||
|
||||
// Components
|
||||
|
||||
|
||||
var _VWindowItem = require('../VWindow/VWindowItem');
|
||||
|
||||
var _VWindowItem2 = _interopRequireDefault(_VWindowItem);
|
||||
|
||||
var _VImg = require('../VImg');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = _VWindowItem2.default.extend({
|
||||
name: 'v-carousel-item',
|
||||
inheritAttrs: false,
|
||||
methods: {
|
||||
genDefaultSlot: function genDefaultSlot() {
|
||||
return [this.$createElement(_VImg.VImg, {
|
||||
staticClass: 'v-carousel__item',
|
||||
props: _extends({}, this.$attrs, {
|
||||
height: this.windowGroup.internalHeight
|
||||
}),
|
||||
on: this.$listeners
|
||||
}, this.$slots.default)];
|
||||
},
|
||||
onBeforeEnter: function onBeforeEnter() {},
|
||||
onEnter: function onEnter() {},
|
||||
onAfterEnter: function onAfterEnter() {},
|
||||
onBeforeLeave: function onBeforeLeave() {},
|
||||
onEnterCancelled: function onEnterCancelled() {}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCarouselItem.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCarousel/VCarouselItem.ts"],"names":[],"mappings":";;;;;;;;AAGA;;;AAFA;;;;AAGA;;;;AAEA;kBACe,sBAAY,MAAZ,CAAmB;AAChC,UAAM,iBAD0B;AAGhC,kBAAc,KAHkB;AAKhC,aAAS;AACP,sBADO,4BACO;AACZ,mBAAO,CACL,KAAK,cAAL,CAAoB,UAApB,EAA0B;AACxB,6BAAa,kBADW;AAExB,oCACK,KAAK,MADV;AAEE,4BAAQ,KAAK,WAAL,CAAiB;AAF3B,kBAFwB;AAMxB,oBAAI,KAAK;AANe,aAA1B,EAOG,KAAK,MAAL,CAAY,OAPf,CADK,CAAP;AAUD,SAZM;AAaP,qBAbO,2BAaM,CAAkB,CAbxB;AAcP,eAdO,qBAcA,CAAkB,CAdlB;AAeP,oBAfO,0BAeK,CAAkB,CAfvB;AAgBP,qBAhBO,2BAgBM,CAAkB,CAhBxB;AAiBP,wBAjBO,8BAiBS,CAAkB;AAjB3B;AALuB,CAAnB,C","sourcesContent":["// Extensions\nimport VWindowItem from '../VWindow/VWindowItem'\n\n// Components\nimport { VImg } from '../VImg'\n\n/* @vue/component */\nexport default VWindowItem.extend({\n name: 'v-carousel-item',\n\n inheritAttrs: false,\n\n methods: {\n genDefaultSlot () {\n return [\n this.$createElement(VImg, {\n staticClass: 'v-carousel__item',\n props: {\n ...this.$attrs,\n height: this.windowGroup.internalHeight\n },\n on: this.$listeners\n }, this.$slots.default)\n ]\n },\n onBeforeEnter () { /* noop */ },\n onEnter () { /* noop */ },\n onAfterEnter () { /* noop */ },\n onBeforeLeave () { /* noop */ },\n onEnterCancelled () { /* noop */ }\n }\n})\n"],"sourceRoot":""}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VCarouselItem = exports.VCarousel = undefined;
|
||||
|
||||
var _VCarousel = require('./VCarousel');
|
||||
|
||||
var _VCarousel2 = _interopRequireDefault(_VCarousel);
|
||||
|
||||
var _VCarouselItem = require('./VCarouselItem');
|
||||
|
||||
var _VCarouselItem2 = _interopRequireDefault(_VCarouselItem);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VCarousel = _VCarousel2.default;
|
||||
exports.VCarouselItem = _VCarouselItem2.default;
|
||||
exports.default = {
|
||||
$_vuetify_subcomponents: {
|
||||
VCarousel: _VCarousel2.default,
|
||||
VCarouselItem: _VCarouselItem2.default
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCarousel/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA;;;;;;QAES,S,GAAA,mB;QAAW,a,GAAA,uB;kBAEL;AACb,6BAAyB;AACvB,sCADuB;AAEvB;AAFuB;AADZ,C","sourcesContent":["import VCarousel from './VCarousel'\nimport VCarouselItem from './VCarouselItem'\n\nexport { VCarousel, VCarouselItem }\n\nexport default {\n $_vuetify_subcomponents: {\n VCarousel,\n VCarouselItem\n }\n}\n"],"sourceRoot":""}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Components
|
||||
|
||||
// import { VFadeTransition } from '../transitions'
|
||||
// Mixins
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_selection-controls.styl');
|
||||
|
||||
var _VIcon = require('../VIcon');
|
||||
|
||||
var _VIcon2 = _interopRequireDefault(_VIcon);
|
||||
|
||||
var _selectable = require('../../mixins/selectable');
|
||||
|
||||
var _selectable2 = _interopRequireDefault(_selectable);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = {
|
||||
name: 'v-checkbox',
|
||||
mixins: [_selectable2.default],
|
||||
props: {
|
||||
indeterminate: Boolean,
|
||||
indeterminateIcon: {
|
||||
type: String,
|
||||
default: '$vuetify.icons.checkboxIndeterminate'
|
||||
},
|
||||
onIcon: {
|
||||
type: String,
|
||||
default: '$vuetify.icons.checkboxOn'
|
||||
},
|
||||
offIcon: {
|
||||
type: String,
|
||||
default: '$vuetify.icons.checkboxOff'
|
||||
}
|
||||
},
|
||||
data: function data(vm) {
|
||||
return {
|
||||
inputIndeterminate: vm.indeterminate
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return {
|
||||
'v-input--selection-controls': true,
|
||||
'v-input--checkbox': true
|
||||
};
|
||||
},
|
||||
computedIcon: function computedIcon() {
|
||||
if (this.inputIndeterminate) {
|
||||
return this.indeterminateIcon;
|
||||
} else if (this.isActive) {
|
||||
return this.onIcon;
|
||||
} else {
|
||||
return this.offIcon;
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
indeterminate: function indeterminate(val) {
|
||||
this.inputIndeterminate = val;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
genCheckbox: function genCheckbox() {
|
||||
return this.$createElement('div', {
|
||||
staticClass: 'v-input--selection-controls__input'
|
||||
}, [this.genInput('checkbox', _extends({}, this.$attrs, {
|
||||
'aria-checked': this.inputIndeterminate ? 'mixed' : this.isActive.toString()
|
||||
})), this.genRipple(this.setTextColor(this.computedColor)), this.$createElement(_VIcon2.default, this.setTextColor(this.computedColor, {
|
||||
props: {
|
||||
dark: this.dark,
|
||||
light: this.light
|
||||
}
|
||||
}), this.computedIcon)]);
|
||||
},
|
||||
genDefaultSlot: function genDefaultSlot() {
|
||||
return [this.genCheckbox(), this.genLabel()];
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=VCheckbox.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCheckbox/VCheckbox.js"],"names":[],"mappings":";;;;;;;;AAGA;;AAEA;AAEA;;;AANA;;AAGA;;;;AAIA;;;;;;AAEA;kBACe;AACb,UAAM,YADO;AAGb,YAAQ,CACN,oBADM,CAHK;AAOb,WAAO;AACL,uBAAe,OADV;AAEL,2BAAmB;AACjB,kBAAM,MADW;AAEjB,qBAAS;AAFQ,SAFd;AAML,gBAAQ;AACN,kBAAM,MADA;AAEN,qBAAS;AAFH,SANH;AAUL,iBAAS;AACP,kBAAM,MADC;AAEP,qBAAS;AAFF;AAVJ,KAPM;AAuBb,UAAM;AAAA,eAAO;AACX,gCAAoB,GAAG;AADZ,SAAP;AAAA,KAvBO;AA2Bb,cAAU;AACR,eADQ,qBACD;AACL,mBAAO;AACL,+CAA+B,IAD1B;AAEL,qCAAqB;AAFhB,aAAP;AAID,SANO;AAOR,oBAPQ,0BAOI;AACV,gBAAI,KAAK,kBAAT,EAA6B;AAC3B,uBAAO,KAAK,iBAAZ;AACD,aAFD,MAEO,IAAI,KAAK,QAAT,EAAmB;AACxB,uBAAO,KAAK,MAAZ;AACD,aAFM,MAEA;AACL,uBAAO,KAAK,OAAZ;AACD;AACF;AAfO,KA3BG;AA6Cb,WAAO;AACL,qBADK,yBACU,GADV,EACa;AAChB,iBAAK,kBAAL,GAA0B,GAA1B;AACD;AAHI,KA7CM;AAmDb,aAAS;AACP,mBADO,yBACI;AACT,mBAAO,KAAK,cAAL,CAAoB,KAApB,EAA2B;AAChC,6BAAa;AADmB,aAA3B,EAEJ,CACD,KAAK,QAAL,CAAc,UAAd,eACK,KAAK,MADV;AAEE,gCAAgB,KAAK,kBAAL,GACZ,OADY,GAEZ,KAAK,QAAL,CAAc,QAAd;AAJN,eADC,EAOD,KAAK,SAAL,CAAe,KAAK,YAAL,CAAkB,KAAK,aAAvB,CAAf,CAPC,EAQD,KAAK,cAAL,CAAoB,eAApB,EAA2B,KAAK,YAAL,CAAkB,KAAK,aAAvB,EAAsC;AAC/D,uBAAO;AACL,0BAAM,KAAK,IADN;AAEL,2BAAO,KAAK;AAFP;AADwD,aAAtC,CAA3B,EAKI,KAAK,YALT,CARC,CAFI,CAAP;AAiBD,SAnBM;AAoBP,sBApBO,4BAoBO;AACZ,mBAAO,CACL,KAAK,WAAL,EADK,EAEL,KAAK,QAAL,EAFK,CAAP;AAID;AAzBM;AAnDI,C","sourcesContent":["// Styles\nimport '../../stylus/components/_selection-controls.styl'\n\n// Components\nimport VIcon from '../VIcon'\n// import { VFadeTransition } from '../transitions'\n\n// Mixins\nimport Selectable from '../../mixins/selectable'\n\n/* @vue/component */\nexport default {\n name: 'v-checkbox',\n\n mixins: [\n Selectable\n ],\n\n props: {\n indeterminate: Boolean,\n indeterminateIcon: {\n type: String,\n default: '$vuetify.icons.checkboxIndeterminate'\n },\n onIcon: {\n type: String,\n default: '$vuetify.icons.checkboxOn'\n },\n offIcon: {\n type: String,\n default: '$vuetify.icons.checkboxOff'\n }\n },\n\n data: vm => ({\n inputIndeterminate: vm.indeterminate\n }),\n\n computed: {\n classes () {\n return {\n 'v-input--selection-controls': true,\n 'v-input--checkbox': true\n }\n },\n computedIcon () {\n if (this.inputIndeterminate) {\n return this.indeterminateIcon\n } else if (this.isActive) {\n return this.onIcon\n } else {\n return this.offIcon\n }\n }\n },\n\n watch: {\n indeterminate (val) {\n this.inputIndeterminate = val\n }\n },\n\n methods: {\n genCheckbox () {\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input'\n }, [\n this.genInput('checkbox', {\n ...this.$attrs,\n 'aria-checked': this.inputIndeterminate\n ? 'mixed'\n : this.isActive.toString()\n }),\n this.genRipple(this.setTextColor(this.computedColor)),\n this.$createElement(VIcon, this.setTextColor(this.computedColor, {\n props: {\n dark: this.dark,\n light: this.light\n }\n }), this.computedIcon)\n ])\n },\n genDefaultSlot () {\n return [\n this.genCheckbox(),\n this.genLabel()\n ]\n }\n }\n}\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VCheckbox = undefined;
|
||||
|
||||
var _VCheckbox = require('./VCheckbox');
|
||||
|
||||
var _VCheckbox2 = _interopRequireDefault(_VCheckbox);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VCheckbox = _VCheckbox2.default;
|
||||
exports.default = _VCheckbox2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCheckbox/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,S,GAAA,mB;kBACM,mB","sourcesContent":["import VCheckbox from './VCheckbox'\n\nexport { VCheckbox }\nexport default VCheckbox\n"],"sourceRoot":""}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
// Components
|
||||
|
||||
// Mixins
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_chips.styl');
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
var _VIcon = require('../VIcon');
|
||||
|
||||
var _VIcon2 = _interopRequireDefault(_VIcon);
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _toggleable = require('../../mixins/toggleable');
|
||||
|
||||
var _toggleable2 = _interopRequireDefault(_toggleable);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = (0, _mixins2.default)(_colorable2.default, _themeable2.default, _toggleable2.default).extend({
|
||||
name: 'v-chip',
|
||||
props: {
|
||||
close: Boolean,
|
||||
disabled: Boolean,
|
||||
label: Boolean,
|
||||
outline: Boolean,
|
||||
// Used for selects/tagging
|
||||
selected: Boolean,
|
||||
small: Boolean,
|
||||
textColor: String,
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'v-chip--disabled': this.disabled,
|
||||
'v-chip--selected': this.selected && !this.disabled,
|
||||
'v-chip--label': this.label,
|
||||
'v-chip--outline': this.outline,
|
||||
'v-chip--small': this.small,
|
||||
'v-chip--removable': this.close
|
||||
}, this.themeClasses);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
genClose: function genClose(h) {
|
||||
var _this = this;
|
||||
|
||||
var data = {
|
||||
staticClass: 'v-chip__close',
|
||||
on: {
|
||||
click: function click(e) {
|
||||
e.stopPropagation();
|
||||
_this.$emit('input', false);
|
||||
}
|
||||
}
|
||||
};
|
||||
return h('div', data, [h(_VIcon2.default, '$vuetify.icons.delete')]);
|
||||
},
|
||||
genContent: function genContent(h) {
|
||||
return h('span', {
|
||||
staticClass: 'v-chip__content'
|
||||
}, [this.$slots.default, this.close && this.genClose(h)]);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
var data = this.setBackgroundColor(this.color, {
|
||||
staticClass: 'v-chip',
|
||||
'class': this.classes,
|
||||
attrs: { tabindex: this.disabled ? -1 : 0 },
|
||||
directives: [{
|
||||
name: 'show',
|
||||
value: this.isActive
|
||||
}],
|
||||
on: this.$listeners
|
||||
});
|
||||
var color = this.textColor || this.outline && this.color;
|
||||
return h('span', this.setTextColor(color, data), [this.genContent(h)]);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VChip.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VChip/VChip.ts"],"names":[],"mappings":";;;;;;;AAMA;;AAGA;;;;;AALA;;;;AAGA;;;;AAGA;;;;AACA;;;;AACA;;;;;;AAEA;kBACe,sBAAO,mBAAP,EAAkB,mBAAlB,EAA6B,oBAA7B,EAAyC,MAAzC,CAAgD;AAC7D,UAAM,QADuD;AAG7D,WAAO;AACL,eAAO,OADF;AAEL,kBAAU,OAFL;AAGL,eAAO,OAHF;AAIL,iBAAS,OAJJ;AAKL;AACA,kBAAU,OANL;AAOL,eAAO,OAPF;AAQL,mBAAW,MARN;AASL,eAAO;AACL,kBAAM,OADD;AAEL,qBAAS;AAFJ;AATF,KAHsD;AAkB7D,cAAU;AACR,eADQ,qBACD;AACL;AACE,oCAAoB,KAAK,QAD3B;AAEE,oCAAoB,KAAK,QAAL,IAAiB,CAAC,KAAK,QAF7C;AAGE,iCAAiB,KAAK,KAHxB;AAIE,mCAAmB,KAAK,OAJ1B;AAKE,iCAAiB,KAAK,KALxB;AAME,qCAAqB,KAAK;AAN5B,eAOK,KAAK,YAPV;AASD;AAXO,KAlBmD;AAgC7D,aAAS;AACP,gBADO,oBACG,CADH,EACmB;AAAA;;AACxB,gBAAM,OAAO;AACX,6BAAa,eADF;AAEX,oBAAI;AACF,2BAAO,eAAC,CAAD,EAAa;AAClB,0BAAE,eAAF;AAEA,8BAAK,KAAL,CAAW,OAAX,EAAoB,KAApB;AACD;AALC;AAFO,aAAb;AAWA,mBAAO,EAAE,KAAF,EAAS,IAAT,EAAe,CACpB,EAAE,eAAF,EAAS,uBAAT,CADoB,CAAf,CAAP;AAGD,SAhBM;AAiBP,kBAjBO,sBAiBK,CAjBL,EAiBqB;AAC1B,mBAAO,EAAE,MAAF,EAAU;AACf,6BAAa;AADE,aAAV,EAEJ,CACD,KAAK,MAAL,CAAY,OADX,EAED,KAAK,KAAL,IAAc,KAAK,QAAL,CAAc,CAAd,CAFb,CAFI,CAAP;AAMD;AAxBM,KAhCoD;AA2D7D,UA3D6D,kBA2DrD,CA3DqD,EA2DpD;AACP,YAAM,OAAO,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC;AAC/C,yBAAa,QADkC;AAE/C,qBAAS,KAAK,OAFiC;AAG/C,mBAAO,EAAE,UAAU,KAAK,QAAL,GAAgB,CAAC,CAAjB,GAAqB,CAAjC,EAHwC;AAI/C,wBAAY,CAAC;AACX,sBAAM,MADK;AAEX,uBAAO,KAAK;AAFD,aAAD,CAJmC;AAQ/C,gBAAI,KAAK;AARsC,SAApC,CAAb;AAWA,YAAM,QAAQ,KAAK,SAAL,IAAmB,KAAK,OAAL,IAAgB,KAAK,KAAtD;AACA,eAAO,EAAE,MAAF,EAAU,KAAK,YAAL,CAAkB,KAAlB,EAAyB,IAAzB,CAAV,EAA0C,CAAC,KAAK,UAAL,CAAgB,CAAhB,CAAD,CAA1C,CAAP;AACD;AAzE4D,CAAhD,C","sourcesContent":["import '../../stylus/components/_chips.styl'\n\n// Types\nimport { CreateElement, VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n// Components\nimport VIcon from '../VIcon'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\nimport Toggleable from '../../mixins/toggleable'\n\n/* @vue/component */\nexport default mixins(Colorable, Themeable, Toggleable).extend({\n name: 'v-chip',\n\n props: {\n close: Boolean,\n disabled: Boolean,\n label: Boolean,\n outline: Boolean,\n // Used for selects/tagging\n selected: Boolean,\n small: Boolean,\n textColor: String,\n value: {\n type: Boolean,\n default: true\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-chip--disabled': this.disabled,\n 'v-chip--selected': this.selected && !this.disabled,\n 'v-chip--label': this.label,\n 'v-chip--outline': this.outline,\n 'v-chip--small': this.small,\n 'v-chip--removable': this.close,\n ...this.themeClasses\n }\n }\n },\n\n methods: {\n genClose (h: CreateElement): VNode {\n const data = {\n staticClass: 'v-chip__close',\n on: {\n click: (e: Event) => {\n e.stopPropagation()\n\n this.$emit('input', false)\n }\n }\n }\n\n return h('div', data, [\n h(VIcon, '$vuetify.icons.delete')\n ])\n },\n genContent (h: CreateElement): VNode {\n return h('span', {\n staticClass: 'v-chip__content'\n }, [\n this.$slots.default,\n this.close && this.genClose(h)\n ])\n }\n },\n\n render (h): VNode {\n const data = this.setBackgroundColor(this.color, {\n staticClass: 'v-chip',\n 'class': this.classes,\n attrs: { tabindex: this.disabled ? -1 : 0 },\n directives: [{\n name: 'show',\n value: this.isActive\n }],\n on: this.$listeners\n })\n\n const color = this.textColor || (this.outline && this.color)\n return h('span', this.setTextColor(color, data), [this.genContent(h)])\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VChip = undefined;
|
||||
|
||||
var _VChip = require('./VChip');
|
||||
|
||||
var _VChip2 = _interopRequireDefault(_VChip);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VChip = _VChip2.default;
|
||||
exports.default = _VChip2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VChip/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,K,GAAA,e;kBACM,e","sourcesContent":["import VChip from './VChip'\n\nexport { VChip }\nexport default VChip\n"],"sourceRoot":""}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_autocompletes.styl');
|
||||
|
||||
var _VSelect = require('../VSelect/VSelect');
|
||||
|
||||
var _VSelect2 = _interopRequireDefault(_VSelect);
|
||||
|
||||
var _VAutocomplete = require('../VAutocomplete/VAutocomplete');
|
||||
|
||||
var _VAutocomplete2 = _interopRequireDefault(_VAutocomplete);
|
||||
|
||||
var _helpers = require('../../util/helpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
// Styles
|
||||
exports.default = {
|
||||
name: 'v-combobox',
|
||||
extends: _VAutocomplete2.default,
|
||||
props: {
|
||||
delimiters: {
|
||||
type: Array,
|
||||
default: function _default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
returnObject: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data: function data() {
|
||||
return {
|
||||
editingIndex: -1
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
counterValue: function counterValue() {
|
||||
return this.multiple ? this.selectedItems.length : (this.internalSearch || '').toString().length;
|
||||
},
|
||||
hasSlot: function hasSlot() {
|
||||
return _VSelect2.default.options.computed.hasSlot.call(this) || this.multiple;
|
||||
},
|
||||
isAnyValueAllowed: function isAnyValueAllowed() {
|
||||
return true;
|
||||
},
|
||||
menuCanShow: function menuCanShow() {
|
||||
if (!this.isFocused) return false;
|
||||
return this.hasDisplayedItems || !!this.$slots['no-data'] && !this.hideNoData;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onFilteredItemsChanged: function onFilteredItemsChanged() {
|
||||
// nop
|
||||
},
|
||||
onInternalSearchChanged: function onInternalSearchChanged(val) {
|
||||
if (val && this.multiple && this.delimiters.length) {
|
||||
var delimiter = this.delimiters.find(function (d) {
|
||||
return val.endsWith(d);
|
||||
});
|
||||
if (delimiter != null) {
|
||||
this.internalSearch = val.slice(0, val.length - delimiter.length);
|
||||
this.updateTags();
|
||||
}
|
||||
}
|
||||
this.updateMenuDimensions();
|
||||
},
|
||||
genChipSelection: function genChipSelection(item, index) {
|
||||
var _this = this;
|
||||
|
||||
var chip = _VSelect2.default.options.methods.genChipSelection.call(this, item, index);
|
||||
// Allow user to update an existing value
|
||||
if (this.multiple) {
|
||||
chip.componentOptions.listeners.dblclick = function () {
|
||||
_this.editingIndex = index;
|
||||
_this.internalSearch = _this.getText(item);
|
||||
_this.selectedIndex = -1;
|
||||
};
|
||||
}
|
||||
return chip;
|
||||
},
|
||||
onChipInput: function onChipInput(item) {
|
||||
_VSelect2.default.options.methods.onChipInput.call(this, item);
|
||||
this.editingIndex = -1;
|
||||
},
|
||||
|
||||
// Requires a manual definition
|
||||
// to overwrite removal in v-autocomplete
|
||||
onEnterDown: function onEnterDown(e) {
|
||||
e.preventDefault();
|
||||
_VSelect2.default.options.methods.onEnterDown.call(this);
|
||||
// If has menu index, let v-select-list handle
|
||||
if (this.getMenuIndex() > -1) return;
|
||||
this.updateSelf();
|
||||
},
|
||||
onKeyDown: function onKeyDown(e) {
|
||||
var keyCode = e.keyCode;
|
||||
_VSelect2.default.options.methods.onKeyDown.call(this, e);
|
||||
// If user is at selection index of 0
|
||||
// create a new tag
|
||||
if (this.multiple && keyCode === _helpers.keyCodes.left && this.$refs.input.selectionStart === 0) {
|
||||
this.updateSelf();
|
||||
}
|
||||
// The ordering is important here
|
||||
// allows new value to be updated
|
||||
// and then moves the index to the
|
||||
// proper location
|
||||
this.changeSelectedIndex(keyCode);
|
||||
},
|
||||
onTabDown: function onTabDown(e) {
|
||||
// When adding tags, if searching and
|
||||
// there is not a filtered options,
|
||||
// add the value to the tags list
|
||||
if (this.multiple && this.internalSearch && this.getMenuIndex() === -1) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return this.updateTags();
|
||||
}
|
||||
_VAutocomplete2.default.options.methods.onTabDown.call(this, e);
|
||||
},
|
||||
selectItem: function selectItem(item) {
|
||||
// Currently only supports items:<string[]>
|
||||
if (this.editingIndex > -1) {
|
||||
this.updateEditing();
|
||||
} else {
|
||||
_VSelect2.default.options.methods.selectItem.call(this, item);
|
||||
}
|
||||
},
|
||||
setSelectedItems: function setSelectedItems() {
|
||||
if (this.internalValue == null || this.internalValue === '') {
|
||||
this.selectedItems = [];
|
||||
} else {
|
||||
this.selectedItems = this.multiple ? this.internalValue : [this.internalValue];
|
||||
}
|
||||
},
|
||||
setValue: function setValue() {
|
||||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.internalSearch;
|
||||
|
||||
_VSelect2.default.options.methods.setValue.call(this, value);
|
||||
},
|
||||
updateEditing: function updateEditing() {
|
||||
var value = this.internalValue.slice();
|
||||
value[this.editingIndex] = this.internalSearch;
|
||||
this.setValue(value);
|
||||
this.editingIndex = -1;
|
||||
},
|
||||
updateCombobox: function updateCombobox() {
|
||||
var isUsingSlot = Boolean(this.$scopedSlots.selection) || this.hasChips;
|
||||
// If search is not dirty and is
|
||||
// using slot, do nothing
|
||||
if (isUsingSlot && !this.searchIsDirty) return;
|
||||
// The internal search is not matching
|
||||
// the internal value, update the input
|
||||
if (this.internalSearch !== this.getText(this.internalValue)) this.setValue();
|
||||
// Reset search if using slot
|
||||
// to avoid a double input
|
||||
if (isUsingSlot) this.internalSearch = undefined;
|
||||
},
|
||||
updateSelf: function updateSelf() {
|
||||
this.multiple ? this.updateTags() : this.updateCombobox();
|
||||
},
|
||||
updateTags: function updateTags() {
|
||||
var menuIndex = this.getMenuIndex();
|
||||
// If the user is not searching
|
||||
// and no menu item is selected
|
||||
// do nothing
|
||||
if (menuIndex < 0 && !this.searchIsDirty) return;
|
||||
if (this.editingIndex > -1) {
|
||||
return this.updateEditing();
|
||||
}
|
||||
var index = this.selectedItems.indexOf(this.internalSearch);
|
||||
// If it already exists, do nothing
|
||||
// this might need to change to bring
|
||||
// the duplicated item to the last entered
|
||||
if (index > -1) {
|
||||
var internalValue = this.internalValue.slice();
|
||||
internalValue.splice(index, 1);
|
||||
this.setValue(internalValue);
|
||||
}
|
||||
// If menu index is greater than 1
|
||||
// the selection is handled elsewhere
|
||||
// TODO: find out where
|
||||
if (menuIndex > -1) return this.internalSearch = null;
|
||||
this.selectItem(this.internalSearch);
|
||||
this.internalSearch = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
// Utils
|
||||
|
||||
// Extensions
|
||||
//# sourceMappingURL=VCombobox.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VCombobox = undefined;
|
||||
|
||||
var _VCombobox = require('./VCombobox');
|
||||
|
||||
var _VCombobox2 = _interopRequireDefault(_VCombobox);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VCombobox = _VCombobox2.default;
|
||||
exports.default = _VCombobox2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VCombobox/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,S,GAAA,mB;kBACM,mB","sourcesContent":["import VCombobox from './VCombobox'\n\nexport { VCombobox }\nexport default VCombobox\n"],"sourceRoot":""}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // Styles
|
||||
|
||||
// Mixins
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_counters.styl');
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = (0, _mixins2.default)(_themeable2.default).extend({
|
||||
name: 'v-counter',
|
||||
functional: true,
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: ''
|
||||
},
|
||||
max: [Number, String]
|
||||
},
|
||||
render: function render(h, ctx) {
|
||||
var props = ctx.props;
|
||||
|
||||
var max = parseInt(props.max, 10);
|
||||
var value = parseInt(props.value, 10);
|
||||
var content = max ? value + ' / ' + max : String(props.value);
|
||||
var isGreater = max && value > max;
|
||||
return h('div', {
|
||||
staticClass: 'v-counter',
|
||||
class: _extends({
|
||||
'error--text': isGreater
|
||||
}, (0, _themeable.functionalThemeClasses)(ctx))
|
||||
}, content);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VCounter.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user