@progress/kendo-angular-label
Advanced tools
Comparing version 2.3.3-dev.202006260747 to 2.3.3-dev.202008280655
@@ -5,2 +5,2 @@ /**----------------------------------------------------------------------------------------- | ||
*-------------------------------------------------------------------------------------------*/ | ||
System.register("@progress/kendo-angular-label",["tslib","@angular/core","@progress/kendo-angular-common","@angular/common","rxjs","@angular/forms","rxjs/operators"],function(c){var r,a,s,l,u,d,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){p=t(e)}],execute:function(){function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i;i={},o.m=n=[function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"MessageService",function(){return a}),n.d(t,"ComponentMessages",function(){return s}),n.d(t,"L10N_PREFIX",function(){return c}),n.d(t,"LocalizationService",function(){return u}),n.d(t,"RTL",function(){return l});var o=n(0),i=n(3),r=n(6),a=(f.prototype.notify=function(e){this.changes.next({rtl:e})},f.prototype.get=function(e){},f.decorators=[{type:o.Injectable}],f),s=(Object.defineProperty(p.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(t){this.register(t),Object.keys(t).some(function(e){return!t[e].isFirstChange()})&&this.service.notifyChanges()},p.prototype.ngOnInit=function(){var e=this;this.subscription=this.service.changes.pipe(Object(r.skip)(1)).subscribe(function(){return e.register(e)})},p.prototype.register=function(e){var t=this;Object.keys(e).forEach(function(e){return t.service.register(e,t[e],t.override)})},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p),l=new o.InjectionToken("Kendo UI Right-to-Left token"),c=new o.InjectionToken("Localization key prefix"),u=(Object.defineProperty(d.prototype,"rtl",{get:function(){return this._rtl},enumerable:!0,configurable:!0}),d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.get=function(e){var t=this.key(e);return this.dictionary[t]},d.prototype.register=function(e,t,n){void 0===n&&(n=!1);var o=this.key(e),i=t;if(!n){if(this.dictionary.hasOwnProperty(o))return;i=this.defaultValue(o,t)}this.dictionary[o]=i},d.prototype.notifyChanges=function(){this.changes.next({rtl:this.rtl})},d.prototype.key=function(e){return this.prefix+"."+e},d.prototype.defaultValue=function(e,t){if(!this.messageService)return t;var n=this.messageService.get(e);return void 0===n?t:n},d.decorators=[{type:o.Injectable}],d.ctorParameters=function(){return[{type:String,decorators:[{type:o.Inject,args:[c]}]},{type:a,decorators:[{type:o.Optional}]},{type:Boolean,decorators:[{type:o.Optional},{type:o.Inject,args:[l]}]}]},d);function d(e,t,n){var o=this;this.prefix=e,this.messageService=t,this._rtl=n,this.changes=new i.BehaviorSubject({rtl:this._rtl}),this.dictionary={},t&&(this.subscription=t.changes.pipe(Object(r.map)(function(e){var t=e.rtl;return void 0!==t?t:o._rtl}),Object(r.tap)(function(e){return o._rtl=e})).subscribe(function(e){o.dictionary={},o.changes.next({rtl:e})}))}function p(){}function f(){this.changes=new i.Subject}},function(e,t){e.exports=u},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(14),r=n(0),a=n(4),s=(Object.defineProperty(l.prototype,"labelFor",{get:function(){if("string"==typeof this.for)return this.for;if(!a.isDocumentAvailable())return null;var e=this.getFocusableComponent()||{};return e.focusableId||e.id||null},enumerable:!0,configurable:!0}),l.prototype.ngAfterViewInit=function(){var e=this;this.setAriaLabelledby(),this.zone.runOutsideAngular(function(){return e.clickListener=e.renderer.listen(e.label.nativeElement,"click",e.handleClick)})},l.prototype.ngOnDestroy=function(){this.clickListener&&this.clickListener()},l.prototype.setAriaLabelledby=function(){if(a.isDocumentAvailable()){var e=this.getFocusableComponent();if(e&&e.focusableId){var t=i.getRootElement(this.label.nativeElement).querySelector("#"+e.focusableId);if(!t)return;var n=this.label.nativeElement,o=n.id||"k-"+a.guid();n.getAttribute("id")||this.renderer.setAttribute(n,"id",o),this.renderer.setAttribute(t,"aria-labelledby",o)}}},l.prototype.getFocusableComponent=function(){var e=this.for;return e&&void 0!==e.focus?e:null},o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"for",void 0),o.__decorate([r.HostBinding("attr.for"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],l.prototype,"labelFor",null),o.__decorate([r.HostBinding("class.k-label"),o.__metadata("design:type",Boolean)],l.prototype,"labelClass",void 0),o.__decorate([r.Directive({selector:"label[for]"}),o.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone])],l));function l(e,t,n){var o=this;this.label=e,this.renderer=t,this.zone=n,this.labelClass=!0,this.handleClick=function(){var e=o.getFocusableComponent();e&&(i.isUploadComponent(e)&&e.fileSelect.nativeElement.click(),e.focus&&e.focus(),i.shouldClickComponent(e,o.label.nativeElement)&&e.click())}}t.LabelDirective=s},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(3),a=n(2),s=n(4),l=n(5),c=n(14),u=(d.prototype.ngAfterContentInit=function(){if(this.for)this.control=this.for;else{var e=c.getNativeInputContent(this.elementRef.nativeElement);if(e)return e.hasAttribute("id")||this.renderer.setAttribute(e,"id","k-"+s.guid()),void(this.control=e);this.control=this.kendoInput}},d.prototype.ngOnInit=function(){var n=this;this.subscriptions.add(this.localization.changes.subscribe(function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))},d.prototype.ngAfterViewInit=function(){this.labelDirective.setAriaLabelledby()},d.prototype.ngOnDestroy=function(){this.subscriptions&&this.subscriptions.unsubscribe()},d.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([i.HostBinding("attr.dir"),o.__metadata("design:type",String)],d.prototype,"direction",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],d.prototype,"text",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"for",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],d.prototype,"optional",void 0),o.__decorate([i.ViewChild(l.LabelDirective,{static:!0}),o.__metadata("design:type",l.LabelDirective)],d.prototype,"labelDirective",void 0),o.__decorate([i.ContentChild(s.KendoInput,{static:!0}),o.__metadata("design:type",Object)],d.prototype,"kendoInput",void 0),o.__decorate([i.Component({selector:"kendo-label",exportAs:"kendoLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.label"}],template:'\n <ng-container kendoLabelLocalizedMessages\n i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"\n optional="Optional"\n >\n </ng-container>\n <label\n [for]="control"\n [class.k-label-empty]="!text">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n <ng-content></ng-content>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,i.Renderer2,a.LocalizationService])],d));function d(e,t,n){this.elementRef=e,this.renderer=t,this.localization=n,this.subscriptions=new r.Subscription,this.direction=n.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.LabelComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var i=n(1),r=n(0),a=n(2),s=n(16),l=n(4),c=n(15),u=(Object.defineProperty(d.prototype,"focusedClass",{get:function(){return this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"invalidClass",{get:function(){return this.invalid},enumerable:!0,configurable:!0}),d.prototype.ngAfterContentInit=function(){this.validateSetup();var e=new c.FloatingLabelInputAdapter(this.kendoInput||this.formControl.valueAccessor,this.formControl);this.addHandlers(e),this.setLabelFor(e)},d.prototype.ngAfterViewInit=function(){this.kendoInput&&this.setAriaLabelledby(this.kendoInput)},d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.textFor=function(e){return this.localization.get(e)},d.prototype.subscribe=function(e,t,n){var o;e[t]instanceof r.EventEmitter&&(o=e[t].subscribe(n),this.subscription?this.subscription.add(o):this.subscription=o)},d.prototype.updateState=function(){function e(e){return!(0===e||!1===e||(!Array.isArray(e)||e.length)&&e)}var t,n=this.formControl;n?(t=n.valueAccessor,o(t.isEmpty)?this.empty=t.isEmpty():this.empty=e(n.value),this.invalid=n.invalid&&(n.touched||n.dirty)):this.empty=o(this.kendoInput.isEmpty)?this.kendoInput.isEmpty():e(this.kendoInput.value),this.empty?this.renderer.addClass(this.elementRef.nativeElement,"k-state-empty"):this.renderer.removeClass(this.elementRef.nativeElement,"k-state-empty"),this.changeDetectorRef.markForCheck()},d.prototype.setAriaLabelledby=function(e){var t,n=e.focusableId||e.id;n&&(t=this.elementRef.nativeElement.querySelector("#"+n),this.renderer.setAttribute(t,"aria-labelledby",this.labelId))},d.prototype.setLabelFor=function(e){var t,n=e.focusableId||e.id;this.id&&n?this.id=n:this.id?e.focusableId=this.id:n?this.id=n:(t="k-"+l.guid(),e.focusableId=t,this.id=t)},d.prototype.handleAutofill=function(e){var t=this;this.subscribe(e,"autoFillStart",function(){t.autoFillStarted=!0,t.renderer.removeClass(t.elementRef.nativeElement,"k-state-empty")}),this.subscribe(e,"autoFillEnd",function(){t.autoFillStarted&&(t.autoFillStarted=!1,t.empty&&t.renderer.addClass(t.elementRef.nativeElement,"k-state-empty"))})},d.prototype.addHandlers=function(e){function t(e){return function(){n.focused=e,n.updateState()}}var n=this;function o(){return n.updateState()}this.subscribe(e,"onFocus",t(!0)),this.subscribe(e,"onBlur",t(!1)),this.handleAutofill(e),o(),this.subscribe(e,"onValueChange",o)},d.prototype.validateSetup=function(){if(!this.formControl&&!this.kendoInput&&r.isDevMode())throw new Error("The FloatingLabelComponent requires a Kendo Input component or a forms-bound component to function properly.")},i.__decorate([r.HostBinding("class.k-floating-label-container"),i.__metadata("design:type",Boolean)],d.prototype,"hostClasses",void 0),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],d.prototype,"focusedClass",null),i.__decorate([r.HostBinding("class.k-state-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],d.prototype,"invalidClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String)],d.prototype,"direction",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],d.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],d.prototype,"text",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],d.prototype,"optional",void 0),i.__decorate([r.ContentChild(l.KendoInput),i.__metadata("design:type",Object)],d.prototype,"kendoInput",void 0),i.__decorate([r.ContentChild(s.NgControl),i.__metadata("design:type",s.NgControl)],d.prototype,"formControl",void 0),i.__decorate([r.Component({selector:"kendo-floatinglabel",exportAs:"kendoFloatingLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.floatinglabel"}],template:'\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"\n optional="Optional"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf="text" [for]="id" [attr.id]="labelId" class="k-label">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.ChangeDetectorRef,a.LocalizationService])],d));function d(e,t,n,o){this.elementRef=e,this.renderer=t,this.changeDetectorRef=n,this.localization=o,this.hostClasses=!0,this.focused=!1,this.empty=!0,this.invalid=!1,this.labelId="k-"+l.guid(),this.autoFillStarted=!1,this.direction=o.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.FloatingLabelComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(10),a=n(13),s=[n(8).FloatingLabelComponent],l=o.__decorate([i.NgModule({declarations:s.slice(),exports:s.concat([a.SharedDirectivesModule]),imports:[r.CommonModule,a.SharedDirectivesModule]})],function(){});t.FloatingLabelModule=l},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),l=n(12),c=(o=l.Messages,r.__extends(u,o),i=u,Object.defineProperty(u.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),i=r.__decorate([a.Component({providers:[{provide:l.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"kendo-label-messages, kendo-floatinglabel-messages",template:""}),r.__metadata("design:paramtypes",[s.LocalizationService])],u));function u(e){var t=o.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(1),r=n(0),a=(o=n(2).ComponentMessages,i.__extends(s,o),i.__decorate([r.Input(),i.__metadata("design:type",String)],s.prototype,"optional",void 0),s);function s(){return null!==o&&o.apply(this,arguments)||this}t.Messages=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(17),a=n(11),s=[r.LocalizedMessagesDirective,a.CustomMessagesComponent],l=o.__decorate([i.NgModule({declarations:[s],exports:[s]})],function(){});t.SharedDirectivesModule=l},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isUploadComponent=function(e){return e.wrapper&&"KENDO-UPLOAD"===e.wrapper.tagName},n.getNativeInputContent=function(e){return e.querySelector("kendo-label > input, kendo-label > textarea, kendo-label > select")},n.isActiveCheckboxOrRadio=function(e){return e instanceof HTMLInputElement&&/^(checkbox|radio)$/.test(e.type)&&!e.hidden},n.isNestedOrAssociated=function(e,t){return e.parentElement===t||t.hasAttribute("for")},n.shouldClickComponent=function(e,t){return n.isActiveCheckboxOrRadio(e)&&!n.isNestedOrAssociated(e,t)},n.getRootElement=function(e){if(!e)return null;for(var t=e;t.parentElement;)t=t.parentElement;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(0),r=(Object.defineProperty(a.prototype,"focusableId",{get:function(){var e=this.component;return"focusableId"in e?e.focusableId:"id"in e?e.id:""},set:function(e){var t=this.component;"focusableId"in t?t.focusableId=e:"id"in t&&(t.id=e)},enumerable:!0,configurable:!0}),a);function a(e,t){function n(e){return e instanceof o.Observable||e instanceof i.EventEmitter}n((this.component=e).onFocus)&&(this.onFocus=e.onFocus),n(e.autoFillStart)&&(this.autoFillStart=e.autoFillStart),n(e.autoFillEnd)&&(this.autoFillEnd=e.autoFillEnd),n(e.onBlur)&&(this.onBlur=e.onBlur),t?this.onValueChange=t.valueChanges:e.onValueChange&&(this.onValueChange=e.onValueChange)}t.FloatingLabelInputAdapter=r},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),l=n(12),c=(o=l.Messages,r.__extends(u,o),i=u,i=r.__decorate([a.Directive({providers:[{provide:l.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n "}),r.__metadata("design:paramtypes",[s.LocalizationService])],u));function u(e){var t=o.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(13),r=n(10),a=n(0),s=n(9),l=n(5),c=n(7),u=[l.LabelDirective,c.LabelComponent],d=o.__decorate([a.NgModule({imports:[r.CommonModule,i.SharedDirectivesModule],declarations:u.slice(),exports:u.concat([s.FloatingLabelModule,i.SharedDirectivesModule])})],function(){});t.LabelModule=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.LabelDirective=o.LabelDirective;var i=n(18);t.LabelModule=i.LabelModule;var r=n(9);t.FloatingLabelModule=r.FloatingLabelModule;var a=n(8);t.FloatingLabelComponent=a.FloatingLabelComponent;var s=n(7);t.LabelComponent=s.LabelComponent;var l=n(11);t.CustomMessagesComponent=l.CustomMessagesComponent,function(e){for(var t in e)c(t,e[t])}(t)}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=19)}}}); | ||
System.register("@progress/kendo-angular-label",["tslib","@angular/core","@progress/kendo-angular-common","@angular/common","rxjs","@angular/forms","rxjs/operators"],function(c){var r,a,s,l,u,d,p;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){p=t(e)}],execute:function(){function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i;i={},o.m=n=[function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"MessageService",function(){return a}),n.d(t,"ComponentMessages",function(){return s}),n.d(t,"L10N_PREFIX",function(){return c}),n.d(t,"LocalizationService",function(){return u}),n.d(t,"RTL",function(){return l});var o=n(0),i=n(3),r=n(6),a=(f.prototype.notify=function(e){this.changes.next({rtl:e})},f.prototype.get=function(e){},f.decorators=[{type:o.Injectable}],f),s=(Object.defineProperty(p.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(t){this.register(t),Object.keys(t).some(function(e){return!t[e].isFirstChange()})&&this.service.notifyChanges()},p.prototype.ngOnInit=function(){var e=this;this.subscription=this.service.changes.pipe(Object(r.skip)(1)).subscribe(function(){return e.register(e)})},p.prototype.register=function(e){var t=this;Object.keys(e).forEach(function(e){return t.service.register(e,t[e],t.override)})},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p),l=new o.InjectionToken("Kendo UI Right-to-Left token"),c=new o.InjectionToken("Localization key prefix"),u=(Object.defineProperty(d.prototype,"rtl",{get:function(){return this._rtl},enumerable:!0,configurable:!0}),d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.get=function(e){var t=this.key(e);return this.dictionary[t]},d.prototype.register=function(e,t,n){void 0===n&&(n=!1);var o=this.key(e),i=t;if(!n){if(this.dictionary.hasOwnProperty(o))return;i=this.defaultValue(o,t)}this.dictionary[o]=i},d.prototype.notifyChanges=function(){this.changes.next({rtl:this.rtl})},d.prototype.key=function(e){return this.prefix+"."+e},d.prototype.defaultValue=function(e,t){if(!this.messageService)return t;var n=this.messageService.get(e);return void 0===n?t:n},d.decorators=[{type:o.Injectable}],d.ctorParameters=function(){return[{type:String,decorators:[{type:o.Inject,args:[c]}]},{type:a,decorators:[{type:o.Optional}]},{type:Boolean,decorators:[{type:o.Optional},{type:o.Inject,args:[l]}]}]},d);function d(e,t,n){var o=this;this.prefix=e,this.messageService=t,this._rtl=n,this.changes=new i.BehaviorSubject({rtl:this._rtl}),this.dictionary={},t&&(this.subscription=t.changes.pipe(Object(r.map)(function(e){var t=e.rtl;return void 0!==t?t:o._rtl}),Object(r.tap)(function(e){return o._rtl=e})).subscribe(function(e){o.dictionary={},o.changes.next({rtl:e})}))}function p(){}function f(){this.changes=new i.Subject}},function(e,t){e.exports=u},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(14),r=n(0),a=n(4),s=(Object.defineProperty(l.prototype,"labelFor",{get:function(){if("string"==typeof this.for)return this.for;if(!a.isDocumentAvailable())return null;var e=this.getFocusableComponent()||{};return e.focusableId||e.id||null},enumerable:!0,configurable:!0}),l.prototype.ngAfterViewInit=function(){var e=this;this.setAriaLabelledby(),this.zone.runOutsideAngular(function(){return e.clickListener=e.renderer.listen(e.label.nativeElement,"click",e.handleClick)})},l.prototype.ngOnDestroy=function(){this.clickListener&&this.clickListener()},l.prototype.setAriaLabelledby=function(){if(a.isDocumentAvailable()){var e=this.getFocusableComponent();if(e&&e.focusableId){var t=i.getRootElement(this.label.nativeElement).querySelector("#"+e.focusableId);if(!t)return;var n=this.label.nativeElement,o=n.id||"k-"+a.guid();n.getAttribute("id")||this.renderer.setAttribute(n,"id",o),this.renderer.setAttribute(t,"aria-labelledby",o)}}},l.prototype.getFocusableComponent=function(){var e=this.for;return e&&void 0!==e.focus?e:null},o.__decorate([r.Input(),o.__metadata("design:type",Object)],l.prototype,"for",void 0),o.__decorate([r.HostBinding("attr.for"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],l.prototype,"labelFor",null),o.__decorate([r.HostBinding("class.k-label"),o.__metadata("design:type",Boolean)],l.prototype,"labelClass",void 0),o.__decorate([r.Directive({selector:"label[for]"}),o.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone])],l));function l(e,t,n){var o=this;this.label=e,this.renderer=t,this.zone=n,this.labelClass=!0,this.handleClick=function(){var e=o.getFocusableComponent();e&&(i.isUploadComponent(e)&&e.fileSelect.nativeElement.click(),e.focus&&e.focus(),i.shouldClickComponent(e,o.label.nativeElement)&&e.click())}}t.LabelDirective=s},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(3),a=n(2),s=n(4),l=n(5),c=n(14),u=(d.prototype.ngAfterContentInit=function(){if(this.for)this.control=this.for;else{var e=c.getNativeInputContent(this.elementRef.nativeElement);if(e)return e.hasAttribute("id")||this.renderer.setAttribute(e,"id","k-"+s.guid()),void(this.control=e);this.control=this.kendoInput}},d.prototype.ngOnInit=function(){var n=this;this.subscriptions.add(this.localization.changes.subscribe(function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))},d.prototype.ngAfterViewInit=function(){this.labelDirective.setAriaLabelledby()},d.prototype.ngOnDestroy=function(){this.subscriptions&&this.subscriptions.unsubscribe()},d.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([i.HostBinding("attr.dir"),o.__metadata("design:type",String)],d.prototype,"direction",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],d.prototype,"text",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],d.prototype,"for",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],d.prototype,"optional",void 0),o.__decorate([i.ViewChild(l.LabelDirective,{static:!0}),o.__metadata("design:type",l.LabelDirective)],d.prototype,"labelDirective",void 0),o.__decorate([i.ContentChild(s.KendoInput,{static:!0}),o.__metadata("design:type",Object)],d.prototype,"kendoInput",void 0),o.__decorate([i.Component({selector:"kendo-label",exportAs:"kendoLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.label"}],template:'\n <ng-container kendoLabelLocalizedMessages\n i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"\n optional="Optional"\n >\n </ng-container>\n <label\n [for]="control"\n [class.k-label-empty]="!text">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n <ng-content></ng-content>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,i.Renderer2,a.LocalizationService])],d));function d(e,t,n){this.elementRef=e,this.renderer=t,this.localization=n,this.subscriptions=new r.Subscription,this.direction=n.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.LabelComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var i=n(1),r=n(0),a=n(2),s=n(16),l=n(4),c=n(15),u=(Object.defineProperty(d.prototype,"focusedClass",{get:function(){return this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"invalidClass",{get:function(){return this.invalid},enumerable:!0,configurable:!0}),d.prototype.ngAfterContentInit=function(){this.validateSetup();var e=new c.FloatingLabelInputAdapter(this.kendoInput||this.formControl.valueAccessor,this.formControl);this.addHandlers(e),this.setLabelFor(e)},d.prototype.ngAfterViewInit=function(){this.kendoInput&&this.setAriaLabelledby(this.kendoInput)},d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.textFor=function(e){return this.localization.get(e)},d.prototype.subscribe=function(e,t,n){var o;e[t]instanceof r.EventEmitter&&(o=e[t].subscribe(n),this.subscription?this.subscription.add(o):this.subscription=o)},d.prototype.updateState=function(){function e(e){return!(0===e||!1===e||(!Array.isArray(e)||e.length)&&e)}var t,n=this.formControl;n?(t=n.valueAccessor,o(t.isEmpty)?this.empty=t.isEmpty():this.empty=e(n.value),this.invalid=n.invalid&&(n.touched||n.dirty)):this.empty=o(this.kendoInput.isEmpty)?this.kendoInput.isEmpty():e(this.kendoInput.value),this.empty?this.renderer.addClass(this.elementRef.nativeElement,"k-state-empty"):this.renderer.removeClass(this.elementRef.nativeElement,"k-state-empty"),this.changeDetectorRef.markForCheck()},d.prototype.setAriaLabelledby=function(e){var t,n=e.focusableId||e.id;n&&(t=this.elementRef.nativeElement.querySelector("#"+n),this.renderer.setAttribute(t,"aria-labelledby",this.labelId))},d.prototype.setLabelFor=function(e){var t,n=e.focusableId||e.id;this.id&&n?this.id=n:this.id?e.focusableId=this.id:n?this.id=n:(t="k-"+l.guid(),e.focusableId=t,this.id=t)},d.prototype.handleAutofill=function(e){var t=this;this.subscribe(e,"autoFillStart",function(){t.autoFillStarted=!0,t.renderer.removeClass(t.elementRef.nativeElement,"k-state-empty")}),this.subscribe(e,"autoFillEnd",function(){t.autoFillStarted&&(t.autoFillStarted=!1,t.empty&&t.renderer.addClass(t.elementRef.nativeElement,"k-state-empty"))})},d.prototype.addHandlers=function(e){function t(e){return function(){n.focused=e,n.updateState()}}var n=this;this.subscribe(e,"onFocus",t(!0)),this.subscribe(e,"onBlur",t(!1)),this.handleAutofill(e);function o(){return n.updateState()}o(),this.subscribe(e,"onValueChange",o)},d.prototype.validateSetup=function(){if(!this.formControl&&!this.kendoInput&&r.isDevMode())throw new Error("The FloatingLabelComponent requires a Kendo Input component or a forms-bound component to function properly.")},i.__decorate([r.HostBinding("class.k-floating-label-container"),i.__metadata("design:type",Boolean)],d.prototype,"hostClasses",void 0),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],d.prototype,"focusedClass",null),i.__decorate([r.HostBinding("class.k-state-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],d.prototype,"invalidClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String)],d.prototype,"direction",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],d.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],d.prototype,"text",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],d.prototype,"optional",void 0),i.__decorate([r.ContentChild(l.KendoInput),i.__metadata("design:type",Object)],d.prototype,"kendoInput",void 0),i.__decorate([r.ContentChild(s.NgControl),i.__metadata("design:type",s.NgControl)],d.prototype,"formControl",void 0),i.__decorate([r.Component({selector:"kendo-floatinglabel",exportAs:"kendoFloatingLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.floatinglabel"}],template:'\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"\n optional="Optional"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf="text" [for]="id" [attr.id]="labelId" class="k-label">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.ChangeDetectorRef,a.LocalizationService])],d));function d(e,t,n,o){this.elementRef=e,this.renderer=t,this.changeDetectorRef=n,this.localization=o,this.hostClasses=!0,this.focused=!1,this.empty=!0,this.invalid=!1,this.labelId="k-"+l.guid(),this.autoFillStarted=!1,this.direction=o.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.FloatingLabelComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(10),a=n(13),s=[n(8).FloatingLabelComponent],l=o.__decorate([i.NgModule({declarations:s.slice(),exports:s.concat([a.SharedDirectivesModule]),imports:[r.CommonModule,a.SharedDirectivesModule]})],function(){});t.FloatingLabelModule=l},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),l=n(12),c=(o=l.Messages,r.__extends(u,o),i=u,Object.defineProperty(u.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),i=r.__decorate([a.Component({providers:[{provide:l.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"kendo-label-messages, kendo-floatinglabel-messages",template:""}),r.__metadata("design:paramtypes",[s.LocalizationService])],u));function u(e){var t=o.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(1),r=n(0),a=(o=n(2).ComponentMessages,i.__extends(s,o),i.__decorate([r.Input(),i.__metadata("design:type",String)],s.prototype,"optional",void 0),s);function s(){return null!==o&&o.apply(this,arguments)||this}t.Messages=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(17),a=n(11),s=[r.LocalizedMessagesDirective,a.CustomMessagesComponent],l=o.__decorate([i.NgModule({declarations:[s],exports:[s]})],function(){});t.SharedDirectivesModule=l},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isUploadComponent=function(e){return e.wrapper&&"KENDO-UPLOAD"===e.wrapper.tagName},n.getNativeInputContent=function(e){return e.querySelector("kendo-label > input, kendo-label > textarea, kendo-label > select")},n.isActiveCheckboxOrRadio=function(e){return e instanceof HTMLInputElement&&/^(checkbox|radio)$/.test(e.type)&&!e.hidden},n.isNestedOrAssociated=function(e,t){return e.parentElement===t||t.hasAttribute("for")},n.shouldClickComponent=function(e,t){return n.isActiveCheckboxOrRadio(e)&&!n.isNestedOrAssociated(e,t)},n.getRootElement=function(e){if(!e)return null;for(var t=e;t.parentElement;)t=t.parentElement;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(0),r=(Object.defineProperty(a.prototype,"focusableId",{get:function(){var e=this.component;return"focusableId"in e?e.focusableId:"id"in e?e.id:""},set:function(e){var t=this.component;"focusableId"in t?t.focusableId=e:"id"in t&&(t.id=e)},enumerable:!0,configurable:!0}),a);function a(e,t){function n(e){return e instanceof o.Observable||e instanceof i.EventEmitter}n((this.component=e).onFocus)&&(this.onFocus=e.onFocus),n(e.autoFillStart)&&(this.autoFillStart=e.autoFillStart),n(e.autoFillEnd)&&(this.autoFillEnd=e.autoFillEnd),n(e.onBlur)&&(this.onBlur=e.onBlur),t?this.onValueChange=t.valueChanges:e.onValueChange&&(this.onValueChange=e.onValueChange)}t.FloatingLabelInputAdapter=r},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),l=n(12),c=(o=l.Messages,r.__extends(u,o),i=u,i=r.__decorate([a.Directive({providers:[{provide:l.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n "}),r.__metadata("design:paramtypes",[s.LocalizationService])],u));function u(e){var t=o.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(13),r=n(10),a=n(0),s=n(9),l=n(5),c=n(7),u=[l.LabelDirective,c.LabelComponent],d=o.__decorate([a.NgModule({imports:[r.CommonModule,i.SharedDirectivesModule],declarations:u.slice(),exports:u.concat([s.FloatingLabelModule,i.SharedDirectivesModule])})],function(){});t.LabelModule=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.LabelDirective=o.LabelDirective;var i=n(18);t.LabelModule=i.LabelModule;var r=n(9);t.FloatingLabelModule=r.FloatingLabelModule;var a=n(8);t.FloatingLabelComponent=a.FloatingLabelComponent;var s=n(7);t.LabelComponent=s.LabelComponent;var l=n(11);t.CustomMessagesComponent=l.CustomMessagesComponent,function(e){for(var t in e)c(t,e[t])}(t)}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=19)}}}); |
@@ -6,3 +6,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"version": "2.3.3-dev.202006260747", | ||
"version": "2.3.3-dev.202008280655", | ||
"main": "dist/npm/index.js", | ||
@@ -73,3 +73,5 @@ "module": "dist/fesm5/index.js", | ||
"@progress/kendo-drawing": "^1.6.0", | ||
"@progress/kendo-theme-default": "^4.9.0", | ||
"@progress/kendo-theme-bootstrap": "^4.19.0", | ||
"@progress/kendo-theme-default": "^4.21.0", | ||
"@progress/kendo-theme-material": "^3.18.0", | ||
"@progress/kendo-angular-upload": "latest", | ||
@@ -139,3 +141,3 @@ "@telerik/semantic-prerelease": "^1.0.0", | ||
"analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits", | ||
"generateNotes": "@telerik/semantic-prerelease/generateNotes", | ||
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes", | ||
"getLastRelease": "@telerik/semantic-prerelease/getLastRelease", | ||
@@ -142,0 +144,0 @@ "verifyConditions": "@telerik/semantic-prerelease/verifyConditions", |
286201
47