HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-5EPGQ54I.js
import{a as X,h as Z,m as ee,y as te}from"./chunk-7PPOABPU.js";import{a as Q}from"./chunk-ILLDEPHH.js";import{Ac as E,Bd as q,Eb as O,Ec as F,Hc as K,Hd as J,Kb as N,Mb as v,Nb as w,Pb as C,Qb as x,Rb as S,Sb as f,Sc as z,Tb as o,Ub as s,Vb as y,ab as L,ac as h,cc as _,dd as G,ea as B,ec as d,fa as D,fb as m,ga as $,kb as M,oc as P,pa as u,pc as W,qa as g,qc as H,sb as U,tc as l,uc as A,vc as b,vd as Y,yb as R,yc as T,zb as j,zc as k}from"./chunk-AQ27DSQO.js";import"./chunk-EQDQRRRY.js";var oe=(r,i)=>({index:r,value:i});function se(r,i){if(r&1&&l(0),r&2){let a=i.value,e=i.index;A(e<a?"\u2605":"\u2606")}}function le(r,i){}function ce(r,i){if(r&1){let a=h();o(0,"span",3),l(1),s(),o(2,"span",4),_("mouseenter",function(){let t=u(a).index,n=d();return g(n.enter(t+1))})("click",function(){let t=u(a).index,n=d();return g(n.rate(t+1))}),O(3,le,0,0,"ng-template",5),s()}if(r&2){let a=i.$implicit,e=i.index,t=d(),n=P(2);m(),b("(",e<t.value?"*":" ",")"),m(),W("cursor",t.readonly?"default":"pointer"),H("active",e<t.value),f("title",a.title),m(),f("ngTemplateOutlet",t.customTemplate||n)("ngTemplateOutletContext",K(8,oe,e,t.value))}}var V=(()=>{let i=class i{constructor(){this.ariaLabel="rating"}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=D({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})(),me={provide:X,useExisting:B(()=>I),multi:!0},I=(()=>{let i=class i{constructor(e,t){this.changeDetection=e,this.max=5,this.readonly=!1,this.titles=[],this.onHover=new M,this.onLeave=new M,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.ariaLabel="rating",this.range=[],this.value=0,Object.assign(this,t)}onKeydown(e){if([37,38,39,40].indexOf(e.which)===-1)return;e.preventDefault(),e.stopPropagation();let t=e.which===38||e.which===39?1:-1;this.rate(this.value+t)}ngOnInit(){this.max=this.max||5,this.titles=typeof this.titles<"u"&&this.titles.length>0?this.titles:[],this.range=this.buildTemplateObjects(this.max)}writeValue(e){if(e%1!==e){this.value=Math.round(e),this.preValue=e,this.changeDetection.markForCheck();return}this.preValue=e,this.value=e,this.changeDetection.markForCheck()}enter(e){this.readonly||(this.value=e,this.changeDetection.markForCheck(),this.onHover.emit(e))}reset(){typeof this.preValue=="number"&&(this.value=Math.round(this.preValue),this.changeDetection.markForCheck(),this.onLeave.emit(this.value))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}rate(e){!this.readonly&&this.range&&e>=0&&e<=this.range.length&&(this.writeValue(e),this.onChange(e))}buildTemplateObjects(e){let t=[];for(let n=0;n<e;n++)t.push({index:n,title:this.titles[n]||n+1});return t}};i.\u0275fac=function(t){return new(t||i)(U(G),U(V))},i.\u0275cmp=R({type:i,selectors:[["rating"]],hostBindings:function(t,n){t&1&&_("keydown",function(c){return n.onKeydown(c)})},inputs:{max:"max",readonly:"readonly",titles:"titles",customTemplate:"customTemplate"},outputs:{onHover:"onHover",onLeave:"onLeave"},features:[F([me])],decls:4,vars:4,consts:[["star",""],["tabindex","0","role","slider","aria-valuemin","0",3,"mouseleave","keydown"],["ngFor","",3,"ngForOf"],[1,"sr-only","visually-hidden"],[1,"bs-rating-star",3,"mouseenter","click","title"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,n){if(t&1){let p=h();o(0,"span",1),_("mouseleave",function(){return u(p),g(n.reset())})("keydown",function(ae){return u(p),g(n.onKeydown(ae))}),O(1,se,1,1,"ng-template",null,0,z)(3,ce,4,11,"ng-template",2),s()}t&2&&(N("aria-label",n.ariaLabel)("aria-valuemax",n.range.length)("aria-valuenow",n.value),m(3),f("ngForOf",n.range))},dependencies:[Y,q],encapsulation:2,changeDetection:0});let r=i;return r})(),ie=(()=>{let i=class i{static forRoot(){return{ngModule:i,providers:[]}}};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=j({type:i}),i.\u0275inj=$({});let r=i;return r})();function pe(r,i){if(r&1){let a=h();o(0,"img",31),_("click",function(){u(a);let t=d(),n=t.$implicit,p=t.$index,c=d();return g(c.clickBasicStar(n,p,c.halfRatingStar))}),s()}}function ue(r,i){if(r&1){let a=h();o(0,"img",32),_("click",function(){u(a);let t=d(),n=t.$implicit,p=t.$index,c=d();return g(c.clickBasicStar(n,p,c.halfRatingStar))}),s()}}function ge(r,i){r&1&&y(0,"img",30)}function _e(r,i){if(r&1&&(v(0,pe,1,0,"img",28),v(1,ue,1,0,"img",29),v(2,ge,1,0,"img",30)),r&2){let a=i.$implicit;w(a.show===!1&&a.half===!1?0:-1),m(),w(a.show===!0?1:-1),m(),w(a.half===!0?2:-1)}}function fe(r,i){if(r&1){let a=h();o(0,"img",33),_("click",function(){let t=u(a),n=t.$implicit,p=t.$index,c=d();return g(c.clickBasicStar(n,p,c.maxStar))})("mouseover",function(){let t=u(a).$index,n=d();return g(n.hoverStar(t,n.maxStar))})("mouseout",function(){u(a);let t=d();return g(t.hoverStar(-1,t.maxStar))}),s()}if(r&2){let a=i.$implicit;f("src",a.show?"assets/img/ratings/star-on.png":"assets/img/ratings/star-off.png",L)}}function he(r,i){r&1&&y(0,"img",28)}function ve(r,i){r&1&&y(0,"img",29)}function we(r,i){if(r&1&&(v(0,he,1,0,"img",28),v(1,ve,1,0,"img",29)),r&2){let a=i.$implicit;w(a.show===!1?0:-1),m(),w(a.show===!0?1:-1)}}function Ce(r,i){if(r&1){let a=h();o(0,"img",31),_("click",function(){u(a);let t=d(),n=t.$implicit,p=t.$index,c=d();return g(c.clickBasicStar(n,p,c.savedStar))}),s()}}function xe(r,i){if(r&1){let a=h();o(0,"img",32),_("click",function(){u(a);let t=d(),n=t.$implicit,p=t.$index,c=d();return g(c.clickBasicStar(n,p,c.savedStar))}),s()}}function Se(r,i){if(r&1&&(v(0,Ce,1,0,"img",28),v(1,xe,1,0,"img",29)),r&2){let a=i.$implicit;w(a.show===!1?0:-1),m(),w(a.show===!0?1:-1)}}function ye(){return Object.assign(new V,{ariaLabel:"My Rating"})}var ne=class r{routes=Q;max=5;rate=3;basicStar=[{show:!1},{show:!1},{show:!1},{show:!1},{show:!1}];basicStar1=[{show:!1},{show:!1},{show:!1},{show:!1},{show:!1}];savedStar=[{show:!0},{show:!0},{show:!0},{show:!1},{show:!1}];maxStar=[{show:!1},{show:!1},{show:!1},{show:!1},{show:!1}];readOnlyStar=[{show:!0},{show:!0},{show:!0},{show:!0},{show:!0},{show:!0},{show:!1},{show:!1},{show:!1},{show:!1}];halfRatingStar=[{show:!0,half:!1},{show:!0,half:!1},{show:!1,half:!0},{show:!1,half:!1},{show:!1,half:!1}];heartIcon=[{show:!1},{show:!1},{show:!1},{show:!1},{show:!1}];clickBasicStar(i,a,e){i.show==!1?e.map((t,n)=>{n<=a&&(t.show=!0)}):e.map((t,n)=>{n>=a&&n!=0&&(t.show=!1)}),e===this.halfRatingStar&&e.map(t=>{t.half=!1})}clickBasicStar1(i,a,e){i.show==!1?e.map((t,n)=>{n<=a&&(t.show=!0)}):e.map((t,n)=>{n>=a&&n!=0&&(t.show=!1)}),this.increaseRating(),e===this.halfRatingStar&&e.map(t=>{t.half=!1})}liveRating=1;increaseRating(){this.liveRating++}resetStars(){this.heartIcon.forEach(i=>{i.show=!1})}hoverStar1(i,a,e){let t=e[a];t&&t.half&&(t.hover=i)}hoverStar(i,a){for(let e=0;e<=i;e++)a[e]&&(a[e].show=!0);for(let e=i+1;e<a.length;e++)a[e]&&(a[e].show=!1)}breadCrumbItems;readonly=!1;defaultSelect=3;currentRate=2;customColor=4;hoverSelect=2;hovered=0;clearRate=2;constructor(){}ngOnInit(){this.breadCrumbItems=[{label:"Advance UI"},{label:"Ratings",active:!0}]}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=R({type:r,selectors:[["app-ui-rating"]],features:[F([{provide:V,useFactory:ye}])],decls:97,vars:7,consts:[[1,"cardhead"],[1,"page-header"],[1,"row"],[1,"col-sm-12"],[1,"page-title"],[1,"col-xxl-4","col-xl-6"],[1,"card","custom-card"],[1,"card-header"],[1,"card-title"],[1,"card-body"],[1,"d-flex","flex-wrap","align-items-center","justify-content-between"],[1,"fs-14","mb-0","fw-semibold"],[1,"text-danger"],["id","rater-basic"],[3,"ngModelChange","ngModel","max"],["id","rater-steps"],[1,"col-xxl-4","col-xl-12"],["id","custom-messages"],[1,"me-1",3,"src"],[1,"col-xxl-6","col-xl-6"],["id","stars-unlimited"],["id","stars-busytext"],[1,"d-flex","flex-wrap","align-items-center"],["id","stars-hover"],[1,"live-rating","badge","bg-success-transparent","ms-3",3,"click"],["id","rater-reset"],["id","rater-reset-button","data-bs-toggle","tooltip","data-bs-placement","top","data-bs-title","Reset",1,"btn","btn-icon","btn-sm","btn-danger-light","ms-3",3,"click"],[1,"feather","icon-rotate-cw","feather-16"],["src","assets/img/ratings/star-off.png",1,"me-1"],["src","assets/img/ratings/star-on.png",1,"me-1"],["src","assets/img/ratings/star-half.png"],["src","assets/img/ratings/star-off.png",1,"me-1",3,"click"],["src","assets/img/ratings/star-on.png",1,"me-1",3,"click"],[1,"me-1",3,"click","mouseover","mouseout","src"]],template:function(a,e){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),l(5,"Rating"),s()()()(),o(6,"div",2)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8),l(11," Basic Rater "),s()(),o(12,"div",9)(13,"div",10)(14,"p",11),l(15,"Show Some "),o(16,"span",12),l(17,"\u2764"),s(),l(18," with rating :"),s(),o(19,"div",13)(20,"rating",14),E("ngModelChange",function(n){return k(e.rate,n)||(e.rate=n),n}),s()()()()()(),o(21,"div",5)(22,"div",6)(23,"div",7)(24,"div",8),l(25," 5 star rater with steps "),s()(),o(26,"div",9)(27,"div",10)(28,"p",11),l(29,"Dont forget to rate the product :"),s(),o(30,"div",15),x(31,_e,3,3,null,null,C),s()()()()(),o(33,"div",16)(34,"div",6)(35,"div",7)(36,"div",8),l(37," Custom messages "),s()(),o(38,"div",9)(39,"div",10)(40,"p",11),l(41,"Your rating is much appreciated:"),s(),o(42,"div",17),x(43,fe,1,1,"img",18,C),s()()()()(),o(45,"div",19)(46,"div",6)(47,"div",7)(48,"div",8),l(49," Unlimited number of stars readOnly "),s()(),o(50,"div",9)(51,"div",10)(52,"p",11),l(53,"Thanks for rating :"),s(),o(54,"div",20),x(55,we,2,2,null,null,C),s()()()()(),o(57,"div",19)(58,"div",6)(59,"div",7)(60,"div",8),l(61," 5 Star rater with custom isBusyText and simulated backend "),s()(),o(62,"div",9)(63,"div",10)(64,"p",11),l(65,"Thanks for rating :"),s(),o(66,"div",21),x(67,Se,2,2,null,null,C),s()()()()(),o(69,"div",5)(70,"div",6)(71,"div",7)(72,"div",8),l(73," On hover event "),s()(),o(74,"div",9)(75,"div",10)(76,"p",11),l(77,"Please give your valuable rating :"),s(),o(78,"div",22)(79,"div",23)(80,"rating",14),E("ngModelChange",function(n){return k(e.rate,n)||(e.rate=n),n}),s()(),o(81,"span",24),_("click",function(){return e.increaseRating()}),l(82),s()()()()()(),o(83,"div",5)(84,"div",6)(85,"div",7)(86,"div",8),l(87," Clear/reset rater "),s()(),o(88,"div",9)(89,"div",10)(90,"p",11),l(91,"Thank You so much for your support :"),s(),o(92,"div",22)(93,"div",25)(94,"rating",14),E("ngModelChange",function(n){return k(e.rate,n)||(e.rate=n),n}),s()(),o(95,"button",26),_("click",function(){return e.clearRate=0}),y(96,"i",27),s()()()()()()()()),a&2&&(m(20),T("ngModel",e.rate),f("max",e.max),m(11),S(e.halfRatingStar),m(12),S(e.maxStar),m(12),S(e.readOnlyStar),m(12),S(e.savedStar),m(13),T("ngModel",e.rate),f("max",e.max),m(2),b(" ",e.hovered," "),m(12),T("ngModel",e.rate),f("max",e.max))},dependencies:[ie,I,te,Z,ee,J],styles:[".bs-rating-star[_ngcontent-%COMP%]{font-size:35px!important}"]})};export{ne as UiRatingComponent,ye as getRatingConfig};