diff --git a/docs/206.5f6cceda7dde340a.js b/docs/206.5f6cceda7dde340a.js deleted file mode 100644 index 65d2254..0000000 --- a/docs/206.5f6cceda7dde340a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkAppForm=self.webpackChunkAppForm||[]).push([[206],{7206:(G,m,i)=>{i.r(m),i.d(m,{AuthModule:()=>X});var c=i(6814),h=i(1643),a=i(95),p=i(5592),A=i(7394);class y extends A.w0{constructor(t,s){super()}schedule(t,s=0){return this}}const d={setInterval(r,t,...s){const{delegate:n}=d;return n?.setInterval?n.setInterval(r,t,...s):setInterval(r,t,...s)},clearInterval(r){const{delegate:t}=d;return(t?.clearInterval||clearInterval)(r)},delegate:void 0};var T=i(9039);const f={now:()=>(f.delegate||Date).now(),delegate:void 0};class u{constructor(t,s=u.now){this.schedulerActionCtor=t,this.now=s}schedule(t,s=0,n){return new this.schedulerActionCtor(this,t).schedule(n,s)}}u.now=f.now;const g=new class U extends u{constructor(t,s=u.now){super(t,s),this.actions=[],this._active=!1}flush(t){const{actions:s}=this;if(this._active)return void s.push(t);let n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=s.shift());if(this._active=!1,n){for(;t=s.shift();)t.unsubscribe();throw n}}}(class F extends y{constructor(t,s){super(t,s),this.scheduler=t,this.work=s,this.pending=!1}schedule(t,s=0){var n;if(this.closed)return this;this.state=t;const o=this.id,l=this.scheduler;return null!=o&&(this.id=this.recycleAsyncId(l,o,s)),this.pending=!0,this.delay=s,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(l,this.id,s),this}requestAsyncId(t,s,n=0){return d.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,s,n=0){if(null!=n&&this.delay===n&&!1===this.pending)return s;null!=s&&d.clearInterval(s)}execute(t,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,s);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,s){let o,n=!1;try{this.work(t)}catch(l){n=!0,o=l||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){const{id:t,scheduler:s}=this,{actions:n}=s;this.work=this.state=this.scheduler=null,this.pending=!1,(0,T.P)(n,this),null!=t&&(this.id=this.recycleAsyncId(s,t,null)),this.delay=null,super.unsubscribe()}}}),q=g;var I=i(5211),Z=i(8180),w=i(9360),C=i(8251),x=i(2420),S=i(975),b=i(1631),P=i(4829);function v(r,t){return t?s=>(0,I.z)(t.pipe((0,Z.q)(1),function N(){return(0,w.e)((r,t)=>{r.subscribe((0,C.x)(t,x.Z))})}()),s.pipe(v(r))):(0,b.z)((s,n)=>(0,P.Xf)(r(s,n)).pipe((0,Z.q)(1),(0,S.h)(s)))}var j=i(671);var e=i(4946);let V=(()=>{class r{validate(s){const n=s.value;return new p.y(l=>{if(console.log({email:n}),"luis@luis.com"===n)return l.next({emailTaken:!0}),void l.complete();l.next(null),l.complete()}).pipe(function R(r,t=g){const s=function J(r=0,t,s=q){let n=-1;return null!=t&&((0,j.K)(t)?s=t:n=t),new p.y(o=>{let l=function L(r){return r instanceof Date&&!isNaN(r)}(r)?+r-s.now():r;l<0&&(l=0);let k=0;return s.schedule(function(){o.closed||(o.next(k++),0<=n?this.schedule(void 0,n):o.complete())},l)})}(r,t);return v(()=>s)}(2e3))}static#e=this.\u0275fac=function(n){return new(n||r)};static#t=this.\u0275prov=e.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Y=i(1772);function E(r,t){1&r&&(e.TgZ(0,"span",13),e._uU(1," Debe de ser en formato de nombre y apellido "),e.qZA())}function O(r,t){1&r&&(e.TgZ(0,"span",13),e._uU(1," mensaje de error del email "),e.qZA())}function B(r,t){1&r&&(e.TgZ(0,"span",13),e._uU(1," El username no puede ser Strider "),e.qZA())}function z(r,t){1&r&&(e.TgZ(0,"span",13),e._uU(1," La contrase\xf1a debe de ser mayor de 6 caracteres. "),e.qZA())}function Q(r,t){1&r&&(e.TgZ(0,"span",13),e._uU(1," Las contrase\xf1as deben de ser iguales "),e.qZA())}const M=[{path:"",children:[{path:"login",component:(()=>{class r{constructor(s,n){this.formBuilder=s,this.validatorsService=n,this.myForm=this.formBuilder.group({name:["",[a.kI.required,a.kI.pattern(this.validatorsService.firstNameAndLastnamePattern)],[new V]],email:["",[a.kI.required,a.kI.pattern(this.validatorsService.emailPattern)]],userName:["",[a.kI.required,this.validatorsService.cantBeStrider]],password:["",[a.kI.required,a.kI.minLength(6)]],password2:["",[a.kI.required]]},{validators:[this.validatorsService.isFieldsEquals("password","password2")]})}isValidField(s){return this.validatorsService.isValidField(this.myForm,s)}onSubmit(){this.myForm.markAllAsTouched()}static#e=this.\u0275fac=function(n){return new(n||r)(e.Y36(a.qu),e.Y36(Y.S))};static#t=this.\u0275cmp=e.Xpm({type:r,selectors:[["app-register-page"]],decls:79,vars:33,consts:[[1,"row"],[1,"col"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"row","mb-3"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["type","text","placeholder","Nombre del usuario","formControlName","name",1,"form-control"],["class","form-text text-danger",4,"ngIf"],["type","email","placeholder","Email del usuario","formControlName","email",1,"form-control"],["type","text","placeholder","Nombre c\xf3digo del usuario","formControlName","userName",1,"form-control"],["type","password","placeholder","Password de su cuenta","formControlName","password",1,"form-control"],["type","password","placeholder","Confirmar la contrase\xf1a","formControlName","password2",1,"form-control"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"]],template:function(n,o){1&n&&(e.TgZ(0,"h2"),e._uU(1,"Validaciones Reactivas"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"div",0)(4,"div",1)(5,"form",2),e.NdJ("ngSubmit",function(){return o.onSubmit()}),e.TgZ(6,"div",3)(7,"label",4),e._uU(8,"Nombre"),e.qZA(),e.TgZ(9,"div",5),e._UZ(10,"input",6),e.YNc(11,E,2,0,"span",7),e.qZA()(),e.TgZ(12,"div",3)(13,"label",4),e._uU(14,"Email"),e.qZA(),e.TgZ(15,"div",5),e._UZ(16,"input",8),e.YNc(17,O,2,0,"span",7),e.qZA()(),e.TgZ(18,"div",3)(19,"label",4),e._uU(20,"Username"),e.qZA(),e.TgZ(21,"div",5),e._UZ(22,"input",9),e.YNc(23,B,2,0,"span",7),e.qZA()(),e.TgZ(24,"div",3)(25,"label",4),e._uU(26,"Password"),e.qZA(),e.TgZ(27,"div",5),e._UZ(28,"input",10),e.YNc(29,z,2,0,"span",7),e.qZA()(),e.TgZ(30,"div",3)(31,"label",4),e._uU(32,"Confirmar"),e.qZA(),e.TgZ(33,"div",5),e._UZ(34,"input",11),e.YNc(35,Q,2,0,"span",7),e.qZA()(),e.TgZ(36,"div",0)(37,"div",1)(38,"button",12),e._uU(39," Crear "),e.qZA()()()()()(),e.TgZ(40,"h2"),e._uU(41),e.ALo(42,"json"),e.qZA(),e.TgZ(43,"h2"),e._uU(44),e.ALo(45,"json"),e.qZA(),e.TgZ(46,"h2"),e._uU(47),e.ALo(48,"json"),e.qZA(),e.TgZ(49,"h2"),e._uU(50,"Form errors:"),e.qZA(),e.TgZ(51,"pre"),e._uU(52),e.ALo(53,"json"),e.qZA(),e.TgZ(54,"h5"),e._uU(55,"Nombre"),e.qZA(),e.TgZ(56,"pre"),e._uU(57),e.ALo(58,"json"),e.qZA(),e.TgZ(59,"h5"),e._uU(60,"Email"),e.qZA(),e.TgZ(61,"pre"),e._uU(62),e.ALo(63,"json"),e.qZA(),e.TgZ(64,"h5"),e._uU(65,"Username"),e.qZA(),e.TgZ(66,"pre"),e._uU(67),e.ALo(68,"json"),e.qZA(),e.TgZ(69,"h5"),e._uU(70,"Password"),e.qZA(),e.TgZ(71,"pre"),e._uU(72),e.ALo(73,"json"),e.qZA(),e.TgZ(74,"h5"),e._uU(75,"Confirmar"),e.qZA(),e.TgZ(76,"pre"),e._uU(77),e.ALo(78,"json"),e.qZA()),2&n&&(e.xp6(5),e.Q6J("formGroup",o.myForm),e.xp6(6),e.Q6J("ngIf",o.isValidField("name")),e.xp6(6),e.Q6J("ngIf",o.isValidField("email")),e.xp6(6),e.Q6J("ngIf",o.isValidField("userName")),e.xp6(6),e.Q6J("ngIf",o.isValidField("password")),e.xp6(6),e.Q6J("ngIf",o.isValidField("password2")),e.xp6(6),e.hij("Form Valid: ",e.lcZ(42,15,o.myForm.valid),""),e.xp6(3),e.hij("Form Status: ",e.lcZ(45,17,o.myForm.status)," "),e.xp6(3),e.hij("Form Pending: ",e.lcZ(48,19,o.myForm.pending)," "),e.xp6(5),e.Oqu(e.lcZ(53,21,o.myForm.errors)),e.xp6(5),e.Oqu(e.lcZ(58,23,o.myForm.value.name)),e.xp6(5),e.Oqu(e.lcZ(63,25,o.myForm.value.email)),e.xp6(5),e.Oqu(e.lcZ(68,27,o.myForm.controls.userName.errors)),e.xp6(5),e.Oqu(e.lcZ(73,29,o.myForm.value.password)),e.xp6(5),e.Oqu(e.lcZ(78,31,o.myForm.controls.password2.errors)))},dependencies:[c.O5,a._Y,a.Fj,a.JJ,a.JL,a.sg,a.u,c.Ts],encapsulation:2})}return r})()},{path:"**",redirectTo:"login"}]}];let D=(()=>{class r{static#e=this.\u0275fac=function(n){return new(n||r)};static#t=this.\u0275mod=e.oAB({type:r});static#s=this.\u0275inj=e.cJS({imports:[h.Bz.forChild(M),h.Bz]})}return r})(),X=(()=>{class r{static#e=this.\u0275fac=function(n){return new(n||r)};static#t=this.\u0275mod=e.oAB({type:r});static#s=this.\u0275inj=e.cJS({imports:[c.ez,D,a.UX]})}return r})()}}]); \ No newline at end of file diff --git a/docs/206.c9b2fabe8a11bf86.js b/docs/206.c9b2fabe8a11bf86.js new file mode 100644 index 0000000..c7f8d81 --- /dev/null +++ b/docs/206.c9b2fabe8a11bf86.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkAppForm=self.webpackChunkAppForm||[]).push([[206],{7206:(O,u,i)=>{i.r(u),i.d(u,{AuthModule:()=>k});var h=i(6814),m=i(1643),a=i(95),p=i(5592),Z=i(7394);class A extends Z.w0{constructor(t,s){super()}schedule(t,s=0){return this}}const c={setInterval(n,t,...s){const{delegate:r}=c;return r?.setInterval?r.setInterval(n,t,...s):setInterval(n,t,...s)},clearInterval(n){const{delegate:t}=c;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var I=i(9039);const f={now:()=>(f.delegate||Date).now(),delegate:void 0};class d{constructor(t,s=d.now){this.schedulerActionCtor=t,this.now=s}schedule(t,s=0,r){return new this.schedulerActionCtor(this,t).schedule(r,s)}}d.now=f.now;const v=new class w extends d{constructor(t,s=d.now){super(t,s),this.actions=[],this._active=!1}flush(t){const{actions:s}=this;if(this._active)return void s.push(t);let r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=s.shift());if(this._active=!1,r){for(;t=s.shift();)t.unsubscribe();throw r}}}(class T extends A{constructor(t,s){super(t,s),this.scheduler=t,this.work=s,this.pending=!1}schedule(t,s=0){var r;if(this.closed)return this;this.state=t;const o=this.id,l=this.scheduler;return null!=o&&(this.id=this.recycleAsyncId(l,o,s)),this.pending=!0,this.delay=s,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(l,this.id,s),this}requestAsyncId(t,s,r=0){return c.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,s,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return s;null!=s&&c.clearInterval(s)}execute(t,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,s);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,s){let o,r=!1;try{this.work(t)}catch(l){r=!0,o=l||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){const{id:t,scheduler:s}=this,{actions:r}=s;this.work=this.state=this.scheduler=null,this.pending=!1,(0,I.P)(r,this),null!=t&&(this.id=this.recycleAsyncId(s,t,null)),this.delay=null,super.unsubscribe()}}}),C=v;var F=i(5211),g=i(8180),x=i(9360),N=i(8251),U=i(2420),b=i(975),P=i(1631),J=i(4829);function y(n,t){return t?s=>(0,F.z)(t.pipe((0,g.q)(1),function S(){return(0,x.e)((n,t)=>{n.subscribe((0,N.x)(t,U.Z))})}()),s.pipe(y(n))):(0,P.z)((s,r)=>(0,J.Xf)(n(s,r)).pipe((0,g.q)(1),(0,b.h)(s)))}var R=i(671);var e=i(4946);let B=(()=>{class n{validate(s){const r=s.value;return new p.y(l=>{if(console.log({email:r}),"luis@luis.com"===r)return l.next({emailTaken:!0}),void l.complete();l.next(null),l.complete()}).pipe(function Y(n,t=v){const s=function V(n=0,t,s=C){let r=-1;return null!=t&&((0,R.K)(t)?s=t:r=t),new p.y(o=>{let l=function q(n){return n instanceof Date&&!isNaN(n)}(n)?+n-s.now():n;l<0&&(l=0);let G=0;return s.schedule(function(){o.closed||(o.next(G++),0<=r?this.schedule(void 0,r):o.complete())},l)})}(n,t);return y(()=>s)}(2e3))}static#e=this.\u0275fac=function(r){return new(r||n)};static#t=this.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var E=i(1772);function z(n,t){1&n&&(e.TgZ(0,"span",13),e._uU(1," Debe de ser en formato de nombre y apellido "),e.qZA())}function Q(n,t){1&n&&(e.TgZ(0,"span",13),e._uU(1," mensaje de error del email "),e.qZA())}function L(n,t){1&n&&(e.TgZ(0,"span",13),e._uU(1," El username no puede ser Strider "),e.qZA())}function j(n,t){1&n&&(e.TgZ(0,"span",13),e._uU(1," La contrase\xf1a debe de ser mayor de 6 caracteres. "),e.qZA())}function M(n,t){1&n&&(e.TgZ(0,"span",13),e._uU(1," Las contrase\xf1as deben de ser iguales "),e.qZA())}const D=[{path:"",children:[{path:"login",component:(()=>{class n{constructor(s,r){this.formBuilder=s,this.validatorsService=r,this.myForm=this.formBuilder.group({name:["",[a.kI.required,a.kI.pattern(this.validatorsService.firstNameAndLastnamePattern)],[new B]],email:["",[a.kI.required,a.kI.pattern(this.validatorsService.emailPattern)]],userName:["",[a.kI.required,this.validatorsService.cantBeStrider]],password:["",[a.kI.required,a.kI.minLength(6)]],password2:["",[a.kI.required]]},{validators:[this.validatorsService.isFieldsEquals("password","password2")]})}isValidField(s){return this.validatorsService.isValidField(this.myForm,s)}onSubmit(){this.myForm.markAllAsTouched()}static#e=this.\u0275fac=function(r){return new(r||n)(e.Y36(a.qu),e.Y36(E.S))};static#t=this.\u0275cmp=e.Xpm({type:n,selectors:[["app-register-page"]],decls:40,vars:6,consts:[[1,"row"],[1,"col"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"row","mb-3"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["type","text","placeholder","Nombre del usuario","formControlName","name",1,"form-control"],["class","form-text text-danger",4,"ngIf"],["type","email","placeholder","Email del usuario","formControlName","email",1,"form-control"],["type","text","placeholder","Nombre c\xf3digo del usuario","formControlName","userName",1,"form-control"],["type","password","placeholder","Password de su cuenta","formControlName","password",1,"form-control"],["type","password","placeholder","Confirmar la contrase\xf1a","formControlName","password2",1,"form-control"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"]],template:function(r,o){1&r&&(e.TgZ(0,"h2"),e._uU(1,"Validaciones Reactivas"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"div",0)(4,"div",1)(5,"form",2),e.NdJ("ngSubmit",function(){return o.onSubmit()}),e.TgZ(6,"div",3)(7,"label",4),e._uU(8,"Nombre"),e.qZA(),e.TgZ(9,"div",5),e._UZ(10,"input",6),e.YNc(11,z,2,0,"span",7),e.qZA()(),e.TgZ(12,"div",3)(13,"label",4),e._uU(14,"Email"),e.qZA(),e.TgZ(15,"div",5),e._UZ(16,"input",8),e.YNc(17,Q,2,0,"span",7),e.qZA()(),e.TgZ(18,"div",3)(19,"label",4),e._uU(20,"Username"),e.qZA(),e.TgZ(21,"div",5),e._UZ(22,"input",9),e.YNc(23,L,2,0,"span",7),e.qZA()(),e.TgZ(24,"div",3)(25,"label",4),e._uU(26,"Password"),e.qZA(),e.TgZ(27,"div",5),e._UZ(28,"input",10),e.YNc(29,j,2,0,"span",7),e.qZA()(),e.TgZ(30,"div",3)(31,"label",4),e._uU(32,"Confirmar"),e.qZA(),e.TgZ(33,"div",5),e._UZ(34,"input",11),e.YNc(35,M,2,0,"span",7),e.qZA()(),e.TgZ(36,"div",0)(37,"div",1)(38,"button",12),e._uU(39," Crear "),e.qZA()()()()()()),2&r&&(e.xp6(5),e.Q6J("formGroup",o.myForm),e.xp6(6),e.Q6J("ngIf",o.isValidField("name")),e.xp6(6),e.Q6J("ngIf",o.isValidField("email")),e.xp6(6),e.Q6J("ngIf",o.isValidField("userName")),e.xp6(6),e.Q6J("ngIf",o.isValidField("password")),e.xp6(6),e.Q6J("ngIf",o.isValidField("password2")))},dependencies:[h.O5,a._Y,a.Fj,a.JJ,a.JL,a.sg,a.u],encapsulation:2})}return n})()},{path:"**",redirectTo:"login"}]}];let X=(()=>{class n{static#e=this.\u0275fac=function(r){return new(r||n)};static#t=this.\u0275mod=e.oAB({type:n});static#s=this.\u0275inj=e.cJS({imports:[m.Bz.forChild(D),m.Bz]})}return n})(),k=(()=>{class n{static#e=this.\u0275fac=function(r){return new(r||n)};static#t=this.\u0275mod=e.oAB({type:n});static#s=this.\u0275inj=e.cJS({imports:[h.ez,X,a.UX]})}return n})()}}]); \ No newline at end of file diff --git a/docs/270.83f68e7b6134bfac.js b/docs/270.83f68e7b6134bfac.js deleted file mode 100644 index 91c26e9..0000000 --- a/docs/270.83f68e7b6134bfac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkAppForm=self.webpackChunkAppForm||[]).push([[270],{7270:(F,u,s)=>{s.r(u),s.d(u,{ReactiveModule:()=>b});var a=s(6814),p=s(1643),o=s(95),e=s(4946),l=s(1772);function d(r,m){if(1&r&&(e.TgZ(0,"span",11),e._uU(1),e.qZA()),2&r){const t=e.oxw();e.xp6(1),e.hij(" ",t.getError("name")," ")}}function Z(r,m){1&r&&(e.TgZ(0,"span",11),e._uU(1," El precio debe de ser 0 o mayor. "),e.qZA())}function g(r,m){1&r&&(e.TgZ(0,"span",11),e._uU(1," Las existencias deben de ser 0 o mayor "),e.qZA())}function h(r,m){if(1&r&&(e.TgZ(0,"span",14),e._uU(1),e.qZA()),2&r){const t=e.oxw();e.xp6(1),e.hij(" ",t.getError("name")," ")}}function _(r,m){1&r&&(e.TgZ(0,"span",14),e._uU(1," Este campo es requerido "),e.qZA())}function v(r,m){if(1&r){const t=e.EpF();e.TgZ(0,"div",15)(1,"div",6),e._UZ(2,"input",16),e.TgZ(3,"button",17),e.NdJ("click",function(){const c=e.CHM(t).index,U=e.oxw();return e.KtG(U.onDeleteFavoriteGame(c))}),e._uU(4," Eliminar "),e.qZA()(),e.YNc(5,_,2,0,"span",5),e.qZA()}if(2&r){const t=m.index,i=e.oxw();e.xp6(2),e.Q6J("formControlName",t),e.xp6(3),e.Q6J("ngIf",i.isValidFieldInArray(i.favoriteGames,t))}}function T(r,m){1&r&&(e.TgZ(0,"span",18),e._uU(1," Debe aceptar los t\xe9rminos y condiciones de uso "),e.qZA())}const q=[{path:"",children:[{path:"basic",component:(()=>{class r{ngOnInit(){}constructor(t,i){this.formBuilder=t,this.validatorsService=i,this.myForm=this.formBuilder.group({name:["",[o.kI.required,o.kI.minLength(3)]],price:[0,[o.kI.required,o.kI.min(0)]],inStorage:[0,[o.kI.required,o.kI.min(0)]]})}isValidField(t){return this.validatorsService.isValidField(this.myForm,t)}getError(t){if(!this.myForm.controls[t])return null;const i=this.myForm.controls[t].errors||{};for(const n of Object.keys(i))switch(n){case"required":return"Este campo es requerido";case"minlength":return`Minimo ${i.minlength.requiredLength} caracteres`}return""}onSave(){this.myForm.invalid||this.myForm.reset({price:0,inStorage:0})}static#e=this.\u0275fac=function(i){return new(i||r)(e.Y36(o.qu),e.Y36(l.S))};static#o=this.\u0275cmp=e.Xpm({type:r,selectors:[["ng-component"]],decls:70,vars:28,consts:[[1,"row"],[1,"col"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"mb-3","row"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["type","text","formControlName","name","placeholder","Nombre del producto",1,"form-control"],["class","form-text text-danger",4,"ngIf"],["type","number","formControlName","price","placeholder","Precio del producto",1,"form-control"],["type","number","formControlName","inStorage","placeholder","Existencias del producto",1,"form-control"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: B\xe1sicos"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"div",0)(4,"div",1)(5,"form",2),e.NdJ("ngSubmit",function(){return n.onSave()}),e.TgZ(6,"div",3)(7,"label",4),e._uU(8,"Producto"),e.qZA(),e.TgZ(9,"div",5),e._UZ(10,"input",6),e.YNc(11,d,2,1,"span",7),e.qZA()(),e.TgZ(12,"div",3)(13,"label",4),e._uU(14,"Precio"),e.qZA(),e.TgZ(15,"div",5),e._UZ(16,"input",8),e.YNc(17,Z,2,0,"span",7),e.qZA()(),e.TgZ(18,"div",3)(19,"label",4),e._uU(20,"Existencias"),e.qZA(),e.TgZ(21,"div",5),e._UZ(22,"input",9),e.YNc(23,g,2,0,"span",7),e.qZA()(),e.TgZ(24,"div",0)(25,"div",1)(26,"button",10),e._uU(27," Guardar "),e.qZA()()()()()(),e.TgZ(28,"div",0)(29,"div",1)(30,"span"),e._uU(31,"Valid"),e.qZA(),e.TgZ(32,"pre"),e._uU(33),e.ALo(34,"json"),e.qZA(),e.TgZ(35,"span"),e._uU(36,"Pristine"),e.qZA(),e.TgZ(37,"pre"),e._uU(38),e.ALo(39,"json"),e.qZA(),e.TgZ(40,"span"),e._uU(41,"Touched"),e.qZA(),e.TgZ(42,"pre"),e._uU(43),e.ALo(44,"json"),e.qZA(),e.TgZ(45,"span"),e._uU(46,"Value"),e.qZA(),e.TgZ(47,"pre"),e._uU(48),e.ALo(49,"json"),e.qZA(),e.TgZ(50,"span"),e._uU(51,"Precio"),e.qZA(),e.TgZ(52,"pre"),e._uU(53),e.ALo(54,"json"),e.qZA(),e.TgZ(55,"span"),e._uU(56,"Precio - Errors"),e.qZA(),e.TgZ(57,"pre"),e._uU(58),e.ALo(59,"json"),e.qZA(),e.TgZ(60,"span"),e._uU(61,"Producto"),e.qZA(),e.TgZ(62,"pre"),e._uU(63),e.ALo(64,"json"),e.qZA(),e.TgZ(65,"span"),e._uU(66,"Producto"),e.qZA(),e.TgZ(67,"pre"),e._uU(68),e.ALo(69,"json"),e.qZA()()()),2&i&&(e.xp6(5),e.Q6J("formGroup",n.myForm),e.xp6(6),e.Q6J("ngIf",n.isValidField("name")),e.xp6(6),e.Q6J("ngIf",n.isValidField("price")),e.xp6(6),e.Q6J("ngIf",n.isValidField("inStorage")),e.xp6(10),e.Oqu(e.lcZ(34,12,n.myForm.valid)),e.xp6(5),e.Oqu(e.lcZ(39,14,n.myForm.pristine)),e.xp6(5),e.Oqu(e.lcZ(44,16,n.myForm.touched)),e.xp6(5),e.Oqu(e.lcZ(49,18,n.myForm.value)),e.xp6(5),e.Oqu(e.lcZ(54,20,n.myForm.controls.price.value)),e.xp6(5),e.Oqu(e.lcZ(59,22,n.myForm.controls.price.errors)),e.xp6(5),e.Oqu(e.lcZ(64,24,n.myForm.controls.name.value)),e.xp6(5),e.Oqu(e.lcZ(69,26,n.myForm.controls.name.errors)))},dependencies:[a.O5,o._Y,o.Fj,o.wV,o.JJ,o.JL,o.sg,o.u,a.Ts],encapsulation:2})}return r})()},{path:"dynamic",component:(()=>{class r{constructor(t,i){this.formBuilder=t,this.validatorsService=i,this.myForm=this.formBuilder.group({name:["",[o.kI.required,o.kI.minLength(3)]],favoriteGames:this.formBuilder.array([["World of Warcraft",o.kI.required],["King of fighters 97",o.kI.required]])}),this.newFavorite=new o.NI("",[o.kI.required,o.kI.minLength(3)])}get favoriteGames(){return this.myForm.get("favoriteGames")}isValidField(t){return this.validatorsService.isValidField(this.myForm,t)}getError(t){if(!this.myForm.controls[t])return null;const i=this.myForm.controls[t].errors||{};for(const n of Object.keys(i))switch(n){case"required":return"Este campo es requerido";case"minlength":return`Minimo ${i.minlength.requiredLength} caracteres`}return""}isValidFieldInArray(t,i){return t.controls[i].errors&&t.controls[i].touched}onDeleteFavoriteGame(t){this.favoriteGames.removeAt(t)}onAddFavoriteGame(){this.newFavorite.invalid||(this.favoriteGames.push(this.formBuilder.control(this.newFavorite.value,o.kI.required)),this.newFavorite.reset())}onSubmit(){this.myForm.invalid?this.myForm.markAllAsTouched():(console.log(this.myForm.value),this.myForm.controls.favoriteGames=this.formBuilder.array([]),this.myForm.reset())}static#e=this.\u0275fac=function(i){return new(i||r)(e.Y36(o.qu),e.Y36(l.S))};static#o=this.\u0275cmp=e.Xpm({type:r,selectors:[["ng-component"]],decls:49,vars:16,consts:[["autocomplete","off",3,"formGroup","ngSubmit"],[1,"mb-3","row"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["placeholder","Nombre de la persona","formControlName","name",1,"form-control"],["class","form-text text-danger",4,"ngIf"],[1,"input-group"],["placeholder","Agregar favorito",1,"form-control",3,"formControl"],["type","button",1,"btn","btn-outline-primary",3,"click"],["formArrayName","favoriteGames",1,"col-sm-9"],["class","mb-1",4,"ngFor","ngForOf"],[1,"row"],[1,"col-sm-12"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"],[1,"mb-1"],[1,"form-control",3,"formControlName"],["type","button",1,"btn","btn-outline-danger",3,"click"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: "),e.TgZ(2,"small"),e._uU(3," Din\xe1micos "),e.qZA()(),e._UZ(4,"hr"),e.TgZ(5,"form",0),e.NdJ("ngSubmit",function(){return n.onSubmit()}),e.TgZ(6,"div",1)(7,"label",2),e._uU(8,"Nombre"),e.qZA(),e.TgZ(9,"div",3),e._UZ(10,"input",4),e.YNc(11,h,2,1,"span",5),e.qZA()(),e.TgZ(12,"div",1)(13,"label",2),e._uU(14,"Agregar"),e.qZA(),e.TgZ(15,"div",3)(16,"div",6),e._UZ(17,"input",7),e.TgZ(18,"button",8),e.NdJ("click",function(){return n.onAddFavoriteGame()}),e._uU(19," Agregar favorito "),e.qZA()()()(),e.TgZ(20,"div",1)(21,"label",2),e._uU(22,"Favoritos"),e.qZA(),e.TgZ(23,"div",9),e.YNc(24,v,6,2,"div",10),e.qZA()(),e.TgZ(25,"div",11)(26,"div",12)(27,"button",13),e._uU(28," Guardar "),e.qZA()()()(),e.TgZ(29,"span"),e._uU(30,"Valid"),e.qZA(),e.TgZ(31,"pre"),e._uU(32),e.ALo(33,"json"),e.qZA(),e._UZ(34,"br"),e.TgZ(35,"span"),e._uU(36,"Value"),e.qZA(),e.TgZ(37,"pre"),e._uU(38),e.ALo(39,"json"),e.qZA(),e._UZ(40,"br"),e.TgZ(41,"span"),e._uU(42,"Agregar Juego"),e.qZA(),e.TgZ(43,"pre"),e._uU(44),e.ALo(45,"json"),e.qZA(),e.TgZ(46,"pre"),e._uU(47),e.ALo(48,"json"),e.qZA()),2&i&&(e.xp6(5),e.Q6J("formGroup",n.myForm),e.xp6(6),e.Q6J("ngIf",n.isValidField("name")),e.xp6(6),e.Q6J("formControl",n.newFavorite),e.xp6(7),e.Q6J("ngForOf",n.favoriteGames.controls),e.xp6(8),e.Oqu(e.lcZ(33,8,"object")),e.xp6(6),e.Oqu(e.lcZ(39,10,"object")),e.xp6(6),e.Oqu(e.lcZ(45,12,"object")),e.xp6(3),e.Oqu(e.lcZ(48,14,"object")))},dependencies:[a.sg,a.O5,o._Y,o.Fj,o.JJ,o.JL,o.oH,o.sg,o.u,o.CE,a.Ts],encapsulation:2})}return r})()},{path:"switches",component:(()=>{class r{constructor(t,i){this.formBuilder=t,this.validatorsService=i,this.myForm=this.formBuilder.group({gender:["",o.kI.required],wantNotifications:[!1,o.kI.required],termsAndConditions:[!1,o.kI.required]})}isValidField(t){return this.validatorsService.isValidField(this.myForm,t)}onSave(){this.myForm.invalid&&this.myForm.markAsTouched()}static#e=this.\u0275fac=function(i){return new(i||r)(e.Y36(o.qu),e.Y36(l.S))};static#o=this.\u0275cmp=e.Xpm({type:r,selectors:[["ng-component"]],decls:58,vars:11,consts:[["autocomplete","off",3,"formGroup","ngSubmit"],[1,"row","mb-3"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],[1,"form-check"],["type","radio","value","M","id","radioMasculino","formControlName","gender",1,"form-check-input"],["for","radioMasculino",1,"form-check-label"],["type","radio","value","F","id","radioFemenino","formControlName","gender",1,"form-check-input"],["for","radioFemenino",1,"form-check-label"],[1,"form-check","form-switch","mt-2"],["type","checkbox","id","flexSwitchCheckChecked","formControlName","wantNotifications",1,"form-check-input"],["for","flexSwitchCheckChecked",1,"form-check-label"],["type","checkbox","id","flexCheckDefault","formControlName","termsAndConditions",1,"form-check-input"],["for","flexCheckDefault",1,"form-check-label"],["class","form-text text-danger",4,"ngIf"],[1,"row"],[1,"col"],["type","submit",1,"btn","btn-primary","float-end",3,"click"],[1,"form-text","text-danger"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: Switches"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"form",0),e.NdJ("ngSubmit",function(){return n.onSave()}),e.TgZ(4,"div",1)(5,"label",2),e._uU(6,"G\xe9nero"),e.qZA(),e.TgZ(7,"div",3)(8,"div",4),e._UZ(9,"input",5),e.TgZ(10,"label",6),e._uU(11," Masculino "),e.qZA()(),e.TgZ(12,"div",4),e._UZ(13,"input",7),e.TgZ(14,"label",8),e._uU(15," Femenino "),e.qZA()()()(),e.TgZ(16,"div",1)(17,"label",2),e._uU(18,"Notificaciones"),e.qZA(),e.TgZ(19,"div",3)(20,"div",9),e._UZ(21,"input",10),e.TgZ(22,"label",11),e._uU(23,"Quiero recibir notificaciones"),e.qZA()()()(),e.TgZ(24,"div",1),e._UZ(25,"label",2),e.TgZ(26,"div",3)(27,"div",4),e._UZ(28,"input",12),e.TgZ(29,"label",13),e._uU(30," T\xe9rminos y condiciones de uso "),e.qZA()(),e.YNc(31,T,2,0,"span",14),e.qZA()(),e.TgZ(32,"div",15)(33,"div",16)(34,"button",17),e.NdJ("click",function(){return n.onSave()}),e._uU(35," Guardar "),e.qZA()()()(),e.TgZ(36,"h5"),e._uU(37,"Valor del formulario"),e.qZA(),e.TgZ(38,"pre"),e._uU(39),e.ALo(40,"json"),e.qZA(),e._UZ(41,"br"),e.TgZ(42,"h5"),e._uU(43,"Persona"),e.qZA(),e.TgZ(44,"pre"),e._uU(45),e.ALo(46,"json"),e.qZA(),e._UZ(47,"br"),e.TgZ(48,"h5"),e._uU(49,"Valid"),e.qZA(),e.TgZ(50,"pre"),e._uU(51),e.ALo(52,"json"),e.qZA(),e.TgZ(53,"h5"),e._uU(54,"T\xe9rminos"),e.qZA(),e._UZ(55,"br"),e.TgZ(56,"pre"),e._uU(57,"Condiciones: "),e.qZA()),2&i&&(e.xp6(3),e.Q6J("formGroup",n.myForm),e.xp6(28),e.Q6J("ngIf",n.isValidField("termsAndConditions")),e.xp6(8),e.Oqu(e.lcZ(40,5,n.myForm.value)),e.xp6(6),e.Oqu(e.lcZ(46,7,n.myForm.value)),e.xp6(6),e.Oqu(e.lcZ(52,9,n.myForm.valid)))},dependencies:[a.O5,o._Y,o.Fj,o.Wl,o._,o.JJ,o.JL,o.sg,o.u,a.Ts],encapsulation:2})}return r})()},{path:"**",redirectTo:"basic"}]}];let y=(()=>{class r{static#e=this.\u0275fac=function(i){return new(i||r)};static#o=this.\u0275mod=e.oAB({type:r});static#r=this.\u0275inj=e.cJS({imports:[p.Bz.forChild(q),p.Bz]})}return r})(),b=(()=>{class r{static#e=this.\u0275fac=function(i){return new(i||r)};static#o=this.\u0275mod=e.oAB({type:r});static#r=this.\u0275inj=e.cJS({imports:[a.ez,y,o.UX]})}return r})()}}]); \ No newline at end of file diff --git a/docs/270.f5cf79bc42f5d946.js b/docs/270.f5cf79bc42f5d946.js new file mode 100644 index 0000000..086ee4b --- /dev/null +++ b/docs/270.f5cf79bc42f5d946.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkAppForm=self.webpackChunkAppForm||[]).push([[270],{7270:(q,u,a)=>{a.r(u),a.d(u,{ReactiveModule:()=>A});var c=a(6814),d=a(1643),t=a(95),e=a(4946),l=a(1772);function p(o,s){if(1&o&&(e.TgZ(0,"span",11),e._uU(1),e.qZA()),2&o){const r=e.oxw();e.xp6(1),e.hij(" ",r.getError("name")," ")}}function f(o,s){1&o&&(e.TgZ(0,"span",11),e._uU(1," El precio debe de ser 0 o mayor. "),e.qZA())}function g(o,s){1&o&&(e.TgZ(0,"span",11),e._uU(1," Las existencias deben de ser 0 o mayor "),e.qZA())}function v(o,s){if(1&o&&(e.TgZ(0,"span",14),e._uU(1),e.qZA()),2&o){const r=e.oxw();e.xp6(1),e.hij(" ",r.getError("name")," ")}}function Z(o,s){1&o&&(e.TgZ(0,"span",14),e._uU(1," Este campo es requerido "),e.qZA())}function _(o,s){if(1&o){const r=e.EpF();e.TgZ(0,"div",15)(1,"div",6),e._UZ(2,"input",16),e.TgZ(3,"button",17),e.NdJ("click",function(){const m=e.CHM(r).index,k=e.oxw();return e.KtG(k.onDeleteFavoriteGame(m))}),e._uU(4," Eliminar "),e.qZA()(),e.YNc(5,Z,2,0,"span",5),e.qZA()}if(2&o){const r=s.index,i=e.oxw();e.xp6(2),e.Q6J("formControlName",r),e.xp6(3),e.Q6J("ngIf",i.isValidFieldInArray(i.favoriteGames,r))}}function b(o,s){1&o&&(e.TgZ(0,"span",18),e._uU(1," Debe aceptar los t\xe9rminos y condiciones de uso "),e.qZA())}const F=[{path:"",children:[{path:"basic",component:(()=>{class o{ngOnInit(){}constructor(r,i){this.formBuilder=r,this.validatorsService=i,this.myForm=this.formBuilder.group({name:["",[t.kI.required,t.kI.minLength(3)]],price:[0,[t.kI.required,t.kI.min(0)]],inStorage:[0,[t.kI.required,t.kI.min(0)]]})}isValidField(r){return this.validatorsService.isValidField(this.myForm,r)}getError(r){if(!this.myForm.controls[r])return null;const i=this.myForm.controls[r].errors||{};for(const n of Object.keys(i))switch(n){case"required":return"Este campo es requerido";case"minlength":return`Minimo ${i.minlength.requiredLength} caracteres`}return""}onSave(){this.myForm.invalid||this.myForm.reset({price:0,inStorage:0})}static#e=this.\u0275fac=function(i){return new(i||o)(e.Y36(t.qu),e.Y36(l.S))};static#t=this.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],decls:28,vars:4,consts:[[1,"row"],[1,"col"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"mb-3","row"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["type","text","formControlName","name","placeholder","Nombre del producto",1,"form-control"],["class","form-text text-danger",4,"ngIf"],["type","number","formControlName","price","placeholder","Precio del producto",1,"form-control"],["type","number","formControlName","inStorage","placeholder","Existencias del producto",1,"form-control"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: B\xe1sicos"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"div",0)(4,"div",1)(5,"form",2),e.NdJ("ngSubmit",function(){return n.onSave()}),e.TgZ(6,"div",3)(7,"label",4),e._uU(8,"Producto"),e.qZA(),e.TgZ(9,"div",5),e._UZ(10,"input",6),e.YNc(11,p,2,1,"span",7),e.qZA()(),e.TgZ(12,"div",3)(13,"label",4),e._uU(14,"Precio"),e.qZA(),e.TgZ(15,"div",5),e._UZ(16,"input",8),e.YNc(17,f,2,0,"span",7),e.qZA()(),e.TgZ(18,"div",3)(19,"label",4),e._uU(20,"Existencias"),e.qZA(),e.TgZ(21,"div",5),e._UZ(22,"input",9),e.YNc(23,g,2,0,"span",7),e.qZA()(),e.TgZ(24,"div",0)(25,"div",1)(26,"button",10),e._uU(27," Guardar "),e.qZA()()()()()()),2&i&&(e.xp6(5),e.Q6J("formGroup",n.myForm),e.xp6(6),e.Q6J("ngIf",n.isValidField("name")),e.xp6(6),e.Q6J("ngIf",n.isValidField("price")),e.xp6(6),e.Q6J("ngIf",n.isValidField("inStorage")))},dependencies:[c.O5,t._Y,t.Fj,t.wV,t.JJ,t.JL,t.sg,t.u],encapsulation:2})}return o})()},{path:"dynamic",component:(()=>{class o{constructor(r,i){this.formBuilder=r,this.validatorsService=i,this.myForm=this.formBuilder.group({name:["",[t.kI.required,t.kI.minLength(3)]],favoriteGames:this.formBuilder.array([["World of Warcraft",t.kI.required],["King of fighters 97",t.kI.required]])}),this.newFavorite=new t.NI("",[t.kI.required,t.kI.minLength(3)])}get favoriteGames(){return this.myForm.get("favoriteGames")}isValidField(r){return this.validatorsService.isValidField(this.myForm,r)}getError(r){if(!this.myForm.controls[r])return null;const i=this.myForm.controls[r].errors||{};for(const n of Object.keys(i))switch(n){case"required":return"Este campo es requerido";case"minlength":return`Minimo ${i.minlength.requiredLength} caracteres`}return""}isValidFieldInArray(r,i){return r.controls[i].errors&&r.controls[i].touched}onDeleteFavoriteGame(r){this.favoriteGames.removeAt(r)}onAddFavoriteGame(){this.newFavorite.invalid||(this.favoriteGames.push(this.formBuilder.control(this.newFavorite.value,t.kI.required)),this.newFavorite.reset())}onSubmit(){this.myForm.invalid?this.myForm.markAllAsTouched():(console.log(this.myForm.value),this.myForm.controls.favoriteGames=this.formBuilder.array([]),this.myForm.reset())}static#e=this.\u0275fac=function(i){return new(i||o)(e.Y36(t.qu),e.Y36(l.S))};static#t=this.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],decls:29,vars:4,consts:[["autocomplete","off",3,"formGroup","ngSubmit"],[1,"mb-3","row"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],["placeholder","Nombre de la persona","formControlName","name",1,"form-control"],["class","form-text text-danger",4,"ngIf"],[1,"input-group"],["placeholder","Agregar favorito",1,"form-control",3,"formControl"],["type","button",1,"btn","btn-outline-primary",3,"click"],["formArrayName","favoriteGames",1,"col-sm-9"],["class","mb-1",4,"ngFor","ngForOf"],[1,"row"],[1,"col-sm-12"],["type","submit",1,"btn","btn-primary","float-end"],[1,"form-text","text-danger"],[1,"mb-1"],[1,"form-control",3,"formControlName"],["type","button",1,"btn","btn-outline-danger",3,"click"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: "),e.TgZ(2,"small"),e._uU(3," Din\xe1micos "),e.qZA()(),e._UZ(4,"hr"),e.TgZ(5,"form",0),e.NdJ("ngSubmit",function(){return n.onSubmit()}),e.TgZ(6,"div",1)(7,"label",2),e._uU(8,"Nombre"),e.qZA(),e.TgZ(9,"div",3),e._UZ(10,"input",4),e.YNc(11,v,2,1,"span",5),e.qZA()(),e.TgZ(12,"div",1)(13,"label",2),e._uU(14,"Agregar"),e.qZA(),e.TgZ(15,"div",3)(16,"div",6),e._UZ(17,"input",7),e.TgZ(18,"button",8),e.NdJ("click",function(){return n.onAddFavoriteGame()}),e._uU(19," Agregar favorito "),e.qZA()()()(),e.TgZ(20,"div",1)(21,"label",2),e._uU(22,"Favoritos"),e.qZA(),e.TgZ(23,"div",9),e.YNc(24,_,6,2,"div",10),e.qZA()(),e.TgZ(25,"div",11)(26,"div",12)(27,"button",13),e._uU(28," Guardar "),e.qZA()()()()),2&i&&(e.xp6(5),e.Q6J("formGroup",n.myForm),e.xp6(6),e.Q6J("ngIf",n.isValidField("name")),e.xp6(6),e.Q6J("formControl",n.newFavorite),e.xp6(7),e.Q6J("ngForOf",n.favoriteGames.controls))},dependencies:[c.sg,c.O5,t._Y,t.Fj,t.JJ,t.JL,t.oH,t.sg,t.u,t.CE],encapsulation:2})}return o})()},{path:"switches",component:(()=>{class o{constructor(r,i){this.formBuilder=r,this.validatorsService=i,this.myForm=this.formBuilder.group({gender:["",t.kI.required],wantNotifications:[!1,t.kI.required],termsAndConditions:[!1,t.kI.required]})}isValidField(r){return this.validatorsService.isValidField(this.myForm,r)}onSave(){this.myForm.invalid&&this.myForm.markAsTouched()}static#e=this.\u0275fac=function(i){return new(i||o)(e.Y36(t.qu),e.Y36(l.S))};static#t=this.\u0275cmp=e.Xpm({type:o,selectors:[["ng-component"]],decls:36,vars:2,consts:[["autocomplete","off",3,"formGroup","ngSubmit"],[1,"row","mb-3"],[1,"col-sm-3","col-form-label"],[1,"col-sm-9"],[1,"form-check"],["type","radio","value","M","id","radioMasculino","formControlName","gender",1,"form-check-input"],["for","radioMasculino",1,"form-check-label"],["type","radio","value","F","id","radioFemenino","formControlName","gender",1,"form-check-input"],["for","radioFemenino",1,"form-check-label"],[1,"form-check","form-switch","mt-2"],["type","checkbox","id","flexSwitchCheckChecked","formControlName","wantNotifications",1,"form-check-input"],["for","flexSwitchCheckChecked",1,"form-check-label"],["type","checkbox","id","flexCheckDefault","formControlName","termsAndConditions",1,"form-check-input"],["for","flexCheckDefault",1,"form-check-label"],["class","form-text text-danger",4,"ngIf"],[1,"row"],[1,"col"],["type","submit",1,"btn","btn-primary","float-end",3,"click"],[1,"form-text","text-danger"]],template:function(i,n){1&i&&(e.TgZ(0,"h2"),e._uU(1,"Reactivos: Switches"),e.qZA(),e._UZ(2,"hr"),e.TgZ(3,"form",0),e.NdJ("ngSubmit",function(){return n.onSave()}),e.TgZ(4,"div",1)(5,"label",2),e._uU(6,"G\xe9nero"),e.qZA(),e.TgZ(7,"div",3)(8,"div",4),e._UZ(9,"input",5),e.TgZ(10,"label",6),e._uU(11," Masculino "),e.qZA()(),e.TgZ(12,"div",4),e._UZ(13,"input",7),e.TgZ(14,"label",8),e._uU(15," Femenino "),e.qZA()()()(),e.TgZ(16,"div",1)(17,"label",2),e._uU(18,"Notificaciones"),e.qZA(),e.TgZ(19,"div",3)(20,"div",9),e._UZ(21,"input",10),e.TgZ(22,"label",11),e._uU(23,"Quiero recibir notificaciones"),e.qZA()()()(),e.TgZ(24,"div",1),e._UZ(25,"label",2),e.TgZ(26,"div",3)(27,"div",4),e._UZ(28,"input",12),e.TgZ(29,"label",13),e._uU(30," T\xe9rminos y condiciones de uso "),e.qZA()(),e.YNc(31,b,2,0,"span",14),e.qZA()(),e.TgZ(32,"div",15)(33,"div",16)(34,"button",17),e.NdJ("click",function(){return n.onSave()}),e._uU(35," Guardar "),e.qZA()()()()),2&i&&(e.xp6(3),e.Q6J("formGroup",n.myForm),e.xp6(28),e.Q6J("ngIf",n.isValidField("termsAndConditions")))},dependencies:[c.O5,t._Y,t.Fj,t.Wl,t._,t.JJ,t.JL,t.sg,t.u],encapsulation:2})}return o})()},{path:"**",redirectTo:"basic"}]}];let T=(()=>{class o{static#e=this.\u0275fac=function(i){return new(i||o)};static#t=this.\u0275mod=e.oAB({type:o});static#o=this.\u0275inj=e.cJS({imports:[d.Bz.forChild(F),d.Bz]})}return o})(),A=(()=>{class o{static#e=this.\u0275fac=function(i){return new(i||o)};static#t=this.\u0275mod=e.oAB({type:o});static#o=this.\u0275inj=e.cJS({imports:[c.ez,T,t.UX]})}return o})()}}]); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index facccf2..0719e66 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,6 +12,6 @@