-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12-es5.48d891a699aed822d2d1.js
1 lines (1 loc) · 6.45 KB
/
12-es5.48d891a699aed822d2d1.js
1
!function(){function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{lY0r:function(t,a,i){"use strict";i.r(a),i.d(a,"SampleFirstModule",function(){return y});var c=i("An66"),o=i("1VvW"),r=i("5Q2+"),l=i("zMYQ"),b=i("umqh"),h=i("kZht"),u=i("mcff"),s=i("aJOL"),d=i("3kIJ"),g=i("EmXI"),m=i("IOEv"),p=i("pTnX"),f=i("Tcl6"),G=i("UDV5"),w=i("hCLc"),v=i("1ZKX"),V=i("qvIn");function x(e,n){1&e&&h.Qb(0,"mat-spinner",17),2&e&&h.oc("diameter",30)}var U,C,M=function(){return{standalone:!0}},k=((C=function(){function t(n,a,i){e(this,t),this.cd=n,this.dialog=a,this.ngZone=i,this.width="100%",this.height=null,this.rowHeight=null,this.dataSize="100x20",this.loading=!1,this.simple=[],this.regenerate=!1,this.idInterval=null}var a,i,c;return a=t,(i=[{key:"ngOnInit",value:function(){var e=this;this.updateTable(),this.ngZone.runOutsideAngular(function(){e.idInterval=window.setInterval(function(){e.regenerate&&e.updateTable()},14500)})}},{key:"ngOnDestroy",value:function(){window.clearInterval(this.idInterval)}},{key:"showSample",value:function(){this.dialog.open(b.a,{data:{title:"Overview simple table",description:"If you want enabled virtual scroll, you need use auto-height or height attribute.",code:'\x3c!-- simple - is Array any objects --\x3e\n<ngx-table-builder [source]="simple"></ngx-table-builder>\n\n\n\x3c!-- also you can set height, width for cell in table --\x3e\n<ngx-table-builder\n [source]="simple"\n [width]="width"\n [height]="height"\n [row-height]="rowHeight"\n></ngx-table-builder>\n'},height:"450px",width:"600px"})}},{key:"updateTable",value:function(){var e=this;switch(this.loading=!0,this.dataSize){case"10x5":l.a.generator(10,5).then(function(n){return e.setData(n)});break;case"100x20":l.a.generator(100,20).then(function(n){return e.setData(n)});break;case"1000x30":l.a.generator(1e3,30).then(function(n){return e.setData(n)});break;case"10000x50":l.a.generator(1e4,50).then(function(n){return e.setData(n)});break;case"100000x100":l.a.generator(1e5,100).then(function(n){return e.setData(n)})}this.cd.detectChanges()}},{key:"setData",value:function(e){var n=this;this.simple=e,window.setTimeout(function(){n.loading=!1,n.cd.detectChanges()},500)}}])&&n(a.prototype,i),c&&n(a,c),t}()).\u0275fac=function(e){return new(e||C)(h.Ob(h.h),h.Ob(u.b),h.Ob(h.B))},C.\u0275cmp=h.Ib({type:C,selectors:[["sample-first"]],decls:84,vars:14,consts:[["header",""],[1,"simple-toolbar"],["class","spinner","strokeWidth","5",3,"diameter",4,"ngIf"],[3,"value","valueChange","selectionChange"],["value","10x5"],["value","100x20"],["value","1000x30"],["value","10000x50"],["value","100000x100"],[1,"red"],["matInput","","name","width",3,"ngModel","ngModelChange"],["matInput","","name","height","type","number",3,"ngModel","ngModelChange"],["matInput","","name","rowHeight","type","number",3,"ngModel","ngModelChange"],[1,"regenerate",3,"ngModel","ngModelOptions","ngModelChange"],["mat-raised-button","",3,"click"],[1,"content-visible"],[3,"source","width","height","row-height"],["strokeWidth","5",1,"spinner",3,"diameter"]],template:function(e,n){if(1&e&&(h.Vb(0,"div",null,0),h.Gc(2,"\n "),h.Vb(3,"mat-toolbar",1),h.Gc(4,"\n "),h.Vb(5,"span"),h.Gc(6,"Virtual scroll table"),h.Ub(),h.Gc(7,"\n "),h.Ec(8,x,1,1,"mat-spinner",2),h.Gc(9,"\n "),h.Ub(),h.Gc(10,"\n\n "),h.Vb(11,"form"),h.Gc(12,"\n "),h.Vb(13,"mat-form-field"),h.Gc(14,"\n "),h.Vb(15,"mat-label"),h.Gc(16,"Data size"),h.Ub(),h.Gc(17,"\n "),h.Vb(18,"mat-select",3),h.dc("valueChange",function(e){return n.dataSize=e})("selectionChange",function(){return n.updateTable()}),h.Gc(19,"\n "),h.Vb(20,"mat-option",4),h.Gc(21,"10 x 5"),h.Ub(),h.Gc(22,"\n "),h.Vb(23,"mat-option",5),h.Gc(24,"100 x 20"),h.Ub(),h.Gc(25,"\n "),h.Vb(26,"mat-option",6),h.Gc(27,"1000 x 30"),h.Ub(),h.Gc(28,"\n "),h.Vb(29,"mat-option",7),h.Gc(30,"10 000 x 50"),h.Ub(),h.Gc(31,"\n "),h.Vb(32,"mat-option",8),h.Vb(33,"span",9),h.Gc(34,"100 000 x 100 (1.5Gb memory usage)"),h.Ub(),h.Ub(),h.Gc(35,"\n "),h.Ub(),h.Gc(36,"\n "),h.Ub(),h.Gc(37,"\n\n "),h.Vb(38,"mat-form-field"),h.Gc(39,"\n "),h.Vb(40,"mat-label"),h.Gc(41,"Table width"),h.Ub(),h.Gc(42,"\n "),h.Vb(43,"label"),h.Gc(44,"\n "),h.Vb(45,"input",10),h.dc("ngModelChange",function(e){return n.width=e}),h.Ub(),h.Gc(46,"\n "),h.Ub(),h.Gc(47,"\n "),h.Ub(),h.Gc(48,"\n\n "),h.Vb(49,"mat-form-field"),h.Gc(50,"\n "),h.Vb(51,"mat-label"),h.Gc(52,"Table height (px)"),h.Ub(),h.Gc(53,"\n "),h.Vb(54,"label"),h.Gc(55,"\n "),h.Vb(56,"input",11),h.dc("ngModelChange",function(e){return n.height=e}),h.Ub(),h.Gc(57,"\n "),h.Ub(),h.Gc(58,"\n "),h.Ub(),h.Gc(59,"\n\n "),h.Vb(60,"mat-form-field"),h.Gc(61,"\n "),h.Vb(62,"mat-label"),h.Gc(63,"Table row height"),h.Ub(),h.Gc(64,"\n "),h.Vb(65,"label"),h.Gc(66,"\n "),h.Vb(67,"input",12),h.dc("ngModelChange",function(e){return n.rowHeight=e}),h.Ub(),h.Gc(68,"\n "),h.Ub(),h.Gc(69,"\n "),h.Ub(),h.Gc(70,"\n\n "),h.Vb(71,"mat-checkbox",13),h.dc("ngModelChange",function(e){return n.regenerate=e}),h.Gc(72,"\n Auto regenerate (15sec)\n "),h.Ub(),h.Gc(73,"\n\n "),h.Vb(74,"button",14),h.dc("click",function(){return n.showSample()}),h.Gc(75,"show code sample"),h.Ub(),h.Gc(76,"\n "),h.Ub(),h.Gc(77,"\n"),h.Ub(),h.Gc(78,"\n\n"),h.Vb(79,"div",15),h.Gc(80,"\n "),h.Qb(81,"ngx-table-builder",16),h.Gc(82,"\n"),h.Ub(),h.Gc(83,"\n")),2&e){var t=h.wc(1);h.Cb(8),h.oc("ngIf",n.loading),h.Cb(10),h.oc("value",n.dataSize),h.Cb(27),h.oc("ngModel",n.width),h.Cb(11),h.oc("ngModel",n.height),h.Cb(11),h.oc("ngModel",n.rowHeight),h.Cb(4),h.oc("ngModel",n.regenerate)("ngModelOptions",h.qc(13,M)),h.Cb(8),h.Bc("height","calc(100% - "+t.offsetHeight+"px)"),h.Cb(2),h.oc("source",n.simple)("width",n.width)("height",n.height)("row-height",n.rowHeight)}},directives:[s.a,c.m,d.q,d.l,d.m,g.b,g.e,m.a,p.i,f.a,d.b,d.k,d.n,d.o,G.a,w.a,v.a,V.b],encapsulation:2,changeDetection:0}),C),y=((U=function n(){e(this,n)}).\u0275fac=function(e){return new(e||U)},U.\u0275mod=h.Mb({type:U}),U.\u0275inj=h.Lb({imports:[[c.b,r.a,o.b.forChild([{path:"",component:k}])]]}),U)}}])}();