-
Notifications
You must be signed in to change notification settings - Fork 0
/
17-es5.15dd34b0e7f3801c61b1.js
1 lines (1 loc) · 13.5 KB
/
17-es5.15dd34b0e7f3801c61b1.js
1
!function(){function n(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function e(n,e){for(var t=0;t<e.length;t++){var c=e[t];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(n,c.key,c)}}(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{ulYL:function(t,c,o){"use strict";o.r(c),o.d(c,"SampleSecondModule",function(){return B});var i=o("An66"),m=o("1VvW"),a=o("5Q2+"),l=o("kZht"),s=o("aJOL"),b=o("1ZKX"),p=o("BL99"),r=o("ctyY"),u=o("j5U8"),g=o("hCLc"),d=o("ydE+"),G=o("O+XF"),h=o("EmXI"),y=o("IOEv"),f=o("pTnX");function x(n,e){1&n&&l.Gc(0,"License")}function U(n,e){1&n&&(l.Gc(0),l.ic(1,"uppercase")),2&n&&l.Hc(l.jc(1,1,e.$implicit))}function w(n,e){1&n&&l.Gc(0,"Price")}function V(n,e){1&n&&(l.Gc(0),l.ic(1,"currency")),2&n&&l.Hc(l.jc(1,1,e.$implicit))}function k(n,e){}function v(n,e){1&n&&(l.Gc(0,"\n "),l.Vb(1,"button",17),l.Gc(2,"\n "),l.Vb(3,"mat-icon"),l.Gc(4,"done"),l.Ub(),l.Gc(5,"\n "),l.Ub(),l.Gc(6,"\n "))}function C(n,e){1&n&&l.Gc(0),2&n&&l.Ic("\u2116",e.$implicit,"")}function E(n,e){1&n&&(l.Gc(0),l.ic(1,"uppercase")),2&n&&l.Hc(l.jc(1,1,e.$implicit))}function L(n,e){if(1&n&&(l.Gc(0,"\n "),l.Vb(1,"button",18),l.Gc(2),l.ic(3,"currency"),l.Ub(),l.Gc(4,"\n "),l.Vb(5,"mat-menu",null,19),l.Gc(7,"\n "),l.Vb(8,"button",20),l.Gc(9,"EUR"),l.Ub(),l.Gc(10,"\n "),l.Vb(11,"button",20),l.Gc(12,"DOL"),l.Ub(),l.Gc(13,"\n "),l.Ub(),l.Gc(14,"\n ")),2&n){var t=e.$implicit,c=l.wc(6);l.Cb(1),l.oc("matMenuTriggerFor",c),l.Cb(1),l.Hc(l.jc(3,2,t))}}function O(n,e){if(1&n){var t=l.Xb();l.Vb(0,"mat-option",22),l.dc("click",function(){return l.xc(t),l.hc(2).cd.detectChanges()}),l.Gc(1),l.Ub()}if(2&n){var c=e.$implicit;l.oc("value",c.name),l.Cb(1),l.Ic("\n ",c.name,"\n ")}}function S(n,e){if(1&n&&(l.Gc(0,"\n "),l.Vb(1,"mat-form-field"),l.Gc(2,"\n "),l.Vb(3,"mat-label"),l.Gc(4,"Relative"),l.Ub(),l.Gc(5,"\n "),l.Vb(6,"mat-select"),l.Gc(7,"\n "),l.Ec(8,O,2,2,"mat-option",21),l.Gc(9,"\n "),l.Ub(),l.Gc(10,"\n "),l.Ub(),l.Gc(11,"\n ")),2&n){var t=l.hc();l.Cb(8),l.oc("ngForOf",t.licenses)}}var F,H,_=function(){return["status-column"]},N=((H=function(){function t(e){n(this,t),this.cd=e,this.licenses=[],this.columns=["name","position","weight","symbol","position","weight","symbol","status"],this.elements=[{position:1,name:"Hydrogen",weight:1.0079,symbol:"H"},{position:2,name:"Helium",weight:4.0026,symbol:"He"},{position:3,name:"Lithium",weight:6.941,symbol:"Li"},{position:4,name:"Beryllium",weight:9.0122,symbol:"Be"},{position:5,name:"Boron",weight:10.811,symbol:"B"},{position:6,name:"Carbon",weight:12.0107,symbol:"C"},{position:7,name:"Nitrogen",weight:14.0067,symbol:"N"},{position:8,name:"Oxygen",weight:15.9994,symbol:"O"},{position:9,name:"Fluorine",weight:18.9984,symbol:"F"},{position:10,name:"Neon",weight:20.1797,symbol:"Ne"}]}var c,o,i;return c=t,(o=[{key:"ngAfterViewInit",value:function(){var n=this;document.querySelectorAll("pre code").forEach(function(n){hljs.highlightBlock(n)}),setTimeout(function(){n.licenses=[{id:1,name:"single",price:29.3},{id:2,name:"developer",price:49.8},{id:3,name:"premium",price:99.5},{id:4,name:"enterprise",price:199}],n.cd.detectChanges()})}}])&&e(c.prototype,o),i&&e(c,i),t}()).\u0275fac=function(n){return new(n||H)(l.Ob(l.h))},H.\u0275cmp=l.Ib({type:H,selectors:[["sample-second"]],decls:138,vars:7,consts:[[1,"simple-toolbar"],[1,"column-samples"],[1,"column"],[1,"javascript"],[3,"source"],["key","name"],["ngx-th",""],["ngx-td",""],["key","price"],[3,"source","striped","keys"],["key","name","sticky",""],["key","status","width","50","sticky-end","",3,"css-class"],["row-height","60",3,"source"],["key","id","width","100","empty-head",""],["key","name","head-title","License name"],["key","price","head-title","Cost"],["key","change","width","250","empty-head","","custom-key",""],["mat-button","",1,"button__done"],["mat-button","",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item",""],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"]],template:function(n,e){1&n&&(l.Vb(0,"mat-toolbar",0),l.Gc(1,"\n "),l.Vb(2,"span"),l.Gc(3,"Example custom templates"),l.Ub(),l.Gc(4,"\n"),l.Ub(),l.Gc(5,"\n\n"),l.Vb(6,"h4"),l.Gc(7,"1. Override columns rendering"),l.Ub(),l.Gc(8,"\n\n"),l.Vb(9,"div",1),l.Gc(10,"\n "),l.Vb(11,"div",2),l.Gc(12,"\n "),l.Vb(13,"pre"),l.Vb(14,"code",3),l.Gc(15,"\n // app.component.ts\n import { Component } from \"@angular/core\";\n import { LicenseSample } from \"./license.interface\";\n\n @Component({\n selector: 'app',\n templateUrl: './app.component.html'\n })\n export class AppComponent {\n\n public licenses: LicenseSample[] = [\n {\n id: 1,\n name: 'single',\n price: 29.3\n },\n {\n id: 2,\n name: 'developer',\n price: 49.8\n },\n {\n id: 3,\n name: 'premium',\n price: 99.5\n },\n {\n id: 4,\n name: 'enterprise',\n price: 199\n }\n ];\n\n }\n\n"),l.Ub(),l.Ub(),l.Gc(16,"\n "),l.Ub(),l.Gc(17,"\n\n "),l.Vb(18,"div",2),l.Gc(19,"\n "),l.Vb(20,"pre"),l.Vb(21,"code",3),l.Pb(),l.Gc(22,'\n \x3c!-- app.component.html --\x3e\n <ngx-table-builder [source]="licenses">\n\n <ngx-column key="name">\n <ng-template ngx-th>License</ng-template>\n <ng-template ngx-td let-name>\n {{ name | uppercase }}\n </ng-template>\n </ngx-column>\n\n <ngx-column key="price">\n <ng-template ngx-th>Cost</ng-template>\n <ng-template ngx-td let-price>\n {{ price | currency }}\n </ng-template>\n </ngx-column>\n\n </ngx-table-builder>\n\n'),l.Wb(),l.Ub(),l.Ub(),l.Gc(23,"\n\n "),l.Vb(24,"ngx-table-builder",4),l.Gc(25,"\n "),l.Vb(26,"ngx-column",5),l.Gc(27,"\n "),l.Ec(28,x,1,0,"ng-template",6),l.Gc(29,"\n "),l.Ec(30,U,2,3,"ng-template",7),l.Gc(31,"\n "),l.Ub(),l.Gc(32,"\n\n "),l.Vb(33,"ngx-column",8),l.Gc(34,"\n "),l.Ec(35,w,1,0,"ng-template",6),l.Gc(36,"\n "),l.Ec(37,V,2,3,"ng-template",7),l.Gc(38,"\n "),l.Ub(),l.Gc(39,"\n "),l.Ub(),l.Gc(40,"\n "),l.Ub(),l.Gc(41,"\n"),l.Ub(),l.Gc(42,"\n\n"),l.Vb(43,"h4"),l.Gc(44,"2. Sticky and Custom Columns"),l.Ub(),l.Gc(45,"\n\n"),l.Vb(46,"div",1),l.Gc(47,"\n "),l.Vb(48,"div",2),l.Gc(49,"\n "),l.Vb(50,"pre"),l.Vb(51,"code",3),l.Gc(52,"\n // app.component.ts\n import { Component } from \"@angular/core\";\n\n export interface PeriodicElement {\n name: string;\n position: number;\n weight: number;\n symbol: string;\n }\n\n @Component({\n selector: 'app',\n templateUrl: './app.component.html',\n styles: [\n `\n // Use custom CSS for column and cell\n .status-column .table-grid__cell {\n padding: 0;\n color: green;\n }\n\n // Reset CSS for default mat-button style\n .button__done[mat-button] {\n padding: 0;\n min-width: 100%;\n }\n `\n ],\n // Use to disable CSS Encapsulation for this component\n encapsulation: ViewEncapsulation.None,\n })\n export class AppComponent {\n public columns: string[] = [\n 'name', 'position', 'weight', 'symbol',\n 'position', 'weight', 'symbol', 'status'\n ];\n\n public data: PeriodicElement[] = [\n { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },\n { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },\n { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },\n { position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be' },\n { position: 5, name: 'Boron', weight: 10.811, symbol: 'B' },\n { position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C' },\n { position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N' },\n { position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O' },\n { position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F' },\n { position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne' },\n ];\n }\n\n\n"),l.Ub(),l.Ub(),l.Gc(53,"\n\n "),l.Vb(54,"p"),l.Gc(55,"\n "),l.Vb(56,"b"),l.Gc(57,"Note"),l.Ub(),l.Gc(58,": If you use the keys array, then the columns will be drawn to agree with their order (including\n repetitions). If you do not use the keys array, then the columns will be drawn to agree with the specified\n templates (ngx-column). "),l.Qb(59,"br"),l.Gc(60,"\n "),l.Ub(),l.Gc(61,"\n\n "),l.Qb(62,"hr"),l.Gc(63,"\n\n "),l.Vb(64,"p"),l.Gc(65,"\n "),l.Vb(66,"b"),l.Gc(67,"Note"),l.Ub(),l.Gc(68,": You can also use keywords "),l.Vb(69,"b"),l.Gc(70," "),l.Vb(71,"i"),l.Gc(72,"empty-head"),l.Ub(),l.Gc(73," "),l.Ub(),l.Gc(74,",\n "),l.Vb(75,"b"),l.Gc(76,"\n "),l.Vb(77,"i"),l.Gc(78,"head-title"),l.Ub(),l.Gc(79,"\n "),l.Ub(),l.Gc(80,"\n for print simple text in table head.\n "),l.Ub(),l.Gc(81,"\n\n "),l.Vb(82,"pre"),l.Vb(83,"code",3),l.Pb(),l.Gc(84,'\n \x3c!-- app.component.html --\x3e\n <ngx-table-builder [source]="licenses" row-height="60">\n <ngx-column key="id" width="100" empty-head>\n <ng-template ngx-td let-id>\u2116{{ id }}</ng-template>\n </ngx-column>\n\n <ngx-column key="name" head-title="License name">\n <ng-template ngx-td let-name>{{ name | uppercase }}</ng-template>\n </ngx-column>\n\n <ngx-column key="price" head-title="Cost">\n <ng-template ngx-td let-price>\n <button mat-button [matMenuTriggerFor]="menu">{{ price | currency }}</button>\n <mat-menu #menu="matMenu">\n <button mat-menu-item>EUR</button>\n <button mat-menu-item>DOL</button>\n </mat-menu>\n </ng-template>\n </ngx-column>\n\n <ngx-column key="change" width="250" empty-head custom-key>\n <ng-template ngx-td>\n <mat-form-field>\n <mat-label>Relative</mat-label>\n <mat-select>\n <mat-option\n [value]="license.name"\n (click)="cd.detectChanges()"\n *ngFor="let license of licenses"\n >\n {{ license.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </ngx-column>\n </ngx-table-builder>\n\n'),l.Wb(),l.Ub(),l.Ub(),l.Gc(85,"\n "),l.Ub(),l.Gc(86,"\n\n "),l.Vb(87,"div",2),l.Gc(88,"\n "),l.Vb(89,"ngx-table-builder",9),l.Gc(90,"\n "),l.Qb(91,"ngx-column",10),l.Gc(92,"\n\n "),l.Vb(93,"ngx-column",11),l.Gc(94,"\n "),l.Ec(95,k,0,0,"ng-template",6),l.Gc(96,"\n "),l.Ec(97,v,7,0,"ng-template",7),l.Gc(98,"\n "),l.Ub(),l.Gc(99,"\n "),l.Ub(),l.Gc(100,"\n "),l.Vb(101,"div"),l.Qb(102,"br"),l.Ub(),l.Gc(103,"\n\n "),l.Vb(104,"pre"),l.Vb(105,"code",3),l.Pb(),l.Gc(106,'\n \x3c!-- app.component.html --\x3e\n <ngx-table-builder [source]="data" [striped]="false" [keys]="columns">\n\n <ngx-column key="name" sticky></ngx-column>\n\n <ngx-column width="50" key="status" sticky-end [css-class]="[\'status-column\']">\n <ng-template ngx-th></ng-template>\n <ng-template ngx-td>\n <button class="button__done" mat-button>\n <mat-icon>done</mat-icon>\n </button>\n </ng-template>\n </ngx-column>\n\n </ngx-table-builder>\n'),l.Wb(),l.Ub(),l.Ub(),l.Gc(107,"\n\n "),l.Qb(108,"hr"),l.Gc(109,"\n\n "),l.Vb(110,"ngx-table-builder",12),l.Gc(111,"\n "),l.Vb(112,"ngx-column",13),l.Gc(113,"\n "),l.Ec(114,C,1,1,"ng-template",7),l.Gc(115,"\n "),l.Ub(),l.Gc(116,"\n\n "),l.Vb(117,"ngx-column",14),l.Gc(118,"\n "),l.Ec(119,E,2,3,"ng-template",7),l.Gc(120,"\n "),l.Ub(),l.Gc(121,"\n\n "),l.Vb(122,"ngx-column",15),l.Gc(123,"\n "),l.Ec(124,L,15,4,"ng-template",7),l.Gc(125,"\n "),l.Ub(),l.Gc(126,"\n\n "),l.Vb(127,"ngx-column",16),l.Gc(128,"\n "),l.Ec(129,S,12,1,"ng-template",7),l.Gc(130,"\n "),l.Ub(),l.Gc(131,"\n "),l.Ub(),l.Gc(132,"\n "),l.Ub(),l.Gc(133,"\n"),l.Ub(),l.Gc(134,"\n\n"),l.Vb(135,"div"),l.Qb(136,"br"),l.Ub(),l.Gc(137,"\n")),2&n&&(l.Cb(24),l.oc("source",e.licenses),l.Cb(65),l.oc("source",e.elements)("striped",!1)("keys",e.columns),l.Cb(4),l.oc("css-class",l.qc(6,_)),l.Cb(17),l.oc("source",e.licenses))},directives:[s.a,b.a,p.a,r.a,u.a,g.a,d.a,G.d,G.a,G.b,h.b,h.e,y.a,i.l,f.i],pipes:[i.v,i.c],styles:["\n /*noinspection CssUnusedSymbol*/\n .status-column .table-grid__cell {\n padding: 0;\n color: green;\n }\n\n /*noinspection CssUnusedSymbol*/\n .button__done[mat-button] {\n padding: 0;\n min-width: 100%;\n }\n "],encapsulation:2,changeDetection:0}),H),B=((F=function e(){n(this,e)}).\u0275fac=function(n){return new(n||F)},F.\u0275mod=l.Mb({type:F}),F.\u0275inj=l.Lb({imports:[[i.b,a.a,m.b.forChild([{path:"",component:N}])]]}),F)}}])}();