-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsmart-webcomponents-angular-barcode.umd.min.js
25 lines (21 loc) · 12.9 KB
/
smart-webcomponents-angular-barcode.umd.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if (!window['Smart']) {
window['Smart'] = { RenderMode: 'manual' };
}
else {
window['Smart'].RenderMode = 'manual';
}
import './../source/modules/smart.barcode';
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("smart-webcomponents-angular/barcode",["exports","@angular/core"],t):t(((e=e||self)["smart-webcomponents-angular"]=e["smart-webcomponents-angular"]||{},e["smart-webcomponents-angular"].barcode={}),e.ng.core)}(this,(function(e,t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t,n,i){var o,r=arguments.length,l=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(l=(r<3?o(l):r>3?o(t,n,l):o(t,n))||l);return r>3&&l&&Object.defineProperty(t,n,l),l}function o(e,t,n,i){return new(n||(n=Promise))((function(o,r){function l(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,a)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var n,i,o,r,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,i=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){l=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){l.label=r[1];break}if(6===r[0]&&l.label<o[1]){l.label=o[1],o=r;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(r);break}o[2]&&l.ops.pop(),l.trys.pop();continue}r=t.call(e,l)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}var l=function(){function e(e){this.onCreate=new t.EventEmitter,this.onReady=new t.EventEmitter,this.onAttach=new t.EventEmitter,this.onDetach=new t.EventEmitter;var n=this;this.nativeElement=e.nativeElement,n.nativeElement.onAttached=function(){n.onAttach.emit(n.nativeElement)},n.nativeElement.onDetached=function(){n.onDetach.emit(n.nativeElement)}}return e.prototype.addEventListener=function(e,t,n){void 0===n&&(n=!1),this.nativeElement.addEventListener(e,t,n)},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n=!1),this.nativeElement.removeEventListener(e,t,n)},e.prototype.dispatchEvent=function(e){return this.nativeElement.dispatchEvent(e)},e.prototype.blur=function(){this.nativeElement.blur()},e.prototype.click=function(){this.nativeElement.click()},e.prototype.focus=function(e){this.nativeElement.focus(e)},Object.defineProperty(e.prototype,"locale",{get:function(){return this.nativeElement?this.nativeElement.locale:void 0},set:function(e){this.nativeElement&&(this.nativeElement.locale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localizeFormatFunction",{get:function(){return this.nativeElement?this.nativeElement.localizeFormatFunction:void 0},set:function(e){this.nativeElement&&(this.nativeElement.localizeFormatFunction=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messages",{get:function(){return this.nativeElement?this.nativeElement.messages:void 0},set:function(e){this.nativeElement&&(this.nativeElement.messages=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightToLeft",{get:function(){return this.nativeElement?this.nativeElement.rightToLeft:void 0},set:function(e){this.nativeElement&&(this.nativeElement.rightToLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"theme",{get:function(){return this.nativeElement?this.nativeElement.theme:void 0},set:function(e){this.nativeElement&&(this.nativeElement.theme=e)},enumerable:!0,configurable:!0}),i([t.Output()],e.prototype,"onCreate",void 0),i([t.Output()],e.prototype,"onReady",void 0),i([t.Output()],e.prototype,"onAttach",void 0),i([t.Output()],e.prototype,"onDetach",void 0),i([t.Input()],e.prototype,"locale",null),i([t.Input()],e.prototype,"localizeFormatFunction",null),i([t.Input()],e.prototype,"messages",null),i([t.Input()],e.prototype,"rightToLeft",null),i([t.Input()],e.prototype,"theme",null),e}(),a=window.Smart,u=function(e){function l(n){var i=e.call(this,n)||this;return i.eventHandlers=[],i.onInvalid=new t.EventEmitter,i.nativeElement=n.nativeElement,i}return function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(l,e),l.prototype.createComponent=function(e){for(var t in void 0===e&&(e={}),this.nativeElement=document.createElement("smart-barcode"),e)this.nativeElement[t]=e[t];return this.nativeElement},Object.defineProperty(l.prototype,"backgroundColor",{get:function(){return this.nativeElement?this.nativeElement.backgroundColor:void 0},set:function(e){this.nativeElement&&(this.nativeElement.backgroundColor=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"displayLabel",{get:function(){return this.nativeElement?this.nativeElement.displayLabel:void 0},set:function(e){this.nativeElement&&(this.nativeElement.displayLabel=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelColor",{get:function(){return this.nativeElement?this.nativeElement.labelColor:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelColor=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelFont",{get:function(){return this.nativeElement?this.nativeElement.labelFont:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelFont=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelFontSize",{get:function(){return this.nativeElement?this.nativeElement.labelFontSize:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelFontSize=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelMarginBottom",{get:function(){return this.nativeElement?this.nativeElement.labelMarginBottom:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelMarginBottom=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelMarginTop",{get:function(){return this.nativeElement?this.nativeElement.labelMarginTop:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelMarginTop=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelPosition",{get:function(){return this.nativeElement?this.nativeElement.labelPosition:void 0},set:function(e){this.nativeElement&&(this.nativeElement.labelPosition=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"lineColor",{get:function(){return this.nativeElement?this.nativeElement.lineColor:void 0},set:function(e){this.nativeElement&&(this.nativeElement.lineColor=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"lineHeight",{get:function(){return this.nativeElement?this.nativeElement.lineHeight:void 0},set:function(e){this.nativeElement&&(this.nativeElement.lineHeight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"lineWidth",{get:function(){return this.nativeElement?this.nativeElement.lineWidth:void 0},set:function(e){this.nativeElement&&(this.nativeElement.lineWidth=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"renderAs",{get:function(){return this.nativeElement?this.nativeElement.renderAs:void 0},set:function(e){this.nativeElement&&(this.nativeElement.renderAs=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"type",{get:function(){return this.nativeElement?this.nativeElement.type:void 0},set:function(e){this.nativeElement&&(this.nativeElement.type=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"value",{get:function(){return this.nativeElement?this.nativeElement.value:void 0},set:function(e){this.nativeElement&&(this.nativeElement.value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"width",{get:function(){return this.nativeElement?this.nativeElement.width:void 0},set:function(e){this.nativeElement&&(this.nativeElement.width=e)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"height",{get:function(){return this.nativeElement?this.nativeElement.height:void 0},set:function(e){this.nativeElement&&(this.nativeElement.height=e)},enumerable:!0,configurable:!0}),l.prototype.export=function(e,t){var n=this;this.nativeElement.isRendered?this.nativeElement.export(e,t):this.nativeElement.whenRendered((function(){n.nativeElement.export(e,t)}))},l.prototype.getDataURL=function(e){return o(this,void 0,void 0,(function(){var t=this;return r(this,(function(n){switch(n.label){case 0:return[4,function(){return new Promise((function(n){t.nativeElement.whenRendered((function(){var i=t.nativeElement.getDataURL(e);n(i)}))}))}()];case 1:return[2,n.sent()]}}))}))},l.prototype.getDataURLAsync=function(e){return o(this,void 0,void 0,(function(){var t=this;return r(this,(function(n){switch(n.label){case 0:return[4,function(){return new Promise((function(n){t.nativeElement.whenRendered((function(){var i=t.nativeElement.getDataURLAsync(e);n(i)}))}))}()];case 1:return[2,n.sent()]}}))}))},l.prototype.isValid=function(){return o(this,void 0,void 0,(function(){var e=this;return r(this,(function(t){switch(t.label){case 0:return[4,function(){return new Promise((function(t){e.nativeElement.whenRendered((function(){var n=e.nativeElement.isValid();t(n)}))}))}()];case 1:return[2,t.sent()]}}))}))},Object.defineProperty(l.prototype,"isRendered",{get:function(){return!!this.nativeElement&&this.nativeElement.isRendered},enumerable:!0,configurable:!0}),l.prototype.ngOnInit=function(){},l.prototype.ngAfterViewInit=function(){var e=this;e.onCreate.emit(e.nativeElement),a.Render(),this.nativeElement.classList.add("smart-angular"),this.nativeElement.whenRendered((function(){e.onReady.emit(e.nativeElement)})),this.listen()},l.prototype.ngOnDestroy=function(){this.unlisten()},l.prototype.ngOnChanges=function(e){if(this.nativeElement&&this.nativeElement.isRendered)for(var t in e)e.hasOwnProperty(t)&&(this.nativeElement[t]=e[t].currentValue)},l.prototype.listen=function(){var e=this;e.eventHandlers.invalidHandler=function(t){e.onInvalid.emit(t)},e.nativeElement.addEventListener("invalid",e.eventHandlers.invalidHandler)},l.prototype.unlisten=function(){this.eventHandlers.invalidHandler&&this.nativeElement.removeEventListener("invalid",this.eventHandlers.invalidHandler)},l.ctorParameters=function(){return[{type:t.ElementRef}]},i([t.Input()],l.prototype,"backgroundColor",null),i([t.Input()],l.prototype,"displayLabel",null),i([t.Input()],l.prototype,"labelColor",null),i([t.Input()],l.prototype,"labelFont",null),i([t.Input()],l.prototype,"labelFontSize",null),i([t.Input()],l.prototype,"labelMarginBottom",null),i([t.Input()],l.prototype,"labelMarginTop",null),i([t.Input()],l.prototype,"labelPosition",null),i([t.Input()],l.prototype,"lineColor",null),i([t.Input()],l.prototype,"lineHeight",null),i([t.Input()],l.prototype,"lineWidth",null),i([t.Input()],l.prototype,"renderAs",null),i([t.Input()],l.prototype,"type",null),i([t.Input()],l.prototype,"value",null),i([t.Input()],l.prototype,"width",null),i([t.Input()],l.prototype,"height",null),i([t.Output()],l.prototype,"onInvalid",void 0),l=i([t.Directive({exportAs:"smart-barcode",selector:"smart-barcode, [smart-barcode]"})],l)}(l),s=function(){function e(){}return e=i([t.NgModule({declarations:[u],schemas:[t.CUSTOM_ELEMENTS_SCHEMA],exports:[u]})],e)}();e.BarcodeComponent=u,e.BarcodeModule=s,e.Smart=a,e.ɵa=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=smart-webcomponents-angular-barcode.umd.min.js.map