-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path21-es5.860faf78ca84ecf85924.js
1 lines (1 loc) · 5.06 KB
/
21-es5.860faf78ca84ecf85924.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([[21],{"32Dg":function(t,c,i){"use strict";i.r(c),i.d(c,"SampleSixteenModule",function(){return Q});var o=i("An66"),a=i("1VvW"),s=i("5Q2+"),r=i("b5Xb"),l=i("zMYQ"),b=i("kZht"),u=i("mcff"),m=i("aJOL"),g=i("hCLc"),d=i("1ZKX"),h=i("oTne"),f=i("YW/L"),v=i("t+BJ"),p=i("oIp9"),G=i("BL99"),x=i("j5U8"),y=i("UDV5"),k=i("ydE+");function w(n,e){if(1&n){var t=b.Xb();b.Vb(0,"ngx-context-menu-item",13),b.dc("onClick",function(n){b.xc(t);var c=e.$implicit;return b.hc(),b.wc(10).toggleColumnVisibility(c.key),n.preventDefault()}),b.Gc(1,"\n "),b.Vb(2,"ngx-menu-content",14),b.Gc(3),b.Ub(),b.Gc(4,"\n "),b.Vb(5,"ngx-menu-content",15),b.Gc(6,"\n "),b.Qb(7,"mat-checkbox",16),b.Gc(8,"\n "),b.Ub(),b.Gc(9,"\n "),b.Ub()}if(2&n){var c=e.$implicit;b.oc("visible",c.isModel),b.Cb(3),b.Hc(c.key),b.Cb(4),b.oc("checked",c.isVisible)}}function V(n,e){1&n&&b.Qb(0,"ngx-column",17),2&n&&b.oc("key",e.$implicit)}function C(n,e){1&n&&(b.Gc(0,"\n "),b.Vb(1,"button",18),b.Vb(2,"mat-icon"),b.Gc(3,"info"),b.Ub(),b.Ub(),b.Gc(4,"\n "))}var U,O,S=function(){return["reverseId"]},I=((O=function(){function t(e,c,i){n(this,t),this.dialog=e,this.cd=c,this.tableChanges=i,this.data=[],this.schema=null,this.testName="test",this.sub=null}var c,i,o;return c=t,(i=[{key:"ngOnInit",value:function(){var n,e=this;this.schema=JSON.parse(null!==(n=window.localStorage.getItem(this.testName))&&void 0!==n?n:"{}"),l.a.generator(3,10).then(function(n){e.data=n,e.cd.detectChanges()}),this.sub=this.tableChanges.events.subscribe(function(n){return e.save(n)})}},{key:"ngAfterViewInit",value:function(){document.querySelectorAll("pre code").forEach(function(n){hljs.highlightBlock(n)})}},{key:"ngOnDestroy",value:function(){var n;null===(n=this.sub)||void 0===n||n.unsubscribe()}},{key:"save",value:function(n){console.log("update schema",n),window.localStorage.setItem(this.testName,JSON.stringify(n))}}])&&e(c.prototype,i),o&&e(c,o),t}()).\u0275fac=function(n){return new(n||O)(b.Ob(u.b),b.Ob(b.h),b.Ob(r.a))},O.\u0275cmp=b.Ib({type:O,selectors:[["sample-sixteen"]],decls:49,vars:10,consts:[[1,"simple-toolbar"],["mat-raised-button","",1,"show-simple"],[3,"source","name","schema-version","schema-columns","vertical-border","exclude-keys"],["table",""],["is-draggable","","is-filterable","","is-sortable",""],["contextTitle","","divider",""],[3,"visible","onClick",4,"ngFor","ngForOf"],["divider","",3,"onClick"],["key","id","sticky","","custom-key","","width","100","vertical-line","","important-template","",3,"is-draggable"],["key","reverseId","custom-key","","width","150","vertical-line","","important-template",""],[3,"key",4,"ngFor","ngForOf"],["key","edit","custom-key","","width","60","vertical-line","","sticky-end","","empty-head",""],["ngx-td","","row",""],[3,"visible","onClick"],["no-margin",""],["no-margin","","align-center",""],["color","primary",3,"checked"],[3,"key"],["mat-button",""]],template:function(n,e){if(1&n){var t=b.Xb();b.Vb(0,"mat-toolbar",0),b.Gc(1,"\n "),b.Vb(2,"span"),b.Gc(3,"Persistent state"),b.Ub(),b.Gc(4,"\n "),b.Vb(5,"button",1),b.Gc(6,"show code sample"),b.Ub(),b.Gc(7,"\n"),b.Ub(),b.Gc(8,"\n\n"),b.Vb(9,"ngx-table-builder",2,3),b.Gc(11,"\n "),b.Qb(12,"ngx-options",4),b.Gc(13,"\n\n "),b.Vb(14,"ngx-context-menu"),b.Gc(15,"\n "),b.Vb(16,"ngx-context-menu-item",5),b.Gc(17,"\n "),b.Vb(18,"ngx-menu-content"),b.Gc(19,"Menu"),b.Ub(),b.Gc(20,"\n "),b.Ub(),b.Gc(21,"\n\n "),b.Vb(22,"ngx-context-menu-item"),b.Gc(23,"\n "),b.Vb(24,"ngx-menu-content"),b.Gc(25,"Column list"),b.Ub(),b.Gc(26,"\n\n "),b.Ec(27,w,10,3,"ngx-context-menu-item",6),b.Gc(28,"\n "),b.Ub(),b.Gc(29,"\n\n "),b.Vb(30,"ngx-context-menu-item",7),b.dc("onClick",function(){return b.xc(t),b.wc(10).resetSchema()}),b.Gc(31,"\n "),b.Vb(32,"ngx-menu-content"),b.Gc(33,"Reset table settings"),b.Ub(),b.Gc(34,"\n "),b.Ub(),b.Gc(35,"\n "),b.Ub(),b.Gc(36,"\n\n "),b.Qb(37,"ngx-column",8),b.Gc(38,"\n\n "),b.Qb(39,"ngx-column",9),b.Gc(40,"\n\n "),b.Ec(41,V,1,1,"ngx-column",10),b.Gc(42,"\n\n "),b.Vb(43,"ngx-column",11),b.Gc(44,"\n "),b.Ec(45,C,5,0,"ng-template",12),b.Gc(46,"\n "),b.Ub(),b.Gc(47,"\n"),b.Ub(),b.Gc(48,"\n")}if(2&n){var c=b.wc(10);b.Cb(9),b.oc("source",e.data)("name",e.testName)("schema-version",1)("schema-columns",e.schema)("vertical-border",!1)("exclude-keys",b.qc(9,S)),b.Cb(18),b.oc("ngForOf",c.columnSchema),b.Cb(10),b.oc("is-draggable",!1),b.Cb(4),b.oc("ngForOf",c.modelColumnKeys)}},directives:[m.a,g.a,d.a,h.a,f.a,v.a,p.a,o.l,G.a,x.a,y.a,k.a],encapsulation:2,changeDetection:0}),O),Q=((U=function e(){n(this,e)}).\u0275fac=function(n){return new(n||U)},U.\u0275mod=b.Mb({type:U}),U.\u0275inj=b.Lb({imports:[[o.b,s.a,a.b.forChild([{path:"",component:I}])]]}),U)}}])}();