buefy 0.9.26 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/buefy.css +15904 -0
- package/dist/buefy.esm.js +17883 -0
- package/dist/buefy.esm.min.js +2 -0
- package/dist/buefy.js +17967 -0
- package/dist/buefy.min.css +1 -0
- package/dist/buefy.min.js +2 -0
- package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
- package/dist/cjs/Button-01827709.js +114 -0
- package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
- package/dist/cjs/Checkbox-43f54cc7.js +70 -0
- package/dist/cjs/Datepicker-680659bc.js +1679 -0
- package/dist/cjs/DropdownItem-422f8c34.js +559 -0
- package/dist/cjs/Field-4557b10c.js +315 -0
- package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
- package/dist/cjs/Icon-78961800.js +189 -0
- package/dist/cjs/Image-c4bcd9b3.js +299 -0
- package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
- package/dist/cjs/Input-e5a72d97.js +248 -0
- package/dist/cjs/Loading-6f2c7075.js +150 -0
- package/dist/cjs/MessageMixin-8d959514.js +146 -0
- package/dist/cjs/Modal-4cf07210.js +278 -0
- package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
- package/dist/cjs/Pagination-d6b3fb85.js +413 -0
- package/dist/cjs/Select-2b3879bc.js +100 -0
- package/dist/cjs/SlotComponent-4fb48389.js +53 -0
- package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
- package/dist/cjs/Tag-437f65fb.js +154 -0
- package/dist/cjs/Timepicker-498fa02b.js +67 -0
- package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
- package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
- package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/breadcrumb.js +139 -0
- package/dist/cjs/button.js +20 -0
- package/dist/cjs/carousel.js +662 -0
- package/dist/cjs/checkbox.js +86 -0
- package/dist/cjs/clockpicker.js +461 -0
- package/dist/cjs/collapse.js +128 -0
- package/dist/cjs/colorpicker.js +23 -0
- package/dist/cjs/config-8cfb5a4a.js +81 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/datepicker.js +27 -0
- package/dist/cjs/datetimepicker.js +377 -0
- package/dist/cjs/dialog.js +308 -0
- package/dist/cjs/dropdown.js +23 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/helpers.js +375 -0
- package/dist/cjs/icon.js +19 -0
- package/dist/cjs/image.js +19 -0
- package/dist/cjs/index-99d1c930.js +1633 -0
- package/dist/cjs/index.js +216 -0
- package/dist/cjs/input.js +21 -0
- package/dist/cjs/loading.js +38 -0
- package/dist/cjs/menu.js +304 -0
- package/dist/cjs/message.js +67 -0
- package/dist/cjs/modal.js +59 -0
- package/dist/cjs/navbar.js +679 -0
- package/dist/cjs/notification.js +181 -0
- package/dist/cjs/numberinput.js +278 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/plugins-7f41b028.js +94 -0
- package/dist/cjs/progress.js +239 -0
- package/dist/cjs/radio.js +130 -0
- package/dist/cjs/rate.js +156 -0
- package/dist/cjs/select.js +21 -0
- package/dist/cjs/sidebar.js +303 -0
- package/dist/cjs/skeleton.js +111 -0
- package/dist/cjs/slider.js +603 -0
- package/dist/cjs/snackbar.js +132 -0
- package/dist/cjs/ssr-20dba236.js +10 -0
- package/dist/cjs/steps.js +278 -0
- package/dist/cjs/switch.js +139 -0
- package/dist/cjs/table.js +1695 -0
- package/dist/cjs/tabs.js +214 -0
- package/dist/cjs/tag.js +70 -0
- package/dist/cjs/taginput.js +331 -0
- package/dist/cjs/timepicker.js +28 -0
- package/dist/cjs/toast.js +106 -0
- package/dist/cjs/tooltip.js +19 -0
- package/dist/cjs/trapFocus-261420b0.js +49 -0
- package/dist/cjs/upload.js +205 -0
- package/dist/components/autocomplete/index.js +1620 -0
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/breadcrumb/index.js +297 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +569 -0
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/carousel/index.js +1629 -0
- package/dist/components/carousel/index.min.js +2 -0
- package/dist/components/checkbox/index.js +279 -0
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +3131 -0
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +217 -0
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/colorpicker/index.js +4249 -0
- package/dist/components/colorpicker/index.min.js +2 -0
- package/dist/components/datepicker/index.js +3845 -0
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/datetimepicker/index.js +4902 -0
- package/dist/components/datetimepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +1168 -0
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +1043 -0
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +511 -0
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +463 -0
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/image/index.js +513 -0
- package/dist/components/image/index.min.js +2 -0
- package/dist/components/input/index.js +862 -0
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +366 -0
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +748 -0
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +650 -0
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +624 -0
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +805 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +923 -0
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +1119 -0
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +868 -0
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +621 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +260 -0
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/rate/index.js +600 -0
- package/dist/components/rate/index.min.js +2 -0
- package/dist/components/select/index.js +715 -0
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/sidebar/index.js +467 -0
- package/dist/components/sidebar/index.min.js +2 -0
- package/dist/components/skeleton/index.js +200 -0
- package/dist/components/skeleton/index.min.js +2 -0
- package/dist/components/slider/index.js +1264 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +527 -0
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +1180 -0
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +297 -0
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +3480 -0
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +1116 -0
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +307 -0
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +2104 -0
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2843 -0
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +501 -0
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +630 -0
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +525 -0
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/Autocomplete-1a6e8770.js +671 -0
- package/dist/esm/Button-521f6efc.js +112 -0
- package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
- package/dist/esm/Checkbox-1d02686e.js +68 -0
- package/dist/esm/Datepicker-0ae1e826.js +1677 -0
- package/dist/esm/DropdownItem-55682322.js +556 -0
- package/dist/esm/Field-3ceba31e.js +313 -0
- package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
- package/dist/esm/Icon-60d47b31.js +187 -0
- package/dist/esm/Image-75808acb.js +297 -0
- package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
- package/dist/esm/Input-20612b63.js +246 -0
- package/dist/esm/Loading-ae028ea5.js +148 -0
- package/dist/esm/MessageMixin-d577a9f5.js +144 -0
- package/dist/esm/Modal-7da7641f.js +276 -0
- package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
- package/dist/esm/Pagination-68f12c1e.js +409 -0
- package/dist/esm/Select-97781d4e.js +98 -0
- package/dist/esm/SlotComponent-8871a20f.js +51 -0
- package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
- package/dist/esm/Tag-6365aa46.js +152 -0
- package/dist/esm/Timepicker-38480bbc.js +65 -0
- package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
- package/dist/esm/Tooltip-d98a769c.js +368 -0
- package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/breadcrumb.js +133 -0
- package/dist/esm/button.js +16 -0
- package/dist/esm/carousel.js +655 -0
- package/dist/esm/checkbox.js +81 -0
- package/dist/esm/clockpicker.js +456 -0
- package/dist/esm/collapse.js +123 -0
- package/dist/esm/colorpicker.js +14 -0
- package/dist/esm/config-e7d4b9c2.js +78 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/datepicker.js +23 -0
- package/dist/esm/datetimepicker.js +372 -0
- package/dist/esm/dialog.js +302 -0
- package/dist/esm/dropdown.js +18 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/helpers.js +348 -0
- package/dist/esm/icon.js +15 -0
- package/dist/esm/image.js +15 -0
- package/dist/esm/index-903f63ea.js +1629 -0
- package/dist/esm/index.js +182 -0
- package/dist/esm/input.js +17 -0
- package/dist/esm/loading.js +33 -0
- package/dist/esm/menu.js +297 -0
- package/dist/esm/message.js +62 -0
- package/dist/esm/modal.js +54 -0
- package/dist/esm/navbar.js +672 -0
- package/dist/esm/notification.js +175 -0
- package/dist/esm/numberinput.js +273 -0
- package/dist/esm/pagination.js +17 -0
- package/dist/esm/plugins-218aea86.js +89 -0
- package/dist/esm/progress.js +233 -0
- package/dist/esm/radio.js +124 -0
- package/dist/esm/rate.js +151 -0
- package/dist/esm/select.js +17 -0
- package/dist/esm/sidebar.js +298 -0
- package/dist/esm/skeleton.js +106 -0
- package/dist/esm/slider.js +597 -0
- package/dist/esm/snackbar.js +126 -0
- package/dist/esm/ssr-b847d137.js +7 -0
- package/dist/esm/steps.js +272 -0
- package/dist/esm/switch.js +134 -0
- package/dist/esm/table.js +1689 -0
- package/dist/esm/tabs.js +208 -0
- package/dist/esm/tag.js +65 -0
- package/dist/esm/taginput.js +326 -0
- package/dist/esm/timepicker.js +24 -0
- package/dist/esm/toast.js +100 -0
- package/dist/esm/tooltip.js +15 -0
- package/dist/esm/trapFocus-f0736873.js +47 -0
- package/dist/esm/upload.js +200 -0
- package/dist/vetur/attributes.json +3238 -0
- package/dist/vetur/tags.json +1183 -0
- package/package.json +3 -3
- package/src/components/autocomplete/Autocomplete.spec.js +16 -0
- package/src/components/autocomplete/Autocomplete.vue +9 -3
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
- package/src/components/dropdown/Dropdown.vue +51 -3
- package/src/components/numberinput/Numberinput.vue +4 -0
- package/src/components/sidebar/Sidebar.vue +1 -0
- package/src/components/slider/Slider.vue +7 -2
- package/src/components/slider/SliderThumb.vue +8 -0
- package/src/components/table/Table.vue +4 -1
- package/src/components/table/TableColumn.spec.js +51 -0
- package/src/components/table/TableColumn.vue +8 -1
- package/src/components/taginput/Taginput.vue +7 -2
- package/src/components/tooltip/Tooltip.vue +10 -3
- package/src/scss/components/_dropdown.scss +4 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Slider={})}(this,(function(t){"use strict";function e(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,i,n){return(i=e(i))in t?Object.defineProperty(t,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[i]=n,t}function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var r={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultTooltipCloseDelay:null,defaultSidebarDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultTimepickerMobileModal:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerWeekNumberClickable:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultSwitchRounded:!0,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,defaultBreadcrumbTag:"a",defaultBreadcrumbAlign:"is-left",defaultBreadcrumbSeparator:"",defaultBreadcrumbSize:"is-medium",customIconPacks:null};function l(t,e,i){return Math.max(e,Math.min(i,t))}function u(t,e,i,n,o,a,s,r,l,u){"boolean"!=typeof s&&(l=r,r=s,s=!1);const d="function"==typeof i?i.options:i;let c;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),n&&(d._scopeId=n),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=c):e&&(c=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),c)if(d.functional){const t=d.render;d.render=function(e,i){return c.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,c):[c]}return i}var d=u({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"tooltip",class:t.rootClasses},[i("transition",{attrs:{name:t.newAnimation}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.active&&(t.isActive||t.always),expression:"active && (isActive || always)"}],ref:"content",class:["tooltip-content",t.contentClass]},[t.label?[t._v(t._s(t.label))]:t.$slots.content?[t._t("content")]:t._e()],2)]),i("div",{ref:"trigger",staticClass:"tooltip-trigger",style:t.triggerStyle,on:{click:t.onClick,contextmenu:t.onContextMenu,mouseenter:t.onHover,"!focus":function(e){return t.onFocus(e)},"!blur":function(e){return t.close(e)},mouseleave:t.close}},[t._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BTooltip",props:{active:{type:Boolean,default:!0},type:{type:String,default:function(){return r.defaultTooltipType}},label:String,delay:{type:Number,default:function(){return r.defaultTooltipDelay}},closeDelay:{type:Number,default:function(){return r.defaultTooltipCloseDelay}},position:{type:String,default:"is-top",validator:function(t){return["is-top","is-bottom","is-left","is-right"].indexOf(t)>-1}},triggers:{type:Array,default:function(){return["hover"]}},always:Boolean,square:Boolean,dashed:Boolean,multilined:Boolean,size:{type:String,default:"is-medium"},appendToBody:Boolean,animated:{type:Boolean,default:!0},animation:{type:String,default:"fade"},contentClass:String,autoClose:{type:[Array,Boolean],default:!0}},data:function(){return{isActive:!1,triggerStyle:{},timer:null,_bodyEl:void 0,resizeObserver:void 0,resizeListener:void 0,timeOutID:null}},computed:{rootClasses:function(){return["b-tooltip",this.type,this.position,this.size,{"is-square":this.square,"is-always":this.always,"is-multiline":this.multilined,"is-dashed":this.dashed}]},newAnimation:function(){return this.animated?this.animation:void 0}},watch:{isActive:function(){this.$emit(this.isActive?"open":"close"),this.appendToBody&&this.updateAppendToBody()}},methods:{updateAppendToBody:function(){var t=this.$refs.tooltip,e=this.$refs.trigger;if(t&&e){var n=this.$data._bodyEl.children[0];n.classList.forEach((function(t){return n.classList.remove(t)})),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&n.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((function(t){if("object"===i(t))for(var e in t)t[e]&&n.classList.add(e);else n.classList.add(t)}));var o=e.getBoundingClientRect(),a=o.top+window.scrollY,s=o.left+window.scrollX;switch(n.style.position="absolute",this.position){case"is-top":n.style.width="".concat(e.clientWidth,"px"),n.style.height="0px",n.style.top="0px",n.style.left="0px";break;case"is-bottom":n.style.width="".concat(e.clientWidth,"px"),n.style.height="0px",n.style.top="".concat(e.clientHeight,"px"),n.style.left="0px";break;case"is-left":n.style.width="0px",n.style.height="".concat(e.clientHeight,"px"),n.style.top="0px",n.style.left="0px";break;case"is-right":n.style.width="0px",n.style.height="".concat(e.clientHeight,"px"),n.style.top="0px",n.style.left="".concat(e.clientWidth,"px")}var r=this.$data._bodyEl;r.style.position="absolute",r.style.top="".concat(a,"px"),r.style.left="".concat(s,"px"),r.style.width="0px",r.style.zIndex=this.isActive||this.always?"99":"-1",this.triggerStyle={zIndex:this.isActive||this.always?"100":void 0}}},onClick:function(){var t=this;this.triggers.indexOf("click")<0||this.$nextTick((function(){t.timeOutID=setTimeout((function(){return t.open()}))}))},onHover:function(){this.triggers.indexOf("hover")<0||this.open()},onContextMenu:function(t){this.triggers.indexOf("contextmenu")<0||(t.preventDefault(),this.open())},onFocus:function(){this.triggers.indexOf("focus")<0||this.open()},open:function(){var t=this;this.delay?this.timer=setTimeout((function(){t.isActive=!0,t.timer=null}),this.delay):this.isActive=!0},close:function(){var t=this;"boolean"==typeof this.autoClose&&(this.autoClose&&this.timer&&clearTimeout(this.timer),this.closeDelay?this.timer=setTimeout((function(){t.isActive=!t.autoClose,t.timer=null}),this.closeDelay):this.isActive=!this.autoClose)},clickedOutside:function(t){if(this.isActive&&Array.isArray(this.autoClose)){if(this.autoClose.includes("outside")&&!this.isInWhiteList(t.target))return void(this.isActive=!1);this.autoClose.includes("inside")&&this.isInWhiteList(t.target)&&(this.isActive=!1)}},keyPress:function(t){var e=t.key;!this.isActive||"Escape"!==e&&"Esc"!==e||Array.isArray(this.autoClose)&&this.autoClose.indexOf("escape")>=0&&(this.isActive=!1)},isInWhiteList:function(t){if(t===this.$refs.content)return!0;if(void 0!==this.$refs.content){var e,i=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=a(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,l=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return r=t.done,t},e:function(t){l=!0,s=t},f:function(){try{r||null==i.return||i.return()}finally{if(l)throw s}}}}(this.$refs.content.querySelectorAll("*"));try{for(i.s();!(e=i.n()).done;){if(t===e.value)return!0}}catch(t){i.e(t)}finally{i.f()}}return!1}},mounted:function(){var t=this;if(this.controller=new window.AbortController,this.appendToBody&&"undefined"!=typeof window){this.$data._bodyEl=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.width="100%";var i=document.createElement("div");return e.appendChild(i),i.appendChild(t),document.body.appendChild(e),e}(this.$refs.content),this.updateAppendToBody();var e=this.$el.closest(".animation-content");if(null!=e){e.addEventListener("transitionend",(function i(){t.updateAppendToBody(),e.removeEventListener("transitionend",i)}),{signal:this.controller.signal})}this.resizeListener=function(){return t.updateAppendToBody()},window.addEventListener("resize",this.resizeListener),this.resizeObserver=new ResizeObserver(this.resizeListener),null!=this.$el.parentNode&&this.$el.parentNode.nodeType===Node.ELEMENT_NODE&&this.resizeObserver.observe(this.$el.parentNode)}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){var t;"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),null!=this.resizeListener&&window.removeEventListener("resize",this.resizeListener),null!=this.resizeObserver&&this.resizeObserver.disconnect(),this.appendToBody&&(void 0!==(t=this.$data._bodyEl).remove?t.remove():void 0!==t.parentNode&&null!==t.parentNode&&t.parentNode.removeChild(t)),this.controller.abort(),clearTimeout(this.timer),clearTimeout(this.timeOutID)}},undefined,false,undefined,!1,void 0,void 0,void 0);var c=u({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"b-slider-thumb-wrapper",class:{"is-dragging":t.dragging,"has-indicator":t.indicator},style:t.wrapperStyle},[i("b-tooltip",{attrs:{label:t.formattedValue,type:t.type,always:t.dragging||t.isFocused||t.tooltipAlways,active:!t.disabled&&t.tooltip}},[i("div",t._b({staticClass:"b-slider-thumb",attrs:{tabindex:!t.disabled&&0},on:{mousedown:t.onButtonDown,touchstart:t.onButtonDown,focus:t.onFocus,blur:t.onBlur,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.onLeftKeyDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:(e.preventDefault(),t.onRightKeyDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.onLeftKeyDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.onRightKeyDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"home",void 0,e.key,void 0)?null:(e.preventDefault(),t.onHomeKeyDown(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"end",void 0,e.key,void 0)?null:(e.preventDefault(),t.onEndKeyDown(e))}]}},"div",t.$attrs,!1),[t.indicator?i("span",[t._v(t._s(t.formattedValue))]):t._e()])])],1)},staticRenderFns:[]},undefined,{name:"BSliderThumb",components:n({},d.name,d),inheritAttrs:!1,props:{value:{type:Number,default:0},type:{type:String,default:""},tooltip:{type:Boolean,default:!0},indicator:{type:Boolean,default:!1},customFormatter:Function,format:{type:String,default:"raw",validator:function(t){return["raw","percent"].indexOf(t)>=0}},locale:{type:[String,Array],default:function(){return r.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{isFocused:!1,dragging:!1,startX:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled:function(){return this.$parent.disabled},max:function(){return this.$parent.max},min:function(){return this.$parent.min},step:function(){return this.$parent.step},precision:function(){return this.$parent.precision},currentPosition:function(){return"".concat((this.value-this.min)/(this.max-this.min)*100,"%")},wrapperStyle:function(){return{left:this.currentPosition}},formattedValue:function(){return void 0!==this.customFormatter?this.customFormatter(this.value):"percent"===this.format?new Intl.NumberFormat(this.locale,{style:"percent"}).format((this.value-this.min)/(this.max-this.min)):new Intl.NumberFormat(this.locale).format(this.value)}},methods:{onFocus:function(){this.isFocused=!0},onBlur:function(){this.isFocused=!1},onButtonDown:function(t){this.disabled||(t.preventDefault(),this.onDragStart(t),"undefined"!=typeof window&&(document.addEventListener("mousemove",this.onDragging),document.addEventListener("touchmove",this.onDragging),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onDragEnd),document.addEventListener("contextmenu",this.onDragEnd)))},onLeftKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onRightKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onHomeKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=0,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onEndKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onDragStart:function(t){this.dragging=!0,this.$emit("dragstart"),"touchstart"===t.type&&(t.clientX=t.touches[0].clientX),this.startX=t.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging:function(t){if(this.dragging){"touchmove"===t.type&&(t.clientX=t.touches[0].clientX);var e=(t.clientX-this.startX)/this.$parent.sliderSize()*100;this.newPosition=this.startPosition+e,this.setPosition(this.newPosition)}},onDragEnd:function(){this.dragging=!1,this.$emit("dragend"),this.value!==this.oldValue&&this.$parent.emitValue("change"),this.setPosition(this.newPosition),"undefined"!=typeof window&&(document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd))},setPosition:function(t){if(null!==t&&!isNaN(t)){t<0?t=0:t>100&&(t=100);var e=100/((this.max-this.min)/this.step),i=Math.round(t/e)*e/100*(this.max-this.min)+this.min;i=parseFloat(i.toFixed(this.precision)),this.$emit("input",i),this.dragging||i===this.oldValue||(this.oldValue=i)}}},beforeDestroy:function(){document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd)}},undefined,false,undefined,!1,void 0,void 0,void 0);var h=u({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"b-slider-tick",class:{"is-tick-hidden":t.hidden},style:t.getTickStyle(t.position)},[t.$slots.default?i("span",{staticClass:"b-slider-tick-label"},[t._t("default")],2):t._e()])},staticRenderFns:[]},undefined,{name:"BSliderTick",props:{value:{type:Number,default:0}},computed:{position:function(){var t=(this.value-this.$parent.min)/(this.$parent.max-this.$parent.min)*100;return t>=0&&t<=100?t:0},hidden:function(){return this.value===this.$parent.min||this.value===this.$parent.max}},methods:{getTickStyle:function(t){return{left:t+"%"}}},created:function(){if(!this.$parent.$data._isSlider)throw this.$destroy(),new Error("You should wrap bSliderTick on a bSlider")}},undefined,false,undefined,!1,void 0,void 0,void 0);var f,m=u({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"b-slider",class:[t.size,t.type,t.rootClasses],on:{click:t.onSliderClick}},[i("div",{ref:"slider",staticClass:"b-slider-track"},[i("div",{staticClass:"b-slider-fill",style:t.barStyle}),t.ticks?t._l(t.tickValues,(function(t,e){return i("b-slider-tick",{key:e,attrs:{value:t}})})):t._e(),t._t("default"),i("b-slider-thumb",{ref:"button1",attrs:{"tooltip-always":t.tooltipAlways,type:t.newTooltipType,tooltip:t.tooltip,"custom-formatter":t.customFormatter,indicator:t.indicator,format:t.format,locale:t.locale,role:"slider","aria-valuenow":t.value1,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-orientation":"horizontal","aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[0]:t.ariaLabel,"aria-disabled":t.disabled},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}}),t.isRange?i("b-slider-thumb",{ref:"button2",attrs:{"tooltip-always":t.tooltipAlways,type:t.newTooltipType,tooltip:t.tooltip,"custom-formatter":t.customFormatter,indicator:t.indicator,format:t.format,locale:t.locale,role:"slider","aria-valuenow":t.value2,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-orientation":"horizontal","aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[1]:"","aria-disabled":t.disabled},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value2,callback:function(e){t.value2=e},expression:"value2"}}):t._e()],2)])},staticRenderFns:[]},undefined,{name:"BSlider",components:n(n({},c.name,c),h.name,h),props:{value:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},type:{type:String,default:"is-primary"},size:String,ticks:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipType:String,rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},customFormatter:Function,ariaLabel:[String,Array],biggerSliderFocus:{type:Boolean,default:!1},indicator:{type:Boolean,default:!1},format:{type:String,default:"raw",validator:function(t){return["raw","percent"].indexOf(t)>=0}},locale:{type:[String,Array],default:function(){return r.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{value1:null,value2:null,dragging:!1,isRange:!1,_isSlider:!0,timeOutID:null}},computed:{newTooltipType:function(){return this.tooltipType?this.tooltipType:this.type},tickValues:function(){if(!this.ticks||this.min>this.max||0===this.step)return[];for(var t=[],e=this.min+this.step;e<this.max;e+=this.step)t.push(e);return t},minValue:function(){return Math.min(this.value1,this.value2)},maxValue:function(){return Math.max(this.value1,this.value2)},barSize:function(){return this.isRange?"".concat(100*(this.maxValue-this.minValue)/(this.max-this.min),"%"):"".concat(100*(this.value1-this.min)/(this.max-this.min),"%")},barStart:function(){return this.isRange?"".concat(100*(this.minValue-this.min)/(this.max-this.min),"%"):"0%"},precision:function(){var t=[this.min,this.max,this.step].map((function(t){var e=(""+t).split(".")[1];return e?e.length:0}));return Math.max.apply(Math,o(t))},barStyle:function(){return{width:this.barSize,left:this.barStart}},rootClasses:function(){return{"is-rounded":this.rounded,"is-dragging":this.dragging,"is-disabled":this.disabled,"slider-focus":this.biggerSliderFocus}}},watch:{value:function(t){this.setValues(t)},value1:function(){this.onInternalValueUpdate()},value2:function(){this.onInternalValueUpdate()},min:function(){this.setValues(this.value)},max:function(){this.setValues(this.value)}},methods:{setValues:function(t){if(!(this.min>this.max))if(Array.isArray(t)){this.isRange=!0;var e="number"!=typeof t[0]||isNaN(t[0])?this.min:l(t[0],this.min,this.max),i="number"!=typeof t[1]||isNaN(t[1])?this.max:l(t[1],this.min,this.max);this.value1=this.isThumbReversed?i:e,this.value2=this.isThumbReversed?e:i}else this.isRange=!1,this.value1=isNaN(t)?this.min:l(t,this.min,this.max),this.value2=null},onInternalValueUpdate:function(){this.isRange&&(this.isThumbReversed=this.value1>this.value2),this.lazy&&this.dragging||this.emitValue("input"),this.dragging&&this.emitValue("dragging")},sliderSize:function(){return this.$refs.slider.getBoundingClientRect().width},onSliderClick:function(t){if(!this.disabled&&!this.isTrackClickDisabled){var e=this.$refs.slider.getBoundingClientRect().left,i=(t.clientX-e)/this.sliderSize()*100,n=this.min+i*(this.max-this.min)/100,o=Math.abs(n-this.value1);if(this.isRange){var a=Math.abs(n-this.value2);if(o<=a){if(o<this.step/2)return;this.$refs.button1.setPosition(i)}else{if(a<this.step/2)return;this.$refs.button2.setPosition(i)}}else{if(o<this.step/2)return;this.$refs.button1.setPosition(i)}this.emitValue("change")}},onDragStart:function(){this.dragging=!0,this.$emit("dragstart")},onDragEnd:function(){var t=this;this.isTrackClickDisabled=!0,this.timeOutID=setTimeout((function(){t.isTrackClickDisabled=!1}),0),this.dragging=!1,this.$emit("dragend"),this.lazy&&this.emitValue("input")},emitValue:function(t){this.$emit(t,this.isRange?[this.minValue,this.maxValue]:this.value1)}},created:function(){this.isThumbReversed=!1,this.isTrackClickDisabled=!1,this.setValues(this.value)},beforeDestroy:function(){clearTimeout(this.timeOutID)}},undefined,false,undefined,!1,void 0,void 0,void 0),p=function(t,e){t.component(e.name,e)},y={install:function(t){p(t,m),p(t,h)}};f=y,"undefined"!=typeof window&&window.Vue&&window.Vue.use(f),t.BSlider=m,t.BSliderTick=h,t.default=y,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
/*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
(function (global, factory) {
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Snackbar = {}));
|
|
6
|
+
})(this, (function (exports) { 'use strict';
|
|
7
|
+
|
|
8
|
+
var config = {
|
|
9
|
+
defaultContainerElement: null,
|
|
10
|
+
defaultIconPack: 'mdi',
|
|
11
|
+
defaultIconComponent: null,
|
|
12
|
+
defaultIconPrev: 'chevron-left',
|
|
13
|
+
defaultIconNext: 'chevron-right',
|
|
14
|
+
defaultLocale: undefined,
|
|
15
|
+
defaultDialogConfirmText: null,
|
|
16
|
+
defaultDialogCancelText: null,
|
|
17
|
+
defaultSnackbarDuration: 3500,
|
|
18
|
+
defaultSnackbarPosition: null,
|
|
19
|
+
defaultToastDuration: 2000,
|
|
20
|
+
defaultToastPosition: null,
|
|
21
|
+
defaultNotificationDuration: 2000,
|
|
22
|
+
defaultNotificationPosition: null,
|
|
23
|
+
defaultTooltipType: 'is-primary',
|
|
24
|
+
defaultTooltipDelay: null,
|
|
25
|
+
defaultTooltipCloseDelay: null,
|
|
26
|
+
defaultSidebarDelay: null,
|
|
27
|
+
defaultInputAutocomplete: 'on',
|
|
28
|
+
defaultDateFormatter: null,
|
|
29
|
+
defaultDateParser: null,
|
|
30
|
+
defaultDateCreator: null,
|
|
31
|
+
defaultTimeCreator: null,
|
|
32
|
+
defaultDayNames: null,
|
|
33
|
+
defaultMonthNames: null,
|
|
34
|
+
defaultFirstDayOfWeek: null,
|
|
35
|
+
defaultUnselectableDaysOfWeek: null,
|
|
36
|
+
defaultTimeFormatter: null,
|
|
37
|
+
defaultTimeParser: null,
|
|
38
|
+
defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
|
|
39
|
+
defaultModalScroll: null,
|
|
40
|
+
defaultDatepickerMobileNative: true,
|
|
41
|
+
defaultTimepickerMobileNative: true,
|
|
42
|
+
defaultTimepickerMobileModal: true,
|
|
43
|
+
defaultNoticeQueue: true,
|
|
44
|
+
defaultInputHasCounter: true,
|
|
45
|
+
defaultTaginputHasCounter: true,
|
|
46
|
+
defaultUseHtml5Validation: true,
|
|
47
|
+
defaultDropdownMobileModal: true,
|
|
48
|
+
defaultFieldLabelPosition: null,
|
|
49
|
+
defaultDatepickerYearsRange: [-100, 10],
|
|
50
|
+
defaultDatepickerNearbyMonthDays: true,
|
|
51
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
52
|
+
defaultDatepickerShowWeekNumber: false,
|
|
53
|
+
defaultDatepickerWeekNumberClickable: false,
|
|
54
|
+
defaultDatepickerMobileModal: true,
|
|
55
|
+
defaultTrapFocus: true,
|
|
56
|
+
defaultAutoFocus: true,
|
|
57
|
+
defaultButtonRounded: false,
|
|
58
|
+
defaultSwitchRounded: true,
|
|
59
|
+
defaultCarouselInterval: 3500,
|
|
60
|
+
defaultTabsExpanded: false,
|
|
61
|
+
defaultTabsAnimated: true,
|
|
62
|
+
defaultTabsType: null,
|
|
63
|
+
defaultStatusIcon: true,
|
|
64
|
+
defaultProgrammaticPromise: false,
|
|
65
|
+
defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
|
|
66
|
+
defaultImageWebpFallback: null,
|
|
67
|
+
defaultImageLazy: true,
|
|
68
|
+
defaultImageResponsive: true,
|
|
69
|
+
defaultImageRatio: null,
|
|
70
|
+
defaultImageSrcsetFormatter: null,
|
|
71
|
+
defaultBreadcrumbTag: 'a',
|
|
72
|
+
defaultBreadcrumbAlign: 'is-left',
|
|
73
|
+
defaultBreadcrumbSeparator: '',
|
|
74
|
+
defaultBreadcrumbSize: 'is-medium',
|
|
75
|
+
customIconPacks: null
|
|
76
|
+
};
|
|
77
|
+
var VueInstance;
|
|
78
|
+
|
|
79
|
+
function ownKeys(e, r) {
|
|
80
|
+
var t = Object.keys(e);
|
|
81
|
+
if (Object.getOwnPropertySymbols) {
|
|
82
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
83
|
+
r && (o = o.filter(function (r) {
|
|
84
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
85
|
+
})), t.push.apply(t, o);
|
|
86
|
+
}
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
function _objectSpread2(e) {
|
|
90
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
91
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
92
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
93
|
+
_defineProperty(e, r, t[r]);
|
|
94
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
95
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return e;
|
|
99
|
+
}
|
|
100
|
+
function _toPrimitive(t, r) {
|
|
101
|
+
if ("object" != typeof t || !t) return t;
|
|
102
|
+
var e = t[Symbol.toPrimitive];
|
|
103
|
+
if (void 0 !== e) {
|
|
104
|
+
var i = e.call(t, r || "default");
|
|
105
|
+
if ("object" != typeof i) return i;
|
|
106
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
107
|
+
}
|
|
108
|
+
return ("string" === r ? String : Number)(t);
|
|
109
|
+
}
|
|
110
|
+
function _toPropertyKey(t) {
|
|
111
|
+
var i = _toPrimitive(t, "string");
|
|
112
|
+
return "symbol" == typeof i ? i : String(i);
|
|
113
|
+
}
|
|
114
|
+
function _typeof(o) {
|
|
115
|
+
"@babel/helpers - typeof";
|
|
116
|
+
|
|
117
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
118
|
+
return typeof o;
|
|
119
|
+
} : function (o) {
|
|
120
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
121
|
+
}, _typeof(o);
|
|
122
|
+
}
|
|
123
|
+
function _defineProperty(obj, key, value) {
|
|
124
|
+
key = _toPropertyKey(key);
|
|
125
|
+
if (key in obj) {
|
|
126
|
+
Object.defineProperty(obj, key, {
|
|
127
|
+
value: value,
|
|
128
|
+
enumerable: true,
|
|
129
|
+
configurable: true,
|
|
130
|
+
writable: true
|
|
131
|
+
});
|
|
132
|
+
} else {
|
|
133
|
+
obj[key] = value;
|
|
134
|
+
}
|
|
135
|
+
return obj;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Merge function to replace Object.assign with deep merging possibility
|
|
140
|
+
*/
|
|
141
|
+
var isObject = function isObject(item) {
|
|
142
|
+
return _typeof(item) === 'object' && !Array.isArray(item);
|
|
143
|
+
};
|
|
144
|
+
var mergeFn = function mergeFn(target, source) {
|
|
145
|
+
var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
146
|
+
if (deep || !Object.assign) {
|
|
147
|
+
var isDeep = function isDeep(prop) {
|
|
148
|
+
return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
|
|
149
|
+
};
|
|
150
|
+
var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
|
|
151
|
+
return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
|
|
152
|
+
}).reduce(function (a, b) {
|
|
153
|
+
return _objectSpread2(_objectSpread2({}, a), b);
|
|
154
|
+
}, {});
|
|
155
|
+
return _objectSpread2(_objectSpread2({}, target), replaced);
|
|
156
|
+
} else {
|
|
157
|
+
return Object.assign(target, source);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
var merge = mergeFn;
|
|
161
|
+
function removeElement(el) {
|
|
162
|
+
if (typeof el.remove !== 'undefined') {
|
|
163
|
+
el.remove();
|
|
164
|
+
} else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {
|
|
165
|
+
el.parentNode.removeChild(el);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var NoticeMixin = {
|
|
170
|
+
props: {
|
|
171
|
+
type: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: 'is-dark'
|
|
174
|
+
},
|
|
175
|
+
message: [String, Array],
|
|
176
|
+
duration: Number,
|
|
177
|
+
queue: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
default: undefined
|
|
180
|
+
},
|
|
181
|
+
indefinite: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false
|
|
184
|
+
},
|
|
185
|
+
pauseOnHover: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: false
|
|
188
|
+
},
|
|
189
|
+
position: {
|
|
190
|
+
type: String,
|
|
191
|
+
default: 'is-top',
|
|
192
|
+
validator: function validator(value) {
|
|
193
|
+
return ['is-top-right', 'is-top', 'is-top-left', 'is-bottom-right', 'is-bottom', 'is-bottom-left'].indexOf(value) > -1;
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
container: String
|
|
197
|
+
},
|
|
198
|
+
data: function data() {
|
|
199
|
+
return {
|
|
200
|
+
isActive: false,
|
|
201
|
+
isPaused: false,
|
|
202
|
+
parentTop: null,
|
|
203
|
+
parentBottom: null,
|
|
204
|
+
newContainer: this.container || config.defaultContainerElement
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
computed: {
|
|
208
|
+
correctParent: function correctParent() {
|
|
209
|
+
switch (this.position) {
|
|
210
|
+
case 'is-top-right':
|
|
211
|
+
case 'is-top':
|
|
212
|
+
case 'is-top-left':
|
|
213
|
+
return this.parentTop;
|
|
214
|
+
case 'is-bottom-right':
|
|
215
|
+
case 'is-bottom':
|
|
216
|
+
case 'is-bottom-left':
|
|
217
|
+
return this.parentBottom;
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
transition: function transition() {
|
|
221
|
+
switch (this.position) {
|
|
222
|
+
case 'is-top-right':
|
|
223
|
+
case 'is-top':
|
|
224
|
+
case 'is-top-left':
|
|
225
|
+
return {
|
|
226
|
+
enter: 'fadeInDown',
|
|
227
|
+
leave: 'fadeOut'
|
|
228
|
+
};
|
|
229
|
+
case 'is-bottom-right':
|
|
230
|
+
case 'is-bottom':
|
|
231
|
+
case 'is-bottom-left':
|
|
232
|
+
return {
|
|
233
|
+
enter: 'fadeInUp',
|
|
234
|
+
leave: 'fadeOut'
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
methods: {
|
|
240
|
+
pause: function pause() {
|
|
241
|
+
if (this.pauseOnHover && !this.indefinite) {
|
|
242
|
+
this.isPaused = true;
|
|
243
|
+
clearInterval(this.$buefy.globalNoticeInterval);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
removePause: function removePause() {
|
|
247
|
+
if (this.pauseOnHover && !this.indefinite) {
|
|
248
|
+
this.isPaused = false;
|
|
249
|
+
this.close();
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
shouldQueue: function shouldQueue() {
|
|
253
|
+
var queue = this.queue !== undefined ? this.queue : config.defaultNoticeQueue;
|
|
254
|
+
if (!queue) return false;
|
|
255
|
+
return this.parentTop.childElementCount > 0 || this.parentBottom.childElementCount > 0;
|
|
256
|
+
},
|
|
257
|
+
click: function click() {
|
|
258
|
+
this.$emit('click');
|
|
259
|
+
},
|
|
260
|
+
close: function close() {
|
|
261
|
+
var _this = this;
|
|
262
|
+
if (!this.isPaused) {
|
|
263
|
+
clearTimeout(this.timer);
|
|
264
|
+
this.isActive = false;
|
|
265
|
+
this.$emit('close');
|
|
266
|
+
|
|
267
|
+
// Timeout for the animation complete before destroying
|
|
268
|
+
setTimeout(function () {
|
|
269
|
+
_this.$destroy();
|
|
270
|
+
removeElement(_this.$el);
|
|
271
|
+
}, 150);
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
timeoutCallback: function timeoutCallback() {
|
|
275
|
+
return this.close();
|
|
276
|
+
},
|
|
277
|
+
showNotice: function showNotice() {
|
|
278
|
+
var _this2 = this;
|
|
279
|
+
if (this.shouldQueue()) this.correctParent.innerHTML = '';
|
|
280
|
+
this.correctParent.insertAdjacentElement('afterbegin', this.$el);
|
|
281
|
+
this.isActive = true;
|
|
282
|
+
if (!this.indefinite) {
|
|
283
|
+
this.timer = setTimeout(function () {
|
|
284
|
+
return _this2.timeoutCallback();
|
|
285
|
+
}, this.newDuration);
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
setupContainer: function setupContainer() {
|
|
289
|
+
this.parentTop = document.querySelector((this.newContainer ? this.newContainer : 'body') + '>.notices.is-top');
|
|
290
|
+
this.parentBottom = document.querySelector((this.newContainer ? this.newContainer : 'body') + '>.notices.is-bottom');
|
|
291
|
+
if (this.parentTop && this.parentBottom) return;
|
|
292
|
+
if (!this.parentTop) {
|
|
293
|
+
this.parentTop = document.createElement('div');
|
|
294
|
+
this.parentTop.className = 'notices is-top';
|
|
295
|
+
}
|
|
296
|
+
if (!this.parentBottom) {
|
|
297
|
+
this.parentBottom = document.createElement('div');
|
|
298
|
+
this.parentBottom.className = 'notices is-bottom';
|
|
299
|
+
}
|
|
300
|
+
var container = document.querySelector(this.newContainer) || document.body;
|
|
301
|
+
container.appendChild(this.parentTop);
|
|
302
|
+
container.appendChild(this.parentBottom);
|
|
303
|
+
if (this.newContainer) {
|
|
304
|
+
this.parentTop.classList.add('has-custom-container');
|
|
305
|
+
this.parentBottom.classList.add('has-custom-container');
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
beforeMount: function beforeMount() {
|
|
310
|
+
this.setupContainer();
|
|
311
|
+
},
|
|
312
|
+
mounted: function mounted() {
|
|
313
|
+
this.showNotice();
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
//
|
|
318
|
+
var script = {
|
|
319
|
+
name: 'BSnackbar',
|
|
320
|
+
mixins: [NoticeMixin],
|
|
321
|
+
props: {
|
|
322
|
+
actionText: {
|
|
323
|
+
type: String,
|
|
324
|
+
default: 'OK'
|
|
325
|
+
},
|
|
326
|
+
onAction: {
|
|
327
|
+
type: Function,
|
|
328
|
+
default: function _default() {}
|
|
329
|
+
},
|
|
330
|
+
cancelText: {
|
|
331
|
+
type: String | null,
|
|
332
|
+
default: null
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
data: function data() {
|
|
336
|
+
return {
|
|
337
|
+
newDuration: this.duration || config.defaultSnackbarDuration
|
|
338
|
+
};
|
|
339
|
+
},
|
|
340
|
+
methods: {
|
|
341
|
+
/**
|
|
342
|
+
* Click listener.
|
|
343
|
+
* Call action prop before closing (from Mixin).
|
|
344
|
+
*/
|
|
345
|
+
action: function action() {
|
|
346
|
+
this.onAction();
|
|
347
|
+
this.close();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
353
|
+
if (typeof shadowMode !== 'boolean') {
|
|
354
|
+
createInjectorSSR = createInjector;
|
|
355
|
+
createInjector = shadowMode;
|
|
356
|
+
shadowMode = false;
|
|
357
|
+
}
|
|
358
|
+
// Vue.extend constructor export interop.
|
|
359
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
360
|
+
// render functions
|
|
361
|
+
if (template && template.render) {
|
|
362
|
+
options.render = template.render;
|
|
363
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
364
|
+
options._compiled = true;
|
|
365
|
+
// functional template
|
|
366
|
+
if (isFunctionalTemplate) {
|
|
367
|
+
options.functional = true;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// scopedId
|
|
371
|
+
if (scopeId) {
|
|
372
|
+
options._scopeId = scopeId;
|
|
373
|
+
}
|
|
374
|
+
let hook;
|
|
375
|
+
if (moduleIdentifier) {
|
|
376
|
+
// server build
|
|
377
|
+
hook = function (context) {
|
|
378
|
+
// 2.3 injection
|
|
379
|
+
context =
|
|
380
|
+
context || // cached call
|
|
381
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
382
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
383
|
+
// 2.2 with runInNewContext: true
|
|
384
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
385
|
+
context = __VUE_SSR_CONTEXT__;
|
|
386
|
+
}
|
|
387
|
+
// inject component styles
|
|
388
|
+
if (style) {
|
|
389
|
+
style.call(this, createInjectorSSR(context));
|
|
390
|
+
}
|
|
391
|
+
// register component module identifier for async chunk inference
|
|
392
|
+
if (context && context._registeredComponents) {
|
|
393
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
// used by ssr in case component is cached and beforeCreate
|
|
397
|
+
// never gets called
|
|
398
|
+
options._ssrRegister = hook;
|
|
399
|
+
}
|
|
400
|
+
else if (style) {
|
|
401
|
+
hook = shadowMode
|
|
402
|
+
? function (context) {
|
|
403
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
404
|
+
}
|
|
405
|
+
: function (context) {
|
|
406
|
+
style.call(this, createInjector(context));
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
if (hook) {
|
|
410
|
+
if (options.functional) {
|
|
411
|
+
// register for functional component in vue file
|
|
412
|
+
const originalRender = options.render;
|
|
413
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
414
|
+
hook.call(context);
|
|
415
|
+
return originalRender(h, context);
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
// inject component registration as beforeCreate hook
|
|
420
|
+
const existing = options.beforeCreate;
|
|
421
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return script;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* script */
|
|
428
|
+
const __vue_script__ = script;
|
|
429
|
+
|
|
430
|
+
/* template */
|
|
431
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"enter-active-class":_vm.transition.enter,"leave-active-class":_vm.transition.leave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"snackbar",class:[_vm.type,_vm.position],attrs:{"role":_vm.actionText ? 'alertdialog' : 'alert'},on:{"mouseenter":_vm.pause,"mouseleave":_vm.removePause}},[(_vm.$slots.default)?[_vm._t("default")]:[_c('div',{staticClass:"text",domProps:{"innerHTML":_vm._s(_vm.message)}})],(_vm.cancelText)?_c('div',{staticClass:"action is-light is-cancel",on:{"click":_vm.close}},[_c('button',{staticClass:"button"},[_vm._v(_vm._s(_vm.cancelText))])]):_vm._e(),(_vm.actionText)?_c('div',{staticClass:"action",class:_vm.type,on:{"click":_vm.action}},[_c('button',{staticClass:"button"},[_vm._v(_vm._s(_vm.actionText))])]):_vm._e()],2)])};
|
|
432
|
+
var __vue_staticRenderFns__ = [];
|
|
433
|
+
|
|
434
|
+
/* style */
|
|
435
|
+
const __vue_inject_styles__ = undefined;
|
|
436
|
+
/* scoped */
|
|
437
|
+
const __vue_scope_id__ = undefined;
|
|
438
|
+
/* module identifier */
|
|
439
|
+
const __vue_module_identifier__ = undefined;
|
|
440
|
+
/* functional template */
|
|
441
|
+
const __vue_is_functional_template__ = false;
|
|
442
|
+
/* style inject */
|
|
443
|
+
|
|
444
|
+
/* style inject SSR */
|
|
445
|
+
|
|
446
|
+
/* style inject shadow dom */
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
451
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
452
|
+
__vue_inject_styles__,
|
|
453
|
+
__vue_script__,
|
|
454
|
+
__vue_scope_id__,
|
|
455
|
+
__vue_is_functional_template__,
|
|
456
|
+
__vue_module_identifier__,
|
|
457
|
+
false,
|
|
458
|
+
undefined,
|
|
459
|
+
undefined,
|
|
460
|
+
undefined
|
|
461
|
+
);
|
|
462
|
+
|
|
463
|
+
var Snackbar = __vue_component__;
|
|
464
|
+
|
|
465
|
+
var use = function use(plugin) {
|
|
466
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
467
|
+
window.Vue.use(plugin);
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
var registerComponentProgrammatic = function registerComponentProgrammatic(Vue, property, component) {
|
|
471
|
+
if (!Vue.prototype.$buefy) Vue.prototype.$buefy = {};
|
|
472
|
+
Vue.prototype.$buefy[property] = component;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
var localVueInstance;
|
|
476
|
+
var SnackbarProgrammatic = {
|
|
477
|
+
open: function open(params) {
|
|
478
|
+
var parent;
|
|
479
|
+
if (typeof params === 'string') {
|
|
480
|
+
params = {
|
|
481
|
+
message: params
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
var defaultParam = {
|
|
485
|
+
type: 'is-success',
|
|
486
|
+
position: config.defaultSnackbarPosition || 'is-bottom-right',
|
|
487
|
+
queue: true
|
|
488
|
+
};
|
|
489
|
+
if (params.parent) {
|
|
490
|
+
parent = params.parent;
|
|
491
|
+
delete params.parent;
|
|
492
|
+
}
|
|
493
|
+
var slot;
|
|
494
|
+
if (Array.isArray(params.message)) {
|
|
495
|
+
slot = params.message;
|
|
496
|
+
delete params.message;
|
|
497
|
+
}
|
|
498
|
+
var propsData = merge(defaultParam, params);
|
|
499
|
+
var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : localVueInstance || VueInstance;
|
|
500
|
+
var SnackbarComponent = vm.extend(Snackbar);
|
|
501
|
+
var component = new SnackbarComponent({
|
|
502
|
+
parent: parent,
|
|
503
|
+
el: document.createElement('div'),
|
|
504
|
+
propsData: propsData
|
|
505
|
+
});
|
|
506
|
+
if (slot) {
|
|
507
|
+
component.$slots.default = slot;
|
|
508
|
+
component.$forceUpdate();
|
|
509
|
+
}
|
|
510
|
+
return component;
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
var Plugin = {
|
|
514
|
+
install: function install(Vue) {
|
|
515
|
+
localVueInstance = Vue;
|
|
516
|
+
registerComponentProgrammatic(Vue, 'snackbar', SnackbarProgrammatic);
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
use(Plugin);
|
|
520
|
+
|
|
521
|
+
exports.BSnackbar = Snackbar;
|
|
522
|
+
exports.SnackbarProgrammatic = SnackbarProgrammatic;
|
|
523
|
+
exports["default"] = Plugin;
|
|
524
|
+
|
|
525
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
526
|
+
|
|
527
|
+
}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Snackbar={})}(this,(function(t){"use strict";var e=null,n=3500,o=null,i=!0;function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(t){return"object"===c(t)&&!Array.isArray(t)},p=function t(e,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(o||!Object.assign){var i=Object.getOwnPropertyNames(n).map((function(i){return u({},i,function(t){return l(n[t])&&null!==e&&e.hasOwnProperty(t)&&l(e[t])}(i)?t(e[i],n[i],o):n[i])})).reduce((function(t,e){return s(s({},t),e)}),{});return s(s({},e),i)}return Object.assign(e,n)};function d(t,e,n,o,i,r,s,a,c,u){"boolean"!=typeof s&&(c=a,a=s,s=!1);const l="function"==typeof n?n.options:n;let p;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),r?(p=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=p):e&&(p=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),p)if(l.functional){const t=l.render;l.render=function(e,n){return p.call(n),t(e,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,p):[p]}return n}var f,h,m=d({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{"enter-active-class":t.transition.enter,"leave-active-class":t.transition.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"snackbar",class:[t.type,t.position],attrs:{role:t.actionText?"alertdialog":"alert"},on:{mouseenter:t.pause,mouseleave:t.removePause}},[t.$slots.default?[t._t("default")]:[n("div",{staticClass:"text",domProps:{innerHTML:t._s(t.message)}})],t.cancelText?n("div",{staticClass:"action is-light is-cancel",on:{click:t.close}},[n("button",{staticClass:"button"},[t._v(t._s(t.cancelText))])]):t._e(),t.actionText?n("div",{staticClass:"action",class:t.type,on:{click:t.action}},[n("button",{staticClass:"button"},[t._v(t._s(t.actionText))])]):t._e()],2)])},staticRenderFns:[]},undefined,{name:"BSnackbar",mixins:[{props:{type:{type:String,default:"is-dark"},message:[String,Array],duration:Number,queue:{type:Boolean,default:void 0},indefinite:{type:Boolean,default:!1},pauseOnHover:{type:Boolean,default:!1},position:{type:String,default:"is-top",validator:function(t){return["is-top-right","is-top","is-top-left","is-bottom-right","is-bottom","is-bottom-left"].indexOf(t)>-1}},container:String},data:function(){return{isActive:!1,isPaused:!1,parentTop:null,parentBottom:null,newContainer:this.container||e}},computed:{correctParent:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return this.parentTop;case"is-bottom-right":case"is-bottom":case"is-bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"is-bottom-right":case"is-bottom":case"is-bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}},methods:{pause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!0,clearInterval(this.$buefy.globalNoticeInterval))},removePause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!1,this.close())},shouldQueue:function(){return!!(void 0!==this.queue?this.queue:i)&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},click:function(){this.$emit("click")},close:function(){var t=this;this.isPaused||(clearTimeout(this.timer),this.isActive=!1,this.$emit("close"),setTimeout((function(){var e;t.$destroy(),void 0!==(e=t.$el).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}),150))},timeoutCallback:function(){return this.close()},showNotice:function(){var t=this;this.shouldQueue()&&(this.correctParent.innerHTML=""),this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.indefinite||(this.timer=setTimeout((function(){return t.timeoutCallback()}),this.newDuration))},setupContainer:function(){if(this.parentTop=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-top"),this.parentBottom=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var t=document.querySelector(this.newContainer)||document.body;t.appendChild(this.parentTop),t.appendChild(this.parentBottom),this.newContainer&&(this.parentTop.classList.add("has-custom-container"),this.parentBottom.classList.add("has-custom-container"))}}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice()}}],props:{actionText:{type:String,default:"OK"},onAction:{type:Function,default:function(){}},cancelText:{type:null|String,default:null}},data:function(){return{newDuration:this.duration||n}},methods:{action:function(){this.onAction(),this.close()}}},undefined,false,undefined,!1,void 0,void 0,void 0),b={open:function(t){var e;"string"==typeof t&&(t={message:t});var n,i={type:"is-success",position:o||"is-bottom-right",queue:!0};t.parent&&(e=t.parent,delete t.parent),Array.isArray(t.message)&&(n=t.message,delete t.message);var r=p(i,t),s=new(("undefined"!=typeof window&&window.Vue?window.Vue:f||undefined).extend(m))({parent:e,el:document.createElement("div"),propsData:r});return n&&(s.$slots.default=n,s.$forceUpdate()),s}},y={install:function(t){f=t,function(t,e,n){t.prototype.$buefy||(t.prototype.$buefy={}),t.prototype.$buefy[e]=n}(t,"snackbar",b)}};h=y,"undefined"!=typeof window&&window.Vue&&window.Vue.use(h),t.BSnackbar=m,t.SnackbarProgrammatic=b,t.default=y,Object.defineProperty(t,"__esModule",{value:!0})}));
|