primeng 11.1.0 → 11.2.3
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 +1 -0
- package/api/confirmaeventtype.d.ts +5 -0
- package/api/filtermatchmode.d.ts +4 -0
- package/api/filterservice.d.ts +4 -0
- package/api/primeng-api.metadata.json +1 -1
- package/api/public_api.d.ts +1 -0
- package/api/translation.d.ts +4 -0
- package/autocomplete/autocomplete.d.ts +8 -1
- package/autocomplete/primeng-autocomplete.metadata.json +1 -1
- package/avatar/primeng-avatar.metadata.json +1 -1
- package/bundles/primeng-api.umd.js +56 -6
- package/bundles/primeng-api.umd.js.map +1 -1
- package/bundles/primeng-api.umd.min.js +1 -1
- package/bundles/primeng-api.umd.min.js.map +1 -1
- package/bundles/primeng-autocomplete.umd.js +86 -17
- package/bundles/primeng-autocomplete.umd.js.map +1 -1
- package/bundles/primeng-autocomplete.umd.min.js +1 -1
- package/bundles/primeng-autocomplete.umd.min.js.map +1 -1
- package/bundles/primeng-avatar.umd.js +1 -1
- package/bundles/primeng-avatar.umd.min.js +1 -1
- package/bundles/primeng-avatar.umd.min.js.map +1 -1
- package/bundles/primeng-calendar.umd.js +6 -0
- package/bundles/primeng-calendar.umd.js.map +1 -1
- package/bundles/primeng-calendar.umd.min.js +1 -1
- package/bundles/primeng-calendar.umd.min.js.map +1 -1
- package/bundles/primeng-cascadeselect.umd.js +8 -5
- package/bundles/primeng-cascadeselect.umd.js.map +1 -1
- package/bundles/primeng-cascadeselect.umd.min.js +2 -2
- package/bundles/primeng-cascadeselect.umd.min.js.map +1 -1
- package/bundles/primeng-colorpicker.umd.js.map +1 -1
- package/bundles/primeng-colorpicker.umd.min.js.map +1 -1
- package/bundles/primeng-confirmdialog.umd.js +11 -8
- package/bundles/primeng-confirmdialog.umd.js.map +1 -1
- package/bundles/primeng-confirmdialog.umd.min.js +1 -1
- package/bundles/primeng-confirmdialog.umd.min.js.map +1 -1
- package/bundles/primeng-contextmenu.umd.js +2 -2
- package/bundles/primeng-contextmenu.umd.js.map +1 -1
- package/bundles/primeng-contextmenu.umd.min.js +1 -1
- package/bundles/primeng-contextmenu.umd.min.js.map +1 -1
- package/bundles/primeng-dialog.umd.js +1 -1
- package/bundles/primeng-dialog.umd.min.js +1 -1
- package/bundles/primeng-dialog.umd.min.js.map +1 -1
- package/bundles/primeng-dom.umd.js +3 -0
- package/bundles/primeng-dom.umd.js.map +1 -1
- package/bundles/primeng-dom.umd.min.js +1 -1
- package/bundles/primeng-dom.umd.min.js.map +1 -1
- package/bundles/primeng-dropdown.umd.js +1 -1
- package/bundles/primeng-dropdown.umd.js.map +1 -1
- package/bundles/primeng-dropdown.umd.min.js +1 -1
- package/bundles/primeng-dropdown.umd.min.js.map +1 -1
- package/bundles/primeng-dynamicdialog.umd.js +1 -1
- package/bundles/primeng-dynamicdialog.umd.min.js +1 -1
- package/bundles/primeng-dynamicdialog.umd.min.js.map +1 -1
- package/bundles/primeng-inputmask.umd.js +5 -2
- package/bundles/primeng-inputmask.umd.js.map +1 -1
- package/bundles/primeng-inputmask.umd.min.js +1 -1
- package/bundles/primeng-inputmask.umd.min.js.map +1 -1
- package/bundles/primeng-inputnumber.umd.js +16 -2
- package/bundles/primeng-inputnumber.umd.js.map +1 -1
- package/bundles/primeng-inputnumber.umd.min.js +1 -1
- package/bundles/primeng-inputnumber.umd.min.js.map +1 -1
- package/bundles/primeng-knob.umd.js +1 -1
- package/bundles/primeng-knob.umd.js.map +1 -1
- package/bundles/primeng-knob.umd.min.js +1 -1
- package/bundles/primeng-knob.umd.min.js.map +1 -1
- package/bundles/primeng-lightbox.umd.js +1 -1
- package/bundles/primeng-lightbox.umd.min.js +1 -1
- package/bundles/primeng-lightbox.umd.min.js.map +1 -1
- package/bundles/primeng-listbox.umd.js +133 -34
- package/bundles/primeng-listbox.umd.js.map +1 -1
- package/bundles/primeng-listbox.umd.min.js +1 -1
- package/bundles/primeng-listbox.umd.min.js.map +1 -1
- package/bundles/primeng-multiselect.umd.js +146 -32
- package/bundles/primeng-multiselect.umd.js.map +1 -1
- package/bundles/primeng-multiselect.umd.min.js +2 -2
- package/bundles/primeng-multiselect.umd.min.js.map +1 -1
- package/bundles/primeng-sidebar.umd.js.map +1 -1
- package/bundles/primeng-sidebar.umd.min.js.map +1 -1
- package/bundles/primeng-slider.umd.js +1 -0
- package/bundles/primeng-slider.umd.js.map +1 -1
- package/bundles/primeng-slider.umd.min.js +1 -1
- package/bundles/primeng-slider.umd.min.js.map +1 -1
- package/bundles/primeng-table.umd.js +117 -16
- package/bundles/primeng-table.umd.js.map +1 -1
- package/bundles/primeng-table.umd.min.js +1 -1
- package/bundles/primeng-table.umd.min.js.map +1 -1
- package/bundles/primeng-tabview.umd.js +25 -3
- package/bundles/primeng-tabview.umd.js.map +1 -1
- package/bundles/primeng-tabview.umd.min.js +1 -1
- package/bundles/primeng-tabview.umd.min.js.map +1 -1
- package/bundles/primeng-treetable.umd.js +1 -1
- package/bundles/primeng-treetable.umd.js.map +1 -1
- package/bundles/primeng-treetable.umd.min.js +1 -1
- package/bundles/primeng-treetable.umd.min.js.map +1 -1
- package/bundles/primeng-virtualscroller.umd.js +3 -2
- package/bundles/primeng-virtualscroller.umd.js.map +1 -1
- package/bundles/primeng-virtualscroller.umd.min.js +1 -1
- package/bundles/primeng-virtualscroller.umd.min.js.map +1 -1
- package/calendar/primeng-calendar.metadata.json +1 -1
- package/cascadeselect/cascadeselect.d.ts +3 -3
- package/cascadeselect/primeng-cascadeselect.metadata.json +1 -1
- package/colorpicker/colorpicker.d.ts +1 -1
- package/confirmdialog/confirmdialog.d.ts +3 -2
- package/confirmdialog/primeng-confirmdialog.metadata.json +1 -1
- package/dialog/primeng-dialog.metadata.json +1 -1
- package/dom/primeng-dom.metadata.json +1 -1
- package/dropdown/primeng-dropdown.metadata.json +1 -1
- package/dynamicdialog/primeng-dynamicdialog.metadata.json +1 -1
- package/esm2015/api/confirmaeventtype.js +7 -0
- package/esm2015/api/filtermatchmode.js +5 -1
- package/esm2015/api/filterservice.js +39 -3
- package/esm2015/api/primengconfig.js +9 -5
- package/esm2015/api/public_api.js +2 -1
- package/esm2015/api/translation.js +1 -1
- package/esm2015/autocomplete/autocomplete.js +105 -22
- package/esm2015/avatar/avatar.js +1 -1
- package/esm2015/calendar/calendar.js +7 -1
- package/esm2015/cascadeselect/cascadeselect.js +9 -6
- package/esm2015/colorpicker/colorpicker.js +1 -1
- package/esm2015/confirmdialog/confirmdialog.js +14 -11
- package/esm2015/contextmenu/contextmenu.js +3 -3
- package/esm2015/dialog/dialog.js +1 -1
- package/esm2015/dom/domhandler.js +4 -1
- package/esm2015/dropdown/dropdown.js +2 -2
- package/esm2015/dynamicdialog/dynamicdialog.js +1 -1
- package/esm2015/inputmask/inputmask.js +6 -3
- package/esm2015/inputnumber/inputnumber.js +13 -3
- package/esm2015/knob/knob.js +2 -2
- package/esm2015/lightbox/lightbox.js +1 -1
- package/esm2015/listbox/listbox.js +134 -42
- package/esm2015/multiselect/multiselect.js +149 -42
- package/esm2015/sidebar/sidebar.js +1 -1
- package/esm2015/slider/slider.js +2 -1
- package/esm2015/table/table.js +127 -17
- package/esm2015/tabview/tabview.js +18 -4
- package/esm2015/treetable/treetable.js +2 -2
- package/esm2015/virtualscroller/virtualscroller.js +4 -3
- package/fesm2015/primeng-api.js +58 -7
- package/fesm2015/primeng-api.js.map +1 -1
- package/fesm2015/primeng-autocomplete.js +104 -21
- package/fesm2015/primeng-autocomplete.js.map +1 -1
- package/fesm2015/primeng-avatar.js +1 -1
- package/fesm2015/primeng-calendar.js +6 -0
- package/fesm2015/primeng-calendar.js.map +1 -1
- package/fesm2015/primeng-cascadeselect.js +8 -5
- package/fesm2015/primeng-cascadeselect.js.map +1 -1
- package/fesm2015/primeng-colorpicker.js.map +1 -1
- package/fesm2015/primeng-confirmdialog.js +13 -10
- package/fesm2015/primeng-confirmdialog.js.map +1 -1
- package/fesm2015/primeng-contextmenu.js +2 -2
- package/fesm2015/primeng-contextmenu.js.map +1 -1
- package/fesm2015/primeng-dialog.js +1 -1
- package/fesm2015/primeng-dom.js +3 -0
- package/fesm2015/primeng-dom.js.map +1 -1
- package/fesm2015/primeng-dropdown.js +1 -1
- package/fesm2015/primeng-dropdown.js.map +1 -1
- package/fesm2015/primeng-dynamicdialog.js +1 -1
- package/fesm2015/primeng-inputmask.js +5 -2
- package/fesm2015/primeng-inputmask.js.map +1 -1
- package/fesm2015/primeng-inputnumber.js +12 -2
- package/fesm2015/primeng-inputnumber.js.map +1 -1
- package/fesm2015/primeng-knob.js +1 -1
- package/fesm2015/primeng-knob.js.map +1 -1
- package/fesm2015/primeng-lightbox.js +1 -1
- package/fesm2015/primeng-listbox.js +133 -41
- package/fesm2015/primeng-listbox.js.map +1 -1
- package/fesm2015/primeng-multiselect.js +148 -41
- package/fesm2015/primeng-multiselect.js.map +1 -1
- package/fesm2015/primeng-sidebar.js.map +1 -1
- package/fesm2015/primeng-slider.js +1 -0
- package/fesm2015/primeng-slider.js.map +1 -1
- package/fesm2015/primeng-table.js +126 -16
- package/fesm2015/primeng-table.js.map +1 -1
- package/fesm2015/primeng-tabview.js +17 -3
- package/fesm2015/primeng-tabview.js.map +1 -1
- package/fesm2015/primeng-treetable.js +1 -1
- package/fesm2015/primeng-treetable.js.map +1 -1
- package/fesm2015/primeng-virtualscroller.js +3 -2
- package/fesm2015/primeng-virtualscroller.js.map +1 -1
- package/inputmask/inputmask.d.ts +2 -1
- package/inputmask/primeng-inputmask.metadata.json +1 -1
- package/inputnumber/inputnumber.d.ts +3 -1
- package/inputnumber/primeng-inputnumber.metadata.json +1 -1
- package/knob/primeng-knob.metadata.json +1 -1
- package/lightbox/primeng-lightbox.metadata.json +1 -1
- package/listbox/listbox.d.ts +7 -1
- package/listbox/primeng-listbox.metadata.json +1 -1
- package/multiselect/multiselect.d.ts +8 -1
- package/multiselect/primeng-multiselect.metadata.json +1 -1
- package/package.json +1 -1
- package/resources/components/avatar/avatar.css +3 -2
- package/resources/components/dialog/dialog.css +2 -0
- package/resources/components/virtualscroller/virtualscroller.css +2 -16
- package/resources/themes/arya-blue/theme.css +26 -38
- package/resources/themes/arya-green/theme.css +26 -38
- package/resources/themes/arya-orange/theme.css +26 -38
- package/resources/themes/arya-purple/theme.css +26 -38
- package/resources/themes/bootstrap4-dark-blue/theme.css +26 -38
- package/resources/themes/bootstrap4-dark-purple/theme.css +26 -38
- package/resources/themes/bootstrap4-light-blue/theme.css +26 -38
- package/resources/themes/bootstrap4-light-purple/theme.css +26 -38
- package/resources/themes/fluent-light/theme.css +26 -38
- package/resources/themes/luna-amber/theme.css +26 -38
- package/resources/themes/luna-blue/theme.css +26 -38
- package/resources/themes/luna-green/theme.css +26 -38
- package/resources/themes/luna-pink/theme.css +26 -38
- package/resources/themes/md-dark-deeppurple/theme.css +89 -69
- package/resources/themes/md-dark-indigo/theme.css +89 -69
- package/resources/themes/md-light-deeppurple/theme.css +293 -273
- package/resources/themes/md-light-indigo/theme.css +293 -273
- package/resources/themes/mdc-dark-deeppurple/theme.css +89 -69
- package/resources/themes/mdc-dark-indigo/theme.css +89 -69
- package/resources/themes/mdc-light-deeppurple/theme.css +293 -273
- package/resources/themes/mdc-light-indigo/theme.css +293 -273
- package/resources/themes/nova/theme.css +26 -38
- package/resources/themes/nova-accent/theme.css +26 -38
- package/resources/themes/nova-alt/theme.css +26 -38
- package/resources/themes/rhea/theme.css +26 -38
- package/resources/themes/saga-blue/theme.css +26 -38
- package/resources/themes/saga-green/theme.css +26 -38
- package/resources/themes/saga-orange/theme.css +26 -38
- package/resources/themes/saga-purple/theme.css +26 -38
- package/resources/themes/vela-blue/theme.css +26 -38
- package/resources/themes/vela-green/theme.css +26 -38
- package/resources/themes/vela-orange/theme.css +26 -38
- package/resources/themes/vela-purple/theme.css +26 -38
- package/sidebar/sidebar.d.ts +1 -1
- package/slider/primeng-slider.metadata.json +1 -1
- package/table/primeng-table.metadata.json +1 -1
- package/table/table.d.ts +12 -0
- package/tabview/primeng-tabview.metadata.json +1 -1
- package/tabview/tabview.d.ts +6 -2
- package/treetable/primeng-treetable.metadata.json +1 -1
- package/virtualscroller/primeng-virtualscroller.metadata.json +1 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("rxjs")):"function"==typeof define&&define.amd?define("primeng/dynamicdialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dynamicdialog={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.dom,e.rxjs)}(this,(function(e,t,n,o,i,a){"use strict";var s=function(e){this.viewContainerRef=e};s.decorators=[{type:t.Directive,args:[{selector:"[pDynamicDialogContent]"}]}],s.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var r=function(){},l=function(){function e(){this._onClose=new a.Subject,this.onClose=this._onClose.asObservable(),this._onDestroy=new a.Subject,this.onDestroy=this._onDestroy.asObservable()}return e.prototype.close=function(e){this._onClose.next(e)},e.prototype.destroy=function(){this._onDestroy.next()},e}(),d=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}",n.style({transform:"none",opacity:1}))]),c=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),p=function(){function e(e,t,n,o,i,a){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=o,this.dialogRef=i,this.zone=a,this.visible=!0,this.transformOptions="scale(0.7)"}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=(this.config.baseZIndex||0)+ ++i.DomHandler.zindex;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.bindGlobalListeners(),!1!==this.config.modal&&this.enableModality(),this.focus();break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.destroy()},e.prototype.onContainerDestroy=function(){this.unbindGlobalListeners(),!1!==this.config.modal&&this.disableModality(),this.container=null},e.prototype.close=function(){this.visible=!1,this.cd.markForCheck()},e.prototype.hide=function(){this.dialogRef&&this.dialogRef.close()},e.prototype.enableModality=function(){var e=this;!1!==this.config.closable&&this.config.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",(function(t){e.wrapper&&e.wrapper.isSameNode(t.target)&&e.hide()}))),!1!==this.config.modal&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},e.prototype.disableModality=function(){this.wrapper&&(this.config.dismissableMask&&this.unbindMaskClickListener(),!1!==this.config.modal&&i.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())},e.prototype.onKeydown=function(e){if(9===e.which){e.preventDefault();var t=i.DomHandler.getFocusableElements(this.container);if(t&&t.length>0)if(t[0].ownerDocument.activeElement){var n=t.indexOf(t[0].ownerDocument.activeElement);e.shiftKey?-1==n||0===n?t[t.length-1].focus():t[n-1].focus():-1==n||n===t.length-1?t[0].focus():t[n+1].focus()}else t[0].focus()}},e.prototype.focus=function(){var e=i.DomHandler.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular((function(){setTimeout((function(){return e.focus()}),5)}))},e.prototype.bindGlobalListeners=function(){this.bindDocumentKeydownListener(),!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentKeydownListener(),this.unbindDocumentEscapeListener()},e.prototype.bindDocumentKeydownListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentKeydownListener=e.onKeydown.bind(e),window.document.addEventListener("keydown",e.documentKeydownListener)}))},e.prototype.unbindDocumentKeydownListener=function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},e.prototype.bindDocumentEscapeListener=function(){var e=this,t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",(function(t){27==t.which&&parseInt(e.container.style.zIndex)==i.DomHandler.zindex+(e.config.baseZIndex?e.config.baseZIndex:0)&&e.hide()}))},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},e}();p.decorators=[{type:t.Component,args:[{selector:"p-dynamicDialog",template:'\n <div #mask [ngClass]="{\'p-dialog-mask\':true, \'p-component-overlay p-dialog-mask-scrollblocker\': config.modal !== false}">\n <div [ngClass]="{\'p-dialog p-dynamic-dialog p-component\':true, \'p-dialog-rtl\': config.rtl}" [ngStyle]="config.style" [class]="config.styleClass"\n [@animation]="{value: \'visible\', params: {transform: transformOptions, transition: config.transitionOptions || \'150ms cubic-bezier(0, 0, 0.2, 1)\'}}"\n (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" *ngIf="visible"\n [style.width]="config.width" [style.height]="config.height">\n <div class="p-dialog-header" *ngIf="config.showHeader === false ? false: true">\n <span class="p-dialog-title">{{config.header}}</span>\n <div class="p-dialog-header-icons">\n <button [ngClass]="\'p-dialog-header-icon p-dialog-header-maximize p-link\'" type="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false">\n <span class="p-dialog-header-close-icon pi pi-times"></span>\n </button>\n </div>\n </div>\n <div class="p-dialog-content" [ngStyle]="config.contentStyle">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class="p-dialog-footer" *ngIf="config.footer">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(d)]),n.transition("visible => void",[n.useAnimation(c)])])],changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None,styles:[".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;max-height:100%;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]}]}],p.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Renderer2},{type:r},{type:l},{type:t.NgZone}]},p.propDecorators={insertionPoint:[{type:t.ViewChild,args:[s]}],maskViewChild:[{type:t.ViewChild,args:["mask"]}]};var m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[p,s],entryComponents:[p]}]}];var g=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){var o=this._additionalTokens.get(e);return o||this._parentInjector.get(e,t)},e}(),f=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n,this.dialogComponentRefMap=new Map}return e.prototype.open=function(e,t){var n=this.appendDialogComponentToBody(t);return this.dialogComponentRefMap.get(n).instance.childComponentType=e,n},e.prototype.appendDialogComponentToBody=function(e){var t=this,n=new WeakMap;n.set(r,e);var o=new l;n.set(l,o);var i=o.onClose.subscribe((function(){t.dialogComponentRefMap.get(o).instance.close()})),a=o.onDestroy.subscribe((function(){t.removeDialogComponentFromBody(o),a.unsubscribe(),i.unsubscribe()})),s=this.componentFactoryResolver.resolveComponentFactory(p).create(new g(this.injector,n));this.appRef.attachView(s.hostView);var d=s.hostView.rootNodes[0];return document.body.appendChild(d),this.dialogComponentRefMap.set(o,s),o},e.prototype.removeDialogComponentFromBody=function(e){if(e&&this.dialogComponentRefMap.has(e)){var t=this.dialogComponentRefMap.get(e);this.appRef.detachView(t.hostView),t.destroy(),this.dialogComponentRefMap.delete(e)}},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e.DialogService=f,e.DynamicDialogComponent=p,e.DynamicDialogConfig=r,e.DynamicDialogInjector=g,e.DynamicDialogModule=m,e.DynamicDialogRef=l,e.ɵa=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("rxjs")):"function"==typeof define&&define.amd?define("primeng/dynamicdialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dynamicdialog={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.dom,e.rxjs)}(this,(function(e,t,n,o,i,a){"use strict";var s=function(e){this.viewContainerRef=e};s.decorators=[{type:t.Directive,args:[{selector:"[pDynamicDialogContent]"}]}],s.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var r=function(){},l=function(){function e(){this._onClose=new a.Subject,this.onClose=this._onClose.asObservable(),this._onDestroy=new a.Subject,this.onDestroy=this._onDestroy.asObservable()}return e.prototype.close=function(e){this._onClose.next(e)},e.prototype.destroy=function(){this._onDestroy.next()},e}(),d=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}",n.style({transform:"none",opacity:1}))]),c=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),p=function(){function e(e,t,n,o,i,a){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=o,this.dialogRef=i,this.zone=a,this.visible=!0,this.transformOptions="scale(0.7)"}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=(this.config.baseZIndex||0)+ ++i.DomHandler.zindex;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.bindGlobalListeners(),!1!==this.config.modal&&this.enableModality(),this.focus();break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.destroy()},e.prototype.onContainerDestroy=function(){this.unbindGlobalListeners(),!1!==this.config.modal&&this.disableModality(),this.container=null},e.prototype.close=function(){this.visible=!1,this.cd.markForCheck()},e.prototype.hide=function(){this.dialogRef&&this.dialogRef.close()},e.prototype.enableModality=function(){var e=this;!1!==this.config.closable&&this.config.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",(function(t){e.wrapper&&e.wrapper.isSameNode(t.target)&&e.hide()}))),!1!==this.config.modal&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},e.prototype.disableModality=function(){this.wrapper&&(this.config.dismissableMask&&this.unbindMaskClickListener(),!1!==this.config.modal&&i.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())},e.prototype.onKeydown=function(e){if(9===e.which){e.preventDefault();var t=i.DomHandler.getFocusableElements(this.container);if(t&&t.length>0)if(t[0].ownerDocument.activeElement){var n=t.indexOf(t[0].ownerDocument.activeElement);e.shiftKey?-1==n||0===n?t[t.length-1].focus():t[n-1].focus():-1==n||n===t.length-1?t[0].focus():t[n+1].focus()}else t[0].focus()}},e.prototype.focus=function(){var e=i.DomHandler.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular((function(){setTimeout((function(){return e.focus()}),5)}))},e.prototype.bindGlobalListeners=function(){this.bindDocumentKeydownListener(),!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentKeydownListener(),this.unbindDocumentEscapeListener()},e.prototype.bindDocumentKeydownListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentKeydownListener=e.onKeydown.bind(e),window.document.addEventListener("keydown",e.documentKeydownListener)}))},e.prototype.unbindDocumentKeydownListener=function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},e.prototype.bindDocumentEscapeListener=function(){var e=this,t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",(function(t){27==t.which&&parseInt(e.container.style.zIndex)==i.DomHandler.zindex+(e.config.baseZIndex?e.config.baseZIndex:0)&&e.hide()}))},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},e}();p.decorators=[{type:t.Component,args:[{selector:"p-dynamicDialog",template:'\n <div #mask [ngClass]="{\'p-dialog-mask\':true, \'p-component-overlay p-dialog-mask-scrollblocker\': config.modal !== false}">\n <div [ngClass]="{\'p-dialog p-dynamic-dialog p-component\':true, \'p-dialog-rtl\': config.rtl}" [ngStyle]="config.style" [class]="config.styleClass"\n [@animation]="{value: \'visible\', params: {transform: transformOptions, transition: config.transitionOptions || \'150ms cubic-bezier(0, 0, 0.2, 1)\'}}"\n (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" *ngIf="visible"\n [style.width]="config.width" [style.height]="config.height">\n <div class="p-dialog-header" *ngIf="config.showHeader === false ? false: true">\n <span class="p-dialog-title">{{config.header}}</span>\n <div class="p-dialog-header-icons">\n <button [ngClass]="\'p-dialog-header-icon p-dialog-header-maximize p-link\'" type="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false">\n <span class="p-dialog-header-close-icon pi pi-times"></span>\n </button>\n </div>\n </div>\n <div class="p-dialog-content" [ngStyle]="config.contentStyle">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class="p-dialog-footer" *ngIf="config.footer">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(d)]),n.transition("visible => void",[n.useAnimation(c)])])],changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None,styles:[".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;left:0!important;max-height:100%;top:0!important;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]}]}],p.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Renderer2},{type:r},{type:l},{type:t.NgZone}]},p.propDecorators={insertionPoint:[{type:t.ViewChild,args:[s]}],maskViewChild:[{type:t.ViewChild,args:["mask"]}]};var m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[p,s],entryComponents:[p]}]}];var g=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){var o=this._additionalTokens.get(e);return o||this._parentInjector.get(e,t)},e}(),f=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n,this.dialogComponentRefMap=new Map}return e.prototype.open=function(e,t){var n=this.appendDialogComponentToBody(t);return this.dialogComponentRefMap.get(n).instance.childComponentType=e,n},e.prototype.appendDialogComponentToBody=function(e){var t=this,n=new WeakMap;n.set(r,e);var o=new l;n.set(l,o);var i=o.onClose.subscribe((function(){t.dialogComponentRefMap.get(o).instance.close()})),a=o.onDestroy.subscribe((function(){t.removeDialogComponentFromBody(o),a.unsubscribe(),i.unsubscribe()})),s=this.componentFactoryResolver.resolveComponentFactory(p).create(new g(this.injector,n));this.appRef.attachView(s.hostView);var d=s.hostView.rootNodes[0];return document.body.appendChild(d),this.dialogComponentRefMap.set(o,s),o},e.prototype.removeDialogComponentFromBody=function(e){if(e&&this.dialogComponentRefMap.has(e)){var t=this.dialogComponentRefMap.get(e);this.appRef.detachView(t.hostView),t.destroy(),this.dialogComponentRefMap.delete(e)}},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e.DialogService=f,e.DynamicDialogComponent=p,e.DynamicDialogConfig=r,e.DynamicDialogInjector=g,e.DynamicDialogModule=m,e.DynamicDialogRef=l,e.ɵa=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|
2
2
|
//# sourceMappingURL=primeng-dynamicdialog.umd.min.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/app/components/dynamicdialog/dynamicdialogcontent.ts","../../src/app/components/dynamicdialog/dynamicdialog-config.ts","../../src/app/components/dynamicdialog/dynamicdialog-ref.ts","../../src/app/components/dynamicdialog/dynamicdialog.ts","../../src/app/components/dynamicdialog/dynamicdialog-injector.ts","../../src/app/components/dynamicdialog/dialogservice.ts"],"names":["viewContainerRef","this","Directive","args","selector","ViewContainerRef","DynamicDialogRef","_onClose","Subject","onClose","asObservable","_onDestroy","onDestroy","prototype","close","result","next","destroy","showAnimation","animation","style","transform","opacity","animate","hideAnimation","DynamicDialogComponent","componentFactoryResolver","cd","renderer","config","dialogRef","zone","visible","transformOptions","ngAfterViewInit","loadChildComponent","childComponentType","detectChanges","componentType","componentFactory","resolveComponentFactory","insertionPoint","clear","componentRef","createComponent","moveOnTop","autoZIndex","zIndex","baseZIndex","DomHandler","zindex","container","String","maskViewChild","nativeElement","onAnimationStart","event","toState","element","wrapper","parentElement","bindGlobalListeners","modal","enableModality","focus","onContainerDestroy","onAnimationEnd","unbindGlobalListeners","disableModality","markForCheck","hide","_this","closable","dismissableMask","maskClickListener","listen","isSameNode","target","addClass","document","body","unbindMaskClickListener","removeClass","destroyed","onKeydown","which","preventDefault","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","focusable","findSingle","runOutsideAngular","setTimeout","bindDocumentKeydownListener","closeOnEscape","bindDocumentEscapeListener","unbindDocumentKeydownListener","unbindDocumentEscapeListener","documentKeydownListener","bind","window","addEventListener","removeEventListener","documentTarget","documentEscapeListener","parseInt","ngOnDestroy","Component","template","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","ComponentFactoryResolver","ChangeDetectorRef","Renderer2","DynamicDialogConfig","NgZone","ViewChild","DynamicDialogContent","NgModule","imports","CommonModule","declarations","entryComponents","DynamicDialogInjector","_parentInjector","_additionalTokens","get","token","notFoundValue","flags","value","DialogService","appRef","injector","dialogComponentRefMap","Map","open","appendDialogComponentToBody","instance","map","WeakMap","set","sub","subscribe","destroySub","removeDialogComponentFromBody","unsubscribe","create","attachView","hostView","domElem","rootNodes","appendChild","has","dialogComponentRef","detachView","delete","Injectable","ApplicationRef","Injector"],"mappings":"ikBAOC,SAAmBA,GAAAC,KAAAD,iBAAAA,uBALnBE,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,uEAHQC,EAAAA,0BCApB,0BCGC,SAAAC,IAUiBL,KAAAM,SAAW,IAAIC,EAAAA,QAC7BP,KAAAQ,QAA2BR,KAAKM,SAASG,eAExBT,KAAAU,WAAa,IAAIH,EAAAA,QACrCP,KAAAW,UAA6BX,KAAKU,WAAWD,sBAZ7CJ,EAAAO,UAAAC,MAAA,SAAMC,GACLd,KAAKM,SAASS,KAAKD,IAGjBT,EAAAO,UAAAI,QAAA,WACFhB,KAAKU,WAAWK,aCFZE,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,IAC7CC,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,OAAQC,QAAS,OAG5DE,EAAgBL,EAAAA,UAAU,CAC5BI,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,oBAoE1E,SAAAG,EAAoBC,EAA4DC,EAA8BC,EACrGC,EAAqCC,EAAoCC,GAD9D9B,KAAAyB,yBAAAA,EAA4DzB,KAAA0B,GAAAA,EAA8B1B,KAAA2B,SAAAA,EACrG3B,KAAA4B,OAAAA,EAAqC5B,KAAA6B,UAAAA,EAAoC7B,KAAA8B,KAAAA,EAzBlF9B,KAAA+B,SAAmB,EAsBhB/B,KAAAgC,iBAA2B,oBAK9BR,EAAAZ,UAAAqB,gBAAA,WACCjC,KAAKkC,mBAAmBlC,KAAKmC,oBAC7BnC,KAAK0B,GAAGU,iBAGTZ,EAAAZ,UAAAsB,mBAAA,SAAmBG,GAClB,IAAIC,EAAmBtC,KAAKyB,y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,EAAII,iBAIFrH,EADmB1C,KAAKyB,yBAAyBc,wBAAwBf,GACzCwI,OAAO,IAAIxB,EAAsBxI,KAAKkJ,SAAUM,IAEtFxJ,KAAKiJ,OAAOgB,WAAWvH,EAAawH,UAEpC,IAAMC,EAAWzH,EAAawH,SAAkCE,UAAU,GAK1E,OAJAtF,SAASC,KAAKsF,YAAYF,GAE1BnK,KAAKmJ,sBAAsBO,IAAI7H,EAAWa,GAEnCb,GAGHmH,EAAApI,UAAAkJ,8BAAA,SAA8BjI,GAClC,GAAKA,GAAc7B,KAAKmJ,sBAAsBmB,IAAIzI,GAAlD,CAIA,IAAM0I,EAAqBvK,KAAKmJ,sBAAsBR,IAAI9G,GAC1D7B,KAAKiJ,OAAOuB,WAAWD,EAAmBL,UAC1CK,EAAmBvJ,UACnBhB,KAAKmJ,sBAAsBsB,OAAO5I,8BAtDzC6I,EAAAA,sDANoB9C,EAAAA,gCAA0B+C,EAAAA,sBAAgBC,EAAAA","sourcesContent":["import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[pDynamicDialogContent]'\n})\nexport class DynamicDialogContent {\n \n\tconstructor(public viewContainerRef: ViewContainerRef) {}\n\n}\n","export class DynamicDialogConfig {\r\n\tdata?: any;\r\n\theader?: string;\r\n\tfooter?: string;\r\n\twidth?: string;\r\n\theight?: string;\r\n\tcloseOnEscape?: boolean;\r\n\tbaseZIndex?: number;\r\n\tautoZIndex?: boolean;\r\n\tdismissableMask?: boolean;\r\n\trtl?: boolean;\r\n\tstyle?: any;\r\n\tcontentStyle?: any;\r\n\tstyleClass?: string;\r\n\ttransitionOptions?: string;\r\n\tclosable?: boolean;\r\n\tshowHeader?: boolean;\r\n\tmodal?: boolean;\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DynamicDialogRef {\r\n\tconstructor() { }\r\n\r\n\tclose(result?: any) {\r\n\t\tthis._onClose.next(result);\r\n }\r\n \r\n destroy() {\r\n\t\tthis._onDestroy.next();\r\n\t}\r\n\r\n\tprivate readonly _onClose = new Subject<any>();\r\n onClose: Observable<any> = this._onClose.asObservable();\r\n\r\n private readonly _onDestroy = new Subject<any>();\r\n\tonDestroy: Observable<any> = this._onDestroy.asObservable();\r\n}\r\n","import { Component, NgModule, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, Renderer2, NgZone, ElementRef, ChangeDetectionStrategy, ViewRef, ViewEncapsulation } from '@angular/core';\nimport { trigger,style,transition,animate,AnimationEvent, animation, useAnimation } from '@angular/animations';\nimport { DynamicDialogContent } from './dynamicdialogcontent';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}', style({ transform: 'none', opacity: 1 }))\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n\tselector: 'p-dynamicDialog',\n\ttemplate: `\n <div #mask [ngClass]=\"{'p-dialog-mask':true, 'p-component-overlay p-dialog-mask-scrollblocker': config.modal !== false}\">\n <div [ngClass]=\"{'p-dialog p-dynamic-dialog p-component':true, 'p-dialog-rtl': config.rtl}\" [ngStyle]=\"config.style\" [class]=\"config.styleClass\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}\"\n (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" *ngIf=\"visible\"\n [style.width]=\"config.width\" [style.height]=\"config.height\">\n <div class=\"p-dialog-header\" *ngIf=\"config.showHeader === false ? false: true\">\n <span class=\"p-dialog-title\">{{config.header}}</span>\n <div class=\"p-dialog-header-icons\">\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </div>\n </div>\n <div class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class=\"p-dialog-footer\" *ngIf=\"config.footer\">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t`,\n\tanimations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class DynamicDialogComponent implements AfterViewInit, OnDestroy {\n\n\tvisible: boolean = true;\n\n\tcomponentRef: ComponentRef<any>;\n\n\tmask: HTMLDivElement;\n\n\t@ViewChild(DynamicDialogContent) insertionPoint: DynamicDialogContent;\n\n\t@ViewChild('mask') maskViewChild: ElementRef;\n\n\tchildComponentType: Type<any>;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n documentKeydownListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n transformOptions: string = \"scale(0.7)\";\n\n\tconstructor(private componentFactoryResolver: ComponentFactoryResolver, private cd: ChangeDetectorRef, public renderer: Renderer2,\n\t\t\tpublic config: DynamicDialogConfig, private dialogRef: DynamicDialogRef, public zone: NgZone) { }\n\n\tngAfterViewInit() {\n\t\tthis.loadChildComponent(this.childComponentType);\n\t\tthis.cd.detectChanges();\n\t}\n\n\tloadChildComponent(componentType: Type<any>) {\n\t\tlet componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\n\n\t\tlet viewContainerRef = this.insertionPoint.viewContainerRef;\n\t\tviewContainerRef.clear();\n\n\t\tthis.componentRef = viewContainerRef.createComponent(componentFactory);\n\t}\n\n\tmoveOnTop() {\n if (this.config.autoZIndex !== false) {\n\t\t\tconst zIndex = (this.config.baseZIndex||0) + (++DomHandler.zindex);\n\t\t\tthis.container.style.zIndex = String(zIndex);\n\t\t\tthis.maskViewChild.nativeElement.style.zIndex = String(zIndex - 1);\n\t\t}\n }\n\n\tonAnimationStart(event: AnimationEvent) {\n\t\tswitch(event.toState) {\n\t\t\tcase 'visible':\n this.container = event.element;\n this.wrapper = this.container.parentElement;\n\t\t\t\tthis.moveOnTop();\n this.bindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.enableModality();\n }\n this.focus();\n\t\t\tbreak;\n\n\t\t\tcase 'void':\n\t\t\t\tthis.onContainerDestroy();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.toState === 'void') {\n\t\t\tthis.dialogRef.destroy();\n\t\t}\n\t}\n\n\tonContainerDestroy() {\n\t\tthis.unbindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.disableModality();\n }\n this.container = null;\n\t}\n\n\tclose() {\n this.visible = false;\n this.cd.markForCheck();\n\t}\n\n hide() {\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n enableModality() {\n if (this.config.closable !== false && this.config.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event: any) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.hide();\n }\n });\n }\n\n if (this.config.modal !== false) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.config.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.config.modal !== false) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n if (!(this.cd as ViewRef).destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n\n focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n }\n }\n\n\tbindGlobalListeners() {\n this.bindDocumentKeydownListener();\n\n if (this.config.closeOnEscape !== false && this.config.closable !== false) {\n this.bindDocumentEscapeListener();\n }\n }\n\n unbindGlobalListeners() {\n this.unbindDocumentKeydownListener();\n this.unbindDocumentEscapeListener();\n }\n\n bindDocumentKeydownListener() {\n this.zone.runOutsideAngular(() => {\n this.documentKeydownListener = this.onKeydown.bind(this);\n window.document.addEventListener('keydown', this.documentKeydownListener);\n });\n }\n\n unbindDocumentKeydownListener() {\n if (this.documentKeydownListener) {\n window.document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n }\n\n\tbindDocumentEscapeListener() {\n const documentTarget: any = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';\n\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.which == 27) {\n if (parseInt(this.container.style.zIndex) == (DomHandler.zindex + (this.config.baseZIndex ? this.config.baseZIndex : 0))) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}\n }\n });\n }\n\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n\n\tngOnDestroy() {\n\t\tthis.onContainerDestroy();\n\n\t\tif (this.componentRef) {\n\t\t\tthis.componentRef.destroy();\n\t\t}\n\t}\n}\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [DynamicDialogComponent, DynamicDialogContent],\n\tentryComponents: [DynamicDialogComponent]\n})\nexport class DynamicDialogModule { }\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DynamicDialogInjector implements Injector {\r\n\t\r\n\tconstructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n\r\n\tget<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n\tget(token: any, notFoundValue?: any);\r\n\tget(token: any, notFoundValue?: any, flags?: any) {\r\n\t\tconst value = this._additionalTokens.get(token);\r\n\r\n\t\tif (value) return value;\r\n\r\n\t\treturn this._parentInjector.get<any>(token, notFoundValue);\r\n\t}\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\nimport { DynamicDialogComponent } from './dynamicdialog';\nimport { DynamicDialogInjector } from './dynamicdialog-injector';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\n@Injectable()\nexport class DialogService {\n\n dialogComponentRefMap: Map<DynamicDialogRef, ComponentRef<DynamicDialogComponent>> = new Map();\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {\n }\n\n public open(componentType: Type<any>, config: DynamicDialogConfig) {\n const dialogRef = this.appendDialogComponentToBody(config);\n\n this.dialogComponentRefMap.get(dialogRef).instance.childComponentType = componentType;\n\n return dialogRef;\n }\n\n private appendDialogComponentToBody(config: DynamicDialogConfig) {\n const map = new WeakMap();\n map.set(DynamicDialogConfig, config);\n\n const dialogRef = new DynamicDialogRef();\n map.set(DynamicDialogRef, dialogRef);\n\n const sub = dialogRef.onClose.subscribe(() => {\n this.dialogComponentRefMap.get(dialogRef).instance.close();\n });\n\n const destroySub = dialogRef.onDestroy.subscribe(() => {\n this.removeDialogComponentFromBody(dialogRef);\n destroySub.unsubscribe();\n sub.unsubscribe();\n });\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DynamicDialogComponent);\n const componentRef = componentFactory.create(new DynamicDialogInjector(this.injector, map));\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this.dialogComponentRefMap.set(dialogRef, componentRef);\n\n return dialogRef;\n }\n\n private removeDialogComponentFromBody(dialogRef: DynamicDialogRef) {\n if (!dialogRef || !this.dialogComponentRefMap.has(dialogRef)) {\n return;\n }\n\n const dialogComponentRef = this.dialogComponentRefMap.get(dialogRef);\n this.appRef.detachView(dialogComponentRef.hostView);\n dialogComponentRef.destroy();\n this.dialogComponentRefMap.delete(dialogRef);\n }\n}\n"]}
|
1
|
+
{"version":3,"sources":["../../src/app/components/dynamicdialog/dynamicdialogcontent.ts","../../src/app/components/dynamicdialog/dynamicdialog-config.ts","../../src/app/components/dynamicdialog/dynamicdialog-ref.ts","../../src/app/components/dynamicdialog/dynamicdialog.ts","../../src/app/components/dynamicdialog/dynamicdialog-injector.ts","../../src/app/components/dynamicdialog/dialogservice.ts"],"names":["viewContainerRef","this","Directive","args","selector","ViewContainerRef","DynamicDialogRef","_onClose","Subject","onClose","asObservable","_onDestroy","onDestroy","prototype","close","result","next","destroy","showAnimation","animation","style","transform","opacity","animate","hideAnimation","DynamicDialogComponent","componentFactoryResolver","cd","renderer","config","dialogRef","zone","visible","transformOptions","ngAfterViewInit","loadChildComponent","childComponentType","detectChanges","componentType","componentFactory","resolveComponentFactory","insertionPoint","clear","componentRef","createComponent","moveOnTop","autoZIndex","zIndex","baseZIndex","DomHandler","zindex","container","String","maskViewChild","nativeElement","onAnimationStart","event","toState","element","wrapper","parentElement","bindGlobalListeners","modal","enableModality","focus","onContainerDestroy","onAnimationEnd","unbindGlobalListeners","disableModality","markForCheck","hide","_this","closable","dismissableMask","maskClickListener","listen","isSameNode","target","addClass","document","body","unbindMaskClickListener","removeClass","destroyed","onKeydown","which","preventDefault","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","focusable","findSingle","runOutsideAngular","setTimeout","bindDocumentKeydownListener","closeOnEscape","bindDocumentEscapeListener","unbindDocumentKeydownListener","unbindDocumentEscapeListener","documentKeydownListener","bind","window","addEventListener","removeEventListener","documentTarget","documentEscapeListener","parseInt","ngOnDestroy","Component","template","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","ComponentFactoryResolver","ChangeDetectorRef","Renderer2","DynamicDialogConfig","NgZone","ViewChild","DynamicDialogContent","NgModule","imports","CommonModule","declarations","entryComponents","DynamicDialogInjector","_parentInjector","_additionalTokens","get","token","notFoundValue","flags","value","DialogService","appRef","injector","dialogComponentRefMap","Map","open","appendDialogComponentToBody","instance","map","WeakMap","set","sub","subscribe","destroySub","removeDialogComponentFromBody","unsubscribe","create","attachView","hostView","domElem","rootNodes","appendChild","has","dialogComponentRef","detachView","delete","Injectable","ApplicationRef","Injector"],"mappings":"ikBAOC,SAAmBA,GAAAC,KAAAD,iBAAAA,uBALnBE,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,uEAHQC,EAAAA,0BCApB,0BCGC,SAAAC,IAUiBL,KAAAM,SAAW,IAAIC,EAAAA,QAC7BP,KAAAQ,QAA2BR,KAAKM,SAASG,eAExBT,KAAAU,WAAa,IAAIH,EAAAA,QACrCP,KAAAW,UAA6BX,KAAKU,WAAWD,sBAZ7CJ,EAAAO,UAAAC,MAAA,SAAMC,GACLd,KAAKM,SAASS,KAAKD,IAGjBT,EAAAO,UAAAI,QAAA,WACFhB,KAAKU,WAAWK,aCFZE,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAA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sBAAgBC,EAAAA","sourcesContent":["import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[pDynamicDialogContent]'\n})\nexport class DynamicDialogContent {\n \n\tconstructor(public viewContainerRef: ViewContainerRef) {}\n\n}\n","export class DynamicDialogConfig {\r\n\tdata?: any;\r\n\theader?: string;\r\n\tfooter?: string;\r\n\twidth?: string;\r\n\theight?: string;\r\n\tcloseOnEscape?: boolean;\r\n\tbaseZIndex?: number;\r\n\tautoZIndex?: boolean;\r\n\tdismissableMask?: boolean;\r\n\trtl?: boolean;\r\n\tstyle?: any;\r\n\tcontentStyle?: any;\r\n\tstyleClass?: string;\r\n\ttransitionOptions?: string;\r\n\tclosable?: boolean;\r\n\tshowHeader?: boolean;\r\n\tmodal?: boolean;\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DynamicDialogRef {\r\n\tconstructor() { }\r\n\r\n\tclose(result?: any) {\r\n\t\tthis._onClose.next(result);\r\n }\r\n \r\n destroy() {\r\n\t\tthis._onDestroy.next();\r\n\t}\r\n\r\n\tprivate readonly _onClose = new Subject<any>();\r\n onClose: Observable<any> = this._onClose.asObservable();\r\n\r\n private readonly _onDestroy = new Subject<any>();\r\n\tonDestroy: Observable<any> = this._onDestroy.asObservable();\r\n}\r\n","import { Component, NgModule, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, Renderer2, NgZone, ElementRef, ChangeDetectionStrategy, ViewRef, ViewEncapsulation } from '@angular/core';\nimport { trigger,style,transition,animate,AnimationEvent, animation, useAnimation } from '@angular/animations';\nimport { DynamicDialogContent } from './dynamicdialogcontent';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}', style({ transform: 'none', opacity: 1 }))\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n\tselector: 'p-dynamicDialog',\n\ttemplate: `\n <div #mask [ngClass]=\"{'p-dialog-mask':true, 'p-component-overlay p-dialog-mask-scrollblocker': config.modal !== false}\">\n <div [ngClass]=\"{'p-dialog p-dynamic-dialog p-component':true, 'p-dialog-rtl': config.rtl}\" [ngStyle]=\"config.style\" [class]=\"config.styleClass\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}\"\n (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" *ngIf=\"visible\"\n [style.width]=\"config.width\" [style.height]=\"config.height\">\n <div class=\"p-dialog-header\" *ngIf=\"config.showHeader === false ? false: true\">\n <span class=\"p-dialog-title\">{{config.header}}</span>\n <div class=\"p-dialog-header-icons\">\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </div>\n </div>\n <div class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class=\"p-dialog-footer\" *ngIf=\"config.footer\">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t`,\n\tanimations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class DynamicDialogComponent implements AfterViewInit, OnDestroy {\n\n\tvisible: boolean = true;\n\n\tcomponentRef: ComponentRef<any>;\n\n\tmask: HTMLDivElement;\n\n\t@ViewChild(DynamicDialogContent) insertionPoint: DynamicDialogContent;\n\n\t@ViewChild('mask') maskViewChild: ElementRef;\n\n\tchildComponentType: Type<any>;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n documentKeydownListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n transformOptions: string = \"scale(0.7)\";\n\n\tconstructor(private componentFactoryResolver: ComponentFactoryResolver, private cd: ChangeDetectorRef, public renderer: Renderer2,\n\t\t\tpublic config: DynamicDialogConfig, private dialogRef: DynamicDialogRef, public zone: NgZone) { }\n\n\tngAfterViewInit() {\n\t\tthis.loadChildComponent(this.childComponentType);\n\t\tthis.cd.detectChanges();\n\t}\n\n\tloadChildComponent(componentType: Type<any>) {\n\t\tlet componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\n\n\t\tlet viewContainerRef = this.insertionPoint.viewContainerRef;\n\t\tviewContainerRef.clear();\n\n\t\tthis.componentRef = viewContainerRef.createComponent(componentFactory);\n\t}\n\n\tmoveOnTop() {\n if (this.config.autoZIndex !== false) {\n\t\t\tconst zIndex = (this.config.baseZIndex||0) + (++DomHandler.zindex);\n\t\t\tthis.container.style.zIndex = String(zIndex);\n\t\t\tthis.maskViewChild.nativeElement.style.zIndex = String(zIndex - 1);\n\t\t}\n }\n\n\tonAnimationStart(event: AnimationEvent) {\n\t\tswitch(event.toState) {\n\t\t\tcase 'visible':\n this.container = event.element;\n this.wrapper = this.container.parentElement;\n\t\t\t\tthis.moveOnTop();\n this.bindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.enableModality();\n }\n this.focus();\n\t\t\tbreak;\n\n\t\t\tcase 'void':\n\t\t\t\tthis.onContainerDestroy();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.toState === 'void') {\n\t\t\tthis.dialogRef.destroy();\n\t\t}\n\t}\n\n\tonContainerDestroy() {\n\t\tthis.unbindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.disableModality();\n }\n this.container = null;\n\t}\n\n\tclose() {\n this.visible = false;\n this.cd.markForCheck();\n\t}\n\n hide() {\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n enableModality() {\n if (this.config.closable !== false && this.config.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event: any) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.hide();\n }\n });\n }\n\n if (this.config.modal !== false) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.config.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.config.modal !== false) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n if (!(this.cd as ViewRef).destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n\n focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n }\n }\n\n\tbindGlobalListeners() {\n this.bindDocumentKeydownListener();\n\n if (this.config.closeOnEscape !== false && this.config.closable !== false) {\n this.bindDocumentEscapeListener();\n }\n }\n\n unbindGlobalListeners() {\n this.unbindDocumentKeydownListener();\n this.unbindDocumentEscapeListener();\n }\n\n bindDocumentKeydownListener() {\n this.zone.runOutsideAngular(() => {\n this.documentKeydownListener = this.onKeydown.bind(this);\n window.document.addEventListener('keydown', this.documentKeydownListener);\n });\n }\n\n unbindDocumentKeydownListener() {\n if (this.documentKeydownListener) {\n window.document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n }\n\n\tbindDocumentEscapeListener() {\n const documentTarget: any = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';\n\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.which == 27) {\n if (parseInt(this.container.style.zIndex) == (DomHandler.zindex + (this.config.baseZIndex ? this.config.baseZIndex : 0))) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}\n }\n });\n }\n\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n\n\tngOnDestroy() {\n\t\tthis.onContainerDestroy();\n\n\t\tif (this.componentRef) {\n\t\t\tthis.componentRef.destroy();\n\t\t}\n\t}\n}\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [DynamicDialogComponent, DynamicDialogContent],\n\tentryComponents: [DynamicDialogComponent]\n})\nexport class DynamicDialogModule { }\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DynamicDialogInjector implements Injector {\r\n\t\r\n\tconstructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n\r\n\tget<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n\tget(token: any, notFoundValue?: any);\r\n\tget(token: any, notFoundValue?: any, flags?: any) {\r\n\t\tconst value = this._additionalTokens.get(token);\r\n\r\n\t\tif (value) return value;\r\n\r\n\t\treturn this._parentInjector.get<any>(token, notFoundValue);\r\n\t}\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\nimport { DynamicDialogComponent } from './dynamicdialog';\nimport { DynamicDialogInjector } from './dynamicdialog-injector';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\n@Injectable()\nexport class DialogService {\n\n dialogComponentRefMap: Map<DynamicDialogRef, ComponentRef<DynamicDialogComponent>> = new Map();\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {\n }\n\n public open(componentType: Type<any>, config: DynamicDialogConfig) {\n const dialogRef = this.appendDialogComponentToBody(config);\n\n this.dialogComponentRefMap.get(dialogRef).instance.childComponentType = componentType;\n\n return dialogRef;\n }\n\n private appendDialogComponentToBody(config: DynamicDialogConfig) {\n const map = new WeakMap();\n map.set(DynamicDialogConfig, config);\n\n const dialogRef = new DynamicDialogRef();\n map.set(DynamicDialogRef, dialogRef);\n\n const sub = dialogRef.onClose.subscribe(() => {\n this.dialogComponentRefMap.get(dialogRef).instance.close();\n });\n\n const destroySub = dialogRef.onDestroy.subscribe(() => {\n this.removeDialogComponentFromBody(dialogRef);\n destroySub.unsubscribe();\n sub.unsubscribe();\n });\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DynamicDialogComponent);\n const componentRef = componentFactory.create(new DynamicDialogInjector(this.injector, map));\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this.dialogComponentRefMap.set(dialogRef, componentRef);\n\n return dialogRef;\n }\n\n private removeDialogComponentFromBody(dialogRef: DynamicDialogRef) {\n if (!dialogRef || !this.dialogComponentRefMap.has(dialogRef)) {\n return;\n }\n\n const dialogComponentRef = this.dialogComponentRefMap.get(dialogRef);\n this.appRef.detachView(dialogComponentRef.hostView);\n dialogComponentRef.destroy();\n this.dialogComponentRefMap.delete(dialogRef);\n }\n}\n"]}
|
@@ -48,6 +48,7 @@
|
|
48
48
|
this.onFocus = new core.EventEmitter();
|
49
49
|
this.onBlur = new core.EventEmitter();
|
50
50
|
this.onInput = new core.EventEmitter();
|
51
|
+
this.onKeydown = new core.EventEmitter();
|
51
52
|
this.onModelChange = function () { };
|
52
53
|
this.onModelTouched = function () { };
|
53
54
|
}
|
@@ -273,13 +274,14 @@
|
|
273
274
|
this.inputViewChild.nativeElement.dispatchEvent(event);
|
274
275
|
}
|
275
276
|
};
|
276
|
-
InputMask.prototype.
|
277
|
+
InputMask.prototype.onInputKeydown = function (e) {
|
277
278
|
if (this.readonly) {
|
278
279
|
return;
|
279
280
|
}
|
280
281
|
var k = e.which || e.keyCode, pos, begin, end;
|
281
282
|
var iPhone = /iphone/i.test(dom.DomHandler.getUserAgent());
|
282
283
|
this.oldVal = this.inputViewChild.nativeElement.value;
|
284
|
+
this.onKeydown.emit(e);
|
283
285
|
//backspace, delete, and escape get special treatment
|
284
286
|
if (k === 8 || k === 46 || (iPhone && k === 127)) {
|
285
287
|
pos = this.caret();
|
@@ -489,7 +491,7 @@
|
|
489
491
|
InputMask.decorators = [
|
490
492
|
{ type: core.Component, args: [{
|
491
493
|
selector: 'p-inputMask',
|
492
|
-
template: "<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"
|
494
|
+
template: "<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"onInputKeydown($event)\" (keypress)=\"onKeyPress($event)\" [attr.autofocus]=\"autoFocus\"\n (input)=\"onInputChange($event)\" (paste)=\"handleInputChange($event)\">",
|
493
495
|
host: {
|
494
496
|
'[class.p-inputwrapper-filled]': 'filled',
|
495
497
|
'[class.p-inputwrapper-focus]': 'focused'
|
@@ -530,6 +532,7 @@
|
|
530
532
|
onFocus: [{ type: core.Output }],
|
531
533
|
onBlur: [{ type: core.Output }],
|
532
534
|
onInput: [{ type: core.Output }],
|
535
|
+
onKeydown: [{ type: core.Output }],
|
533
536
|
mask: [{ type: core.Input }]
|
534
537
|
};
|
535
538
|
var InputMaskModule = /** @class */ (function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"primeng-inputmask.umd.js","sources":["../../src/app/components/inputmask/inputmask.ts","../../src/app/components/inputmask/primeng-inputmask.ts"],"sourcesContent":["/*\n Port of jQuery MaskedInput by DigitalBush as a Native Angular2 Component in Typescript without jQuery\n https://github.com/digitalBush/jquery.maskedinput/\n\n Copyright (c) 2007-2014 Josh Bush (digitalbush.com)\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n*/\nimport {NgModule,Component,ElementRef,OnInit,OnDestroy,Input,forwardRef,Output,EventEmitter,ViewChild,ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {DomHandler} from 'primeng/dom';\nimport {InputTextModule} from 'primeng/inputtext';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\n\nexport const INPUTMASK_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputMask),\n multi: true\n};\n\n@Component({\n selector: 'p-inputMask',\n template: `<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"onKeyDown($event)\" (keypress)=\"onKeyPress($event)\" [attr.autofocus]=\"autoFocus\"\n (input)=\"onInputChange($event)\" (paste)=\"handleInputChange($event)\">`,\n host: {\n '[class.p-inputwrapper-filled]': 'filled',\n '[class.p-inputwrapper-focus]': 'focused'\n },\n providers: [INPUTMASK_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class InputMask implements OnInit,OnDestroy,ControlValueAccessor {\n\n @Input() type: string = 'text';\n\n @Input() slotChar: string = '_';\n\n @Input() autoClear: boolean = true;\n\n @Input() style: any;\n\n @Input() inputId: string;\n\n @Input() styleClass: string;\n\n @Input() placeholder: string;\n\n @Input() size: number;\n\n @Input() maxlength: number;\n\n @Input() tabindex: string;\n\n @Input() title: string;\n\n @Input() ariaLabel: string;\n\n @Input() ariaRequired: boolean;\n\n @Input() disabled: boolean;\n\n @Input() readonly: boolean;\n\n @Input() unmask: boolean;\n\n @Input() name: string;\n\n @Input() required: boolean;\n\n @Input() characterPattern: string = '[A-Za-z]';\n\n @Input() autoFocus: boolean;\n\n @Input() autocomplete: string;\n\n @ViewChild('input', { static: true }) inputViewChild: ElementRef;\n\n @Output() onComplete: EventEmitter<any> = new EventEmitter();\n\n @Output() onFocus: EventEmitter<any> = new EventEmitter();\n\n @Output() onBlur: EventEmitter<any> = new EventEmitter();\n\n @Output() onInput: EventEmitter<any> = new EventEmitter();\n\n value: any;\n\n _mask: string;\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n input: HTMLInputElement;\n\n filled: boolean;\n\n defs: any;\n\n tests: any[];\n\n partialPosition: any;\n\n firstNonMaskPos: number;\n\n lastRequiredNonMaskPos: any;\n\n len: number;\n\n oldVal: string;\n\n buffer: any;\n\n defaultBuffer: string;\n\n focusText: string;\n\n caretTimeoutId: any;\n\n androidChrome: boolean;\n\n focused: boolean;\n\n constructor(public el: ElementRef, private cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n let ua = DomHandler.getUserAgent();\n this.androidChrome = /chrome/i.test(ua) && /android/i.test(ua);\n\n this.initMask();\n }\n\n @Input() get mask(): string {\n return this._mask;\n }\n\n set mask(val:string) {\n this._mask = val;\n\n this.initMask();\n this.writeValue('');\n this.onModelChange(this.value);\n }\n\n initMask() {\n this.tests = [];\n this.partialPosition = this.mask.length;\n this.len = this.mask.length;\n this.firstNonMaskPos = null;\n this.defs = {\n '9': '[0-9]',\n 'a': this.characterPattern,\n '*': `${this.characterPattern}|[0-9]`\n };\n\n let maskTokens = this.mask.split('');\n for(let i = 0; i < maskTokens.length; i++) {\n let c = maskTokens[i];\n if (c == '?') {\n\t\t\t\tthis.len--;\n\t\t\t\tthis.partialPosition = i;\n\t\t\t}\n else if (this.defs[c]) {\n\t\t\t\tthis.tests.push(new RegExp(this.defs[c]));\n\t\t\t\tif (this.firstNonMaskPos === null) {\n\t this.firstNonMaskPos = this.tests.length - 1;\n\t\t\t\t}\n if (i < this.partialPosition){\n this.lastRequiredNonMaskPos = this.tests.length - 1;\n }\n\t\t\t}\n else {\n\t\t\t\tthis.tests.push(null);\n\t\t\t}\n }\n\n this.buffer = [];\n for(let i = 0; i < maskTokens.length; i++) {\n let c = maskTokens[i];\n if (c != '?') {\n if (this.defs[c])\n this.buffer.push(this.getPlaceholder(i));\n else\n this.buffer.push(c);\n }\n }\n this.defaultBuffer = this.buffer.join('');\n }\n\n writeValue(value: any) : void {\n this.value = value;\n\n if (this.inputViewChild && this.inputViewChild.nativeElement) {\n if (this.value == undefined || this.value == null)\n this.inputViewChild.nativeElement.value = '';\n else\n this.inputViewChild.nativeElement.value = this.value;\n\n this.checkVal();\n this.focusText = this.inputViewChild.nativeElement.value;\n this.updateFilledState();\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n caret(first?: number, last?: number) {\n let range, begin, end;\n\n if (!this.inputViewChild.nativeElement.offsetParent||this.inputViewChild.nativeElement !== this.inputViewChild.nativeElement.ownerDocument.activeElement) {\n return;\n }\n\n if (typeof first == 'number') {\n begin = first;\n end = (typeof last === 'number') ? last : begin;\n if (this.inputViewChild.nativeElement.setSelectionRange) {\n this.inputViewChild.nativeElement.setSelectionRange(begin, end);\n }\n else if (this.inputViewChild.nativeElement['createTextRange']) {\n range = this.inputViewChild.nativeElement['createTextRange']();\n range.collapse(true);\n range.moveEnd('character', end);\n range.moveStart('character', begin);\n range.select();\n }\n }\n else {\n if (this.inputViewChild.nativeElement.setSelectionRange) {\n \t\t\tbegin = this.inputViewChild.nativeElement.selectionStart;\n \t\t\tend = this.inputViewChild.nativeElement.selectionEnd;\n \t\t}\n else if (document['selection'] && document['selection'].createRange) {\n \t\t\trange = document['selection'].createRange();\n \t\t\tbegin = 0 - range.duplicate().moveStart('character', -100000);\n \t\t\tend = begin + range.text.length;\n \t\t}\n\n \t\treturn {begin: begin, end: end};\n }\n }\n\n isCompleted(): boolean {\n let completed: boolean;\n for (let i = this.firstNonMaskPos; i <= this.lastRequiredNonMaskPos; i++) {\n if (this.tests[i] && this.buffer[i] === this.getPlaceholder(i)) {\n return false;\n }\n }\n\n return true;\n }\n\n getPlaceholder(i: number) {\n if (i < this.slotChar.length) {\n return this.slotChar.charAt(i);\n }\n return this.slotChar.charAt(0);\n }\n\n seekNext(pos) {\n while (++pos < this.len && !this.tests[pos]);\n return pos;\n }\n\n seekPrev(pos) {\n while (--pos >= 0 && !this.tests[pos]);\n return pos;\n }\n\n shiftL(begin:number,end:number) {\n let i, j;\n\n if (begin<0) {\n return;\n }\n\n for (i = begin, j = this.seekNext(end); i < this.len; i++) {\n if (this.tests[i]) {\n if (j < this.len && this.tests[i].test(this.buffer[j])) {\n this.buffer[i] = this.buffer[j];\n this.buffer[j] = this.getPlaceholder(j);\n } else {\n break;\n }\n\n j = this.seekNext(j);\n }\n }\n this.writeBuffer();\n this.caret(Math.max(this.firstNonMaskPos, begin));\n }\n\n shiftR(pos) {\n let i, c, j, t;\n\n for (i = pos, c = this.getPlaceholder(pos); i < this.len; i++) {\n if (this.tests[i]) {\n j = this.seekNext(i);\n t = this.buffer[i];\n this.buffer[i] = c;\n if (j < this.len && this.tests[j].test(t)) {\n c = t;\n } else {\n break;\n }\n }\n }\n }\n\n handleAndroidInput(e) {\n var curVal = this.inputViewChild.nativeElement.value;\n var pos = this.caret();\n if (this.oldVal && this.oldVal.length && this.oldVal.length > curVal.length ) {\n // a deletion or backspace happened\n this.checkVal(true);\n while (pos.begin > 0 && !this.tests[pos.begin-1])\n pos.begin--;\n if (pos.begin === 0)\n {\n while (pos.begin < this.firstNonMaskPos && !this.tests[pos.begin])\n pos.begin++;\n }\n\n setTimeout(() => {\n this.caret(pos.begin, pos.begin);\n this.updateModel(e);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n else {\n this.checkVal(true);\n while (pos.begin < this.len && !this.tests[pos.begin])\n pos.begin++;\n\n setTimeout(() => {\n this.caret(pos.begin, pos.begin);\n this.updateModel(e);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n }\n\n onInputBlur(e) {\n this.focused = false;\n this.onModelTouched();\n this.checkVal();\n this.updateFilledState();\n this.onBlur.emit(e);\n\n if (this.inputViewChild.nativeElement.value != this.focusText || this.inputViewChild.nativeElement.value != this.value) {\n this.updateModel(e);\n let event = document.createEvent('HTMLEvents');\n event.initEvent('change', true, false);\n this.inputViewChild.nativeElement.dispatchEvent(event);\n }\n }\n\n onKeyDown(e) {\n if (this.readonly) {\n return;\n }\n\n let k = e.which||e.keyCode,\n pos,\n begin,\n end;\n let iPhone = /iphone/i.test(DomHandler.getUserAgent());\n this.oldVal = this.inputViewChild.nativeElement.value;\n\n //backspace, delete, and escape get special treatment\n if (k === 8 || k === 46 || (iPhone && k === 127)) {\n pos = this.caret();\n begin = pos.begin;\n end = pos.end;\n\n if (end - begin === 0) {\n begin=k!==46?this.seekPrev(begin):(end=this.seekNext(begin-1));\n end=k===46?this.seekNext(end):end;\n }\n\n this.clearBuffer(begin, end);\n\t\t\tthis.shiftL(begin, end - 1);\n this.updateModel(e);\n this.onInput.emit(e);\n\n e.preventDefault();\n }\n else if ( k === 13 ) { // enter\n this.onInputBlur(e);\n this.updateModel(e);\n }\n else if (k === 27) { // escape\n this.inputViewChild.nativeElement.value = this.focusText;\n this.caret(0, this.checkVal());\n this.updateModel(e);\n\n e.preventDefault();\n }\n }\n\n onKeyPress(e) {\n if (this.readonly){\n return;\n }\n\n var k = e.which || e.keyCode,\n pos = this.caret(),\n p,\n c,\n next,\n completed;\n\n if (e.ctrlKey || e.altKey || e.metaKey || k < 32 || (k > 34 && k < 41)) {//Ignore\n return;\n } else if ( k && k !== 13 ) {\n if (pos.end - pos.begin !== 0){\n this.clearBuffer(pos.begin, pos.end);\n this.shiftL(pos.begin, pos.end-1);\n }\n\n p = this.seekNext(pos.begin - 1);\n if (p < this.len) {\n c = String.fromCharCode(k);\n if (this.tests[p].test(c)) {\n this.shiftR(p);\n\n this.buffer[p] = c;\n this.writeBuffer();\n next = this.seekNext(p);\n\n if (/android/i.test(DomHandler.getUserAgent())) {\n //Path for CSP Violation on FireFox OS 1.1\n let proxy = () => {\n this.caret(next);\n };\n\n setTimeout(proxy,0);\n }\n else {\n this.caret(next);\n }\n\n if (pos.begin <= this.lastRequiredNonMaskPos) {\n completed = this.isCompleted();\n }\n\n this.onInput.emit(e);\n }\n }\n e.preventDefault();\n }\n\n this.updateModel(e);\n\n this.updateFilledState();\n\n if (completed) {\n this.onComplete.emit();\n }\n }\n\n clearBuffer(start, end) {\n let i;\n for (i = start; i < end && i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n }\n }\n }\n\n writeBuffer() {\n this.inputViewChild.nativeElement.value = this.buffer.join('');\n }\n\n checkVal(allow?: boolean) {\n //try to place characters where they belong\n let test = this.inputViewChild.nativeElement.value,\n lastMatch = -1,\n i,\n c,\n pos;\n\n for (i = 0, pos = 0; i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n while (pos++ < test.length) {\n c = test.charAt(pos - 1);\n if (this.tests[i].test(c)) {\n this.buffer[i] = c;\n lastMatch = i;\n break;\n }\n }\n if (pos > test.length) {\n this.clearBuffer(i + 1, this.len);\n break;\n }\n } else {\n if (this.buffer[i] === test.charAt(pos)) {\n pos++;\n }\n if ( i < this.partialPosition){\n lastMatch = i;\n }\n }\n }\n if (allow) {\n this.writeBuffer();\n } else if (lastMatch + 1 < this.partialPosition) {\n if (this.autoClear || this.buffer.join('') === this.defaultBuffer) {\n // Invalid value. Remove it and replace it with the\n // mask, which is the default behavior.\n if (this.inputViewChild.nativeElement.value) this.inputViewChild.nativeElement.value = '';\n this.clearBuffer(0, this.len);\n } else {\n // Invalid value, but we opt to show the value to the\n // user and allow them to correct their mistake.\n this.writeBuffer();\n }\n } else {\n this.writeBuffer();\n this.inputViewChild.nativeElement.value = this.inputViewChild.nativeElement.value.substring(0, lastMatch + 1);\n }\n return (this.partialPosition ? i : this.firstNonMaskPos);\n }\n\n onInputFocus(event) {\n if (this.readonly){\n return;\n }\n\n this.focused = true;\n\n clearTimeout(this.caretTimeoutId);\n let pos;\n\n this.focusText = this.inputViewChild.nativeElement.value;\n\n pos = this.checkVal();\n\n this.caretTimeoutId = setTimeout(() => {\n if (this.inputViewChild.nativeElement !== this.inputViewChild.nativeElement.ownerDocument.activeElement){\n return;\n }\n this.writeBuffer();\n if (pos == this.mask.replace(\"?\",\"\").length) {\n this.caret(0, pos);\n } else {\n this.caret(pos);\n }\n }, 10);\n\n this.onFocus.emit(event);\n }\n\n onInputChange(event) {\n if (this.androidChrome)\n this.handleAndroidInput(event);\n else\n this.handleInputChange(event);\n\n this.onInput.emit(event);\n }\n\n handleInputChange(event) {\n if (this.readonly){\n return;\n }\n\n setTimeout(() => {\n var pos = this.checkVal(true);\n this.caret(pos);\n this.updateModel(event);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n\n getUnmaskedValue() {\n let unmaskedBuffer = [];\n for(let i = 0; i < this.buffer.length; i++) {\n let c = this.buffer[i];\n if (this.tests[i] && c != this.getPlaceholder(i)) {\n unmaskedBuffer.push(c);\n }\n }\n\n return unmaskedBuffer.join('');\n }\n\n updateModel(e) {\n const updatedValue = this.unmask ? this.getUnmaskedValue() : e.target.value;\n if (updatedValue !== null || updatedValue !== undefined) {\n this.value = updatedValue;\n this.onModelChange(this.value);\n }\n }\n\n updateFilledState() {\n this.filled = this.inputViewChild.nativeElement && this.inputViewChild.nativeElement.value != '';\n }\n\n focus() {\n this.inputViewChild.nativeElement.focus();\n }\n\n ngOnDestroy() {\n\n }\n}\n\n@NgModule({\n imports: [CommonModule,InputTextModule],\n exports: [InputMask],\n declarations: [InputMask]\n})\nexport class InputMaskModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["NG_VALUE_ACCESSOR","forwardRef","EventEmitter","DomHandler","Component","ChangeDetectionStrategy","ViewEncapsulation","ElementRef","ChangeDetectorRef","Input","ViewChild","Output","NgModule","CommonModule","InputTextModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiCa,wBAAwB,GAAQ;QAC3C,OAAO,EAAEA,uBAAiB;QAC1B,WAAW,EAAEC,eAAU,CAAC,cAAM,OAAA,SAAS,GAAA,CAAC;QACxC,KAAK,EAAE,IAAI;MACX;;QA4GE,mBAAmB,EAAc,EAAU,EAAqB;YAA7C,OAAE,GAAF,EAAE,CAAY;YAAU,OAAE,GAAF,EAAE,CAAmB;YA1FvD,SAAI,GAAW,MAAM,CAAC;YAEtB,aAAQ,GAAW,GAAG,CAAC;YAEvB,cAAS,GAAY,IAAI,CAAC;YAgC1B,qBAAgB,GAAW,UAAU,CAAC;YAQrC,eAAU,GAAsB,IAAIC,iBAAY,EAAE,CAAC;YAEnD,YAAO,GAAsB,IAAIA,iBAAY,EAAE,CAAC;YAEhD,WAAM,GAAsB,IAAIA,iBAAY,EAAE,CAAC;YAE/C,YA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AAiB,CAAC,IAAI;iBACxC;;;gBAzB0BC,eAAU;gBAA6GC,sBAAiB;;;uBA4B9JC,UAAK;2BAELA,UAAK;4BAELA,UAAK;wBAELA,UAAK;0BAELA,UAAK;6BAELA,UAAK;8BAELA,UAAK;uBAELA,UAAK;4BAELA,UAAK;2BAELA,UAAK;wBAELA,UAAK;4BAELA,UAAK;+BAELA,UAAK;2BAELA,UAAK;2BAELA,UAAK;yBAELA,UAAK;uBAELA,UAAK;2BAELA,UAAK;mCAELA,UAAK;4BAELA,UAAK;+BAELA,UAAK;iCAELC,cAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;6BAEnCC,WAAM;0BAENA,WAAM;yBAENA,WAAM;0BAENA,WAAM;uBAiDNF,UAAK;;;QAqfV;;;;;gBALCG,aAAQ,SAAC;oBACN,OAAO,EAAE,CAACC,mBAAY,EAACC,yBAAe,CAAC;oBACvC,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,YAAY,EAAE,CAAC,SAAS,CAAC;iBAC5B;;;IC9oBD;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"primeng-inputmask.umd.js","sources":["../../src/app/components/inputmask/inputmask.ts","../../src/app/components/inputmask/primeng-inputmask.ts"],"sourcesContent":["/*\n Port of jQuery MaskedInput by DigitalBush as a Native Angular2 Component in Typescript without jQuery\n https://github.com/digitalBush/jquery.maskedinput/\n\n Copyright (c) 2007-2014 Josh Bush (digitalbush.com)\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n*/\nimport {NgModule,Component,ElementRef,OnInit,OnDestroy,Input,forwardRef,Output,EventEmitter,ViewChild,ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {DomHandler} from 'primeng/dom';\nimport {InputTextModule} from 'primeng/inputtext';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\n\nexport const INPUTMASK_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputMask),\n multi: true\n};\n\n@Component({\n selector: 'p-inputMask',\n template: `<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"onInputKeydown($event)\" (keypress)=\"onKeyPress($event)\" [attr.autofocus]=\"autoFocus\"\n (input)=\"onInputChange($event)\" (paste)=\"handleInputChange($event)\">`,\n host: {\n '[class.p-inputwrapper-filled]': 'filled',\n '[class.p-inputwrapper-focus]': 'focused'\n },\n providers: [INPUTMASK_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class InputMask implements OnInit,OnDestroy,ControlValueAccessor {\n\n @Input() type: string = 'text';\n\n @Input() slotChar: string = '_';\n\n @Input() autoClear: boolean = true;\n\n @Input() style: any;\n\n @Input() inputId: string;\n\n @Input() styleClass: string;\n\n @Input() placeholder: string;\n\n @Input() size: number;\n\n @Input() maxlength: number;\n\n @Input() tabindex: string;\n\n @Input() title: string;\n\n @Input() ariaLabel: string;\n\n @Input() ariaRequired: boolean;\n\n @Input() disabled: boolean;\n\n @Input() readonly: boolean;\n\n @Input() unmask: boolean;\n\n @Input() name: string;\n\n @Input() required: boolean;\n\n @Input() characterPattern: string = '[A-Za-z]';\n\n @Input() autoFocus: boolean;\n\n @Input() autocomplete: string;\n\n @ViewChild('input', { static: true }) inputViewChild: ElementRef;\n\n @Output() onComplete: EventEmitter<any> = new EventEmitter();\n\n @Output() onFocus: EventEmitter<any> = new EventEmitter();\n\n @Output() onBlur: EventEmitter<any> = new EventEmitter();\n\n @Output() onInput: EventEmitter<any> = new EventEmitter();\n \n @Output() onKeydown: EventEmitter<any> = new EventEmitter();\n\n value: any;\n\n _mask: string;\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n input: HTMLInputElement;\n\n filled: boolean;\n\n defs: any;\n\n tests: any[];\n\n partialPosition: any;\n\n firstNonMaskPos: number;\n\n lastRequiredNonMaskPos: any;\n\n len: number;\n\n oldVal: string;\n\n buffer: any;\n\n defaultBuffer: string;\n\n focusText: string;\n\n caretTimeoutId: any;\n\n androidChrome: boolean;\n\n focused: boolean;\n\n constructor(public el: ElementRef, private cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n let ua = DomHandler.getUserAgent();\n this.androidChrome = /chrome/i.test(ua) && /android/i.test(ua);\n\n this.initMask();\n }\n\n @Input() get mask(): string {\n return this._mask;\n }\n\n set mask(val:string) {\n this._mask = val;\n\n this.initMask();\n this.writeValue('');\n this.onModelChange(this.value);\n }\n\n initMask() {\n this.tests = [];\n this.partialPosition = this.mask.length;\n this.len = this.mask.length;\n this.firstNonMaskPos = null;\n this.defs = {\n '9': '[0-9]',\n 'a': this.characterPattern,\n '*': `${this.characterPattern}|[0-9]`\n };\n\n let maskTokens = this.mask.split('');\n for(let i = 0; i < maskTokens.length; i++) {\n let c = maskTokens[i];\n if (c == '?') {\n\t\t\t\tthis.len--;\n\t\t\t\tthis.partialPosition = i;\n\t\t\t}\n else if (this.defs[c]) {\n\t\t\t\tthis.tests.push(new RegExp(this.defs[c]));\n\t\t\t\tif (this.firstNonMaskPos === null) {\n\t this.firstNonMaskPos = this.tests.length - 1;\n\t\t\t\t}\n if (i < this.partialPosition){\n this.lastRequiredNonMaskPos = this.tests.length - 1;\n }\n\t\t\t}\n else {\n\t\t\t\tthis.tests.push(null);\n\t\t\t}\n }\n\n this.buffer = [];\n for(let i = 0; i < maskTokens.length; i++) {\n let c = maskTokens[i];\n if (c != '?') {\n if (this.defs[c])\n this.buffer.push(this.getPlaceholder(i));\n else\n this.buffer.push(c);\n }\n }\n this.defaultBuffer = this.buffer.join('');\n }\n\n writeValue(value: any) : void {\n this.value = value;\n\n if (this.inputViewChild && this.inputViewChild.nativeElement) {\n if (this.value == undefined || this.value == null)\n this.inputViewChild.nativeElement.value = '';\n else\n this.inputViewChild.nativeElement.value = this.value;\n\n this.checkVal();\n this.focusText = this.inputViewChild.nativeElement.value;\n this.updateFilledState();\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n caret(first?: number, last?: number) {\n let range, begin, end;\n\n if (!this.inputViewChild.nativeElement.offsetParent||this.inputViewChild.nativeElement !== this.inputViewChild.nativeElement.ownerDocument.activeElement) {\n return;\n }\n\n if (typeof first == 'number') {\n begin = first;\n end = (typeof last === 'number') ? last : begin;\n if (this.inputViewChild.nativeElement.setSelectionRange) {\n this.inputViewChild.nativeElement.setSelectionRange(begin, end);\n }\n else if (this.inputViewChild.nativeElement['createTextRange']) {\n range = this.inputViewChild.nativeElement['createTextRange']();\n range.collapse(true);\n range.moveEnd('character', end);\n range.moveStart('character', begin);\n range.select();\n }\n }\n else {\n if (this.inputViewChild.nativeElement.setSelectionRange) {\n \t\t\tbegin = this.inputViewChild.nativeElement.selectionStart;\n \t\t\tend = this.inputViewChild.nativeElement.selectionEnd;\n \t\t}\n else if (document['selection'] && document['selection'].createRange) {\n \t\t\trange = document['selection'].createRange();\n \t\t\tbegin = 0 - range.duplicate().moveStart('character', -100000);\n \t\t\tend = begin + range.text.length;\n \t\t}\n\n \t\treturn {begin: begin, end: end};\n }\n }\n\n isCompleted(): boolean {\n let completed: boolean;\n for (let i = this.firstNonMaskPos; i <= this.lastRequiredNonMaskPos; i++) {\n if (this.tests[i] && this.buffer[i] === this.getPlaceholder(i)) {\n return false;\n }\n }\n\n return true;\n }\n\n getPlaceholder(i: number) {\n if (i < this.slotChar.length) {\n return this.slotChar.charAt(i);\n }\n return this.slotChar.charAt(0);\n }\n\n seekNext(pos) {\n while (++pos < this.len && !this.tests[pos]);\n return pos;\n }\n\n seekPrev(pos) {\n while (--pos >= 0 && !this.tests[pos]);\n return pos;\n }\n\n shiftL(begin:number,end:number) {\n let i, j;\n\n if (begin<0) {\n return;\n }\n\n for (i = begin, j = this.seekNext(end); i < this.len; i++) {\n if (this.tests[i]) {\n if (j < this.len && this.tests[i].test(this.buffer[j])) {\n this.buffer[i] = this.buffer[j];\n this.buffer[j] = this.getPlaceholder(j);\n } else {\n break;\n }\n\n j = this.seekNext(j);\n }\n }\n this.writeBuffer();\n this.caret(Math.max(this.firstNonMaskPos, begin));\n }\n\n shiftR(pos) {\n let i, c, j, t;\n\n for (i = pos, c = this.getPlaceholder(pos); i < this.len; i++) {\n if (this.tests[i]) {\n j = this.seekNext(i);\n t = this.buffer[i];\n this.buffer[i] = c;\n if (j < this.len && this.tests[j].test(t)) {\n c = t;\n } else {\n break;\n }\n }\n }\n }\n\n handleAndroidInput(e) {\n var curVal = this.inputViewChild.nativeElement.value;\n var pos = this.caret();\n if (this.oldVal && this.oldVal.length && this.oldVal.length > curVal.length ) {\n // a deletion or backspace happened\n this.checkVal(true);\n while (pos.begin > 0 && !this.tests[pos.begin-1])\n pos.begin--;\n if (pos.begin === 0)\n {\n while (pos.begin < this.firstNonMaskPos && !this.tests[pos.begin])\n pos.begin++;\n }\n\n setTimeout(() => {\n this.caret(pos.begin, pos.begin);\n this.updateModel(e);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n else {\n this.checkVal(true);\n while (pos.begin < this.len && !this.tests[pos.begin])\n pos.begin++;\n\n setTimeout(() => {\n this.caret(pos.begin, pos.begin);\n this.updateModel(e);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n }\n\n onInputBlur(e) {\n this.focused = false;\n this.onModelTouched();\n this.checkVal();\n this.updateFilledState();\n this.onBlur.emit(e);\n\n if (this.inputViewChild.nativeElement.value != this.focusText || this.inputViewChild.nativeElement.value != this.value) {\n this.updateModel(e);\n let event = document.createEvent('HTMLEvents');\n event.initEvent('change', true, false);\n this.inputViewChild.nativeElement.dispatchEvent(event);\n }\n }\n\n onInputKeydown(e) {\n if (this.readonly) {\n return;\n }\n\n let k = e.which||e.keyCode,\n pos,\n begin,\n end;\n let iPhone = /iphone/i.test(DomHandler.getUserAgent());\n this.oldVal = this.inputViewChild.nativeElement.value;\n \n this.onKeydown.emit(e);\n\n //backspace, delete, and escape get special treatment\n if (k === 8 || k === 46 || (iPhone && k === 127)) {\n pos = this.caret();\n begin = pos.begin;\n end = pos.end;\n\n if (end - begin === 0) {\n begin=k!==46?this.seekPrev(begin):(end=this.seekNext(begin-1));\n end=k===46?this.seekNext(end):end;\n }\n\n this.clearBuffer(begin, end);\n\t\t\tthis.shiftL(begin, end - 1);\n this.updateModel(e);\n this.onInput.emit(e);\n\n e.preventDefault();\n }\n else if ( k === 13 ) { // enter\n this.onInputBlur(e);\n this.updateModel(e);\n }\n else if (k === 27) { // escape\n this.inputViewChild.nativeElement.value = this.focusText;\n this.caret(0, this.checkVal());\n this.updateModel(e);\n\n e.preventDefault();\n }\n }\n\n onKeyPress(e) {\n if (this.readonly){\n return;\n }\n\n var k = e.which || e.keyCode,\n pos = this.caret(),\n p,\n c,\n next,\n completed;\n\n if (e.ctrlKey || e.altKey || e.metaKey || k < 32 || (k > 34 && k < 41)) {//Ignore\n return;\n } else if ( k && k !== 13 ) {\n if (pos.end - pos.begin !== 0){\n this.clearBuffer(pos.begin, pos.end);\n this.shiftL(pos.begin, pos.end-1);\n }\n\n p = this.seekNext(pos.begin - 1);\n if (p < this.len) {\n c = String.fromCharCode(k);\n if (this.tests[p].test(c)) {\n this.shiftR(p);\n\n this.buffer[p] = c;\n this.writeBuffer();\n next = this.seekNext(p);\n\n if (/android/i.test(DomHandler.getUserAgent())) {\n //Path for CSP Violation on FireFox OS 1.1\n let proxy = () => {\n this.caret(next);\n };\n\n setTimeout(proxy,0);\n }\n else {\n this.caret(next);\n }\n\n if (pos.begin <= this.lastRequiredNonMaskPos) {\n completed = this.isCompleted();\n }\n\n this.onInput.emit(e);\n }\n }\n e.preventDefault();\n }\n\n this.updateModel(e);\n\n this.updateFilledState();\n\n if (completed) {\n this.onComplete.emit();\n }\n }\n\n clearBuffer(start, end) {\n let i;\n for (i = start; i < end && i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n }\n }\n }\n\n writeBuffer() {\n this.inputViewChild.nativeElement.value = this.buffer.join('');\n }\n\n checkVal(allow?: boolean) {\n //try to place characters where they belong\n let test = this.inputViewChild.nativeElement.value,\n lastMatch = -1,\n i,\n c,\n pos;\n\n for (i = 0, pos = 0; i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n while (pos++ < test.length) {\n c = test.charAt(pos - 1);\n if (this.tests[i].test(c)) {\n this.buffer[i] = c;\n lastMatch = i;\n break;\n }\n }\n if (pos > test.length) {\n this.clearBuffer(i + 1, this.len);\n break;\n }\n } else {\n if (this.buffer[i] === test.charAt(pos)) {\n pos++;\n }\n if ( i < this.partialPosition){\n lastMatch = i;\n }\n }\n }\n if (allow) {\n this.writeBuffer();\n } else if (lastMatch + 1 < this.partialPosition) {\n if (this.autoClear || this.buffer.join('') === this.defaultBuffer) {\n // Invalid value. Remove it and replace it with the\n // mask, which is the default behavior.\n if (this.inputViewChild.nativeElement.value) this.inputViewChild.nativeElement.value = '';\n this.clearBuffer(0, this.len);\n } else {\n // Invalid value, but we opt to show the value to the\n // user and allow them to correct their mistake.\n this.writeBuffer();\n }\n } else {\n this.writeBuffer();\n this.inputViewChild.nativeElement.value = this.inputViewChild.nativeElement.value.substring(0, lastMatch + 1);\n }\n return (this.partialPosition ? i : this.firstNonMaskPos);\n }\n\n onInputFocus(event) {\n if (this.readonly){\n return;\n }\n\n this.focused = true;\n\n clearTimeout(this.caretTimeoutId);\n let pos;\n\n this.focusText = this.inputViewChild.nativeElement.value;\n\n pos = this.checkVal();\n\n this.caretTimeoutId = setTimeout(() => {\n if (this.inputViewChild.nativeElement !== this.inputViewChild.nativeElement.ownerDocument.activeElement){\n return;\n }\n this.writeBuffer();\n if (pos == this.mask.replace(\"?\",\"\").length) {\n this.caret(0, pos);\n } else {\n this.caret(pos);\n }\n }, 10);\n\n this.onFocus.emit(event);\n }\n\n onInputChange(event) {\n if (this.androidChrome)\n this.handleAndroidInput(event);\n else\n this.handleInputChange(event);\n\n this.onInput.emit(event);\n }\n\n handleInputChange(event) {\n if (this.readonly){\n return;\n }\n\n setTimeout(() => {\n var pos = this.checkVal(true);\n this.caret(pos);\n this.updateModel(event);\n if (this.isCompleted()) {\n this.onComplete.emit();\n }\n }, 0);\n }\n\n getUnmaskedValue() {\n let unmaskedBuffer = [];\n for(let i = 0; i < this.buffer.length; i++) {\n let c = this.buffer[i];\n if (this.tests[i] && c != this.getPlaceholder(i)) {\n unmaskedBuffer.push(c);\n }\n }\n\n return unmaskedBuffer.join('');\n }\n\n updateModel(e) {\n const updatedValue = this.unmask ? this.getUnmaskedValue() : e.target.value;\n if (updatedValue !== null || updatedValue !== undefined) {\n this.value = updatedValue;\n this.onModelChange(this.value);\n }\n }\n\n updateFilledState() {\n this.filled = this.inputViewChild.nativeElement && this.inputViewChild.nativeElement.value != '';\n }\n\n focus() {\n this.inputViewChild.nativeElement.focus();\n }\n\n ngOnDestroy() {\n\n }\n}\n\n@NgModule({\n imports: [CommonModule,InputTextModule],\n exports: [InputMask],\n declarations: [InputMask]\n})\nexport class InputMaskModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["NG_VALUE_ACCESSOR","forwardRef","EventEmitter","DomHandler","Component","ChangeDetectionStrategy","ViewEncapsulation","ElementRef","ChangeDetectorRef","Input","ViewChild","Output","NgModule","CommonModule","InputTextModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiCa,wBAAwB,GAAQ;QAC3C,OAAO,EAAEA,uBAAiB;QAC1B,WAAW,EAAEC,eAAU,CAAC,cAAM,OAAA,SAAS,GAAA,CAAC;QACxC,KAAK,EAAE,IAAI;MACX;;QA8GE,mBAAmB,EAAc,EAAU,EAAqB;YAA7C,OAAE,GAAF,EAAE,CAAY;YAAU,OAAE,GAAF,EAAE,CAAmB;YA5FvD,SAAI,GAAW,MAAM,CAAC;YAEtB,aAAQ,GAAW,GAAG,CAAC;YAEvB,cAAS,GAAY,IAAI,CAAC;YAgC1B,qBAAgB,GAAW,UAAU,CAAC;YAQrC,eAAU,GAAsB,IAAIC,iBAAY,EAAE,CAAC;YAEnD,YAAO,GAAsB,IAAIA,iBAAY,EAAE,CAAC;YAEhD,WAAM,GAAsB,IAAIA,iBAAY,EAAE,CAAC;YAE/C,YAAO,GAAsB,IAAI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S,EAAE,CAAC,wBAAwB,CAAC;oBACrC,eAAe,EAAEC,4BAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAEC,sBAAiB,CAAC,IAAI;iBACxC;;;gBAzB0BC,eAAU;gBAA6GC,sBAAiB;;;uBA4B9JC,UAAK;2BAELA,UAAK;4BAELA,UAAK;wBAELA,UAAK;0BAELA,UAAK;6BAELA,UAAK;8BAELA,UAAK;uBAELA,UAAK;4BAELA,UAAK;2BAELA,UAAK;wBAELA,UAAK;4BAELA,UAAK;+BAELA,UAAK;2BAELA,UAAK;2BAELA,UAAK;yBAELA,UAAK;uBAELA,UAAK;2BAELA,UAAK;mCAELA,UAAK;4BAELA,UAAK;+BAELA,UAAK;iCAELC,cAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;6BAEnCC,WAAM;0BAENA,WAAM;yBAENA,WAAM;0BAENA,WAAM;4BAENA,WAAM;uBAiDNF,UAAK;;;QAufV;;;;;gBALCG,aAAQ,SAAC;oBACN,OAAO,EAAE,CAACC,mBAAY,EAACC,yBAAe,CAAC;oBACvC,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,YAAY,EAAE,CAAC,SAAS,CAAC;iBAC5B;;;IClpBD;;;;;;;;;;;;;;"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom"),require("primeng/inputtext"),require("@angular/forms")):"function"==typeof define&&define.amd?define("primeng/inputmask",["exports","@angular/core","@angular/common","primeng/dom","primeng/inputtext","@angular/forms"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).primeng=t.primeng||{},t.primeng.inputmask={}),t.ng.core,t.ng.common,t.primeng.dom,t.primeng.inputtext,t.ng.forms)}(this,(function(t,e,i,n,s,o){"use strict";var a={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return r})),multi:!0},r=function(){function t(t,i){this.el=t,this.cd=i,this.type="text",this.slotChar="_",this.autoClear=!0,this.characterPattern="[A-Za-z]",this.onComplete=new e.EventEmitter,this.onFocus=new e.EventEmitter,this.onBlur=new e.EventEmitter,this.onInput=new e.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return t.prototype.ngOnInit=function(){var t=n.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t),this.initMask()},Object.defineProperty(t.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask=t,this.initMask(),this.writeValue(""),this.onModelChange(this.value)},enumerable:!1,configurable:!0}),t.prototype.initMask=function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:this.characterPattern,"*":this.characterPattern+"|[0-9]"};for(var t=this.mask.split(""),e=0;e<t.length;e++){"?"==(i=t[e])?(this.len--,this.partialPosition=e):this.defs[i]?(this.tests.push(new RegExp(this.defs[i])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),e<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(e=0;e<t.length;e++){var i;"?"!=(i=t[e])&&(this.defs[i]?this.buffer.push(this.getPlaceholder(e)):this.buffer.push(i))}this.defaultBuffer=this.buffer.join("")},t.prototype.writeValue=function(t){this.value=t,this.inputViewChild&&this.inputViewChild.nativeElement&&(null==this.value||null==this.value?this.inputViewChild.nativeElement.value="":this.inputViewChild.nativeElement.value=this.value,this.checkVal(),this.focusText=this.inputViewChild.nativeElement.value,this.updateFilledState())},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this.cd.markForCheck()},t.prototype.caret=function(t,e){var i,n,s;if(this.inputViewChild.nativeElement.offsetParent&&this.inputViewChild.nativeElement===this.inputViewChild.nativeElement.ownerDocument.activeElement)return"number"!=typeof t?(this.inputViewChild.nativeElement.setSelectionRange?(n=this.inputViewChild.nativeElement.selectionStart,s=this.inputViewChild.nativeElement.selectionEnd):document.selection&&document.selection.createRange&&(s=(n=0-(i=document.selection.createRange()).duplicate().moveStart("character",-1e5))+i.text.length),{begin:n,end:s}):(n=t,s="number"==typeof e?e:n,void(this.inputViewChild.nativeElement.setSelectionRange?this.inputViewChild.nativeElement.setSelectionRange(n,s):this.inputViewChild.nativeElement.createTextRange&&((i=this.inputViewChild.nativeElement.createTextRange()).collapse(!0),i.moveEnd("character",s),i.moveStart("character",n),i.select())))},t.prototype.isCompleted=function(){for(var t=this.firstNonMaskPos;t<=this.lastRequiredNonMaskPos;t++)if(this.tests[t]&&this.buffer[t]===this.getPlaceholder(t))return!1;return!0},t.prototype.getPlaceholder=function(t){return t<this.slotChar.length?this.slotChar.charAt(t):this.slotChar.charAt(0)},t.prototype.seekNext=function(t){for(;++t<this.len&&!this.tests[t];);return t},t.prototype.seekPrev=function(t){for(;--t>=0&&!this.tests[t];);return t},t.prototype.shiftL=function(t,e){var i,n;if(!(t<0)){for(i=t,n=this.seekNext(e);i<this.len;i++)if(this.tests[i]){if(!(n<this.len&&this.tests[i].test(this.buffer[n])))break;this.buffer[i]=this.buffer[n],this.buffer[n]=this.getPlaceholder(n),n=this.seekNext(n)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,t))}},t.prototype.shiftR=function(t){var e,i,n,s;for(e=t,i=this.getPlaceholder(t);e<this.len;e++)if(this.tests[e]){if(n=this.seekNext(e),s=this.buffer[e],this.buffer[e]=i,!(n<this.len&&this.tests[n].test(s)))break;i=s}},t.prototype.handleAndroidInput=function(t){var e=this,i=this.inputViewChild.nativeElement.value,n=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>i.length){for(this.checkVal(!0);n.begin>0&&!this.tests[n.begin-1];)n.begin--;if(0===n.begin)for(;n.begin<this.firstNonMaskPos&&!this.tests[n.begin];)n.begin++;setTimeout((function(){e.caret(n.begin,n.begin),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)}else{for(this.checkVal(!0);n.begin<this.len&&!this.tests[n.begin];)n.begin++;setTimeout((function(){e.caret(n.begin,n.begin),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)}},t.prototype.onInputBlur=function(t){if(this.focused=!1,this.onModelTouched(),this.checkVal(),this.updateFilledState(),this.onBlur.emit(t),this.inputViewChild.nativeElement.value!=this.focusText||this.inputViewChild.nativeElement.value!=this.value){this.updateModel(t);var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.inputViewChild.nativeElement.dispatchEvent(e)}},t.prototype.onKeyDown=function(t){if(!this.readonly){var e,i,s,o=t.which||t.keyCode,a=/iphone/i.test(n.DomHandler.getUserAgent());this.oldVal=this.inputViewChild.nativeElement.value,8===o||46===o||a&&127===o?(i=(e=this.caret()).begin,(s=e.end)-i==0&&(i=46!==o?this.seekPrev(i):s=this.seekNext(i-1),s=46===o?this.seekNext(s):s),this.clearBuffer(i,s),this.shiftL(i,s-1),this.updateModel(t),this.onInput.emit(t),t.preventDefault()):13===o?(this.onInputBlur(t),this.updateModel(t)):27===o&&(this.inputViewChild.nativeElement.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault())}},t.prototype.onKeyPress=function(t){var e=this;if(!this.readonly){var i,s,o,a,r=t.which||t.keyCode,h=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||r<32||r>34&&r<41)){if(r&&13!==r){if(h.end-h.begin!=0&&(this.clearBuffer(h.begin,h.end),this.shiftL(h.begin,h.end-1)),(i=this.seekNext(h.begin-1))<this.len&&(s=String.fromCharCode(r),this.tests[i].test(s))){if(this.shiftR(i),this.buffer[i]=s,this.writeBuffer(),o=this.seekNext(i),/android/i.test(n.DomHandler.getUserAgent())){setTimeout((function(){e.caret(o)}),0)}else this.caret(o);h.begin<=this.lastRequiredNonMaskPos&&(a=this.isCompleted()),this.onInput.emit(t)}t.preventDefault()}this.updateModel(t),this.updateFilledState(),a&&this.onComplete.emit()}}},t.prototype.clearBuffer=function(t,e){var i;for(i=t;i<e&&i<this.len;i++)this.tests[i]&&(this.buffer[i]=this.getPlaceholder(i))},t.prototype.writeBuffer=function(){this.inputViewChild.nativeElement.value=this.buffer.join("")},t.prototype.checkVal=function(t){var e,i,n,s=this.inputViewChild.nativeElement.value,o=-1;for(e=0,n=0;e<this.len;e++)if(this.tests[e]){for(this.buffer[e]=this.getPlaceholder(e);n++<s.length;)if(i=s.charAt(n-1),this.tests[e].test(i)){this.buffer[e]=i,o=e;break}if(n>s.length){this.clearBuffer(e+1,this.len);break}}else this.buffer[e]===s.charAt(n)&&n++,e<this.partialPosition&&(o=e);return t?this.writeBuffer():o+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.inputViewChild.nativeElement.value&&(this.inputViewChild.nativeElement.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.inputViewChild.nativeElement.value=this.inputViewChild.nativeElement.value.substring(0,o+1)),this.partialPosition?e:this.firstNonMaskPos},t.prototype.onInputFocus=function(t){var e,i=this;this.readonly||(this.focused=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.inputViewChild.nativeElement.value,e=this.checkVal(),this.caretTimeoutId=setTimeout((function(){i.inputViewChild.nativeElement===i.inputViewChild.nativeElement.ownerDocument.activeElement&&(i.writeBuffer(),e==i.mask.replace("?","").length?i.caret(0,e):i.caret(e))}),10),this.onFocus.emit(t))},t.prototype.onInputChange=function(t){this.androidChrome?this.handleAndroidInput(t):this.handleInputChange(t),this.onInput.emit(t)},t.prototype.handleInputChange=function(t){var e=this;this.readonly||setTimeout((function(){var i=e.checkVal(!0);e.caret(i),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)},t.prototype.getUnmaskedValue=function(){for(var t=[],e=0;e<this.buffer.length;e++){var i=this.buffer[e];this.tests[e]&&i!=this.getPlaceholder(e)&&t.push(i)}return t.join("")},t.prototype.updateModel=function(t){var e=this.unmask?this.getUnmaskedValue():t.target.value;null===e&&void 0===e||(this.value=e,this.onModelChange(this.value))},t.prototype.updateFilledState=function(){this.filled=this.inputViewChild.nativeElement&&""!=this.inputViewChild.nativeElement.value},t.prototype.focus=function(){this.inputViewChild.nativeElement.focus()},t.prototype.ngOnDestroy=function(){},t}();r.decorators=[{type:e.Component,args:[{selector:"p-inputMask",template:'<input #input pInputText class="p-inputmask" [attr.id]="inputId" [attr.type]="type" [attr.name]="name" [ngStyle]="style" [ngClass]="styleClass" [attr.placeholder]="placeholder" [attr.title]="title"\n [attr.size]="size" [attr.autocomplete]="autocomplete" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.aria-label]="ariaLabel" [attr.aria-required]="ariaRequired" [disabled]="disabled" [readonly]="readonly" [attr.required]="required"\n (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (keydown)="onKeyDown($event)" (keypress)="onKeyPress($event)" [attr.autofocus]="autoFocus"\n (input)="onInputChange($event)" (paste)="handleInputChange($event)">',host:{"[class.p-inputwrapper-filled]":"filled","[class.p-inputwrapper-focus]":"focused"},providers:[a],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],r.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},r.propDecorators={type:[{type:e.Input}],slotChar:[{type:e.Input}],autoClear:[{type:e.Input}],style:[{type:e.Input}],inputId:[{type:e.Input}],styleClass:[{type:e.Input}],placeholder:[{type:e.Input}],size:[{type:e.Input}],maxlength:[{type:e.Input}],tabindex:[{type:e.Input}],title:[{type:e.Input}],ariaLabel:[{type:e.Input}],ariaRequired:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],unmask:[{type:e.Input}],name:[{type:e.Input}],required:[{type:e.Input}],characterPattern:[{type:e.Input}],autoFocus:[{type:e.Input}],autocomplete:[{type:e.Input}],inputViewChild:[{type:e.ViewChild,args:["input",{static:!0}]}],onComplete:[{type:e.Output}],onFocus:[{type:e.Output}],onBlur:[{type:e.Output}],onInput:[{type:e.Output}],mask:[{type:e.Input}]};var h=function(){};h.decorators=[{type:e.NgModule,args:[{imports:[i.CommonModule,s.InputTextModule],exports:[r],declarations:[r]}]}],t.INPUTMASK_VALUE_ACCESSOR=a,t.InputMask=r,t.InputMaskModule=h,Object.defineProperty(t,"__esModule",{value:!0})}));
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom"),require("primeng/inputtext"),require("@angular/forms")):"function"==typeof define&&define.amd?define("primeng/inputmask",["exports","@angular/core","@angular/common","primeng/dom","primeng/inputtext","@angular/forms"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).primeng=t.primeng||{},t.primeng.inputmask={}),t.ng.core,t.ng.common,t.primeng.dom,t.primeng.inputtext,t.ng.forms)}(this,(function(t,e,i,n,s,o){"use strict";var a={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return r})),multi:!0},r=function(){function t(t,i){this.el=t,this.cd=i,this.type="text",this.slotChar="_",this.autoClear=!0,this.characterPattern="[A-Za-z]",this.onComplete=new e.EventEmitter,this.onFocus=new e.EventEmitter,this.onBlur=new e.EventEmitter,this.onInput=new e.EventEmitter,this.onKeydown=new e.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return t.prototype.ngOnInit=function(){var t=n.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(t)&&/android/i.test(t),this.initMask()},Object.defineProperty(t.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask=t,this.initMask(),this.writeValue(""),this.onModelChange(this.value)},enumerable:!1,configurable:!0}),t.prototype.initMask=function(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:this.characterPattern,"*":this.characterPattern+"|[0-9]"};for(var t=this.mask.split(""),e=0;e<t.length;e++){"?"==(i=t[e])?(this.len--,this.partialPosition=e):this.defs[i]?(this.tests.push(new RegExp(this.defs[i])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),e<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(e=0;e<t.length;e++){var i;"?"!=(i=t[e])&&(this.defs[i]?this.buffer.push(this.getPlaceholder(e)):this.buffer.push(i))}this.defaultBuffer=this.buffer.join("")},t.prototype.writeValue=function(t){this.value=t,this.inputViewChild&&this.inputViewChild.nativeElement&&(null==this.value||null==this.value?this.inputViewChild.nativeElement.value="":this.inputViewChild.nativeElement.value=this.value,this.checkVal(),this.focusText=this.inputViewChild.nativeElement.value,this.updateFilledState())},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this.cd.markForCheck()},t.prototype.caret=function(t,e){var i,n,s;if(this.inputViewChild.nativeElement.offsetParent&&this.inputViewChild.nativeElement===this.inputViewChild.nativeElement.ownerDocument.activeElement)return"number"!=typeof t?(this.inputViewChild.nativeElement.setSelectionRange?(n=this.inputViewChild.nativeElement.selectionStart,s=this.inputViewChild.nativeElement.selectionEnd):document.selection&&document.selection.createRange&&(s=(n=0-(i=document.selection.createRange()).duplicate().moveStart("character",-1e5))+i.text.length),{begin:n,end:s}):(n=t,s="number"==typeof e?e:n,void(this.inputViewChild.nativeElement.setSelectionRange?this.inputViewChild.nativeElement.setSelectionRange(n,s):this.inputViewChild.nativeElement.createTextRange&&((i=this.inputViewChild.nativeElement.createTextRange()).collapse(!0),i.moveEnd("character",s),i.moveStart("character",n),i.select())))},t.prototype.isCompleted=function(){for(var t=this.firstNonMaskPos;t<=this.lastRequiredNonMaskPos;t++)if(this.tests[t]&&this.buffer[t]===this.getPlaceholder(t))return!1;return!0},t.prototype.getPlaceholder=function(t){return t<this.slotChar.length?this.slotChar.charAt(t):this.slotChar.charAt(0)},t.prototype.seekNext=function(t){for(;++t<this.len&&!this.tests[t];);return t},t.prototype.seekPrev=function(t){for(;--t>=0&&!this.tests[t];);return t},t.prototype.shiftL=function(t,e){var i,n;if(!(t<0)){for(i=t,n=this.seekNext(e);i<this.len;i++)if(this.tests[i]){if(!(n<this.len&&this.tests[i].test(this.buffer[n])))break;this.buffer[i]=this.buffer[n],this.buffer[n]=this.getPlaceholder(n),n=this.seekNext(n)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,t))}},t.prototype.shiftR=function(t){var e,i,n,s;for(e=t,i=this.getPlaceholder(t);e<this.len;e++)if(this.tests[e]){if(n=this.seekNext(e),s=this.buffer[e],this.buffer[e]=i,!(n<this.len&&this.tests[n].test(s)))break;i=s}},t.prototype.handleAndroidInput=function(t){var e=this,i=this.inputViewChild.nativeElement.value,n=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>i.length){for(this.checkVal(!0);n.begin>0&&!this.tests[n.begin-1];)n.begin--;if(0===n.begin)for(;n.begin<this.firstNonMaskPos&&!this.tests[n.begin];)n.begin++;setTimeout((function(){e.caret(n.begin,n.begin),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)}else{for(this.checkVal(!0);n.begin<this.len&&!this.tests[n.begin];)n.begin++;setTimeout((function(){e.caret(n.begin,n.begin),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)}},t.prototype.onInputBlur=function(t){if(this.focused=!1,this.onModelTouched(),this.checkVal(),this.updateFilledState(),this.onBlur.emit(t),this.inputViewChild.nativeElement.value!=this.focusText||this.inputViewChild.nativeElement.value!=this.value){this.updateModel(t);var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.inputViewChild.nativeElement.dispatchEvent(e)}},t.prototype.onInputKeydown=function(t){if(!this.readonly){var e,i,s,o=t.which||t.keyCode,a=/iphone/i.test(n.DomHandler.getUserAgent());this.oldVal=this.inputViewChild.nativeElement.value,this.onKeydown.emit(t),8===o||46===o||a&&127===o?(i=(e=this.caret()).begin,(s=e.end)-i==0&&(i=46!==o?this.seekPrev(i):s=this.seekNext(i-1),s=46===o?this.seekNext(s):s),this.clearBuffer(i,s),this.shiftL(i,s-1),this.updateModel(t),this.onInput.emit(t),t.preventDefault()):13===o?(this.onInputBlur(t),this.updateModel(t)):27===o&&(this.inputViewChild.nativeElement.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(t),t.preventDefault())}},t.prototype.onKeyPress=function(t){var e=this;if(!this.readonly){var i,s,o,a,r=t.which||t.keyCode,h=this.caret();if(!(t.ctrlKey||t.altKey||t.metaKey||r<32||r>34&&r<41)){if(r&&13!==r){if(h.end-h.begin!=0&&(this.clearBuffer(h.begin,h.end),this.shiftL(h.begin,h.end-1)),(i=this.seekNext(h.begin-1))<this.len&&(s=String.fromCharCode(r),this.tests[i].test(s))){if(this.shiftR(i),this.buffer[i]=s,this.writeBuffer(),o=this.seekNext(i),/android/i.test(n.DomHandler.getUserAgent())){setTimeout((function(){e.caret(o)}),0)}else this.caret(o);h.begin<=this.lastRequiredNonMaskPos&&(a=this.isCompleted()),this.onInput.emit(t)}t.preventDefault()}this.updateModel(t),this.updateFilledState(),a&&this.onComplete.emit()}}},t.prototype.clearBuffer=function(t,e){var i;for(i=t;i<e&&i<this.len;i++)this.tests[i]&&(this.buffer[i]=this.getPlaceholder(i))},t.prototype.writeBuffer=function(){this.inputViewChild.nativeElement.value=this.buffer.join("")},t.prototype.checkVal=function(t){var e,i,n,s=this.inputViewChild.nativeElement.value,o=-1;for(e=0,n=0;e<this.len;e++)if(this.tests[e]){for(this.buffer[e]=this.getPlaceholder(e);n++<s.length;)if(i=s.charAt(n-1),this.tests[e].test(i)){this.buffer[e]=i,o=e;break}if(n>s.length){this.clearBuffer(e+1,this.len);break}}else this.buffer[e]===s.charAt(n)&&n++,e<this.partialPosition&&(o=e);return t?this.writeBuffer():o+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.inputViewChild.nativeElement.value&&(this.inputViewChild.nativeElement.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.inputViewChild.nativeElement.value=this.inputViewChild.nativeElement.value.substring(0,o+1)),this.partialPosition?e:this.firstNonMaskPos},t.prototype.onInputFocus=function(t){var e,i=this;this.readonly||(this.focused=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.inputViewChild.nativeElement.value,e=this.checkVal(),this.caretTimeoutId=setTimeout((function(){i.inputViewChild.nativeElement===i.inputViewChild.nativeElement.ownerDocument.activeElement&&(i.writeBuffer(),e==i.mask.replace("?","").length?i.caret(0,e):i.caret(e))}),10),this.onFocus.emit(t))},t.prototype.onInputChange=function(t){this.androidChrome?this.handleAndroidInput(t):this.handleInputChange(t),this.onInput.emit(t)},t.prototype.handleInputChange=function(t){var e=this;this.readonly||setTimeout((function(){var i=e.checkVal(!0);e.caret(i),e.updateModel(t),e.isCompleted()&&e.onComplete.emit()}),0)},t.prototype.getUnmaskedValue=function(){for(var t=[],e=0;e<this.buffer.length;e++){var i=this.buffer[e];this.tests[e]&&i!=this.getPlaceholder(e)&&t.push(i)}return t.join("")},t.prototype.updateModel=function(t){var e=this.unmask?this.getUnmaskedValue():t.target.value;null===e&&void 0===e||(this.value=e,this.onModelChange(this.value))},t.prototype.updateFilledState=function(){this.filled=this.inputViewChild.nativeElement&&""!=this.inputViewChild.nativeElement.value},t.prototype.focus=function(){this.inputViewChild.nativeElement.focus()},t.prototype.ngOnDestroy=function(){},t}();r.decorators=[{type:e.Component,args:[{selector:"p-inputMask",template:'<input #input pInputText class="p-inputmask" [attr.id]="inputId" [attr.type]="type" [attr.name]="name" [ngStyle]="style" [ngClass]="styleClass" [attr.placeholder]="placeholder" [attr.title]="title"\n [attr.size]="size" [attr.autocomplete]="autocomplete" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [attr.aria-label]="ariaLabel" [attr.aria-required]="ariaRequired" [disabled]="disabled" [readonly]="readonly" [attr.required]="required"\n (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (keydown)="onInputKeydown($event)" (keypress)="onKeyPress($event)" [attr.autofocus]="autoFocus"\n (input)="onInputChange($event)" (paste)="handleInputChange($event)">',host:{"[class.p-inputwrapper-filled]":"filled","[class.p-inputwrapper-focus]":"focused"},providers:[a],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],r.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},r.propDecorators={type:[{type:e.Input}],slotChar:[{type:e.Input}],autoClear:[{type:e.Input}],style:[{type:e.Input}],inputId:[{type:e.Input}],styleClass:[{type:e.Input}],placeholder:[{type:e.Input}],size:[{type:e.Input}],maxlength:[{type:e.Input}],tabindex:[{type:e.Input}],title:[{type:e.Input}],ariaLabel:[{type:e.Input}],ariaRequired:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],unmask:[{type:e.Input}],name:[{type:e.Input}],required:[{type:e.Input}],characterPattern:[{type:e.Input}],autoFocus:[{type:e.Input}],autocomplete:[{type:e.Input}],inputViewChild:[{type:e.ViewChild,args:["input",{static:!0}]}],onComplete:[{type:e.Output}],onFocus:[{type:e.Output}],onBlur:[{type:e.Output}],onInput:[{type:e.Output}],onKeydown:[{type:e.Output}],mask:[{type:e.Input}]};var h=function(){};h.decorators=[{type:e.NgModule,args:[{imports:[i.CommonModule,s.InputTextModule],exports:[r],declarations:[r]}]}],t.INPUTMASK_VALUE_ACCESSOR=a,t.InputMask=r,t.InputMaskModule=h,Object.defineProperty(t,"__esModule",{value:!0})}));
|
2
2
|
//# sourceMappingURL=primeng-inputmask.umd.min.js.map
|