@vicenterusso/vue-formulate-currency
Version:
Vue Formulate + Vue Currency Input
2 lines • 3.69 kB
JavaScript
(function(e,t){if("object"===typeof exports&&"object"===typeof module)module.exports=t();else if("function"===typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"===typeof exports?exports:e)[r]=n[r]}})(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({0:function(e,t,n){e.exports=n("56d7")},"56d7":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("currency-input",e._b({attrs:{type:"text",currency:e.currency,locale:e.locale,precision:e.precision,"auto-decimal-mode":e.autoDecimalMode,"distraction-free":e.distractionFree,"hide-currency-symbol":e.hideCurrencySymbol},on:{blur:e.context.blurHandler},model:{value:e.context.model,callback:function(t){e.$set(e.context,"model",t)},expression:"context.model"}},"currency-input",e.context.attributes,!1))},o=[],c=n("d805"),i=n.n(c),u={components:{currency:i.a},props:{context:{type:Object,required:!0}},computed:{currencyConfig(){return this.context.attributes.config},myType(){return"undefined"!==typeof this.context.attributes.subtype&&"porcentagem"===this.context.attributes.subtype?"percent":"money"},currency(){return"money"===this.myType?this.currencyConfig.money().currency:this.currencyConfig.porcentagem().currency},locale(){return"money"===this.myType?this.currencyConfig.money().locale:this.currencyConfig.porcentagem().locale},precision(){return this.myType,this.currencyConfig.porcentagem().precision},autoDecimalMode(){return this.myType,this.currencyConfig.porcentagem().autoDecimalMode},distractionFree(){return this.myType,this.currencyConfig.porcentagem().distractionFree},hideCurrencySymbol(){return this.myType,this.currencyConfig.porcentagem().hideCurrencySymbol}}},s=u;function a(e,t,n,r,o,c,i,u){var s,a="function"===typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),c&&(a._scopeId="data-v-"+c),i?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},a._ssrRegister=s):o&&(s=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(a.functional){a._injectStyles=s;var l=a.render;a.render=function(e,t){return s.call(t),l(e,t)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,s):[s]}return{exports:e,options:a}}var l=a(s,r,o,!1,null,null,null),f=l.exports;function p(e){e.extend({components:{FormulateVueCurrency:f},library:{currency:{classification:"text",component:"FormulateVueCurrency"}}})}},d805:function(e,t){e.exports=require("vue-currency-input")}})}));
//# sourceMappingURL=index.js.map