-
Notifications
You must be signed in to change notification settings - Fork 0
/
4331.4258a0a9428aab7e.js
1 lines (1 loc) · 7.63 KB
/
4331.4258a0a9428aab7e.js
1
"use strict";(self.webpackChunknp_ui_lib_app=self.webpackChunknp_ui_lib_app||[]).push([[4331],{4331:(T,h,s)=>{s.r(h),s.d(h,{NpSwitchDemoModule:()=>u});var c=s(6895),r=s(8379),t=s(4650),a=s(433),d=s(5499);const p=["switchControl"];class g{constructor(){this.switch1=!0,this.switch2=!1,this.switch3=!0,this.switch5=!0,this.switch7=!0,this.switch8=!0,this.importText="import { NpSwitchModule } from 'np-ui-lib';",this.htmlText='<np-switch [(ngModel)]="value"></np-switch>'}ngOnInit(){}onChangeSwitch8(l){alert(l)}onTabChange(l){"Examples"===l.title&&setTimeout(()=>{this.switchControl.focus()},100)}static#t=this.\u0275fac=function(o){return new(o||g)};static#e=this.\u0275cmp=t.Xpm({type:g,selectors:[["app-np-switch-demo"]],viewQuery:function(o,e){if(1&o&&t.Gf(p,7),2&o){let i;t.iGM(i=t.CRH())&&(e.switchControl=i.first)}},decls:210,vars:18,consts:[[1,"page-header"],[3,"onTabChange"],["title","Documentation"],[3,"innerText"],[1,"np-table"],["id","tabExample","title","Examples"],[3,"ngModel","inputId","ngModelChange"],["switchControl",""],[1,"np-btn",3,"click"],[3,"ngModel","ngModelChange"],["disabled","",3,"ngModel","ngModelChange"],[3,"ngModel","readOnly","ngModelChange"],["required","",3,"ngModel","ngModelChange"],[3,"ngModel","falseLabelText","trueLabelText","ngModelChange"],[3,"ngModel","styleClass","ngModelChange"],[3,"ngModel","ngModelChange","onChange"]],template:function(o,e){1&o&&(t.TgZ(0,"h2",0),t._uU(1,"Switch"),t.qZA(),t.TgZ(2,"np-tabs",1),t.NdJ("onTabChange",function(n){return e.onTabChange(n)}),t.TgZ(3,"np-tab",2)(4,"np-card")(5,"np-card-body")(6,"b"),t._uU(7,"Module to import"),t.qZA(),t.TgZ(8,"div")(9,"pre"),t._UZ(10,"code",3),t.qZA()()()(),t.TgZ(11,"np-card")(12,"np-card-body")(13,"b"),t._uU(14,"HTML"),t.qZA(),t.TgZ(15,"div")(16,"pre"),t._UZ(17,"code",3),t.qZA()()()(),t.TgZ(18,"np-card")(19,"np-card-body")(20,"table",4)(21,"tr")(22,"th"),t._uU(23,"Property"),t.qZA(),t.TgZ(24,"th"),t._uU(25,"Description"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Type"),t.qZA(),t.TgZ(28,"th"),t._uU(29,"Default"),t.qZA()(),t.TgZ(30,"tr")(31,"td"),t._uU(32,"ngModel"),t.qZA(),t.TgZ(33,"td"),t._uU(34,"Value"),t.qZA(),t.TgZ(35,"td"),t._uU(36,"boolean"),t.qZA(),t._UZ(37,"td"),t.qZA(),t.TgZ(38,"tr")(39,"td"),t._uU(40,"trueLabelText"),t.qZA(),t.TgZ(41,"td"),t._uU(42,"Set text for label for true side"),t.qZA(),t.TgZ(43,"td"),t._uU(44,"string"),t.qZA(),t.TgZ(45,"td"),t._uU(46,"True"),t.qZA()(),t.TgZ(47,"tr")(48,"td"),t._uU(49,"falseLabelText"),t.qZA(),t.TgZ(50,"td"),t._uU(51,"Set text for label for false side"),t.qZA(),t.TgZ(52,"td"),t._uU(53,"string"),t.qZA(),t.TgZ(54,"td"),t._uU(55,"False"),t.qZA()(),t.TgZ(56,"tr")(57,"td"),t._uU(58,"disabled"),t.qZA(),t.TgZ(59,"td"),t._uU(60,"Set disabled"),t.qZA(),t.TgZ(61,"td"),t._uU(62,"boolean"),t.qZA(),t.TgZ(63,"td"),t._uU(64,"false"),t.qZA()(),t.TgZ(65,"tr")(66,"td"),t._uU(67,"required"),t.qZA(),t.TgZ(68,"td"),t._uU(69,"Set required"),t.qZA(),t.TgZ(70,"td"),t._uU(71,"boolean"),t.qZA(),t.TgZ(72,"td"),t._uU(73,"false"),t.qZA()(),t.TgZ(74,"tr")(75,"td"),t._uU(76,"readOnly"),t.qZA(),t.TgZ(77,"td"),t._uU(78,"Set readonly"),t.qZA(),t.TgZ(79,"td"),t._uU(80,"boolean"),t.qZA(),t.TgZ(81,"td"),t._uU(82,"false"),t.qZA()(),t.TgZ(83,"tr")(84,"td"),t._uU(85,"autoFocus"),t.qZA(),t.TgZ(86,"td"),t._uU(87,"Set autofocus"),t.qZA(),t.TgZ(88,"td"),t._uU(89,"boolean"),t.qZA(),t.TgZ(90,"td"),t._uU(91,"false"),t.qZA()(),t.TgZ(92,"tr")(93,"td"),t._uU(94,"tabIndex"),t.qZA(),t.TgZ(95,"td"),t._uU(96,"Set tabindex attribute"),t.qZA(),t.TgZ(97,"td"),t._uU(98,"number"),t.qZA(),t._UZ(99,"td"),t.qZA(),t.TgZ(100,"tr")(101,"td"),t._uU(102,"styleClass"),t.qZA(),t.TgZ(103,"td"),t._uU(104,"Set extra class on component"),t.qZA(),t.TgZ(105,"td"),t._uU(106,"string"),t.qZA(),t._UZ(107,"td"),t.qZA(),t.TgZ(108,"tr")(109,"td"),t._uU(110,"inputId"),t.qZA(),t.TgZ(111,"td"),t._uU(112,"Set id attribute"),t.qZA(),t.TgZ(113,"td"),t._uU(114,"string"),t.qZA(),t._UZ(115,"td"),t.qZA()()()(),t.TgZ(116,"np-card")(117,"np-card-body")(118,"table",4)(119,"tr")(120,"th"),t._uU(121,"Method"),t.qZA(),t.TgZ(122,"th"),t._uU(123,"Description"),t.qZA(),t.TgZ(124,"th"),t._uU(125,"Parameters"),t.qZA()(),t.TgZ(126,"tr")(127,"td"),t._uU(128,"onChange(v: any)"),t.qZA(),t.TgZ(129,"td"),t._uU(130,"Callback event on value change."),t.qZA(),t.TgZ(131,"td"),t._uU(132,"Value"),t.qZA()(),t.TgZ(133,"tr")(134,"td"),t._uU(135,"onFocus($event)"),t.qZA(),t.TgZ(136,"td"),t._uU(137,"Callback event on input focus."),t.qZA(),t.TgZ(138,"td"),t._uU(139,"Browser event"),t.qZA()(),t.TgZ(140,"tr")(141,"td"),t._uU(142,"onBlur($event)"),t.qZA(),t.TgZ(143,"td"),t._uU(144,"Callback event on input blur."),t.qZA(),t.TgZ(145,"td"),t._uU(146,"Browser event"),t.qZA()()()()(),t.TgZ(147,"np-card")(148,"np-card-body")(149,"table",4)(150,"tr")(151,"th"),t._uU(152,"Api"),t.qZA(),t.TgZ(153,"th"),t._uU(154,"Description"),t.qZA(),t.TgZ(155,"th"),t._uU(156,"Parameters"),t.qZA()(),t.TgZ(157,"tr")(158,"td"),t._uU(159,"focus()"),t.qZA(),t.TgZ(160,"td"),t._uU(161," Set focus on control. If not setting focus properly then use timeout of 500ms. "),t.qZA(),t._UZ(162,"td"),t.qZA()()()()(),t.TgZ(163,"np-tab",5)(164,"div")(165,"fieldset")(166,"legend"),t._uU(167,"Basic switch"),t.qZA(),t.TgZ(168,"np-switch",6,7),t.NdJ("ngModelChange",function(n){return e.switch1=n}),t.qZA(),t.TgZ(170,"div"),t._uU(171),t.qZA(),t.TgZ(172,"button",8),t.NdJ("click",function(){return e.switch1=!e.switch1}),t._uU(173," Toggle Value "),t.qZA()()(),t.TgZ(174,"div")(175,"fieldset")(176,"legend"),t._uU(177,"default value to false"),t.qZA(),t.TgZ(178,"np-switch",9),t.NdJ("ngModelChange",function(n){return e.switch2=n}),t.qZA(),t.TgZ(179,"div"),t._uU(180),t.qZA()()(),t.TgZ(181,"div")(182,"fieldset")(183,"legend"),t._uU(184,"disabled and readOnly"),t.qZA(),t.TgZ(185,"np-switch",10),t.NdJ("ngModelChange",function(n){return e.switch3=n}),t.qZA(),t._UZ(186,"br"),t.TgZ(187,"np-switch",11),t.NdJ("ngModelChange",function(n){return e.switch3=n}),t.qZA()()(),t.TgZ(188,"div")(189,"fieldset")(190,"legend"),t._uU(191,"required"),t.qZA(),t.TgZ(192,"np-switch",12),t.NdJ("ngModelChange",function(n){return e.switch4=n}),t.qZA()()(),t.TgZ(193,"div")(194,"fieldset")(195,"legend"),t._uU(196,"trueLabelText and falseLabelText as string"),t.qZA(),t.TgZ(197,"np-switch",13),t.NdJ("ngModelChange",function(n){return e.switch5=n}),t.qZA(),t.TgZ(198,"div"),t._uU(199),t.qZA()()(),t.TgZ(200,"div")(201,"fieldset")(202,"legend"),t._uU(203,"styleClass"),t.qZA(),t.TgZ(204,"np-switch",14),t.NdJ("ngModelChange",function(n){return e.switch7=n}),t.qZA()()(),t.TgZ(205,"div")(206,"fieldset")(207,"legend"),t._uU(208,"onChange"),t.qZA(),t.TgZ(209,"np-switch",15),t.NdJ("ngModelChange",function(n){return e.switch8=n})("onChange",function(n){return e.onChangeSwitch8(n)}),t.qZA()()()()()),2&o&&(t.xp6(10),t.Q6J("innerText",e.importText),t.xp6(7),t.Q6J("innerText",e.htmlText),t.xp6(151),t.Q6J("ngModel",e.switch1)("inputId","txtSwitch"),t.xp6(3),t.hij("Selected Value : ",e.switch1,""),t.xp6(7),t.Q6J("ngModel",e.switch2),t.xp6(2),t.hij("Selected Value : ",e.switch2,""),t.xp6(5),t.Q6J("ngModel",e.switch3),t.xp6(2),t.Q6J("ngModel",e.switch3)("readOnly",!0),t.xp6(5),t.Q6J("ngModel",e.switch4),t.xp6(5),t.Q6J("ngModel",e.switch5)("falseLabelText","No")("trueLabelText","Yes"),t.xp6(2),t.hij("Selected Value : ",e.switch5,""),t.xp6(5),t.Q6J("ngModel",e.switch7)("styleClass","myClass"),t.xp6(5),t.Q6J("ngModel",e.switch8))},dependencies:[a.JJ,a.Q7,a.On,d.Mc,d.c0,d.El,d.KA,d.Qk],encapsulation:2})}const _=[{path:"",component:g}];class Z{static#t=this.\u0275fac=function(o){return new(o||Z)};static#e=this.\u0275mod=t.oAB({type:Z});static#n=this.\u0275inj=t.cJS({imports:[r.Bz.forChild(_),r.Bz]})}class u{static#t=this.\u0275fac=function(o){return new(o||u)};static#e=this.\u0275mod=t.oAB({type:u});static#n=this.\u0275inj=t.cJS({imports:[c.ez,a.u5,Z,d.kH,d.Tk,d.i7]})}}}]);