@smart-webcomponents-angular/phoneinput 10.3.4
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 +66 -0
- package/bundles/smart-webcomponents-angular-phoneinput.umd.js +1001 -0
- package/bundles/smart-webcomponents-angular-phoneinput.umd.min.js +25 -0
- package/common/i18n.phonenumbers.min.js +501 -0
- package/common/runtime.js +748 -0
- package/esm2015/phoneinput/public_api.js +3 -0
- package/esm2015/phoneinput/smart-webcomponents-angular-phoneinput.js +15 -0
- package/esm2015/phoneinput/smart.element.js +83 -0
- package/esm2015/phoneinput/smart.phoneinput.js +434 -0
- package/esm2015/phoneinput/smart.phoneinput.module.js +13 -0
- package/fesm2015/smart-webcomponents-angular-phoneinput.js +540 -0
- package/fesm2015/smart-webcomponents-angular-phoneinput.js.map +1 -0
- package/images/dropable_zone_image.svg +25 -0
- package/images/error.png +0 -0
- package/images/flags.png +0 -0
- package/images/icons-sprite.svg +85 -0
- package/images/icons-stack.svg +132 -0
- package/images/info.png +0 -0
- package/images/magnifier.png +0 -0
- package/images/mail.png +0 -0
- package/images/radial.svg +1 -0
- package/images/success.png +0 -0
- package/images/time.png +0 -0
- package/images/warning.png +0 -0
- package/index.d.ts +31510 -0
- package/package.json +64 -0
- package/phoneinput/public_api.d.ts +2 -0
- package/phoneinput/smart-webcomponents-angular-phoneinput.d.ts +5 -0
- package/phoneinput/smart-webcomponents-angular-phoneinput.metadata.json +1 -0
- package/phoneinput/smart.element.d.ts +36 -0
- package/phoneinput/smart.phoneinput.d.ts +144 -0
- package/phoneinput/smart.phoneinput.module.d.ts +2 -0
- package/source/modules/smart.input.js +15 -0
- package/source/modules/smart.phoneinput.js +18 -0
- package/source/smart.button.js +6 -0
- package/source/smart.countryinput.js +6 -0
- package/source/smart.element.js +6 -0
- package/source/smart.input.js +6 -0
- package/source/smart.phoneinput.js +6 -0
- package/source/smart.scrollbar.js +6 -0
- package/styles/font/smart-icons.eot +0 -0
- package/styles/font/smart-icons.svg +278 -0
- package/styles/font/smart-icons.ttf +0 -0
- package/styles/font/smart-icons.woff +0 -0
- package/styles/font/smart-icons.woff2 +0 -0
- package/styles/smart.base.css +4 -0
- package/styles/smart.common.css +1 -0
- package/styles/smart.phoneinput.css +3 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
if (!window['Smart']) {
|
|
3
|
+
window['Smart'] = { RenderMode: 'manual' };
|
|
4
|
+
}
|
|
5
|
+
else {
|
|
6
|
+
window['Smart'].RenderMode = 'manual';
|
|
7
|
+
}
|
|
8
|
+
import './../source/modules/smart.phoneinput';
|
|
9
|
+
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("smart-webcomponents-angular/phoneinput",["exports","@angular/core","@angular/forms"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["smart-webcomponents-angular"]=e["smart-webcomponents-angular"]||{},e["smart-webcomponents-angular"].phoneinput={}),e.ng.core,e.ng.forms)}(this,(function(e,t,n){"use strict";
|
|
11
|
+
/*! *****************************************************************************
|
|
12
|
+
Copyright (c) Microsoft Corporation.
|
|
13
|
+
|
|
14
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
15
|
+
purpose with or without fee is hereby granted.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
18
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
19
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
20
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
21
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
+
***************************************************************************** */var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{u(i.next(e))}catch(e){r(e)}}function l(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(a,l)}u((i=i.apply(e,t||[])).next())}))}function r(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}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,l])}}}Object.create;Object.create;var a=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:!1,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:!1,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:!1,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:!1,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:!1,configurable:!0}),e}();a.propDecorators={onCreate:[{type:t.Output}],onReady:[{type:t.Output}],onAttach:[{type:t.Output}],onDetach:[{type:t.Output}],locale:[{type:t.Input}],localizeFormatFunction:[{type:t.Input}],messages:[{type:t.Input}],rightToLeft:[{type:t.Input}],theme:[{type:t.Input}]};var l=window.Smart,u={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return s})),multi:!0},s=function(e){function n(n){var i=e.call(this,n)||this;return i.eventHandlers=[],i._onChange=function(){},i._onTouched=function(){},i.onChange=new t.EventEmitter,i.onChanging=new t.EventEmitter,i.onItemClick=new t.EventEmitter,i._initialChange=!0,i.nativeElement=n.nativeElement,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(n,e),n.prototype.createComponent=function(e){for(var t in void 0===e&&(e={}),this.nativeElement=document.createElement("smart-phone-input"),e)this.nativeElement[t]=e[t];return this.nativeElement},Object.defineProperty(n.prototype,"disabled",{get:function(){return this.nativeElement?this.nativeElement.disabled:void 0},set:function(e){this.nativeElement&&(this.nativeElement.disabled=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropDownClassList",{get:function(){return this.nativeElement?this.nativeElement.dropDownClassList:void 0},set:function(e){this.nativeElement&&(this.nativeElement.dropDownClassList=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropDownButtonPosition",{get:function(){return this.nativeElement?this.nativeElement.dropDownButtonPosition:void 0},set:function(e){this.nativeElement&&(this.nativeElement.dropDownButtonPosition=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropDownHeight",{get:function(){return this.nativeElement?this.nativeElement.dropDownHeight:void 0},set:function(e){this.nativeElement&&(this.nativeElement.dropDownHeight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dropDownWidth",{get:function(){return this.nativeElement?this.nativeElement.dropDownWidth:void 0},set:function(e){this.nativeElement&&(this.nativeElement.dropDownWidth=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"messages",{get:function(){return this.nativeElement?this.nativeElement.messages:void 0},set:function(e){this.nativeElement&&(this.nativeElement.messages=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this.nativeElement?this.nativeElement.name:void 0},set:function(e){this.nativeElement&&(this.nativeElement.name=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nationalMode",{get:function(){return this.nativeElement?this.nativeElement.nationalMode:void 0},set:function(e){this.nativeElement&&(this.nativeElement.nationalMode=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"opened",{get:function(){return this.nativeElement?this.nativeElement.opened:void 0},set:function(e){this.nativeElement&&(this.nativeElement.opened=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onlyCountries",{get:function(){return this.nativeElement?this.nativeElement.onlyCountries:void 0},set:function(e){this.nativeElement&&(this.nativeElement.onlyCountries=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"placeholder",{get:function(){return this.nativeElement?this.nativeElement.placeholder:void 0},set:function(e){this.nativeElement&&(this.nativeElement.placeholder=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"selectedCountry",{get:function(){return this.nativeElement?this.nativeElement.selectedCountry:void 0},set:function(e){this.nativeElement&&(this.nativeElement.selectedCountry=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rightToLeft",{get:function(){return this.nativeElement?this.nativeElement.rightToLeft:void 0},set:function(e){this.nativeElement&&(this.nativeElement.rightToLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"theme",{get:function(){return this.nativeElement?this.nativeElement.theme:void 0},set:function(e){this.nativeElement&&(this.nativeElement.theme=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"unfocusable",{get:function(){return this.nativeElement?this.nativeElement.unfocusable:void 0},set:function(e){this.nativeElement&&(this.nativeElement.unfocusable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.nativeElement?this.nativeElement.value:void 0},set:function(e){this.nativeElement&&(this.nativeElement.value=e)},enumerable:!1,configurable:!0}),n.prototype.close=function(){var e=this;this.nativeElement.isRendered?this.nativeElement.close():this.nativeElement.whenRendered((function(){e.nativeElement.close()}))},n.prototype.ensureVisible=function(){var e=this;this.nativeElement.isRendered?this.nativeElement.ensureVisible():this.nativeElement.whenRendered((function(){e.nativeElement.ensureVisible()}))},n.prototype.getNumber=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.getNumber(e);n(i)}))}))}()];case 1:return[2,n.sent()]}}))}))},n.prototype.getItemByDialCode=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.getItemByDialCode(e);n(i)}))}))}()];case 1:return[2,n.sent()]}}))}))},n.prototype.getSelectedItem=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.getSelectedItem();t(n)}))}))}()];case 1:return[2,t.sent()]}}))}))},n.prototype.isValidNumber=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.isValidNumber();t(n)}))}))}()];case 1:return[2,t.sent()]}}))}))},n.prototype.validate=function(){var e=this;this.nativeElement.isRendered?this.nativeElement.validate():this.nativeElement.whenRendered((function(){e.nativeElement.validate()}))},n.prototype.open=function(){var e=this;this.nativeElement.isRendered?this.nativeElement.open():this.nativeElement.whenRendered((function(){e.nativeElement.open()}))},n.prototype.select=function(){var e=this;this.nativeElement.isRendered?this.nativeElement.select():this.nativeElement.whenRendered((function(){e.nativeElement.select()}))},Object.defineProperty(n.prototype,"isRendered",{get:function(){return!!this.nativeElement&&this.nativeElement.isRendered},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngAfterViewInit=function(){var e=this;e.onCreate.emit(e.nativeElement),l.Render(),this.nativeElement.classList.add("smart-angular"),this.nativeElement.whenRendered((function(){e.onReady.emit(e.nativeElement)})),this.listen()},n.prototype.ngOnDestroy=function(){this.unlisten()},Object.defineProperty(n.prototype,"ngValue",{get:function(){return this.nativeElement?this.nativeElement.value:null},set:function(e){this.nativeElement&&this.writeValue(e)},enumerable:!1,configurable:!0}),n.prototype.writeValue=function(e){var t=this,n=null==e?"":e;t.nativeElement.whenRendered((function(){t.value=n,!1===t._initialChange&&t._onChange(t.value)}))},n.prototype.registerOnChange=function(e){this._onChange=e},n.prototype.registerOnTouched=function(e){this._onTouched=e},n.prototype.ngOnChanges=function(e){if(this.nativeElement&&this.nativeElement.isRendered)for(var t in e)e.hasOwnProperty(t)&&(this.nativeElement[t]=e[t].currentValue)},n.prototype.listen=function(){var e=this;e.eventHandlers.changeHandler=function(t){e.onChange.emit(t)},e.nativeElement.addEventListener("change",e.eventHandlers.changeHandler),e.eventHandlers.changingHandler=function(t){e.onChanging.emit(t)},e.nativeElement.addEventListener("changing",e.eventHandlers.changingHandler),e.eventHandlers.itemClickHandler=function(t){e.onItemClick.emit(t)},e.nativeElement.addEventListener("itemClick",e.eventHandlers.itemClickHandler),e.eventHandlers.changeModelHandler=function(t){e._initialChange=!1,e._onChange(e.nativeElement.value)},e.eventHandlers.blurModelHandler=function(t){e._onTouched()},e.nativeElement.whenRendered((function(){e.nativeElement.querySelector("input")&&(e.eventHandlers.keyupModelHandler=function(t){setTimeout((function(){e.eventHandlers.changeModelHandler(t)}),50)},e.nativeElement.querySelector("input").addEventListener("keyup",e.eventHandlers.keyupModelHandler))})),e.nativeElement.addEventListener("change",e.eventHandlers.changeModelHandler),e.nativeElement.addEventListener("blur",e.eventHandlers.blurModelHandler)},n.prototype.unlisten=function(){var e=this;e.eventHandlers.changeHandler&&e.nativeElement.removeEventListener("change",e.eventHandlers.changeHandler),e.eventHandlers.changingHandler&&e.nativeElement.removeEventListener("changing",e.eventHandlers.changingHandler),e.eventHandlers.itemClickHandler&&e.nativeElement.removeEventListener("itemClick",e.eventHandlers.itemClickHandler),e.eventHandlers.changeModelHandler&&(e.nativeElement.removeEventListener("change",e.eventHandlers.changeModelHandler),e.nativeElement.querySelector("input")&&e.nativeElement.querySelector("input").removeEventListener("keyup",e.eventHandlers.keyupModelHandler)),e.eventHandlers.blurModelHandler&&e.nativeElement.removeEventListener("blur",e.eventHandlers.blurModelHandler)},n}(a);s.decorators=[{type:t.Directive,args:[{selector:"smart-phone-input, [smart-phone-input]",providers:[u]}]}],s.ctorParameters=function(){return[{type:t.ElementRef}]},s.propDecorators={disabled:[{type:t.Input}],dropDownClassList:[{type:t.Input}],dropDownButtonPosition:[{type:t.Input}],dropDownHeight:[{type:t.Input}],dropDownWidth:[{type:t.Input}],messages:[{type:t.Input}],name:[{type:t.Input}],nationalMode:[{type:t.Input}],opened:[{type:t.Input}],onlyCountries:[{type:t.Input}],placeholder:[{type:t.Input}],selectedCountry:[{type:t.Input}],rightToLeft:[{type:t.Input}],theme:[{type:t.Input}],unfocusable:[{type:t.Input}],value:[{type:t.Input}],onChange:[{type:t.Output}],onChanging:[{type:t.Output}],onItemClick:[{type:t.Output}]};var c=function(){};c.decorators=[{type:t.NgModule,args:[{declarations:[s],schemas:[t.CUSTOM_ELEMENTS_SCHEMA],exports:[s]}]}],e.PhoneInputComponent=s,e.PhoneInputModule=c,e.Smart=l,e.ɵa=a,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
25
|
+
//# sourceMappingURL=smart-webcomponents-angular-phoneinput.umd.min.js.map
|