-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5695.d7784b545c773579.js
1 lines (1 loc) · 9.63 KB
/
5695.d7784b545c773579.js
1
"use strict";(self.webpackChunknp_ui_lib_app=self.webpackChunknp_ui_lib_app||[]).push([[5695],{5695:(U,i,d)=>{d.r(i),d.d(i,{NpNumberBoxDemoModule:()=>_});var p=d(6895),s=d(8379),e=d(4650),r=d(5499),g=d(433);function b(l,Z){1&l&&(e.TgZ(0,"div",21),e._uU(1," Less then min value. "),e.qZA())}function T(l,Z){1&l&&(e.TgZ(0,"div",21),e._uU(1," More then max value. "),e.qZA())}function A(l,Z){1&l&&(e.TgZ(0,"div",21),e._uU(1," Invalid number. "),e.qZA())}class m{constructor(){this.importText="import { NpNumberBoxModule } from 'np-ui-lib';",this.htmlText='<np-number-box [(ngModel)]="value"></np-number-box>',this.number1=50,this.number2=20,this.number5=50}ngOnInit(){}setNumber1(){this.number1=100}setNumber3(){this.number3=101}onChangeNumber7(Z){console.log(this.number7)}static#e=this.\u0275fac=function(u){return new(u||m)};static#n=this.\u0275cmp=e.Xpm({type:m,selectors:[["app-np-number-box-demo"]],decls:265,vars:25,consts:[[1,"page-header"],["title","Documentation"],[3,"innerText"],[1,"np-table"],["type","info"],["title","Examples"],[3,"ngModel","ngModelChange"],[1,"np-btn-group"],[1,"np-btn",3,"click"],[3,"ngModel","steps","ngModelChange"],[3,"ngModel","steps","min","max","ngModelChange"],["number3Control","ngModel"],["class","np-text-danger",4,"ngIf"],["required","",3,"ngModel","ngModelChange"],["disabled","",3,"ngModel","ngModelChange"],[3,"ngModel","readOnly","ngModelChange"],["pattern","^(\\d{0,5}\\.)?\\d{0,2}$","placeholder","99999.99",3,"ngModel","ngModelChange"],["number6Control","ngModel"],[3,"ngModel","ngModelChange","onChange"],["pattern","^\\d*$",3,"ngModel","showControls","suffixLabel","ngModelChange"],[3,"ngModel","prefixLabel","ngModelChange"],[1,"np-text-danger"]],template:function(u,n){if(1&u&&(e.TgZ(0,"h2",0),e._uU(1,"Number Box"),e.qZA(),e.TgZ(2,"np-tabs")(3,"np-tab",1)(4,"np-card")(5,"np-card-body")(6,"b"),e._uU(7,"Module to import"),e.qZA(),e.TgZ(8,"div")(9,"pre"),e._UZ(10,"code",2),e.qZA()()()(),e.TgZ(11,"np-card")(12,"np-card-body")(13,"b"),e._uU(14,"HTML"),e.qZA(),e.TgZ(15,"div")(16,"pre"),e._UZ(17,"code",2),e.qZA()()()(),e.TgZ(18,"np-card")(19,"np-card-body")(20,"table",3)(21,"tr")(22,"th"),e._uU(23,"Property"),e.qZA(),e.TgZ(24,"th"),e._uU(25,"Description"),e.qZA(),e.TgZ(26,"th"),e._uU(27,"Type"),e.qZA(),e.TgZ(28,"th"),e._uU(29,"Default"),e.qZA()(),e.TgZ(30,"tr")(31,"td"),e._uU(32,"ngModel"),e.qZA(),e.TgZ(33,"td"),e._uU(34,"Value"),e.qZA(),e.TgZ(35,"td"),e._uU(36,"number"),e.qZA(),e._UZ(37,"td"),e.qZA(),e.TgZ(38,"tr")(39,"td"),e._uU(40,"min"),e.qZA(),e.TgZ(41,"td"),e._uU(42,"Set minimum limit"),e.qZA(),e.TgZ(43,"td"),e._uU(44,"number"),e.qZA(),e._UZ(45,"td"),e.qZA(),e.TgZ(46,"tr")(47,"td"),e._uU(48,"max"),e.qZA(),e.TgZ(49,"td"),e._uU(50,"Set maximum limit"),e.qZA(),e.TgZ(51,"td"),e._uU(52,"number"),e.qZA(),e._UZ(53,"td"),e.qZA(),e.TgZ(54,"tr")(55,"td"),e._uU(56,"steps"),e.qZA(),e.TgZ(57,"td"),e._uU(58,"Set steps"),e.qZA(),e.TgZ(59,"td"),e._uU(60,"number"),e.qZA(),e.TgZ(61,"td"),e._uU(62,"1"),e.qZA()(),e.TgZ(63,"tr")(64,"td"),e._uU(65,"pattern"),e.qZA(),e.TgZ(66,"td"),e._uU(67,"Set number pattern as regex string"),e.qZA(),e.TgZ(68,"td"),e._uU(69,"string"),e.qZA(),e._UZ(70,"td"),e.qZA(),e.TgZ(71,"tr")(72,"td"),e._uU(73,"showControls"),e.qZA(),e.TgZ(74,"td"),e._uU(75,"Show plus and minus control buttons"),e.qZA(),e.TgZ(76,"td"),e._uU(77,"boolean"),e.qZA(),e.TgZ(78,"td"),e._uU(79,"true"),e.qZA()(),e.TgZ(80,"tr")(81,"td"),e._uU(82,"prefixLabel"),e.qZA(),e.TgZ(83,"td"),e._uU(84,"Set prefix string"),e.qZA(),e.TgZ(85,"td"),e._uU(86,"string"),e.qZA(),e._UZ(87,"td"),e.qZA(),e.TgZ(88,"tr")(89,"td"),e._uU(90,"suffixLabel"),e.qZA(),e.TgZ(91,"td"),e._uU(92,"Set suffix string"),e.qZA(),e.TgZ(93,"td"),e._uU(94,"string"),e.qZA(),e._UZ(95,"td"),e.qZA(),e.TgZ(96,"tr")(97,"td"),e._uU(98,"placeholder"),e.qZA(),e.TgZ(99,"td"),e._uU(100,"Set placeholder"),e.qZA(),e.TgZ(101,"td"),e._uU(102,"string"),e.qZA(),e._UZ(103,"td"),e.qZA(),e.TgZ(104,"tr")(105,"td"),e._uU(106,"disabled"),e.qZA(),e.TgZ(107,"td"),e._uU(108,"Set disabled"),e.qZA(),e.TgZ(109,"td"),e._uU(110,"boolean"),e.qZA(),e.TgZ(111,"td"),e._uU(112,"false"),e.qZA()(),e.TgZ(113,"tr")(114,"td"),e._uU(115,"required"),e.qZA(),e.TgZ(116,"td"),e._uU(117,"Set required"),e.qZA(),e.TgZ(118,"td"),e._uU(119,"boolean"),e.qZA(),e.TgZ(120,"td"),e._uU(121,"false"),e.qZA()(),e.TgZ(122,"tr")(123,"td"),e._uU(124,"readOnly"),e.qZA(),e.TgZ(125,"td"),e._uU(126,"Set readonly"),e.qZA(),e.TgZ(127,"td"),e._uU(128,"boolean"),e.qZA(),e.TgZ(129,"td"),e._uU(130,"false"),e.qZA()(),e.TgZ(131,"tr")(132,"td"),e._uU(133,"autoFocus"),e.qZA(),e.TgZ(134,"td"),e._uU(135,"Set autofocus"),e.qZA(),e.TgZ(136,"td"),e._uU(137,"boolean"),e.qZA(),e.TgZ(138,"td"),e._uU(139,"false"),e.qZA()(),e.TgZ(140,"tr")(141,"td"),e._uU(142,"tabIndex"),e.qZA(),e.TgZ(143,"td"),e._uU(144,"Set tabindex attribute"),e.qZA(),e.TgZ(145,"td"),e._uU(146,"number"),e.qZA(),e._UZ(147,"td"),e.qZA(),e.TgZ(148,"tr")(149,"td"),e._uU(150,"styleClass"),e.qZA(),e.TgZ(151,"td"),e._uU(152,"Set extra class on component"),e.qZA(),e.TgZ(153,"td"),e._uU(154,"string"),e.qZA(),e._UZ(155,"td"),e.qZA(),e.TgZ(156,"tr")(157,"td"),e._uU(158,"inputId"),e.qZA(),e.TgZ(159,"td"),e._uU(160,"Set id attribute"),e.qZA(),e.TgZ(161,"td"),e._uU(162,"string"),e.qZA(),e._UZ(163,"td"),e.qZA()(),e.TgZ(164,"np-alert",4),e._uU(165," There are three control validations for min, max, pattern. "),e.qZA()()(),e.TgZ(166,"np-card")(167,"np-card-body")(168,"table",3)(169,"tr")(170,"th"),e._uU(171,"Method"),e.qZA(),e.TgZ(172,"th"),e._uU(173,"Description"),e.qZA(),e.TgZ(174,"th"),e._uU(175,"Parameters"),e.qZA()(),e.TgZ(176,"tr")(177,"td"),e._uU(178,"onChange(v: any)"),e.qZA(),e.TgZ(179,"td"),e._uU(180,"Callback event on value change."),e.qZA(),e.TgZ(181,"td"),e._uU(182,"Value"),e.qZA()(),e.TgZ(183,"tr")(184,"td"),e._uU(185,"onFocus($event)"),e.qZA(),e.TgZ(186,"td"),e._uU(187,"Callback event on input focus."),e.qZA(),e.TgZ(188,"td"),e._uU(189,"Browser event"),e.qZA()(),e.TgZ(190,"tr")(191,"td"),e._uU(192,"onBlur($event)"),e.qZA(),e.TgZ(193,"td"),e._uU(194,"Callback event on input blur."),e.qZA(),e.TgZ(195,"td"),e._uU(196,"Browser event"),e.qZA()()()()(),e.TgZ(197,"np-card")(198,"np-card-body")(199,"table",3)(200,"tr")(201,"th"),e._uU(202,"Api"),e.qZA(),e.TgZ(203,"th"),e._uU(204,"Description"),e.qZA(),e.TgZ(205,"th"),e._uU(206,"Parameters"),e.qZA()(),e.TgZ(207,"tr")(208,"td"),e._uU(209,"focus()"),e.qZA(),e.TgZ(210,"td"),e._uU(211," Set focus on control. If not setting focus properly then use timeout of 500ms. "),e.qZA(),e._UZ(212,"td"),e.qZA()()()()(),e.TgZ(213,"np-tab",5)(214,"fieldset")(215,"legend"),e._uU(216,"Number box"),e.qZA(),e.TgZ(217,"np-number-box",6),e.NdJ("ngModelChange",function(t){return n.number1=t}),e.qZA(),e._uU(218),e.TgZ(219,"div",7)(220,"button",8),e.NdJ("click",function(){return n.setNumber1()}),e._uU(221,"Set 100"),e.qZA()()(),e.TgZ(222,"fieldset")(223,"legend"),e._uU(224,"Number box with steps"),e.qZA(),e.TgZ(225,"np-number-box",9),e.NdJ("ngModelChange",function(t){return n.number2=t}),e.qZA()(),e.TgZ(226,"fieldset")(227,"legend"),e._uU(228,"Number box with min as 0 & max as 100"),e.qZA(),e.TgZ(229,"np-number-box",10,11),e.NdJ("ngModelChange",function(t){return n.number3=t}),e.qZA(),e.YNc(231,b,2,0,"div",12),e.YNc(232,T,2,0,"div",12),e.TgZ(233,"div",7)(234,"button",8),e.NdJ("click",function(){return n.setNumber3()}),e._uU(235,"Set 101"),e.qZA()()(),e.TgZ(236,"fieldset")(237,"legend"),e._uU(238,"required"),e.qZA(),e.TgZ(239,"np-number-box",13),e.NdJ("ngModelChange",function(t){return n.number4=t}),e.qZA()(),e.TgZ(240,"fieldset")(241,"legend"),e._uU(242,"disabled and readOnly"),e.qZA(),e.TgZ(243,"np-number-box",14),e.NdJ("ngModelChange",function(t){return n.number5=t}),e.qZA(),e._UZ(244,"br"),e.TgZ(245,"np-number-box",15),e.NdJ("ngModelChange",function(t){return n.number5=t}),e.qZA()(),e.TgZ(246,"fieldset")(247,"legend"),e._uU(248,"pattern"),e.qZA(),e.TgZ(249,"np-number-box",16,17),e.NdJ("ngModelChange",function(t){return n.number6=t}),e.qZA(),e.YNc(251,A,2,0,"div",12),e._uU(252),e.qZA(),e.TgZ(253,"fieldset")(254,"legend"),e._uU(255,"onChange"),e.qZA(),e.TgZ(256,"np-number-box",18),e.NdJ("ngModelChange",function(t){return n.number7=t})("onChange",function(t){return n.onChangeNumber7(t)}),e.qZA()(),e.TgZ(257,"fieldset")(258,"legend"),e._uU(259,"Set showControls to false, and suffixLabel"),e.qZA(),e.TgZ(260,"np-number-box",19),e.NdJ("ngModelChange",function(t){return n.number8=t}),e.qZA()(),e.TgZ(261,"fieldset")(262,"legend"),e._uU(263,"prefixLabel"),e.qZA(),e.TgZ(264,"np-number-box",20),e.NdJ("ngModelChange",function(t){return n.number9=t}),e.qZA()()()()),2&u){const o=e.MAs(230),t=e.MAs(250);e.xp6(10),e.Q6J("innerText",n.importText),e.xp6(7),e.Q6J("innerText",n.htmlText),e.xp6(200),e.Q6J("ngModel",n.number1),e.xp6(1),e.hij(" value: ",n.number1," "),e.xp6(7),e.Q6J("ngModel",n.number2)("steps",.5),e.xp6(4),e.Q6J("ngModel",n.number3)("steps",5)("min",0)("max",100),e.xp6(2),e.Q6J("ngIf",o.errors&&o.errors.min),e.xp6(1),e.Q6J("ngIf",o.errors&&o.errors.max),e.xp6(7),e.Q6J("ngModel",n.number4),e.xp6(4),e.Q6J("ngModel",n.number5),e.xp6(2),e.Q6J("ngModel",n.number5)("readOnly",!0),e.xp6(4),e.Q6J("ngModel",n.number6),e.xp6(2),e.Q6J("ngIf",t.errors&&t.errors.pattern),e.xp6(1),e.hij(" value: ",n.number6," "),e.xp6(4),e.Q6J("ngModel",n.number7),e.xp6(4),e.Q6J("ngModel",n.number8)("showControls",!1)("suffixLabel",".00"),e.xp6(4),e.Q6J("ngModel",n.number9)("prefixLabel","$")}},dependencies:[p.O5,r.ti,g.JJ,g.Q7,g.c5,g.On,r.KA,r.Qk,r.c0,r.El,r.r5],encapsulation:2})}const q=[{path:"",component:m}];class a{static#e=this.\u0275fac=function(u){return new(u||a)};static#n=this.\u0275mod=e.oAB({type:a});static#t=this.\u0275inj=e.cJS({imports:[s.Bz.forChild(q),s.Bz]})}class _{static#e=this.\u0275fac=function(u){return new(u||_)};static#n=this.\u0275mod=e.oAB({type:_});static#t=this.\u0275inj=e.cJS({imports:[p.ez,a,r.GK,g.u5,r.i7,r.Tk,r.qp]})}}}]);