-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9962.392ed64158864547.js
1 lines (1 loc) · 13.1 KB
/
9962.392ed64158864547.js
1
"use strict";(self.webpackChunknp_ui_lib_app=self.webpackChunknp_ui_lib_app||[]).push([[9962],{9962:(g,o,a)=>{a.r(o),a.d(o,{NpMenubarDemoModule:()=>m});var b=a(6895),d=a(8379),n=a(5499),e=a(4650);class r{constructor(){this.importText="import { NpMenubarModule } from 'np-ui-lib';",this.htmlText='<np-menubar [items]="menuList"></np-menubar>',this.htmlPanelMenuText='<button type="button" class="np-btn" npPopupMenubar [items]="menuList" (onClickMenuItem)="onClickMenuItem($event)">\n <i class="fa fa-bars"></i>\n</button>',this.sampleMenuItems="menuList = [\n new NpMenuItem({\n label: 'Home', iconCss: 'fa fa-home',\n items: [\n new NpMenuItem({ label: 'Profile', url: '/profile' }),\n new NpMenuItem({ label: 'About Us', routerLink: '/about-us' }),\n new NpMenuItem({ label: 'Contact Us', url: '/menu1.1.3', target: '_blank' })\n ]\n }),\n ...\n];",this.items=[new n.ZS({label:"Menu 1",url:"/menu1",iconCss:"fa fa-home",id:"menu1",items:[new n.ZS({label:"Menu 1.1",iconCss:"fa fa-phone",items:[new n.ZS({label:"Menu 1.1.1",url:"/menu1.1.1"}),new n.ZS({label:"Menu 1.1.2",url:"/menu1.1.2"}),new n.ZS({label:"Menu 1.1.3",url:"/menu1.1.3"})]}),new n.ZS({label:"Menu 1.2",url:"/menu1.2"}),new n.ZS({label:"Menu 1.3",url:"/menu1.3"})]}),new n.ZS({label:"Menubar router link",iconCss:"fa fa-bars",routerLink:"/np-menubar-demo",id:"menu-demo"}),new n.ZS({label:"Menu 3 click",iconCss:"fa fa-user"}),new n.ZS({label:"Menu 4",iconCss:"fa fa-clipboard",items:[new n.ZS({label:"Menu 4.1",items:[new n.ZS({label:"Menu 4.1.1 Click"}),new n.ZS({label:"Menu 4.1.2 New Tab",url:"/menu4.1.2",target:"_blank"}),new n.ZS({label:"Menu 4.1.3",url:"/menu4.1.3"})]}),new n.ZS({label:"Menu 4.2",visible:!1,items:[new n.ZS({label:"Menu 4.2.1",url:"/menu4.2.1"}),new n.ZS({label:"Menu 4.2.2",url:"/menu4.2.2"}),new n.ZS({label:"Menu 4.2.3",url:"/menu4.2.3"})]}),new n.ZS({label:"Menu 4.3",url:"/menu4.3"})]}),new n.ZS({label:"Data grid",iconCss:"fa fa-table",routerLink:"/np-data-grid-demo/data-grid-doc"}),new n.ZS({label:"Menu 6",iconCss:"fa fa-bluetooth",url:"/menu6"})],this.itemsHorizontal=[new n.ZS({label:"Menu 1",url:"/menu1",iconCss:"fa fa-home",items:[new n.ZS({label:"Menu 1.1",iconCss:"fa fa-phone",items:[new n.ZS({label:"Menu 1.1.1",url:"/menu1.1.1"}),new n.ZS({label:"Menu 1.1.2",url:"/menu1.1.2"}),new n.ZS({label:"Menu 1.1.3",url:"/menu1.1.3"})]}),new n.ZS({label:"Menu 1.2",url:"/menu1.2"}),new n.ZS({label:"Menu 1.3",url:"/menu1.3"})]}),new n.ZS({label:"Menubar router link",routerLink:"/np-menubar-demo"}),new n.ZS({label:"Menu 3 click"}),new n.ZS({label:"Menu 4",items:[new n.ZS({label:"Menu 4.1",items:[new n.ZS({label:"Menu 4.1.1 Click"}),new n.ZS({label:"Menu 4.1.2 New Tab",url:"/menu4.1.2",target:"_blank"}),new n.ZS({label:"Menu 4.1.3",url:"/menu4.1.3"})]}),new n.ZS({label:"Menu 4.2",visible:!1,items:[new n.ZS({label:"Menu 4.2.1",url:"/menu4.2.1"}),new n.ZS({label:"Menu 4.2.2",url:"/menu4.2.2"}),new n.ZS({label:"Menu 4.2.3",url:"/menu4.2.3"})]}),new n.ZS({label:"Menu 4.3",url:"/menu4.3"})]}),new n.ZS({label:"Data grid",routerLink:"/np-data-grid-demo/data-grid-doc"}),new n.ZS({label:"Menu 6",url:"/menu6"})],this.itemsPopupMenubar=[new n.ZS({label:"Menu 1",url:"/menu1",iconCss:"fa fa-home",items:[new n.ZS({label:"Menu 1.1",iconCss:"fa fa-phone",items:[new n.ZS({label:"Menu 1.1.1",url:"/menu1.1.1"}),new n.ZS({label:"Menu 1.1.2",url:"/menu1.1.2"}),new n.ZS({label:"Menu 1.1.3",url:"/menu1.1.3"})]}),new n.ZS({label:"Menu 1.2",url:"/menu1.2"}),new n.ZS({label:"Menu 1.3",url:"/menu1.3"})]}),new n.ZS({label:"Menubar router link",routerLink:"/np-menubar-demo"}),new n.ZS({label:"Menu 3 click"}),new n.ZS({label:"Menu 4",items:[new n.ZS({label:"Menu 4.1",items:[new n.ZS({label:"Menu 4.1.1 Click"}),new n.ZS({label:"Menu 4.1.2 New Tab",url:"/menu4.1.2",target:"_blank"}),new n.ZS({label:"Menu 4.1.3",url:"/menu4.1.3"})]}),new n.ZS({label:"Menu 4.2",visible:!1,items:[new n.ZS({label:"Menu 4.2.1",url:"/menu4.2.1"}),new n.ZS({label:"Menu 4.2.2",url:"/menu4.2.2"}),new n.ZS({label:"Menu 4.2.3",url:"/menu4.2.3"})]}),new n.ZS({label:"Menu 4.3",url:"/menu4.3"})]}),new n.ZS({label:"Data grid",routerLink:"/np-data-grid-demo/data-grid-doc"}),new n.ZS({label:"Menu 6",url:"/menu6"})],this.itemsPanelMenu=[new n.ZS({label:"Menu 1",url:"/menu1",iconCss:"fa fa-home",items:[new n.ZS({label:"Menu 1.1",iconCss:"fa fa-phone",items:[new n.ZS({label:"Menu 1.1.1",url:"/menu1.1.1"}),new n.ZS({label:"Menu 1.1.2",url:"/menu1.1.2"}),new n.ZS({label:"Menu 1.1.3",url:"/menu1.1.3"})]}),new n.ZS({label:"Menu 1.2",url:"/menu1.2"}),new n.ZS({label:"Menu 1.3",url:"/menu1.3"})]}),new n.ZS({label:"Menubar router link",routerLink:"/np-menubar-demo"}),new n.ZS({label:"Menu 3 click"}),new n.ZS({label:"Menu 4",items:[new n.ZS({label:"Menu 4.1",items:[new n.ZS({label:"Menu 4.1.1 Click"}),new n.ZS({label:"Menu 4.1.2 New Tab",url:"/menu4.1.2",target:"_blank"}),new n.ZS({label:"Menu 4.1.3",url:"/menu4.1.3"})]}),new n.ZS({label:"Menu 4.2",visible:!1,items:[new n.ZS({label:"Menu 4.2.1",url:"/menu4.2.1"}),new n.ZS({label:"Menu 4.2.2",url:"/menu4.2.2"}),new n.ZS({label:"Menu 4.2.3",url:"/menu4.2.3"})]}),new n.ZS({label:"Menu 4.3",url:"/menu4.3"})]}),new n.ZS({label:"Data grid",routerLink:"/np-data-grid-demo/data-grid-doc"}),new n.ZS({label:"Menu 6",url:"/menu6"})]}ngOnInit(){}onClickMenuItem(Z){("Menu 4.1.1 Click"===Z.label||"Menu 3 click"===Z.label)&&alert("Menu is clicked")}static#e=this.\u0275fac=function(u){return new(u||r)};static#n=this.\u0275cmp=e.Xpm({type:r,selectors:[["app-np-menubar-demo"]],decls:273,vars:11,consts:[[1,"page-header"],["title","Documentation"],[3,"innerText"],["type","info"],[1,"np-table"],["title","Examples"],[2,"width","250px"],[3,"items","onClickMenuItem"],[3,"items","orientation","styleClass","onClickMenuItem"],[3,"items","isPanelMenu","onClickMenuItem"],["type","button","npPopupMenubar","",1,"np-btn-icon",3,"items","onClickMenuItem"],[1,"fa","fa-bars"]],template:function(u,t){1&u&&(e.TgZ(0,"h2",0),e._uU(1,"Menubar"),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-alert",3),e._uU(19," Set parent element's width attribute to set width of menu for vertical and panel menubar. "),e.qZA()()(),e.TgZ(20,"np-card")(21,"np-card-body")(22,"b"),e._uU(23,"<np-menubar>"),e.qZA(),e.TgZ(24,"table",4)(25,"tr")(26,"th"),e._uU(27,"Property"),e.qZA(),e.TgZ(28,"th"),e._uU(29,"Description"),e.qZA(),e.TgZ(30,"th"),e._uU(31,"Type"),e.qZA(),e.TgZ(32,"th"),e._uU(33,"Default"),e.qZA()(),e.TgZ(34,"tr")(35,"td"),e._uU(36,"items"),e.qZA(),e.TgZ(37,"td"),e._uU(38,"Array of menu items in hierarchical structure"),e.qZA(),e.TgZ(39,"td"),e._uU(40,"NpMenuItem[]"),e.qZA(),e._UZ(41,"td"),e.qZA(),e.TgZ(42,"tr")(43,"td"),e._uU(44,"orientation"),e.qZA(),e.TgZ(45,"td"),e._uU(46,"Orientation of menu, 'vertical' or 'horizontal'"),e.qZA(),e.TgZ(47,"td"),e._uU(48,"string"),e.qZA(),e.TgZ(49,"td"),e._uU(50,"vertical"),e.qZA()(),e.TgZ(51,"tr")(52,"td"),e._uU(53,"isPanelMenu"),e.qZA(),e.TgZ(54,"td"),e._uU(55,"Set as panel menu"),e.qZA(),e.TgZ(56,"td"),e._uU(57,"boolean"),e.qZA(),e.TgZ(58,"td"),e._uU(59,"false"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"styleClass"),e.qZA(),e.TgZ(63,"td"),e._uU(64,"Add extra class to component"),e.qZA(),e.TgZ(65,"td"),e._uU(66,"string"),e.qZA(),e._UZ(67,"td"),e.qZA(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"inputId"),e.qZA(),e.TgZ(71,"td"),e._uU(72,"Set id attribute"),e.qZA(),e.TgZ(73,"td"),e._uU(74,"string"),e.qZA(),e._UZ(75,"td"),e.qZA()()()(),e.TgZ(76,"np-card")(77,"np-card-body")(78,"table",4)(79,"tr")(80,"th"),e._uU(81,"Method"),e.qZA(),e.TgZ(82,"th"),e._uU(83,"Description"),e.qZA(),e.TgZ(84,"th"),e._uU(85,"Parameters"),e.qZA()(),e.TgZ(86,"tr")(87,"td"),e._uU(88,"onClickMenuItem(item: NpMenuItem)"),e.qZA(),e.TgZ(89,"td"),e._uU(90,"Callback event on click any menu item"),e.qZA(),e.TgZ(91,"td"),e._uU(92,"item: NpMenuItem"),e.qZA()()()()(),e.TgZ(93,"np-card")(94,"np-card-body")(95,"b"),e._uU(96,"NpMenuItem"),e.qZA(),e.TgZ(97,"pre")(98,"code"),e._uU(99),e.qZA()(),e.TgZ(100,"table",4)(101,"tr")(102,"th"),e._uU(103,"Property"),e.qZA(),e.TgZ(104,"th"),e._uU(105,"Description"),e.qZA(),e.TgZ(106,"th"),e._uU(107,"Type"),e.qZA(),e.TgZ(108,"th"),e._uU(109,"Default"),e.qZA()(),e.TgZ(110,"tr")(111,"td"),e._uU(112,"id"),e.qZA(),e.TgZ(113,"td"),e._uU(114,"Set id attribute on menu link"),e.qZA(),e.TgZ(115,"td"),e._uU(116,"string"),e.qZA(),e._UZ(117,"td"),e.qZA(),e.TgZ(118,"tr")(119,"td"),e._uU(120,"label"),e.qZA(),e.TgZ(121,"td"),e._uU(122,"Set label to display"),e.qZA(),e.TgZ(123,"td"),e._uU(124,"string"),e.qZA(),e._UZ(125,"td"),e.qZA(),e.TgZ(126,"tr")(127,"td"),e._uU(128,"url"),e.qZA(),e.TgZ(129,"td"),e._uU(130,"URL to redirect"),e.qZA(),e.TgZ(131,"td"),e._uU(132,"string"),e.qZA(),e._UZ(133,"td"),e.qZA(),e.TgZ(134,"tr")(135,"td"),e._uU(136,"target"),e.qZA(),e.TgZ(137,"td"),e._uU(138,"Target attr for link"),e.qZA(),e.TgZ(139,"td"),e._uU(140,"string"),e.qZA(),e.TgZ(141,"td"),e._uU(142,"_self"),e.qZA()(),e.TgZ(143,"tr")(144,"td"),e._uU(145,"routerLink"),e.qZA(),e.TgZ(146,"td"),e._uU(147,"Set router link"),e.qZA(),e.TgZ(148,"td"),e._uU(149,"string"),e.qZA(),e._UZ(150,"td"),e.qZA(),e.TgZ(151,"tr")(152,"td"),e._uU(153,"queryParams"),e.qZA(),e.TgZ(154,"td"),e._uU(155,"Set query parameters"),e.qZA(),e.TgZ(156,"td"),e._uU(157,"any"),e.qZA(),e._UZ(158,"td"),e.qZA(),e.TgZ(159,"tr")(160,"td"),e._uU(161,"fragment"),e.qZA(),e.TgZ(162,"td"),e._uU(163,"Set fragment"),e.qZA(),e.TgZ(164,"td"),e._uU(165,"string"),e.qZA(),e._UZ(166,"td"),e.qZA(),e.TgZ(167,"tr")(168,"td"),e._uU(169,"queryParamsHandling"),e.qZA(),e.TgZ(170,"td"),e._uU(171,"Set queryParamsHandling"),e.qZA(),e.TgZ(172,"td"),e._uU(173,"QueryParamsHandling"),e.qZA(),e._UZ(174,"td"),e.qZA(),e.TgZ(175,"tr")(176,"td"),e._uU(177,"iconCss"),e.qZA(),e.TgZ(178,"td"),e._uU(179,"Set icon class like 'fa fa-home'"),e.qZA(),e.TgZ(180,"td"),e._uU(181,"string"),e.qZA(),e._UZ(182,"td"),e.qZA(),e.TgZ(183,"tr")(184,"td"),e._uU(185,"visible"),e.qZA(),e.TgZ(186,"td"),e._uU(187,"Set menu visible or not"),e.qZA(),e.TgZ(188,"td"),e._uU(189,"boolean"),e.qZA(),e.TgZ(190,"td"),e._uU(191,"true"),e.qZA()(),e.TgZ(192,"tr")(193,"td"),e._uU(194,"items"),e.qZA(),e.TgZ(195,"td"),e._uU(196,"Child items"),e.qZA(),e.TgZ(197,"td"),e._uU(198,"NpMenuItem[]"),e.qZA(),e._UZ(199,"td"),e.qZA(),e.TgZ(200,"tr")(201,"td"),e._uU(202,"isHeader"),e.qZA(),e.TgZ(203,"td"),e._uU(204," Set menu as header, if it is set as true then only set label, iconCss, id property. "),e.qZA(),e.TgZ(205,"td"),e._uU(206,"boolean"),e.qZA(),e.TgZ(207,"td"),e._uU(208,"false"),e.qZA()()()()(),e.TgZ(209,"np-card")(210,"np-card-body")(211,"b"),e._uU(212,"How to set popup menu?"),e.qZA(),e.TgZ(213,"div"),e._uU(214,"Use "),e.TgZ(215,"b"),e._uU(216,"npPopupMenubar"),e.qZA(),e._uU(217," directive to set popup menu."),e.qZA(),e.TgZ(218,"div")(219,"pre"),e._UZ(220,"code",2),e.qZA()(),e.TgZ(221,"table",4)(222,"tr")(223,"th"),e._uU(224,"Property"),e.qZA(),e.TgZ(225,"th"),e._uU(226,"Description"),e.qZA(),e.TgZ(227,"th"),e._uU(228,"Type"),e.qZA(),e.TgZ(229,"th"),e._uU(230,"Default"),e.qZA()(),e.TgZ(231,"tr")(232,"td"),e._uU(233,"items"),e.qZA(),e.TgZ(234,"td"),e._uU(235,"Array of menu items in hierarchical structure"),e.qZA(),e.TgZ(236,"td"),e._uU(237,"NpMenuItem[]"),e.qZA(),e._UZ(238,"td"),e.qZA(),e.TgZ(239,"tr")(240,"td"),e._uU(241,"styleClass"),e.qZA(),e.TgZ(242,"td"),e._uU(243,"Add extra class to component"),e.qZA(),e.TgZ(244,"td"),e._uU(245,"string"),e.qZA(),e._UZ(246,"td"),e.qZA(),e.TgZ(247,"tr")(248,"td"),e._uU(249,"inputId"),e.qZA(),e.TgZ(250,"td"),e._uU(251,"Set id attribute"),e.qZA(),e.TgZ(252,"td"),e._uU(253,"string"),e.qZA(),e._UZ(254,"td"),e.qZA()()()()(),e.TgZ(255,"np-tab",5)(256,"fieldset",6)(257,"legend"),e._uU(258,"Vertical"),e.qZA(),e.TgZ(259,"np-menubar",7),e.NdJ("onClickMenuItem",function(l){return t.onClickMenuItem(l)}),e.qZA()(),e.TgZ(260,"fieldset")(261,"legend"),e._uU(262,"Horizontal"),e.qZA(),e.TgZ(263,"np-menubar",8),e.NdJ("onClickMenuItem",function(l){return t.onClickMenuItem(l)}),e.qZA()(),e.TgZ(264,"fieldset",6)(265,"legend"),e._uU(266,"Panel menu"),e.qZA(),e.TgZ(267,"np-menubar",9),e.NdJ("onClickMenuItem",function(l){return t.onClickMenuItem(l)}),e.qZA()(),e.TgZ(268,"fieldset")(269,"legend"),e._uU(270,"Popup menu"),e.qZA(),e.TgZ(271,"button",10),e.NdJ("onClickMenuItem",function(l){return t.onClickMenuItem(l)}),e._UZ(272,"i",11),e.qZA()()()()),2&u&&(e.xp6(10),e.Q6J("innerText",t.importText),e.xp6(7),e.Q6J("innerText",t.htmlText),e.xp6(82),e.Oqu(t.sampleMenuItems),e.xp6(121),e.Q6J("innerText",t.htmlPanelMenuText),e.xp6(39),e.Q6J("items",t.items),e.xp6(4),e.Q6J("items",t.itemsHorizontal)("orientation","horizontal")("styleClass","myClass"),e.xp6(4),e.Q6J("items",t.itemsPanelMenu)("isPanelMenu",!0),e.xp6(4),e.Q6J("items",t.itemsPopupMenubar))},dependencies:[n.nV,n.t3,n.c0,n.El,n.KA,n.Qk,n.r5],encapsulation:2})}const p=[{path:"",component:r}];class i{static#e=this.\u0275fac=function(u){return new(u||i)};static#n=this.\u0275mod=e.oAB({type:i});static#t=this.\u0275inj=e.cJS({imports:[d.Bz.forChild(p),d.Bz]})}class m{static#e=this.\u0275fac=function(u){return new(u||m)};static#n=this.\u0275mod=e.oAB({type:m});static#t=this.\u0275inj=e.cJS({imports:[b.ez,i,n.LE,n.Tk,n.i7,n.qp]})}}}]);