From 1e62e765c19b97ff35fcb9bbec6e392f2ae85a13 Mon Sep 17 00:00:00 2001 From: Kimet Date: Sun, 31 Mar 2024 17:30:28 +0200 Subject: [PATCH] update --- .../{ => Table}/CWC_manifest_Schema.json | 0 .../Table/assets/TableDnomaid.ico | Bin 0 -> 223934 bytes Sources/CustomControls/Table/control/LICENSE | 21 + .../CustomControls/Table/control/README.md | 64 + .../Table/control/codeDnomaid.js | 54 + .../css/bootstrap/tabulator_bootstrap.css | 1143 + .../css/bootstrap/tabulator_bootstrap.min.css | 3 + .../bootstrap/tabulator_bootstrap.min.css.map | 1 + .../css/bootstrap/tabulator_bootstrap4.css | 1390 + .../bootstrap/tabulator_bootstrap4.min.css | 3 + .../tabulator_bootstrap4.min.css.map | 1 + .../dist/css/bulma/tabulator_bulma.css | 1151 + .../dist/css/bulma/tabulator_bulma.min.css | 3 + .../css/bulma/tabulator_bulma.min.css.map | 1 + .../css/materialize/tabulator_materialize.css | 1120 + .../materialize/tabulator_materialize.min.css | 3 + .../tabulator_materialize.min.css.map | 1 + .../css/semantic-ui/tabulator_semantic-ui.css | 1617 + .../semantic-ui/tabulator_semantic-ui.min.css | 3 + .../tabulator_semantic-ui.min.css.map | 1 + .../Table/control/dist/css/tabulator.css | 1111 + .../Table/control/dist/css/tabulator.min.css | 3 + .../control/dist/css/tabulator.min.css.map | 1 + .../control/dist/css/tabulator_midnight.css | 1115 + .../dist/css/tabulator_midnight.min.css | 3 + .../dist/css/tabulator_midnight.min.css.map | 1 + .../control/dist/css/tabulator_modern.css | 1148 + .../control/dist/css/tabulator_modern.min.css | 3 + .../dist/css/tabulator_modern.min.css.map | 1 + .../control/dist/css/tabulator_simple.css | 1108 + .../control/dist/css/tabulator_simple.min.css | 3 + .../dist/css/tabulator_simple.min.css.map | 1 + .../Table/control/dist/css/tabulator_site.css | 1109 + .../control/dist/css/tabulator_site.min.css | 3 + .../dist/css/tabulator_site.min.css.map | 1 + .../Table/control/dist/js/jquery_wrapper.js | 52 + .../control/dist/js/jquery_wrapper.min.js | 2 + .../Table/control/dist/js/modules/accessor.js | 93 + .../control/dist/js/modules/accessor.min.js | 2 + .../Table/control/dist/js/modules/ajax.js | 465 + .../Table/control/dist/js/modules/ajax.min.js | 2 + .../dist/js/modules/calculation_colums.js | 536 + .../dist/js/modules/calculation_colums.min.js | 2 + .../control/dist/js/modules/clipboard.js | 349 + .../control/dist/js/modules/clipboard.min.js | 2 + .../control/dist/js/modules/data_tree.js | 515 + .../control/dist/js/modules/data_tree.min.js | 2 + .../Table/control/dist/js/modules/download.js | 433 + .../control/dist/js/modules/download.min.js | 2 + .../Table/control/dist/js/modules/edit.js | 2263 ++ .../Table/control/dist/js/modules/edit.min.js | 2 + .../Table/control/dist/js/modules/export.js | 614 + .../control/dist/js/modules/export.min.js | 2 + .../Table/control/dist/js/modules/filter.js | 807 + .../control/dist/js/modules/filter.min.js | 2 + .../Table/control/dist/js/modules/format.js | 743 + .../control/dist/js/modules/format.min.js | 2 + .../control/dist/js/modules/frozen_columns.js | 275 + .../dist/js/modules/frozen_columns.min.js | 2 + .../control/dist/js/modules/frozen_rows.js | 106 + .../dist/js/modules/frozen_rows.min.js | 2 + .../control/dist/js/modules/group_rows.js | 1126 + .../control/dist/js/modules/group_rows.min.js | 2 + .../Table/control/dist/js/modules/history.js | 156 + .../control/dist/js/modules/history.min.js | 2 + .../dist/js/modules/html_table_import.js | 191 + .../dist/js/modules/html_table_import.min.js | 2 + .../control/dist/js/modules/keybindings.js | 392 + .../dist/js/modules/keybindings.min.js | 2 + .../Table/control/dist/js/modules/menu.js | 310 + .../Table/control/dist/js/modules/menu.min.js | 2 + .../dist/js/modules/moveable_columns.js | 289 + .../dist/js/modules/moveable_columns.min.js | 2 + .../control/dist/js/modules/moveable_rows.js | 636 + .../dist/js/modules/moveable_rows.min.js | 2 + .../Table/control/dist/js/modules/mutator.js | 116 + .../control/dist/js/modules/mutator.min.js | 2 + .../Table/control/dist/js/modules/page.js | 730 + .../Table/control/dist/js/modules/page.min.js | 2 + .../control/dist/js/modules/persistence.js | 420 + .../dist/js/modules/persistence.min.js | 2 + .../Table/control/dist/js/modules/print.js | 96 + .../control/dist/js/modules/print.min.js | 2 + .../control/dist/js/modules/reactive_data.js | 323 + .../dist/js/modules/reactive_data.min.js | 2 + .../control/dist/js/modules/resize_columns.js | 171 + .../dist/js/modules/resize_columns.min.js | 2 + .../control/dist/js/modules/resize_rows.js | 98 + .../dist/js/modules/resize_rows.min.js | 2 + .../control/dist/js/modules/resize_table.js | 117 + .../dist/js/modules/resize_table.min.js | 2 + .../dist/js/modules/responsive_layout.js | 314 + .../dist/js/modules/responsive_layout.min.js | 2 + .../control/dist/js/modules/select_row.js | 417 + .../control/dist/js/modules/select_row.min.js | 2 + .../Table/control/dist/js/modules/sort.js | 593 + .../Table/control/dist/js/modules/sort.min.js | 2 + .../Table/control/dist/js/modules/validate.js | 286 + .../control/dist/js/modules/validate.min.js | 2 + .../Table/control/dist/js/tabulator.es2015.js | 23646 ++++++++++++++ .../control/dist/js/tabulator.es2015.min.js | 2 + .../Table/control/dist/js/tabulator.js | 26530 ++++++++++++++++ .../Table/control/dist/js/tabulator.min.js | 13 + .../Table/control/dist/js/tabulator_core.js | 9742 ++++++ .../control/dist/js/tabulator_core.min.js | 6 + .../CustomControls/Table/control/index.html | 19 + .../CustomControls/Table/control/webcc.min.js | 2 + .../Table/control/webccInterface.js | 69 + .../CustomControls/{ => Table}/manifest.json | 144 +- ...{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip | Bin 110 files changed, 86388 insertions(+), 72 deletions(-) rename Sources/CustomControls/{ => Table}/CWC_manifest_Schema.json (100%) create mode 100644 Sources/CustomControls/Table/assets/TableDnomaid.ico create mode 100644 Sources/CustomControls/Table/control/LICENSE create mode 100644 Sources/CustomControls/Table/control/README.md create mode 100644 Sources/CustomControls/Table/control/codeDnomaid.js create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.css create mode 100644 Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.css create mode 100644 Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_midnight.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_modern.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_simple.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_site.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css create mode 100644 Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css.map create mode 100644 Sources/CustomControls/Table/control/dist/js/jquery_wrapper.js create mode 100644 Sources/CustomControls/Table/control/dist/js/jquery_wrapper.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/accessor.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/accessor.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/ajax.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/ajax.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/calculation_colums.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/calculation_colums.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/clipboard.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/clipboard.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/data_tree.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/data_tree.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/download.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/download.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/edit.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/edit.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/export.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/export.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/filter.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/filter.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/format.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/format.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/frozen_rows.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/frozen_rows.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/group_rows.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/group_rows.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/history.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/history.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/html_table_import.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/html_table_import.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/keybindings.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/keybindings.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/menu.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/menu.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/moveable_rows.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/moveable_rows.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/mutator.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/mutator.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/page.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/page.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/persistence.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/persistence.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/print.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/print.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/reactive_data.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/reactive_data.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_columns.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_columns.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_rows.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_rows.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_table.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/resize_table.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/select_row.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/select_row.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/sort.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/sort.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/validate.js create mode 100644 Sources/CustomControls/Table/control/dist/js/modules/validate.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator.es2015.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator.es2015.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator.min.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator_core.js create mode 100644 Sources/CustomControls/Table/control/dist/js/tabulator_core.min.js create mode 100644 Sources/CustomControls/Table/control/index.html create mode 100644 Sources/CustomControls/Table/control/webcc.min.js create mode 100644 Sources/CustomControls/Table/control/webccInterface.js rename Sources/CustomControls/{ => Table}/manifest.json (95%) rename Sources/CustomControls/{ => Table}/{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip (100%) diff --git a/Sources/CustomControls/CWC_manifest_Schema.json b/Sources/CustomControls/Table/CWC_manifest_Schema.json similarity index 100% rename from Sources/CustomControls/CWC_manifest_Schema.json rename to Sources/CustomControls/Table/CWC_manifest_Schema.json diff --git a/Sources/CustomControls/Table/assets/TableDnomaid.ico b/Sources/CustomControls/Table/assets/TableDnomaid.ico new file mode 100644 index 0000000000000000000000000000000000000000..d0c151ee0b08c3f68d50fef4d0556997817bf7fa GIT binary patch literal 223934 zcmeEv2Vhl2_I^St0jc(~YsHGv5s)I%1gT=z?Z4gsHg#8BS9k4w?I1-#X(Ct&^cF}@zW?{leJ5Pr22@aq>w7SnTj$Q1Ip3KxGiT03L`3pmL{bF*o*psv zPf-!aM?^%N$Dqqo8FbzK21P|IY7pUqcOfDI-{MzZUXHS|vIE|ztgM8tD^yfexchb< zj=gdTmqWN5zAX<3OM0iIq@)^CcCEO$7^S792jEaA!lvH&E`P$e1xvT8s>*$T>(;IK z=%bHt>#etC?Q@!Q}2*5&2wv(H9c zTpXxRAUZl4b?Ve{$BM%tTn1qtIC36{ii&cWij0gzY;3GMu2-)fnm2Fm+Sr?Kz8RAz zPsZlWn-3fArZ))dHMRHKwrz9r=GVXeH7>mHLNsjH5XzT=>R5S`3{dbN+qH1)l})%D z!sT!{JmANa9Se6cF))e!wniV!1?E&kKh0P z_n0$h4)*NXH|#4eDk{RPS+j7%4L6`klO_)Dk~hNrq3X|{uR}c- zzIWt25H7=?b{Pt5)(#7sk^?84a00Hm<{G^J{`(HYhH1mS$pKy0Ph$o8nVisZVPT=e ze&4=*p}vOrOld2&?}d5qr_Foe`mbH}FI;L2PW4j1etiraI1nFv@Bw!3-YrNwUEkV! z!@RDC&LwC(amI`p=-00w8Z~O7Y~H%VoAQ_;!Lh1DS`SpB%UqEAlbLY-=*q6?4{RyjEVc+m?>D#?9 z{*PY$TOEYspH>|l4EN##-Lv`lrcIkx>j9?!n+~AZu4!)ncfb1`^t>O>Iu`DQ`A{CS z=R#vWAA0SFJhw8?H|<#Y_vay$7JJU#sp-C@;eXbj=FvW`DPR72v;65fKP@%U>c3{s z+WWONwmgUC&#u=L>sh<*KdwzQ`|D77ttp?n9*R@7;R?dEuq}Hb|Ie_mwqH8Jx#ymX z`1tth^sO92%g3%OU!hpnv!VI5_kXB3^!v)M@@aYVmtW{{P4C(>q4$0$dcN&$_`tuLT>=gytD<(6CASigNsv8AbW{KvXy_d~xed1K$T zdp~sSr{Bs;dD5}v+fS47r|Xt)f2`}4p8x$Hnx=31J)=u`);o$V|GIZDI_*8ZW5@QM zrS(no@IyW)dQ>mUvx4fn72NF+J4#eUUbn#2j!E{Jovw*JSct56|`;J7B}5=6RyAhdKY9n za5RGEKX1J8MqGRCwJtx(gYu-fLx&F4W1GsmXi;oDZnTMJ|9y?8wr}6wrKz-!23=qG zP0^^lU3cAe)pYBfuCzaw?UvD`*ys$6L+{De=el=+?P{(JelZO}qF+wzWSbJ^pWr27f(@mSc}S*72zy-=TEax$(1N z3zuASiJK4b+x^KdK$z87VQ5)cSsCA08T!wUIp!F2?AQ^v-F6$MOqqhr%uM9x=OZsK z@2G{`++1wjxUu^CI#+(Ov$HXN{CHe&!3EW_-O9_)1G?rfV;#3?(*~nPjY3vd7B+0y zP@VSCq_d`PD{p~7pgMn|S#v`K?ITZi@Q*H@=o)3=Yt zHPx-?70)SuI#-;Yo{lkN#yFYnZ^uLFHy+n@@wKqutXVT>OPiCEbJXb-Eg2aZZeH$h zfBTzT6C{~z{A%^3{EJVG9+PJlORv#;k}>`{f7uIn?%cUr{^@<=eSg|kK1$EhJpTCO zF?8rqS60fW%`r&7sI5QYSM;i$jXoq0Jv3@*}nIW@>7x<4@_QMw{`m&i(al*TviI+O?~;pRFxqsSd=u zlEtC2+)s;+4WFSnmJASWJ9g}FWXTR_>eQ)jY(V$yJ(Y#=zFkvneIp%97m=>%w>4Ix z8dH>hp|o{;G=jdZAl=5kZ#s|GGF@@S6^<6;38T^YA+$UV|7u(GQ(Bg8ZHleTEf)P| z_bJ&WyAEMN^csz#*@B-3>ej96)}E>j)UP(tSyNs_v+6+?SWBeNH*H897S~sNmek%h# zBkWsw*|F}MJW*eA@ZiC2{lDar%_CYqEw()W(6RDk;~N%Ro}}*x|3-_y?5y1U*K{mh zLG8a`!P5Mp>H50w`RUfPqS@r0WS49~M7POtqtjy5v5v(zqFMeNR9^bkR+=quR=+wo znWy$reQ3kK==RsK=rx-C$Lh~Yp466~%3kytU9#z&J$ts(ZG=Um>Fapf>Q!@rTHlkB zlH&YzsLuUqSUOfFx@Y%QhLVr!Q%V+v@|?=dUl&KC4E=dBzO~qof6?iu-DosC7~R5x z+D`R>YXf};D^sJuv}?<;^5)Nsrc3)#{N1KO3%U1LmUAiaiz4_*wZfw@%n({ANj1H?)JGc9i>q$vTZf&pi z{q3HWkH2i}p3;-v|K~sdxw|}G{#gBB&4Fp0-#;cKY+0UaYq@-u@;orf1* zc)`taYOP@CGdj1jurgCD9H`%)oSf{6#W1h@Se|r4*Zt?Up$siQhidz_~T&!SrtR;WZy1Y=-i!AIJWC8t;>RgN=*m-ofOB9~06YWtU($u(74k z9GYARy?!*$!}$N^`hOVzwY&Wnjtu_+j_b(Y&F~wl`}@!B8R1>m{qjL|?myRY=(*m} zc&cnl^z-9f_%e*So3-qZ1K`nF?#o&PWP|3zmgtwyt-*K51}FK8M5HO4Vy z$Ph=DX!GM;Gzs%Yn~n|lcF*qX+@7;CvRKb3NM8u!|3JA{%f#G&WyfUnw;BIay@&B% z^V~09g6KZR6f}C&@!m$+@3Z4-|%m3i($Vu$6@@3 z`~QAC9E#6>4EQ(fsV}baKhygStD*EA?0V>PHJ#hLVf@!_`=6TRuklG(|M%v!jF%6^ z=Ra2bi>5=-R};{hxLEs5%GlP!o&8zwRb+;WV^}!aR2{6{2DJGZftTftpERb^?%ukhOYlpy;|_| zhRM9J{l7_++83LQ^UwdO4h^gR`aIHOOEZlB+J}F&eHO$M{vaDM^MxZmkq#p}kWf33 zP`*)p%brAjQq2E{(zWl@6dz55C_nz6VIw^L|J~>TVf@!#{XZ0ohJV>+hT>oTKfcNO zf7Q48JbwHuy+g?WKmLB`<1qfi<9}brbH*e8YvX@khkx@KrS@O?zuAGBOjm5jrYA~2 zF#CV)3#FfAiOH6lejxY{OK2N|HJLS@r3cn|1$m!pTer))xSf!r{t!^#tF#f+A+#5ew`w;H`*Y5tm z;ZxYxv2dYSKedI1e}9|rjw8Ia-&WsY{MY{V|0d(Y<9{ag4;@<@@on0F!%1zP|MR!A z!n(ihSBV&($QSOFS6+F*IuR$=BQ<7xV0)qKuK(}af6xDKIn!2J7X07+CdY@aog=$z zb!({@&0+ojz%7f$y6yzH9u; zH&$qx-!~24Hhsh1_u2k?{IP%Cl<=>$hLWrLnQr-Q^L{j*xAGGHyLa#I@Gp9V^H4hN zn&g6lu+X<}-)g^Sme$drgN(_~YJ7`WWT*t&W#Y2Dl4n%)E6N!&K!MLzR+jPEDrBat zL7$#iAU29VVuCWy@E;K&e-HE->teMTk*F6RhhE*gV%yeykIc$)rXsmwGC(oEui)ke zy>surJ+psq(o5vK|7$YGpR)0#wf`FPv^q7p?vF$3U;7=}uQtj7<;i$Z_?J%}wP!}7 z(c`D_aE|@y=-BXY{{K|YR{pgqwz9GOsV?oB{8=0RYvK!|+2}R=YwpbU|MB>JKW~3i z+Ks0U6(1@s;aONFxPzgLXJtIAKq)Vm@(;KCp%7pwa>{ImVei`D4 z{}|P!WE*4QJ|aTAqu}iu8(k+7jq24!uP*JeZHvY{SkILu#5(s=s`BJO1?7Q4c?G}E zP+2881Si$I=1o>{-ys*mMMs~(DL$^osP8^ zmgdd^fq;^#PRpJAfPdK35{LZ0a8_B$P=bo8Vw6@Cqqw3JrDf$Pp2k?5o|6VVT6oM4?_>Bzksgg{}E~A4RAt zFXDHFb1yjDmwVWk95?{`%%mTe-)9l|@o2cWy3Wb*_W!6!&I56}9 z>(6Kvjeh^1p)?&1-u>?=J>f&wgctc5lFZRhbIZy{Z3~8b@qzNDbF+i9{=Z@0Xce7S zc1E*ZQ~zIMXNLcyLU+07(0*PXJ!R!3C@J5E;_}@nD%p*_CA&~ov6uaTLdu2Rs4U%x zk{wCdwr&B|r%c22*B?iRHqD4_^11o|b=Xe0et*#KYZPTbq;!G^_7Uo!9-r&pu_dw- zzd-rkO(-thfuiC<%9kRBVw99p=9Cn>j?k8asNokc*%NRlm4&vzf;=_@X4IFP*Jo6WktJ*Z++*-^Gi%j#MM_{ z?b>zY;m|s_bGxrtd)(N*N41?=(WpH+LgkpzV?2F0u|EwR>l-SYS6+F=?S-xV-Zd7W zesOII8#ZikKFXCh?Mp7q>o}8R;N!-P!$lWeDGOr$~kFBR)@Rv~rONBDC7 zI7}P&Pds>g5A^DE3Yr|ly+4Wj7|H^DF|S2MdHAmzAAx3P9*_I}@ke|*Z#vej z`U;6jiO9;%Wd4}PT;(%>z`7h4ast`jG4o|KD7GM)bX*f{N6I^@4+W)T-_X7oW5*0j@5ghv?wu$u^;@r*o3->Ni&lB%xOn~>INw4||jp|3?{IgF&uPfT)s(!sN zU|@e-J#+}Jy-wd{UKw9=?NBdVqnPI`ABBU_;pdejEl0ht?-(!254Mi=eYN{-+O%ZLzRp^{)HU4K)Yo&ueWv7Om37)h>xQjTXg5i}CQ`#wrUN6Y;03YoXWe zer<^T^{o6@{VLBoxBDjZb)LnEE+o?A0H1Sd2h-QsfMi4*^#r}6I4USB z^vyaPKX9?WZ$bG92{qCYe8zt-^u5D5w>s6kO56C;l^5yLb$dp!@r0hWd;VC*8u!t& zI<8H@=r9`md9!=ErsE?Cmae4{dT!TiW9+A2bsU;U-LL7oJr~Ls{`BmbqZSj3k>bk( zf@st@KKFrOh~jZ9WkFraf@4Ul`U3HFK)Wx!L33aVhJP>iWJIuxLfikZZTJ0Y{m9DsYiSG9^R0O|T&Bd= z5%Nt4{xwdg;BcyY)Yl`}zjuLsb{E?<-FM&j z^y-ja%?0w=Xg(7k70)!hIl)Nk0B+u2&+@%U_7NiWzVgDkJjKym_oKCe9(`IfALqU+ zyFq==$pXIb*#&s^1R8%(x^69jql?e+nhP#%9_!r$WRAY4e0lQ@l1(<2dBAvv-VaUF z()PvvI?}Ohf2ZXNb?!`4V^1Z zm9N&s=sWsuZ43VT^p}hBuk(YIi`_SRj9!2Ibu{Z)J##=HCOx~kAdVasgjHfJGS*== zj^$dH@5Vc<3me3Fa2`KCItmHIYb>!KIgvm-HHxEcUqS>L(oR2tA)e>5)2kO7fn#{T z0Yek6^=-`ahPf1Ia4My;$ZY*4Z1W3>j!= z7{PF`GWTD%I#S*0SixWSR_A)h>d2n6d-kqk*#H|K)TY>IHX0GCJOaHhiog{YMBwrZBXC)>2=w52ZysNMb_BYe z8G$ZmM4)-o2%JDH)+Lq?Xs2EKDp|ulLEJb3(B z2d&e#P{HF$`sk=A;~IX3GUu_MWJhBr$eeMFxed;XCdh!g+eDW-O^xVbx=-G=f@44of@z}X|_x^J* z_3pFq!f#H*bsZ9L9Q6fn-Jj%~?10!7IvqoLek|hX13>;k;v_2)B5}^?5xDE-lkvub z=ir0K&&8Z4n_fP$zVkLxQ(faHJBv5Df*7}P_6s(^g3}{d<5*?{WOt|-FSo6x6 zNE~q-l14T`;!91jW>{mac)l@~Ki3$mUOX0ShM$6r*P3I)w7%HA@KzKj4oB(wk5ILT zej>_tkWu85h@=F66+A8_@08M)Prk{ui;;HYu61o;*Z+?Gai&L9<6aTtQsxG!$%q`J(DTIjMhPF4ZMD}75_EWot4+d zjT_OkXHQpNqD_2Y^39HQT|A>Q6;H_jmwe|30s)uwq3AwTd%yytyAJX={rFU|O{=QV zo;oG;>BY9Mk~k;oi-?Kc^yO7Z%v4A&RBS@Uww2hE`Z~6Jb}Kf#*BxoZWAZcgk@=q} z_fkC8jcI_Ku?-M-q@Su+QDJ9(DaoA~5UW6OcAM4%s83kv%FJnT*qi*Fn+?5lDU^ z5~(jnB7Imi0;8KCZ^Ah!nBD`M7yJR+mOqcZf!QeEm5!_RGKI|Db*Mkm6b9S zVP9z>Wx+l|oU}?7$cd>iPYBC(DU0H3@vpj-o@esjV&Px>D*hD?RIdu5m{2_%esoXm zsp`>q##MSP`(r#PpB6@==+t;XO*Dqm{B`G6R*DTD!h+UY{}}Ku9xy&oY(Amn*F}98 zm6g$G^!aI3`PhAx>3{(Ps@s1n`@>=h^6G&Kyr> zqj>Er$eVQ&(qC_hwZqsJ|0fn%PuD@<*$AwAF$RGVb&)l?9s=VVA@CaUKb*LKG6E|f zion`O>to8Dr=okyc>4AA`uCdCbAA9>zfl~YjCSL3(g&zN^4jt2EA-;IvPVWBV^;$68T$j&_baMOc};D$%7Mi5KW}@1m*n$MSPTt(qQ;-qwdA$d$s7Jv z&sL|#|2ns0-IpBbz_tIi8T%sIcu-h0{QK$f(`DBWCssOEe!{=LrE>M>!JX9dKUSaG z&sO@KFfDpSpW$ESqiaU5uIpU7fb@U)UHLk?RWJVF=ULBBH+?3ujVtGK6|RjDb2F%q zOWmNXjMwSAyNW*buy-S{bp zGR7Q(?1_z$IwqDfA_9q&4QnX_5}&AxH}9e!kJfSY>&tlp_V1ma4~?~Jte@jRJ&K+4D{WQ<}SC>L@l19U%QR0E`s zy8!8L_Q(2Q(P(l~&>46PoG-E?kPu-N3jup!-8_2<#(^b|4s0(?;5{~AN|K= zK|5OB0o<9cf-uH7{*)9Q% z>uMfR^K9PuzHA7b9ROqJQzTOJelcjoaRQC&FM8lu6uiiO#`6)>_3L2m3sG3X{>JLz z@kkn-fYi}(9D9gl-+=h1Y)BavgOpLHAaz0qeyyF4m5$kJaq=uYRQ-$Lr#V|46K6A3ce9&3XAG z%zo@5T-Cmjo4b$W*uQLeBm>;Mys%H5z}W>w(&mVLfkx~n^dkNjJa9a6iFe^Y{e?P| z0n#nvDTC@0|HmMO-%F$JFFhd5^$X&VGWtZMjK2hd_xob&=YPfaHP2&L;C+;B|B7x( zGugIlPht5eCC*g_gt`KUKEzZG`GH7FU6;R{aT?|XBmQ&P{$~x3MF!sA6>Hujk*F`2}PKM$!jhN3< zku;utfT>-uZWi~8`uOiyw`>@;XTQfTz?URk{V0wHsLwC4tSE^8D#}AQ2Uy9yOSJC* z^`)Bd&$p_7Drf&MjDOZAb)D}jgz^8)^nYuY{PBMLldp+?wq(=;H1{R8*S zeCt;z&iep+(#B%*ipP<==z;P`tivWG>w{&*hy;Q^jI zJPxmmM7GOoiTPye1gShv9nqBIfoEgK%$`^>?s^R9d^V1Wrkx$f`eSH!SdD+R|B?Z& z55PV!+sTF;C%EF0NX&Tj46Jz}0qM_0B0&6SGwn={HKbF{q>f-eWJDZNN5vuY41?k$byDKD@e@N5i{pNm1-^YNVjYfN3?EaXk?ggpy?gJtjD zj{a9%= z%?!>jr1Se}>WfeYrH!nM>~Y6q!_;$;KfNv1zt;shAM`@b%)!W<^BZI>xCa})d=5L( z-ay%wMTB-11t4Vr<)2dk*cYf$U`L?B*#p_U0L$zk_*ePr7aE80AI8694BsE)k#E!g zH`(`1^nax zMt|gfz&%H&_eS>Hmm_0RYvhbO8`&=(i!`?JsqBlVQx8zkSYRq~naKHoA+d+2XJh2Zx-A9ZNxqM0AK=XWxQ$|El4iJm%pJ$C~itKUCkTb12HZ1%-itm4mmY^z(|(B!v$*%s#Pg6o_GFGVHe`Q* zx(4SKk{O)+4|RczR~jOF{Lhg0)+KEFJ7dG_zSy+jI&53~JM36;7j`Xu9J^M%fL&`} z#;&xf*b$h6of{Wp@6HsI6y>vwIR5GEAicc=Wiu@s=_-y7>R9FIm#r#blLL0WGAJ9u z_z&Y>{Neu{4*oUnp>VMFU*l5bP$HTWMCi8g?lznkwHHJ z-WmYu06{w-t_jp0;m6jGz*XHYL}2v?*tli_vgiI4Y47yHidW9SN{&G!YRrMyPoo^l z<~&5!DB1|U))0A<&O+dg4%j&J7i|0gjl$%SsK}qq;l9sNw*EuxwIi@`*;ClC z{Ap}TdKEj?%|YqzG>!r8U|UaHU(&eDzobv0uVa zO6;rmAknLN75%cq`2SAk0DkKD*SZJcKM=%!mE$k*m=`pvFFio|f0^uA)J{=vB_lgo zAzL@~Ybz`Epm@&)6m4FO!mQbx7axKA#djii!Oh5-)t|V(7CS!v3wA7i9Q#rxqdb2O z$~MnN*@mguz4j4op5Gtq-aL!?e_gB={)zoHjMuyrixiH%1>SCsybrFxrjKsM_C@#7 zc3=#Osb`}+8@V|vFzBi)oh^*XHRmhbtpSkTTM++j|6{oRr^zvq=-;yyHe@W~*yP99 zwDbwApZ80oPVIo?*Umu7%Up9rJEU~Vfh^)bllDfLod3%jdkQkgx54@kZlTWq7^nKC z0=t)Selr8uwG!nUXJL2h7;O0JF$5MpfZVU1q%JTHg&RJm-BTtZPuqYh>PRY4;=hu6 zj+Sz-;WCZ~R5+U;%3jHUV2~^>=dmQR1=&{Wmz~4;|LgbL|5npY8f(%4jL*aE|AFOW zT){|)~+LHx^pml`TLOo63|9=NXs~^MGxdYk$H^bT& z>tXHFksRw|yZ;>f{G*%FHs}KC4n47z_5!hdu-2N!)|#BhwCTOmXG6;)ax^*c0~I4bCCM-@tgy! z$MJuT|4{~{b1pFB5Kz| zGSwCaDwh3#Yxz|d{81FkrdYpqnd`VG>P^JI);N1~8ZRG;&%^EifpWsiEZqJF9A6b_ z{+?}+>jy{<|YX^mY=>QrR;JE_lQh2~X`73=)eJ=LD^b6zP zSFip${+7pK{2$o<3;(j^^)S!4S|^pBPmX2()vafjjcdhLE_usC`6k-zH#oIo|-nFB#ecoRRP&zTfHk;osb@%|%vxWZw#6QRR ziTxNC*w-iCwZCUI{?$$r|MBs$^pnsP+qQAN4pXX<{=PRIl?7ajoG}^Ozq*gMJ%f-q z@dB*n+W%zE3CboQleWm&6VFEe+@aXE>M`tE$MK8Z0qQ@}g;Z9%SRR=u+43oNrjDh* zp!=}ti|L$S zlpi6kGj!-`UM z=ikou{x`^#p8M%vIVJxj%CaU?U;hMUdlM-;Hn4r$L%G7S16(g{jA=C(Tv6`a%FP9In~^o5l^Z4gr4z6x0%+(f&adr_V; ziNosji?cU}?b=rMb9ZvwfVwexxQgjj6&F%R&O>p*XY`>n2Ae_4;<`Vf1!WYAWI_C>@1XDFB!B|xw(%*hG3@xM^~yFLK1zkdvn zHi1t6k4IO^$^1>8{;$?m^P3!;r(8=ySgVp`kljn z?!r6RUwR6K>ElttF^969X-tDMfc*d#GW7r^#~@j$^;A`Een4x5DgWq4Sig*%Y+QT8 z^k|7!a`^03CC)y|i&Jt`r_ct+kMLzeF3yqmE98TKZQL;fds zA>-X4w43R|a0PN^{1UsCJP8i^(}6R2TK;i4R!~8oI2G*YLi%;F`~lGS*G~3-^XFl2 z^2^xz$*stqe5v!pyZo8DSoTZfKfM>*5?|+7+vjv6l12GL8yeagsShIm zqWT3mcG2gm{?z|Hf46Q7!218L?Pt3mA$wrj2NM5r)c?C*(H)yNGasUicFPsTTPfGr z78iVsy=#WiUg>xA^U(<_pFag(K0==(PjOA~^G(?=;TnKhH_-O@2^8kdV*8y=*+H4e z{=3?5&%Y1l0BJ8R%w+%PV{A>E#Ho+xu#w||8yDY&{DptxoX9`1W5rY0ll~^>5oiaY zbTp=-bU4nhzE&A+f67$;q_cu!3mSVZ3*tXBCyVyKVf_2Cd^pEHMf|IrjBd0453oJa z&tWP!&Rn8)pY55}tU4_3AwD*KLK_~=l`r}ia%bFtw5eT@IptDhPve@nkGLLZNAwI8R1>z{!Pe)R{Lfq}|P1C|vP8*8_1)@Pzi9`#%m#pGY9y z*avv_XGndm6Efbpg>B}8#Lsx_&ZfRh8zbzc-%zeCu9V+R{xX^O-o(Gg|3sJYuQuP? zyG!G{!oTbQ>&QhYiz{W)=2l{A!DuS zf$+QOGnA&ih8>^Z&2@9vA&33r%*m}0c(Xli@~`B)_#a%~AM}X_+PhV9?SI+sBsTf9 zjoq|_?=J=@KiGhxG-nF!eup!y`?;p>7G#WVjWy2@{}0u}m-p4jR}XP5&a>xX_2{lh zo_Zq!^X|pgWiO*Ndk)9wS5XG6=a?JYOa9V{|2`bUi1M}n&i2RQUig=9Ob`FE2TUOT zuk3j_wr|#+2Rk_rxfZ)}W@8KcGwbJbJ+6NEAX4*yP z&;2zveE2Kme|iUYtbCs44DXSqm3&q@iTX;Kho${L`(P!d+%d$-Vvf??=Cyt7J`?4oeXP<`c>)zu$*);n9n8JCy*J%ed zj$Q1L*t+UTY*<7&GUty7OdiNJz87N^efcl__c8eL?z&iV_c2&<-|<-d*jZRQ{8IV} zxsGFu|G-YlfPI;?q1l{_y}Q_MGlR+0g|Bq@-|zQ4(#`u@yRR`a5C75)>c_>RZ;vk6 zx}N$B$04?6d`MgU5lET!SFD=Y4@;lB1dAU&6<^$U9KQHheYXG9N1i!_dxW&4Y#53S z^Y14;lQ|~&1;-@l-$*u5TmuPW)dkLPIvJob1vl=&Ilj_NR242}7lSrZi)kCp@xZKi z2O?|6O5LS*icC{Vyf{%bi?izalvPmy;c~|34Dk+qTB@J3|5-j=%g zSxBROoNRVCPHTs)v-{D;<(Jq-f1W$OyaQV(2i7m64eVEs&=!{OEq)L?zIcdsz#KRK z;x78k_!F{b{etWGhazokHzdD!K2|+?ESCQ37<_R@96tM7EEe98fRFEKh%X*L11nx? zkF?3xaSr`oTxv6(U5SO*xhaiflY5bzm4$YA(rcZ zI$~=M?Gd^E$i@|~BK^a=uzccGSoA`3d~*Ns`1J1jSWFqTnD}4zXj869J{yUnFJph_ zW~^WE2(~4?j(yZ|ia8Hb%<=oGGLCDM61OD`MI58h*oQ(nWhXZCK5@NwG4^E87s^78 zExywqsZ+YsPVx$5&AgGeLjUGEf$=D#O$3SqlmQ$oq5RNzLMitWtCY`l>H{|BnVrS{ z|MmO*|B8=|myNgmvE2{b|9E|0`NvgIyRUN6@sG{_zpeYXSo429dh~E>`VZ#+*LcME z!RG(cGuRfAQwur%R3aNc+16Ijul+vi+8f?MdGdd-Y2MAqoklyIS5N1>cw?;L+MKl4 zPQ!+`FUHoH>`&7t&Xx~{V9VTVuzB9K91pk_d2_Bt9{ptH(I#m92eg6VasCGbkvE+> z$JCxkeYF#P{h{rD~NSQE@w#|RQ zx{n{CUDGSrk@YtA9$u5sG=71uejZ@+T^*E(^m zZ|xJ*AAUnQas^h6YmKCFt&sChPi&x#^ES>Ylw@lx;7gW!9%Tmg3fci`nzOisb^+{= z$sd4zsxRUHQ2zh@_!mFuyi=!6?)}>Q$J#UP{}U?X{4^cuv0*^5`oZ$2oWp*VewK&Y zR!;tW3HP=ir}BBI{eM*d#sexh9ZUAv`oB!JC*rKVg{$$HOv42+-<`e%P z-4=oQx6@De9Wm6!o8U|O>s&RQV}fu0hVyBUAb-W{#8wh=(-vdMfXlhIhqAp6aqspQ z*FMOeY?mK!uRp*&Bi}E_y1H~sqW-6%8qSM$W5Czx%OZ6 zEV@+xMxXy&#}>3F)B*ed$mT@z*;|rPkv$W8I6hx6_jjC&yMps!XA$pBI8Pr%U)=Q3 zGn#Aj$J8hP9*1=ke@<-EHxKP&vL>9#adM8|zsf%ID<@*@%f};e6vN2l>A(AU?yJeM zz2}-@`7_62*;7ri?1?5=@<4)X`#<|97`9JH8jPrcwWy zO?%!CZ|Ath?HtDZ3v%A2|KGQ6;Ci8JY2!B(+0%z2@WHiQ_jo<`G`o?{+=znNH)1n= zo^F}hpR%ztawlJatg$E2=V=4(E0%!uuQf&P#IvxTzJ)f=|0UN7J<9&pyHv(jvx;dK zAloUx=eOdB6tUHh>iUaPR3WmPGUF_UkyK=;RGz@eZ^mLZ@({|I}QtAA|W19)o!gG{C(3 z8sH=LwLiL(;jTtlaL=*$_}&vR|L(?^cgHc9`}g{o_18GezM~Ol-F+(NJlF!CzQp~) z=G>3`FJHksuilT&9l7s$tlE3YKJN3uK0qYL|2>_6*ynhlbOVhA)T932x>-{^a%*3_ z{nQ}Ly6*zayPJCn-`xmv?{0tv|89hjA36aaKl(E)eCA^AN8S}HCk{axu^yQ5XJY>U zA$9UEuzJiOd^x-e7SWIJ=iHb4^XD%ljTd0)$mUo!ss%$!EFawpD@L{EJVr~bp}vzu zyN1Nkr_!%kBhDw(<9f#!`a7(P6)#dQzH$*#-lQ!i=O6cGjHCX=u>h`jqG199$Np&Z zP{Q#*{n9z+dCm3Lk>*&pra82JbuQdnJzLzZTes@A!zEOU|40}Ayc)7@1e6W{b7YOG5wJ<@xkL~Va8L< zF!Sm2Fz49|@Zob8@ccYX<1=sk>oiRK$4MA>=Sg_&Zzp2XZKvRk+kTEIx1WKx?>qq@k^Y*BBu8 zi6#EE?niq8x_!W;2N3%T@&T?r0Iz6uJZ>F)244Fszjf;=n108pnEsES;uOr~{-Yl<%zXSbyvKQt z_n&TsStG8*{0YCs(m9VIV+HLH1D|8-rX=j(o@s@JTismXmMsMs``TEvZqvFN<9>ej z*SEC=;sv#z=bUp6CQX{eF-6*S)-v8!euO#W=Lr)gphb%ol;vLDO@1qTz1)IF6dnOlk7V0yz{DMrP1UsBVDuW{$t6$ zOPXK6HuPe2YI{05wK@qMnm0tJ^J372`($3u(DVEV^u5RnS26C-Fpzs__2=~g=hB~E zvk3HI+>3E9#SFc9uQ#8&vN`wLy@b!U;By!A-i5>-pX+*71iGCOfi6Giemsm7dNA}n zlh5#8PljGR@6B)}L!Z-`m(%$C&p3|7^UIjVg(pYg7`Eq8QC=JG&GoD8m(O2bC+?$p z&+P@~#slaZoa2IZBO`DEWk3t2r#$pz9{Tcoea~Saz1kn}3g*B2MUm)yeiTD2I$scn zt}K)8q^@X4WChYsEoVt znT~v>4dZqfC7?sA6VRr`sp!z|e00664eO^JI<#+#POS5@&ODQ2H+8Gqch$4{u>N}W z<3(~_=h6w9HEZU0r#A7mKQH2C%~L3!!lY<3zV*vCKW`t&vC{O<0|*bbIjAg@=Y)iW z1Iowxd43+Sa`9iY_Z7Q2Gug>#?7SY!xjx&=1g@K_%e}PXBe|zGLmYi(#nE?eY=qlm zud!l=V;Pz-G$p={tV=1J!bnU^@eCtrREb-BNH4ErMzz?TPFV^+?e7_#wNnor{pWjeuD0=wpu`GAxp#hH@@Vg02GoES2@m=j_ z9K(D@6Wei7F^I1dgSwpKh>wb;e&dblduy9Sr>7fR?5}4(hJ-2cN^RzG=_)4A?AUnu zyNFdbmcG)nW4|o;F23`9q!F4&m5=DLp!@o+)xRCO0GxPWrU-t7FHZ*NHv(+4q9?th2*a`3B#O;rx3PgW2QPQGZ?Y^1QF_RF{|X zszB`O+w$WPLo7R+Ugjy1$DV&bk5=Jd_P=^x--sbLTwa6ukBQ|sqRbA6^8kDwiI>RUQ?^eG)4yD-S4Icqjqild!)5Soc|g3Wy>rBaeyr=*YvcSe%a_=4!QXxg7k2%d#6cVxuM2lN zJ}~e5+f1*`=Y2o^?AT#N`0?XOGahvxOCJ&XjgWU|1p<;OU$sZISh!SXB2TR0G3#`7M=3~L9- zqhMZy6R+*`WPrns<&&`|V}vo`)NrI&da>vY>i3SuAici#EwB6AVUrt@0hXT1(b{|O zn>w$~3y+;%AAClbS6@YPA~d)@1k2ZrUHbE(W6Pt`3x{wS95D~5&5t845`wWefA09! zFm5~;Dg*2~W5e(_jg5CbY#K&Aytr@Mw}=rBcNUv2y`TT}yy?zryDe>}1Gsx$yDR-% z?X5D_K>x5b87qH!&g&0&GDG?IXyAQ4 z!{BTet^6%kIyzSDz8Q|g<#1#?;PKu5wn%!X>yNWW`X z!hzF~`L4d{#`=QC`*GrDlV%^=vRGPnHLLr#da&_hDE0RlZe@UOO&X6wI%Sbv+pLt_4fO zVqLfA!g07Pj*th$kK$izd&Ki@?u@Z`TWy{&v;0P=?cO3l|~r* z-%lCX{6lSt#e`F#;oFkRp1)w6~_PhJQ& z>Z5!35oU$`gkbFScjnRA2$2rO9yTTC^p5)Unwt#HzwtfYclp)2!eEfUaoH0%y?}8H z>4>47VHAUG4kAQbP*z%5dwmGf7%V%RbMfjh*tg-kp1kF}7xSP#i@j&^$7nxP?3Lev zSTX)Nu#QxR`|HgAjCU;B_w(ZSeS9dIzKeUxzonyN%`e({ZHrak#yeWWZezc7Xcyw) zj=V(Pj3ym!?z;LJkB2<$v3?K0H+i4W#gTtC7hZ? zz0w!|>m3U`*Zw*lo;`lEJnxUi+xvNO|FO}ezOW}3M2mv<^Ko^>*rP+SFMUU=m#%BW z-90^{G)cdkduP5`zuFtbo1636ebK0(^3^@VvC});cO?T9f_V_l3Vg?c=+*l!4SqA4 zGQ-9gg;~iW(WzLvK^)VKS8&JFMOfC>$2zcIFPW?I4(cXM!^%;z&VrSNwGE!E@xG~h zj(39j)%8QhdTKgjV81Yh^Y^P-FF5YLT zqjpFGl!0#DkIJEr+GFpY9&W zZo;&WWjKyO$94H#+20A9F7RA5i_R!#bI37L)>R~FjAR;0KbCfR@vIx!=hanUUDV_K zdbF)ld5Rv{GrGWZWh2>?=dweTtz|qz9PI#Q|0lXt*2j?6da@go4I!UXkS(HA640wnWAyHDGWvBr4}H70M!!B?(EqBQ7(A#Ch79h@{4(EHlZLAY zG0y`rnClD&F$^3y00Rd0cVXZll{K$j)fYqh^}*mi-EdX6R_NXC4D@JmEH1yOKDwSC zM?3s@^lse%ecB&~KAp~R`*#oSdpSC^X@$m(8dbLshJW$Be0_Osg>XT6=;Q&h%j*s3 z1E_t=^ZCtg7})bt^zD2u23&dq2DVBdtx@QAVI;bpR|nmibFY9FjnVzmpQBH=3(&7; z8w~8*jrGvi@ku|@)1P(IpLFym-wfzadPv{Zq<5$SX}k97t8mT09vFCKdt7zJ`RLR6 zR9w-n33{}whknhYG58YhN8FO@0oroiKszt)*P3etT5*j9uPeB<6Fk3?p%>Rtv^|sS z7ig<3`$g#oPLFc*dDvI|yL}Kzt1AnY2W3VyeV?^y-wuPW8H&L}SRc&a5c1t%@j7{H z@PHv0#om9H0FmHORxFkZaoVV|J?~w{&O8>Pq-Uj&K`}mi{C@~+C{7f(wLfr z)D+S{S`w4jV$IrB3@foVc_ork*B~W5k#$76_-tD860BM_6Q9rLx8AxJ6Gz;F@lW-@ zlz+2K?>igs-2XGY^U%p$b9f@&d-w!Qf8a!}Ej$S`A2=B^=#T9E2adzL51z#5PsXeN zI35q)(f}QraZLd6ulC>JpLOf%*VVD7|3_0MNIs}Mv_9hJr=O1T6DJ{A^+A40BVVQQ zSRp+v-3#RVbn;n7hC)sJFI;@T*jT-KwZme|mMtAtzYn`#!@YPyx`x)lCneEu^^f$I zotc5IUArJYp)PryI9FRw8K5zv80x<B&-?>@_+O7) z`lDMn>t+NP*3G(!Yu;}}*84Xi{kvL!`9>(^w0A=5~tseRd3va72^kUZT!vjmw6kuFB^e9DKk-$w+1@` znV3BGRkY(8X4$uk&&BW7Cb~MNzAEhNSmjce`+xSj;xc5V(zhA+>)Vw%1DW$5!1D3e zaJ_$PeEP_l`1G-J@Y(Ynv3%0a$e8y83f8_&pQ9`3fM)}V^Y-94kV^UGDW=y>`s$XS zUi#|z@81q?fv^@^vZf<>@qe&#=3lXP>eWblqc@UXzYK|!+9L7w7D$)(Jemq{GEAnPx{aPzCFu?WzgZ$ zj@YtIKE`YRPgs;bpuWI&(e8)p3*rYG4-x){4jo$U|D%k4aLl*H4-soGD}ASo{@qF$ zwC7$$rTlPe4?gbuR4%_<-1(AwOljY{qB8pCXDF3lDDD@j-?nXA(XD$o>Uivz3jgAb zpnj;ayIA5s#;uEIc~T#i?U~lj_P&h1Z{Fu#)yp13!J@mcWigKz--AtG+{0~r7%#bp z`+WTq>v=tQ@xPF__)+B3@74CCw}?Ud`Idjs!hDn#?WUhP?t!Jevi!7;+tzdIT%nYH zEK9hjnA^*%jQehIZvpwVF6Z?M`pvDRztOUt0qkD47+co7f&9f!A#dKDSU2OhSoguN z>3`?1+-LM@=4BkVB`>6poSjHqx*P+p>PNqa9{yvb=SucfV}k8|Q1@3GST{a~eU)zX z|GkbbI@7Ru%{XMuzLh>sdg4p^C|LURSy(x&Iaa-TCDLZl&(Bw5xYyTw?pK(`eLK1L zFny$`PAba1x~U`$W!m$HzCZWS2k0L9{Vb%v?jrh6-ABKDrNxv6C6o`vySPPbqzlYG36t#tP*O+6zWO`#;J5uy;;+f;{_O$Ko6P0)c?@$>Z16txk_5R#}9m zskTGD29LJ?Kf3l}xq3dnsd&DiSm6*pP|~nvW))e+Ncj((zKC?-m^L1Ux_L90o6=|#>mWp=eVR!ygY)gBWe)+ja z_*awz^Z$VW^^OgnK1Dgi{k0S4alfw3$YI}M@Sy%|Cp1^*tqXSeryk(?IzeoxPaMr> z;z_gGfBF9x9=9h>K+fFTv1Vd_EE{<#_x$ZhKi>loppUPD<)cuL@ey_uBoi+?T>cz@ zTt%s})XobR`-qp_+_Pg3wSYqUP$k`bh9a7BjnAoyh&4J5rq99@R1_@aKBMnp=bD$f z570B%xa8khx9~RPali1q1;6EjTIKsdbt4>=7I{9q=n20dkcKXoT}u2@zOkLN{=al#H`hcN;MVr2 zEo9Jqegpc2xTbF#1QOq-^UqZ%Em(qm8<%i@S_a1ZHZP@1>t%EaxQzR6eTjYaX}fRt zY835FLrL*^;(Z6(2<^yAU4$4fCe};ITTYK*T%vR8GZoy+s!Hue5dXruu#DbFp8u!pS$IuhF{}1uMF*lw1Lk_mAorLUp|3u={o3L{HK%~BT zJ=O{POJ1Ol-&xqRH3fTiZze62xr70;NPUboBauanSCWp(O6oH7o$mG~rz|YvHSOQU zBH**EQsKXZ2ii-ew18!uN&j9e-Ck;C+;^xj^DX)mf0cfPVcpto!|svb-`+L+s~>RfwcNWtJKKHR^59N>$UiF91B#X>EO*sGF>zKzomqRr zRPb2+&?@bLC7<)$7cVb$DLP-;l5=og`>(c7ydd5%dsR1A#B;|Z>;ojkBw*;3U67al z3De^~y?e8`S62X)dve%UWnf&z{kE!#7)lw+7`R7GRn=DV%WekpJ$YTNh1xsq8CFJq zDi`lFNDh?qx+BYBg&an?CA~&_3`_T~ly6J=x-RG5xy9-u@EzA~vY$}OJwE!E;xxz4=gs>Y-JEmJJ@=g5eyi=Z*E+FlGkJ5qB+q!56+{fRtQF+b zTtm+Bq=ncW65;=`cF#R`c=%`DOYc=X-QHheL41&FmH0>h?-Oc;xv9{#EOh%%dFBvH z{^D6n{_H8sT})1%4P(eN@&#$e;%GB6KY6{&$-Q+_G7kBWi;?FAXXQyMlb$BoMHpe6 z#Oy_zU7S|tvg56~=Onb+Cf@ zuyLO}PL3DkNIl$y`cG$)3%tDWjHOEqMKgb*KOcL-|C#Z> z|DD+PX^M`*zv6%9=H|Lq`E~e-n)t(y73uTHU*I0s^KKL*Qx=h{vY4C~E>DkgYL=2~ zLKr0vZN|nW*0p_W7q7;xeF^^*>4w^u?yxVtSUf^U@E=mMf!%+5Z!1WP=6&R`D1!bK zlNamwHuBYMhYk>fTKPJU!?R9sB$uC^Bv|91rxT zi{q7&Gld1_pTocOXovqJ@JWiZchF{je5$y}%D{iwu6R3=_6<2jro#K*#U3}<@}kKb zm^`1h$5~$b8tg=U;e8(emk*NKdZrxg<3A*%rri$yx8$OQ8X!07&@YABv6|L~tY7 z2pU;t$Og)TYS>6!JWrm-IffHDiTIwV@07kTB_4bER%{Q9 z593srz0rRA@ck9}f3@!6WFFdmrq1KrK5EfF9d5o6{2$<1*f2FP3Mwuk1zIinOtza6 z^vN>lmr(DQa@wWwV~DwzqT^5W=VMR2SUlOc(fzxz|GyIdejlrE8IN-C;*Eu5GTCFi zJkTyCY#DRpSSI{ogPq7uDjxu3!jPKv z?Y`T35o>Y<^DP_kG!dO1{q#tNl^x6?#~m`j{yZx`kO$=9RY#bIuJV zlBZxReRsIP4rGx3D|)JBF8jbTmJGN2s7d7M`WDzHQV;qVdp?~*QC=@-Z^>cuexc_V z9YY=?KPT-iMrJ9eI81>h*Jy!6GR`U11)u?<+a=Ny7)kwi5*}Lu-b#6fX9p$k3g1f( z(zOy4hf-&gBlj;hg_F?SQu3XsK6zP5_UOY8ID3ZA|0U;1*Q>xkec^l;1GZ1C6?VG$ zS}Qp$TB7_y=mE;{#JD&>YaDrJ8Q0ucYD@#gHHq6CS^F9P^w&@H=fL94ALV`UXt5`O zY2Gl?c(L+LieKa*J8rU)0`k^oF0_Odldap$mpZ?;n#}V`{DTK{e@8!q@UPGHYlYZ- zy}MXK#3#tvk?7lt?dZ-G*Z{&^Uh1N)(RREb%8n6-_Qcj$D=Jj38|(zKg&!=y9=->A zo$>|A9*KPH=DQ~kmpi!_EC-l{%hJN!M%ClBDR>~Dc(mgQw*|G(!>#|uUGD&&97f8oJl-=hI;{SW?s z$8Ftg_x5bMa+@8_UO|qsX_mcmBznLIXh9fhioYYjZxVD)`McETlIwMZ7C-|W9Uv#4 z@G0z z?a+81;~wM(^e#Hbax)X`k%#VgYx<&VYP0aK{fYispzr_e+Rt_QGInfxnH||hyGo(q zl4&FdxVC95D53$-U(squ(;fb~tmgRmSG#_~zyIs}UpV-o;&-xms+(Kz0onQ(5yl^E zxH-tUok9*jnq*}=mZKYgWQP(aTf*XD*5l?&D)8^*ea7AM=avmc_8{;O@c+~IO|T#J z>)zU8z8X%Nzv;F&X*9Vl$C2N5q8(12Vn-9F*x~p|c4*6F%vFA}oj$tu*{wJ9)PG`4=uBFO^&Jd=rB`hxOYlo#zp*G(jc z=u+Fi89RUUFe_aCy3@-u$VZU18Xg_@G5C)_9^PR&@WOjo|Eq}&SN1=L{{SY0jnnWC zPD1LC|M#|@wr6`TaN9{P!R4%PPO+R7L&*d9uH}S}ww+r(LEMSK=9vedKjhXcCCeLl zba{Q9EFgX@S(!G0d#!(PQi*>~891k7qvjZ*k|~wC%mAfFv2`9kY9+^ZTJcfV1P>*# z=CK8uO0MJso2_(Tf|cw~u;b)TKDvJ+BykJ52C=;=Px!HTOI`Q5J#=p`FXw?UPrJqY zg@4I<9`@w}uHwml@+t0g(}lJ>cMbX3Q?TnG2b_SONEVQ8L)%VaTPkJ!O>4Cbq8mCN z_n!Q(iFhkx|`k{tYG*4iO*$L}N$)!y|(Y|FO;txx+_ z&TriDe_@^Z;Q54mIWZg-xGwp>7IUTrzQ6Z(xxkjp{FCK}KX2Pud)g8HC-T!jW&2or z+8g;4>rnqiUYbAJ&J};O?JJ(P?cp!s6EM{FB}}uTysya@LXNu=dCUvy^fari|Kq*D4sIv=}9<-7JsdhYfDfzUfTEU9fEc2^Bk)!KZmbmcO zmi*OomJ>0;wr%;0b;xz}!$Hf#Px3VU3;RC))&3wFAekpb`M-VqLqCq@F0*au7TL=N zSlTz_|NibZ+Zs8_cE*2-f6-byush3+9@z^fj(hEKZIbK^UeI5}C)F;=K;-~kM^0R` zoqdgurzAR56y&4B@bUx5PkYhbwlA?mvFwGN zEc5eQ!3g=dBc8YY@uRF{>! zS}TBOI^Mz>`l(~Nc8s~XXVYZMS@OIk&g*CEr}wbfuu$7DyRRjE{$ExQIo$Roerd<^ z@yEj#CqE<8etFm30sgOb%>e!@3e@&QDrXUwDy zKnfge9FbEV?-M&ATge>Iu`=f(Ta6$m@JskM{E1wtkK1-~g6~pU{A=62>jn z{w0ngpWl=J-8KD8{puCz$CCYJ|I_-olRJyCM;*mBhpv7w^&@=oSPx(Mob8T!-jd*3 zcXYX&So83K0RBB+FwK3%^YUZ>;lB>wH-INx1pfQAuVxE}TxXlYuD6s)7hC$2i!Cdx zmE}&q*m7rGV7W6}SSEQs)25O8FYFxhUbV8sIX77bIed4L@B4W2FqRC+ZF>N_fbxbq zIp8>R#nWRQ{sjVx?EWW({SxFG;a&id&X3*8Xj}Q-jdm#IV=IL3Cw+V``Lx>FYVzeo zkGjTUCUt~Hk$)Tg{}BGT#rYdhh4))N{`bGU3;!Q{T-^FUxYwG8w})T+Pd+l*11TE_ zz7Qd`vH$h7z0&_rY_;7PUt9X>cPt+HV$+OXmN=!IrO)hU*`GX!AHYkt6aT;c_y85} z%b=S3FqxtEgA3XI%Sx!f^nTjq1bcYsDRgyK2SvddKhUDFmjaFb&q`QVIkFkE!*_Nx zbA}yUH^BC+{GH`|db_30YGo;0>sZh2iLAn&nChYd0simp^AP@NyW9JWPQ+N(1OMIIooi{)Q!ID=G|P?u z*mfdk74P3d-=o8oYn_8}V~x2Ke?SlaU|xES)8jM;CGW^yp*i}~{QYO+UxUqDcSYy? zanSI)DWIvs*YbyvTqPU1AP+ln#U~s3C7PubA#2L+?`%%evkzgDE?id~m*+wp`U z*aH^X3H*f0@DnIGi7y;|pmi}fp0X`Te-Tb-tjF)wPwEiXz)E(p*1idT__^(k9cDS7 zJ!YH6-()fGw6ur;4J~HKh2+Y;#WEH=Y};4AWk-_cf&bOuH{bFzH#_-Xdwj$PCHr`G zF!6oGG*nzu_8#LKC;zw_?EUMG&2!JT6qZqvZ8!FeEa*+*y!**vNZ!5=F1F1dTw)0m zZnn&iAH+X*0Cta$Fqy3dySdaCUjQ&5yT4i>Y@8}aE;s@I#E(H3lE8loddCnu`+(Dh z@cSu8$1mHt*p6g`k>(pe>!tl|+b10?ZOWyVKu*+z5sfTNf=SzQbsql^zn@> zle~*bW64E6q6z-VE$#DHTUh`0)!p7;r{jTtjk9!r#VhgU9jE(924uarI=0`?b{AS^ z0%U6_|n1rQtrd>U}d@e=qX7vPj=(elGWE`~Rr+8b}Da{g*%_=X*edd>E) zeu}*Dzd;r!FKy%twq?m+>(l89XaCb)PuYYNhr;ne@Ls78NM`hO#pd`53jYgVZDbqA z)+ZNb6-%L{kF9PQqia~^NRA__S?Y)?miR#xOBh~-eBH`f*}&!e%>L*GJMh=r?Qryy zb~tIA6>VRPtttincz~LFYvZzgBPi2O_y&Idl9eS3oP^J4Ev@7b^kPq(9Rd40qd&0R zubw1NW>;HBUc9vf>e`xD$p1a4nQg*1Kjp)_UH;wu=smh$>;E~)5q9?-w|RTh!MAW; zi}_wnv3JM?F1bfMQF(N#i3ZfIX`$Ua*pBR2+;F08*QP1>|37C*AKhVbqpz|JL&!D$ zHvK_9@WjboEd7(;*iK}QJL0s(~dABd_w%suurV728DF@;*71>GRal zRV-^PW58I%4XtJC-*04}y;R>GV85{PGI<#H);B8ldNb~B9l+^-!oQ~vcE068%MBln zO?9B{iW_WuQ^#7#_OI*|bldH1qVA`V&BU8DZf-wU1@^(e(h~(X`1I1`1j;qhken2zk03+Vw* z2KH#lGFp*1TEE!pZ*~^#S?D!)`^_`7<`p z@wn}N>((Yt9>)h#Mt%J;R;Os!Nqm+iJF_6lHILqvBiod5Zz=ZnqV3D=K=Nd;_bPh) zW5_byEOF|kmNdSxZTX;v#Sg1u@k8lfu)mq(Wel$7`HZh;`}6Sc)_nCH^Fcmevj62k%XUS+LVJ)uHoa%Za*(C)D=a&dhKjk@ z`8PS)g>mxinv9vF0ixTq6(037{=K39d;bdJk^y~rUo_S6Kk-D-Qr+N+BMzLq2?a;d z8XEY)FRTB*!X9XQ~pKETF~DTXLhoLS?w)lejn`P4>O*xyY)XG|1RGh{NIb& z7g+ZT#y|5!wql?EFM6%1#f@!b$>XXc=hv`wl`%B~azHgp8&lQsq13Texd%O995U+2 z`tZx9mNfYi_;N?f`t~=rW8F|Y#{Qu4BMG#RwI%2mt#|UiXrF9;&QFHxCs}(h+PMjv z_9Dw(HP{l_-y1!tyM+(G+Ex#0Vyj=TVQXHm;!5nh4Q=D7R<=2;18V{OEO*&6R`3Bt+qQC`Wi5Kb zQfKzEO=GUK^+Uk_pz5|_KuufqZVOv8`bPE!^|OLyuiE~&=~k4p64$(B{OIscV!h1K zYp|mA46U0@67~rS`?B?cuOn%!WwM7d|GP)n^BZc3Gp@4D6Plw_)wAT$H7yN# zn?9Hy0!~(VwTZwt{^XhQWO*@CwH-ygrr>j9W)9 zN6$p(FWMGk`!;^Wym{SHXaCZ+Ol-?O)eCLocyz`OJ6qQ058Ix|L6*97wDsw5wc8V} z@s?fqO#C~0Aag`V;a~YU`w?H}^Ec12E#sRa``7UBKfb1AP%o;dN}ws3z#~C9&Z4RAMKCNI~zNKROrP$0)Vp}?e ze{0F!&FsDZ%C=*BPXhbvCUvrv@3yif1De>fS8Ld6_)ojCi=)NN_vP~0j zu*BKDEOp@nmi{Gj!0J~leEy4edsplp$ik=N-?Mvq_CMN7o3$?5pe{IQf04y~^_J~j zGtlzBe9|)J5MLmyi^Y$*%r*>dXwmP~uoZ7su@!HHKm*RV4HG+9CToz}SG)-gn8p6c zj_+vz;49A%lI) zdgn?zj88||3DyI&9)o|Ad;-gzt(N)Af4<*_v*DZ_0YB>Mf3*HD+y@tt0MSbVgP=VRyJV26@FwXI9R_ne1q)7UoXe=RL~NPSy3 zqB%DEHkP*Fe%rBf0PBAv9R4-V4*O@rzxcx$`0r0lsV@e$u=sJ!!N2BWZAvZ6U>;_J z_1vj-EN@zESF*#n7KS}=N(lGXfgfQH903g&+rpA&w6R?Dk-bqb;q1o{-w73^#-=&<(jta#VQv5im;Eo zJ2=EP4Q&p+xtR7}V_PP-vxMnAEq+EHOJl9>n{f}}_i&!e;j37tl|FEq`?7&U3q|i} zw_`{K>?d>Y!`{%tk|(x-mR)FZ?>E5SSi@F=|CIx)+p570=b|04Rz zieFp7!cfbY(F*$6&=STV^N&I2N9M|!RKxP7*0e(UdF!-#mOrh5<%ZR#??WtSN^Q%T z3{99+$5PN0k|yG>@pjA8@lU&*ZpYZWqr*SA58z*Y62f=4-qhH#zC(8U?0(Dp^q0`0 zU$WLoT$LryTK<}Mt#Hc>+nu$FbNOff|9v_az`oXe zoLa9tIM>{FMSPHXqPZd;Z~4OLvt%s(p+Iko_p?5ni98mKkIl#Idmm)!^L_=tXovoH zo~;KDG03N}!y3a6TU+wndu-d%*K7+ue0@4x_ug)9t6!;Yt6qZlzf|2K zU!jd}*0GI)8et1N7g}=(_`HI0oyCp3-qsDf23+23^9FRZ-pp&|+Sa^aRy7NM z6Z_-4O|g3-<4o;}?EW~h0a&*~COeWB#rjz;?Sfth);muk@06WDzQKR*7<>HpZyshl zRv@c<*28i?yuvc4Hn9wNeJV12qV%Z=)u6N0ZEILf+eshqm|5Sp&TMG;Ga5j1>sjs; z`agjGWbmIj;e3z(cZB~7@8bW$KW%d{pVZy}{=L}ciu+QH7^GFKcU#sJKKs3;%<67w zliH(uw6TP#$UPt3g>S`gEN#WB_*PG`gL%toS1L<0*qzz$;%7YG9{^7EG&YIq)gT136P9r}90v zf{bx>kQo{x7eE78x8C~MUA8YAIUse0o!T9NER%)szk{~r(6(sX3!lkb`hsQ5zsKTf z!^WX4EoMMHXX}rCwU((wQP#czt$UMo3FuzpunR3=*hSdJF2+88A-2Khw(9kkHtm_q ztk;co9sU)^+}ryE?yCjipSHU=2pkpLx9cye+Lwdc*yeFpTigeiB2%4jo8CXi*1wBf zHKY!BuZ8^)+v5PrYtln%TI`^P=sTA|bGujy^f-U{Tf`-pXUDg$qh0Kca()l20T?k6 zj%TumVm0=@DYiZ0FRW+YMl7#uEMsajuus2D#J)PQ3cMV>o{}}Wisgq@v+dJs+qUU- zEq^+^pOPI`m+xv@)7D@=0fw65~XE zDL?c7AaGZnf^VSha9%+GoB|+g0N+6XiXjjs+*eG|_Dk)x0{pOld`FIKW1Tt9_9cB{ zdEtXCe!+vbcHE7~`zqUWZL=-CK2S16YW|CnjO;gZS*eV_6Z??Y7VxTuj)i z(*KG7;OIYN@7aYs8X)Y;E-aih#UB34>#NwuFEnKyGzMEWusPST#1Yjk5qne;cE6PI z*#0J9hniRoT2S4xr=Y7s4{|736ImlfH_b$b&5-Uewl4F!MSup}ZTr`}Y{lubiF2`x zJ<97?Kf{ih@F6j72C%O7pv4hqYx4)_*T~o#2G+6l18Upa*XvmHYqhcasnlT&u%2yv z8(HTa)&MCR2RGxM2Da+C8n)_%`Zo2C=MpElhBbw+dwG0h`txdlu z_IBvy_&mJSiZw>;dxPs^^GD`?yS9_7Vg}W)=)pBD>MdvxxQ}|Rx<$VXy?p~+LriNNN{4yWEp?!%9FmvFSeT$`ZxL@d zW38i=#Uc~L&nFJfa(qfR&&EB9I0WngJp~OwFlCmC_anQ?pW`fl{|=epKU)8%PcZX2 z+n?7xd=UO6FY%w`0=bL{`zo^Z$)D8uU7gs&TI?qLzdyHak?&jb=TBHHzG$n5oMS6r zt7a?yhjlQA|Ju-Pc-2Vc;2F1D(!xJtR~~Jd(H|09x-CAT!oGA~4+pXV`+I>r-O$6o z*2Eff?>*rEqvsmins*yp9C~m3`{<<5fCSe061DCm+w*vM6?SNyr;TII!oMW5W=*0% z17x2{W1Tw5`3Y3x-X@klqqP-&^MD;9w$;(3NyHZW5Fdds;&%-s#@(aHot=y_d-6Q% zeM22;9g;j5D`!oE@;dAk~R6Q7nsJEvpc3j^=)|LjQ=(FIB>a#ad; z*K}+!Y4mL}V?cf8+JzP~uAL>%f7A+By<-Ox=Mxt$hP~j~OkC~p zLbt)UNpwJe!h100gU`MB|Ih#Xe-Hm)Uw$9~zE3zvV)=M<0Bb7Wu@{7WXvKSzSR?w{ z_D7AjY?Qco8}Pp&zpxF&fJ|8MTgzNJ!0pM)-~5&J z?cR>~KZ9F~A>$|EA#o?$%Xo#(y`o2-es)zKuO^Xie~s4xlxt zF~TxBD!3QlO65F_Ih;Noo)7LbDCx)s>En?N#yxXW z!AJRJ+p+pN%l`ZkOPt=tHXwILv&J4hpgK4c?x1hz+w0z`g?wMfqQr->zeNwM#&^tp z)&bU{`$VZPpo6PlsA^FIo7jghTxq@9)VBu6^j1Xpjj$s2P99BWKNhzBt?Ze~`Qi@NY_Kg%IEQt9+3%o}*!nWDsbo#7 zi*GdrnLiu8pM@TfJ`P$7olRsNFaaGb5gTC&V<6wF%|ojpqtsxW>f4;B>)5^MZH=&b zIR5YO&zRFbe|&Y_`2e{whxYMZ*EZ)N z=MvjE0r}<=Xj{blb}a2PJBc0I(nw_UZf| zPaYS?S9-sAzp#%?p!g52FWHM-O00=P*j;x;VH5lEY1a2|v)D1$Sj0PxY$bCp{8jW& z>|tx(XwJA@WwGPCS;EJUS=RD_R=6R|iV9ZRjAE9-Pmhw^Yk8;#d_q9CD4JD?44ZA9?E48S>e~WTh6?;to2<8 z_8T~Uo-&TLee8W{ljt|>`q}9ET2slHf(`)w-8w&Vl<>a=8oK2J=m2uR^ScE9vC!u= z*dacCI>hc5|3~KW@GqK2TPa@q1K6j%K7FW)t`|yti0tK~Eq%cs@OAEPQSV)8s|K_H z|8;HI^VN|Bu)V(05dMOEGr5=Le)$x!SI1jP-eO`+;Co)|@9$vUI-ubCcoo`z#=nPs z(E#rc0?C@5*7_6!*TswD3p4@#m7h31GRN?_C|JQ-*c8iS4_exX_@R!y&Z38&hYh;6 zt$^Q!zflKUR8wR>us^n&ZJP6lr7d}#{eLrvkGYgMm}$1BAj!qGtWA8|VE*s0NmL2iWsQvj#l|j8oF^Pf11}NX7>>X_Rc& zviCtFpaCiHvv_3HxG}YnZ#}zq8hk7R88&@NW7f?su%v01vv1`W_zGQ$4GWvoyY=9= z$lb#6%dD}1>u}Kk?3%)T>=5wvPEGL7oFB|JWCQVj`2?(ZO}=?8Z0)csuw(bOr4t^q zyFxE>IkS8}IPrbw^8@}B`%Jb@w-18$H>k%x_^Yeif>&Bw#2YPa)oUTVTe^ma|Bdk2 z^|A#Fu8Vx4de*jRXoPsb%38)Fin>Rkw?tu=i5+=`B}{2+86S3HpH64X|D=m;UD(bF z7hG@ob6UaYvG-5bdI^0gJ03;&PZkZJ@6sn#bM`+c}-jmj`4YtWm={-+Z<0-bh?^VkoA3 z@>^R!xsR=R{|4ya`L^=K`nK{}=~dOC$&FY8z0#6r^u=f4MdFc8XP@T^{Dk9SUc@I; z3>4|L`jb&R@b{mN|D2p0*OFkG=C|!1IjSe5|4YyJ{x|{uW!h88x(SjJ|6x0kZv}fU zPaVs!(!y1?f749M{_882IO}e(-`b+zJJ%wyiG`#0Mld(m4sMRFd?kKAoo(~12gtee zycIx~59Tek6Ra~4G=hEVg?3x7?k>KykN@f}-oJQ)hkwP1tK|P4{_lqWPkpK(_^SF7!kE~yxd0dw{T$}YXWCqrz_Pr*tIgl@Fkd1-;yS=hBuZq@6r5bWQfJR!(2wDmwj&~Ykn(VsfLbI6*^Z9xd0t| z5M>~GcR=o!%)bWguZ9oBlhp!@ngHISuscZR-+(T% z5naTi0n}Zx3-*CE>=jr)>>SoGTRPvI^vUPJ)6spV<7+d$fm&R5_ z_?Nz;J-;>abykiC$pOk)=xm=liVm&p_$KT{{5%pKQ}km zHR)f)zbK-xFT1|tLI8fqqhh?VrxHIOotNWVS&nbm$wOeDc&~>NKEk(jkZqau5O$?D z*x{NXlhtJ1xt2w;{=F7o*v%uZwj}0z>ckZ}XHzqQys zW8l3}U@iI$@nd9eVSg&?X$zjPqcOuRdGT0c;dczg!Vt#2wz^!qw6PBD*ZQ~P|MW|3 z`TyL4{dDGImNTO_>wnkUx_2*x-ZVhZ!2W;^u$B@@A4I-|&LtW!Q0sp+EDoBm5jwE$ z4Qv+FHIn{{1d}neCGPzYi~k@5{*B)rK7HBH!91;(Xnl{84WE~-B$@RT+4d4yGfBi| zBAbBdLMGRxXC>kPy9xZSA5s-Ni1d*FO+q#jjavPBL!19hL+f`7>wm((#+Ei#ci6AZ zn6nR>_9`CeY4~S7q*KRstqp*c6&+E>o8)&E`1Rzd@o z{{{c+!58EE$UX&Z0qIKzTmIT-qVJbuJ3WbiPwAmd{CcCvV>KTe%e&Z! ze}^s^ip<42IP)w@wrK2r(QmUZH|%mt3d7FCKD4d)s_(=<<512wcAUNPWyEedrTwP- z?cTlDdiR9?lNYx-vR+lj+sT5+z;6GS=82mt@(U*p4()D<&Fr2VYPmJ^s_(f8>H*T!*i0^bCNc)Etwr^|70fe zQRWnM{HgWO1L`6B*P|aBAOqBA{SVqW8C_~3znOsF6}nd9@anetJ@!})LFRuOn*()- zp+2hD3h3nWH(S`e7ca2;JJfbLo5lZ?&q+C-wck@kvW{W`oaPf$t%h~z)DgY|zrZi~ z#I6Y2mod+_M~%cz`DaU?b`N`x@T+>InXP%YrmchyM7`P=IpiAXLm&LRe@z~^m+(m$ ziO#tOA6DrA$g-!c1xmj4=6>+eP0)YvA0KIG>2- zg=kGM{)PFomA~B#TJ7{A*+e~AKx_Rcu>BXa22h57Pw|m_JGMOr`n$k(M83z~li#!V zzB{(QE3koK`*Ln6A$p_f}?R@!sm-x6Bj>h$Q-!@{&7#+h8Fg6CtLpZwfNoPgTop_ zG;2b!FCufof8$t}OBmMBQYK$O42r8P^HXeE=(i~g$&>RXHX`g?xnK3gR&)opOUhSw zV8^(f<87AnWgqPQeV|=E;n(=Tsmu$toVgt=8(+cHY54Pwztm!fw?N)z{R!MVJHYGk zUi9%u@E?v1J{lkV*iqM8{Oo%y{ptx>~mZ}MDRZDNUC9zot(#s8Mw11!*f;oqlq zo?h(bJE{!^8irIQmoI(?YZq8*Oqgx@{8?K!{T_?>ppC5_bOHQTeh26P;D4QTfkEJp z5Nk@K6(hYlK1Lc40{FE566#xH2%-{tGtQ%& zZ`m_1LO!BQzX;nX^bp%XGO|&^cxVTE0k)tUZNdj*Gcx~Xu)hU4WFut_^mrBW(YM&< zmN8F08F;<*@9O3M()?HMbgg^p-06Bc3jfeRcN9j56Vjzi7st0x;$L1u9GT;LqHKTa zLe`s!skrDVXc4}c?_O}o^{y)&27u@Yl(-zngIQu^zjq6b=_R%o?<r{41Cb{*8}+ zhYj@~?@*3!<^0v3_Hk*SgCC<#G)cvahotxjKU7%f)9>hu5{`-udxE3Ot%iS3DSn~F zdp5Io{cG}Pjshc3Tk7=NY~!%2;Q7tb^|A9|Z;Bk;#G;2^Zm|Cbi$z7$rrOK02q&;>X{(Ifp%f-R2E{x;Pcc$J!yq2|BJO_j+CujFIfIZ+s5^sEC1VeF8?p~p8U>skYlvq z%lj>zJwu5z+T(xQihcKuz&o~h)&s(^@vnSI`hHzojeZ{S-Zki{yPR#KFXba+S!)4Z*Bk9RqP{t zA9>;lC+Dtt?{a5flO7Pqx+tWv z{x_HSBp=^oY2@%sCtgp=+}518CZ1Sp%Up1yqno*(vKI2mO_n*2Bj4qGbcto6OC{ph zyLog2`Was*)?YRcfd=qi$zU7d2hqr6D_^N=OWruw){bdsOGk9K$8NotScV?vD{vwE zj<6mm71slwLqkIy`ihBDQbJyn;$vxcWCuQ3NppxnMl7j?Phi7A4t<-okyr4Ic!_r7 zhq(^l?Dg=XEv$D$je_6uy94f($o`EA7uYT*APzt0N%%MJuTkY9}QLf56;=OYXE?{=AeG5!x0JNrIc&U)Hk zkuSe^v4MT@Ty6W7<8t-}#;_Kd@KHDR-uEL8_n+-x9P8Z)@7sx_QC6Bfo+JJ}{ z_zSgc$@8^sG4|*c=p+$CZ?G*h?!%Anc`L*>;y~J0q{rBd{IlH-9o%m7=g+m9+TMiD zBRfX``@YRf{4aq2npJDD|A+j4eAnrgtL?J|)OCBbm1fVkLu=mxpO4z6NnPOSms#vP zEm#A<2F@DgTKpm+1~s--gV>+&ZcFU_ms!%(>ycmDTh78;vD-d^FY|Apd%uO|Jz)ha z*&hIH%w9%5S>pTXn786#D_BjOhVaMmeSDPfe?|O{{GVLZ>oyFUB# zTYb~MeS14h>{0!la&a2>vo(wO!@G$6jxMk(W(YAQp0K#EP+L9p5?g_P#S-4X0{iG{ z+8_Pi1YTR z&o|{B)>?q{0lz3mx@3~SSF*BmEQ8->QnGS#Et6+tWv070)j4UgmJ;)sZTfDEt(^9> zEqdoxoAWdnZ*)`W)Yc;U{d27L1_d*t?ofUQ(S-{d++&Q+M;of*!&@(HtnTrY~s_cZ2TWu+PL4hv`J51VjsQQ*1jHjw=JFi zgvEUJDzS!!S?bD(ma%F&@wjJMX824?i43DmwPZ@-nkkkP#W}I`lcK`77RG*iO2iaP zT|LPXmXEac?7v+)`x*Oc!mn)6+Z}EGi>>hGYig7K(8MPHz8O9V=h>|PxyI(b8ERjR zdf3)1c%3-qV{FTsMV1~PZHWmRZPuJQcF!;Gw`NV6d9rV?&Ksb2-kP9i?^J)(K|VOA zDR~e3_qO@7-?#L&bBUcW+`?!7*}fTluPu73qs@EyDx34%MK=Avn_JjZEo?I5GU+du z*t8d~vUvk-NExhZNZ?MZ1$^HTiCM~+vKOtb?=>l zkJ9ufTjHPj3;Xz$Tj;00_RW~bZQRRuTell8a6UbruP@_z2LAnd?Ozv-kBa{}_$a*P<>fi- z&7C{f$^Oln1;+IZx#q{vfM8k@e6DBeeVsaWvVQ&gx%c<)-`~j~%0uLzD^Ix2bv#>n zknj5Io(CSZeh)lE;n<&h``>R5_q)p;yt|t{aBCa%w@d84_D%5P!j}{O^?o;0w_n~^ z+wQ!nf!*7=iS_SszCF>9r+u+CxvxGLxv*&s>vF?6yz5fCuiH6xSG$IG zXPbIvsF~J$>xa zd-;5C7yA|Ek^4CI>rC;^AGtTw9=pGrJ$7GL?&)N|y89M;_^unsJ#vNJ)upA~*Rhe^ z+cpGWgj#mzb(Cv~(cQX^-QBi6aW0$MgFP;`U)^zoJ$OfZ;@npzwXS8osZX!gwXNs%b>05CJKHz52f8)4$8Wp99>4u6d-S%p_Updw zD7R2eXjNE($wzi z(8zAPsXo5UA=c}<+SZ3YxQ*kT*R$5onB3dG8S~;2yT3u~Lb)|C3YHGZ{^;@TO& zi9fIXqmLKmxo$@e!2bOnU@kpE+aIw9?`1Ck@@}tR@9Jdt_P)mM>UO@}-KB}$*}j4G zZ4+X5+)&%@xVEOXxg%k_`^zGeH9oliL-)NkJWaBKhIKY+O7KIM_ANuAXOy+byJTC}Y;?a{LoXGeKx zYx?);UVX<=_o%4tdRKkDQ_tmG`%~2)dXM(CHsW(*&YSRE6W-rY_i@eb@rBQ8oT_8z z^x}J<@6g9?EY()(ahlAdK6CA6O@MR7305B}e{M}=XyHips?WRhe)YfJsrNV5yZNj- zy1H^rdyVzI>R6w5HDIrmj`b*_scJ`kzSEvNcMLjjpx@{oik_k3?&q2QJJeQP*Iq@H zX1a&_wSPH;b&eYJxzG0hN6U2y^4a z`|I$|5b7kqYQ-5;Uo_+U<{azNU&=jRo8Q!=PU=q;yH~%Z~;@|f}_|bL! zUPsm0zwgX*ef}}U$F*NyJ<@N@nC48Hca&c$DZInUqBucOAsUM+*2%f9xvM?3+BfH73j6B_Tyyx+k^8*4sP_gHM~i|!yFO4`E9>Xh z>l_vXbr+rF-G2Q&e_qKkUOm;fE}tpwQro<9$vXO-o~_>o>IPmsI>0qo7ah5WbMvvvJAE;=as^7FZypynglS;fFr@J(K(VbAP@l z{RP&KGHk9zEU5$aiV^j8{!+Pv(LwLbaT!1m-jBeyeKt!u%wK-c~D1>gU#oCiP4e`fGC|Czzp{B!?)|DNEZk2(3AJKP59EZI~0@x1xR z9MHL&bDA@O;=cF#$HlMHGyJ*X&rdghm~Y(c<`2(z{H)?$JxkB_#zD_fQJ+`f-;J~X zejTZsXtk>o=louH6V|k!){`MT9Jsu}!j+2b>=m|ljg6iG4xlgIdElDx;jZaB=9QyA z!VS;h`IUv|X|A4j&HG;Zi~7^Yg7z*8pNjS2;ZPV1JX6o*{?m%CsZWG4*Ehk~&~JV0 zR?bnquX1epZD0)4U;aFHb3xCnD1I9PN9yQebGUY$@g4Qhn0WZ-yFk4v-Wliz)x(XS zdxq*Mz9H;u?1Jm~{qwWURb7)GsA45m@EKjxJn-kD#*F9t^G5ab=oS2#dg{97xXU~2 zo~QZY;Zx7oz24kCy-q)LUG4Des-tMs-)r0d-tW&cmVt3Py+8fF@$c7X|6J`4#%S=l zKZh&ls;}pJzX|jm?!j{?;`#o2{NtH4$iE(ZtiXw12mcsUZ|?VLfH!|s z?@D^*_s2hV)H6j>Ra76>Znepyg_UyvU4!p}i!XzzE`F)(FYj6ZR9$$^|E>G|G1SrP zBOiwz{|aC#s9)W@ueevVQ#{5im3Y$gDtV9J_rb?A@vph*&mE6H25_f74~)Avmwa7B z^U9m&-W>4wf@r>9#IIZtopwcS^l3itme&hAI`%d2n7d_7v|2aOc)t<9FKhO_;f1Lg3_ox3%{~c$%J5blt z=ehqI)x$sck3r7~)LZ@Nx7VXRy7&9{{X^GOANt(MajtH9mUI~Ti_3RRF~g(>db*&u zhe|S``nqyXd-eGj>+rAE{eS)M{4w;#$L}v4HMd0rbUd^8_f_DFzCQij>-S*12cLW6 z9+*oS(?Id~q$k&VJUTG;8h_W9`pud0r0TA@t)q_<|5!;Qyze~TEBa8uCwRA$7yKjd zsrb%6_rK%l_l4gFKDJNCh5vrPUX}e^DOdW}0&U~jem_*=!oNq)Q@@-(pDW*~_XNMo zJNIavCo6k2`fra*@EDzWUimJ6EdEBlX^UT1^^;EzD%*9&Gq~pmzf->;yPb}IPY(2A zMg-$ta+Wt2D`~9y@NYc-=kLziKN>T?1dn|sZ}#S9CGP*Rx#f+8eycgnQR6FotLWU# zb5CZ~9CYh}y6(QyZ#4G&&gTjKZ!3Q9)yu()0Y{%}K9*{x$D?mHnr>sf~UegO7nW@}9HPfq?uGsOM>N2iM%^z;{kY z(|MpB9wz>=@i`Os-}}sSE1n?|(l2bN%4=qmLhdZU^%lpa1{;Ip)9H<4u8a^fBzl%-8GC9~fil>`rgj zJ&wnLGu`L&1RX1WA9&vP@TK4S-|1X!3Vh}rPVdmWRJdMQJbByy?A2ZE7S_+yLv+pW zn_%1r-u=C~=l5&yv9eBXE?4}8QHq-oGz! z)U$Ox_~^e+@AhRNcjP|l**>k&?}T^14*wSXYkY&p*&pxVqdy;XjXIuA{{!Pqz5Mz2 z^YL%=h5FAgKiFsLQ=cZBF^7NfHmGjG{0=<-%y;NLJ{E%Ct?R;G zaKB1M_2lwOc}MrT;`hI6b5K3?jEXu2>Kb&fPs=LXqjm(^>fh&{akgjr&pz`z|GL)) z>Ibh6)K-u7SJFPw!Jxi9YyHpm{Ig&4`cq>mJFjQY^z8kz&+wZ-nwntVpS3^EUZ4LzFW;*l-Frpn0_SSCuwNMm$J6iq z?{#!@nPWwt@*6ik{_}#4n)?-N96qnq_pY73Y!djrd(N5d{Rck>-s$E7&+&P``p1o> zo*h)L;C|D2fjmfvIF8!@MEsE7FzrehT|ss5@UOAb z*bDo0c((lTD%SY9uDZ(yO!YX;Zw)=s`SwwViuuU>ejVIV?Q_@kKG~83J|zBq72kXJ zX&yDAG^FUA;x($5^RZJM`0VOC5?}e$rxH=l=w_QgcZ|Z;5;Y>QH z&nkg?RWIJD=WFcc8|d22HTnC=FHzssrVi>SVN`WizcrzVE_%<>QSUpG2IyTueWCkZ zUr5)Iy&pdSuBne3^S(wD`5L-8$NSv719g+%pYBs1$xl!;RDE7a_x*MS*XhTd2m1h3 zw)4k5Q&{)$?jP&0fArdGuXTHlv`_k9Dc!nuv>wFZ?cTM$b?Mxdcq_fEy-MdE);_eO zbqH#}S68(j*HNyiYTd7@YQ4x$(dSBzS5P?iXv+;u%dueENWH&NP=%d)-o=-kdiJKbWPLpxZ<&Yi4Fr|#CRQ%~#8d%Jh) zYM~uFSdUKatyibE)}!5}*1c^L_K(!GuDr7g@9x4oJMpgemlGS4V`q-tsDtXFTp7LF z)U+<-%<0m$rFH9Ym4$Y0Yh62c;Mj%tcCk)fI$QhhygRfL*Sc{}FY8I^-m!;u=KFSC zI@!(iO*=}bt{tpf=bOmcb)DVX<`V09O%v;JLqqFub#?dtPQ1J0rB$s%E9%6t^Ck2P zb?QmE^{N{9#fMmr8yj1vo6o1M*I1|SH(2McZLE8@4%RcYoAuzG-P`xz*qu6tTE{LO ztOM`t)U6|Vf9V5aq~9Le+WL09%x-Jjg3{E*4_8}5c}KU)co(G?@9s%mdUCz{wbX^u zv2``;KtFVBeSvkm>3Z7N&N_E)PrrAz&a|;>Xcz0&CDb~1U<^9a7acioAL{zZU8gU) zP^T{3)3M_%j9**pd`m0q)V3M@TgSRG7J6SF`dsbp!Ps} z#BDg2{UaB%f8tu}#a!srrK8=#{@(VkFec1{&Ye4R>_*+X(+}ObhxgMLT^WbaE?uo_ zC&r=!@sn>k*X=#H{RaA1b5QT){hfJtJ4z?b5lUCCce}ERb-cEob?G{t4zt!jN-MiZy_LFJ$^cTKM~yTGaS9wwAouDSv&^ z@?(bD-pqx>V2UN(e4g1U?dL3arI>e=5NC*O*xn_*x19JOrTf@2oNXt!6LTnKwiQOc zYRO;rxAh;kv&f0Run2NrMexpuVdq&SIj~j_ZN_`gv2fz_t{!zQd(?>EyYvMsh#hMO zvKAAooETC?r0$t@1=o*Ux#w_2m8aVghKrIvcpz-w2=Hbn{4NnFKz3Z ziIz0)Hx@TJ)S^dTZBfH7;oa1M__`4z*oQviQjWi{=&?7F|Cjt*^&~{ z+)f_eK&%yiPc$!8SGbP%>Y=glF0fCXyq3j#Q;DOn+O}`{$a2EpCWiV0#PJR#&+l~> zKI~HZ{1RI`v=zBQE^{TCd_!x;kQba7pPT00W@(F`wB74QSaBA4jt`M1&yMg)@*C1V z|HaA;eyWW4Sjz86zDG8_^PT>@ij@-wPGeHGXT2RupJ&_FC=S=}EN*&lTR)Ect{+@Q z9WJuy_b((b2m5|UU0@MoFR`czR}&|$6FDF6w!&pE*uG6u?Lg+Yc6i4IJ8~e;ij<2` z&(?d~Q4uG-E>XAW+{Nrr?AhXNg!JEF`*P-6!NzwiWBKoF^C!1k%+y?F%Aa~$xe@fAMnREG%IS(z8vj%Dc^R=&_eNWB=10Vge~G+M zcM)UtYI4Igb+I(lhz*%RjOZ-l!etOcE_q~4^4$?vcRVpzrV?{&UT4c)`k3wA^tQ_{ zb8L5%l@{d@3j|CNSFnV4oG6D1ln|e!lou;D&|}oIj~i;GTfZcJ)Mn;S zA?+a!0r4M{8%7vc?qW9=Dlka9!9p3aPl``c$MVDE0Nq30+$<|1_F>`X4=sE7>sGk% zZredV>@4zIr4s*A`7RQvM0Gy0KJSy;Z2#(~tu$qnm2Lmh zijKrv$%(B@d1BHKmyVawcB(?IdM}<7A9#N`F&B&Smy@?E%rck1VDX<2PiPLYIi|HF zhEE8&|Gc=TDda!NBDZlianN(d)FXCZV@o4`Px`zz zOtB$&pW^cHF2$VIR5(d-eL-$wD<$r<`fSG+h&{13(C5;n!BeXROC`^OyhEXfjjw)6`fwGUBy>GkK=;k1hV10Ov669dKl zr=#eBx`=Kxk}{*vVr6F+U*mE_!RMC@1P+a^9H@!~Rw8<(N@(8Q2T zCRS|nq!1TFH<9>xX~d4nU-E$MT=xcf+vh;T*E8IT1IYX)F33spP?nYQ?i0isEIP!r z&$pAiH(GiAcUF=x)%LIa3o-hbJJT=aeVX4@Y#Z3$3GLBw*MzFJonyYno7|r1;6HaR z@vOi7mF8Klsh5pt;~RoH@WeEG;V{9uj#ZH8;zcd&Svy zYJU{5JZ6#q`xV5sZi6(&B8#?XD~=~|dNcVxb;h~m#307uQu==5AaY}U zM(lR@KRGeHSQ?7MZA8$gpnU)3VA`v50*KFydad6$+(E#CIMRKwFKvV#F zOw8}{ow0U2P5l3P%l-Uz;=^4*POV1txpKcV*XZMP;%cXo_f7HP(_H>d<|K3=b6P|4 zNVc-P&pHxs>v7u`_r4Vu{1p`-gJ(0Y4v*q>yqS4la&!k``X)P){UvdRC)>U?uUf$u z{VaVpF{-8#la9EP1>k-!@hP{%XY;^bA$+C){O2GGWQ7Qa;Es;y{-3UXRhxT#dPFJv@kc;&MhwUnrxV$I~GLt8I7cWXoIg zj1_*-)3(mK(B%-yfY)Wf_tU_CD)T;xk_;V4q%RVoR|ylyfj#wd%Ot z7X6@Do$2(o@)u+fn^(Dwl;Ih|5Wi|J8>wD7#cv}hhKT$$1V@e=be0ixC=dBFeLot{yI>`|_aguph4u3v*BpnfSHF9g16~sJi zd0%z6?AhnLnE0vidOr_V3bY^%c|>`LRnIhXVWkm2JbeN(@T@Cr`yz5}Ed7;jjeX1Z zrp<-zMU$EW{#PzOES!PEl3jL^ycH+1zp#VrhT4wB#Ic>%4!R5Wr`E8o(7QtDT^{do zIZf$r(cBdJAqCo)OdXPm-Jhgb=L>GIeDay?kA25Z=6*{~oDABpI9S4cpg?=dp}l2A zM^KNB&_zd(OQidWE(;e7j?RxG2kqZtCFyf)7cx-RcXwGL@sc-@6D%ISFPfJXbn=f+BX`NP zI@E_e?_tEGMi0we^%t7U_&fYV_s}uK;xz65o%j!q|1F&VyXb(=_kG%-&x$pemzPHi zXoKYSf8|ddz|aDDuQNct>|&mM=ot9l#;~ukJsDx(|0!~Ob_M?}(eL5y^m*>s>d0KR ztbo4H4Wr-D12h*?$+@ZgnmNqVY_O1n-kuLH+WOarY*R)oM`nRk-Cd5`kb zCn+91Sj#4^<<7;AfS-X@nx$Nq(a6*2N++1ZMd%#I4x@G-bfpX%)X5TZ8kQYG9z2XH zeu(&|#41GxFnHprW5kU-NY0}jOKnf`ILoCUa=z|{?n{1ex-qh*H zXvFNy{px<6GXNcKAvTqG`T(4{d^o(b9Qs>ELEk7p0-*rMp0lqtkMA4N_F4=)3a23XAE?(QJ-+6VVC5ZT3eOTgIo|tZ?~Lwr|5kJC+w=MF+7j>JRx+eD4_Z zes9tUV)Z^ioPK22uyc7{U6<2SdA&1uPQK`TnDWh|b0BAm=gQtBxl<(t-8T=pbjRYm zY+v+WNN+unoJC)g=XNbLAjM7{%7w3FBWq+>F?kJ2j$~Qcu^cNqo@*sVVDESiab~eW z9NUKd4gGwt=4bEJ-#8WTCXtvVVfbu}!c$HMRW7 zP0>~ATAp-KI*P4Q zd7BEpwv&k?$r<>2Xkd5j`j^8G8bX`N4}!d%IuV(SJWDDWlq~3D&N#47ZpK{tAV;zi z`alXX#WNRmWt@Lwd(a7s^1fkQGCexOJS;zfj&dZG*zpT&=la(z16yO(tadz~Sf<#P zQzkS*&Y|CtKQpECBk$+%T;+O~9YS(a2DC668nk6ZBg<3AUgqd&h6KTyRVzO3d3H{Ic1 z^0*3XL6X6C#}WUVSgX<4|Gv6|akz}UIw7_VJZ>L{Jj&cJpzm|RWjZ=QGO~Fxb3O&W zn9h97#s-u|$^5XnrO%f=8W{k&{BY(Mc6@)f2AhJefqnki_9eD&^V_!do4%GklUy9+ z@X0`SOc@Tw!A};?-ijW%b4D}En^q5*SNW(s{+}iqKuMVl|NZz%+xlfUVtqeu2R6Nh z-H2Gext}oQzhfBy+ndUE@?KMlb}Y9O*yD;RCw8u6oo@y8SY;=+MOsOIBx@h!FMxLz zB}{ZVfpZr>#N55b(j@6Q4W=mP7CJ2#xrDZ&r)NV8m1j8N zgKEU#Zbt5rTZpIoCo4*x#rnz?PY%KsS6aHw4(*GyU73?DKk_Nd`m#6qNUny@lf#HU z&qapLm7P;MK7E=R#yiQ$oeJ$u0sAgjFV{1m0a?gMIdd+vyoKFt$I{=~(GALtI~TL! z5<9Uy-0|Ep_-pCTNMx~aNWpSDn!Ch~}1*$E86g? z?OaMc_0QX}&T=vKNOVEjfWTwgI4{p)I{lIc_R?v4207Pdm&jqhkNe!%x~; z_ILMUUVg)lWi7x)lM1~7_t=6@9^1=%<7|J*Bx3#l7CS~;@(z%%U|d~ddLsuyZ&F0# zm~R=-d+&Y7Uf3JbrGFrc{J-|j13=EIUi;TV5$P91iUmF?62XF~C`gee*Dih{ig-a$ zK?PAd(jg%Qkdhuqs7XjdLPAOJJ=r$9voo`^y=Pmt@649}_j}GeXERw61ccAabtXCc z_V+#Q`S){<>Yy0;AnU>Xk++0@$^X)MV0QF-b#>uf8t={^;E?m83PIxFO@1DG?@Rov zT&{TfqtdeVyIL3wS-H2q$l7DbzUxO@<$_;fTmKsJ?NP}6`_UKCt-xsE6WDhqzza#) ztQnIHpUZ{r7oeXP(hl;Ag^&|N^v9By&$qf&*V*>SG;43pqYbw6N%TJ2r=#)}Ygm7~ zmCZPt_hMhWAKm$0PJ66B)H^>_|TT|Bk%=OJ&-puvg5@Ox!f`?hkl!Q#*S@5WJgdasb_&fJJj5_*v zYt3bj@U3I5eIxg-9d6r+L8yK8a%`aI(eFPC-#y5};INSI7LnwOlpYY3jgmFRs-HZ- zswaQM%E!_Fxt{X?eu4W~A4h9$O<}#ESAK4txf56jX$$zr#)!PtEBtR;Y&H3#Exz~{ z*vh_!|L|z!r-R{f`1K@bNVh_!3QOLeNV#QqBSn#Yib*A@ZSi>Q;7=Zg?cj4(KKI*J z$NC2Hht%gh0g+oAvi1`U-_g0>;W<8QZY0k z`UJYlg#WaHr;lST@^4uMI!<%Jlh)UWe9?*DqX*kxYmFtLP20BKkMHQeEN9B$mW95# z6Je_b~WJ_W$=i{vGZENhhcnRS~7}h+S*u%nn^nyJ5ptz`(5#*J z*#6*@^`S)X>2Kmg`RD@q@TvlA--X~YLSN0HEpov^4nCWbm%l|w!5^V1Pa^-*=7tYk zx(4=H;eQ+U@v;}r1T%+Q;XTlgd-3P8zEs{QWLsptC~NeVP5GF`#vg<%NMBOi!NXtz zT_Yx2AhKX7KB+QvfC}(aGw&kSy8fxvFZ`7?EWOGami^AQE&DYx@s-xF0@|?hx7NJ! zYPP>aPyRJFO4j>Was}}Ntd0E|=N4Rr?#a3#bFjBO|1EqG@S+Kygr-67r1R4!g?;He zviU`@PsArf8^M1mvbl7h0%YH<;D7zStdThq9bw9`=qEq3uF!bw{EAJGO-?rWYU|jx z6g$IcWMkG#pZ*or;Q{}|TST#;N2yn>!#TpW>T2Y) zKVYxH-?8fVT)V=p0Z=*b94lt6;Mh|~VT0M<$=D^>J*3~u-VuZ6N61?Nw!jc67aEnT zJVFzs!$et6EPp)spZ0&ygU+xD;v$+u6EOc}VQYa7CIbBTqIWiIx!cMXoXdK}#G4>r zg+^fS8A(~8fkpUN;?SNV_`lX8lPnmb4#aEn!GAt;Tp4 z{)q1f+Yd5!nAi)g9Vxp`5p^D?t&1do(H5o9`Xc&j5%QmCbMEAQEoa)%7Ki_DTl;71 z+fQR}3h_bgPx3V+E3K{SHR1&RW+gMv21|#rmLKvxxXB&?-KSq?q1WY4#@9RznG^Xx z51BIzjV}=P$wMi55C+PSLrNzR2QUSBW9l#~efkuuWUcF(=g+WOQsoP*dp+|sD}V8H ztHc&vHTxW^nspY(UnfrGE5yxw$)Y?HoBCDs9o7w-d>XchQ;;o=Cm%=Br~cD6jzSi7 zYm7q!z`ybkLf#2srz?<5JY|1mWBNMuAeZ&XH$K1`W%upPT0Ge0pFEy*g)X(O0{DLu z{k{jj2mbrItMIpAZ^?fItX&SyPILH=P|wn-3n*_E^_|6ca&_7@m#@otH$kzK6oH9&%TbfMAR3g10r+D9vYd%+DDHg zE3$S=e**un!++4v<&V@eTU-r<`wBK4 z4s8B+ta1I#mcX{t-&)8=@ipw@@KH4V`HE6N%}T=Cj2S;v4bre8k9wx^HySt#SHk=qPQ7U!v%#W1OG1 zVB%5e6h}bANbKiPUwP8KiRCJw{tCw*ijN1K58he~Z7)LRlAIkC_MrQsNBPoA;QcNp zfO{g)hA?`XXmyx&i%dQQAI|0a7dSP2mrc{M53=dP`=& zzwclj%}bo0y=cNw$h_cD_y_yaKTF}&<=AN|Xpd58b0O_hNPC1>XRdU?k8S(LyR4rv z1q0iQcsDi~X<5^|YBqs?>|TXqkFYTK7yp;sS4f|a%FamtDI>*XM^amZ3&r1w z?vzhLE@Z11v@mfYx%9Uzcv3cUXD)FHxuQkbjzWsdAzmz-SlOJ1_P4x;z}Leh{EQ); z$G^Fm7~YK!f}{KQVqN3CSvQxp4p~=w+cfZ2gVAqPsWJ>j*gNpfPWi* zf0+7+BcC`O9Ns5CNC7fTXgK(Isa%9J!`aY_#0~z-?Nu(W$o|WQTtjR{)*5;@MGC=9w%1o3D!);&QOS+CBI9Ux{!Y( zg#R*(Z7)iSLvxFv=W1uAxbg(ejgS=cC!Ie6_9Y9t*c_fOA59DpG|G}qz>nL^CNR;oaD5d42Vvj45ccKe{!%>N-Y<7f+E$Im0qIgdDR*?gmvyJRx5 zzy$0K>Ko{xg?~Sgy85`4PLuBUReYysS$xj-89VU=@+E#x;a|RTVV@+|vtob(&}*C8 z6)8v^rtP@PL;t+L`G2aMX;q+@*rZ}Gu#+khNEQ<3H|a-5#Wyy9y|^{^Db|g<1wQ>l zWa}@$=ZHxKk1_QJ+D0+DrRe0P$fLzzDlYpK{3Y`2*BA?fO@7neE-tT6zHf*B!2j2V zJ-&X+UD&J6r5%YKW?lIR*bhC3K1u(P?>~;8w*(v)Is7ZOOtD7j8{n)G-*<`dCi|G| zLC6K!wRP`h zjc+itoHcD%-^9AsH?qF%%_P>h-+T{ti4pYYk>DQtL>@8dAz~0Cl6%N&336x&c`1^8 z0KK)4?-e{utUNLN8lTV^o9`G$6u#K!$yoqyL zp(B8#W55}mQljCA$>bMioDCtK|Mx^vx-CC)y{G9 zp%f!UlqhQiS|s|b_#fH(%jg58)QO(W=Qy9d7EVGZf9`mzeEA$}!WPsMn@o%ab`Zr{ z((C%c{{Z;ko;A|yULpQ-;xUY|IMDJ&lHW1(2k2=SdZRc)+4=IxQ$D_d$arM^X~V2) z&be0i`lYswIEBg;w=(|hWz-7kSk$q6f8g6~*!FA3fjtHI)aKs`|7rBDAN(hXed|$- ztZGK}AsUHXM!>f7p?8%owyI6Ufh@s>H1{Gana28(6AuUfU_pIdeT8j|zEt!Gyzq%b zkz*MzL+n=7>-c;(+-~i~_~YdBLB zOb-9(oiX{E(J`XnI*y%Dalw_ypA}%FguW=dyyC-h$V(RdIS+ZH5PlZsJ^5fi0>6%; zS44&@DMpRh5qxvS$i79y_D7y1w(W@{ZOsVQmcC;z)|UN%t-YRf?SHV|bP89uf55hY zx2zG2KY0+o3V+H4;}O}ypi5==qZI?E`q22Ku=*}Oj5yirJ zJ}rkh^2TC+r;Ptse}E%{eIXcuu*`W+=s|J?G=ojA-~jJ zls1f#?;`3iMj0aHzkqup(20m>foL-FNWg#D(hf>Rv_+hD5S@x+tBZkGjgts-z7VG@?Tr))_d{qOti*=8P--GLWk|5FMDwF8Gb_!gOhLb@B5zr zgMFz)p57@QB7ty}kQ_jD^@?OV8HqTle&p1ia>D4g5W_wP)%8JZqONORy1>exVJsMa z>Ja@%yj2*JZ9EF@V#L75q2Wc(e4V(jpIhykn~5oS!Md7=M|b!q&Nfj4{uhD&duYS+ zvF$Q$lksekk>C|fxi~xePLbl^=<~8A70Bi#n>&3>u_dM8!o|h0@8SXJbGb@fFM#(e zDNfksO?(ZRJRg}ngl{pzxPg-K$5IPS_9R=)*w!UC?`JFiiXLzs zeDyEjAAGH0-R+Ioq&D3jq%F{qY-m;ZVPbyBpJLMD=o^K|Li%P1TS4w4`(isk(TxRY z3lR&A{lB*x{Yr5uJ+;m+-(G;76+3)Gu{C7hD5+pZPR%0~!YY7XD605fobzmCnW8aNW_}4B@ zHTL9Z8TWZGe1tgsG3a~Z74X6$d}YN`K8fF)ae1#?0{(9#?DaY8cK9d8RA0mX*HOKg zvBLLQ1^ADF{|NYZ@jq&JcwYoO6*1NzE*lc|C&jwu(@%v3^)uN3i%Bt({`cK+4HAc9rlU(#aH4V#P5X-u5jj0ZR@zR zZPoq9qfZ}Ut8Up3zPg94x#dIX)yUL$<6}Yw*o>aA1$#g?dVuV35qNS;b`NBf5Ooof z41y0U=V9!E=%9X=S=;)X7M^+xHZ{guqW{as zA0{d8IS-l^lD(hUx)AzxHg<|lcYV;--1;B33>{?&Y1yrN*^0XkW_&*H824q1O*@`vR3q|nOBCzFX7k&=$+$gepl={?| z3m4ae{NctsP}e^GO0tRaIW#%l0GUYk|LEk8;Y%Hc{C|Npt-ap5i=M_7l!uM31s((c zA^s;x%y#4E;n0Zh(uPM`Et_viXc( zS>pV7ZN%2pFZnHgyYsQ14}%`VYlsafpnoa`Kru1JQ;@5l`6B%PVtmRs;s1Yuc>f*p ze;@q64g23V`FxNkBI7=RUX6WU`YHXdKw}Q@_ZDMUE5+s;CC)(c=8FG!V{q6?HZGD5 ziVYw_d`KbjaS>v{WB3e%QrxNBE*n}A4jephs}S=F#LXJTkXQju}$8NDEbg% zPKb>m{-=7y{luwUW1A;l#C#H`V*fwJ*4~Lv?QeUt-u)i7{!ZD{_Oy-n5Njg6S~O)0 z<4>?h6=3_w1D{!=0=Xau*)@mwK*bMLEV|TM3n#$x7?YoX|2rROjU||GVSC{dR!)3E z6n|X)Q=i7~fo+R2$<8SqI#>Qbd~Ugt+tDX-peJO;_qK^H!)Ttta;=8*0An&t66rnRljx#wjBJQ#O0SibtE$+ywl_8&`m6e!03Dzn3l)Qdp6~2_VBW`INAXAa6hTLia*yb46#Q%Ka&+>?(f|1t zw*75u|7snvXR-fDdZ1yw)BkH0eBbeZ)v54bAX|j=66B2-`HK=uRPrqJ zbl!zQTnTm8OTVOJI(edxu|)kc_N9KFU+XY~e=0$|U)AIAuRq91()E$Ubg3J9+$9-+ zBUuD{@z*7Z*-7-%R~b*9tX~0{oo?H=jE+<*N8kfgPc=TMx>^^RhdDmO^w2N)SW2Z6K%_nW$o%`F0 zTlTb7w|>~x%EpeZeG@W3_6Yi^?CS7&VKZwqxWvY|m6Q!F%SFyEes-AEEWV7mgnwcx#b0Gx$wl_n{36*83;X-yzc|pcAKcfr z-iHnX{}=vO--_OU`##JKg#F?XeE!e=*vc3F)#^49-xr?6)JhAiqhy|S#HU+p{#a|? ze5chd`<2xok5^A0M*QN(paIZX>RV$wBly{4j3<;&L-ncgby4b4V~xUKU2;~wWB}19 zl4OLK;vPv6Xte0D@UJmJnwua(d{&&XNu|Uk)~>mMSj1;3cRsks4nh|kNKhZmo2)%& zjMcyL1Bd?*vS2Q@nh-V{*(3|csJ#y$#_<@deCaG=w|+z1=1A+Tc*&C6bLhT}@G#l2 zk!S~bKk+{FXODZorSjkL&(o9lW&E$;u9PPK58@x9AZ?(V@mQV7q;*3Nm>Gw}oL%Vb z31h4rKGoj#7&7a6XuxddnHh~;`)YLOi!3trbNGT7gN~f8xiKQdqerG42mZguxZE48 zr(~ujS|WU0_=mdmfd9(ZtZvgC#Gjl?e`4MY?Em?~KW$#1SR(jO88J0(oG18?VqcR? z8i5~1(d`vqrkE6^h}Wh;x0~ zI;+qbo5IARRWk;LxQDuYXw_oml8IKb@Mg<@{u1W)_@b@9|8VfXk1e|idjK}}HR#>z zp#fPBAg4O~GhP{6e>QsSR_p><_%Rg!pO5}u%DfqMi+;(x3bK2P@5%lT4P+jSM8gK; zf=O1f{C5_cb(V#n{0wz*fU~#B2A>E2%R+a_M$X7025HOik0N*Mjqd+JY<%Q_e5}P! zx%S>eZNoz+*~ZBiS>emrX~F(>aNpCAw!!2nz-Od1GuF_>Z9f=V7DCzMJyj z4-KF`!w((6xTvF<8|DnFTk|%sf<)iKP6QlDi&g!9LIcSf3>_R=h>#w$J+A09cW8$LIwc;^0RG#_in}p7aAq(6QBGDwvf?` zT^@nFPC3N8!Vm4sIM$P`ap5oV|4(t_|N48tKfG!HT{Q_UZ6z;NORpy8?p*Zp6Of?} zM&?D|0sFbok!D04I`tMP6T7vT%y#U z=68q^Lm`>F2)Y`h-lIygNn+QN9Z+*V=$gjjDNdsVIvnT^T*F==zifq^F zx39$0$1^|1)y$KD|L;lW{2GU>@)+^9#4E`rl1*$+7WM{Ve*JA9uyx4$Yq9rj#2=Y+ z?|#S#pTOStRf|r)#EKW);pPtQs9>&<_7a*E-rBD^S6ml!{q#3520Fx;zXjHi1?@(T zu9$NcKHXy($8e~_tBdahzml~QFK+B*Lq=j8Ly*xR`1FLqn`{)_M_ zINPk`HR6Aw)PH=g`2U~b|4&&TaZtfLVAMkwvAPY*k^hGi|3m!W6Z8e*GjfRs4>6vn z@Uc(hLp=@q;m>W`nmf_io^^AnBs=27t~W7+khx6yh$#pCfz3+x>wlitQ({{j@scY_J5a%17Kndmo&#{p8}>B8zdX8Qj$ZcHP1o=!pz;d(wcLoGKazS7JuQpw&~%M zZRK4bvlTb(Wy}8>_ypJgjrl)E9E|>t4V1Y1f=7upMh*xQ8zB4_$fh~&7;Kyu)4w05 zzL=Xx@~-COK#oe(EJcrf)GC+$9y)Uoa`IQuaZj}Pq@#(WB7XUiLy&<#0-yhotpW4S z7sg*Q~b2@RL@*{x-%7|CI5QU$Zie*FXl)I9~Z!l{B`S5iB;F(B9{U7Ki& zyf6QOtAG56!oRLX(Feksn~3HN#M^~`ZFNin|31MYQ~1|2s&D#n7xQTl$J3hs7~_2ZU=_%d z@foKursibEo}6m&dHA20Ke9FQ9J(mu|Co*quAEKqswr?jE9~(d)^AbR;5L5E;CvRZBnmLe)2dsR-e={!i zZ00>b)>hnpfGs9IXbEWrKDUh{j=)EE0(|ZZj4Qy`KK2;+K66%}2jq^#k3AM#&0${N zoJXy{VI5^>ZfecT*%7lYXkcUR7%RsvU-HVu*vKxh3T*Qg#3WQa`(uuo~jO|~I8>|3~lv0-RU~ZlE z3hQpKww_Mnu9zFCt$w4ml``)l?bgKjtlHPUZxghJkJ#d9uX?zbatEBa3samwMT_)hQ%XfD-u=27f~CMVm9X(#3qr?0Bp z4u~-^ryG+vu~om6Pm5Q-2fz0_|M&O@%E3?du)F^wyDUr*GH_mzQEcV z^O&Oq8yREt`WiPgf5bDlx)G+Txq{vBfv;V@q#4h`3=e zI*GA_l(&qzzss02Au<*_9y&qp!-rYks=Dc=dU;m*Ts(e-=UtJi$M7GJjqu|E4_ll&xO zgHJ_%f;XBJ5D(vdmaGpArm?h@;A$}pp`5&;wP`|2I)vww>V?PEH$Bq_o-C-Y@A)v_t z-3Vcq$zcwMTw+Bc#5dNi`HLk>o`Jr4{Au)&+1nfarj90G`t|M|ZK~44TbA*4f#>Kv(Sw;{S(3^S=ZBKZBhM|JDfX+ava|EPQEs zjDrg^ragk+rx3rC<{Ahg59C4*L>qD$vyw}^O)mC8%|jmMS_r>&F3;poCWiDGaL3qI z%|~8G+(~ox2{Gq+db|EpMrU6A>2kTE;TRxpj= zE6i7ct!(rCR!V$O{?ixQ#)pP69_R>L^0&in>0L+LhDX0{p=W*o@BS6>PXEmu#uqbR z;OY4Bhgl9OL>zSN_1{=?WU8~l_Y?QtkIkyPIp11J7l8lAt#ZSiR=xg4c;IcsA>3t+ z_$TUC-au^RWysIx*!tloLURtYSFhjS7TtKTExYq5#`}H&zWQC}82ytqZ63p1-OpJ+ z^Z00tVIOw?L_K2*YF9Cp-%@KXT|!!BE#<4QyRK&5qt(bB%!^by+u93Rr-ScSy?!b4 zuzdqt$1&9Xq0j;5b-})(c^5SIk>>U;z|L1dI~1UoDTUcrjIZimb3iENYfHQ2Gqxg! zxQp!Zj47Pn)v*?h~Rc+4_*M=_#3F+<3wVpW6K_xKl|Vm=}9t_=REpCLbwf6)N#vk7qT=%$CiFfRI_ z$YAbLMLT&w^_sddMQjx@G=N6XLp*C|OR=?AuVE<<{LML!5pQy@RW85PYBoM#6vVKVYKbHT*}fW5#@)HG}4}UP+J|Bgn+@SFE#av9%U2BE7~s2G3ao za|G3_zKQuYe}P@&OlJ#NH;P!{F<)_U0+E-lw(_O7GLOa`R=e!a%$@dg#`EJBeg1qa zobzL3pj)h^cnwK8Gc$k9-+k8uSn)5%@F1;PQ z-etDwv9oQ-J;Q9t9iO%p_k70IKlCNWx_;XtbFQ?SHTN=yz!b2|e0_B*fz>+r>1yjJ zN2e}ZV9m_0-h{8FB{tW#$L3K!>;sg$8~)#2G2c3|rMIGk)UUkON?-mFwz|`h15QMK z!j?NBH9mO!Vc?y4I42N0Ig!Me{zBIJ(0)YcCNNHzc8QE-U+D?1(LVV+AHx0_!EaYg zEU4xrN@6o+&@+7jyT2^O<8%wv(%d}0~=Q!%^#K^Z~y8}Tn_OVxK(>QJp&@fH7rEEL4H97de}f5A9LPVYr(f&ON>opC4FssoJW~wILTAV zChNlY-Ap`69rN#$zi>M9=bV7Q|5)Np@YPK{&Prb(Zhj`QGc%dfYWj)9e14YL)nUXH zok(meyq#1s?L^WEj7wxJ$aLLz3jTy|qOX4+pV}3eCz-=4dz4#OtTQ$p{Lir-lK5Un z$t+@GUSw{<8Kf8SOTEZ^r0hcjI^wT_l~>&yc`e-2L^$#qY$VeVrTEvkm`ebME8VJ6I2?oj9r<#{Tzo5vR`l zKh>MSifu4wvQ;m+ow>oTu&gQHgO{FzUj;t_>w;Ch z{(I(Wy@PqY#_24lF(*+u^P`kL`+3GOo`gQa9HXSN=NQlX zJc%|cf1dQ*F#L$aXot_b@wny0ew00Ztc!gpnfVRc<9oy&{uZ~&2uqe?e~~YUxL?`o zdg(g}=0$8OdKuZ9BGeoW=%e0M_tG4MeF!)A zYVLf^7=Q$aUZA*v0gbtAD$C{12~Vq`h=5eEmf* z@*>O8KnqGd!rwGcaF-6!~XR-dn?6Vjrg3o`!kFZbt)*8Te8*`xaGv_K9!gfr5QNNNcuQf(~ z=_lcF(13esy9ePP6D?7-g!+imU$7a`KUp@);UDJ1IsH*Q8S6Hpi*~Z#LI0GWI)i_z z<*ocg14yC)s$Yp#K}zZRq8O?AlvV)Jp#|`N+ReoUAZt0A=mZGbLi5WLL(|t*hN>U7 zc4u!Yu-4`h>t?OFKG$ZFCD4J}^U<{zfSt#&&ELuxnX9epwO`}My27d#GY=ng)zz>0 z6MW!L%vtwGt7VK%4dY~MnM109<890(S&!emdeQH};vb#ep?TdM#J7%Qc-iA_9it>X zzL$9h6tmb_vj(g!M|VIvj6ttMc`ivJpuaB zQ4C#(%_2OA_~$SQd7%Yb(Ne^9Vu!oyHdFL1@OjqFtXhM84H>+8opsiti=!V|55743 z{y3{3p~ykRy(gfFU0myGDPq5r^XSBiuSm9HUcpA#7{*t>#_9`Rw#u#3ttRIMY^k&O z?n`|4W%9n1I$UOLr0wOTvL)71ve@OjRb@dAXa`pvq)t*-DoH-*LigwvttemU%BMM+ zTO!lZb*5SqwnU8?*uL>^)`)Mn7FnhmA7#zb-w{Lgd*)IMQX}$0%Im|DN4}|`K^VRVK@$doZ0Ne7csdSOm5xdk7 zT|he_2Q^|RP<#NsOVwMy#-=2YUla5@_MI)j=>+g3`2w9piZJ^g{oe2Ve|Oa)dO4J4 z`g3jz9ne2T0y*mdyk9m#C8v-{DH9E#4F*_8BLQvihQD>T;#b4()YXZ;pO8i&>H_~C zV122sn03~#hR@DK_ZvsdD)A`zuxi)d2d`kv3i060=-rKZk5~h`@iuIWjad)TH<{Nr z_Yt?AOj8yyqnk#-Gae?M1$`ql4f%a0^80*bTX+XCN(0Cv$?YL$+i$PiVy)H0++hRj z0G~bd#boVT(i*qzW}V8eDq_*VZ+j(tnf-23g7XQm+y$@htX$9e_11yyu%nJO^6GQZ zWmq!={@$at2Abp8L*mHyrRY4YsnQCLyNG*W-7WDuDhN8s8hp$Hnnd>PYOlvPM=UUQ zl!0F20;FU0LQ9Dg9O$TJ%pi7xifn5r*=Wt>n^{W}e@h+Ttj`7?*!Pj0yD3+D^#*L1 zYhBseDxp8sYq9^W+bMN(tTOuKuXk~8CuLThw3cJ{gm$!|Gqe>V$6z;U%zhMK4fVWb zq%}Zan;8GGJ!>>+3}ZoP589VJ^;3;U{nVO#xMZHi8&m=kBOWt^AR|CQa= zRln|`?TG>IYs}oAVFIj8JtMJ3+*z~dMZ^MVz5=O@?Mjl~3i>?ZEZ{ls>v)y2|Ya6kD#GvU=+5j9fDt7 zsgHi$*Hw#53$JHwA=QJ!yZWZ+(a9kf3ZPb0DtJ0IOmx?zg zwpYL|OZl$833eDi4MAd`c!iD%{&q+R#h+dYcOdQ?r(W0O-Tk=enCZluPeB6_+{`P@c&)nKOo4|I&B~t zApam*ne;On7ZQ=OJF1GwFb==L|^r{HSk*OWc9>$H*T~f^Tc)I&+2pu zzQ;NdUEJG~N{NQe^m)dPAa{4tk9!znlxQtsT|36|fSX=;$3QO_B2HBEO!b1zWIJ)U zt!3c2oa})g#h-O(pRJCG%N^*bBwyee8(lx|f;rMB!JES!{`&;BE5+6dv>I6DK-yYC>AntzkU+!_r7_>qdk$$W-yU-V; z7dTm1>v}5nwQ!Dlg!c5dmNOoPc=(nQK7-N0_RaZ6000Y7~_1Y)9Amvi| z2DndFCfA>+FX10P65wC;6jT>~+1D|3mf|w*+`Ihe-x>cxuk`=G4j{V#XHqhNs~2DY zUJh`ySacx3fyjd{$(|7KMEW*uJit6->YD@LZvY$)&^P7cTg1`<+G zW3F0UU2%-88YI;NU7bql#U|?3Cznh`-KZ{I6{#zWKO*lAFeYHYlCgD->>_jWqQWZGwLA8dlT|i zGFGv>lQy89Ro6+{LgRO|W^Z4o5_9-=Q2(N@j5+EfmQplnK>M_l+ABdj_dzfF;PpX# zxhjC72*cWO{DSXGHWco4?C2t8hJQ#;aQH_K=oJl61*ZRkicUZCuJ32?zcc>5jlkE- zV1@7Kz?@Pe(~kxF!6ws=67~WYOAMx@<0+vVYYvw_^yMV$)e2LZpSTw}qMtsYB$;9W zzmNLKfD+I3BWw2whx8N8Y1U02=>|WV(*$ zo#;oud>2|jm*-u4l%t1uLitWGR!Y>-A=7Pp;Pv`;FL>6xvrclvX|R=od>{NG(mwV|3ydFz#Zh9nxVd4y=3R0`g%I6^n?3x@$^2#%#6 zsMG6uF8~pCde~}C2k}$=)f2&1{aXD)eVo1`n;QMm-zgl)51iy(Zp*829n<)ip(BpX3TeW?hA;287L^uGL~HdxE?LbdI*=zCrrO z4XQ(TPV^ZXpcM2By?jSfE%iaav{pqxL!iUTv%a5-QRkN65jO9|&-EEz{9fT-YkvB5 zKmESe|I}KeB_$=UNInm~d}_0Q_7}AK&hPQ(2Dh|@+JN2@B-f`nM_VhY4<+$!C$RJP zu&z@NGOO^Sw$(GPVe|~gNgfbRaOJqIi#?$2Tvy_paN5JMaHRYApZaM}N$*o*D+PUS zN1sW3i!1(4_bpB*Qgp@90P-Pu+gG2qlFc1&A|vX^9j>qF~y8f@naQZsFer@0nfB3_LYlUn5aDQIU=-96*?Dw_($xoQitsEN_KUd~d zo#%=brRQE)j#N`G?My+xVLD4?&Y;E zsr}qO*VuK5P3q^*XsdStj6oV8I*^v=OZukr?D`;&=$lST-~*2D?s6OC$Ctrp+i#V* z!9JPFs5>S*dM8D8Wp?XL>LI?rQ@wG@zst3oD~HOnLw-p;7QD;7Z|6J(d7~_;{QLK~ z@A&U&%k|wQmE+B>>AK6Pt5fl0pQvMZjZ@0DPwe_O(PcqWv`Y06)K{t=lrM1P`Y{*f zzjO4Cees2zWF@_Wmw6dU5`s^n2SNS^Kg-SRD?k6lPwxz9sEWzA!I#IFKVMQ(Vn6%Y z&&*>v9q+=k&iiv7&;I=Br=M>7?z^wU{T_Sl;kLTh@9REK3$(BE!hd05p(~a0;(yAI z&y&xizxG~ick0Kfdh+-W+IiRgRP`8OQ^==INxnB}>zYls_%ygf2cVq?f4gj3PU`(T zB|Rhj>%8zE&>ML#gMTUs|2V(vq-!b*xm6$K9e%6#1vbn#ZvFSvziAi_J*5lE&7*oe zNP0JUP*Pq~lqoo;oAe_OLH>qr)AH}04c_D5H@M{+L7sNry7tibQ`d)XeK}l4-TQ;q z3R*2yuR#u79{q06R-zB&UqwiLc1NK(IamSOS01>JT~BWv|42Lbv@V?n_%;mk9X#*8 z$8-ATKl2lw+__UHR>r*<8_uqeiJMFa7Y|NN3 zcJj$557Gz!oTnvv)}Pb9&VTJ|U$f_)d(JvLTyGXPe%~#XnQBh|9dP;QFaAh(DqHP-cIxD=?>axgA;#Jv%hH zkEEVYRi1m-Tip-7t-FP{6vffW;5YO&?reI#e7XF&-Q{oR*Ev4Isr0AQ_x0H~{L=IC zhKuj)gy?|Bncm>}tME2+=1lw2m%g+U-qW$3j(_b-1{gMMm_72yBer<)VmtH9GY4sh zu6eqleZ5D|XzOK%Lk~UFuDRwKXLnFulsDO={v|)^+G9U`+mEoPBwaT>N&c7J-Ny}U zJds;-fPOB0PkOKTz-0Po0As zcfyB`{W*_+Pa}5TIy}Br>^t16f_S%*`=-jF^67l)v$~{xPxl5ds01qi;0^x9AzR(& z->>cNlKaSzXW!~M9^)6hIgr`()xpGTJkQoWt}hIhBUR?XyVLXM-=KSZUf9)-L!C*# z+r2xuH1uvgvEvnb@Ll+M%ny|VR6hNrhYO1b9(dp&PCb5y;@%&NhfD5Xx^$`K=H|M6 zk9&`IPbWO))9HzHfNy^DoA&(k&ofsIK5BkR>}%gO>kOztWvzb^4UcWe(H?v-#fV$U-^pT%^vsZeB1MGkA07C@%+5JJZo!f zvn#H+!uHy0uR;EvF7N9(9ee!y?IDL8Vn6-qPi_8uVli8Zkx1oHdGoS~JNaJy@lB=e zKlphLI`lT*o*s#VuTp<^7gJl+Ih{esPobYz1$XQ3U}8r+NRRuizZQJkA8G5qt}E&1 zgFAQoms9H+xa+nv%`Dpn)0J=6lndTVJZ*jbUr=l9{2v>9YL8z7u^?9S>lGB z@|%9FTXY=!(y#b^e{EM=|KyIX-`n|a|1Q6EsOCWBR0@9D(Um}E3-*I@=!(kk+dbH( z>Mav9k7dpNFpo0!_yx-&BW8Pyu z9s8mU`|PuiU3uk|*4|DG7QdHXddZGE?l^~kJ)<;~@B8!V?>y|V!|c*aFSS=*dBsGF z^z-yd`4ugA&r(Xh_j3LlzoYN_B;Tx(KNgJ&^aA{o{zqGtXQ#yb67C#xC#SBdOiD=v7r#Gv zjeF!T?4hjwJ#VbzRQ`97SJi`_lkVl8cgNi8^s(J+cU7*P>%`aHj&0B$sk-BPJL)`$ zXV$!&F19h17uS}QS#c67uToG>|IV~>x%a896|1DJ?n%4Od-{D+J-BQBJ$~!YzrC$6 zB)MAe)V}}8?k2rmHh=M9&!0W7_SK>ocpZ%Y_|5nQ7^FQ?7p~wEd{|#H;jzhQq)5@m) zDxO+fTkCK?XU-glG5O!Ty>BQc(~mtqMGL$v+bmlPI9t@ry>6N z^mnH3>%F>1@0RcJ;DZmguYUEbPA<9Rl1ofUbVYK?yP4j~J1@QTXYSj&cW8PmdAamw zY5CT>D1%Qso=>~yT`uE}Z|tZ$eScTy-_E(6>W*^xXLmaPE_}zo_kY^fx8bg~Z=Tox z&uyK;jrja!mtE#!Zod5GFAwtkbR6z(U->)ftrlK-Bk2mUy--O(1Ay2#YUTj>MB z(5^7(pWPiU)6e^NNH>=rAzOle>9`l~mkm%q*%*HK!ylSr{5;0f-#2t$`5T%?i@9yf=-!EI?4}S0i=jRv3g?EpC*#Wfg?E&)RE2ih7 zi!K@*7xZR$PS0cded+tV%inu>-sfv~+xPO@nRmavex9kX-Pf1zzv+0_IUT=Qz4?3O z)BE1m?KbSX<^{!H}e!{uu^}@gZ`E#Bg=zfhWk{s~y zkAHj+|2{vW30}VN=lpklUi|sYcK7r>Q#YBq`A2;~J^;!8{yyO@-LL0;1nKu_OuzJa z@o_&+SAKrs+hbhV_k7=PJw4D?G(d3ydXH$p-h1!u{QMsG9_Q&a$LG=K&mU*DnSP$> z18=_%2wUmN^IeZU;mnWw*S@Zc@BipWKe9!OSm&;rxe-&pU18kQf^`0`m}7rlG(h76 zuDa?fH)dG+guWwQuWxyt@7vbr!RODP&urg*+h^)5Q)lV}=~(jn!k)(L32*)$>FOHS zFRZ3x-;W^>8Q7it?_~qs#I9^d|)KOVYGrw6(wI^pSozt`U*c|!35jg5`YuOPbfg)e-;%_DZ|si&Gx zidW90OdVwUz&q;$!jZ=MXsbHZzHp{vVNPRig?Y*D=~zw2tM-Lef6j0H{lc`@{XM>S zwbgU}KK~Bgr+vLkdB~(p9c22zyVnQAXJx+=?u22#uk)(sbR2rj3XA@{wm$jmLotkO zk@;n6AX5XG8pzZ@rUo)Kkg0)84PN SGBuE?flLi#YT#X~f&T~eD16oc literal 0 HcmV?d00001 diff --git a/Sources/CustomControls/Table/control/LICENSE b/Sources/CustomControls/Table/control/LICENSE new file mode 100644 index 0000000..930ef1a --- /dev/null +++ b/Sources/CustomControls/Table/control/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2020 Oli Folkerd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/README.md b/Sources/CustomControls/Table/control/README.md new file mode 100644 index 0000000..bb6b8cd --- /dev/null +++ b/Sources/CustomControls/Table/control/README.md @@ -0,0 +1,64 @@ +![Tabulator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png) + +An easy to use interactive table generation JavaScript library + +Full documentation & demos can be found at: [http://tabulator.info](http://tabulator.info) +*** +![Tabulator Table](http://tabulator.info/images/tabulator_table.jpg) +*** + +Features +================================ +Tabulator allows you to create interactive tables in seconds from any HTML Table, Javascript Array or JSON formatted data. + +Simply include the library and the css in your project and you're away! + +Tabulator is packed with useful features including: + +![Tabulator Features](http://olifolkerd.github.io/tabulator/images/featurelist_share.png) + + +Frontend Framework Support +================================ +Tabulator is built to work with all the major front end JavaScript frameworks including React, Angular and Vue. + + +Setup +================================ +Setting up tabulator could not be simpler. + +Include the library and the css +```html + + +``` + +Create an element to hold the table +```html +
+``` + +Turn the element into a tabulator with some simple javascript +```js +var table = new Tabulator("#example-table", {}); +``` + + +### Bower Installation +To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following commmand: +``` +bower install tabulator --save +``` + +### NPM Installation +To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following commmand: +``` +npm install tabulator-tables --save +``` + +### CDN - UNPKG +To access Tabulator directly from the UNPKG CDN servers, include the following two lines at the start of your project, instead of the localy hosted versions: +```html + + +``` \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/codeDnomaid.js b/Sources/CustomControls/Table/control/codeDnomaid.js new file mode 100644 index 0000000..8033278 --- /dev/null +++ b/Sources/CustomControls/Table/control/codeDnomaid.js @@ -0,0 +1,54 @@ + let ArrayData = []; + let ArrayColumn = []; + let table; + let selectedRow = null; + // Initialize the custom control (without a successful initialization, the CWC will remain empty. Make sure to include the webcc.min.js script!) + // "result" is a boolean defining if the connection was successfull or not. + function init(result) { + if (result) { + webccInterfaceInit(); + } else { + console.log('Connection NOK'); + } + } + WebCC.start(init, webccInterface.contract, EXTENSIONS, TIMEOUT); + function showDemoData() { + // Get the table container element + var tableContainer = document.getElementById("example-table"); + } + function drawTable(columnStyleString, tableDataString) { + try { + var tabledata = (tableDataString && JSON.parse(tableDataString)) || []; + var columnStyle = (columnStyleString && JSON.parse(columnStyleString)) || []; + } catch(e) { + console.error('Error parsing JSON:', e); + return; + } + //choose how the table should look like or behave. More information on http://tabulator.info/ + table = new Tabulator("#example-table", { + height: 'calc(100% - 2px)', // set height of table to 100% minus 2 px, because the border of the table is 1px top and border + data: tabledata, //load initial data into table + layout: "fitColumns", //fit columns to width of table (optional) + columns: columnStyle, + selectable: true, // Enable selection + rowClick: function (e, row) { // Table configuration options + // Deselect all rows + if (selectedRow) { + table.deselectRow(); + } + // Select the clicked row + row.select(); + selectedRow = row; + } + }); + } + function showRuntimeData() { + // Get the table container element + var tableContainer = document.getElementById("example-table"); + // Attach a click event listener to the table container + tableContainer.addEventListener("click", function () { + // Get the selected row(s) + var selectedRows = table.getSelectedRows(); + WebCC.Events.fire("SelectedRow",selectedRows[0]._row.data); + }); + } \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.css b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.css new file mode 100644 index 0000000..3782b22 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.css @@ -0,0 +1,1143 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 14px; + text-align: left; + width: 100%; + max-width: 100%; + margin-bottom: 20px; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 2px solid #ddd; + background-color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #ddd; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + width: 100%; + background: white !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #ececec !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 2px solid #ddd; + text-align: right; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #ddd; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #ddd; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator.table-striped .tabulator-row:nth-child(even) { + background-color: #f9f9f9; +} + +.tabulator.table-bordered { + border: 1px solid #ddd; +} + +.tabulator.table-bordered .tabulator-header .tabulator-col { + border-right: 1px solid #ddd; +} + +.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid #ddd; +} + +.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content { + padding: 5px; +} + +.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row { + min-height: 24px; +} + +.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 5px; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active { + background: #f5f5f5 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success { + background: #dff0d8 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info { + background: #d9edf7 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning { + background: #fcf8e3 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger { + background: #f2dede !important; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 30px; + background-color: #fff; + border-bottom: 1px solid #ddd; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #f5f5f5 !important; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 8px; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #fff; + border: 1px solid #ddd; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #f9f9f9; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #ddd; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #ddd; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #ddd; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #ddd; + padding: 4px; + padding-top: 6px; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css new file mode 100644 index 0000000..f18324d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;max-width:100%;margin-bottom:20px;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:2px solid #ddd;background-color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #ddd;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #ddd;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #ddd;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #ddd;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-bordered{border:1px solid #ddd}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #ddd}.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content{padding:5px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:24px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:5px}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success{background:#dff0d8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info{background:#d9edf7!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{background:#fcf8e3!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger{background:#f2dede!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:30px;background-color:#fff;border-bottom:1px solid #ddd}.tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #ddd;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#f9f9f9}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#ddd;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #ddd}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_bootstrap.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css.map b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css.map new file mode 100644 index 0000000..bc93f17 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_bootstrap.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAChB,mBAAoB,AAEpB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,0CACE,oBAAsB,CACvB,AAED,kCACE,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BACE,kBAAmB,AACnB,sBAAuB,AACvB,WAAY,AACZ,6BAA8B,AAC9B,sBAAuB,AACvB,gBAAkB,AAClB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,YAAc,CACf,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,eAAiB,CAClB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,WAAa,CACd,AAED,iGACE,aAAe,CAChB,AAED,uGACE,eAAgB,AAChB,UAAY,CACb,AAED,+FACE,iBAAmB,CACpB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,8IACE,uBAAyB,CAC1B,AAED,yFACE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,0GACE,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,gBAAiB,AACjB,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,4HACE,UAAY,CACb,AAED,6IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,2HACE,UAAY,CACb,AAED,4IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,4HACE,UAAY,CACb,AAED,6IACE,mBAAoB,AACpB,0BAA2B,AAC3B,UAAY,CACb,AAED,+GACE,uBAAwB,AACpB,yBAA0B,AAC9B,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,4GACE,qBAAsB,AAClB,uBAAwB,AAC5B,OAAQ,AACR,QAAS,AACT,QAAS,AACT,WAAa,CACd,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,UAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,gBAAiB,AACjB,cAAgB,CACjB,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,0BAA2B,AAC3B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,kDACE,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,kDACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,sBAAuB,AACvB,iBAAmB,CACpB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,sBAAuB,AACvB,kBAAmB,AACnB,6BAAqC,CACtC,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sDACE,wBAA0B,CAC3B,AAED,0BACE,qBAAuB,CACxB,AAMD,4JACE,2BAA6B,CAC9B,AAED,mFACE,WAAa,CACd,AAED,kFACE,eAAiB,CAClB,AAED,kGACE,WAAa,CACd,AAED,yEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,uEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,yEACE,4BAA+B,CAChC,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,4BAA8B,CAC/B,AAED,0CACE,mCAAqC,AACrC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,UAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,UAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,YAAa,AACb,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,aAAc,AACd,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,wDACE,qBAAsB,AACtB,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,kBAAoB,CACrB,AAED,uDACE,oBAAsB,CACvB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,gBACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,oCAAyC,AACzC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,qCACE,kBAAmB,AACnB,sBAAuB,AACvB,iBAAkB,AAClB,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,kEACE,UAAY,CACb,AAED,8EACE,eAAgB,AAChB,kBAAoB,CACrB,AAED,iEACE,kBAAoB,CACrB,AAED,uEACE,qBAAsB,AACtB,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,WAAY,AACZ,yBAA0B,AAC1B,mBAAoB,AACpB,kBAAmB,AACnB,mBAAoB,AAEhB,uBAAyB,CAC9B,AAED,0CACE,yBAA2B,CAC5B,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAiB,AACjB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,WAAY,AACZ,kBAAoB,CACrB,AAED,4EACE,oCAA4C,CAC7C,AAED,qEACE,yBAA2B,CAC5B,AAED,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,+DACE,YAAa,AACb,iBAAmB,CACpB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB,AAED,yBACE,aAAe,CAChB,AAED,yBACE,mBAAoB,AACpB,aAAe,CAChB,AAED,0DACE,kBAAoB,CACrB,AAED,wGACE,eAAsB,AACtB,gBAAkB,CACnB,AAED,kGACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,kGACE,SAAU,AACV,UAAe,CAChB,AAED,wDACE,qBAAsB,AACtB,0BAA4B,CAC7B,AAED,oFACE,eAAsB,AACtB,gBAAiB,AACjB,4BAAmC,AACnC,+BAAgC,AAChC,oBAAqB,AACrB,2BAA6B,CAC9B,AAED,qFACE,eAAsB,AACtB,eAAiB,CAClB,AAED,sDACE,kBAAmB,AACnB,OAAQ,AACR,UAAY,CACb,AAED,2DACE,QAAS,AACT,SAAW,CACZ,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B,AAED,oDACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,0DACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,6FACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,4BAA+B,CAChC,AAED,4EACE,oBAAsB,CACvB,AAED,qEACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,yDACE,iBAAkB,AAClB,UAAY,CACb,AAED,mDACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,0DACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,0FACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,gGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,wFACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,8FACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB","file":"tabulator_bootstrap.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator[tabulator-layout=\"fitDataTable\"] {\n display: inline-block;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 2px solid #ddd;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header.tabulator-header-hidden {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #ddd;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button {\n padding: 0 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover {\n cursor: pointer;\n opacity: .6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder {\n position: relative;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor {\n width: calc(100% - 22px);\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 4px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter {\n color: #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-bottom: none;\n border-top: 6px solid #666;\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter {\n -ms-flex-pack: center;\n justify-content: center;\n left: 0;\n right: 0;\n top: 4px;\n bottom: auto;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 600%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n min-height: 100%;\n min-width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #fff;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ececec !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #ddd;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator {\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid #ddd;\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n padding: 2px 5px;\n border: 1px solid #ddd;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.2);\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-bordered {\n border: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 5px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 24px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 5px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success {\n background: #dff0d8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info {\n background: #d9edf7 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning {\n background: #fcf8e3 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger {\n background: #f2dede !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 30px;\n background-color: #fff;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #f5f5f5 !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 8px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n outline: none;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-menu {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid #ddd;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-menu .tabulator-menu-item {\n position: relative;\n box-sizing: border-box;\n padding: 5px 10px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled {\n opacity: .5;\n}\n\n.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {\n cursor: pointer;\n background: #f9f9f9;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu {\n padding-right: 25px;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {\n display: inline-block;\n position: absolute;\n top: calc(5px + .4em);\n right: 10px;\n height: 7px;\n width: 7px;\n content: '';\n border-width: 1px 1px 0 0;\n border-style: solid;\n border-color: #ddd;\n vertical-align: top;\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.tabulator-menu .tabulator-menu-separator {\n border-top: 1px solid #ddd;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.focused {\n outline: 1px solid #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-notice {\n padding: 4px;\n text-align: center;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n\n.tabulator.tabulator-ltr {\n direction: ltr;\n}\n\n.tabulator.tabulator-rtl {\n text-align: initial;\n direction: rtl;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col {\n text-align: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n margin-right: initial;\n margin-left: -1px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-left: 25px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n left: 8px;\n right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell {\n border-right: initial;\n border-left: 1px solid #ddd;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n margin-right: initial;\n margin-left: 5px;\n border-bottom-left-radius: initial;\n border-bottom-right-radius: 1px;\n border-left: initial;\n border-right: 2px solid #ddd;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control {\n margin-right: initial;\n margin-left: 5px;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle {\n position: absolute;\n left: 0;\n right: auto;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev {\n right: 0;\n left: auto;\n}\n\n.tabulator-print-fullscreen {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n}\n\nbody.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {\n display: none !important;\n}\n\n.tabulator-print-table {\n border-collapse: collapse;\n}\n\n.tabulator-print-table .tabulator-print-table-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-print-table .tabulator-print-table-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td {\n padding-left: 30px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td {\n padding-left: 50px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td {\n padding-left: 70px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td {\n padding-left: 90px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td {\n padding-left: 110px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-print-table .tabulator-print-table-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-print-table .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-print-table .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-print-table .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.css b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.css new file mode 100644 index 0000000..c06b2fa --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.css @@ -0,0 +1,1390 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 1rem; + text-align: left; + width: 100%; + max-width: 100%; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-top: 1px solid #dee2e6; + border-bottom: 2px solid #dee2e6; + background-color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #dee2e6; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 0.75rem; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 0; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #dee2e6; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input { + padding: .375rem .75rem; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + font-size: 1rem; + line-height: 1.5; + color: #495057; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input:focus { + color: #495057; + background-color: #fff; + border: 1px solid #1D68CD; + outline: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #dee2e6; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #dee2e6; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + width: 100%; + background: white !important; + border-top: 1px solid #dee2e6; + border-bottom: 1px solid #dee2e6; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #ececec !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #dee2e6; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #dee2e6; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 2px solid #dee2e6; + text-align: right; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-bottom: 1px solid #dee2e6; + border-top: 1px solid #dee2e6; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #dee2e6; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0; + margin-top: 5px; + padding: 8px 12px; + border: 1px solid #dee2e6; + border-right: none; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page[data-page="first"] { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +.tabulator .tabulator-footer .tabulator-page[data-page="last"] { + border: 1px solid #dee2e6; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.tabulator .tabulator-footer .tabulator-page.active { + border-color: #007bff; + background-color: #007bff; + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + border-color: #dee2e6; + background: #fff; + color: #6c757d; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + border-color: #dee2e6; + background: #e9ecef; + color: #0056b3; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator.thead-dark .tabulator-header { + border-color: #32383e; + background-color: #212529; + color: #fff; +} + +.tabulator.thead-dark .tabulator-header .tabulator-col { + border-color: #32383e; + background-color: #212529; + color: #fff; +} + +.tabulator.table-dark { + background-color: #212529; +} + +.tabulator.table-dark:not(.thead-light) .tabulator-header { + border-color: #32383e; + background-color: #212529; + color: #fff; +} + +.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col { + border-color: #32383e; + background-color: #212529; + color: #fff; +} + +.tabulator.table-dark .tabulator-tableHolder { + color: #fff; +} + +.tabulator.table-dark .tabulator-row { + border-color: #32383e; + background-color: #212529; + color: #fff; +} + +.tabulator.table-dark .tabulator-row:hover { + background-color: #32383e; +} + +.tabulator.table-dark .tabulator-row:hover .tabulator-cell { + background-color: rgba(255, 255, 255, 0.075); +} + +.tabulator.table-dark .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator.table-dark .tabulator-footer { + border-color: #32383e !important; +} + +.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder { + border-color: #32383e !important; + background: #212529 !important; +} + +.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder .tabulator-row { + border-color: #32383e !important; + background-color: #212529 !important; + color: #fff !important; +} + +.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even) { + background-color: #f9f9f9; +} + +.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selectable:hover { + background-color: #f5f5f5; + cursor: pointer; +} + +.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) .tabulator-cell { + background-color: rgba(255, 255, 255, 0.05); +} + +.tabulator.table-bordered { + border: 1px solid #dee2e6; +} + +.tabulator.table-bordered .tabulator-header .tabulator-col { + border-right: 1px solid #dee2e6; +} + +.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid #dee2e6; +} + +.tabulator.table-borderless .tabulator-header { + border: none; +} + +.tabulator.table-borderless .tabulator-row { + border: none; +} + +.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.3rem !important; +} + +.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row { + min-height: 1.6rem; +} + +.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.3rem !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary { + background: #b8daff !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary { + background: #d6d8db !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success { + background: #c3e6cb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info { + background: #bee5eb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning { + background: #ffeeba !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger { + background: #f5c6cb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light { + background: #fdfdfe !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark { + background: #c6c8ca !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active { + background: #f5f5f5 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary { + background: #007bff !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary { + background: #6c757d !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success { + background: #28a745 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info { + background: #17a2b8 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning { + background: #ffc107 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger { + background: #dc3545 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light { + background: #f8f9fa !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark { + background: #343a40 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active { + background: #f5f5f5 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary { + background: #b8daff !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary { + background: #d6d8db !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success { + background: #c3e6cb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info { + background: #bee5eb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning { + background: #ffeeba !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger { + background: #f5c6cb !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light { + background: #fdfdfe !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark { + background: #c6c8ca !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active { + background: #f5f5f5 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary { + background: #007bff !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary { + background: #6c757d !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success { + background: #28a745 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info { + background: #17a2b8 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning { + background: #ffc107 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger { + background: #dc3545 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light { + background: #f8f9fa !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark { + background: #343a40 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active { + background: #f5f5f5 !important; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 2.5rem; + background-color: #fff; + border-bottom: 1px solid #dee2e6; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #f5f5f5; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #dee2e6; + border-bottom: 1px solid #dee2e6; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #dee2e6; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #dee2e6; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #dee2e6; + border-bottom: 1px solid #dee2e6; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 1rem; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 0.75rem; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #dee2e6; + border-bottom: 2px solid #dee2e6; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #ccc; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #dee2e6; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #fff; + border: 1px solid #dee2e6; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 1rem; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #f9f9f9; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #dee2e6; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #dee2e6; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #dee2e6; + font-size: 1rem; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #dee2e6; + padding: 4px; + padding-top: 6px; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #dee2e6; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #dee2e6; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #dee2e6; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #dee2e6; + border-bottom: 2px solid #dee2e6; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #ccc; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #ccc; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css new file mode 100644 index 0000000..9a04d16 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:1rem;text-align:left;width:100%;max-width:100%;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;background-color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #dee2e6;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.75rem}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:0}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #dee2e6;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input{padding:.375rem .75rem;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-size:1rem;line-height:1.5;color:#495057}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input:focus{color:#495057;background-color:#fff;border:1px solid #1d68cd;outline:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #dee2e6}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #dee2e6}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #dee2e6;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #dee2e6;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #dee2e6;border-radius:3px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0;margin-top:5px;padding:8px 12px;border:1px solid #dee2e6;border-right:none;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page[data-page=first]{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabulator .tabulator-footer .tabulator-page[data-page=last]{border:1px solid #dee2e6;border-top-right-radius:4px;border-bottom-right-radius:4px}.tabulator .tabulator-footer .tabulator-page.active{border-color:#007bff;background-color:#007bff;color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{border-color:#dee2e6;background:#fff;color:#6c757d}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;border-color:#dee2e6;background:#e9ecef;color:#0056b3}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.thead-dark .tabulator-header,.tabulator.thead-dark .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark{background-color:#212529}.tabulator.table-dark:not(.thead-light) .tabulator-header,.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark .tabulator-tableHolder{color:#fff}.tabulator.table-dark .tabulator-row{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark .tabulator-row:hover{background-color:#32383e}.tabulator.table-dark .tabulator-row:hover .tabulator-cell{background-color:hsla(0,0%,100%,.075)}.tabulator.table-dark .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator.table-dark .tabulator-footer{border-color:#32383e!important}.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder{border-color:#32383e!important;background:#212529!important}.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder .tabulator-row{border-color:#32383e!important;background-color:#212529!important;color:#fff!important}.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(2n).tabulator-selected{background-color:#9abcea}.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:#f5f5f5;cursor:pointer}.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator.table-striped.table-dark .tabulator-row:nth-child(2n) .tabulator-cell{background-color:hsla(0,0%,100%,.05)}.tabulator.table-bordered{border:1px solid #dee2e6}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #dee2e6}.tabulator.table-borderless .tabulator-header,.tabulator.table-borderless .tabulator-row{border:none}.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content{padding:.3rem!important}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:1.6rem}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.3rem!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active{background:#f5f5f5!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:2.5rem;background-color:#fff;border-bottom:1px solid #dee2e6}.tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:1rem}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.75rem;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #dee2e6;border-bottom:2px solid #dee2e6}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #dee2e6;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #dee2e6;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#f9f9f9}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#dee2e6;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #dee2e6}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #dee2e6;font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #dee2e6;padding:4px;padding-top:6px;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #dee2e6}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #dee2e6}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #dee2e6;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #dee2e6;border-bottom:2px solid #dee2e6}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc} +/*# sourceMappingURL=tabulator_bootstrap4.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css.map b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css.map new file mode 100644 index 0000000..caa1c00 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bootstrap/tabulator_bootstrap4.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_bootstrap4.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAEhB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,0CACE,oBAAsB,CACvB,AAED,kCACE,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BACE,kBAAmB,AACnB,sBAAuB,AACvB,WAAY,AACZ,6BAA8B,AAC9B,gCAAiC,AACjC,sBAAuB,AACvB,gBAAkB,AAClB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,YAAc,CACf,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,eAAiB,CAClB,AAED,6DACE,kBAAmB,AACnB,yBAA0B,AAC1B,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,cAAiB,CAClB,AAED,iGACE,aAAe,CAChB,AAED,uGACE,eAAgB,AAChB,UAAY,CACb,AAED,+FACE,iBAAmB,CACpB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,8IACE,uBAAyB,CAC1B,AAED,yFACE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAS,CACV,AAED,0GACE,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,6BAA8B,AAC9B,gBAAiB,AACjB,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,2EACE,uBAAwB,AACxB,sBAAuB,AACvB,4BAA6B,AAC7B,yBAA0B,AAC1B,qBAAsB,AACtB,qEAAsE,AACtE,eAAgB,AAChB,gBAAiB,AACjB,aAAe,CAChB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,iFACE,cAAe,AACf,sBAAuB,AACvB,yBAA0B,AAC1B,SAAW,CACZ,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,4HACE,UAAY,CACb,AAED,6IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,2HACE,UAAY,CACb,AAED,4IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,4HACE,UAAY,CACb,AAED,6IACE,mBAAoB,AACpB,0BAA2B,AAC3B,UAAY,CACb,AAED,+GACE,uBAAwB,AACpB,yBAA0B,AAC9B,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,4GACE,qBAAsB,AAClB,uBAAwB,AAC5B,OAAQ,AACR,QAAS,AACT,QAAS,AACT,WAAa,CACd,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,UAAY,CACb,AAED,qEACE,8BAAgC,CACjC,AAED,sEACE,6BAA+B,CAChC,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,6BAA8B,AAC9B,gCAAiC,AACjC,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,gBAAiB,AACjB,cAAgB,CACjB,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,+BAAiC,CAClC,AAED,yGACE,4BAA8B,CAC/B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,6BAA8B,AAC9B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,gCAAiC,AACjC,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,kDACE,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,kDACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,yBAA0B,AAC1B,iBAAmB,CACpB,AAED,6CACE,qBAAsB,AACtB,SAAU,AACV,eAAgB,AAChB,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,6BAAqC,CACtC,AAED,8DACE,2BAA4B,AAC5B,6BAA+B,CAChC,AAED,6DACE,yBAA0B,AAC1B,4BAA6B,AAC7B,8BAAgC,CACjC,AAED,oDACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sDACE,qBAAsB,AACtB,gBAAiB,AACjB,aAAe,CAChB,AAED,kEACE,eAAgB,AAChB,qBAAsB,AACtB,mBAAoB,AACpB,aAAe,CAChB,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAQD,+FACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sBACE,wBAA0B,CAC3B,AAQD,mIALE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CAOb,AAED,6CACE,UAAY,CACb,AAED,qCACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,2CACE,wBAA0B,CAC3B,AAED,2DACE,qCAA6C,CAC9C,AAED,wDACE,wBAA0B,CAC3B,AAED,wCACE,8BAAiC,CAClC,AAED,gEACE,+BAAiC,AACjC,4BAA+B,CAChC,AAED,+EACE,+BAAiC,AACjC,mCAAqC,AACrC,oBAAuB,CACxB,AAED,uEACE,wBAA0B,CAC3B,AAED,0FACE,wBAA0B,CAC3B,AAED,kGACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gGACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,iFACE,oCAA4C,CAC7C,AAED,0BACE,wBAA0B,CAC3B,AAMD,4JACE,8BAAgC,CACjC,AAMD,yFACE,WAAa,CACd,AAED,4EACE,uBAA2B,CAC5B,AAED,2EACE,iBAAmB,CACpB,AAED,2FACE,uBAA2B,CAC5B,AAED,gFACE,4BAA+B,CAChC,AAED,kFACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,8EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,4EACE,4BAA+B,CAChC,AAED,2EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,4EACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,kGACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,8FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,4FACE,4BAA+B,CAChC,AAED,2FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,4FACE,4BAA+B,CAChC,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,kBAAmB,AACnB,sBAAuB,AACvB,+BAAiC,CAClC,AAED,0CACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,6BAA8B,AAC9B,gCAAiC,AACjC,8BAAgC,AAChC,UAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,UAAY,CACb,AAED,uDACE,8BAAgC,CACjC,AAED,wDACE,6BAA+B,CAChC,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,6BAA8B,AAC9B,+BAAiC,CAClC,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,eAAiB,AACjB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,aAAc,AACd,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,8BAA+B,AAC/B,+BAAiC,CAClC,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,wDACE,qBAAsB,AACtB,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,+BAAgC,AAChC,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,kBAAoB,CACrB,AAED,uDACE,oBAAsB,CACvB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,gBACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,gBAAiB,AACjB,yBAA0B,AAC1B,oCAAyC,AACzC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,qCACE,kBAAmB,AACnB,sBAAuB,AACvB,iBAAkB,AAClB,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,kEACE,UAAY,CACb,AAED,8EACE,eAAgB,AAChB,kBAAoB,CACrB,AAED,iEACE,kBAAoB,CACrB,AAED,uEACE,qBAAsB,AACtB,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,WAAY,AACZ,yBAA0B,AAC1B,mBAAoB,AACpB,qBAAsB,AACtB,mBAAoB,AAEhB,uBAAyB,CAC9B,AAED,0CACE,4BAA8B,CAC/B,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAiB,AACjB,yBAA0B,AAC1B,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,WAAY,AACZ,kBAAoB,CACrB,AAED,4EACE,oCAA4C,CAC7C,AAED,qEACE,yBAA2B,CAC5B,AAED,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,+DACE,YAAa,AACb,iBAAmB,CACpB,AAED,8DACE,gCAAiC,AACjC,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB,AAED,yBACE,aAAe,CAChB,AAED,yBACE,mBAAoB,AACpB,aAAe,CAChB,AAED,0DACE,kBAAoB,CACrB,AAED,wGACE,eAAsB,AACtB,gBAAkB,CACnB,AAED,kGACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,kGACE,SAAU,AACV,UAAe,CAChB,AAED,wDACE,qBAAsB,AACtB,6BAA+B,CAChC,AAED,oFACE,eAAsB,AACtB,gBAAiB,AACjB,4BAAmC,AACnC,+BAAgC,AAChC,oBAAqB,AACrB,8BAAgC,CACjC,AAED,qFACE,eAAsB,AACtB,eAAiB,CAClB,AAED,sDACE,kBAAmB,AACnB,OAAQ,AACR,UAAY,CACb,AAED,2DACE,QAAS,AACT,SAAW,CACZ,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B,AAED,oDACE,sBAAuB,AACvB,6BAA8B,AAC9B,+BAAgC,AAChC,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,0DACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,6FACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,4BAA+B,CAChC,AAED,4EACE,oBAAsB,CACvB,AAED,qEACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,yDACE,iBAAkB,AAClB,UAAY,CACb,AAED,mDACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,8BAA+B,AAC/B,+BAAiC,CAClC,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,0DACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,0FACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,gGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,wFACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,8FACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB","file":"tabulator_bootstrap4.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 1rem;\n text-align: left;\n width: 100%;\n max-width: 100%;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator[tabulator-layout=\"fitDataTable\"] {\n display: inline-block;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-top: 1px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header.tabulator-header-hidden {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #dee2e6;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.75rem;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button {\n padding: 0 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover {\n cursor: pointer;\n opacity: .6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder {\n position: relative;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor {\n width: calc(100% - 22px);\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input {\n padding: .375rem .75rem;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n border-radius: .25rem;\n transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n font-size: 1rem;\n line-height: 1.5;\n color: #495057;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input:focus {\n color: #495057;\n background-color: #fff;\n border: 1px solid #1D68CD;\n outline: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter {\n color: #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-bottom: none;\n border-top: 6px solid #666;\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter {\n -ms-flex-pack: center;\n justify-content: center;\n left: 0;\n right: 0;\n top: 4px;\n bottom: auto;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 600%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n min-height: 100%;\n min-width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #fff;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ececec !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #dee2e6;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #dee2e6;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator {\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid #dee2e6;\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0;\n margin-top: 5px;\n padding: 8px 12px;\n border: 1px solid #dee2e6;\n border-right: none;\n background: rgba(255, 255, 255, 0.2);\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"first\"] {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"last\"] {\n border: 1px solid #dee2e6;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n border-color: #007bff;\n background-color: #007bff;\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n border-color: #dee2e6;\n background: #fff;\n color: #6c757d;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n border-color: #dee2e6;\n background: #e9ecef;\n color: #0056b3;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.thead-dark .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.thead-dark .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark {\n background-color: #212529;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-tableHolder {\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-row {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-row:hover {\n background-color: #32383e;\n}\n\n.tabulator.table-dark .tabulator-row:hover .tabulator-cell {\n background-color: rgba(255, 255, 255, 0.075);\n}\n\n.tabulator.table-dark .tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator.table-dark .tabulator-footer {\n border-color: #32383e !important;\n}\n\n.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder {\n border-color: #32383e !important;\n background: #212529 !important;\n}\n\n.tabulator.table-dark .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n border-color: #32383e !important;\n background-color: #212529 !important;\n color: #fff !important;\n}\n\n.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selectable:hover {\n background-color: #f5f5f5;\n cursor: pointer;\n}\n\n.tabulator.table-striped:not(.table-dark) .tabulator-row:nth-child(even).tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) .tabulator-cell {\n background-color: rgba(255, 255, 255, 0.05);\n}\n\n.tabulator.table-bordered {\n border: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-borderless .tabulator-header {\n border: none;\n}\n\n.tabulator.table-borderless .tabulator-row {\n border: none;\n}\n\n.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.3rem !important;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 1.6rem;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.3rem !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active {\n background: #f5f5f5 !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 2.5rem;\n background-color: #fff;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #f5f5f5;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 1rem;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.75rem;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n outline: none;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #dee2e6;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-menu {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid #dee2e6;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-menu .tabulator-menu-item {\n position: relative;\n box-sizing: border-box;\n padding: 5px 10px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled {\n opacity: .5;\n}\n\n.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {\n cursor: pointer;\n background: #f9f9f9;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu {\n padding-right: 25px;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {\n display: inline-block;\n position: absolute;\n top: calc(5px + .4em);\n right: 10px;\n height: 7px;\n width: 7px;\n content: '';\n border-width: 1px 1px 0 0;\n border-style: solid;\n border-color: #dee2e6;\n vertical-align: top;\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.tabulator-menu .tabulator-menu-separator {\n border-top: 1px solid #dee2e6;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid #dee2e6;\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.focused {\n outline: 1px solid #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-notice {\n padding: 4px;\n text-align: center;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #dee2e6;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n\n.tabulator.tabulator-ltr {\n direction: ltr;\n}\n\n.tabulator.tabulator-rtl {\n text-align: initial;\n direction: rtl;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col {\n text-align: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n margin-right: initial;\n margin-left: -1px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-left: 25px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n left: 8px;\n right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell {\n border-right: initial;\n border-left: 1px solid #dee2e6;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n margin-right: initial;\n margin-left: 5px;\n border-bottom-left-radius: initial;\n border-bottom-right-radius: 1px;\n border-left: initial;\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control {\n margin-right: initial;\n margin-left: 5px;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle {\n position: absolute;\n left: 0;\n right: auto;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev {\n right: 0;\n left: auto;\n}\n\n.tabulator-print-fullscreen {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n}\n\nbody.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {\n display: none !important;\n}\n\n.tabulator-print-table {\n border-collapse: collapse;\n}\n\n.tabulator-print-table .tabulator-print-table-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #dee2e6;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-print-table .tabulator-print-table-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td {\n padding-left: 30px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td {\n padding-left: 50px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td {\n padding-left: 70px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td {\n padding-left: 90px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td {\n padding-left: 110px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-print-table .tabulator-print-table-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-print-table .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator-print-table .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-print-table .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.css b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.css new file mode 100644 index 0000000..28e7425 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.css @@ -0,0 +1,1151 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: white; + font-size: 1rem; + text-align: left; + overflow: hidden; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border: 1px solid #dbdbdb; + border-width: 0 0 2px; + background-color: transparent; + color: #363636; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background: transparent; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + background: rgba(0, 0, 0, 0); + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 0.5em 0.75em; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 0px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input { + border: 1px solid #dbdbdb; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #363636; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #363636; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #363636; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #363636; + color: #363636; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: rgba(13, 13, 13, 0) !important; + border: 1px solid #dbdbdb; + border-width: 2px 0 0; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: rgba(13, 13, 13, 0) !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell { + border-bottom-width: 0; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #ccc; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: transparent; + white-space: nowrap; + overflow: visible; + color: #363636; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #ededed !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border: 1px solid #dbdbdb; + border-width: 0 0 2px; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border: 1px solid #dbdbdb; + border-width: 2px 0 0; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs .tabulator-cell { + border-bottom-width: 0; +} + +.tabulator .tabulator-footer { + padding: 0.5em 0.75em; + border: 1px solid #dbdbdb; + border-width: 2px 0 0; + background-color: transparent; + text-align: right; + color: #363636; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 10px -10px; + background: rgba(13, 13, 13, 0) !important; + border: 1px solid #dbdbdb; + border-width: 0 0 2px; + text-align: left; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: rgba(13, 13, 13, 0) !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell { + border-bottom-width: 0; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + color: #363636; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #dbdbdb; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 0.1875em; + padding: calc(0.375em - 1px) 0.75em; + border: 1px solid #dbdbdb; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); + font-size: 1rem; +} + +.tabulator .tabulator-footer .tabulator-page.active { + border-color: #4a4a4a; + color: #363636; + font-weight: bold; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + border-color: #b5b5b5; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator.is-striped .tabulator-row:nth-child(even) { + background-color: #fafafa; +} + +.tabulator.is-bordered { + border: 1px solid #dbdbdb; +} + +.tabulator.is-bordered .tabulator-header .tabulator-col { + border-right: 1px solid #dbdbdb; +} + +.tabulator.is-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid #dbdbdb; +} + +.tabulator.is-narrow .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.25em 0.5em; +} + +.tabulator.is-narrow .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.25em 0.5em; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: transparent; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #fafafa; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #00d1b2; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #009e86; + cursor: pointer; +} + +.tabulator-row.tabulator-row-moving { + border: 1px solid #000; + background: #fff; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + pointer-events: none; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 1rem; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 0.5em 0.75em; + border: 1px solid #dbdbdb; + border-width: 0 0 1px; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #363636; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #363636; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #363636; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #363636; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: transparent; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + color: #363636; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #363636; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #363636; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #d00; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: transparent; + border: 1px solid #aaa; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 1rem; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #fafafa; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #aaa; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #aaa; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: transparent; + border: 1px solid #aaa; + font-size: 1rem; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #363636; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: transparent; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(0, 0, 0, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: transparent; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #363636; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #aaa; + padding: 4px; + padding-top: 6px; + color: #363636; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #aaa; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + color: #363636; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #363636; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #363636; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #d00; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #363636; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #363636; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #363636; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #363636; +} diff --git a/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css new file mode 100644 index 0000000..ef990d0 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;font-size:1rem;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border:1px solid #dbdbdb;border-width:0 0 2px;background-color:transparent;color:#363636;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background:transparent;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;background:transparent;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.5em .75em}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:0}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input{border:1px solid #dbdbdb}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:transparent}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#363636}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #363636}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#363636}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #363636;color:#363636}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:hsla(0,0%,5%,0)!important;border:1px solid #dbdbdb;border-width:2px 0 0;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:hsla(0,0%,5%,0)!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell{border-bottom-width:0}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:transparent;white-space:nowrap;overflow:visible;color:#363636}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ededed!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border:1px solid #dbdbdb;border-width:0 0 2px}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border:1px solid #dbdbdb;border-width:2px 0 0}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs .tabulator-cell{border-bottom-width:0}.tabulator .tabulator-footer{padding:.5em .75em;border:1px solid #dbdbdb;border-width:2px 0 0;background-color:transparent;text-align:right;color:#363636;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 10px;background:hsla(0,0%,5%,0)!important;border:1px solid #dbdbdb;border-width:0 0 2px;text-align:left;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:hsla(0,0%,5%,0)!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell{border-bottom-width:0}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#363636;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #dbdbdb;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 .1875em;padding:calc(.375em - 1px) .75em;border:1px solid #dbdbdb;border-radius:3px;background:hsla(0,0%,100%,.2);font-size:1rem}.tabulator .tabulator-footer .tabulator-page.active{border-color:#4a4a4a;color:#363636;font-weight:700}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;border-color:#b5b5b5}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.is-striped .tabulator-row:nth-child(2n){background-color:#fafafa}.tabulator.is-bordered{border:1px solid #dbdbdb}.tabulator.is-bordered .tabulator-header .tabulator-col,.tabulator.is-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #dbdbdb}.tabulator.is-narrow .tabulator-header .tabulator-col .tabulator-col-content,.tabulator.is-narrow .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.25em .5em}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:transparent}.tabulator-row.tabulator-selectable:hover{background-color:#fafafa;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#00d1b2}.tabulator-row.tabulator-selected:hover{background-color:#009e86;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:1rem}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.5em .75em;border:1px solid #dbdbdb;border-width:0 0 1px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #363636;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#363636}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#363636}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#363636}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:transparent;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#363636;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #363636;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #363636;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:transparent;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#fafafa}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#aaa;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:transparent;border:1px solid #aaa;font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#363636}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid rgba(0,0,0,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#363636;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#363636;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#363636;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #363636;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #363636;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #363636;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#363636}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#363636}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#363636} +/*# sourceMappingURL=tabulator_bulma.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css.map b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css.map new file mode 100644 index 0000000..3262196 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/bulma/tabulator_bulma.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_bulma.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAwB,AACxB,eAAgB,AAChB,gBAAiB,AACjB,gBAAiB,AAEjB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,0CACE,oBAAsB,CACvB,AAED,kCACE,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BACE,kBAAmB,AACnB,sBAAuB,AACvB,WAAY,AACZ,yBAA0B,AAC1B,qBAAsB,AACtB,6BAA8B,AAC9B,cAAe,AACf,gBAAkB,AAClB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,YAAc,CACf,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,uBAAwB,AACxB,gBAAiB,AACjB,sBAAuB,AACvB,eAAiB,CAClB,AAED,6DACE,kBAAmB,AACnB,uBAA6B,AAC7B,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,kBAAsB,CACvB,AAED,iGACE,aAAe,CAChB,AAED,uGACE,eAAgB,AAChB,UAAY,CACb,AAED,+FACE,iBAAmB,CACpB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,8IACE,uBAAyB,CAC1B,AAED,yFACE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAW,CACZ,AAED,0GACE,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,gBAAiB,AACjB,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,2EACE,wBAA0B,CAC3B,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,4BAAmC,CACpC,AAED,4HACE,UAAY,CACb,AAED,6IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,2HACE,aAAe,CAChB,AAED,4IACE,gBAAiB,AACjB,+BAAiC,CAClC,AAED,4HACE,aAAe,CAChB,AAED,6IACE,mBAAoB,AACpB,6BAA8B,AAC9B,aAAe,CAChB,AAED,+GACE,uBAAwB,AACpB,yBAA0B,AAC9B,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,4GACE,qBAAsB,AAClB,uBAAwB,AAC5B,OAAQ,AACR,QAAS,AACT,QAAS,AACT,WAAa,CACd,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,UAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,eAAgB,AAChB,qCAA2C,AAC3C,yBAA0B,AAC1B,qBAAsB,AACtB,eAAiB,CAClB,AAED,oEACE,oCAA2C,CAC5C,AAED,iGACE,YAAc,CACf,AAED,oFACE,qBAAuB,CACxB,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,gBAAiB,AACjB,cAAgB,CACjB,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,6BAA8B,AAC9B,mBAAoB,AACpB,iBAAkB,AAClB,aAAe,CAChB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,yBAA0B,AAC1B,oBAAsB,CACvB,AAED,yGACE,yBAA0B,AAC1B,oBAAsB,CACvB,AAED,kGACE,qBAAuB,CACxB,AAED,6BACE,mBAAsB,AACtB,yBAA0B,AAC1B,qBAAsB,AACtB,6BAA8B,AAC9B,iBAAkB,AAClB,cAAe,AACf,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,uBAA8B,AAC9B,qCAA2C,AAC3C,yBAA0B,AAC1B,qBAAsB,AACtB,gBAAiB,AACjB,eAAiB,CAClB,AAED,oEACE,oCAA2C,CAC5C,AAED,iGACE,YAAc,CACf,AAED,oFACE,qBAAuB,CACxB,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,kDACE,cAAe,AACf,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,kDACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,yBAA0B,AAC1B,iBAAmB,CACpB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,iBAAmB,AACnB,iCAAoC,AACpC,yBAA0B,AAC1B,kBAAmB,AACnB,8BAAqC,AACrC,cAAgB,CACjB,AAED,oDACE,qBAAsB,AACtB,cAAe,AACf,eAAkB,CACnB,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,oBAAsB,CACvB,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,mDACE,wBAA0B,CAC3B,AAED,uBACE,wBAA0B,CAC3B,AAMD,sJACE,8BAAgC,CACjC,AAMD,yKACE,kBAAsB,CACvB,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,0CACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,oCACE,sBAAuB,AACvB,eAAiB,CAClB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,oBAAqB,AACrB,UAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,UAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,mBAAsB,AACtB,yBAA0B,AAC1B,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,iDACE,yBAA0B,AAC1B,aAAc,AACd,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,kBAAmB,AACnB,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,wDACE,qBAAsB,AACtB,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,gBAAiB,AACjB,gBAAkB,AAClB,cAAe,AACf,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,6BAA8B,AAC9B,eAAiB,CAClB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,kBAAoB,CACrB,AAED,uDACE,oBAAsB,CACvB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,8BAA+B,AAC/B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,gBACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,uBAAwB,AACxB,sBAAuB,AACvB,oCAAyC,AACzC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,qCACE,kBAAmB,AACnB,sBAAuB,AACvB,iBAAkB,AAClB,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,kEACE,UAAY,CACb,AAED,8EACE,eAAgB,AAChB,kBAAoB,CACrB,AAED,iEACE,kBAAoB,CACrB,AAED,uEACE,qBAAsB,AACtB,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,WAAY,AACZ,yBAA0B,AAC1B,mBAAoB,AACpB,kBAAmB,AACnB,mBAAoB,AAEhB,uBAAyB,CAC9B,AAED,0CACE,yBAA2B,CAC5B,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,uBAAwB,AACxB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,6DACE,YAAa,AACb,aAAe,CAChB,AAED,oEACE,kBAAmB,AACnB,kBAAoB,CACrB,AAED,4EACE,gCAAsC,CACvC,AAED,qEACE,yBAA2B,CAC5B,AAED,mEACE,eAAgB,AAChB,kBAAmB,AACnB,kBAAoB,CACrB,AAED,+DACE,YAAa,AACb,cAAe,AACf,iBAAmB,CACpB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,cAAe,AACf,eAAkB,CACnB,AAED,yBACE,aAAe,CAChB,AAED,yBACE,mBAAoB,AACpB,aAAe,CAChB,AAED,0DACE,mBAAoB,AACpB,2BAA4B,AAC5B,oBAAsB,CACvB,AAED,wGACE,eAAsB,AACtB,gBAAkB,CACnB,AAED,kGACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,kGACE,SAAU,AACV,UAAe,CAChB,AAED,wDACE,qBAAsB,AACtB,0BAA4B,CAC7B,AAED,oFACE,eAAsB,AACtB,gBAAiB,AACjB,4BAAmC,AACnC,+BAAgC,AAChC,oBAAqB,AACrB,2BAA6B,CAC9B,AAED,qFACE,eAAsB,AACtB,eAAiB,CAClB,AAED,sDACE,kBAAmB,AACnB,OAAQ,AACR,UAAY,CACb,AAED,2DACE,QAAS,AACT,SAAW,CACZ,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B,AAED,oDACE,sBAAuB,AACvB,6BAA8B,AAC9B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,gBAAiB,AACjB,gBAAkB,AAClB,cAAe,AACf,cAAgB,CACjB,AAED,0DACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,6FACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,6BAA8B,AAC9B,eAAiB,CAClB,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,4BAA+B,CAChC,AAED,4EACE,oBAAsB,CACvB,AAED,qEACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,8BAA+B,AAC/B,qBAAuB,CACxB,AAED,yDACE,iBAAkB,AAClB,UAAY,CACb,AAED,mDACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,0DACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,0FACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,gGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB,AAED,wFACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB,AAED,8FACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,kBAAoB,CACrB","file":"tabulator_bulma.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: white;\n font-size: 1rem;\n text-align: left;\n overflow: hidden;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator[tabulator-layout=\"fitDataTable\"] {\n display: inline-block;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #dbdbdb;\n border-width: 0 0 2px;\n background-color: transparent;\n color: #363636;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header.tabulator-header-hidden {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background: transparent;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n background: rgba(0, 0, 0, 0);\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.5em 0.75em;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button {\n padding: 0 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover {\n cursor: pointer;\n opacity: .6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder {\n position: relative;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor {\n width: calc(100% - 22px);\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #aaa;\n overflow: hidden;\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input {\n border: 1px solid #dbdbdb;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter {\n color: #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #363636;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #363636;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #363636;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-bottom: none;\n border-top: 6px solid #363636;\n color: #363636;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter {\n -ms-flex-pack: center;\n justify-content: center;\n left: 0;\n right: 0;\n top: 4px;\n bottom: auto;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #aaa;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #aaa;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 600%;\n background: rgba(13, 13, 13, 0) !important;\n border: 1px solid #dbdbdb;\n border-width: 2px 0 0;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: rgba(13, 13, 13, 0) !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell {\n border-bottom-width: 0;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 600%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n min-height: 100%;\n min-width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #ccc;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: transparent;\n white-space: nowrap;\n overflow: visible;\n color: #363636;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ededed !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border: 1px solid #dbdbdb;\n border-width: 0 0 2px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border: 1px solid #dbdbdb;\n border-width: 2px 0 0;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs .tabulator-cell {\n border-bottom-width: 0;\n}\n\n.tabulator .tabulator-footer {\n padding: 0.5em 0.75em;\n border: 1px solid #dbdbdb;\n border-width: 2px 0 0;\n background-color: transparent;\n text-align: right;\n color: #363636;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 10px -10px;\n background: rgba(13, 13, 13, 0) !important;\n border: 1px solid #dbdbdb;\n border-width: 0 0 2px;\n text-align: left;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: rgba(13, 13, 13, 0) !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell {\n border-bottom-width: 0;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator {\n color: #363636;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid #dbdbdb;\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 0.1875em;\n padding: calc(0.375em - 1px) 0.75em;\n border: 1px solid #dbdbdb;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.2);\n font-size: 1rem;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n border-color: #4a4a4a;\n color: #363636;\n font-weight: bold;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n border-color: #b5b5b5;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.is-striped .tabulator-row:nth-child(even) {\n background-color: #fafafa;\n}\n\n.tabulator.is-bordered {\n border: 1px solid #dbdbdb;\n}\n\n.tabulator.is-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #dbdbdb;\n}\n\n.tabulator.is-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #dbdbdb;\n}\n\n.tabulator.is-narrow .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.25em 0.5em;\n}\n\n.tabulator.is-narrow .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.25em 0.5em;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n background-color: transparent;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #fafafa;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #00d1b2;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #009e86;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-row-moving {\n border: 1px solid #000;\n background: #fff;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #aaa;\n border-bottom: 1px solid #aaa;\n pointer-events: none;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #aaa;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #aaa;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #aaa;\n border-bottom: 1px solid #aaa;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 1rem;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.5em 0.75em;\n border: 1px solid #dbdbdb;\n border-width: 0 0 1px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n outline: none;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #aaa;\n border-bottom: 2px solid #aaa;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #363636;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #363636;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #363636;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #363636;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: transparent;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #ccc;\n font-weight: bold;\n color: #363636;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #363636;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #363636;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #d00;\n}\n\n.tabulator-menu {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n background: transparent;\n border: 1px solid #aaa;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-menu .tabulator-menu-item {\n position: relative;\n box-sizing: border-box;\n padding: 5px 10px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled {\n opacity: .5;\n}\n\n.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {\n cursor: pointer;\n background: #fafafa;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu {\n padding-right: 25px;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {\n display: inline-block;\n position: absolute;\n top: calc(5px + .4em);\n right: 10px;\n height: 7px;\n width: 7px;\n content: '';\n border-width: 1px 1px 0 0;\n border-style: solid;\n border-color: #aaa;\n vertical-align: top;\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.tabulator-menu .tabulator-menu-separator {\n border-top: 1px solid #aaa;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: transparent;\n border: 1px solid #aaa;\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n color: #363636;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused {\n outline: 1px solid rgba(0, 0, 0, 0.5);\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.focused {\n outline: 1px solid #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-notice {\n padding: 4px;\n color: #363636;\n text-align: center;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #aaa;\n padding: 4px;\n padding-top: 6px;\n color: #363636;\n font-weight: bold;\n}\n\n.tabulator.tabulator-ltr {\n direction: ltr;\n}\n\n.tabulator.tabulator-rtl {\n text-align: initial;\n direction: rtl;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col {\n text-align: initial;\n border-left: 1px solid #aaa;\n border-right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n margin-right: initial;\n margin-left: -1px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-left: 25px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n left: 8px;\n right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell {\n border-right: initial;\n border-left: 1px solid #aaa;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n margin-right: initial;\n margin-left: 5px;\n border-bottom-left-radius: initial;\n border-bottom-right-radius: 1px;\n border-left: initial;\n border-right: 2px solid #aaa;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control {\n margin-right: initial;\n margin-left: 5px;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle {\n position: absolute;\n left: 0;\n right: auto;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev {\n right: 0;\n left: auto;\n}\n\n.tabulator-print-fullscreen {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n}\n\nbody.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {\n display: none !important;\n}\n\n.tabulator-print-table {\n border-collapse: collapse;\n}\n\n.tabulator-print-table .tabulator-print-table-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #ccc;\n font-weight: bold;\n color: #363636;\n min-width: 100%;\n}\n\n.tabulator-print-table .tabulator-print-table-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #363636;\n border-bottom: 0;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td {\n padding-left: 30px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td {\n padding-left: 50px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td {\n padding-left: 70px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td {\n padding-left: 90px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td {\n padding-left: 110px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #363636;\n vertical-align: middle;\n}\n\n.tabulator-print-table .tabulator-print-table-group span {\n margin-left: 10px;\n color: #d00;\n}\n\n.tabulator-print-table .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #aaa;\n border-bottom: 2px solid #aaa;\n}\n\n.tabulator-print-table .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #363636;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-print-table .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #363636;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #363636;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #363636;\n}\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.css b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.css new file mode 100644 index 0000000..353f8d7 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.css @@ -0,0 +1,1120 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 16px; + text-align: left; + width: 100%; + max-width: 100%; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + background-color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid rgba(0, 0, 0, 0.12); + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 15px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: -10px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid rgba(0, 0, 0, 0.12); + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 10px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + width: 100%; + background: white !important; + border-top: 1px solid rgba(0, 0, 0, 0.12); + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: transparent; + white-space: nowrap; + overflow: visible; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: rgba(229, 229, 229, 0.5) !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid rgba(0, 0, 0, 0.12); + text-align: right; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid rgba(0, 0, 0, 0.12); + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid rgba(0, 0, 0, 0.12); + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0; + margin-top: 5px; + padding: 8px 12px; + border: 1px solid rgba(0, 0, 0, 0.12); + border-right: none; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page[data-page="first"] { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +.tabulator .tabulator-footer .tabulator-page[data-page="last"] { + border: 1px solid rgba(0, 0, 0, 0.12); + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #ee6e73; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator.striped .tabulator-row:nth-child(even) { + background-color: rgba(242, 242, 242, 0.5); +} + +.tabulator.striped .tabulator-row:nth-child(even).tabulator-selected { + background-color: #ee6e73; +} + +.tabulator.striped .tabulator-row:nth-child(even).tabulator-selectable:hover { + background-color: rgba(242, 242, 242, 0.5); + cursor: pointer; +} + +.tabulator.striped .tabulator-row:nth-child(even).tabulator-selected:hover { + background-color: #ee6e73; + cursor: pointer; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 46px; + background-color: transparent; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-row.tabulator-selectable:hover { + background-color: rgba(242, 242, 242, 0.5); + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #ee6e73; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #ee6e73; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid rgba(0, 0, 0, 0.12); + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid rgba(0, 0, 0, 0.12); + border-bottom: 1px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 16px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 15px; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #ee6e73; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid rgba(0, 0, 0, 0.12); + border-bottom: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #ccc; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: transparent; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: transparent; + border: 1px solid rgba(0, 0, 0, 0.12); + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 16px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: rgba(242, 242, 242, 0.5); +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: rgba(0, 0, 0, 0.12); + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.12); + font-size: 16px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #ee6e73; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #ee6e73; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #ee6e73; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + padding: 4px; + padding-top: 6px; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid rgba(0, 0, 0, 0.12); +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid rgba(0, 0, 0, 0.12); + border-bottom: 2px solid rgba(0, 0, 0, 0.12); +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #ccc; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #ccc; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #ccc; +} diff --git a/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css new file mode 100644 index 0000000..d04cf0d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:16px;text-align:left;width:100%;max-width:100%;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid rgba(0,0,0,.12);background-color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid rgba(0,0,0,.12);background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:15px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:-10px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid rgba(0,0,0,.12);overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:10px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid rgba(0,0,0,.12)}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid rgba(0,0,0,.12)}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12);overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:transparent;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:hsla(0,0%,90%,.5)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid rgba(0,0,0,.12)}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid rgba(0,0,0,.12)}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid rgba(0,0,0,.12);text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid rgba(0,0,0,.12);border-top:1px solid rgba(0,0,0,.12);overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid rgba(0,0,0,.12);border-radius:3px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0;margin-top:5px;padding:8px 12px;border:1px solid rgba(0,0,0,.12);border-right:none;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page[data-page=first]{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabulator .tabulator-footer .tabulator-page[data-page=last]{border:1px solid rgba(0,0,0,.12);border-top-right-radius:4px;border-bottom-right-radius:4px}.tabulator .tabulator-footer .tabulator-page.active{color:#ee6e73}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.striped .tabulator-row:nth-child(2n){background-color:hsla(0,0%,95%,.5)}.tabulator.striped .tabulator-row:nth-child(2n).tabulator-selected{background-color:#ee6e73}.tabulator.striped .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:hsla(0,0%,95%,.5);cursor:pointer}.tabulator.striped .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#ee6e73;cursor:pointer}.tabulator-row{position:relative;box-sizing:border-box;min-height:46px;background-color:transparent;border-bottom:1px solid rgba(0,0,0,.12)}.tabulator-row.tabulator-selectable:hover{background-color:hsla(0,0%,95%,.5);cursor:pointer}.tabulator-row.tabulator-selected{background-color:#ee6e73}.tabulator-row.tabulator-selected:hover{background-color:#ee6e73;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12);pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid rgba(0,0,0,.12)}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid rgba(0,0,0,.12)}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:16px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:15px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #ee6e73;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid rgba(0,0,0,.12);border-bottom:2px solid rgba(0,0,0,.12)}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:transparent;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid rgba(0,0,0,.12);border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:transparent;border:1px solid rgba(0,0,0,.12);box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:hsla(0,0%,95%,.5)}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:rgba(0,0,0,.12);vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid rgba(0,0,0,.12)}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid rgba(0,0,0,.12);font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#ee6e73}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #ee6e73}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#ee6e73}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid rgba(0,0,0,.12);padding:4px;padding-top:6px;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid rgba(0,0,0,.12)}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid rgba(0,0,0,.12)}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid rgba(0,0,0,.12);border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid rgba(0,0,0,.12);border-bottom:2px solid rgba(0,0,0,.12)}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc} +/*# sourceMappingURL=tabulator_materialize.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css.map b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css.map new file mode 100644 index 0000000..5e453c2 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/materialize/tabulator_materialize.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_materialize.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAEhB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,0CACE,oBAAsB,CACvB,AAED,kCACE,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BACE,kBAAmB,AACnB,sBAAuB,AACvB,WAAY,AACZ,wCAA6C,AAC7C,sBAAuB,AACvB,gBAAkB,AAClB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,YAAc,CACf,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,eAAiB,CAClB,AAED,6DACE,kBAAmB,AACnB,iCAAsC,AACtC,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,YAAc,CACf,AAED,iGACE,aAAe,CAChB,AAED,uGACE,eAAgB,AAChB,UAAY,CACb,AAED,+FACE,iBAAmB,CACpB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,8IACE,uBAAyB,CAC1B,AAED,yFACE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,WAAa,CACd,AAED,0GACE,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,qCAA0C,AAC1C,gBAAiB,AACjB,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,4HACE,UAAY,CACb,AAED,6IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,2HACE,UAAY,CACb,AAED,4IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,4HACE,UAAY,CACb,AAED,6IACE,mBAAoB,AACpB,0BAA2B,AAC3B,UAAY,CACb,AAED,+GACE,uBAAwB,AACpB,yBAA0B,AAC9B,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,4GACE,qBAAsB,AAClB,uBAAwB,AAC5B,OAAQ,AACR,QAAS,AACT,QAAS,AACT,WAAa,CACd,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,UAAY,CACb,AAED,qEACE,sCAA4C,CAC7C,AAED,sEACE,qCAA2C,CAC5C,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,qCAA0C,AAC1C,wCAA6C,AAC7C,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,gBAAiB,AACjB,cAAgB,CACjB,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,6BAA8B,AAC9B,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,sCAAgD,CACjD,AAED,sGACE,uCAA6C,CAC9C,AAED,yGACE,oCAA0C,CAC3C,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,qCAA0C,AAC1C,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,wCAA6C,AAC7C,qCAA0C,AAC1C,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,kDACE,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,kDACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,iCAAsC,AACtC,iBAAmB,CACpB,AAED,6CACE,qBAAsB,AACtB,SAAU,AACV,eAAgB,AAChB,iBAAkB,AAClB,iCAAsC,AACtC,kBAAmB,AACnB,6BAAqC,CACtC,AAED,8DACE,2BAA4B,AAC5B,6BAA+B,CAChC,AAED,6DACE,iCAAsC,AACtC,4BAA6B,AAC7B,8BAAgC,CACjC,AAED,oDACE,aAAe,CAChB,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,gDACE,kCAA2C,CAC5C,AAED,mEACE,wBAA0B,CAC3B,AAED,2EACE,mCAA2C,AAC3C,cAAgB,CACjB,AAED,yEACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,6BAA8B,AAC9B,uCAA6C,CAC9C,AAED,0CACE,mCAA2C,AAC3C,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,qCAA0C,AAC1C,wCAA6C,AAC7C,8BAAgC,AAChC,UAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,UAAY,CACb,AAED,uDACE,sCAA4C,CAC7C,AAED,wDACE,qCAA2C,CAC5C,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,qCAA0C,AAC1C,uCAA6C,CAC9C,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,aAAc,AACd,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,aAAc,AACd,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,sCAA2C,AAC3C,uCAA6C,CAC9C,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,kBAAmB,AACnB,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,wDACE,qBAAsB,AACtB,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,uCAA4C,AAC5C,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,kBAAoB,CACrB,AAED,uDACE,oBAAsB,CACvB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,gBACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,uBAAwB,AACxB,iCAAsC,AACtC,oCAAyC,AACzC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,qCACE,kBAAmB,AACnB,sBAAuB,AACvB,iBAAkB,AAClB,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,kEACE,UAAY,CACb,AAED,8EACE,eAAgB,AAChB,4BAAqC,CACtC,AAED,iEACE,kBAAoB,CACrB,AAED,uEACE,qBAAsB,AACtB,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,WAAY,AACZ,yBAA0B,AAC1B,mBAAoB,AACpB,6BAAkC,AAClC,mBAAoB,AAEhB,uBAAyB,CAC9B,AAED,0CACE,oCAA0C,CAC3C,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAiB,AACjB,iCAAsC,AACtC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,WAAY,AACZ,kBAAoB,CACrB,AAED,4EACE,oCAA4C,CAC7C,AAED,qEACE,yBAA2B,CAC5B,AAED,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,+DACE,YAAa,AACb,iBAAmB,CACpB,AAED,8DACE,wCAA6C,AAC7C,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB,AAED,yBACE,aAAe,CAChB,AAED,yBACE,mBAAoB,AACpB,aAAe,CAChB,AAED,0DACE,kBAAoB,CACrB,AAED,wGACE,eAAsB,AACtB,gBAAkB,CACnB,AAED,kGACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,kGACE,SAAU,AACV,UAAe,CAChB,AAED,wDACE,qBAAsB,AACtB,qCAA2C,CAC5C,AAED,oFACE,eAAsB,AACtB,gBAAiB,AACjB,4BAAmC,AACnC,+BAAgC,AAChC,oBAAqB,AACrB,sCAA4C,CAC7C,AAED,qFACE,eAAsB,AACtB,eAAiB,CAClB,AAED,sDACE,kBAAmB,AACnB,OAAQ,AACR,UAAY,CACb,AAED,2DACE,QAAS,AACT,SAAW,CACZ,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B,AAED,oDACE,sBAAuB,AACvB,6BAA8B,AAC9B,uCAA4C,AAC5C,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,0DACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,6FACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,4BAA+B,CAChC,AAED,4EACE,oBAAsB,CACvB,AAED,qEACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,yDACE,iBAAkB,AAClB,UAAY,CACb,AAED,mDACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,sCAA2C,AAC3C,uCAA6C,CAC9C,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,0DACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,0FACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,gGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,wFACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,8FACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB","file":"tabulator_materialize.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 16px;\n text-align: left;\n width: 100%;\n max-width: 100%;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator[tabulator-layout=\"fitDataTable\"] {\n display: inline-block;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header.tabulator-header-hidden {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 15px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button {\n padding: 0 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover {\n cursor: pointer;\n opacity: .6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder {\n position: relative;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor {\n width: calc(100% - 22px);\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 0;\n bottom: 0;\n right: -10px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n overflow: hidden;\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 10px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter {\n color: #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-bottom: none;\n border-top: 6px solid #666;\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter {\n -ms-flex-pack: center;\n justify-content: center;\n left: 0;\n right: 0;\n top: 4px;\n bottom: auto;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 600%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n min-height: 100%;\n min-width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: transparent;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: rgba(229, 229, 229, 0.5) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator {\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0;\n margin-top: 5px;\n padding: 8px 12px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-right: none;\n background: rgba(255, 255, 255, 0.2);\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"first\"] {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"last\"] {\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #ee6e73;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.striped .tabulator-row:nth-child(even) {\n background-color: rgba(242, 242, 242, 0.5);\n}\n\n.tabulator.striped .tabulator-row:nth-child(even).tabulator-selected {\n background-color: #ee6e73;\n}\n\n.tabulator.striped .tabulator-row:nth-child(even).tabulator-selectable:hover {\n background-color: rgba(242, 242, 242, 0.5);\n cursor: pointer;\n}\n\n.tabulator.striped .tabulator-row:nth-child(even).tabulator-selected:hover {\n background-color: #ee6e73;\n cursor: pointer;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 46px;\n background-color: transparent;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: rgba(242, 242, 242, 0.5);\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #ee6e73;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #ee6e73;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 16px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 15px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #ee6e73;\n outline: none;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid rgba(0, 0, 0, 0.12);\n border-bottom: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: transparent;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid rgba(0, 0, 0, 0.12);\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-menu {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n background: transparent;\n border: 1px solid rgba(0, 0, 0, 0.12);\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);\n font-size: 16px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-menu .tabulator-menu-item {\n position: relative;\n box-sizing: border-box;\n padding: 5px 10px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled {\n opacity: .5;\n}\n\n.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {\n cursor: pointer;\n background: rgba(242, 242, 242, 0.5);\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu {\n padding-right: 25px;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {\n display: inline-block;\n position: absolute;\n top: calc(5px + .4em);\n right: 10px;\n height: 7px;\n width: 7px;\n content: '';\n border-width: 1px 1px 0 0;\n border-style: solid;\n border-color: rgba(0, 0, 0, 0.12);\n vertical-align: top;\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.tabulator-menu .tabulator-menu-separator {\n border-top: 1px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.12);\n font-size: 16px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #fff;\n background: #ee6e73;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.focused {\n outline: 1px solid #ee6e73;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #fff;\n background: #ee6e73;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-notice {\n padding: 4px;\n text-align: center;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n\n.tabulator.tabulator-ltr {\n direction: ltr;\n}\n\n.tabulator.tabulator-rtl {\n text-align: initial;\n direction: rtl;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col {\n text-align: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n margin-right: initial;\n margin-left: -1px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-left: 25px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n left: 8px;\n right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell {\n border-right: initial;\n border-left: 1px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n margin-right: initial;\n margin-left: 5px;\n border-bottom-left-radius: initial;\n border-bottom-right-radius: 1px;\n border-left: initial;\n border-right: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control {\n margin-right: initial;\n margin-left: 5px;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle {\n position: absolute;\n left: 0;\n right: auto;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev {\n right: 0;\n left: auto;\n}\n\n.tabulator-print-fullscreen {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n}\n\nbody.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {\n display: none !important;\n}\n\n.tabulator-print-table {\n border-collapse: collapse;\n}\n\n.tabulator-print-table .tabulator-print-table-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid rgba(0, 0, 0, 0.12);\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-print-table .tabulator-print-table-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td {\n padding-left: 30px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td {\n padding-left: 50px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td {\n padding-left: 70px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td {\n padding-left: 90px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td {\n padding-left: 110px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle {\n display: inline-block;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-print-table .tabulator-print-table-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-print-table .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid rgba(0, 0, 0, 0.12);\n border-bottom: 2px solid rgba(0, 0, 0, 0.12);\n}\n\n.tabulator-print-table .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-print-table .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.css b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.css new file mode 100644 index 0000000..09a17c7 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.css @@ -0,0 +1,1617 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +/******************************* + Site Settings +*******************************/ +/*------------------- + Fonts +--------------------*/ +/*------------------- + Base Sizes +--------------------*/ +/* This is the single variable that controls them all */ +/* The size of page text */ +/*------------------- + Exact Pixel Values +--------------------*/ +/* + These are used to specify exact pixel values in em + for things like borders that remain constantly + sized as emSize adjusts + + Since there are many more sizes than names for sizes, + these are named by their original pixel values. + +*/ +/*------------------- + Border Radius +--------------------*/ +/* See Power-user section below + for explanation of $px variables +*/ +/*------------------- + Site Colors +--------------------*/ +/*--- Colors ---*/ +/*--- Light Colors ---*/ +/*--- Neutrals ---*/ +/*--- Colored Backgrounds ---*/ +/*--- Colored Text ---*/ +/*--- Colored Headers ---*/ +/*--- Colored Border ---*/ +/*------------------- + Alpha Colors +--------------------*/ +/*------------------- + Brand Colors +--------------------*/ +/*-------------- + Page Heading +---------------*/ +/*------------------- + Page +--------------------*/ +/*-------------- + Form Input +---------------*/ +/* This adjusts the default form input across all elements */ +/* Input Text Color */ +/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */ +/*------------------- + Focused Input +--------------------*/ +/* Used on inputs, textarea etc */ +/* Used on dropdowns, other larger blocks */ +/*------------------- + Sizes +--------------------*/ +/* + Sizes are all expressed in terms of 14px/em (default em) + This ensures these "ratios" remain constant despite changes in EM +*/ +/*------------------- + Paragraph +--------------------*/ +/*------------------- + Links +--------------------*/ +/*------------------- + Highlighted Text +--------------------*/ +/*------------------- + Em Sizes +--------------------*/ +/* + This rounds $size values to the closest pixel then expresses that value in (r)em. + This ensures all size values round to exact pixels +*/ +/* em */ +/* rem */ +/*------------------- + Loader +--------------------*/ +/*------------------- + Grid +--------------------*/ +/*------------------- + Transitions +--------------------*/ +/*------------------- + Breakpoints +--------------------*/ +/* Columns */ +/******************************* + Power-User +*******************************/ +/*------------------- + Emotive Colors +--------------------*/ +/* Positive */ +/* Negative */ +/* Info */ +/* Warning */ +/*------------------- + Paths +--------------------*/ +/* For source only. Modified in gulp for dist */ +/*------------------- + Icons +--------------------*/ +/* Maximum Glyph Width of Icon */ +/*------------------- + Neutral Text +--------------------*/ +/*------------------- + Brand Colors +--------------------*/ +/*------------------- + Borders +--------------------*/ +/*------------------- + Accents +--------------------*/ +/* Differentiating Neutrals */ +/* Differentiating Layers */ +/*------------------- + Derived Values +--------------------*/ +/* Loaders Position Offset */ +/* Rendered Scrollbar Width */ +/* Maximum Single Character Glyph Width, aka Capital "W" */ +/* Used to match floats with text */ +/* Header Spacing */ +/* Minimum Mobile Width */ +/* Positive / Negative Dupes */ +/* Responsive */ +/******************************* + States +*******************************/ +/*------------------- + Disabled +--------------------*/ +/*------------------- + Hover +--------------------*/ +/*--- Shadows ---*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Focus +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Down (:active) +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Active +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/******************************* + Table +*******************************/ +/*------------------- + Element +--------------------*/ +/*-------------- + Parts +---------------*/ +/* Table Row */ +/* Table Cell */ +/* Table Header */ +/* Table Footer */ +/* Responsive Size */ +/*------------------- + Types +--------------------*/ +/* Definition */ +/*-------------- + Couplings +---------------*/ +/*-------------- + States +---------------*/ +/* Positive */ +/* Negative */ +/* Error */ +/* Warning */ +/* Active */ +/*-------------- + Types +---------------*/ +/* Attached */ +/* Striped */ +/* Selectable */ +/* Sortable */ +/* Colors */ +/* Inverted */ +/* Basic */ +/* Padded */ +/* Compact */ +/* Sizes */ +.tabulator { + position: relative; + background-color: #FFFFFF; + overflow: hidden; + font-size: 14px; + text-align: left; + width: 100%; + margin: 1em 0em; + border: 1px solid rgba(34, 36, 38, 0.15); + box-shadow: none; + border-radius: 0.28571rem; + color: rgba(0, 0, 0, 0.87); + -ms-transform: translatez(0); + transform: translatez(0); + /* Red */ + /* Orange */ + /* Yellow */ + /* Olive */ + /* Green */ + /* Teal */ + /* Blue */ + /* Violet */ + /* Purple */ + /* Pink */ + /* Brown */ + /* Grey */ + /* Black */ +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid rgba(34, 36, 38, 0.1); + background-color: #F9FAFB; + box-shadow: none; + color: rgba(0, 0, 0, 0.87); + font-style: none; + font-weight: bold; + text-transform: none; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #F9FAFB; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #dae1e7; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 0.92857em 0.78571em; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #dae1e7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: white !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 0.78571em 0.78571em; + border-top: 1px solid rgba(34, 36, 38, 0.15); + box-shadow: none; + background: #F9FAFB; + text-align: right; + color: rgba(0, 0, 0, 0.87); + font-style: normal; + font-weight: normal; + text-transform: none; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -0.78571em -0.78571em 0.78571em -0.78571em; + text-align: left; + background: white !important; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + font-weight: bold; + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -0.78571em; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive { + box-shadow: 0px 0px 0px #A3C293 inset; + background: #FCFFF5 !important; + color: #21BA45 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover { + background: #f7ffe6 !important; + color: #13ae38 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative { + box-shadow: 0px 0px 0px #E0B4B4 inset; + background: #FFF6F6 !important; + color: #DB2828 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover { + background: #ffe7e7 !important; + color: #d41616 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error { + box-shadow: 0px 0px 0px #E0B4B4 inset; + background: #FFF6F6 !important; + color: #DB2828 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover { + background: #ffe7e7 !important; + color: #d12323 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning { + box-shadow: 0px 0px 0px #C9BA9B inset; + background: #FFFAF3 !important; + color: #F2C037 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover { + background: #fff4e4 !important; + color: #f1bb29 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; + background: #E0E0E0 !important; + color: rgba(0, 0, 0, 0.87) !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover { + background: #f7ffe6 !important; + color: #13ae38 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { + pointer-events: none; + color: rgba(0, 0, 0, 0.2); +} + +.tabulator.inverted { + background: #333333; + color: rgba(255, 255, 255, 0.9); + border: none; +} + +.tabulator.inverted .tabulator-header { + background-color: rgba(0, 0, 0, 0.15); + border-color: rgba(255, 255, 255, 0.1) !important; + color: rgba(255, 255, 255, 0.9); +} + +.tabulator.inverted .tabulator-header .tabulator-col { + border-color: rgba(255, 255, 255, 0.1) !important; +} + +.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row { + color: rgba(255, 255, 255, 0.9); + border: none; +} + +.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-color: rgba(255, 255, 255, 0.1) !important; +} + +.tabulator.inverted .tabulator-footer { + background: #FFFFFF; +} + +.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) { + background-color: rgba(0, 0, 0, 0.05) !important; +} + +.tabulator.celled { + border: 1px solid rgba(34, 36, 38, 0.15); +} + +.tabulator.celled .tabulator-header .tabulator-col { + border-right: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: none; +} + +.tabulator.red { + border-top: 0.2em solid #DB2828; +} + +.tabulator.inverted.red { + background-color: #DB2828 !important; + color: #FFFFFF !important; +} + +.tabulator.orange { + border-top: 0.2em solid #F2711C; +} + +.tabulator.inverted.orange { + background-color: #F2711C !important; + color: #FFFFFF !important; +} + +.tabulator.yellow { + border-top: 0.2em solid #FBBD08; +} + +.tabulator.inverted.yellow { + background-color: #FBBD08 !important; + color: #FFFFFF !important; +} + +.tabulator.olive { + border-top: 0.2em solid #B5CC18; +} + +.tabulator.inverted.olive { + background-color: #B5CC18 !important; + color: #FFFFFF !important; +} + +.tabulator.green { + border-top: 0.2em solid #21BA45; +} + +.tabulator.inverted.green { + background-color: #21BA45 !important; + color: #FFFFFF !important; +} + +.tabulator.teal { + border-top: 0.2em solid #00B5AD; +} + +.tabulator.inverted.teal { + background-color: #00B5AD !important; + color: #FFFFFF !important; +} + +.tabulator.blue { + border-top: 0.2em solid #2185D0; +} + +.tabulator.inverted.blue { + background-color: #2185D0 !important; + color: #FFFFFF !important; +} + +.tabulator.violet { + border-top: 0.2em solid #6435C9; +} + +.tabulator.inverted.violet { + background-color: #6435C9 !important; + color: #FFFFFF !important; +} + +.tabulator.purple { + border-top: 0.2em solid #A333C8; +} + +.tabulator.inverted.purple { + background-color: #A333C8 !important; + color: #FFFFFF !important; +} + +.tabulator.pink { + border-top: 0.2em solid #E03997; +} + +.tabulator.inverted.pink { + background-color: #E03997 !important; + color: #FFFFFF !important; +} + +.tabulator.brown { + border-top: 0.2em solid #A5673F; +} + +.tabulator.inverted.brown { + background-color: #A5673F !important; + color: #FFFFFF !important; +} + +.tabulator.grey { + border-top: 0.2em solid #767676; +} + +.tabulator.inverted.grey { + background-color: #767676 !important; + color: #FFFFFF !important; +} + +.tabulator.black { + border-top: 0.2em solid #1B1C1D; +} + +.tabulator.inverted.black { + background-color: #1B1C1D !important; + color: #FFFFFF !important; +} + +.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content { + padding: 1em 1em; +} + +.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 20px; +} + +.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 1em 1em; +} + +.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content { + padding: 1.5em 1.5em; +} + +.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 26px; +} + +.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 1.5em 1.5em; +} + +.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.5em 0.7em; +} + +.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 12px; +} + +.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.5em 0.7em; +} + +.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.4em 0.6em; +} + +.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 10px; +} + +.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.4em 0.6em; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + border-bottom: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator-row.tabulator-selectable:hover { + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; + background: #E0E0E0 !important; + color: rgba(0, 0, 0, 0.87) !important; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 0.78571em 0.78571em; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #DB2828; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #DB2828; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #FFFFFF; + border: 1px solid #ddd; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #F9FAFB; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #ddd; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #ddd; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #FFFFFF; + border: 1px solid #ddd; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #333; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #FFFFFF; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #FFFFFF; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #ddd; + padding: 4px; + padding-top: 6px; + color: #333; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #ddd; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css new file mode 100644 index 0000000..1dd6606 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;margin:1em 0;border:1px solid rgba(34,36,38,.15);box-shadow:none;border-radius:.28571rem;color:rgba(0,0,0,.87);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid rgba(34,36,38,.1);background-color:#f9fafb;box-shadow:none;color:rgba(0,0,0,.87);font-style:none;font-weight:700;text-transform:none;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background-color:#f9fafb;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#dae1e7;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.92857em .78571em}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#dae1e7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:.78571em;border-top:1px solid rgba(34,36,38,.15);box-shadow:none;background:#f9fafb;text-align:right;color:rgba(0,0,0,.87);font-style:normal;font-weight:400;text-transform:none;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-.78571em -.78571em .78571em;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{font-weight:700;background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-.78571em;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive{box-shadow:inset 0 0 0 #a3c293;background:#fcfff5!important;color:#21ba45!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover{background:#ffe7e7!important;color:#d41616!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover{background:#ffe7e7!important;color:#d12323!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{box-shadow:inset 0 0 0 #c9ba9b;background:#fffaf3!important;color:#f2c037!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover{background:#fff4e4!important;color:#f1bb29!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{pointer-events:none;color:rgba(0,0,0,.2)}.tabulator.inverted{background:#333;color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-header{background-color:rgba(0,0,0,.15);color:hsla(0,0%,100%,.9)}.tabulator.inverted .tabulator-header,.tabulator.inverted .tabulator-header .tabulator-col{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row{color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-footer{background:#fff}.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)!important}.tabulator.celled{border:1px solid rgba(34,36,38,.15)}.tabulator.celled .tabulator-header .tabulator-col,.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid rgba(34,36,38,.1)}.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:none}.tabulator.red{border-top:.2em solid #db2828}.tabulator.inverted.red{background-color:#db2828!important;color:#fff!important}.tabulator.orange{border-top:.2em solid #f2711c}.tabulator.inverted.orange{background-color:#f2711c!important;color:#fff!important}.tabulator.yellow{border-top:.2em solid #fbbd08}.tabulator.inverted.yellow{background-color:#fbbd08!important;color:#fff!important}.tabulator.olive{border-top:.2em solid #b5cc18}.tabulator.inverted.olive{background-color:#b5cc18!important;color:#fff!important}.tabulator.green{border-top:.2em solid #21ba45}.tabulator.inverted.green{background-color:#21ba45!important;color:#fff!important}.tabulator.teal{border-top:.2em solid #00b5ad}.tabulator.inverted.teal{background-color:#00b5ad!important;color:#fff!important}.tabulator.blue{border-top:.2em solid #2185d0}.tabulator.inverted.blue{background-color:#2185d0!important;color:#fff!important}.tabulator.violet{border-top:.2em solid #6435c9}.tabulator.inverted.violet{background-color:#6435c9!important;color:#fff!important}.tabulator.purple{border-top:.2em solid #a333c8}.tabulator.inverted.purple{background-color:#a333c8!important;color:#fff!important}.tabulator.pink{border-top:.2em solid #e03997}.tabulator.inverted.pink{background-color:#e03997!important;color:#fff!important}.tabulator.brown{border-top:.2em solid #a5673f}.tabulator.inverted.brown{background-color:#a5673f!important;color:#fff!important}.tabulator.grey{border-top:.2em solid #767676}.tabulator.inverted.grey{background-color:#767676!important;color:#fff!important}.tabulator.black{border-top:.2em solid #1b1c1d}.tabulator.inverted.black{background-color:#1b1c1d!important;color:#fff!important}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content{padding:1em}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:20px}.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content{padding:1.5em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:26px}.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1.5em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content{padding:.5em .7em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:12px}.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.5em .7em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content{padding:.4em .6em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:10px}.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.4em .6em}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid rgba(34,36,38,.1)}.tabulator-row.tabulator-selectable:hover{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.78571em;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #db2828}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#db2828}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #ddd;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#f9fafb}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#ddd;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #ddd}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #ddd;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_semantic-ui.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map new file mode 100644 index 0000000..c10b5bb --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_semantic-ui.min.css"],"names":[],"mappings":"AAiOA,WACE,kBAAmB,AACnB,sBAA0B,AAC1B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,aAAgB,AAChB,oCAAyC,AACzC,gBAAiB,AACjB,wBAA0B,AAC1B,sBAA2B,AAE3B,uBAAyB,CAc1B,AAED,iFACE,cAAgB,CACjB,AAED,0CACE,oBAAsB,CACvB,AAED,kCACE,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BACE,kBAAmB,AACnB,sBAAuB,AACvB,WAAY,AACZ,0CAA+C,AAC/C,yBAA0B,AAC1B,gBAAiB,AACjB,sBAA2B,AAC3B,gBAAiB,AACjB,gBAAkB,AAClB,oBAAqB,AACrB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,YAAc,CACf,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,yBAA0B,AAC1B,gBAAiB,AACjB,sBAAuB,AACvB,eAAiB,CAClB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,yBAA6B,CAC9B,AAED,iGACE,aAAe,CAChB,AAED,uGACE,eAAgB,AAChB,UAAY,CACb,AAED,+FACE,iBAAmB,CACpB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,8IACE,uBAAyB,CAC1B,AAED,yFACE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,0GACE,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,gBAAiB,AACjB,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,4HACE,UAAY,CACb,AAED,6IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,2HACE,UAAY,CACb,AAED,4IACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,4HACE,UAAY,CACb,AAED,6IACE,mBAAoB,AACpB,0BAA2B,AAC3B,UAAY,CACb,AAED,+GACE,uBAAwB,AACpB,yBAA0B,AAC9B,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,4GACE,qBAAsB,AAClB,uBAAwB,AAC5B,OAAQ,AACR,QAAS,AACT,QAAS,AACT,WAAa,CACd,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,UAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,eAAgB,AAChB,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,gBAAiB,AACjB,cAAgB,CACjB,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,mBAAoB,AACpB,iBAAkB,AAClB,UAAY,CACb,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAA6B,AAC7B,wCAA6C,AAC7C,gBAAiB,AACjB,mBAAoB,AACpB,iBAAkB,AAClB,sBAA2B,AAC3B,kBAAmB,AACnB,gBAAoB,AACpB,oBAAqB,AACrB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,oCAAmD,AACnD,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,gBAAkB,AAClB,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,wBAA0B,AAC1B,kBAAoB,CACrB,AAED,kDACE,WAAY,AACZ,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,kDACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,sBAAuB,AACvB,iBAAmB,CACpB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,gBAAiB,AACjB,sBAAuB,AACvB,kBAAmB,AACnB,6BAAqC,CACtC,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,4KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,oKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kKACE,uCAAkD,AAClD,6BAA+B,AAC/B,+BAAsC,CACvC,AAED,8KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,mPACE,oBAAqB,AACrB,oBAA0B,CAC3B,AAED,oBACE,gBAAoB,AACpB,yBAAgC,AAChC,WAAa,CACd,AAED,sCACE,iCAAsC,AAEtC,wBAAgC,CACjC,AAED,2FAJE,yCAAkD,CAMnD,AAED,2EACE,yBAAgC,AAChC,WAAa,CACd,AAED,2FACE,yCAAkD,CACnD,AAED,sCACE,eAAoB,CACrB,AAED,wFACE,0CAAiD,CAClD,AAED,kBACE,mCAAyC,CAC1C,AAMD,4IACE,wCAA8C,CAC/C,AAED,wGACE,iBAAmB,CACpB,AAED,eACE,6BAAgC,CACjC,AAED,wBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,0EACE,WAAiB,CAClB,AAED,2FACE,QAAU,CACX,AAED,yFACE,WAAiB,CAClB,AAED,+EACE,aAAqB,CACtB,AAED,gGACE,QAAU,CACX,AAED,8FACE,aAAqB,CACtB,AAED,2EACE,iBAAqB,CACtB,AAED,4FACE,QAAU,CACX,AAED,0FACE,iBAAqB,CACtB,AAED,gFACE,iBAAqB,CACtB,AAED,iGACE,QAAU,CACX,AAED,+FACE,iBAAqB,CACtB,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,yCAA+C,CAChD,AAED,0CACE,uCAAkD,AAClD,6BAA+B,AAC/B,gCAAsC,AACtC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,UAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,UAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,iBAA6B,AAC7B,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,aAAc,AACd,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,wBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,aAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,wDACE,qBAAsB,AACtB,YAAa,AACb,WAAY,AACZ,kBAAoB,CACrB,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,iBAAmB,CACpB,AAED,uDACE,kBAAoB,CACrB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,gBACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,gBAAoB,AACpB,sBAAuB,AACvB,oCAAyC,AACzC,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,qCACE,kBAAmB,AACnB,sBAAuB,AACvB,iBAAkB,AAClB,yBAA0B,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,kEACE,UAAY,CACb,AAED,8EACE,eAAgB,AAChB,kBAAoB,CACrB,AAED,iEACE,kBAAoB,CACrB,AAED,uEACE,qBAAsB,AACtB,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,WAAY,AACZ,UAAW,AACX,WAAY,AACZ,yBAA0B,AAC1B,mBAAoB,AACpB,kBAAmB,AACnB,mBAAoB,AAEhB,uBAAyB,CAC9B,AAED,0CACE,yBAA2B,CAC5B,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAoB,AACpB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,aAAe,CAChB,AAED,6DACE,YAAa,AACb,UAAY,CACb,AAED,oEACE,WAAe,AACf,kBAAoB,CACrB,AAED,4EACE,oCAA4C,CAC7C,AAED,qEACE,yBAA2B,CAC5B,AAED,mEACE,eAAgB,AAChB,WAAe,AACf,kBAAoB,CACrB,AAED,+DACE,YAAa,AACb,iBAAmB,CACpB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,WAAY,AACZ,eAAkB,CACnB,AAED,yBACE,aAAe,CAChB,AAED,yBACE,mBAAoB,AACpB,aAAe,CAChB,AAED,0DACE,mBAAoB,AACpB,2BAA4B,AAC5B,oBAAsB,CACvB,AAED,wGACE,eAAsB,AACtB,gBAAkB,CACnB,AAED,kGACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,kGACE,SAAU,AACV,UAAe,CAChB,AAED,wDACE,qBAAsB,AACtB,0BAA4B,CAC7B,AAED,oFACE,eAAsB,AACtB,gBAAiB,AACjB,4BAAmC,AACnC,+BAAgC,AAChC,oBAAqB,AACrB,2BAA6B,CAC9B,AAED,qFACE,eAAsB,AACtB,eAAiB,CAClB,AAED,sDACE,kBAAmB,AACnB,OAAQ,AACR,UAAY,CACb,AAED,2DACE,QAAS,AACT,SAAW,CACZ,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B,AAED,oDACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,0DACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,6FACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,2BAA8B,CAC/B,AAED,+EACE,4BAA+B,CAChC,AAED,qEACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,yDACE,iBAAkB,AAClB,UAAY,CACb,AAED,mDACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,0DACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,0FACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,gGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,wFACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,8FACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB","file":"tabulator_semantic-ui.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n/*******************************\r\n Site Settings\r\n*******************************/\n/*-------------------\r\n Fonts\r\n--------------------*/\n/*-------------------\r\n Base Sizes\r\n--------------------*/\n/* This is the single variable that controls them all */\n/* The size of page text */\n/*-------------------\r\n Exact Pixel Values\r\n--------------------*/\n/*\r\n These are used to specify exact pixel values in em\r\n for things like borders that remain constantly\r\n sized as emSize adjusts\r\n\r\n Since there are many more sizes than names for sizes,\r\n these are named by their original pixel values.\r\n\r\n*/\n/*-------------------\r\n Border Radius\r\n--------------------*/\n/* See Power-user section below\r\n for explanation of $px variables\r\n*/\n/*-------------------\r\n Site Colors\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Light Colors ---*/\n/*--- Neutrals ---*/\n/*--- Colored Backgrounds ---*/\n/*--- Colored Text ---*/\n/*--- Colored Headers ---*/\n/*--- Colored Border ---*/\n/*-------------------\r\n Alpha Colors\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*--------------\r\n Page Heading\r\n---------------*/\n/*-------------------\r\n Page\r\n--------------------*/\n/*--------------\r\n Form Input\r\n---------------*/\n/* This adjusts the default form input across all elements */\n/* Input Text Color */\n/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */\n/*-------------------\r\n Focused Input\r\n--------------------*/\n/* Used on inputs, textarea etc */\n/* Used on dropdowns, other larger blocks */\n/*-------------------\r\n Sizes\r\n--------------------*/\n/*\r\n Sizes are all expressed in terms of 14px/em (default em)\r\n This ensures these \"ratios\" remain constant despite changes in EM\r\n*/\n/*-------------------\r\n Paragraph\r\n--------------------*/\n/*-------------------\r\n Links\r\n--------------------*/\n/*-------------------\r\n Highlighted Text\r\n--------------------*/\n/*-------------------\r\n Em Sizes\r\n--------------------*/\n/*\r\n This rounds $size values to the closest pixel then expresses that value in (r)em.\r\n This ensures all size values round to exact pixels\r\n*/\n/* em */\n/* rem */\n/*-------------------\r\n Loader\r\n--------------------*/\n/*-------------------\r\n Grid\r\n--------------------*/\n/*-------------------\r\n Transitions\r\n--------------------*/\n/*-------------------\r\n Breakpoints\r\n--------------------*/\n/* Columns */\n/*******************************\r\n Power-User\r\n*******************************/\n/*-------------------\r\n Emotive Colors\r\n--------------------*/\n/* Positive */\n/* Negative */\n/* Info */\n/* Warning */\n/*-------------------\r\n Paths\r\n--------------------*/\n/* For source only. Modified in gulp for dist */\n/*-------------------\r\n Icons\r\n--------------------*/\n/* Maximum Glyph Width of Icon */\n/*-------------------\r\n Neutral Text\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*-------------------\r\n Borders\r\n--------------------*/\n/*-------------------\r\n Accents\r\n--------------------*/\n/* Differentiating Neutrals */\n/* Differentiating Layers */\n/*-------------------\r\n Derived Values\r\n--------------------*/\n/* Loaders Position Offset */\n/* Rendered Scrollbar Width */\n/* Maximum Single Character Glyph Width, aka Capital \"W\" */\n/* Used to match floats with text */\n/* Header Spacing */\n/* Minimum Mobile Width */\n/* Positive / Negative Dupes */\n/* Responsive */\n/*******************************\r\n States\r\n*******************************/\n/*-------------------\r\n Disabled\r\n--------------------*/\n/*-------------------\r\n Hover\r\n--------------------*/\n/*--- Shadows ---*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Focus\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Down (:active)\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Active\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*******************************\r\n Table\r\n*******************************/\n/*-------------------\r\n Element\r\n--------------------*/\n/*--------------\r\n Parts\r\n---------------*/\n/* Table Row */\n/* Table Cell */\n/* Table Header */\n/* Table Footer */\n/* Responsive Size */\n/*-------------------\r\n Types\r\n--------------------*/\n/* Definition */\n/*--------------\r\n Couplings\r\n---------------*/\n/*--------------\r\n States\r\n---------------*/\n/* Positive */\n/* Negative */\n/* Error */\n/* Warning */\n/* Active */\n/*--------------\r\n Types\r\n---------------*/\n/* Attached */\n/* Striped */\n/* Selectable */\n/* Sortable */\n/* Colors */\n/* Inverted */\n/* Basic */\n/* Padded */\n/* Compact */\n/* Sizes */\n.tabulator {\n position: relative;\n background-color: #FFFFFF;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n margin: 1em 0em;\n border: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n border-radius: 0.28571rem;\n color: rgba(0, 0, 0, 0.87);\n -ms-transform: translatez(0);\n transform: translatez(0);\n /* Red */\n /* Orange */\n /* Yellow */\n /* Olive */\n /* Green */\n /* Teal */\n /* Blue */\n /* Violet */\n /* Purple */\n /* Pink */\n /* Brown */\n /* Grey */\n /* Black */\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator[tabulator-layout=\"fitDataTable\"] {\n display: inline-block;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n background-color: #F9FAFB;\n box-shadow: none;\n color: rgba(0, 0, 0, 0.87);\n font-style: none;\n font-weight: bold;\n text-transform: none;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header.tabulator-header-hidden {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #F9FAFB;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #999;\n background: #dae1e7;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.92857em 0.78571em;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button {\n padding: 0 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover {\n cursor: pointer;\n opacity: .6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder {\n position: relative;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor {\n width: calc(100% - 22px);\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 4px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #dae1e7;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter {\n color: #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter {\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow {\n border-bottom: none;\n border-top: 6px solid #666;\n color: #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter {\n -ms-flex-pack: center;\n justify-content: center;\n left: 0;\n right: 0;\n top: 4px;\n bottom: auto;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 600%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 600%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n min-height: 100%;\n min-width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n white-space: nowrap;\n overflow: visible;\n color: #333;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #f2f2f2 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 0.78571em 0.78571em;\n border-top: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n background: #F9FAFB;\n text-align: right;\n color: rgba(0, 0, 0, 0.87);\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -0.78571em -0.78571em 0.78571em -0.78571em;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n font-weight: bold;\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -0.78571em;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-paginator {\n color: #555;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page-size {\n display: inline-block;\n margin: 0 5px;\n padding: 2px 5px;\n border: 1px solid #aaa;\n border-radius: 3px;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n padding: 2px 5px;\n border: 1px solid #aaa;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.2);\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive {\n box-shadow: 0px 0px 0px #A3C293 inset;\n background: #FCFFF5 !important;\n color: #21BA45 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover {\n background: #ffe7e7 !important;\n color: #d41616 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover {\n background: #ffe7e7 !important;\n color: #d12323 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning {\n box-shadow: 0px 0px 0px #C9BA9B inset;\n background: #FFFAF3 !important;\n color: #F2C037 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover {\n background: #fff4e4 !important;\n color: #f1bb29 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n pointer-events: none;\n color: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator.inverted {\n background: #333333;\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-header {\n background-color: rgba(0, 0, 0, 0.15);\n border-color: rgba(255, 255, 255, 0.1) !important;\n color: rgba(255, 255, 255, 0.9);\n}\n\n.tabulator.inverted .tabulator-header .tabulator-col {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row {\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-footer {\n background: #FFFFFF;\n}\n\n.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator.celled {\n border: 1px solid rgba(34, 36, 38, 0.15);\n}\n\n.tabulator.celled .tabulator-header .tabulator-col {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator[class*=\"single line\"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: none;\n}\n\n.tabulator.red {\n border-top: 0.2em solid #DB2828;\n}\n\n.tabulator.inverted.red {\n background-color: #DB2828 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.orange {\n border-top: 0.2em solid #F2711C;\n}\n\n.tabulator.inverted.orange {\n background-color: #F2711C !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.yellow {\n border-top: 0.2em solid #FBBD08;\n}\n\n.tabulator.inverted.yellow {\n background-color: #FBBD08 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.olive {\n border-top: 0.2em solid #B5CC18;\n}\n\n.tabulator.inverted.olive {\n background-color: #B5CC18 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.green {\n border-top: 0.2em solid #21BA45;\n}\n\n.tabulator.inverted.green {\n background-color: #21BA45 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.teal {\n border-top: 0.2em solid #00B5AD;\n}\n\n.tabulator.inverted.teal {\n background-color: #00B5AD !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.blue {\n border-top: 0.2em solid #2185D0;\n}\n\n.tabulator.inverted.blue {\n background-color: #2185D0 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.violet {\n border-top: 0.2em solid #6435C9;\n}\n\n.tabulator.inverted.violet {\n background-color: #6435C9 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.purple {\n border-top: 0.2em solid #A333C8;\n}\n\n.tabulator.inverted.purple {\n background-color: #A333C8 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.pink {\n border-top: 0.2em solid #E03997;\n}\n\n.tabulator.inverted.pink {\n background-color: #E03997 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.brown {\n border-top: 0.2em solid #A5673F;\n}\n\n.tabulator.inverted.brown {\n background-color: #A5673F !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.grey {\n border-top: 0.2em solid #767676;\n}\n\n.tabulator.inverted.grey {\n background-color: #767676 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.black {\n border-top: 0.2em solid #1B1C1D;\n}\n\n.tabulator.inverted.black {\n background-color: #1B1C1D !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1em 1em;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 20px;\n}\n\n.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1em 1em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 26px;\n}\n\n.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 12px;\n}\n\n.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.4em 0.6em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 10px;\n}\n\n.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.4em 0.6em;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator-row.tabulator-selectable:hover {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.78571em 0.78571em;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n outline: none;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #DB2828;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #DB2828;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-traffic-light {\n display: inline-block;\n height: 14px;\n width: 14px;\n border-radius: 14px;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 {\n padding-left: 30px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 {\n padding-left: 50px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 {\n padding-left: 70px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 {\n padding-left: 90px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 {\n padding-left: 110px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-menu {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n background: #FFFFFF;\n border: 1px solid #ddd;\n box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-menu .tabulator-menu-item {\n position: relative;\n box-sizing: border-box;\n padding: 5px 10px;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled {\n opacity: .5;\n}\n\n.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {\n cursor: pointer;\n background: #F9FAFB;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu {\n padding-right: 25px;\n}\n\n.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {\n display: inline-block;\n position: absolute;\n top: calc(5px + .4em);\n right: 10px;\n height: 7px;\n width: 7px;\n content: '';\n border-width: 1px 1px 0 0;\n border-style: solid;\n border-color: #ddd;\n vertical-align: top;\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.tabulator-menu .tabulator-menu-separator {\n border-top: 1px solid #ddd;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #FFFFFF;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n color: #333;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.focused {\n outline: 1px solid #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-notice {\n padding: 4px;\n text-align: center;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n color: #333;\n font-weight: bold;\n}\n\n.tabulator.tabulator-ltr {\n direction: ltr;\n}\n\n.tabulator.tabulator-rtl {\n text-align: initial;\n direction: rtl;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col {\n text-align: initial;\n border-left: 1px solid #ddd;\n border-right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n margin-right: initial;\n margin-left: -1px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-left: 25px;\n}\n\n.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n left: 8px;\n right: initial;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell {\n border-right: initial;\n border-left: 1px solid #ddd;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n margin-right: initial;\n margin-left: 5px;\n border-bottom-left-radius: initial;\n border-bottom-right-radius: 1px;\n border-left: initial;\n border-right: 2px solid #ddd;\n}\n\n.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control {\n margin-right: initial;\n margin-left: 5px;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle {\n position: absolute;\n left: 0;\n right: auto;\n}\n\n.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev {\n right: 0;\n left: auto;\n}\n\n.tabulator-print-fullscreen {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 10000;\n}\n\nbody.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {\n display: none !important;\n}\n\n.tabulator-print-table {\n border-collapse: collapse;\n}\n\n.tabulator-print-table .tabulator-print-table-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-print-table .tabulator-print-table-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td {\n padding-left: 30px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td {\n padding-left: 50px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td {\n padding-left: 70px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td {\n padding-left: 90px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td {\n padding-left: 110px !important;\n}\n\n.tabulator-print-table .tabulator-print-table-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-print-table .tabulator-print-table-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-print-table .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-print-table .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-print-table .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator.css b/Sources/CustomControls/Table/control/dist/css/tabulator.css new file mode 100644 index 0000000..314495d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator.css @@ -0,0 +1,1111 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #999; + background-color: #888; + font-size: 14px; + text-align: left; + overflow: hidden; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #e6e6e6; + color: #555; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background: #e6e6e6; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #cdcdcd; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #cdcdcd; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: #f3f3f3 !important; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #f3f3f3 !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #ccc; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #e2e2e2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #aaa; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #aaa; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #e6e6e6; + text-align: right; + color: #555; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: #f3f3f3 !important; + border-bottom: 1px solid #aaa; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #f3f3f3 !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; +} + +.tabulator-row.tabulator-row-even { + background-color: #EFEFEF; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-row-moving { + border: 1px solid #000; + background: #fff; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + pointer-events: none; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #aaa; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #aaa; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #d00; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #fff; + border: 1px solid #aaa; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #EFEFEF; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #aaa; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #aaa; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #aaa; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #333; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #333; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #aaa; + padding: 4px; + padding-top: 6px; + color: #333; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #aaa; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #aaa; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #d00; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator.min.css b/Sources/CustomControls/Table/control/dist/css/tabulator.min.css new file mode 100644 index 0000000..60aee6a --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#f3f3f3!important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#e2e2e2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#aaa;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator.min.css.map b/Sources/CustomControls/Table/control/dist/css/tabulator.min.css.map new file mode 100644 index 0000000..0cb3b0d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAElB,sBAxCgB,AA0ChB,sBA3CqB,AA6CrB,eA3Ca,AA4Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAyhBxB,AAxiBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,kCA8BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA/BF,6BAmCE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAtEwB,AAuExB,yBA1E4B,AA2E5B,WA1EmB,AA2EnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoRpB,AAvUF,qDAsDG,YAAY,CACZ,AAvDH,4CA2DG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BA7FoB,AA8FpB,mBAhG2B,AAiG3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAsNhB,AAxRH,6DAqEI,kBAAkB,AAClB,sBApGsB,AAqGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAzEJ,mEA6EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CA+DX,AA9IJ,iGAmFK,aAAc,CAMd,AAzFL,uGAsFM,eAAe,AACf,UAAW,CACX,AAxFN,+FA6FK,iBAAkB,CAClB,AA9FL,wFAkGK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAiBrB,AAzHL,gHA4GM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AApHN,8IAuHM,uBAAuB,CACvB,AAxHN,yFA6HK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AA5IL,0GAsIM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAnKkB,CAoKlB,AA3IN,0FAqJK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAvLkB,AAwLlB,gBAAgB,AAEhB,iBAAiB,CACjB,AA5JL,0FAkKK,YAAa,CACb,AAnKL,qEAwKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA7LJ,8EAgLK,qBAAsB,CACtB,AAjLL,yEAoLK,cAAe,CACf,AArLL,sFAyLM,QAAS,AACT,QAAS,CACT,AA3LN,oFAkMK,kBAAkB,CAClB,AAnML,qEAsMK,eAAc,AACd,wBAAoD,CACpD,AAxML,4HA4MM,UArOkB,CA2OlB,AAlNN,6IA+MO,gBAAgB,AAChB,4BAzOiB,CA0OjB,AAjNP,2HAuNM,UAjPgB,CAwPhB,AA9NN,4IA0NO,gBAAgB,AAChB,4BArPe,CAuPf,AA7NP,4HAmOM,UA7PgB,CAoQhB,AA1ON,6IAsOO,mBAAmB,AACnB,0BAjQe,AAkQf,UAlQe,CAmQf,AAzOP,+GAkPM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAxPN,oHA6PM,wBAAyB,CACzB,AA9PN,2GAmQM,gBAAe,AACf,gBAAgB,CAChB,AArQN,uIAyQO,gBAAe,AACf,mBAAmB,CACnB,AA3QP,4GAgRM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AArRN,+CA2RG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAzSH,qEAmSI,2BAvTgB,CAwThB,AApSJ,sEAuSI,0BA3TgB,CA4ThB,AAxSJ,qDA6SG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BA9UiB,AA+UjB,6BA1VoB,AA4VpB,eAAgB,CAChB,AA9TH,oEAmTI,4BAAyD,CAKzD,AAxTJ,iGAsTK,YAAa,CACb,AAvTL,2DAiUG,cAAc,CAKd,AAtUH,iEAoUI,YAAa,CACb,AArUJ,kCA2UE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AAxYF,wCAkVG,YAAa,CACb,AAnVH,yDAuVG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AA5WH,wFA4VI,gBAAe,AACf,cAAc,CACd,AA9VJ,8DAmWI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA3WJ,mDAgXG,kBAAiB,AACjB,qBAAoB,AACpB,sBAxYqB,AAyYrB,mBAAmB,AACnB,iBAAgB,AAChB,UAxYe,CA0Zf,AAvYH,kFA0XK,gBAAiB,AACjB,4BAAwD,CASxD,AApYL,sGA8XM,4BAlZc,CAmZd,AA/XN,yGAkYM,yBAtZc,CAuZd,AAnYN,6BA8YE,iBAAgB,AAChB,0BArZwB,AAsZxB,yBAzZ4B,AA0Z5B,iBAAiB,AACjB,WA1ZmB,AA2ZnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgFpB,AA1eF,qDA6ZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BAjciB,AAkcjB,0BAlciB,AAocjB,eAAgB,CAMhB,AAtbH,oEAsaI,4BAAyD,CAKzD,AA3aJ,iGAyaK,YAAa,CACb,AA1aL,gEAmbI,mBAAkB,AAClB,kBAAkB,CAClB,AArbJ,kDAybG,WAjckB,AAkclB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA7bH,kDAicG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA7coB,AA8cpB,iBAAiB,CACjB,AAxcH,8CA2cG,YAAY,CACZ,AA5cH,6CAgdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA5doB,AA6dpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AAzeH,oDA2dI,UAhemB,CAienB,AA5dJ,sDA+dI,UAAU,CACV,AAheJ,kEAoeK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAveL,wCA8eE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA5fF,6CAqfG,OAAM,AACN,UAAU,CACV,AAvfH,8CA0fG,gBAAgB,CAChB,AA3fH,6BAigBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAviBF,mDAghBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAtiBH,qEA6hBI,sBAAqB,AACrB,UAAU,CACV,AA/hBJ,mEAmiBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBArkBuB,CAu7BvB,AAtXD,kCAQE,wBAxkB4B,CAykB5B,AATF,0CAYE,sBAzkBsB,AA0kBtB,cAAe,CACf,AAdF,kCAiBE,wBA5kB6B,CA6kB7B,AAlBF,wCAqBE,yBA/kBkC,AAglBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BAhmBkB,AAimBlB,6BAjmBkB,AAmmBlB,oBAAoB,AACpB,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAloBiB,CAmoBjB,AApEH,wDAuEG,0BAtoBiB,CAuoBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA/oBkB,AAgpBlB,4BAhpBkB,CAmqBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAvqBW,CAkrBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA3qBkB,AA4qBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA2LtB,AA3SF,iDAmHG,yBA3qBkB,AA4qBlB,aAAY,AAEZ,SAAU,CAMV,AA5HH,+GAyHI,WAAU,AACV,sBAAsB,CACtB,AA3HJ,yDA+HG,qBAtrBgB,CA6rBhB,AAtIH,+HAiII,WAAU,AACV,uBAAsB,AAEtB,UA3rBe,CA4rBf,AArIJ,6EA2II,YAAa,CACb,AA5IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAtKH,8EA4JI,SAAS,CAST,AArKJ,wGAgKK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AApKL,2DAyKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAnvBiB,AAovBjB,4BApvBiB,CAqvBjB,AAtLH,4DA0LG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAlwBe,AAmwBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA3PH,kEA2MI,eAAc,AACd,yBAA4B,CAC5B,AA7MJ,kGAgNI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAnOJ,wGAyNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA/xBa,CAgyBb,AAlOL,gGAsOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA1yBc,CAuzBd,AAzPJ,sGA+OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eArzBa,CAszBb,AAxPL,qEA8PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA90BqB,AA+0BrB,gBAAgB,AAChB,eAAe,CAmBf,AAlSH,2EAkRI,UAAU,CACV,AAnRJ,sHAuRK,eAAe,CACf,AAxRL,sOAgSI,YAAY,CACZ,AAjSJ,wDAqSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AA1SH,+BA+SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAh3BkB,AAi3BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CA4Df,AApXF,qCA2TG,eAAc,AACd,+BAA+B,CAC/B,AA7TH,wEAkUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA14BkB,AA24BlB,eAAgB,CAChB,AAvUJ,uDA4UG,iBAAiB,CACjB,AA7UH,uDAgVG,iBAAiB,CACjB,AAjVH,uDAoVG,iBAAiB,CACjB,AArVH,uDAwVG,iBAAiB,CACjB,AAzVH,uDA4VG,kBAAkB,CAClB,AA7VH,uDAgWG,oBAAqB,CACrB,AAjWH,gDAqWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAj7BmB,AAk7BnB,qBAAqB,CACrB,AA9WH,oCAiXG,iBAAgB,AAChB,UAAU,CACV,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBA97BuB,AA+7BvB,sBA77BmB,AA87BnB,oCAAuC,AAEvC,eAh9Ba,AAk9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA8Cd,AA5DD,qCAiBE,kBAAiB,AACjB,sBAAqB,AAErB,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAiCjB,AAvDF,kEAyBG,UAAW,CACX,AA1BH,8EA6BG,eAAe,AACf,kBAt9B2B,CAu9B3B,AA/BH,iEAkCG,kBAAkB,CAoBlB,AAtDH,uEAqCI,qBAAqB,AACrB,kBAAkB,AAElB,qBAAqB,AACrB,WAAW,AACX,WAAW,AACX,UAAU,AAEV,WAAW,AAEX,yBAAyB,AACzB,mBAAmB,AACnB,kBAx+BgB,AAy+BhB,mBAAmB,AAEnB,uBAAwB,CACxB,AArDJ,0CA0DE,yBAj/BkB,CAk/BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA9/BuB,AA+/BvB,sBA7/BmB,AA+/BnB,eA/gCa,AAihCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA4Cd,AA3DD,6DAkBE,YAAW,AAEX,UAxgCgB,CA6hChB,AAzCF,oEAuBG,WA9gCqB,AA+gCrB,kBAtgCkB,CA2gClB,AA7BH,4EA2BI,oCAlhCoB,CAmhCpB,AA5BJ,qEAgCG,yBA9gCkB,CA+gClB,AAjCH,mEAoCG,eAAc,AAEd,WA7hCqB,AA8hCrB,kBArhCkB,CAshClB,AAxCH,+DA4CE,YAAW,AAEX,WAliCgB,AAmiChB,iBAAkB,CAClB,AAhDF,8DAmDE,6BAxiCkB,AA0iClB,YAAW,AACX,gBAAe,AAEf,WA5iCgB,AA6iChB,eAAgB,CAChB,AAMF,yBACC,aAAc,CACd,AAED,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BA3kCoB,AA4kCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BA7lCiB,CAqnCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BA9mCgB,CA+mChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAOH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAwKzB,AAzKD,mDAIE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BArqCkB,AAsqClB,4BAtqCkB,CAuqClB,AAjBF,oDAqBE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA7qCkB,AA8qClB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAsEf,AApGF,0DAiCG,eAAc,AACd,+BAA+B,CAC/B,AAnCH,6FAwCI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAvsCkB,AAwsClB,eAAgB,CAChB,AA7CJ,+EAmDI,2BAA4B,CAC5B,AApDJ,+EAyDI,2BAA4B,CAC5B,AA1DJ,+EA+DI,2BAA4B,CAC5B,AAhEJ,+EAqEI,2BAA4B,CAC5B,AAtEJ,+EA2EI,4BAA6B,CAC7B,AA5EJ,4EAgFG,oBAAqB,CACrB,AAjFH,qEAqFG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAxvCmB,AAyvCnB,qBAAqB,CACrB,AA9FH,yDAiGG,iBAAgB,AAChB,UAAU,CACV,AAnGH,oDAwGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAvwCgB,AAwwChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAxKF,0DAyHG,eAAc,AACd,yBAA4B,CAC5B,AA3HH,0FA8HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjJH,gGAuII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eApyCc,CAqyCd,AAhJJ,wFAoJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA/yCe,CA4zCf,AAvKH,8FA6JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1zCc,CA2zCd","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888 !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-paginator{\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\toutline:none;\r\n\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\t\tposition:relative;\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-menu-item-submenu{\r\n\t\t\tpadding-right:25px;\r\n\r\n\t\t\t&::after {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tposition: absolute;\r\n\r\n\t\t\t\ttop: calc(5px + .4em);\r\n\t\t\t\tright: 10px;\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tcontent: '';\r\n\r\n\t\t\t\tborder-width: 1px 1px 0 0;\r\n\t\t\t\tborder-style: solid;\r\n\t\t\t\tborder-color: $rowBorderColor;\r\n\t\t\t\tvertical-align: top;\r\n\r\n\t\t\t\ttransform: rotate(45deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.css b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.css new file mode 100644 index 0000000..a3db2bc --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.css @@ -0,0 +1,1115 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #333; + background-color: #222; + overflow: hidden; + font-size: 14px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #333; + color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background-color: #333; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #1a1a1a; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #444; + color: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input, .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select { + border: 1px solid #999; + background: #444; + color: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #1a1a1a; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #888; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #888; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: #1a1a1a !important; + border-top: 1px solid #888; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #1a1a1a !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #eee; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #666; + white-space: nowrap; + overflow: visible; + color: #fff; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #373737 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #888; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #888; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #333; + text-align: right; + color: #333; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: #262626 !important; + border-bottom: 1px solid #888; + border-top: 1px solid #888; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #262626 !important; + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator label { + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); + color: #333; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #666; +} + +.tabulator-row:nth-child(even) { + background-color: #444; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #999; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #000; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #888; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #888; + border-bottom: 1px solid #888; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #888; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #888; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #888; + border-bottom: 1px solid #888; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #888; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #999; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #888; + border-bottom: 2px solid #888; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #fff; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #fff; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #fff; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #fff; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #fff; + color: #666; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #888; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + color: #333; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #666; + border: 1px solid #888; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #444; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #888; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #888; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #888; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #666; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #999; + background: #444; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(153, 153, 153, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #444; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #999; + background: #666; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #fff; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #888; + padding: 4px; + padding-top: 6px; + color: #fff; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #aaa; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #888; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #888; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #888; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + color: #333; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #888; + border-bottom: 2px solid #888; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #fff; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #fff; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #fff; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #fff; +} diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css new file mode 100644 index 0000000..a9eadf2 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #333;background-color:#222;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#333;color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background-color:#333;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#1a1a1a;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{border:1px solid #999;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#1a1a1a}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#1a1a1a!important;border-top:1px solid #888;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#1a1a1a!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#eee;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#666;white-space:nowrap;overflow:visible;color:#fff}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#373737!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #888}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #888}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#333;text-align:right;color:#333;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#262626!important;border-bottom:1px solid #888;border-top:1px solid #888;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#262626!important;color:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator label{color:#fff}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2);color:#333;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#666}.tabulator-row:nth-child(2n){background-color:#444}.tabulator-row.tabulator-selectable:hover{background-color:#999;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#000}.tabulator-row.tabulator-selected:hover{background-color:#888;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #888;border-bottom:1px solid #888;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #888;border-bottom:1px solid #888}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #888;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #999;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #888;border-bottom:2px solid #888}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #fff;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#fff;color:#666;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #888;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#333;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#666;border:1px solid #888;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#444}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#888;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #888}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #888;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#666}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#999;background:#444}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,60%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #444}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#999;background:#666}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#fff;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #888;padding:4px;padding-top:6px;color:#fff;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #888}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #888}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #888;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#333;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #888;border-bottom:2px solid #888}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #fff;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#fff}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff} +/*# sourceMappingURL=tabulator_midnight.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css.map b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css.map new file mode 100644 index 0000000..1351b4a --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_midnight.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_midnight.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAClB,sBAtCgB,AAuChB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAsiBxB,AAljBD,iFAiBI,cAAc,CACd,AAlBJ,0CAuBE,oBAAqB,CACrB,AAxBF,kCA2BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA5BF,6BAgCE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAlEwB,AAmExB,sBAtEyB,AAuEzB,WAtEmB,AAuEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8RpB,AA9UF,qDAmDG,YAAY,CACZ,AApDH,4CAwDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAzFoB,AA0FpB,sBA5FwB,AA6FxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CA+NhB,AA9RH,6DAkEI,kBAAkB,AAClB,sBAhGsB,AAiGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAtEJ,mEA0EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAiEX,AA7IJ,iGAgFK,aAAc,CAMd,AAtFL,uGAmFM,eAAe,AACf,UAAW,CACX,AArFN,+FA0FK,iBAAkB,CAClB,AA3FL,wFA+FK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAmBrB,AAxHL,gHAyGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,gBAAgB,AAChB,UAAW,CACX,AAlHN,8IAqHM,uBAAuB,CACvB,AAtHN,yFA4HK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AA3IL,0GAqIM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAjKkB,CAkKlB,AA1IN,0FAoJK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BArLkB,AAsLlB,gBAAgB,AAEhB,iBAAiB,CACjB,AA3JL,0FAiKK,YAAa,CACb,AAlKL,qEAuKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAuBlB,AAlMJ,8EA+KK,qBAAsB,CACtB,AAhLL,yEAmLK,cAAe,CACf,AApLL,uJAuLK,sBAAqB,AACrB,gBAAgB,AAChB,UAAW,CACX,AA1LL,sFA8LM,QAAS,AACT,QAAS,CACT,AAhMN,oFAuMK,kBAAkB,CAClB,AAxML,qEA2MK,eAAc,AACd,wBAAoD,CACpD,AA7ML,4HAkNM,UA1OkB,CAgPlB,AAxNN,6IAqNO,gBAAgB,AAChB,4BA9OiB,CA+OjB,AAvNP,2HA6NM,UAtPgB,CA6PhB,AApON,4IAgOO,gBAAgB,AAChB,4BA1Pe,CA4Pf,AAnOP,4HAyOM,UAlQgB,CAyQhB,AAhPN,6IA4OO,mBAAmB,AACnB,0BAtQe,AAuQf,UAvQe,CAwQf,AA/OP,+GAuPM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA7PN,oHAkQM,wBAAyB,CACzB,AAnQN,2GAwQM,gBAAe,AACf,gBAAgB,CAChB,AA1QN,uIA8QO,gBAAe,AACf,mBAAmB,CACnB,AAhRP,4GAqRM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AA1RN,+CAiSG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AA/SH,qEAySI,2BA5TgB,CA6ThB,AA1SJ,sEA6SI,0BAhUgB,CAiUhB,AA9SJ,qDAmTG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BAnViB,AAoVjB,6BA/VoB,AAiWpB,eAAgB,CAChB,AApUH,oEAyTI,4BAAyD,CAKzD,AA9TJ,iGA4TK,YAAa,CACb,AA7TL,2DAuUG,cAAc,CAKd,AA5UH,iEA0UI,YAAa,CACb,AA3UJ,kCAkVE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAuDjC,AA7YF,wCAyVG,YAAa,CACb,AA1VH,yDA8VG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AAnXH,wFAmWI,gBAAe,AACf,cAAc,CACd,AArWJ,8DA0WI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAlXJ,mDAuXG,kBAAiB,AACjB,qBAAoB,AACpB,sBA9YqB,AA+YrB,mBAAmB,AACnB,iBAAgB,AAChB,UA9Ye,CA8Zf,AA5YH,kFAgYK,gBAAiB,AACjB,4BAAwD,CASxD,AA1YL,sGAoYM,4BAvZc,CAwZd,AArYN,yGAwYM,yBA3Zc,CA4Zd,AAzYN,wCAiZE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA/ZF,6CAwZG,OAAM,AACN,UAAU,CACV,AA1ZH,8CA6ZG,gBAAgB,CAChB,AA9ZH,6BAoaE,iBAAgB,AAChB,0BA1awB,AA2axB,sBA9ayB,AA+azB,iBAAgB,AAChB,WA/amB,AAgbnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AAvgBF,qDAmbG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAWxD,6BAvdiB,AAwdjB,0BAxdiB,AA0djB,eAAgB,CAMhB,AA7cH,oEA4bI,6BAAwD,AACxD,UA5diB,CAiejB,AAlcJ,iGAgcK,YAAa,CACb,AAjcL,gEA0cI,mBAAkB,AAClB,kBAAkB,CAClB,AA5cJ,wDAkdI,UAAU,CACV,AAndJ,kDAwdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAneoB,AAoepB,iBAAiB,CACjB,AA/dH,8CAmeG,YAAY,CACZ,AApeH,6CAweG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAnfoB,AAofpB,kBAAiB,AAEjB,8BAA+B,AAE/B,WAzfkB,AA0flB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAtgBH,oDAwfI,UA5fmB,CA6fnB,AAzfJ,sDA4fI,UAAU,CACV,AA7fJ,kEAigBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AApgBL,6BA2gBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAjjBF,mDA0hBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAhjBH,qEAuiBI,sBAAqB,AACrB,UAAU,CACV,AAziBJ,mEA6iBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,qBA/kBuB,CA67BvB,AAnXD,6BAQE,qBAjlByB,CAklBzB,AATF,0CAYE,sBAllBsB,AAmlBtB,cAAe,CACf,AAdF,kCAiBE,qBArlB0B,CAslB1B,AAlBF,wCAqBE,sBAxlB+B,AAylB/B,cAAe,CACf,AAvBF,gCA0BE,kBAAkB,AAElB,0BApmBkB,AAqmBlB,6BArmBkB,AAumBlB,8BAA+B,AAC/B,UAAU,CACV,AAjCF,4CAqCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAnDF,iDA4CG,MAAK,AACL,WAAW,CACX,AA9CH,kDAiDG,gBAAgB,CAChB,AAlDH,iCAsDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AApEF,uDA8DG,2BAtoBiB,CAuoBjB,AA/DH,wDAkEG,0BA1oBiB,CA2oBjB,AAnEH,8CAuEE,sBAAqB,AAErB,YAAW,AAEX,0BAnpBkB,AAopBlB,4BAppBkB,CAuqBlB,AA/FF,oDA+EG,YAAY,CACZ,AAhFH,oDAmFG,cA3qBW,CAsrBX,AA9FH,0DAuFK,iBAAkB,CAKlB,AA5FL,wEA0FM,kBAAkB,CAClB,AA3FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAhrBkB,AAirBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA4LtB,AAxSF,iDAgHG,sBAjrBe,AAkrBf,aAAY,AAEZ,SAAU,CAMV,AAzHH,+GAsHI,WAAU,AACV,sBAAsB,CACtB,AAxHJ,yDA4HG,qBA5rBgB,CAmsBhB,AAnIH,+HA8HI,WAAU,AACV,uBAAsB,AAEtB,UAjsBe,CAksBf,AAlIJ,6EAwII,YAAa,CACb,AAzIJ,oDA+IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAnKH,8EAyJI,SAAS,CAST,AAlKJ,wGA6JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAjKL,2DAsKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAzvBiB,AA0vBjB,4BA1vBiB,CA2vBjB,AAnLH,4DAuLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAxwBe,AAywBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAxPH,kEAwMI,eAAc,AACd,yBAA4B,CAC5B,AA1MJ,kGA6MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAhOJ,wGAsNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAryBa,CAsyBb,AA/NL,gGAmOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAhzBc,CA6zBd,AAtPJ,sGA4OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3zBa,CA4zBb,AArPL,qEA2PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAp1BqB,AAq1BrB,gBAAgB,AAChB,eAAe,CAmBf,AA/RH,2EA+QI,UAAU,CACV,AAhRJ,sHAoRK,eAAe,CACf,AArRL,sOA6RI,YAAY,CACZ,AA9RJ,wDAkSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAvSH,+BA8SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAx3BkB,AAy3BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CA0Df,AAlXF,qCA2TG,eAAc,AACd,+BAA+B,CAC/B,AA7TH,wEAiUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAl5BkB,AAm5BlB,eAAgB,CAChB,AAtUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,uDA8VG,oBAAqB,CACrB,AA/VH,gDAmWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAx7BmB,AAy7BnB,qBAAqB,CACrB,AA5WH,oCA+WG,iBAAgB,AAChB,UAAU,CACV,AAIH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBAp8BuB,AAq8BvB,sBAn8BmB,AAo8BnB,oCAAuC,AAEvC,eAt9Ba,AAw9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA8Cd,AA5DD,qCAiBE,kBAAiB,AACjB,sBAAqB,AAErB,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAiCjB,AAvDF,kEAyBG,UAAW,CACX,AA1BH,8EA6BG,eAAe,AACf,eA59BwB,CA69BxB,AA/BH,iEAkCG,kBAAkB,CAoBlB,AAtDH,uEAqCI,qBAAqB,AACrB,kBAAkB,AAElB,qBAAqB,AACrB,WAAW,AACX,WAAW,AACX,UAAU,AAEV,WAAW,AAEX,yBAAyB,AACzB,mBAAmB,AACnB,kBA9+BgB,AA++BhB,mBAAmB,AAEnB,uBAAwB,CACxB,AArDJ,0CA0DE,yBAv/BkB,CAw/BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAjgCiB,AAkgCjB,sBAngCmB,AAqgCnB,eArhCa,AAuhCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UAjhCsB,CAuiCtB,AA1CF,oEAuBG,WA3gCe,AA4gCf,eAphCwB,CAyhCxB,AA7BH,4EA2BI,mCA/gCc,CAghCd,AA5BJ,qEAgCG,sBA5hCwB,CA6hCxB,AAjCH,mEAqCG,eAAc,AAEd,WA3hCe,AA4hCf,eAriCqB,CAsiCrB,AAzCH,+DA6CE,YAAW,AAEX,WAziCgB,AA0iChB,iBAAkB,CAClB,AAjDF,8DAoDE,6BA/iCkB,AAijClB,YAAW,AACX,gBAAe,AAEf,WAnjCgB,AAojChB,eAAgB,CAChB,AAKF,yBACC,aAAc,CACd,AAGD,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAllCoB,AAmlCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BApmCiB,CA4nCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BArnCgB,CAsnChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAMH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAwKzB,AAzKD,oDAME,sBAAqB,AACrB,6BAA4B,AAC5B,4BApqCkB,AAqqClB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CAoEf,AApFF,0DAmBG,eAAc,AACd,+BAA+B,CAC/B,AArBH,6FAyBI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA9rCkB,AA+rClB,eAAgB,CAChB,AA9BJ,+EAmCI,2BAA4B,CAC5B,AApCJ,+EAyCI,2BAA4B,CAC5B,AA1CJ,+EA+CI,2BAA4B,CAC5B,AAhDJ,+EAqDI,2BAA4B,CAC5B,AAtDJ,+EA2DI,4BAA6B,CAC7B,AA5DJ,4EAgEG,oBAAqB,CACrB,AAjEH,qEAqEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA9uCmB,AA+uCnB,qBAAqB,CACrB,AA9EH,yDAiFG,iBAAgB,AAChB,UAAU,CACV,AAnFH,mDAuFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA9vCkB,AA+vClB,4BA/vCkB,CAgwClB,AApGF,oDAwGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA7wCgB,AA8wChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAxKF,0DAyHG,eAAc,AACd,yBAA4B,CAC5B,AA3HH,0FA8HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjJH,gGAuII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1yCc,CA2yCd,AAhJJ,wFAoJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eArzCe,CAk0Cf,AAvKH,8FA6JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAh0Cc,CAi0Cd","file":"tabulator_midnight.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #222 !default; //background color of tabulator\r\n$borderColor:#333 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#333 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#666 !default; //table row background color\r\n$rowAltBackgroundColor:#444 !default; //table row background color\r\n$rowBorderColor:#888 !default; //table border color\r\n$rowTextColor:#fff !default; //table text color\r\n$rowHoverBackground:#999 !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #000 !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#999 !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#333 !default; //border to tabulator\r\n$footerTextColor:#333 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#fff !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px solid #999;\r\n\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#eee;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\t\t\t\tcolor:$headerTextColor;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tlabel{\r\n\t\t\t\tcolor:#fff;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\toutline:none;\r\n\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\t\tcolor:#333;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\t\tposition:relative;\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-menu-item-submenu{\r\n\t\t\tpadding-right:25px;\r\n\r\n\t\t\t&::after {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tposition: absolute;\r\n\r\n\t\t\t\ttop: calc(5px + .4em);\r\n\t\t\t\tright: 10px;\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tcontent: '';\r\n\r\n\t\t\t\tborder-width: 1px 1px 0 0;\r\n\t\t\t\tborder-style: solid;\r\n\t\t\t\tborder-color: $rowBorderColor;\r\n\t\t\t\tvertical-align: top;\r\n\r\n\t\t\t\ttransform: rotate(45deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowTextColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowBackgroundColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$editBoxColor;\r\n\t\t\tbackground:$rowAltBackgroundColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($editBoxColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$editBoxColor;\r\n\t\t\tbackground:$rowBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\t\tcolor:#333;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_modern.css b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.css new file mode 100644 index 0000000..7f30ea6 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.css @@ -0,0 +1,1148 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #fff; + background-color: #fff; + overflow: hidden; + font-size: 16px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 3px solid #3759D7; + margin-bottom: 4px; + background-color: #fff; + color: #3759D7; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + padding-left: 10px; + font-size: 1.1em; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 2px solid #fff; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #3759D7; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #3759D7; + padding: 1px; + background: #fff; + font-size: 1em; + color: #3759D7; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 2px solid #3759D7; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #3759D7; + color: #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + padding-left: 10px; + border-right: 2px solid #fff; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #fff; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + border-top: 2px solid #3759D7 !important; + background: white !important; + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + padding-left: 0 !important; + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell { + background: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #3759D7; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #f3f3f3; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #3759D7; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #3759D7; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #fff; + text-align: right; + color: #3759D7; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-top: 3px solid #3759D7 !important; + border-bottom: 2px solid #3759D7 !important; + border-bottom: 1px solid #fff; + border-top: 1px solid #fff; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell { + background: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell:first-child { + border-left: 10px solid transparent; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; + border-bottom: none !important; +} + +.tabulator .tabulator-footer .tabulator-paginator { + color: #3759D7; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #3759D7; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + box-sizing: border-box; + min-height: 24px; + margin-bottom: 2px; +} + +.tabulator-row .tabulator-cell:first-child { + border-left: 10px solid #3759D7; +} + +.tabulator-row:nth-child(even) { + background-color: #627ce0; +} + +.tabulator-row:nth-child(even) .tabulator-cell { + background-color: #fff; +} + +.tabulator-row:nth-child(even) .tabulator-cell:first-child { + border-left: 10px solid #627ce0; +} + +.tabulator-row.tabulator-selectable:hover { + cursor: pointer; +} + +.tabulator-row.tabulator-selectable:hover .tabulator-cell { + background-color: #bbb; +} + +.tabulator-row.tabulator-selected .tabulator-cell { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover .tabulator-cell { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #fff; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #fff; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 16px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 6px 4px; + border-right: 2px solid #fff; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background-color: #f3f3f3; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #fff; + border-bottom: 2px solid #fff; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #f3f3f3; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 2px solid #3759D7; + border-top: 2px solid #3759D7; + padding: 5px; + padding-left: 10px; + background: #8ca0e8; + font-weight: bold; + color: fff; + margin-bottom: 2px; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3759D7; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3759D7; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #3759D7; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #f3f3f3; + border: 1px solid #fff; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 16px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #fff; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #fff; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #fff; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #f3f3f3; + border: 1px solid #1D68CD; + font-size: 16px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #333; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #f3f3f3; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(243, 243, 243, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #f3f3f3; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #333; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #fff; + padding: 4px; + padding-top: 6px; + color: #333; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #fff; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #fff; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #fff; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 2px solid #3759D7; + border-top: 2px solid #3759D7; + padding: 5px; + padding-left: 10px; + background: #8ca0e8; + font-weight: bold; + color: fff; + margin-bottom: 2px; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3759D7; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3759D7; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #3759D7; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #fff; + border-bottom: 2px solid #fff; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css new file mode 100644 index 0000000..60802a2 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #fff;background-color:#fff;overflow:hidden;font-size:16px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:3px solid #3759d7;margin-bottom:4px;background-color:#fff;color:#3759d7;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;padding-left:10px;font-size:1.1em}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:2px solid #fff;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3759d7;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #3759d7;padding:1px;background:#fff;font-size:1em;color:#3759d7}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:2px solid #3759d7;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #3759d7;color:#3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;border-top:2px solid #3759d7!important;background:#fff!important;border-top:1px solid #fff;border-bottom:1px solid #fff;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{padding-left:0!important;background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3759d7;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#f3f3f3;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #3759d7}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #3759d7}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#3759d7;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-top:3px solid #3759d7!important;border-bottom:2px solid #3759d7!important;border-bottom:1px solid #fff;border-top:1px solid #fff;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell:first-child{border-left:10px solid transparent}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none;border-bottom:none!important}.tabulator .tabulator-footer .tabulator-paginator{color:#3759d7;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#3759d7}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:24px;margin-bottom:2px}.tabulator-row .tabulator-cell:first-child{border-left:10px solid #3759d7}.tabulator-row:nth-child(2n){background-color:#627ce0}.tabulator-row:nth-child(2n) .tabulator-cell{background-color:#fff}.tabulator-row:nth-child(2n) .tabulator-cell:first-child{border-left:10px solid #627ce0}.tabulator-row.tabulator-selectable:hover{cursor:pointer}.tabulator-row.tabulator-selectable:hover .tabulator-cell{background-color:#bbb}.tabulator-row.tabulator-selected .tabulator-cell{background-color:#9abcea}.tabulator-row.tabulator-selected:hover .tabulator-cell{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #fff;border-bottom:1px solid #fff;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #fff}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #fff;border-bottom:1px solid #fff}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:16px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px 4px;border-right:2px solid #fff;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f3f3f3}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #fff;border-bottom:2px solid #fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#f3f3f3;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:2px solid #3759d7;border-top:2px solid #3759d7;padding:5px;padding-left:10px;background:#8ca0e8;font-weight:700;color:fff;margin-bottom:2px;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3759d7;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3759d7;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3759d7}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#f3f3f3;border:1px solid #fff;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#fff}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#fff;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #fff}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#f3f3f3;border:1px solid #1d68cd;font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,95%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #fff;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #fff;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #fff}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #fff}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:2px solid #3759d7;border-top:2px solid #3759d7;padding:5px;padding-left:10px;background:#8ca0e8;font-weight:700;color:fff;margin-bottom:2px;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3759d7;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3759d7;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#3759d7}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #fff;border-bottom:2px solid #fff}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_modern.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css.map b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css.map new file mode 100644 index 0000000..647996c --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_modern.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_modern.scss"],"names":[],"mappings":"AA+CA,WACC,kBAAkB,AAClB,sBA1CgB,AA2ChB,sBA5CqB,AA6CrB,gBAAe,AACf,eA5Ca,AA6Cb,gBAAgB,AAMhB,uBAAwB,CAwjBxB,AApkBD,iFAiBI,cAAc,CACd,AAlBJ,0CAuBE,oBAAqB,CACrB,AAxBF,kCA2BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA5BF,6BAgCE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCAjFe,AAkFf,kBAAiB,AACjB,sBA3EyB,AA4EzB,cApFe,AAqFf,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,kBAzDe,AA2Df,eAAgB,CAmShB,AAxVF,qDAwDG,YAAY,CACZ,AAzDH,4CA6DG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAlGoB,AAmGpB,sBArGwB,AAsGxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CA4NhB,AAhSH,6DAuEI,kBAAkB,AAClB,yBApHa,AAqHb,mBAA8C,AAC9C,mBAAoB,CACpB,AA3EJ,mEA+EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAkEX,AAnJJ,iGAqFK,aAAc,CAMd,AA3FL,uGAwFM,eAAe,AACf,UAAW,CACX,AA1FN,+FA+FK,iBAAkB,CAClB,AAhGL,wFAoGK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAoBrB,AA9HL,gHA8GM,sBAAsB,AACtB,WAAW,AAEX,yBA7JW,AA+JX,YAAW,AAEX,gBAAgB,AAEhB,cAAc,AACd,aApKW,CAqKX,AAzHN,8IA4HM,uBAAuB,CACvB,AA7HN,yFAkIK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AAjJL,0GA2IM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,+BA3KoC,CA4KpC,AAhJN,0FA0JK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,6BAzMY,AA0MZ,gBAAgB,AAEhB,iBAAiB,CACjB,AAjKL,0FAwKK,YAAa,CACb,AAzKL,qEA+KI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AApMJ,8EAuLK,qBAAsB,CACtB,AAxLL,yEA2LK,cAAe,CACf,AA5LL,sFAgMM,QAAS,AACT,QAAS,CACT,AAlMN,oFAyMK,kBAAkB,CAClB,AA1ML,qEA6MK,eAAc,AACd,wBAAoD,CACpD,AA/ML,4HAoNM,aAhPoC,CAsPpC,AA1NN,6IAuNO,gBAAgB,AAChB,+BApPmC,CAqPnC,AAzNP,2HA+NM,aA3QW,CAkRX,AAtON,4IAkOO,gBAAgB,AAChB,+BA/QU,CAiRV,AArOP,4HA2OM,aAvRW,CA8RX,AAlPN,6IA8OO,mBAAmB,AACnB,6BA3RU,AA4RV,aA5RU,CA6RV,AAjPP,+GAyPM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA/PN,oHAoQM,wBAAyB,CACzB,AArQN,2GA0QM,gBAAe,AACf,gBAAgB,CAChB,AA5QN,uIAgRO,gBAAe,AACf,mBAAmB,CACnB,AAlRP,4GAuRM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AA5RN,+CAmSG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CAWX,AAnTH,qEA2SI,kBAjTa,AAmTb,2BApUgB,CAqUhB,AA9SJ,sEAiTI,0BAxUgB,CAyUhB,AAlTJ,qDAsTG,sBAAqB,AACrB,eAAc,AAEd,uCAAqD,AAErD,0BAAyD,AAgBzD,0BAlWiB,AAmWjB,6BA9WoB,AAgXpB,eAAgB,CAChB,AA/UH,oEA8TI,yBAA0B,AAE1B,yBAAyD,CASzD,AAzUJ,iGAmUK,YAAa,CACb,AApUL,oFAuUK,eAAe,CACf,AAxUL,2DAkVG,cAAc,CAKd,AAvVH,iEAqVI,YAAa,CACb,AAtVJ,kCA4VE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAuDjC,AAvZF,wCAmWG,YAAa,CACb,AApWH,yDAwWG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AA7XH,wFA6WI,gBAAe,AACf,cAAc,CACd,AA/WJ,8DAoXI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cAraa,AAsab,gBAAiB,AACjB,cAAe,CACf,AA5XJ,mDAiYG,kBAAiB,AACjB,qBAAoB,AACpB,yBA5ZwB,AA6ZxB,mBAAmB,AACnB,iBAAgB,AAChB,UA5Ze,CA4af,AAtZH,kFA0YK,gBAAiB,AACjB,4BAAwD,CASxD,AApZL,sGA8YM,+BA1bW,CA2bX,AA/YN,yGAkZM,4BA9bW,CA+bX,AAnZN,wCA4ZE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA1aF,6CAmaG,OAAM,AACN,UAAU,CACV,AAraH,8CAwaG,gBAAgB,CAChB,AAzaH,6BA+aE,iBAAgB,AAChB,0BAzbwB,AA0bxB,sBA7byB,AA8bzB,iBAAgB,AAChB,cA/de,AAgef,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8FpB,AAzhBF,qDA8bG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,0BAAyD,AAEzD,uCAAqD,AACrD,0CAAwD,AAkBxD,6BAhfiB,AAifjB,0BAjfiB,AAmfjB,eAAgB,CAOhB,AAneH,oEA0cI,yBAAyD,CAazD,AAvdJ,iGA6cK,YAAa,CACb,AA9cL,oFAidK,eAAe,CAKf,AAtdL,gGAodM,kCAA2C,CAC3C,AArdN,gEA+dI,mBAAkB,AAClB,mBAAkB,AAClB,4BAA6B,CAC7B,AAleJ,kDAueG,cAnhBc,AAohBd,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA3eH,kDA+eG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9foB,AA+fpB,iBAAiB,CACjB,AAtfH,8CA0fG,YAAY,CACZ,AA3fH,6CA+fG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9gBoB,AA+gBpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AAxhBH,oDA0gBI,aAtjBa,CAujBb,AA3gBJ,sDA8gBI,UAAU,CACV,AA/gBJ,kEAmhBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAthBL,6BA6hBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnkBF,mDA4iBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlkBH,qEAyjBI,sBAAqB,AACrB,UAAU,CACV,AA3jBJ,mEA+jBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAGlB,sBAAsB,AACtB,gBAA0C,AAM1C,iBAAkB,CAuYlB,AAlZD,2CAeG,8BAloBc,CAmoBd,AAhBH,6BAqBE,wBAhmBqC,CAymBrC,AA9BF,6CAwBG,qBAvnBwB,CA4nBxB,AA7BH,yDA2BI,8BAtmBmC,CAumBnC,AA5BJ,0CAiCE,cAAe,CAKf,AAtCF,0DAoCG,qBAhoBqB,CAioBrB,AArCH,kDA0CG,wBApoB4B,CAqoB5B,AA3CH,wDAgDG,yBAzoBiC,AA0oBjC,cAAe,CACf,AAlDH,gCAsDE,kBAAkB,AAElB,0BAtpBkB,AAupBlB,6BAvpBkB,AAypBlB,8BAA+B,AAC/B,UAAU,CACV,AA7DF,4CAiEE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AA/EF,iDAwEG,MAAK,AACL,WAAW,CACX,AA1EH,kDA6EG,gBAAgB,CAChB,AA9EH,iCAkFE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CAUX,AAjGF,uDA2FG,2BAzrBiB,CA0rBjB,AA5FH,wDA+FG,0BA7rBiB,CA8rBjB,AAhGH,8CAoGE,sBAAqB,AAErB,YAAW,AAEX,0BAtsBkB,AAusBlB,4BAvsBkB,CA0tBlB,AA5HF,oDA4GG,YAAY,CACZ,AA7GH,oDAgHG,cA9tBW,CAyuBX,AA3HH,0DAoHK,iBAAkB,CAKlB,AAzHL,wEAuHM,kBAAkB,CAClB,AAxHN,+BAgIE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,gBAAe,AACf,4BAluBkB,AAmuBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,uBAAsB,AAEtB,wBA1uByB,CAs6BzB,AAtUF,iDA6IG,yBApuBkB,AAquBlB,aAAY,AAEZ,SAAU,CAMV,AAtJH,+GAmJI,WAAU,AACV,sBAAsB,CACtB,AArJJ,yDAyJG,qBA/uBgB,CAsvBhB,AAhKH,+HA2JI,WAAU,AACV,uBAAsB,AAEtB,UApvBe,CAqvBf,AA/JJ,6EAqKI,YAAa,CACb,AAtKJ,oDA4KG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAuB,AAAvB,uBAAuB,AAEvB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAjMH,8EAuLI,SAAS,CAST,AAhMJ,wGA2LK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AA/LL,2DAoMG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA7yBiB,AA8yBjB,4BA9yBiB,CA+yBjB,AAjNH,4DAqNG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA5zBe,AA6zBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAtRH,kEAsOI,eAAc,AACd,yBAA4B,CAC5B,AAxOJ,kGA2OI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA9PJ,wGAoPK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAz1Ba,CA01Bb,AA7PL,gGAiQI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAp2Bc,CAi3Bd,AApRJ,sGA0QK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA/2Ba,CAg3Bb,AAnRL,qEAyRG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,cAx4BwB,AAy4BxB,gBAAgB,AAChB,eAAe,CAmBf,AA7TH,2EA6SI,UAAU,CACV,AA9SJ,sHAkTK,eAAe,CACf,AAnTL,sOA2TI,YAAY,CACZ,AA5TJ,wDAgUG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AArUH,+BA2UE,sBAAqB,AACrB,gCA/7Be,AAg8Bf,6BAh8Be,AAi8Bf,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CA4Df,AAjZF,qCAwVG,eAAc,AACd,+BAA+B,CAC/B,AA1VH,wEA+VI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAr9Ba,AAs9Bb,eAAgB,CAChB,AApWJ,uDAwWG,iBAAiB,CACjB,AAzWH,uDA4WG,iBAAiB,CACjB,AA7WH,uDAgXG,iBAAiB,CACjB,AAjXH,uDAoXG,iBAAiB,CACjB,AArXH,uDAwXG,kBAAkB,CAClB,AAzXH,uDA4XG,oBAAqB,CACrB,AA7XH,gDAkYG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA5/Bc,AA6/Bd,qBAAqB,CACrB,AA3YH,oCA8YG,iBAAgB,AAChB,aAlgCc,CAmgCd,AAIH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,mBAz/B0B,AA0/B1B,sBAx/BmB,AAy/BnB,oCAAuC,AAEvC,eA3gCa,AA6gCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA8Cd,AA5DD,qCAiBE,kBAAiB,AACjB,sBAAqB,AAErB,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAiCjB,AAvDF,kEAyBG,UAAW,CACX,AA1BH,8EA6BG,eAAe,AACf,eAjhCwB,CAkhCxB,AA/BH,iEAkCG,kBAAkB,CAoBlB,AAtDH,uEAqCI,qBAAqB,AACrB,kBAAkB,AAElB,qBAAqB,AACrB,WAAW,AACX,WAAW,AACX,UAAU,AAEV,WAAW,AAEX,yBAAyB,AACzB,mBAAmB,AACnB,kBAniCgB,AAoiChB,mBAAmB,AAEnB,uBAAwB,CACxB,AArDJ,0CA0DE,yBA5iCkB,CA6iClB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,mBAzjC0B,AA0jC1B,yBAjjCoB,AAmjCpB,eA1kCa,AA4kCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UAnkCgB,CAylChB,AA1CF,oEAuBG,cAzkCwB,AA0kCxB,kBAjkCkB,CAskClB,AA7BH,4EA2BI,mCA7kCuB,CA8kCvB,AA5BJ,qEAgCG,yBAzkCkB,CA0kClB,AAjCH,mEAqCG,eAAc,AAEd,cAzlCwB,AA0lCxB,kBAjlCkB,CAklClB,AAzCH,+DA6CE,YAAW,AAEX,WA9lCgB,AA+lChB,iBAAkB,CAClB,AAjDF,8DAoDE,6BApmCkB,AAsmClB,YAAW,AACX,gBAAe,AAEf,WAxmCgB,AAymChB,eAAgB,CAChB,AAKF,yBACC,aAAc,CACd,AAGD,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAvoCoB,AAwoCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BAzpCiB,CAirCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BA1qCgB,CA2qChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAOH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAyKzB,AA1KD,oDAME,sBAAqB,AACrB,gCA9uCe,AA+uCf,6BA/uCe,AAgvCf,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CAqEf,AArFF,0DAmBG,eAAc,AACd,+BAA+B,CAC/B,AArBH,6FA0BI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BApwCa,AAqwCb,eAAgB,CAChB,AA/BJ,+EAoCI,2BAA4B,CAC5B,AArCJ,+EA0CI,2BAA4B,CAC5B,AA3CJ,+EAgDI,2BAA4B,CAC5B,AAjDJ,+EAsDI,2BAA4B,CAC5B,AAvDJ,+EA4DI,4BAA6B,CAC7B,AA7DJ,4EAiEG,oBAAqB,CACrB,AAlEH,qEAsEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BApzCc,AAqzCd,qBAAqB,CACrB,AA/EH,yDAkFG,iBAAgB,AAChB,aA1zCc,CA2zCd,AApFH,mDAwFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BArzCkB,AAszClB,4BAtzCkB,CAuzClB,AArGF,oDAyGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAp0CgB,AAq0ChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAzKF,0DA0HG,eAAc,AACd,yBAA4B,CAC5B,AA5HH,0FA+HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlJH,gGAwII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAj2Cc,CAk2Cd,AAjJJ,wFAqJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA52Ce,CAy3Cf,AAxKH,8FA8JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAv3Cc,CAw3Cd","file":"tabulator_modern.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n\n\r\n$primary: #3759D7 !default; //the base text color from which the rest of the theme derives\r\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#fff !default; //border to tabulator\r\n$textSize:16px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:$primary !default; //header text colour\r\n$headerBorderColor:#fff !default; //header border color\r\n$headerSeperatorColor:$primary !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: $primary !default;\r\n$sortArrowInactive: lighten($primary, 30%) !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#f3f3f3 !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#fff !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:$primary !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:$primary !default; //footer bottom active text color\r\n\r\n$handleWidth:10px !default; //width of the row handle\r\n$handleColor: $primary !default; //color for odd numbered rows\r\n$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tmargin-bottom:4px;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\tpadding-left:$handleWidth;\r\n\r\n\t\tfont-size: 1.1em;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:2px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid $primary;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\r\n\t\t\t\t\t\tfont-size: 1em;\r\n\t\t\t\t\t\tcolor: $primary;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tpadding-left: $handleWidth;\r\n\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tborder-top:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tpadding-left: 0 !important;\r\n\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\tborder-top:3px solid $headerSeperatorColor !important;\r\n\t\t\tborder-bottom:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\r\n\t\t\t\t\t&:first-child{\r\n\t\t\t\t\t\tborder-left: $handleWidth solid transparent;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t\tborder-bottom:none !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\r\n\t// background-color: $handleColor;\r\n\r\n\t// padding-left: $handleWidth !important;\r\n\r\n\tmargin-bottom: 2px;\r\n\r\n\t.tabulator-cell{\r\n\t\t&:first-child{\r\n\t\t\tborder-left: $handleWidth solid $handleColor;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $handleColorAlt;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\r\n\t\t\t&:first-child{\r\n\t\t\t\tborder-left: $handleWidth solid $handleColorAlt;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tcursor: pointer;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\t// padding-left: $handleWidth;\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px 4px;\r\n\t\tborder-right:2px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\toutline:none;\r\n\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content: center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:2px solid $primary;\r\n\t\tborder-top:2px solid $primary;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:lighten($primary, 20%);\r\n\t\tfont-weight:bold;\r\n\t\tcolor:fff;\r\n\t\tmargin-bottom: 2px;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$primary;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\t\tposition:relative;\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-menu-item-submenu{\r\n\t\t\tpadding-right:25px;\r\n\r\n\t\t\t&::after {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tposition: absolute;\r\n\r\n\t\t\t\ttop: calc(5px + .4em);\r\n\t\t\t\tright: 10px;\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tcontent: '';\r\n\r\n\t\t\t\tborder-width: 1px 1px 0 0;\r\n\t\t\t\tborder-style: solid;\r\n\t\t\t\tborder-color: $rowBorderColor;\r\n\t\t\t\tvertical-align: top;\r\n\r\n\t\t\t\ttransform: rotate(45deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $editBoxColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:2px solid $primary;\r\n\t\tborder-top:2px solid $primary;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:lighten($primary, 20%);\r\n\t\tfont-weight:bold;\r\n\t\tcolor:fff;\r\n\t\tmargin-bottom: 2px;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$primary;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_simple.css b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.css new file mode 100644 index 0000000..e40788f --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.css @@ -0,0 +1,1108 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 14px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #fff; + color: #555; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #ddd; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #666; + color: #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: #f2f2f2 !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #999; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #f2f2f2 !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #fff; + text-align: right; + color: #555; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -5px -10px 5px -10px; + text-align: left; + background: #f2f2f2 !important; + border-bottom: 1px solid #fff; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #f2f2f2 !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator { + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; + border-bottom: 1px solid #ddd; +} + +.tabulator-row:nth-child(even) { + background-color: #fff; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #ddd; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #666; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #fff; + border: 1px solid #ddd; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #fff; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #ddd; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #ddd; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #ddd; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #333; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #333; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #ddd; + padding: 4px; + padding-top: 6px; + color: #333; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #ddd; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #ddd; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #666; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #ddd; + border-bottom: 2px solid #ddd; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css new file mode 100644 index 0000000..bc67b98 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#fff;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #ddd;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#f2f2f2!important;border-top:1px solid #ddd;border-bottom:1px solid #999;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f2f2f2!important;border-bottom:1px solid #fff;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid #ddd}.tabulator-row,.tabulator-row:nth-child(2n){background-color:#fff}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #ddd;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #ddd;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#fff}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#ddd;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #ddd}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #ddd;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #ddd}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#666}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_simple.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css.map b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css.map new file mode 100644 index 0000000..5ffd86f --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_simple.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_simple.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAClB,sBAvCqB,AAwCrB,gBAAe,AACf,eAvCa,AAwCb,gBAAgB,AAMhB,uBAAwB,CA4hBxB,AAviBD,iFAgBI,cAAc,CACd,AAjBJ,0CAsBE,oBAAqB,CACrB,AAvBF,kCA0BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA3BF,6BA+BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAjEwB,AAkExB,sBArEyB,AAsEzB,WArEmB,AAsEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAsRpB,AArUF,qDAkDG,YAAY,CACZ,AAnDH,4CAuDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAxFoB,AAyFpB,sBA3FwB,AA4FxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAyNhB,AAvRH,6DAiEI,kBAAkB,AAClB,sBA/FsB,AAgGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AArEJ,mEAyEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CA+DX,AA1IJ,iGA+EK,aAAc,CAMd,AArFL,uGAkFM,eAAe,AACf,UAAW,CACX,AApFN,+FAyFK,iBAAkB,CAClB,AA1FL,wFA8FK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAiBrB,AArHL,gHAwGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAhHN,8IAmHM,uBAAuB,CACvB,AApHN,yFAyHK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AAxIL,0GAkIM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9JkB,CA+JlB,AAvIN,0FAiJK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAlLkB,AAmLlB,gBAAgB,AAEhB,iBAAiB,CACjB,AAxJL,0FA+JK,YAAa,CACb,AAhKL,qEAqKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA1LJ,8EA6KK,qBAAsB,CACtB,AA9KL,yEAiLK,cAAe,CACf,AAlLL,sFAsLM,QAAS,AACT,QAAS,CACT,AAxLN,oFAgMK,kBAAkB,CAClB,AAjML,qEAoMK,eAAc,AACd,wBAAoD,CACpD,AAtML,4HA2MM,UAnOkB,CAyOlB,AAjNN,6IA8MO,gBAAgB,AAChB,4BAvOiB,CAwOjB,AAhNP,2HAsNM,UA/OgB,CAsPhB,AA7NN,4IAyNO,gBAAgB,AAChB,4BAnPe,CAqPf,AA5NP,4HAkOM,UA3PgB,CAkQhB,AAzON,6IAqOO,mBAAmB,AACnB,0BA/Pe,AAgQf,UAhQe,CAiQf,AAxOP,+GAgPM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAtPN,oHA2PM,wBAAyB,CACzB,AA5PN,2GAiQM,gBAAe,AACf,gBAAgB,CAChB,AAnQN,uIAuQO,gBAAe,AACf,mBAAmB,CACnB,AAzQP,4GA8QM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AAnRN,+CA0RG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAxSH,qEAkSI,2BArTgB,CAsThB,AAnSJ,sEAsSI,0BAzTgB,CA0ThB,AAvSJ,qDA2SG,sBAAqB,AACrB,eAAc,AAEd,6BAAwD,AAUxD,0BA3UiB,AA4UjB,6BAtVuB,AAwVvB,eAAgB,CAChB,AA5TH,oEAiTI,4BAAwD,CAKxD,AAtTJ,iGAoTK,YAAa,CACb,AArTL,2DA+TG,cAAc,CAKd,AApUH,iEAkUI,YAAa,CACb,AAnUJ,kCA2UE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAwDjC,AAvYF,wCAkVG,YAAa,CACb,AAnVH,yDAuVG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AA5WH,wFA4VI,gBAAe,AACf,cAAc,CACd,AA9VJ,8DAmWI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA3WJ,mDAgXG,kBAAiB,AACjB,qBAAoB,AACpB,sBAvYqB,AAwYrB,mBAAmB,AACnB,iBAAgB,AAChB,UAvYe,CAwZf,AAtYH,kFAyXK,gBAAiB,AACjB,4BAAwD,CASxD,AAnYL,sGA6XM,4BAhZc,CAiZd,AA9XN,yGAiYM,yBApZc,CAqZd,AAlYN,wCA2YE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAzZF,6CAkZG,OAAM,AACN,UAAU,CACV,AApZH,8CAuZG,gBAAgB,CAChB,AAxZH,6BA8ZE,iBAAgB,AAChB,0BAnawB,AAoaxB,sBAvayB,AAwazB,iBAAgB,AAChB,WAxamB,AAyanB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAkFpB,AA5fF,qDA6aG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAUxD,6BApcwB,AAqcxB,0BAjdiB,AAmdjB,eAAgB,CAMhB,AAtcH,oEAsbI,4BAAwD,CAKxD,AA3bJ,iGAybK,YAAa,CACb,AA1bL,gEAmcI,mBAAkB,AAClB,kBAAkB,CAClB,AArcJ,kDA0cG,WAhdkB,AAidlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA9cH,kDAkdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA5doB,AA6dpB,iBAAiB,CACjB,AAzdH,8CA6dG,YAAY,CACZ,AA9dH,6CAkeG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA5eoB,AA6epB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AA3fH,oDA6eI,UAhfmB,CAifnB,AA9eJ,sDAifI,UAAU,CACV,AAlfJ,kEAsfK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAzfL,6BAggBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAtiBF,mDA+gBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAriBH,qEA4hBI,sBAAqB,AACrB,UAAU,CACV,AA9hBJ,mEAkiBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAE1C,4BAnkBmB,CAi7BnB,AApXD,4CAKC,qBApkBuB,CAykBtB,AAVF,0CAaE,sBAxkBsB,AAykBtB,cAAe,CACf,AAfF,kCAkBE,wBA3kB6B,CA4kB7B,AAnBF,wCAsBE,yBA9kBkC,AA+kBlC,cAAe,CACf,AAxBF,gCA2BE,kBAAkB,AAElB,0BA1lBkB,AA2lBlB,6BA3lBkB,AA6lBlB,8BAA+B,AAC/B,UAAU,CACV,AAlCF,4CAsCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApDF,iDA6CG,MAAK,AACL,WAAW,CACX,AA/CH,kDAkDG,gBAAgB,CAChB,AAnDH,iCAuDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AArEF,uDA+DG,2BA5nBiB,CA6nBjB,AAhEH,wDAmEG,0BAhoBiB,CAioBjB,AApEH,8CAwEE,sBAAqB,AAErB,YAAW,AAEX,0BAzoBkB,AA0oBlB,4BA1oBkB,CA6pBlB,AAhGF,oDAgFG,YAAY,CACZ,AAjFH,oDAoFG,cAjqBW,CA4qBX,AA/FH,0DAwFK,iBAAkB,CAKlB,AA7FL,wEA2FM,kBAAkB,CAClB,AA5FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BArqBkB,AAsqBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA+LtB,AA3SF,4CA+GG,iBAAkB,CAClB,AAhHH,iDAmHG,yBAxqBkB,AAyqBlB,aAAY,AAEZ,SAAU,CAMV,AA5HH,+GAyHI,WAAU,AACV,sBAAsB,CACtB,AA3HJ,yDA+HG,qBAnrBgB,CA0rBhB,AAtIH,+HAiII,WAAU,AACV,uBAAsB,AAEtB,UAxrBe,CAyrBf,AArIJ,6EA2II,YAAa,CACb,AA5IJ,oDAkJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAtKH,8EA4JI,SAAS,CAST,AArKJ,wGAgKK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AApKL,2DAyKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAjvBiB,AAkvBjB,4BAlvBiB,CAmvBjB,AAtLH,4DA0LG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAhwBe,AAiwBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA3PH,kEA2MI,eAAc,AACd,yBAA4B,CAC5B,AA7MJ,kGAgNI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAnOJ,wGAyNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA7xBa,CA8xBb,AAlOL,gGAsOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAxyBc,CAqzBd,AAzPJ,sGA+OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAnzBa,CAozBb,AAxPL,qEA8PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA50BqB,AA60BrB,gBAAgB,AAChB,eAAe,CAmBf,AAlSH,2EAkRI,UAAU,CACV,AAnRJ,sHAuRK,eAAe,CACf,AAxRL,sOAgSI,YAAY,CACZ,AAjSJ,wDAqSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AA1SH,+BAgTE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA/2BkB,AAg3BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CA0Df,AAnXF,qCA4TG,eAAc,AACd,+BAA+B,CAC/B,AA9TH,wEAkUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAx4BkB,AAy4BlB,eAAgB,CAChB,AAvUJ,uDA2UG,iBAAiB,CACjB,AA5UH,uDA+UG,iBAAiB,CACjB,AAhVH,uDAmVG,iBAAiB,CACjB,AApVH,uDAuVG,iBAAiB,CACjB,AAxVH,uDA2VG,kBAAkB,CAClB,AA5VH,uDA+VG,oBAAqB,CACrB,AAhWH,gDAoWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA96BmB,AA+6BnB,qBAAqB,CACrB,AA7WH,oCAgXG,iBAAgB,AAChB,UAAU,CACV,AAIH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBA17BuB,AA27BvB,sBAz7BmB,AA07BnB,oCAAuC,AAEvC,eA58Ba,AA88Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA8Cd,AA5DD,qCAiBE,kBAAiB,AACjB,sBAAqB,AAErB,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAiCjB,AAvDF,kEAyBG,UAAW,CACX,AA1BH,8EA6BG,eAAe,AACf,eAl9BwB,CAm9BxB,AA/BH,iEAkCG,kBAAkB,CAoBlB,AAtDH,uEAqCI,qBAAqB,AACrB,kBAAkB,AAElB,qBAAqB,AACrB,WAAW,AACX,WAAW,AACX,UAAU,AAEV,WAAW,AAEX,yBAAyB,AACzB,mBAAmB,AACnB,kBAp+BgB,AAq+BhB,mBAAmB,AAEnB,uBAAwB,CACxB,AArDJ,0CA0DE,yBA7+BkB,CA8+BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA1/BuB,AA2/BvB,sBAz/BmB,AA2/BnB,eA3gCa,AA6gCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UApgCgB,CA0hChB,AA1CF,oEAuBG,WA1gCqB,AA2gCrB,kBAjgCkB,CAsgClB,AA7BH,4EA2BI,oCA9gCoB,CA+gCpB,AA5BJ,qEAgCG,yBAzgCkB,CA0gClB,AAjCH,mEAqCG,eAAc,AAEd,WA1hCqB,AA2hCrB,kBAjhCkB,CAkhClB,AAzCH,+DA6CE,YAAW,AAEX,WA/hCgB,AAgiChB,iBAAkB,CAClB,AAjDF,8DAoDE,6BAriCkB,AAuiClB,YAAW,AACX,gBAAe,AAEf,WAziCgB,AA0iChB,eAAgB,CAChB,AAKF,yBACC,aAAc,CACd,AAGD,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAxkCoB,AAykCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BA1lCiB,CAknCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BA3mCgB,CA4mChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAQH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAuKzB,AAxKD,oDAME,sBAAqB,AACrB,6BAA4B,AAC5B,4BA5pCkB,AA6pClB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CAoEf,AAnFF,0DAkBG,eAAc,AACd,+BAA+B,CAC/B,AApBH,6FAwBI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BArrCkB,AAsrClB,eAAgB,CAChB,AA7BJ,+EAkCI,2BAA4B,CAC5B,AAnCJ,+EAwCI,2BAA4B,CAC5B,AAzCJ,+EA8CI,2BAA4B,CAC5B,AA/CJ,+EAoDI,2BAA4B,CAC5B,AArDJ,+EA0DI,4BAA6B,CAC7B,AA3DJ,4EA+DG,oBAAqB,CACrB,AAhEH,qEAoEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAruCmB,AAsuCnB,qBAAqB,CACrB,AA7EH,yDAgFG,iBAAgB,AAChB,UAAU,CACV,AAlFH,mDAsFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BArvCkB,AAsvClB,4BAtvCkB,CAuvClB,AAnGF,oDAuGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBApwCgB,AAqwChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAvKF,0DAwHG,eAAc,AACd,yBAA4B,CAC5B,AA1HH,0FA6HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAhJH,gGAsII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAjyCc,CAkyCd,AA/IJ,wFAmJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA5yCe,CAyzCf,AAtKH,8FA4JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAvzCc,CAwzCd","file":"tabulator_simple.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#ddd !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#ddd !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#000;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $footerBackgroundColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&:last-of-type{\r\n\t\t\tborder-right: none;\r\n\t\t}\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\toutline:none;\r\n\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#fafafa;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\t\tposition:relative;\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-menu-item-submenu{\r\n\t\t\tpadding-right:25px;\r\n\r\n\t\t\t&::after {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tposition: absolute;\r\n\r\n\t\t\t\ttop: calc(5px + .4em);\r\n\t\t\t\tright: 10px;\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tcontent: '';\r\n\r\n\t\t\t\tborder-width: 1px 1px 0 0;\r\n\t\t\t\tborder-style: solid;\r\n\t\t\t\tborder-color: $rowBorderColor;\r\n\t\t\t\tvertical-align: top;\r\n\r\n\t\t\t\ttransform: rotate(45deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#fafafa;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_site.css b/Sources/CustomControls/Table/control/dist/css/tabulator_site.css new file mode 100644 index 0000000..be0e0ea --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_site.css @@ -0,0 +1,1109 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border-bottom: 5px solid #222; + background-color: #fff; + font-size: 14px; + text-align: left; + overflow: hidden; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitDataTable"] { + display: inline-block; +} + +.tabulator[tabulator-layout="fitColumns"] .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 3px solid #3FB449; + background-color: #222; + color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header.tabulator-header-hidden { + display: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background-color: #222; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #3FB449; + background: #090909; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + box-sizing: border-box; + position: relative; + padding: 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button { + padding: 0 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover { + cursor: pointer; + opacity: .6; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { + position: relative; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { + width: calc(100% - 22px); +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: absolute; + top: 0; + bottom: 0; + right: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { + width: 0; + height: 0; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #090909; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { + color: #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { + color: #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { + color: #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + border-bottom: none; + border-top: 6px solid #3FB449; + color: #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { + -ms-writing-mode: tb-rl; + writing-mode: vertical-rl; + text-orientation: mixed; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-top: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { + padding-right: 0; + padding-bottom: 20px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { + -ms-flex-pack: center; + justify-content: center; + left: 0; + right: 0; + top: 4px; + bottom: auto; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 600%; + background: #3c3c3c !important; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #3c3c3c !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder { + min-width: 600%; +} + +.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { + min-height: 100%; + min-width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #3FB449; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #484848 !important; + color: #fff; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + padding-top: 8px; + border-top: 3px solid #3FB449; + background-color: #222; + text-align: right; + color: #222; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc(100% + 20px); + margin: -8px -10px 8px -10px; + text-align: left; + background: #3c3c3c !important; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #3c3c3c !important; + color: #fff !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-paginator label { + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-page-size { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: #fff; + color: #222; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #3FB449; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tabulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; +} + +.tabulator-row.tabulator-row-even { + background-color: #EFEFEF; +} + +.tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator-row.tabulator-row-moving { + border: 1px solid #000; + background: #fff; +} + +.tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + pointer-events: none !important; + z-index: 15; +} + +.tabulator-row .tabulator-row-resize-handle { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 5px; +} + +.tabulator-row .tabulator-row-resize-handle.prev { + top: 0; + bottom: auto; +} + +.tabulator-row .tabulator-row-resize-handle:hover { + cursor: ns-resize; +} + +.tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse { + box-sizing: border-box; + padding: 5px; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; +} + +.tabulator-row .tabulator-responsive-collapse:empty { + display: none; +} + +.tabulator-row .tabulator-responsive-collapse table { + font-size: 14px; +} + +.tabulator-row .tabulator-responsive-collapse table tr td { + position: relative; +} + +.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { + padding-right: 10px; +} + +.tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 6px; + border-right: 1px solid #aaa; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + outline: none; + padding: 0; +} + +.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin-top: 2px; + background: #3FB449; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + height: 15px; + width: 15px; + border-radius: 20px; + background: #666; + color: #fff; + font-weight: bold; + font-size: 1.1em; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { + opacity: .7; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { + display: initial; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { + display: none; +} + +.tabulator-row .tabulator-cell .tabulator-traffic-light { + display: inline-block; + height: 14px; + width: 14px; + border-radius: 14px; +} + +.tabulator-row.tabulator-group { + box-sizing: border-box; + border-right: 1px solid #aaa; + border-top: 1px solid #000; + border-bottom: 2px solid #3FB449; + padding: 5px; + padding-left: 10px; + background: #222; + color: #fff; + font-weight: bold; + min-width: 100%; +} + +.tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: #090909; +} + +.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3FB449; + border-bottom: 0; +} + +.tabulator-row.tabulator-group.tabulator-group-level-1 { + padding-left: 30px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-2 { + padding-left: 50px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-3 { + padding-left: 70px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-4 { + padding-left: 90px; +} + +.tabulator-row.tabulator-group.tabulator-group-level-5 { + padding-left: 110px; +} + +.tabulator-row.tabulator-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3FB449; + vertical-align: middle; +} + +.tabulator-row.tabulator-group span { + margin-left: 10px; + color: #3FB449; +} + +.tabulator-menu { + position: absolute; + display: inline-block; + box-sizing: border-box; + background: #fff; + border: 1px solid #aaa; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2); + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-menu .tabulator-menu-item { + position: relative; + box-sizing: border-box; + padding: 5px 10px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled { + opacity: .5; +} + +.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { + cursor: pointer; + background: #EFEFEF; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu { + padding-right: 25px; +} + +.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after { + display: inline-block; + position: absolute; + top: calc(5px + .4em); + right: 10px; + height: 7px; + width: 7px; + content: ''; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #aaa; + vertical-align: top; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.tabulator-menu .tabulator-menu-separator { + border-top: 1px solid #aaa; +} + +.tabulator-edit-select-list { + position: absolute; + display: inline-block; + box-sizing: border-box; + max-height: 200px; + background: #fff; + border: 1px solid #aaa; + font-size: 14px; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 10000; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item { + padding: 4px; + color: #333; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active { + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused { + outline: 1px solid rgba(255, 255, 255, 0.5); +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item.focused { + outline: 1px solid #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-notice { + padding: 4px; + color: #333; + text-align: center; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #aaa; + padding: 4px; + padding-top: 6px; + color: #333; + font-weight: bold; +} + +.tabulator.tabulator-ltr { + direction: ltr; +} + +.tabulator.tabulator-rtl { + text-align: initial; + direction: rtl; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col { + text-align: initial; + border-left: 1px solid #aaa; + border-right: initial; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + margin-right: initial; + margin-left: -1px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 0; + padding-left: 25px; +} + +.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + left: 8px; + right: initial; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { + border-right: initial; + border-left: 1px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { + margin-right: initial; + margin-left: 5px; + border-bottom-left-radius: initial; + border-bottom-right-radius: 1px; + border-left: initial; + border-right: 2px solid #aaa; +} + +.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { + margin-right: initial; + margin-left: 5px; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle { + position: absolute; + left: 0; + right: auto; +} + +.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { + right: 0; + left: auto; +} + +.tabulator-print-fullscreen { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10000; +} + +body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { + display: none !important; +} + +.tabulator-print-table { + border-collapse: collapse; +} + +.tabulator-print-table .tabulator-print-table-group { + box-sizing: border-box; + border-right: 1px solid #aaa; + border-top: 1px solid #000; + border-bottom: 2px solid #3FB449; + padding: 5px; + padding-left: 10px; + background: #222; + color: #fff; + font-weight: bold; + min-width: 100%; +} + +.tabulator-print-table .tabulator-print-table-group:hover { + cursor: pointer; + background-color: #090909; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3FB449; + border-bottom: 0; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td { + padding-left: 30px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td { + padding-left: 50px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td { + padding-left: 70px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td { + padding-left: 90px !important; +} + +.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td { + padding-left: 110px !important; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle { + display: inline-block; +} + +.tabulator-print-table .tabulator-print-table-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3FB449; + vertical-align: middle; +} + +.tabulator-print-table .tabulator-print-table-group span { + margin-left: 10px; + color: #3FB449; +} + +.tabulator-print-table .tabulator-data-tree-branch { + display: inline-block; + vertical-align: middle; + height: 9px; + width: 7px; + margin-top: -9px; + margin-right: 5px; + border-bottom-left-radius: 1px; + border-left: 2px solid #aaa; + border-bottom: 2px solid #aaa; +} + +.tabulator-print-table .tabulator-data-tree-control { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-pack: center; + justify-content: center; + -ms-flex-align: center; + align-items: center; + vertical-align: middle; + height: 11px; + width: 11px; + margin-right: 5px; + border: 1px solid #333; + border-radius: 2px; + background: rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.tabulator-print-table .tabulator-data-tree-control:hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: transparent; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand { + display: inline-block; + position: relative; + height: 7px; + width: 1px; + background: #333; +} + +.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + height: 1px; + width: 7px; + background: #333; +} diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css b/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css new file mode 100644 index 0000000..79e079b --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:3px solid #3fb449;background-color:#222;color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background-color:#222;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3fb449;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #3fb449;color:#3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid #3fb449;background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator label{color:#fff}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3fb449}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#3fb449}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3fb449}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{position:relative;box-sizing:border-box;padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{display:inline-block;position:absolute;top:calc(5px + .4em);right:10px;height:7px;width:7px;content:"";border-width:1px 1px 0 0;border-style:solid;border-color:#aaa;vertical-align:top;transform:rotate(45deg)}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:#090909}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#3fb449}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css.map b/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css.map new file mode 100644 index 0000000..8984434 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/css/tabulator_site.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAiiBxB,AAhjBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,oFAiCK,iBAAkB,CAClB,AAlCL,kCAyCE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA1CF,6BA8CE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCAhF2B,AAiF3B,sBApFyB,AAqFzB,WApFmB,AAqFnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAmRpB,AAjVF,qDAiEG,YAAY,CACZ,AAlEH,4CAsEG,qBAAoB,AAEpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAxGoB,AAyGpB,sBA3GwB,AA4GxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAqNhB,AAnSH,6DAiFI,kBAAkB,AAClB,yBA/GyB,AAgHzB,mBAA8C,AAC9C,mBAAoB,CACpB,AArFJ,mEAyFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CA8DX,AAzJJ,iGA+FK,aAAc,CAMd,AArGL,uGAkGM,eAAe,AACf,UAAW,CACX,AApGN,+FAyGK,iBAAkB,CAClB,AA1GL,wFA8GK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAiBrB,AArIL,gHAwHM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAhIN,8IAmIM,uBAAuB,CACvB,AApIN,yFAyIK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AAxJL,0GAkJM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9KkB,CA+KlB,AAvJN,0FAgKK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAjMkB,AAkMlB,gBAAgB,AAEhB,iBAAiB,CACjB,AAvKL,0FA6KK,YAAa,CACb,AA9KL,qEAmLI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAxMJ,8EA2LK,qBAAsB,CACtB,AA5LL,yEA+LK,cAAe,CACf,AAhML,sFAoMM,QAAS,AACT,QAAS,CACT,AAtMN,oFA6MK,kBAAkB,CAClB,AA9ML,qEAiNK,eAAc,AACd,wBAAoD,CACpD,AAnNL,4HAuNM,UA/OkB,CAqPlB,AA7NN,6IA0NO,gBAAgB,AAChB,4BAnPiB,CAoPjB,AA5NP,2HAkOM,aA3PmB,CAkQnB,AAzON,4IAqOO,gBAAgB,AAChB,+BA/PkB,CAiQlB,AAxOP,4HA8OM,aAvQmB,CA8QnB,AArPN,6IAiPO,mBAAmB,AACnB,6BA3QkB,AA4QlB,aA5QkB,CA6QlB,AApPP,+GA4PM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAlQN,oHAuQM,wBAAyB,CACzB,AAxQN,2GA6QM,gBAAe,AACf,gBAAgB,CAChB,AA/QN,uIAmRO,gBAAe,AACf,mBAAmB,CACnB,AArRP,4GA0RM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AA/RN,+CAsSG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AApTH,qEA8SI,2BAjUgB,CAkUhB,AA/SJ,sEAkTI,0BArUgB,CAsUhB,AAnTJ,qDAuTG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BAvViB,AA0VjB,eAAgB,CAChB,AAxUH,oEA6TI,4BAA0D,CAK1D,AAlUJ,iGAgUK,YAAa,CACb,AAjUL,2DA2UG,cAAc,CAKd,AAhVH,iEA8UI,YAAa,CACb,AA/UJ,kCAqVE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAgDjC,AAzYF,wCA4VG,YAAa,CACb,AA7VH,yDAiWG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AAtXH,wFAsWI,gBAAe,AACf,cAAc,CACd,AAxWJ,8DA6WI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA/YyB,AAgZzB,gBAAiB,AACjB,cAAe,CACf,AArXJ,mDA0XG,kBAAiB,AACjB,qBAAoB,AACpB,sBAjZqB,AAkZrB,mBAAmB,AACnB,iBAAgB,AAChB,UAjZe,CA0Zf,AAxYH,kFAmYK,gBAAiB,AACjB,6BAA0D,AAC1D,UApagB,CAqahB,AAtYL,6BA8YE,iBAAgB,AAChB,gBAAe,AACf,6BArZ2B,AAsZ3B,sBAzZyB,AA0ZzB,iBAAgB,AAChB,WA1ZmB,AA2ZnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AAlfF,qDA8ZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BAnciB,AAqcjB,eAAgB,CAMhB,AAxbH,oEAuaI,6BAA0D,AAC1D,oBAAiC,CAKjC,AA7aJ,iGA2aK,YAAa,CACb,AA5aL,gEAqbI,mBAAkB,AAClB,kBAAkB,CAClB,AAvbJ,wDA6bI,UAAU,CACV,AA9bJ,kDAmcG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9coB,AA+cpB,iBAAiB,CACjB,AA1cH,8CA8cG,YAAY,CACZ,AA/cH,6CAmdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9doB,AA+dpB,kBAAiB,AAEjB,gBAAe,AAEf,WApekB,AAqelB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAjfH,oDAmeI,aAxeyB,CAyezB,AApeJ,sDAueI,UAAU,CACV,AAxeJ,kEA4eK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA/eL,wCAsfE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AApgBF,6CA6fG,OAAM,AACN,UAAU,CACV,AA/fH,8CAkgBG,gBAAgB,CAChB,AAngBH,6BAygBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA/iBF,mDAwhBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA9iBH,qEAqiBI,sBAAqB,AACrB,UAAU,CACV,AAviBJ,mEA2iBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBA5kBuB,CA87BvB,AAtXD,kCAQE,wBA/kB4B,CAglB5B,AATF,0CAYE,sBAhlBsB,AAilBtB,cAAe,CACf,AAdF,kCAiBE,wBAnlB6B,CAolB7B,AAlBF,wCAqBE,yBAtlBkC,AAulBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BAvmBkB,AAwmBlB,6BAxmBkB,AA0mBlB,8BAA+B,AAC/B,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAzoBiB,CA0oBjB,AApEH,wDAuEG,0BA7oBiB,CA8oBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BAtpBkB,AAupBlB,4BAvpBkB,CA0qBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cA9qBW,CAyrBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAlrBkB,AAmrBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA4LtB,AA5SF,iDAoHG,yBAnrBkB,AAorBlB,aAAY,AAEZ,SAAU,CAMV,AA7HH,+GA0HI,WAAU,AACV,sBAAsB,CACtB,AA5HJ,yDAgIG,qBA9rBgB,CAqsBhB,AAvIH,+HAkII,WAAU,AACV,uBAAsB,AAEtB,UAnsBe,CAosBf,AAtIJ,6EA4II,YAAa,CACb,AA7IJ,oDAmJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAvKH,8EA6JI,SAAS,CAST,AAtKJ,wGAiKK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBAhvBoB,CAivBpB,AArKL,2DA0KG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA3vBiB,AA4vBjB,4BA5vBiB,CA6vBjB,AAvLH,4DA2LG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA1wBe,AA2wBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA5PH,kEA4MI,eAAc,AACd,yBAA4B,CAC5B,AA9MJ,kGAiNI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AApOJ,wGA0NK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAvyBa,CAwyBb,AAnOL,gGAuOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAlzBc,CA+zBd,AA1PJ,sGAgPK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA7zBa,CA8zBb,AAzPL,qEA+PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAt1BqB,AAu1BrB,gBAAgB,AAChB,eAAe,CAmBf,AAnSH,2EAmRI,UAAU,CACV,AApRJ,sHAwRK,eAAe,CACf,AAzRL,sOAiSI,YAAY,CACZ,AAlSJ,wDAsSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AA3SH,+BAgTE,sBAAqB,AACrB,4BAv3BkB,AAw3BlB,0BAAyB,AACzB,gCAn4B2B,AAo4B3B,YAAW,AACX,kBAAiB,AACjB,gBAz4ByB,AA04BzB,WAz4BmB,AA04BnB,gBAAgB,AAEhB,cAAe,CA0Df,AApXF,qCA6TG,eAAc,AACd,wBAAoD,CACpD,AA/TH,wEAmUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAl5BqB,AAm5BrB,eAAgB,CAChB,AAxUJ,uDA4UG,iBAAiB,CACjB,AA7UH,uDAgVG,iBAAiB,CACjB,AAjVH,uDAoVG,iBAAiB,CACjB,AArVH,uDAwVG,iBAAiB,CACjB,AAzVH,uDA4VG,kBAAkB,CAClB,AA7VH,uDAgWG,oBAAqB,CACrB,AAjWH,gDAqWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAx7BsB,AAy7BtB,qBAAqB,CACrB,AA9WH,oCAiXG,iBAAgB,AAChB,aAl8B0B,CAm8B1B,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBAr8BuB,AAs8BvB,sBAp8BmB,AAq8BnB,oCAAuC,AAEvC,eAv9Ba,AAy9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA8Cd,AA5DD,qCAiBE,kBAAiB,AACjB,sBAAqB,AAErB,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAiCjB,AAvDF,kEAyBG,UAAW,CACX,AA1BH,8EA6BG,eAAe,AACf,kBA79B2B,CA89B3B,AA/BH,iEAkCG,kBAAkB,CAoBlB,AAtDH,uEAqCI,qBAAqB,AACrB,kBAAkB,AAElB,qBAAqB,AACrB,WAAW,AACX,WAAW,AACX,UAAU,AAEV,WAAW,AAEX,yBAAyB,AACzB,mBAAmB,AACnB,kBA/+BgB,AAg/BhB,mBAAmB,AAEnB,uBAAwB,CACxB,AArDJ,0CA0DE,yBAx/BkB,CAy/BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBArgCuB,AAsgCvB,sBApgCmB,AAsgCnB,eAthCa,AAwhCb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UA/gCgB,CAqiChB,AA1CF,oEAuBG,WArhCqB,AAshCrB,kBA7gCkB,CAkhClB,AA7BH,4EA2BI,oCAzhCoB,CA0hCpB,AA5BJ,qEAgCG,yBArhCkB,CAshClB,AAjCH,mEAqCG,eAAc,AAEd,WAriCqB,AAsiCrB,kBA7hCkB,CA8hClB,AAzCH,+DA6CE,YAAW,AAEX,WA1iCgB,AA2iChB,iBAAkB,CAClB,AAjDF,8DAoDE,6BAhjCkB,AAkjClB,YAAW,AACX,gBAAe,AAEf,WApjCgB,AAqjChB,eAAgB,CAChB,AAMF,yBACC,aAAc,CACd,AAGD,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAplCoB,AAqlCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BAtmCiB,CA8nCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BAvnCgB,CAwnChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAOH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAsKzB,AAvKD,oDAKE,sBAAqB,AACrB,4BArqCkB,AAsqClB,0BAAyB,AACzB,gCAjrC2B,AAkrC3B,YAAW,AACX,kBAAiB,AACjB,gBAvrCyB,AAwrCzB,WAvrCmB,AAwrCnB,gBAAgB,AAEhB,cAAe,CAmEf,AAlFF,0DAkBG,eAAc,AACd,wBAAoD,CACpD,AApBH,6FAwBI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAhsCqB,AAisCrB,eAAgB,CAChB,AA7BJ,+EAkCI,2BAA4B,CAC5B,AAnCJ,+EAwCI,2BAA4B,CAC5B,AAzCJ,+EA8CI,2BAA4B,CAC5B,AA/CJ,+EAoDI,2BAA4B,CAC5B,AArDJ,+EA0DI,4BAA6B,CAC7B,AA3DJ,4EA8DG,oBAAqB,CACrB,AA/DH,qEAmEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA/uCsB,AAgvCtB,qBAAqB,CACrB,AA5EH,yDA+EG,iBAAgB,AAChB,aAzvC0B,CA0vC1B,AAjFH,mDAqFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA/vCkB,AAgwClB,4BAhwCkB,CAiwClB,AAlGF,oDAsGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA9wCgB,AA+wChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAtKF,0DAuHG,eAAc,AACd,yBAA4B,CAC5B,AAzHH,0FA4HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA/IH,gGAqII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3yCc,CA4yCd,AA9IJ,wFAkJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAtzCe,CAm0Cf,AArKH,8FA2JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAj0Cc,CAk0Cd","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.9.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#222 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#3FB449 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222 !default; //border to tabulator\r\n$footerTextColor:#222 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color\r\n$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tlabel{\r\n\t\t\t\tcolor:#fff;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\toutline:none;\r\n\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:$sortArrowActive;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\t\tposition:relative;\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-menu-item-submenu{\r\n\t\t\tpadding-right:25px;\r\n\r\n\t\t\t&::after {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\tposition: absolute;\r\n\r\n\t\t\t\ttop: calc(5px + .4em);\r\n\t\t\t\tright: 10px;\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tcontent: '';\r\n\r\n\t\t\t\tborder-width: 1px 1px 0 0;\r\n\t\t\t\tborder-style: solid;\r\n\t\t\t\tborder-color: $rowBorderColor;\r\n\t\t\t\tvertical-align: top;\r\n\r\n\t\t\t\ttransform: rotate(45deg);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.js b/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.js new file mode 100644 index 0000000..6914123 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.js @@ -0,0 +1,52 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +/* + * This file is part of the Tabulator package. + * + * (c) Oliver Folkerd + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ + * + */ + +(function (factory) { + "use strict"; + + if (typeof define === 'function' && define.amd) { + define(['jquery', 'tabulator', 'jquery-ui'], factory); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery'), require('tabulator'), require('jquery-ui')); + } else { + factory(jQuery, Tabulator); + } +})(function ($, Tabulator) { + + $.widget("ui.tabulator", { + _create: function _create() { + var options = Object.assign({}, this.options); + + delete options.create; + delete options.disabled; + + this.table = new Tabulator(this.element[0], options); + + //map tabulator functions to jquery wrapper + for (var key in Tabulator.prototype) { + if (typeof Tabulator.prototype[key] === "function" && key.charAt(0) !== "_") { + this[key] = this.table[key].bind(this.table); + } + } + }, + + _setOption: function _setOption(option, value) { + console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); + }, + + _destroy: function _destroy(option, value) { + this.table.destroy(); + } + }); +}); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.min.js b/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.min.js new file mode 100644 index 0000000..7443363 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/jquery_wrapper.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","tabulator","jquery-ui"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery"),require("tabulator"),require("jquery-ui")):e(jQuery,Tabulator)}(function(e,t){e.widget("ui.tabulator",{_create:function(){var e=Object.assign({},this.options);delete e.create,delete e.disabled,this.table=new t(this.element[0],e);for(var o in t.prototype)"function"==typeof t.prototype[o]&&"_"!==o.charAt(0)&&(this[o]=this.table[o].bind(this.table))},_setOption:function(e,t){console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated")},_destroy:function(e,t){this.table.destroy()}})}); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/accessor.js b/Sources/CustomControls/Table/control/dist/js/modules/accessor.js new file mode 100644 index 0000000..38968d5 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/accessor.js @@ -0,0 +1,93 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Accessor = function Accessor(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "download", "clipboard", "print", "htmlOutput"]; //list of accessor types +}; + +//initialize column accessor +Accessor.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + accessor; + + if (column.definition[key]) { + accessor = self.lookupAccessor(column.definition[key]); + + if (accessor) { + match = true; + + config[key] = { + accessor: accessor, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.accessor = config; + } +}; + +Accessor.prototype.lookupAccessor = function (value) { + var accessor = false; + + //set column accessor + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "string": + if (this.accessors[value]) { + accessor = this.accessors[value]; + } else { + console.warn("Accessor Error - No such accessor found, ignoring: ", value); + } + break; + + case "function": + accessor = value; + break; + } + + return accessor; +}; + +//apply accessor to row +Accessor.prototype.transformRow = function (row, type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + rowComponent = row.getComponent(); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(row.data || {}); + + this.table.columnManager.traverse(function (column) { + var value, accessor, params, colCompnent; + + if (column.modules.accessor) { + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if (accessor) { + value = column.getFieldValue(data); + + if (value != "undefined") { + colCompnent = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); + } + } + } + }); + + return data; +}, + +//default accessors +Accessor.prototype.accessors = {}; + +Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/accessor.min.js b/Sources/CustomControls/Table/control/dist/js/modules/accessor.min.js new file mode 100644 index 0000000..f9da2ca --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/accessor.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,t={};this.allowedTypes.forEach(function(r){var c,a="accessor"+(r.charAt(0).toUpperCase()+r.slice(1));o.definition[a]&&(c=e.lookupAccessor(o.definition[a]))&&(s=!0,t[a]={accessor:c,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=t)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),t=o.getComponent(),r=Tabulator.prototype.helpers.deepClone(o.data||{});return this.table.columnManager.traverse(function(o){var c,a,n,i;o.modules.accessor&&(a=o.modules.accessor[s]||o.modules.accessor.accessor||!1)&&"undefined"!=(c=o.getFieldValue(r))&&(i=o.getComponent(),n="function"==typeof a.params?a.params(c,r,e,i,t):a.params,o.setFieldValue(r,a.accessor(c,r,e,n,i,t)))}),r},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/ajax.js b/Sources/CustomControls/Table/control/dist/js/modules/ajax.js new file mode 100644 index 0000000..7c3d638 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/ajax.js @@ -0,0 +1,465 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Ajax = function Ajax(table) { + + this.table = table; //hold Tabulator object + this.config = false; //hold config object for ajax request + this.url = ""; //request URL + this.urlGenerator = false; + this.params = false; //request parameters + + this.loaderElement = this.createLoaderElement(); //loader message div + this.msgElement = this.createMsgElement(); //message element + this.loadingElement = false; + this.errorElement = false; + this.loaderPromise = false; + + this.progressiveLoad = false; + this.loading = false; + + this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request +}; + +//initialize setup options +Ajax.prototype.initialize = function () { + var template; + + this.loaderElement.appendChild(this.msgElement); + + if (this.table.options.ajaxLoaderLoading) { + if (typeof this.table.options.ajaxLoaderLoading == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderLoading.trim(); + this.loadingElement = template.content.firstChild; + } else { + this.loadingElement = this.table.options.ajaxLoaderLoading; + } + } + + this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; + + this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; + + if (this.table.options.ajaxLoaderError) { + if (typeof this.table.options.ajaxLoaderError == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderError.trim(); + this.errorElement = template.content.firstChild; + } else { + this.errorElement = this.table.options.ajaxLoaderError; + } + } + + if (this.table.options.ajaxParams) { + this.setParams(this.table.options.ajaxParams); + } + + if (this.table.options.ajaxConfig) { + this.setConfig(this.table.options.ajaxConfig); + } + + if (this.table.options.ajaxURL) { + this.setUrl(this.table.options.ajaxURL); + } + + if (this.table.options.ajaxProgressiveLoad) { + if (this.table.options.pagination) { + this.progressiveLoad = false; + console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); + } else { + if (this.table.modExists("page")) { + this.progressiveLoad = this.table.options.ajaxProgressiveLoad; + this.table.modules.page.initializeProgressive(this.progressiveLoad); + } else { + console.error("Pagination plugin is required for progressive ajax loading"); + } + } + } +}; + +Ajax.prototype.createLoaderElement = function () { + var el = document.createElement("div"); + el.classList.add("tabulator-loader"); + return el; +}; + +Ajax.prototype.createMsgElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-loader-msg"); + el.setAttribute("role", "alert"); + + return el; +}; + +//set ajax params +Ajax.prototype.setParams = function (params, update) { + if (update) { + this.params = this.params || {}; + + for (var key in params) { + this.params[key] = params[key]; + } + } else { + this.params = params; + } +}; + +Ajax.prototype.getParams = function () { + return this.params || {}; +}; + +//load config object +Ajax.prototype.setConfig = function (config) { + this._loadDefaultConfig(); + + if (typeof config == "string") { + this.config.method = config; + } else { + for (var key in config) { + this.config[key] = config[key]; + } + } +}; + +//create config object from default +Ajax.prototype._loadDefaultConfig = function (force) { + var self = this; + if (!self.config || force) { + + self.config = {}; + + //load base config from defaults + for (var key in self.defaultConfig) { + self.config[key] = self.defaultConfig[key]; + } + } +}; + +//set request url +Ajax.prototype.setUrl = function (url) { + this.url = url; +}; + +//get request url +Ajax.prototype.getUrl = function () { + return this.url; +}; + +//lstandard loading function +Ajax.prototype.loadData = function (inPosition, columnsChanged) { + var self = this; + + if (this.progressiveLoad) { + return this._loadDataProgressive(); + } else { + return this._loadDataStandard(inPosition, columnsChanged); + } +}; + +Ajax.prototype.nextPage = function (diff) { + var margin; + + if (!this.loading) { + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; + + if (diff < margin) { + this.table.modules.page.nextPage().then(function () {}).catch(function () {}); + } + } +}; + +Ajax.prototype.blockActiveRequest = function () { + this.requestOrder++; +}; + +Ajax.prototype._loadDataProgressive = function () { + this.table.rowManager.setData([]); + return this.table.modules.page.setPage(1); +}; + +Ajax.prototype._loadDataStandard = function (inPosition, columnsChanged) { + var _this = this; + + return new Promise(function (resolve, reject) { + _this.sendRequest(inPosition).then(function (data) { + _this.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { + resolve(); + }).catch(function (e) { + reject(e); + }); + }).catch(function (e) { + reject(e); + }); + }); +}; + +Ajax.prototype.generateParamsList = function (data, prefix) { + var self = this, + output = []; + + prefix = prefix || ""; + + if (Array.isArray(data)) { + data.forEach(function (item, i) { + output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); + }); + } else if ((typeof data === "undefined" ? "undefined" : _typeof(data)) === "object") { + for (var key in data) { + output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); + } + } else { + output.push({ key: prefix, value: data }); + } + + return output; +}; + +Ajax.prototype.serializeParams = function (params) { + var output = this.generateParamsList(params), + encoded = []; + + output.forEach(function (item) { + encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); + }); + + return encoded.join("&"); +}; + +//send ajax request +Ajax.prototype.sendRequest = function (silent) { + var _this2 = this; + + var self = this, + url = self.url, + requestNo, + esc, + query; + + self.requestOrder++; + requestNo = self.requestOrder; + + self._loadDefaultConfig(); + + return new Promise(function (resolve, reject) { + if (self.table.options.ajaxRequesting.call(_this2.table, self.url, self.params) !== false) { + + self.loading = true; + + if (!silent) { + self.showLoader(); + } + + _this2.loaderPromise(url, self.config, self.params).then(function (data) { + if (requestNo === self.requestOrder) { + if (self.table.options.ajaxResponse) { + data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); + } + resolve(data); + + self.hideLoader(); + self.loading = false; + } else { + console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); + } + }).catch(function (error) { + console.error("Ajax Load Error: ", error); + self.table.options.ajaxError.call(self.table, error); + + self.showError(); + + setTimeout(function () { + self.hideLoader(); + }, 3000); + + self.loading = false; + + reject(error); + }); + } else { + reject(); + } + }); +}; + +Ajax.prototype.showLoader = function () { + var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; + + if (shouldLoad) { + + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-error"); + this.msgElement.classList.add("tabulator-loading"); + + if (this.loadingElement) { + this.msgElement.appendChild(this.loadingElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); + } + + this.table.element.appendChild(this.loaderElement); + } +}; + +Ajax.prototype.showError = function () { + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-loading"); + this.msgElement.classList.add("tabulator-error"); + + if (this.errorElement) { + this.msgElement.appendChild(this.errorElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); + } + + this.table.element.appendChild(this.loaderElement); +}; + +Ajax.prototype.hideLoader = function () { + if (this.loaderElement.parentNode) { + this.loaderElement.parentNode.removeChild(this.loaderElement); + } +}; + +//default ajax config object +Ajax.prototype.defaultConfig = { + method: "GET" +}; + +Ajax.prototype.defaultURLGenerator = function (url, config, params) { + + if (url) { + if (params && Object.keys(params).length) { + if (!config.method || config.method.toLowerCase() == "get") { + config.method = "get"; + + url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params); + } + } + } + + return url; +}; + +Ajax.prototype.defaultLoaderPromise = function (url, config, params) { + var self = this, + contentType; + + return new Promise(function (resolve, reject) { + + //set url + url = self.urlGenerator.call(self.table, url, config, params); + + //set body content if not GET request + if (config.method.toUpperCase() != "GET") { + contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; + if (contentType) { + + for (var key in contentType.headers) { + if (!config.headers) { + config.headers = {}; + } + + if (typeof config.headers[key] === "undefined") { + config.headers[key] = contentType.headers[key]; + } + } + + config.body = contentType.body.call(self, url, config, params); + } else { + console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); + } + } + + if (url) { + + //configure headers + if (typeof config.headers === "undefined") { + config.headers = {}; + } + + if (typeof config.headers.Accept === "undefined") { + config.headers.Accept = "application/json"; + } + + if (typeof config.headers["X-Requested-With"] === "undefined") { + config.headers["X-Requested-With"] = "XMLHttpRequest"; + } + + if (typeof config.mode === "undefined") { + config.mode = "cors"; + } + + if (config.mode == "cors") { + + if (typeof config.headers["Access-Control-Allow-Origin"] === "undefined") { + config.headers["Access-Control-Allow-Origin"] = window.location.origin; + } + + if (typeof config.credentials === "undefined") { + config.credentials = 'same-origin'; + } + } else { + if (typeof config.credentials === "undefined") { + config.credentials = 'include'; + } + } + + //send request + fetch(url, config).then(function (response) { + if (response.ok) { + response.json().then(function (data) { + resolve(data); + }).catch(function (error) { + reject(error); + console.warn("Ajax Load Error - Invalid JSON returned", error); + }); + } else { + console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); + reject(response); + } + }).catch(function (error) { + console.error("Ajax Load Error - Connection Error: ", error); + reject(error); + }); + } else { + console.warn("Ajax Load Error - No URL Set"); + resolve([]); + } + }); +}; + +Ajax.prototype.contentTypeFormatters = { + "json": { + headers: { + 'Content-Type': 'application/json' + }, + body: function body(url, config, params) { + return JSON.stringify(params); + } + }, + "form": { + headers: {}, + body: function body(url, config, params) { + var output = this.generateParamsList(params), + form = new FormData(); + + output.forEach(function (item) { + form.append(item.key, item.value); + }); + + return form; + } + } +}; + +Tabulator.prototype.registerModule("ajax", Ajax); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/ajax.min.js b/Sources/CustomControls/Table/control/dist/js/modules/ajax.min.js new file mode 100644 index 0000000..b88b4af --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/ajax.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "min": function min(values, data, calcParams) { + var output = null, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + values.forEach(function (value) { + + value = Number(value); + + if (value < output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "sum": function sum(values, data, calcParams) { + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + if (values.length) { + values.forEach(function (value) { + value = Number(value); + + output += !isNaN(value) ? Number(value) : 0; + }); + } + + return precision !== false ? output.toFixed(precision) : output; + }, + "concat": function concat(values, data, calcParams) { + var output = 0; + + if (values.length) { + output = values.reduce(function (sum, value) { + return String(sum) + String(value); + }); + } + + return output; + }, + "count": function count(values, data, calcParams) { + var output = 0; + + if (values.length) { + values.forEach(function (value) { + if (value) { + output++; + } + }); + } + + return output; + } +}; + +Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/calculation_colums.min.js b/Sources/CustomControls/Table/control/dist/js/modules/calculation_colums.min.js new file mode 100644 index 0000000..a0df133 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/calculation_colums.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(o){t.push(o.getComponent())}),t},CalcComponent.prototype.getCell=function(t){var o=this._row.getCell(t);return!!o&&o.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(o){t.recalcGroup(o)})}},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=this,e=[];return t.forEach(function(t){if(e.push(t.getData()),o.table.options.dataTree&&o.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var n=o.rowsToData(o.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(n)}}),e},ColumnCalcs.prototype.generateRow=function(t,o){var e,n=this,i=this.generateRowData(t,o);return n.table.modExists("mutator")&&n.table.modules.mutator.disable(),e=new Row(i,this,"calc"),n.table.modExists("mutator")&&n.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.component=!1,e.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},e.generateCells=function(){var o=[];n.table.columnManager.columnsByIndex.forEach(function(i){n.genColumn.setField(i.getField()),n.genColumn.hozAlign=i.hozAlign,i.definition[t+"CalcFormatter"]&&n.table.modExists("format")?n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter(i.definition[t+"CalcFormatter"]),params:i.definition[t+"CalcFormatterParams"]||{}}:n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter("plaintext"),params:{}},n.genColumn.definition.cssClass=i.definition.cssClass;var l=new Cell(n.genColumn,e);l.getElement(),l.column=i,l.setWidth(),i.cells.push(l),o.push(l),i.visible||l.hide()}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,n,i={},l="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return l.forEach(function(t){var l=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(o.forEach(function(o){l.push(t.getFieldValue(o))}),n=a+"Params",e="function"==typeof t.modules.columnCalcs[n]?t.modules.columnCalcs[n](l,o):t.modules.columnCalcs[n],t.setFieldValue(i,t.modules.columnCalcs[a](l,o,e)))}),i},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),n=t.getSubGroups(),i={};return n.forEach(function(t){i[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:i}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var n=0,i=void 0!==e.precision?e.precision:2;return t.length&&(n=t.reduce(function(t,o){return Number(t)+Number(o)}),n/=t.length,n=!1!==i?n.toFixed(i):n),parseFloat(n).toString()},max:function(t,o,e){var n=null,i=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>n||null===n)&&(n=t)}),null!==n?!1!==i?n.toFixed(i):n:""},min:function(t,o,e){var n=null,i=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))"),a.dataTreeExpandElement?"string"==typeof a.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=a.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(a.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return a.dataTreeStartExpanded};break;case"function":this.startOpen=a.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return a.dataTreeStartExpanded[t]}}},DataTree.prototype.initializeRow=function(e){var t=e.getData()[this.field],a=Array.isArray(t),n=a||!a&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!n&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:n}},DataTree.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,a),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?a.style.paddingRight=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,l;a.push(e),e instanceof Row&&(e.create(),r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){e.create(),a.push(e)})))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[],r=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach(function(e){r.push(e),t.getChildren(e).forEach(function(e){r.push(e)})})),r},DataTree.prototype.generateChildren=function(e){var t=this,a=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.create(),r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=t.startOpen(r.getComponent(),r.modules.dataTree.index)),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(e){var t,a=e.modules.dataTree,n=[];return a.children&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,t.forEach(function(e){e instanceof Row&&n.push(e)})),n},DataTree.prototype.rowDelete=function(e){var t,a=e.modules.dataTree.parent;a&&(t=this.findChildIndex(e,a),!1!==t&&a.data[this.field].splice(t,1),a.data[this.field].length||delete a.data[this.field],this.initializeRow(a),this.layoutRow(a)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(e,t,a,n){var r=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(r=this.findChildIndex(n,e))&&e.data[this.field].splice(a?r:r+1,0,t),!1===r&&(a?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(e,t){var a=this,n=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof Row?n=e.data:e instanceof RowComponent?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(n=t.modules.dataTree.children.find(function(t){return t instanceof Row&&t.element===e}))&&(n=n.data):n=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[a.table.options.index]==e}),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n},DataTree.prototype.getTreeChildren=function(e,t,a){var n=this,r=e.modules.dataTree,l=[];return r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(function(e){e instanceof Row&&(l.push(t?e.getComponent():e),a&&(l=l.concat(n.getTreeChildren(e,t,a))))})),l},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/download.js b/Sources/CustomControls/Table/control/dist/js/modules/download.js new file mode 100644 index 0000000..c9f57aa --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/download.js @@ -0,0 +1,433 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Download = function Download(table) { + this.table = table; //hold Tabulator object +}; + +//trigger file download +Download.prototype.download = function (type, filename, options, range, interceptCallback) { + var self = this, + downloadFunc = false; + + function buildLink(data, mime) { + if (interceptCallback) { + if (interceptCallback === true) { + self.triggerDownload(data, mime, type, filename, true); + } else { + interceptCallback(data); + } + } else { + self.triggerDownload(data, mime, type, filename); + } + } + + if (typeof type == "function") { + downloadFunc = type; + } else { + if (self.downloaders[type]) { + downloadFunc = self.downloaders[type]; + } else { + console.warn("Download Error - No such download type found: ", type); + } + } + + if (downloadFunc) { + var list = this.generateExportList(range); + + downloadFunc.call(this.table, list, options || {}, buildLink); + } +}; + +Download.prototype.generateExportList = function (range) { + var list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, "download"); + + //assign group header formatter + var groupHeader = this.table.options.groupHeaderDownload; + + if (groupHeader && !Array.isArray(groupHeader)) { + groupHeader = [groupHeader]; + } + + list.forEach(function (row) { + var group; + + if (row.type === "group") { + group = row.columns[0]; + + if (groupHeader && groupHeader[row.indent]) { + group.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + }); + + return list; +}; + +Download.prototype.triggerDownload = function (data, mime, type, filename, newTab) { + var element = document.createElement('a'), + blob = new Blob([data], { type: mime }), + filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); + + blob = this.table.options.downloadReady.call(this.table, data, blob); + + if (blob) { + + if (newTab) { + window.open(window.URL.createObjectURL(blob)); + } else { + if (navigator.msSaveOrOpenBlob) { + navigator.msSaveOrOpenBlob(blob, filename); + } else { + element.setAttribute('href', window.URL.createObjectURL(blob)); + + //set file title + element.setAttribute('download', filename); + + //trigger download + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + + //remove temporary link element + document.body.removeChild(element); + } + } + + if (this.table.options.downloadComplete) { + this.table.options.downloadComplete(); + } + } +}; + +Download.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "intercept": + this.download(data.type, "", data.options, data.active, data.intercept); + break; + } +}; + +//downloaders +Download.prototype.downloaders = { + csv: function csv(list, options, setFileContents) { + var delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents = [], + headers = []; + + list.forEach(function (row) { + var item = []; + + switch (row.type) { + case "group": + console.warn("Download Warning - CSV downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - CSV downloader cannot process column calculations"); + break; + + case "header": + row.columns.forEach(function (col, i) { + if (col && col.depth === 1) { + headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; + } + }); + break; + + case "row": + row.columns.forEach(function (col) { + + if (col) { + + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + item.push('"' + String(col.value).split('"').join('""') + '"'); + } + }); + + fileContents.push(item.join(delimiter)); + break; + } + }); + + if (headers.length) { + fileContents.unshift(headers.join(delimiter)); + } + + fileContents = fileContents.join("\n"); + + if (options.bom) { + fileContents = "\uFEFF" + fileContents; + } + + setFileContents(fileContents, "text/csv"); + }, + + json: function json(list, options, setFileContents) { + var fileContents = []; + + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + break; + + case "group": + console.warn("Download Warning - JSON downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - JSON downloader cannot process column calculations"); + break; + + case "row": + row.columns.forEach(function (col) { + if (col) { + item[col.component.getField()] = col.value; + } + }); + + fileContents.push(item); + break; + } + }); + + fileContents = JSON.stringify(fileContents, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf: function pdf(list, options, setFileContents) { + var header = [], + body = [], + autoTableParams = {}, + rowGroupStyles = options.rowGroupStyles || { + fontStyle: "bold", + fontSize: 12, + cellPadding: 6, + fillColor: 220 + }, + rowCalcStyles = options.rowCalcStyles || { + fontStyle: "bold", + fontSize: 10, + cellPadding: 4, + fillColor: 232 + }, + jsPDFParams = options.jsPDF || {}, + title = options && options.title ? options.title : ""; + + if (!jsPDFParams.orientation) { + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if (!jsPDFParams.unit) { + jsPDFParams.unit = "pt"; + } + + //parse row list + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + header.push(parseRow(row)); + break; + + case "group": + body.push(parseRow(row, rowGroupStyles)); + break; + + case "calc": + body.push(parseRow(row, rowCalcStyles)); + break; + + case "row": + body.push(parseRow(row)); + break; + } + }); + + function parseRow(row, styles) { + var rowData = []; + + row.columns.forEach(function (col) { + var cell; + + if (col) { + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + cell = { + content: col.value, + colSpan: col.width, + rowSpan: col.height + }; + + if (styles) { + cell.styles = styles; + } + + rowData.push(cell); + } else { + rowData.push(""); + } + }); + + return rowData; + } + + //configure PDF + var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables + + if (options && options.autoTable) { + if (typeof options.autoTable === "function") { + autoTableParams = options.autoTable(doc) || {}; + } else { + autoTableParams = options.autoTable; + } + } + + if (title) { + autoTableParams.addPageContent = function (data) { + doc.text(title, 40, 30); + }; + } + + autoTableParams.head = header; + autoTableParams.body = body; + + doc.autoTable(autoTableParams); + + if (options && options.documentProcessing) { + options.documentProcessing(doc); + } + + setFileContents(doc.output("arraybuffer"), "application/pdf"); + }, + + xlsx: function xlsx(list, options, setFileContents) { + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = XLSX.utils.book_new(), + output; + + workbook.SheetNames = []; + workbook.Sheets = {}; + + function generateSheet() { + var rows = [], + merges = [], + worksheet = {}, + range = { s: { c: 0, r: 0 }, e: { c: list[0] ? list[0].columns.reduce(function (a, b) { + return a + (b && b.width ? b.width : 1); + }, 0) : 0, r: list.length } }; + + //parse row list + list.forEach(function (row, i) { + var rowData = []; + + row.columns.forEach(function (col, j) { + + if (col) { + rowData.push(!(col.value instanceof Date) && _typeof(col.value) === "object" ? JSON.stringify(col.value) : col.value); + + if (col.width > 1 || col.height > -1) { + merges.push({ s: { r: i, c: j }, e: { r: i + col.height - 1, c: j + col.width - 1 } }); + } + } else { + rowData.push(""); + } + }); + + rows.push(rowData); + }); + + //convert rows to worksheet + XLSX.utils.sheet_add_aoa(worksheet, rows); + + worksheet['!ref'] = XLSX.utils.encode_range(range); + + if (merges.length) { + worksheet["!merges"] = merges; + } + + return worksheet; + } + + if (options.sheetOnly) { + setFileContents(generateSheet()); + return; + } + + if (options.sheets) { + for (var sheet in options.sheets) { + + if (options.sheets[sheet] === true) { + workbook.SheetNames.push(sheet); + workbook.Sheets[sheet] = generateSheet(); + } else { + + workbook.SheetNames.push(sheet); + + this.modules.comms.send(options.sheets[sheet], "download", "intercept", { + type: "xlsx", + options: { sheetOnly: true }, + active: self.active, + intercept: function intercept(data) { + workbook.Sheets[sheet] = data; + } + }); + } + } + } else { + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + if (options.documentProcessing) { + workbook = options.documentProcessing(workbook); + } + + //convert workbook to binary array + function s2ab(s) { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i = 0; i != s.length; ++i) { + view[i] = s.charCodeAt(i) & 0xFF; + }return buf; + } + + output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); + + setFileContents(s2ab(output), "application/octet-stream"); + }, + + html: function html(list, options, setFileContents) { + if (this.modExists("export", true)) { + setFileContents(this.modules.export.genereateHTMLTable(list), "text/html"); + } + } + +}; + +Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/download.min.js b/Sources/CustomControls/Table/control/dist/js/modules/download.min.js new file mode 100644 index 0000000..993f7e5 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/download.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Download=function(e){this.table=e};Download.prototype.download=function(e,o,t,n,a){function r(t,n){a?!0===a?i.triggerDownload(t,n,e,o,!0):a(t):i.triggerDownload(t,n,e,o)}var i=this,l=!1;if("function"==typeof e?l=e:i.downloaders[e]?l=i.downloaders[e]:console.warn("Download Error - No such download type found: ",e),l){var s=this.generateExportList(n);l.call(this.table,s,t||{},r)}},Download.prototype.generateExportList=function(e){var o=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),t=this.table.options.groupHeaderDownload;return t&&!Array.isArray(t)&&(t=[t]),o.forEach(function(e){var o;"group"===e.type&&(o=e.columns[0],t&&t[e.indent]&&(o.value=t[e.indent](o.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),o},Download.prototype.triggerDownload=function(e,o,t,n,a){var r=document.createElement("a"),i=new Blob([e],{type:o}),n=n||"Tabulator."+("function"==typeof t?"txt":t);(i=this.table.options.downloadReady.call(this.table,e,i))&&(a?window.open(window.URL.createObjectURL(i)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(i,n):(r.setAttribute("href",window.URL.createObjectURL(i)),r.setAttribute("download",n),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(e,o,t){switch(o){case"intercept":this.download(t.type,"",t.options,t.active,t.intercept)}},Download.prototype.downloaders={csv:function(e,o,t){var n=o&&o.delimiter?o.delimiter:",",a=[],r=[];e.forEach(function(e){var o=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,o){e&&1===e.depth&&(r[o]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}o.push('"'+String(e.value).split('"').join('""')+'"')}}),a.push(o.join(n))}}),r.length&&a.unshift(r.join(n)),a=a.join("\n"),o.bom&&(a="\ufeff"+a),t(a,"text/csv")},json:function(e,o,t){var n=[];e.forEach(function(e){var o={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(o[e.component.getField()]=e.value)}),n.push(o)}}),n=JSON.stringify(n,null,"\t"),t(n,"application/json")},pdf:function(e,o,t){function n(e,o){var t=[];return e.columns.forEach(function(e){var n;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}n={content:e.value,colSpan:e.width,rowSpan:e.height},o&&(n.styles=o),t.push(n)}else t.push("")}),t}var a=[],r=[],i={},l=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},s=o.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=o.jsPDF||{},u=o&&o.title?o.title:"";c.orientation||(c.orientation=o.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":a.push(n(e));break;case"group":r.push(n(e,l));break;case"calc":r.push(n(e,s));break;case"row":r.push(n(e))}});var d=new jsPDF(c);o&&o.autoTable&&(i="function"==typeof o.autoTable?o.autoTable(d)||{}:o.autoTable),u&&(i.addPageContent=function(e){d.text(u,40,30)}),i.head=a,i.body=r,d.autoTable(i),o&&o.documentProcessing&&o.documentProcessing(d),t(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,o,t){function n(){var o=[],t=[],n={},a={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,o){return e+(o&&o.width?o.width:1)},0):0,r:e.length}};return e.forEach(function(e,n){var a=[];e.columns.forEach(function(e,o){e?(a.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&t.push({s:{r:n,c:o},e:{r:n+e.height-1,c:o+e.width-1}})):a.push("")}),o.push(a)}),XLSX.utils.sheet_add_aoa(n,o),n["!ref"]=XLSX.utils.encode_range(a),t.length&&(n["!merges"]=t),n}var a,r=this,i=o.sheetName||"Sheet1",l=XLSX.utils.book_new();if(l.SheetNames=[],l.Sheets={},o.sheetOnly)return void t(n());if(o.sheets)for(var s in o.sheets)!0===o.sheets[s]?(l.SheetNames.push(s),l.Sheets[s]=n()):(l.SheetNames.push(s),this.modules.comms.send(o.sheets[s],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:r.active,intercept:function(e){l.Sheets[s]=e}}));else l.SheetNames.push(i),l.Sheets[i]=n();o.documentProcessing&&(l=o.documentProcessing(l)),a=XLSX.write(l,{bookType:"xlsx",bookSST:!0,type:"binary"}),t(function(e){for(var o=new ArrayBuffer(e.length),t=new Uint8Array(o),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return o}(a),"application/octet-stream")},html:function(e,o,t){this.modExists("export",!0)&&t(this.modules.export.genereateHTMLTable(e),"text/html")}},Tabulator.prototype.registerModule("download",Download); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/edit.js b/Sources/CustomControls/Table/control/dist/js/modules/edit.js new file mode 100644 index 0000000..2c68187 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/edit.js @@ -0,0 +1,2263 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Edit = function Edit(table) { + this.table = table; //hold Tabulator object + this.currentCell = false; //hold currently editing cell + this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening + this.recursionBlock = false; //prevent focus recursion + this.invalidEdit = false; + this.editedCells = []; +}; + +//initialize column editor +Edit.prototype.initializeColumn = function (column) { + var self = this, + config = { + editor: false, + blocked: false, + check: column.definition.editable, + params: column.definition.editorParams || {} + }; + + //set column editor + switch (_typeof(column.definition.editor)) { + case "string": + + if (column.definition.editor === "tick") { + column.definition.editor = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.editor]) { + config.editor = self.editors[column.definition.editor]; + } else { + console.warn("Editor Error - No such editor found: ", column.definition.editor); + } + break; + + case "function": + config.editor = column.definition.editor; + break; + + case "boolean": + + if (column.definition.editor === true) { + + if (typeof column.definition.formatter !== "function") { + + if (column.definition.formatter === "tick") { + column.definition.formatter = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.formatter]) { + config.editor = self.editors[column.definition.formatter]; + } else { + config.editor = self.editors["input"]; + } + } else { + console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); + } + } + break; + } + + if (config.editor) { + column.modules.edit = config; + } +}; + +Edit.prototype.getCurrentCell = function () { + return this.currentCell ? this.currentCell.getComponent() : false; +}; + +Edit.prototype.clearEditor = function (cancel) { + var cell = this.currentCell, + cellEl; + + this.invalidEdit = false; + + if (cell) { + this.currentCell = false; + + cellEl = cell.getElement(); + + if (cancel) { + cell.validate(); + } else { + cellEl.classList.remove("tabulator-validation-fail"); + } + + cellEl.classList.remove("tabulator-editing"); + while (cellEl.firstChild) { + cellEl.removeChild(cellEl.firstChild); + }cell.row.getElement().classList.remove("tabulator-row-editing"); + } +}; + +Edit.prototype.cancelEdit = function () { + + if (this.currentCell) { + var cell = this.currentCell; + var component = this.currentCell.getComponent(); + + this.clearEditor(true); + cell.setValueActual(cell.getValue()); + cell.cellRendered(); + + if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { + cell.row.normalizeHeight(true); + } + + if (cell.column.cellEvents.cellEditCancelled) { + cell.column.cellEvents.cellEditCancelled.call(this.table, component); + } + + this.table.options.cellEditCancelled.call(this.table, component); + } +}; + +//return a formatted value for a cell +Edit.prototype.bindEditor = function (cell) { + var self = this, + element = cell.getElement(true); + + element.setAttribute("tabindex", 0); + + element.addEventListener("click", function (e) { + if (!element.classList.contains("tabulator-editing")) { + element.focus({ preventScroll: true }); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.button === 2) { + e.preventDefault(); + } else { + self.mouseClick = true; + } + }); + + element.addEventListener("focus", function (e) { + if (!self.recursionBlock) { + self.edit(cell, e, false); + } + }); +}; + +Edit.prototype.focusCellNoEvent = function (cell, block) { + this.recursionBlock = true; + if (!(block && this.table.browser === "ie")) { + cell.getElement().focus({ preventScroll: true }); + } + this.recursionBlock = false; +}; + +Edit.prototype.editCell = function (cell, forceEdit) { + this.focusCellNoEvent(cell); + this.edit(cell, false, forceEdit); +}; + +Edit.prototype.focusScrollAdjust = function (cell) { + if (this.table.rowManager.getRenderMode() == "virtual") { + var topEdge = this.table.rowManager.element.scrollTop, + bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop, + rowEl = cell.row.getElement(), + offset = rowEl.offsetTop; + + if (rowEl.offsetTop < topEdge) { + this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop; + } else { + if (rowEl.offsetTop + rowEl.offsetHeight > bottomEdge) { + this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; + } + } + + var leftEdge = this.table.rowManager.element.scrollLeft, + rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, + cellEl = cell.getElement(), + offset = cellEl.offsetLeft; + + if (this.table.modExists("frozenColumns")) { + leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); + rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); + } + + if (cellEl.offsetLeft < leftEdge) { + this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; + } else { + if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { + this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; + } + } + } +}; + +Edit.prototype.edit = function (cell, e, forceEdit) { + var self = this, + allowEdit = true, + rendered = function rendered() {}, + element = cell.getElement(), + cellEditor, + component, + params; + + //prevent editing if another cell is refusing to leave focus (eg. validation fail) + if (this.currentCell) { + if (!this.invalidEdit) { + this.cancelEdit(); + } + return; + } + + //handle successfull value change + function success(value) { + if (self.currentCell === cell) { + var valid = true; + + if (cell.column.modules.validate && self.table.modExists("validate") && self.table.options.validationMode != "manual") { + valid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value); + } + + if (valid === true || self.table.options.validationMode === "highlight") { + self.clearEditor(); + + if (!cell.modules.edit) { + cell.modules.edit = {}; + } + + cell.modules.edit.edited = true; + + if (self.editedCells.indexOf(cell) == -1) { + self.editedCells.push(cell); + } + + cell.setValue(value, true); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + + if (valid !== true) { + element.classList.add("tabulator-validation-fail"); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + return false; + } + + return true; + } else { + self.invalidEdit = true; + element.classList.add("tabulator-validation-fail"); + self.focusCellNoEvent(cell, true); + rendered(); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + + return false; + } + } else { + // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); + } + } + + //handle aborted edit + function cancel() { + if (self.currentCell === cell) { + self.cancelEdit(); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + } else { + // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); + } + } + + function onRendered(callback) { + rendered = callback; + } + + if (!cell.column.modules.edit.blocked) { + if (e) { + e.stopPropagation(); + } + + switch (_typeof(cell.column.modules.edit.check)) { + case "function": + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + break; + + case "boolean": + allowEdit = cell.column.modules.edit.check; + break; + } + + if (allowEdit || forceEdit) { + + self.cancelEdit(); + + self.currentCell = cell; + + this.focusScrollAdjust(cell); + + component = cell.getComponent(); + + if (this.mouseClick) { + this.mouseClick = false; + + if (cell.column.cellEvents.cellClick) { + cell.column.cellEvents.cellClick.call(this.table, e, component); + } + } + + if (cell.column.cellEvents.cellEditing) { + cell.column.cellEvents.cellEditing.call(this.table, component); + } + + self.table.options.cellEditing.call(this.table, component); + + params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; + + cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); + + //if editor returned, add to DOM, if false, abort edit + if (cellEditor !== false) { + + if (cellEditor instanceof Node) { + element.classList.add("tabulator-editing"); + cell.row.getElement().classList.add("tabulator-row-editing"); + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.appendChild(cellEditor); + + //trigger onRendered Callback + rendered(); + + //prevent editing from triggering rowClick event + var children = element.children; + + for (var i = 0; i < children.length; i++) { + children[i].addEventListener("click", function (e) { + e.stopPropagation(); + }); + } + } else { + console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); + element.blur(); + return false; + } + } else { + element.blur(); + return false; + } + + return true; + } else { + this.mouseClick = false; + element.blur(); + return false; + } + } else { + this.mouseClick = false; + element.blur(); + return false; + } +}; + +Edit.prototype.maskInput = function (el, options) { + var mask = options.mask, + maskLetter = typeof options.maskLetterChar !== "undefined" ? options.maskLetterChar : "A", + maskNumber = typeof options.maskNumberChar !== "undefined" ? options.maskNumberChar : "9", + maskWildcard = typeof options.maskWildcardChar !== "undefined" ? options.maskWildcardChar : "*", + success = false; + + function fillSymbols(index) { + var symbol = mask[index]; + if (typeof symbol !== "undefined" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber) { + el.value = el.value + "" + symbol; + fillSymbols(index + 1); + } + } + + el.addEventListener("keydown", function (e) { + var index = el.value.length, + char = e.key; + + if (e.keyCode > 46) { + if (index >= mask.length) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } else { + switch (mask[index]) { + case maskLetter: + if (char.toUpperCase() == char.toLowerCase()) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskNumber: + if (isNaN(char)) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskWildcard: + break; + + default: + if (char !== mask[index]) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + } + } + + success = true; + } + + return; + }); + + el.addEventListener("keyup", function (e) { + if (e.keyCode > 46) { + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } + } + }); + + if (!el.placeholder) { + el.placeholder = mask; + } + + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } +}; + +Edit.prototype.getEditedCells = function () { + var output = []; + + this.editedCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; +}; + +Edit.prototype.clearEdited = function (cell) { + var editIndex; + + if (cell.modules.edit && cell.modules.edit.edited) { + cell.modules.edit.edited = false; + + if (cell.modules.validate) { + cell.modules.validate.invalid = false; + } + } + + editIndex = this.editedCells.indexOf(cell); + + if (editIndex > -1) { + this.editedCells.splice(editIndex, 1); + } +}; + +//default data editors +Edit.prototype.editors = { + + //input element + input: function input(cell, onRendered, success, cancel, editorParams) { + + //create and style input + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", editorParams.search ? "search" : "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof cellValue !== "undefined" ? cellValue : ""; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange(e) { + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + // case 9: + case 13: + onChange(e); + break; + + case 27: + cancel(); + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //resizable text area element + textarea: function textarea(cell, onRendered, success, cancel, editorParams) { + var self = this, + cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "hybrid", + value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""), + count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, + input = document.createElement("textarea"), + scrollHeight = 0; + + //create and style input + input.style.display = "block"; + input.style.padding = "2px"; + input.style.height = "100%"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.whiteSpace = "pre-wrap"; + input.style.resize = "none"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + input.scrollHeight; + input.style.height = input.scrollHeight + "px"; + cell.getRow().normalizeHeight(); + }); + + function onChange(e) { + + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + + setTimeout(function () { + cell.getRow().normalizeHeight(); + }, 300); + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + input.addEventListener("keyup", function () { + + input.style.height = ""; + + var heightNow = input.scrollHeight; + + input.style.height = heightNow + "px"; + + if (heightNow != scrollHeight) { + scrollHeight = heightNow; + cell.getRow().normalizeHeight(); + } + }); + + input.addEventListener("keydown", function (e) { + + switch (e.keyCode) { + case 27: + cancel(); + break; + + case 38: + //up arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + + break; + + case 40: + //down arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart !== input.value.length) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + number: function number(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + input = document.createElement("input"); + + input.setAttribute("type", "number"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + var blurFunc = function blurFunc(e) { + onChange(); + }; + + onRendered(function () { + //submit new value on blur + input.removeEventListener("blur", blurFunc); + + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + //submit new value on blur + input.addEventListener("blur", blurFunc); + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value !== cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + + case 38: //up arrow + case 40: + //down arrow + if (vertNav == "editor") { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + range: function range(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", "range"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value != cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur + input.addEventListener("blur", function (e) { + onChange(); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + } + }); + + return input; + }, + + //select + select: function select(cell, onRendered, success, cancel, editorParams) { + var _this = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], + input = document.createElement("input"), + listEl = document.createElement("div"), + multiselect = editorParams.multiselect, + dataItems = [], + currentItem = {}, + displayItems = [], + currentItems = [], + blurable = true, + blockListShow = false, + searchWord = "", + searchWordTimeout = null; + + if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === "undefined" ? "undefined" : _typeof(editorParams)) === "object" && !editorParams.values) { + console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); + editorParams = { values: editorParams }; + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + } else { + console.warn("unable to find matching column to create select lookup list:", field); + } + + return Object.keys(output); + } + + function parseItems(inputValues, curentValues) { + var dataList = []; + var displayList = []; + + function processComplexListItem(item) { + var item = { + label: item.label, + value: item.value, + itemParams: item.itemParams, + elementAttributes: item.elementAttributes, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + + return item; + } + + if (typeof inputValues == "function") { + inputValues = inputValues(cell); + } + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + var item; + + if ((typeof value === "undefined" ? "undefined" : _typeof(value)) === "object") { + + if (value.options) { + item = { + label: value.label, + group: true, + itemParams: value.itemParams, + elementAttributes: value.elementAttributes, + element: false + }; + + displayList.push(item); + + value.options.forEach(function (item) { + processComplexListItem(item); + }); + } else { + processComplexListItem(value); + } + } else { + + item = { + label: value, + value: value, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + }); + } else { + for (var key in inputValues) { + var item = { + label: inputValues[key], + value: key, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + } + + if (editorParams.sortValuesList) { + dataList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + displayList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + if (editorParams.sortValuesList !== "asc") { + dataList.reverse(); + displayList.reverse(); + } + } + + dataItems = dataList; + displayItems = displayList; + + fillList(); + } + + function fillList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }displayItems.forEach(function (item) { + + var el = item.element; + + if (!el) { + el = document.createElement("div"); + item.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label; + if (item.group) { + el.classList.add("tabulator-edit-select-list-group"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + } else { + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + + el.addEventListener("click", function () { + blockListShow = true; + + setTimeout(function () { + blockListShow = false; + }, 10); + + // setCurrentItem(item); + // chooseItem(); + if (multiselect) { + toggleItem(item); + input.focus(); + } else { + chooseItem(item); + } + }); + + // if(item === currentItem){ + // el.classList.add("active"); + // } + + if (currentItems.indexOf(item) > -1) { + el.classList.add("active"); + } + } + + if (item.elementAttributes && _typeof(item.elementAttributes) == "object") { + for (var key in item.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + el.setAttribute(key, input.getAttribute(key) + item.elementAttributes["+" + key]); + } else { + el.setAttribute(key, item.elementAttributes[key]); + } + } + } + el.addEventListener("mousedown", function () { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + } + + listEl.appendChild(el); + }); + } + + function setCurrentItem(item, active) { + + if (!multiselect && currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("focused"); + } + + currentItem = item; + + if (item.element) { + item.element.classList.add("focused"); + if (active) { + item.element.classList.add("active"); + } + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + // function chooseItem(){ + // hideList(); + + // if(initialValue !== currentItem.value){ + // initialValue = currentItem.value; + // success(currentItem.value); + // }else{ + // cancel(); + // } + // } + + function setItem(item) { + var index = currentItems.indexOf(item); + + if (index == -1) { + currentItems.push(item); + setCurrentItem(item, true); + } + + fillInput(); + } + + function unsetItem(index) { + var item = currentItems[index]; + + if (index > -1) { + currentItems.splice(index, 1); + if (item.element) { + item.element.classList.remove("active"); + } + } + } + + function toggleItem(item) { + if (!item) { + item = currentItem; + } + + var index = currentItems.indexOf(item); + + if (index > -1) { + unsetItem(index); + } else { + if (multiselect !== true && currentItems.length >= multiselect) { + unsetItem(0); + } + + setItem(item); + } + + fillInput(); + } + + function chooseItem(item) { + hideList(); + + if (!item) { + item = currentItem; + } + + if (item) { + input.value = item.label; + success(item.value); + } + + initialDisplayValue = input.value; + } + + function chooseItems(silent) { + if (!silent) { + hideList(); + } + + var output = []; + + currentItems.forEach(function (item) { + output.push(item.value); + }); + + initialDisplayValue = input.value; + + success(output); + } + + function fillInput() { + var output = []; + + currentItems.forEach(function (item) { + output.push(item.label); + }); + + input.value = output.join(", "); + + if (self.currentCell === false) { + chooseItems(true); + } + } + + function unsetItems() { + + var len = currentItems.length; + + for (var i = 0; i < len; i++) { + unsetItem(0); + } + } + + function cancelItem() { + hideList(); + cancel(); + } + + function showList() { + currentItems = []; + + if (!listEl.parentNode) { + if (editorParams.values === true) { + parseItems(getUniqueColumnValues(), initialDisplayValue); + } else if (typeof editorParams.values === "string") { + parseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue); + } else { + parseItems(editorParams.values || [], initialDisplayValue); + } + + var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + document.body.appendChild(listEl); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + function scrollTovalue(char) { + + clearTimeout(searchWordTimeout); + + var character = String.fromCharCode(event.keyCode).toLowerCase(); + searchWord += character.toLowerCase(); + + var match = dataItems.find(function (item) { + return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord); + }); + + if (match) { + setCurrentItem(match, !multiselect); + } + + searchWordTimeout = setTimeout(function () { + searchWord = ""; + }, 800); + } + + //style input + input.setAttribute("type", "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.cursor = "default"; + input.readOnly = this.currentCell != false; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof initialValue !== "undefined" || initialValue === null ? initialValue : ""; + + // if(editorParams.values === true){ + // parseItems(getUniqueColumnValues(), initialValue); + // }else if(typeof editorParams.values === "string"){ + // parseItems(getUniqueColumnValues(editorParams.values), initialValue); + // }else{ + // parseItems(editorParams.values || [], initialValue); + // } + + input.addEventListener("search", function (e) { + if (!input.value) { + unsetItems(); + chooseItems(); + } + }); + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(dataItems[index - 1], !multiselect); + } + } + break; + + case 40: + //down arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < dataItems.length - 1) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < dataItems.length - 1) { + if (index == -1) { + setCurrentItem(dataItems[0], !multiselect); + } else { + setCurrentItem(dataItems[index + 1], !multiselect); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + break; + + case 13: + //enter + // chooseItem(); + + if (multiselect) { + toggleItem(); + } else { + chooseItem(); + } + + break; + + case 27: + //escape + cancelItem(); + break; + + case 9: + //tab + break; + + default: + if (self.currentCell === false) { + e.preventDefault(); + } + + if (e.keyCode >= 38 && e.keyCode <= 90) { + scrollTovalue(e.keyCode); + } + } + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + if (multiselect) { + chooseItems(); + } else { + cancelItem(); + } + } + }); + + input.addEventListener("focus", function (e) { + if (!blockListShow) { + showList(); + } + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + setTimeout(function () { + _this.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + return input; + }, + + //autocomplete + autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { + var _this2 = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : "", + input = document.createElement("input"), + listEl = document.createElement("div"), + allItems = [], + displayItems = [], + values = [], + currentItem = false, + blurable = true, + uniqueColumnValues = false; + + //style input + input.setAttribute("type", "search"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style list element + listEl.classList.add("tabulator-edit-select-list"); + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + function genUniqueColumnValues() { + if (editorParams.values === true) { + uniqueColumnValues = getUniqueColumnValues(); + } else if (typeof editorParams.values === "string") { + uniqueColumnValues = getUniqueColumnValues(editorParams.values); + } + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + + if (editorParams.sortValuesList) { + if (editorParams.sortValuesList == "asc") { + output = Object.keys(output).sort(); + } else { + output = Object.keys(output).sort().reverse(); + } + } else { + output = Object.keys(output); + } + } else { + console.warn("unable to find matching column to create autocomplete lookup list:", field); + } + + return output; + } + + function filterList(term, intialLoad) { + var matches = [], + values, + items, + searchEl; + + //lookup base values list + if (uniqueColumnValues) { + values = uniqueColumnValues; + } else { + values = editorParams.values || []; + } + + if (editorParams.searchFunc) { + matches = editorParams.searchFunc(term, values); + + if (matches instanceof Promise) { + + addNotice(typeof editorParams.searchingPlaceholder !== "undefined" ? editorParams.searchingPlaceholder : "Searching..."); + + matches.then(function (result) { + fillListIfNotEmpty(parseItems(result), intialLoad); + }).catch(function (err) { + console.err("error in autocomplete search promise:", err); + }); + } else { + fillListIfNotEmpty(parseItems(matches), intialLoad); + } + } else { + items = parseItems(values); + + if (term === "") { + if (editorParams.showListOnEmpty) { + matches = items; + } + } else { + items.forEach(function (item) { + if (item.value !== null || typeof item.value !== "undefined") { + if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { + matches.push(item); + } + } + }); + } + + fillListIfNotEmpty(matches, intialLoad); + } + } + + function addNotice(notice) { + var searchEl = document.createElement("div"); + + clearList(); + + if (notice !== false) { + searchEl.classList.add("tabulator-edit-select-list-notice"); + searchEl.tabIndex = 0; + + if (notice instanceof Node) { + searchEl.appendChild(notice); + } else { + searchEl.innerHTML = notice; + } + + listEl.appendChild(searchEl); + } + } + + function parseItems(inputValues) { + var itemList = []; + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + + var item = {}; + + if ((typeof value === "undefined" ? "undefined" : _typeof(value)) === "object") { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label; + item.value = value.value; + } else { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value; + item.value = value; + } + + itemList.push(item); + }); + } else { + for (var key in inputValues) { + var item = { + title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], + value: key + }; + + itemList.push(item); + } + } + + return itemList; + } + + function clearList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + } + } + + function fillListIfNotEmpty(items, intialLoad) { + if (items.length) { + fillList(items, intialLoad); + } else { + if (editorParams.emptyPlaceholder) { + addNotice(editorParams.emptyPlaceholder); + } + } + } + + function fillList(items, intialLoad) { + var current = false; + + clearList(); + + displayItems = items; + + displayItems.forEach(function (item) { + var el = item.element; + + if (!el) { + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.title; + + el.addEventListener("click", function (e) { + setCurrentItem(item); + chooseItem(); + }); + + el.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + + if (intialLoad && item.value == initialValue) { + input.value = item.title; + item.element.classList.add("active"); + current = true; + } + + if (item === currentItem) { + item.element.classList.add("active"); + current = true; + } + } + + listEl.appendChild(el); + }); + + if (!current) { + setCurrentItem(false); + } + } + + function chooseItem() { + hideList(); + + if (currentItem) { + if (initialValue !== currentItem.value) { + initialValue = currentItem.value; + input.value = currentItem.title; + success(currentItem.value); + } else { + cancel(); + } + } else { + if (editorParams.freetext) { + initialValue = input.value; + success(input.value); + } else { + if (editorParams.allowEmpty && input.value === "") { + initialValue = input.value; + success(input.value); + } else { + cancel(); + } + } + } + } + + function showList() { + if (!listEl.parentNode) { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + document.body.appendChild(listEl); + } + } + + function setCurrentItem(item, showInputValue) { + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + currentItem = item; + + if (item && item.element) { + item.element.classList.add("active"); + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function cancelItem() { + hideList(); + cancel(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(displayItems[index - 1]); + } else { + setCurrentItem(false); + } + } + break; + + case 40: + //down arrow + + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < displayItems.length - 1) { + + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < displayItems.length - 1) { + if (index == -1) { + setCurrentItem(displayItems[0]); + } else { + setCurrentItem(displayItems[index + 1]); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + // e.preventDefault(); + break; + + case 13: + //enter + chooseItem(); + break; + + case 27: + //escape + cancelItem(); + break; + + case 36: //home + case 35: + //end + //prevent table navigation while using input element + e.stopImmediatePropagation(); + break; + } + }); + + input.addEventListener("keyup", function (e) { + + switch (e.keyCode) { + case 38: //up arrow + case 37: //left arrow + case 39: //up arrow + case 40: //right arrow + case 13: //enter + case 27: + //escape + break; + + default: + filterList(input.value); + } + }); + + input.addEventListener("search", function (e) { + filterList(input.value); + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + chooseItem(); + } + }); + + input.addEventListener("focus", function (e) { + var value = initialDisplayValue; + genUniqueColumnValues(); + showList(); + input.value = value; + filterList(value, true); + }); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + setTimeout(function () { + _this2.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + genUniqueColumnValues(); + input.value = initialDisplayValue; + filterList(initialDisplayValue, true); + + return input; + }, + + //star rating + star: function star(cell, onRendered, success, cancel, editorParams) { + var self = this, + element = cell.getElement(), + value = cell.getValue(), + maxStars = element.getElementsByTagName("svg").length || 5, + size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, + stars = [], + starsHolder = document.createElement("div"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + + //change star type + function starChange(val) { + stars.forEach(function (star, i) { + if (i < val) { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-active"); + } else { + star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); + } + + star.innerHTML = ''; + } else { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-inactive"); + } else { + star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); + } + + star.innerHTML = ''; + } + }); + } + + //build stars + function buildStar(i) { + + var starHolder = document.createElement("span"); + var nextStar = star.cloneNode(true); + + stars.push(nextStar); + + starHolder.addEventListener("mouseenter", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + starChange(i); + }); + + starHolder.addEventListener("mousemove", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + }); + + starHolder.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + success(i); + element.blur(); + }); + + starHolder.appendChild(nextStar); + starsHolder.appendChild(starHolder); + } + + //handle keyboard navigation value change + function changeValue(val) { + value = val; + starChange(val); + } + + //style cell + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + //style holding element + starsHolder.style.verticalAlign = "middle"; + starsHolder.style.display = "inline-block"; + starsHolder.style.padding = "4px"; + + //style star + star.setAttribute("width", size); + star.setAttribute("height", size); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + starsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + starsHolder.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //create correct number of stars + for (var i = 1; i <= maxStars; i++) { + buildStar(i); + } + + //ensure value does not exceed number of stars + value = Math.min(parseInt(value), maxStars); + + // set initial styling of stars + starChange(value); + + starsHolder.addEventListener("mousemove", function (e) { + starChange(0); + }); + + starsHolder.addEventListener("click", function (e) { + success(0); + }); + + element.addEventListener("blur", function (e) { + cancel(); + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + changeValue(value + 1); + break; + + case 37: + //left arrow + changeValue(value - 1); + break; + + case 13: + //enter + success(value); + break; + + case 27: + //escape + cancel(); + break; + } + }); + + return starsHolder; + }, + + //draggable progress bar + progress: function progress(cell, onRendered, success, cancel, editorParams) { + var element = cell.getElement(), + max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, + min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, + percent = (max - min) / 100, + value = cell.getValue() || 0, + handle = document.createElement("div"), + bar = document.createElement("div"), + mouseDrag, + mouseDragWidth; + + //set new value + function updateValue() { + var style = window.getComputedStyle(element, null); + + var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min; + success(calcVal); + element.setAttribute("aria-valuenow", calcVal); + element.setAttribute("aria-label", value); + } + + //style handle + handle.style.position = "absolute"; + handle.style.right = "0"; + handle.style.top = "0"; + handle.style.bottom = "0"; + handle.style.width = "5px"; + handle.classList.add("tabulator-progress-handle"); + + //style bar + bar.style.display = "inline-block"; + bar.style.position = "relative"; + // bar.style.top = "8px"; + // bar.style.bottom = "8px"; + // bar.style.left = "4px"; + // bar.style.marginRight = "4px"; + bar.style.height = "100%"; + bar.style.backgroundColor = "#488CE9"; + bar.style.maxWidth = "100%"; + bar.style.minWidth = "0%"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + bar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + bar.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style cell + element.style.padding = "4px 4px"; + + //make sure value is in range + value = Math.min(parseFloat(value), max); + value = Math.max(parseFloat(value), min); + + //workout percentage + value = Math.round((value - min) / percent); + // bar.style.right = value + "%"; + bar.style.width = value + "%"; + + element.setAttribute("aria-valuemin", min); + element.setAttribute("aria-valuemax", max); + + bar.appendChild(handle); + + handle.addEventListener("mousedown", function (e) { + mouseDrag = e.screenX; + mouseDragWidth = bar.offsetWidth; + }); + + handle.addEventListener("mouseover", function () { + handle.style.cursor = "ew-resize"; + }); + + element.addEventListener("mousemove", function (e) { + if (mouseDrag) { + bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; + } + }); + + element.addEventListener("mouseup", function (e) { + if (mouseDrag) { + e.stopPropagation(); + e.stopImmediatePropagation(); + + mouseDrag = false; + mouseDragWidth = false; + + updateValue(); + } + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + e.preventDefault(); + bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; + break; + + case 37: + //left arrow + e.preventDefault(); + bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; + break; + + case 9: //tab + case 13: + //enter + updateValue(); + break; + + case 27: + //escape + cancel(); + break; + + } + }); + + element.addEventListener("blur", function () { + cancel(); + }); + + return bar; + }, + + //checkbox + tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { + var value = cell.getValue(), + input = document.createElement("input"), + tristate = editorParams.tristate, + indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, + indetermState = false; + + input.setAttribute("type", "checkbox"); + input.style.marginTop = "5px"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { + indetermState = true; + input.indeterminate = true; + } + + if (this.table.browser != "firefox") { + //prevent blur issue on mac firefox + onRendered(function () { + input.focus({ preventScroll: true }); + }); + } + + input.checked = value === true || value === "true" || value === "True" || value === 1; + + onRendered(function () { + input.focus(); + }); + + function setValue(blur) { + if (tristate) { + if (!blur) { + if (input.checked && !indetermState) { + input.checked = false; + input.indeterminate = true; + indetermState = true; + return indetermValue; + } else { + indetermState = false; + return input.checked; + } + } else { + if (indetermState) { + return indetermValue; + } else { + return input.checked; + } + } + } else { + return input.checked; + } + } + + //submit new value on blur + input.addEventListener("change", function (e) { + success(setValue()); + }); + + input.addEventListener("blur", function (e) { + success(setValue(true)); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + if (e.keyCode == 13) { + success(setValue()); + } + if (e.keyCode == 27) { + cancel(); + } + }); + + return input; + } +}; + +Tabulator.prototype.registerModule("edit", Edit); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/edit.min.js b/Sources/CustomControls/Table/control/dist/js/modules/edit.min.js new file mode 100644 index 0000000..910b658 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/edit.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTopi&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),r.offsetLefta&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&"manual"!=u.table.options.validationMode&&(i=u.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===u.table.options.validationMode?(u.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==u.editedCells.indexOf(e)&&u.editedCells.push(e),e.setValue(t,!0),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0===i||(m.classList.add("tabulator-validation-fail"),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),c(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function o(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function a(e){c=e}var r,l,s,u=this,d=!0,c=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":d=e.column.modules.edit.check(e.getComponent());break;case"boolean":d=e.column.modules.edit.check}if(d||i){if(u.cancelEdit(),u.currentCell=e,this.focusScrollAdjust(e),l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,a,n,o,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),c();for(var f=m.children,p=0;p46){if(i>=n.length)return t.preventDefault(),t.stopPropagation(),l=!1,!1;switch(n[i]){case o:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case a:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case r:break;default:if(s!==n[i])return t.preventDefault(),t.stopPropagation(),l=!1,!1}l=!0}}),e.addEventListener("keyup",function(n){n.keyCode>46&&t.maskAutoFill&&i(e.value.length)}),e.placeholder||(e.placeholder=n),t.maskAutoFill&&i(e.value.length)},Edit.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},Edit.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},Edit.prototype.editors={input:function(e,t,i,n,o){function a(e){(null===r||void 0===r)&&""!==l.value||l.value!==r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",o.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("change",a),l.addEventListener("blur",a),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a(e);break;case 27:n();break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(l,o),l},textarea:function(e,t,i,n,o){function a(t){(null===r||void 0===r)&&""!==u.value||u.value!==r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=o.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),d=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),u.setAttribute(c,u.getAttribute(c)+o.elementAttributes["+"+c])):u.setAttribute(c,o.elementAttributes[c]);return u.value=s,t(function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",e.getRow().normalizeHeight()}),u.addEventListener("change",a),u.addEventListener("blur",a),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=d&&(d=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(u,o),u},number:function(e,t,i,n,o){function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!==r?i(e)&&(r=e):n()}var r=e.getValue(),l=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var u in o.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+o.elementAttributes["+"+u])):s.setAttribute(u,o.elementAttributes[u]);s.value=r;var d=function(e){a()};return t(function(){s.removeEventListener("blur",d),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",d)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(s,o),s},range:function(e,t,i,n,o){function a(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==o.max&&l.setAttribute("max",o.max),void 0!==o.min&&l.setAttribute("min",o.min),void 0!==o.step&&l.setAttribute("step",o.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=r,t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("blur",function(e){a()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n()}}),l},select:function(e,t,i,n,o){function a(t){var i,n={},o=A.table.getData();return i=t?A.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?o.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(n)}function r(t,i){function n(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&u(e),a.push(e),r.push(e),e}var a=[],r=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},r.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&u(t),a.push(t),r.push(t))});else for(var s in t){var d={label:t[s],value:s,element:!1};i.indexOf(d.value)>-1&&u(d),a.push(d),r.push(d)}o.sortValuesList&&(a.sort(function(e,t){return e.labelt.label?1:0}),r.sort(function(e,t){return e.labelt.label?1:0}),"asc"!==o.sortValuesList&&(a.reverse(),r.reverse())),N=a,M=r,l()}function l(){for(;I.firstChild;)I.removeChild(I.firstChild);M.forEach(function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",function(){j=!0,setTimeout(function(){j=!1},10),T?(c(t),P.focus()):m(t)}),V.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var n in t.elementAttributes)"+"==n.charAt(0)?(n=n.slice(1),i.setAttribute(n,P.getAttribute(n)+t.elementAttributes["+"+n])):i.setAttribute(n,t.elementAttributes[n]);i.addEventListener("mousedown",function(){O=!1,setTimeout(function(){O=!0},10)}),t.element=i}I.appendChild(i)})}function s(e,t){!T&&S&&S.element&&S.element.classList.remove("active"),S&&S.element&&S.element.classList.remove("focused"),S=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function u(e){-1==V.indexOf(e)&&(V.push(e),s(e,!0)),p()}function d(e){var t=V[e];e>-1&&(V.splice(e,1),t.element&&t.element.classList.remove("active"))}function c(e){e||(e=S);var t=V.indexOf(e);t>-1?d(t):(!0!==T&&V.length>=T&&d(0),u(e)),p()}function m(e){g(),e||(e=S),e&&(P.value=e.label,i(e.value)),x=P.value}function f(e){e||g();var t=[];V.forEach(function(e){t.push(e.value)}),x=P.value,i(t)}function p(){var e=[];V.forEach(function(t){e.push(t.label)}),P.value=e.join(", "),!1===A.currentCell&&f(!0)}function b(){for(var e=V.length,t=0;t0&&s(N[t-1],!T));break;case 40:t=N.indexOf(S),("editor"==w||"hybrid"==w&&t=38&&e.keyCode<=90&&E(e.keyCode)}}),P.addEventListener("blur",function(e){O&&(T?f():v())}),P.addEventListener("focus",function(e){j||h()}),I=document.createElement("div"),I.classList.add("tabulator-edit-select-list"),t(function(){P.style.height="100%",P.focus({preventScroll:!0})}),setTimeout(function(){k.table.rowManager.element.addEventListener("scroll",v)},10),P},autocomplete:function(e,t,i,n,o){function a(){!0===o.values?N=r():"string"==typeof o.values&&(N=r(o.values))}function r(t){var i,n={},a=E.table.getData();return i=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",t),n}function l(e,t){var i,n,a=[];i=N||(o.values||[]),o.searchFunc?(a=o.searchFunc(e,i),a instanceof Promise?(s(void 0!==o.searchingPlaceholder?o.searchingPlaceholder:"Searching..."),a.then(function(e){c(u(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):c(u(a),t)):(n=u(i),""===e?o.showListOnEmpty&&(a=n):n.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&a.push(t)}),c(a,t))}function s(e){var t=document.createElement("div");d(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,x.appendChild(t))}function u(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var i={};"object"===(void 0===e?"undefined":_typeof(e))?(i.title=o.listItemFormatter?o.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=o.listItemFormatter?o.listItemFormatter(e,e):e,i.value=e),t.push(i)});else for(var i in e){var n={title:o.listItemFormatter?o.listItemFormatter(i,e[i]):e[i],value:i};t.push(n)}return t}function d(){for(;x.firstChild;)x.removeChild(x.firstChild)}function c(e,t){e.length?m(e,t):o.emptyPlaceholder&&s(o.emptyPlaceholder)}function m(e,t){var i=!1;d(),P=e,P.forEach(function(e){var n=e.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",function(t){b(e),f()}),n.addEventListener("mousedown",function(e){T=!1,setTimeout(function(){T=!0},10)}),e.element=n,t&&e.value==A&&(w.value=e.title,e.element.classList.add("active"),i=!0),e===I&&(e.element.classList.add("active"),i=!0)),x.appendChild(n)}),i||b(!1)}function f(){v(),I?A!==I.value?(A=I.value,w.value=I.title,i(I.value)):n():o.freetext?(A=w.value,i(w.value)):o.allowEmpty&&""===w.value?(A=w.value,i(w.value)):n()}function p(){if(!x.parentNode){for(;x.firstChild;)x.removeChild(x.firstChild);var e=Tabulator.prototype.helpers.elOffset(k);x.style.minWidth=k.offsetWidth+"px",x.style.top=e.top+k.offsetHeight+"px",x.style.left=e.left+"px",document.body.appendChild(x)}}function b(e,t){I&&I.element&&I.element.classList.remove("active"),I=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function v(){x.parentNode&&x.parentNode.removeChild(x),g()}function h(){v(),n()}function g(){E.table.rowManager.element.removeEventListener("scroll",h)}var y=this,E=this,k=e.getElement(),A=e.getValue(),C=o.verticalNavigation||"editor",L=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:"",w=document.createElement("input"),x=document.createElement("div"),P=[],I=!1,T=!0,N=!1;if(w.setAttribute("type","search"),w.style.padding="4px",w.style.width="100%",w.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var S in o.elementAttributes)"+"==S.charAt(0)?(S=S.slice(1),w.setAttribute(S,w.getAttribute(S)+o.elementAttributes["+"+S])):w.setAttribute(S,o.elementAttributes[S]);return x.classList.add("tabulator-edit-select-list"),x.addEventListener("mousedown",function(e){T=!1,setTimeout(function(){T=!0},10)}),w.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),b(t>0?P[t-1]:!1));break;case 40:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function r(e){u=e,a(e)}var l=this,s=e.getElement(),u=e.getValue(),d=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),p=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",p.setAttribute("width",c),p.setAttribute("height",c),p.setAttribute("viewBox","0 0 512 512"),p.setAttribute("xml:space","preserve"),p.style.padding="0 1px",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),f.setAttribute(b,f.getAttribute(b)+o.elementAttributes["+"+b])):f.setAttribute(b,o.elementAttributes[b]);for(var v=1;v<=d;v++)!function(e){var t=document.createElement("span"),n=p.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),a(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),s.blur()}),t.appendChild(n),f.appendChild(t)}(v);return u=Math.min(parseInt(u),d),a(u),f.addEventListener("mousemove",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=window.getComputedStyle(s,null),t=c*Math.round(p.offsetWidth/((s.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+d;i(t),s.setAttribute("aria-valuenow",t),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,d=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(u-d)/100,m=e.getValue()||0,f=document.createElement("div"),p=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),p.setAttribute(b,p.getAttribute(b)+o.elementAttributes["+"+b])):p.setAttribute(b,o.elementAttributes[b]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),d),m=Math.round((m-d)/c),p.style.width=m+"%",s.setAttribute("aria-valuemin",d),s.setAttribute("aria-valuemax",u),p.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=p.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(p.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),p},tickCross:function(e,t,i,n,o){function a(e){return s?e?d?u:l.checked:l.checked&&!d?(l.checked=!1,l.indeterminate=!0,d=!0,u):(d=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=o.tristate,u=void 0===o.indeterminateValue?null:o.indeterminateValue,d=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+o.elementAttributes["+"+c])):l.setAttribute(c,o.elementAttributes[c]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(d=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus({preventScroll:!0})}),l.checked=!0===r||"true"===r||"True"===r||1===r,t(function(){l.focus()}),l.addEventListener("change",function(e){i(a())}),l.addEventListener("blur",function(e){i(a(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/export.js b/Sources/CustomControls/Table/control/dist/js/modules/export.js new file mode 100644 index 0000000..7c7e56c --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/export.js @@ -0,0 +1,614 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ExportRow = function ExportRow(type, columns, component, indent) { + this.type = type; + this.columns = columns; + this.component = component || false; + this.indent = indent || 0; +}; + +var ExportColumn = function ExportColumn(value, component, width, height, depth) { + this.value = value; + this.component = component || false; + this.width = width; + this.height = height; + this.depth = depth; +}; + +var Export = function Export(table) { + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; +}; + +Export.prototype.generateExportList = function (config, style, range, colVisProp) { + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : []; + var body = this.bodyToExportRows(this.rowLookup(range)); + + return headers.concat(body); +}; + +Export.prototype.genereateTable = function (config, style, range, colVisProp) { + var list = this.generateExportList(config, style, range, colVisProp); + + return this.genereateTableElement(list); +}; + +Export.prototype.rowLookup = function (range) { + var _this = this; + + var rows = []; + + if (typeof range == "function") { + range.call(this.table).forEach(function (row) { + row = _this.table.rowManager.findRow(row); + + if (row) { + rows.push(row); + } + }); + } else { + switch (range) { + case true: + case "visible": + rows = this.table.rowManager.getVisibleRows(true); + break; + + case "all": + rows = this.table.rowManager.rows; + break; + + case "selected": + rows = this.table.modules.selectRow.selectedRows; + break; + + case "active": + default: + if (this.table.options.pagination) { + rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); + } else { + rows = this.table.rowManager.getDisplayRows(); + } + } + } + + return Object.assign([], rows); +}; + +Export.prototype.generateColumnGroupHeaders = function () { + var _this2 = this; + + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach(function (column) { + var colData = _this2.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; +}; + +Export.prototype.processColumnGroup = function (column) { + var _this3 = this; + + var subGroups = column.columns, + maxDepth = 0, + title = column.definition["title" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title; + + var groupData = { + title: title, + column: column, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this3.processColumnGroup(subGroup); + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + + if (subGroupData.depth > maxDepth) { + maxDepth = subGroupData.depth; + } + } + }); + + groupData.depth += maxDepth; + + if (!groupData.width) { + return false; + } + } else { + if (this.columnVisCheck(column)) { + groupData.width = 1; + } else { + return false; + } + } + + return groupData; +}; + +Export.prototype.columnVisCheck = function (column) { + return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); +}; + +Export.prototype.headersToExportRows = function (columns) { + var headers = [], + headerDepth = 0, + exportRows = []; + + function parseColumnGroup(column, level) { + + var depth = headerDepth - level; + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + column.height = column.subGroups ? 1 : depth - column.depth + 1; + + headers[level].push(column); + + if (column.height > 1) { + for (var _i = 1; _i < column.height; _i++) { + + if (typeof headers[level + _i] === "undefined") { + headers[level + _i] = []; + } + + headers[level + _i].push(false); + } + } + + if (column.width > 1) { + for (var _i2 = 1; _i2 < column.width; _i2++) { + headers[level].push(false); + } + } + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } + } + + //calculate maximum header debth + columns.forEach(function (column) { + if (column.depth > headerDepth) { + headerDepth = column.depth; + } + }); + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + headers.forEach(function (header) { + var columns = []; + + header.forEach(function (col) { + if (col) { + columns.push(new ExportColumn(col.title, col.column.getComponent(), col.width, col.height, col.depth)); + } else { + columns.push(null); + } + }); + + exportRows.push(new ExportRow("header", columns)); + }); + + return exportRows; +}; + +Export.prototype.bodyToExportRows = function (rows) { + var _this4 = this; + + var columns = []; + var exportRows = []; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (_this4.columnVisCheck(column)) { + columns.push(column.getComponent()); + } + }); + + if (this.config.columnCalcs !== false && this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized) { + rows.unshift(this.table.modules.columnCalcs.topRow); + } + + if (this.table.modules.columnCalcs.botInitialized) { + rows.push(this.table.modules.columnCalcs.botRow); + } + } + + rows = rows.filter(function (row) { + switch (row.type) { + case "group": + return _this4.config.rowGroups !== false; + break; + + case "calc": + return _this4.config.columnCalcs !== false; + break; + + case "row": + return !(_this4.table.options.dataTree && _this4.config.dataTree === false && row.modules.dataTree.parent); + break; + } + + return true; + }); + + rows.forEach(function (row, i) { + var rowData = row.getData(_this4.colVisProp); + var exportCols = []; + var indent = 0; + + switch (row.type) { + case "group": + indent = row.level; + exportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1)); + break; + + case "calc": + case "row": + columns.forEach(function (col) { + exportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1)); + }); + + if (_this4.table.options.dataTree && _this4.config.dataTree !== false) { + indent = row.modules.dataTree.index; + } + break; + } + + exportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent)); + }); + + return exportRows; +}; + +Export.prototype.genereateTableElement = function (list) { + var _this5 = this; + + var table = document.createElement("table"), + headerEl = document.createElement("thead"), + bodyEl = document.createElement("tbody"), + styles = this.lookupTableStyles(), + rowFormatter = this.table.options["rowFormatter" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], + setup = {}; + + setup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter; + + if (this.table.options.dataTree && this.config.dataTree !== false && this.table.modExists("columnCalcs")) { + setup.treeElementField = this.table.modules.dataTree.elementField; + } + + //assign group header formatter + setup.groupHeader = this.table.options["groupHeader" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))]; + + if (setup.groupHeader && !Array.isArray(setup.groupHeader)) { + setup.groupHeader = [setup.groupHeader]; + } + + table.classList.add("tabulator-print-table"); + + this.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + if (list.length > 1000) { + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + list.forEach(function (row, i) { + switch (row.type) { + case "header": + headerEl.appendChild(_this5.genereateHeaderElement(row, setup, styles)); + break; + + case "group": + bodyEl.appendChild(_this5.genereateGroupElement(row, setup, styles)); + break; + + case "calc": + bodyEl.appendChild(_this5.genereateCalcElement(row, setup, styles)); + break; + + case "row": + var rowEl = _this5.genereateRowElement(row, setup, styles); + _this5.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + bodyEl.appendChild(rowEl); + break; + } + }); + + if (headerEl.innerHTML) { + table.appendChild(headerEl); + } + + table.appendChild(bodyEl); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + return table; +}; + +Export.prototype.lookupTableStyles = function () { + var styles = {}; + + //lookup row styles + if (this.cloneTableStyle && window.getComputedStyle) { + styles.oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + styles.evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + styles.calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + styles.firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + styles.firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (styles.firstRow) { + styles.styleCells = styles.firstRow.getElementsByClassName("tabulator-cell"); + styles.firstCell = styles.styleCells[0]; + styles.lastCell = styles.styleCells[styles.styleCells.length - 1]; + } + } + + return styles; +}; + +Export.prototype.genereateHeaderElement = function (row, setup, styles) { + var _this6 = this; + + var rowEl = document.createElement("tr"); + + row.columns.forEach(function (column) { + if (column) { + var cellEl = document.createElement("th"); + var classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(" ") : []; + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.value; + + if (_this6.cloneTableStyle) { + cellEl.style.boxSizing = "border-box"; + } + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + _this6.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this6.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if (column.component._column.visible) { + _this6.mapElementStyles(column.component.getElement(), cellEl, ["width"]); + } else { + if (column.component._column.definition.width) { + cellEl.style.width = column.component._column.definition.width + "px"; + } + } + + if (column.component._column.parent) { + _this6.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + } + }); + + return rowEl; +}; + +Export.prototype.genereateGroupElement = function (row, setup, styles) { + + var rowEl = document.createElement("tr"), + cellEl = document.createElement("td"), + group = row.columns[0]; + + rowEl.classList.add("tabulator-print-table-row"); + + if (setup.groupHeader && setup.groupHeader[row.indent]) { + group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } else { + if (setup.groupHeader === false) { + group.value = group.value; + } else { + group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + + cellEl.colSpan = group.width; + cellEl.innerHTML = group.value; + + rowEl.classList.add("tabulator-print-table-group"); + rowEl.classList.add("tabulator-group-level-" + row.indent); + + if (group.component.isVisible()) { + rowEl.classList.add("tabulator-group-visible"); + } + + this.mapElementStyles(styles.firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + this.mapElementStyles(styles.firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + rowEl.appendChild(cellEl); + + return rowEl; +}; + +Export.prototype.genereateCalcElement = function (row, setup, styles) { + var rowEl = this.genereateRowElement(row, setup, styles); + + rowEl.classList.add("tabulator-print-table-calcs"); + this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + return rowEl; +}; + +Export.prototype.genereateRowElement = function (row, setup, styles) { + var _this7 = this; + + var rowEl = document.createElement("tr"); + + rowEl.classList.add("tabulator-print-table-row"); + + row.columns.forEach(function (col) { + + if (col) { + var cellEl = document.createElement("td"), + column = col.component._column, + value = col.value; + + var cellWrapper = { + modules: {}, + getValue: function getValue() { + return value; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return cellEl; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getData: function getData() { + return row.component.getData(); + }, + getRow: function getRow() { + return row.component; + }, + getComponent: function getComponent() { + return cellWrapper; + }, + column: column + }; + + var classNames = column.definition.cssClass ? column.definition.cssClass.split(" ") : []; + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + if (_this7.table.modExists("format") && _this7.config.formatCells !== false) { + value = _this7.table.modules.format.formatExportValue(cellWrapper, _this7.colVisProp); + } else { + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + } + + if (value instanceof Node) { + cellEl.appendChild(value); + } else { + cellEl.innerHTML = value; + } + + if (styles.firstCell) { + _this7.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + + if (column.definition.align) { + cellEl.style.textAlign = column.definition.align; + } + } + + if (_this7.table.options.dataTree && _this7.config.dataTree !== false) { + if (setup.treeElementField && setup.treeElementField == column.field || !setup.treeElementField && i == 0) { + if (row.component._row.modules.dataTree.controlEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild); + } + if (row.component._row.modules.dataTree.branchEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild); + } + } + } + + rowEl.appendChild(cellEl); + + if (cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback) { + cellWrapper.modules.format.renderedCallback(); + } + + if (setup.rowFormatter && _this7.config.formatCells !== false) { + setup.rowFormatter(row.component); + } + } + }); + + return rowEl; +}; + +Export.prototype.genereateHTMLTable = function (list) { + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTableElement(list)); + + return holder.innerHTML; +}; + +Export.prototype.getHtml = function (visible, style, config, colVisProp) { + var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput"); + + return this.genereateHTMLTable(list); +}; + +Export.prototype.mapElementStyles = function (from, to, props) { + if (this.cloneTableStyle && from && to) { + + var lookup = { + "background-color": "backgroundColor", + "color": "fontColor", + "width": "width", + "font-weight": "fontWeight", + "font-family": "fontFamily", + "font-size": "fontSize", + "text-align": "textAlign", + "border-top": "borderTop", + "border-left": "borderLeft", + "border-right": "borderRight", + "border-bottom": "borderBottom", + "padding-top": "paddingTop", + "padding-left": "paddingLeft", + "padding-right": "paddingRight", + "padding-bottom": "paddingBottom" + }; + + if (window.getComputedStyle) { + var fromStyle = window.getComputedStyle(from); + + props.forEach(function (prop) { + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + } +}; + +Tabulator.prototype.registerModule("export", Export); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/export.min.js b/Sources/CustomControls/Table/control/dist/js/modules/export.min.js new file mode 100644 index 0000000..3411960 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/export.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ExportRow=function(t,e,o,n){this.type=t,this.columns=e,this.component=o||!1,this.indent=n||0},ExportColumn=function(t,e,o,n,r){this.value=t,this.component=e||!1,this.width=o,this.height=n,this.depth=r},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,n){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=n;var r=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],a=this.bodyToExportRows(this.rowLookup(o));return r.concat(a)},Export.prototype.genereateTable=function(t,e,o,n){var r=this.generateExportList(t,e,o,n);return this.genereateTableElement(r)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach(function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)});else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var n=t.processColumnGroup(o);n&&e.push(n)}),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,n=0,r=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,a={title:r,column:t,depth:1};if(o.length){if(a.subGroups=[],a.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(a.width+=o.width,a.subGroups.push(o),o.depth>n&&(n=o.depth))}),a.depth+=n,!a.width)return!1}else{if(!this.columnVisCheck(t))return!1;a.width=1}return a},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){function e(t,r){var a=n-r;if(void 0===o[r]&&(o[r]=[]),t.height=t.subGroups?1:a-t.depth+1,o[r].push(t),t.height>1)for(var l=1;l1)for(var i=1;in&&(n=t.depth)}),t.forEach(function(t){e(t,0)}),o.forEach(function(t){var e=[];t.forEach(function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)}),r.push(new ExportRow("header",e))}),r},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],n=[];return this.table.columnManager.columnsByIndex.forEach(function(t){e.columnVisCheck(t)&&o.push(t.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),t=t.filter(function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}),t.forEach(function(t,r){var a=t.getData(e.colVisProp),l=[],i=0;switch(t.type){case"group":i=t.level,l.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(t){l.push(new ExportColumn(t._column.getFieldValue(a),t,1,1))}),e.table.options.dataTree&&!1!==e.config.dataTree&&(i=t.modules.dataTree.index)}n.push(new ExportRow(t.type,l,t.getComponent(),i))}),n},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),n=document.createElement("thead"),r=document.createElement("tbody"),a=this.lookupTableStyles(),l=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i={};return i.rowFormatter=null!==l?l:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(i.treeElementField=this.table.modules.dataTree.elementField),i.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i.groupHeader&&!Array.isArray(i.groupHeader)&&(i.groupHeader=[i.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach(function(t,o){switch(t.type){case"header":n.appendChild(e.genereateHeaderElement(t,i,a));break;case"group":r.appendChild(e.genereateGroupElement(t,i,a));break;case"calc":r.appendChild(e.genereateCalcElement(t,i,a));break;case"row":var l=e.genereateRowElement(t,i,a);e.mapElementStyles(o%2&&a.evenRow?a.evenRow:a.oddRow,l,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r.appendChild(l)}}),n.innerHTML&&o.appendChild(n),o.appendChild(r),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var n=this,r=document.createElement("tr");return t.columns.forEach(function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,n.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach(function(t){e.classList.add(t)}),n.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?n.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&n.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),r.appendChild(e)}}),r},Export.prototype.genereateGroupElement=function(t,e,o){var n=document.createElement("tr"),r=document.createElement("td"),a=t.columns[0];return n.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?a.value=e.groupHeader[t.indent](a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?a.value=a.value:a.value=t.component._group.generator(a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),r.colSpan=a.width,r.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+t.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(r),n},Export.prototype.genereateCalcElement=function(t,e,o){var n=this.genereateRowElement(t,e,o);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n},Export.prototype.genereateRowElement=function(t,e,o){var n=this,r=document.createElement("tr");return r.classList.add("tabulator-print-table-row"),t.columns.forEach(function(a){if(a){var l=document.createElement("td"),s=a.component._column,p=a.value,c={modules:{},getValue:function(){return p},getField:function(){return s.definition.field},getElement:function(){return l},getColumn:function(){return s.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:s};if((s.definition.cssClass?s.definition.cssClass.split(" "):[]).forEach(function(t){l.classList.add(t)}),n.table.modExists("format")&&!1!==n.config.formatCells)p=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===p?"undefined":_typeof(p)){case"object":p=JSON.stringify(p);break;case"undefined":case"null":p="";break;default:p=p}p instanceof Node?l.appendChild(p):l.innerHTML=p,o.firstCell&&(n.mapElementStyles(o.firstCell,l,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),s.definition.align&&(l.style.textAlign=s.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==s.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&l.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),t.component._row.modules.dataTree.branchEl&&l.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),r.appendChild(l),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}}),r},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,n){var r=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,n||"htmlOutput");return this.genereateHTMLTable(r)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var r=window.getComputedStyle(t);o.forEach(function(t){e.style[n[t]]=r.getPropertyValue(t)})}}},Tabulator.prototype.registerModule("export",Export); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/filter.js b/Sources/CustomControls/Table/control/dist/js/modules/filter.js new file mode 100644 index 0000000..45ae925 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/filter.js @@ -0,0 +1,807 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Filter = function Filter(table) { + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterColumns = []; //hold columns that use header filters + + this.prevHeaderFilterChangeCheck = ""; + this.prevHeaderFilterChangeCheck = "{}"; + + this.changed = false; //has filtering changed since last render +}; + +//initialize column header filter +Filter.prototype.initializeColumn = function (column, value) { + var self = this, + field = column.getField(), + params; + + //handle successfull value change + function success(value) { + var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", + type = "", + filterChangeCheck = "", + filterFunc; + + if (typeof column.modules.filter.prevSuccess === "undefined" || column.modules.filter.prevSuccess !== value) { + + column.modules.filter.prevSuccess = value; + + if (!column.modules.filter.emptyFunc(value)) { + column.modules.filter.value = value; + + switch (_typeof(column.definition.headerFilterFunc)) { + case "string": + if (self.filters[column.definition.headerFilterFunc]) { + type = column.definition.headerFilterFunc; + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return self.filters[column.definition.headerFilterFunc](value, fieldVal, data, params); + }; + } else { + console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); + } + break; + + case "function": + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return column.definition.headerFilterFunc(value, fieldVal, data, params); + }; + + type = filterFunc; + break; + } + + if (!filterFunc) { + switch (filterType) { + case "partial": + filterFunc = function filterFunc(data) { + var colVal = column.getFieldValue(data); + + if (typeof colVal !== 'undefined' && colVal !== null) { + return String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1; + } else { + return false; + } + }; + type = "like"; + break; + + default: + filterFunc = function filterFunc(data) { + return column.getFieldValue(data) == value; + }; + type = "="; + } + } + + self.headerFilters[field] = { value: value, func: filterFunc, type: type, params: params || {} }; + } else { + delete self.headerFilters[field]; + } + + filterChangeCheck = JSON.stringify(self.headerFilters); + + if (self.prevHeaderFilterChangeCheck !== filterChangeCheck) { + self.prevHeaderFilterChangeCheck = filterChangeCheck; + + self.changed = true; + self.table.rowManager.filterRefresh(); + } + } + + return true; + } + + column.modules.filter = { + success: success, + attrType: false, + tagType: false, + emptyFunc: false + }; + + this.generateHeaderFilterElement(column); +}; + +Filter.prototype.generateHeaderFilterElement = function (column, initialValue, reinitialize) { + var _this = this; + + var self = this, + success = column.modules.filter.success, + field = column.getField(), + filterElement, + editor, + editorElement, + cellWrapper, + typingTimer, + searchTrigger, + params; + + //handle aborted edit + function cancel() {} + + if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { + column.contentElement.removeChild(column.modules.filter.headerElement.parentNode); + } + + if (field) { + + //set empty value function + column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { + return !value && value !== "0"; + }; + + filterElement = document.createElement("div"); + filterElement.classList.add("tabulator-header-filter"); + + //set column editor + switch (_typeof(column.definition.headerFilter)) { + case "string": + if (self.table.modules.edit.editors[column.definition.headerFilter]) { + editor = self.table.modules.edit.editors[column.definition.headerFilter]; + + if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); + } + break; + + case "function": + editor = column.definition.headerFilter; + break; + + case "boolean": + if (column.modules.edit && column.modules.edit.editor) { + editor = column.modules.edit.editor; + } else { + if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { + editor = self.table.modules.edit.editors[column.definition.formatter]; + + if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + editor = self.table.modules.edit.editors["input"]; + } + } + break; + } + + if (editor) { + + cellWrapper = { + getValue: function getValue() { + return typeof initialValue !== "undefined" ? initialValue : ""; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return filterElement; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getRow: function getRow() { + return { + normalizeHeight: function normalizeHeight() {} + }; + } + }; + + params = column.definition.headerFilterParams || {}; + + params = typeof params === "function" ? params.call(self.table) : params; + + editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); + + if (!editorElement) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); + return; + } + + if (!(editorElement instanceof Node)) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); + return; + } + + //set Placeholder Text + if (field) { + self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { + editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); + }); + } else { + self.table.modules.localize.bind("headerFilters|default", function (value) { + editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); + }); + } + + //focus on element on click + editorElement.addEventListener("click", function (e) { + e.stopPropagation(); + editorElement.focus(); + }); + + editorElement.addEventListener("focus", function (e) { + var left = _this.table.columnManager.element.scrollLeft; + + if (left !== _this.table.rowManager.element.scrollLeft) { + _this.table.rowManager.scrollHorizontal(left); + _this.table.columnManager.scrollHorizontal(left); + } + }); + + //live update filters as user types + typingTimer = false; + + searchTrigger = function searchTrigger(e) { + if (typingTimer) { + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function () { + success(editorElement.value); + }, self.table.options.headerFilterLiveFilterDelay); + }; + + column.modules.filter.headerElement = editorElement; + column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; + column.modules.filter.tagType = editorElement.tagName.toLowerCase(); + + if (column.definition.headerFilterLiveFilter !== false) { + + if (!(column.definition.headerFilter === 'autocomplete' || column.definition.headerFilter === 'tickCross' || (column.definition.editor === 'autocomplete' || column.definition.editor === 'tickCross') && column.definition.headerFilter === true)) { + editorElement.addEventListener("keyup", searchTrigger); + editorElement.addEventListener("search", searchTrigger); + + //update number filtered columns on change + if (column.modules.filter.attrType == "number") { + editorElement.addEventListener("change", function (e) { + success(editorElement.value); + }); + } + + //change text inputs to search inputs to allow for clearing of field + if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { + editorElement.setAttribute("type", "search"); + // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click + } + } + + //prevent input and select elements from propegating click to column sorters etc + if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { + editorElement.addEventListener("mousedown", function (e) { + e.stopPropagation(); + }); + } + } + + filterElement.appendChild(editorElement); + + column.contentElement.appendChild(filterElement); + + if (!reinitialize) { + self.headerFilterColumns.push(column); + } + } + } else { + console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); + } +}; + +//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.hideHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = 'none'; + } + }); +}; + +//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.showHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = ''; + } + }); +}; + +//programatically set focus of header filter +Filter.prototype.setHeaderFilterFocus = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.focus(); + } else { + console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); + } +}; + +//programmatically get value of header filter +Filter.prototype.getHeaderFilterValue = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + return column.modules.filter.headerElement.value; + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } +}; + +//programatically set value of header filter +Filter.prototype.setHeaderFilterValue = function (column, value) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, value, true); + column.modules.filter.success(value); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } +}; + +Filter.prototype.reloadHeaderFilter = function (column) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, column.modules.filter.value, true); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } +}; + +//check if the filters has changed since last use +Filter.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; +}; + +//set standard filters +Filter.prototype.setFilter = function (field, type, value, params) { + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + self.addFilter(field); +}; + +//add filter to array +Filter.prototype.addFilter = function (field, type, value, params) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + field.forEach(function (filter) { + + filter = self.findFilter(filter); + + if (filter) { + self.filterList.push(filter); + + self.changed = true; + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +Filter.prototype.findFilter = function (filter) { + var self = this, + column; + + if (Array.isArray(filter)) { + return this.findSubFilters(filter); + } + + var filterFunc = false; + + if (typeof filter.field == "function") { + filterFunc = function filterFunc(data) { + return filter.field(data, filter.type || {}); // pass params to custom filter function + }; + } else { + + if (self.filters[filter.type]) { + + column = self.table.columnManager.getColumnByField(filter.field); + + if (column) { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {}); + }; + } else { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, data[filter.field], data, filter.params || {}); + }; + } + } else { + console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); + } + } + + filter.func = filterFunc; + + return filter.func ? filter : false; +}; + +Filter.prototype.findSubFilters = function (filters) { + var self = this, + output = []; + + filters.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + output.push(filter); + } + }); + + return output.length ? output : false; +}; + +//get all filters +Filter.prototype.getFilters = function (all, ajax) { + var output = []; + + if (all) { + output = this.getHeaderFilters(); + } + + if (ajax) { + output.forEach(function (item) { + if (typeof item.type == "function") { + item.type = "function"; + } + }); + } + + output = output.concat(this.filtersToArray(this.filterList, ajax)); + + return output; +}; + +//filter to Object +Filter.prototype.filtersToArray = function (filterList, ajax) { + var _this2 = this; + + var output = []; + + filterList.forEach(function (filter) { + var item; + + if (Array.isArray(filter)) { + output.push(_this2.filtersToArray(filter, ajax)); + } else { + item = { field: filter.field, type: filter.type, value: filter.value }; + + if (ajax) { + if (typeof item.type == "function") { + item.type = "function"; + } + } + + output.push(item); + } + }); + + return output; +}; + +//get all filters +Filter.prototype.getHeaderFilters = function () { + var self = this, + output = []; + + for (var key in this.headerFilters) { + output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); + } + + return output; +}; + +//remove filter from array +Filter.prototype.removeFilter = function (field, type, value) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + var index = -1; + + if (_typeof(filter.field) == "object") { + index = self.filterList.findIndex(function (element) { + return filter === element; + }); + } else { + index = self.filterList.findIndex(function (element) { + return filter.field === element.field && filter.type === element.type && filter.value === element.value; + }); + } + + if (index > -1) { + self.filterList.splice(index, 1); + self.changed = true; + } else { + console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +//clear filters +Filter.prototype.clearFilter = function (all) { + this.filterList = []; + + if (all) { + this.clearHeaderFilter(); + } + + this.changed = true; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +//clear header filters +Filter.prototype.clearHeaderFilter = function () { + var self = this; + + this.headerFilters = {}; + self.prevHeaderFilterChangeCheck = "{}"; + + this.headerFilterColumns.forEach(function (column) { + column.modules.filter.value = null; + column.modules.filter.prevSuccess = undefined; + self.reloadHeaderFilter(column); + }); + + this.changed = true; +}; + +//search data and return matching rows +Filter.prototype.search = function (searchType, field, type, value) { + var self = this, + activeRows = [], + filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + filterList.push(filter); + } + }); + + this.table.rowManager.rows.forEach(function (row) { + var match = true; + + filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, row.getData())) { + match = false; + } + }); + + if (match) { + activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); + } + }); + + return activeRows; +}; + +//filter row array +Filter.prototype.filter = function (rowList, filters) { + var self = this, + activeRows = [], + activeRowComponents = []; + + if (self.table.options.dataFiltering) { + self.table.options.dataFiltering.call(self.table, self.getFilters()); + } + + if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { + + rowList.forEach(function (row) { + if (self.filterRow(row)) { + activeRows.push(row); + } + }); + } else { + activeRows = rowList.slice(0); + } + + if (self.table.options.dataFiltered) { + + activeRows.forEach(function (row) { + activeRowComponents.push(row.getComponent()); + }); + + self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); + } + + return activeRows; +}; + +//filter individual row +Filter.prototype.filterRow = function (row, filters) { + var self = this, + match = true, + data = row.getData(); + + self.filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, data)) { + match = false; + } + }); + + for (var field in self.headerFilters) { + if (!self.headerFilters[field].func(data)) { + match = false; + } + } + + return match; +}; + +Filter.prototype.filterRecurse = function (filter, data) { + var self = this, + match = false; + + if (Array.isArray(filter)) { + filter.forEach(function (subFilter) { + if (self.filterRecurse(subFilter, data)) { + match = true; + } + }); + } else { + match = filter.func(data); + } + + return match; +}; + +//list of available filters +Filter.prototype.filters = { + + //equal to + "=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal == filterVal ? true : false; + }, + + //less than + "<": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal < filterVal ? true : false; + }, + + //less than or equal to + "<=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal <= filterVal ? true : false; + }, + + //greater than + ">": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal > filterVal ? true : false; + }, + + //greater than or equal to + ">=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal >= filterVal ? true : false; + }, + + //not equal to + "!=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal != filterVal ? true : false; + }, + + "regex": function regex(filterVal, rowVal, rowData, filterParams) { + + if (typeof filterVal == "string") { + filterVal = new RegExp(filterVal); + } + + return filterVal.test(rowVal); + }, + + //contains the string + "like": function like(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1; + } else { + return false; + } + } + }, + + //contains the keywords + "keywords": function keywords(filterVal, rowVal, rowData, filterParams) { + var keywords = filterVal.toLowerCase().split(typeof filterParams.separator === "undefined" ? " " : filterParams.separator), + value = String(rowVal === null || typeof rowVal === "undefined" ? "" : rowVal).toLowerCase(), + matches = []; + + keywords.forEach(function (keyword) { + if (value.includes(keyword)) { + matches.push(true); + } + }); + + return filterParams.matchAll ? matches.length === keywords.length : !!matches.length; + }, + + //starts with the string + "starts": function starts(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //ends with the string + "ends": function ends(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //in array + "in": function _in(filterVal, rowVal, rowData, filterParams) { + if (Array.isArray(filterVal)) { + return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; + } else { + console.warn("Filter Error - filter value is not an array:", filterVal); + return false; + } + } +}; + +Tabulator.prototype.registerModule("filter", Filter); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/filter.min.js b/Sources/CustomControls/Table/control/dist/js/modules/filter.min.js new file mode 100644 index 0000000..debc66a --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/filter.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,r=function(r){var i=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return i="function"==typeof i?i(t,l,r):i,n.filters[e.definition.headerFilterFunc](t,l,r,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=function(r){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(r);return i="function"==typeof i?i(t,n,r):i,e.definition.headerFilterFunc(t,n,r,i)},a=r}if(!r)switch(o){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:r=function(r){return e.getFieldValue(r)==t},a="="}n.headerFilters[l]={value:t,func:r,type:a,params:i||{}}}s=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==s&&(n.prevHeaderFilterChangeCheck=s,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,l=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t,r){function i(){}var n,l,o,a,s,d,u,f=this,c=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":c.table.modules.edit.editors[e.definition.headerFilter]?(l=c.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&c.table.modules.edit.editors[e.definition.formatter]?(l=c.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):l=c.table.modules.edit.editors.input}if(l){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(o=l.call(this.table.modules.edit,a,function(){},h,i,u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",o);p?c.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){o.setAttribute("placeholder",void 0!==e&&e?e:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(e){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:e)}),o.addEventListener("click",function(e){e.stopPropagation(),o.focus()}),o.addEventListener("focus",function(e){var t=f.table.columnManager.element.scrollLeft;t!==f.table.rowManager.element.scrollLeft&&(f.table.rowManager.scrollHorizontal(t),f.table.columnManager.scrollHorizontal(t))}),s=!1,d=function(e){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},c.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=o,e.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=o.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(o.addEventListener("keyup",d),o.addEventListener("search",d),"number"==e.modules.filter.attrType&&o.addEventListener("change",function(e){h(o.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||o.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(o),e.contentElement.appendChild(n),r||c.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,r,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),n.addFilter(e)},Filter.prototype.addFilter=function(e,t,r,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,r=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?(t=r.table.columnManager.getColumnByField(e.field),i=t?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,r=[];return e.forEach(function(e){(e=t.findFilter(e))&&r.push(e)}),!!r.length&&r},Filter.prototype.getFilters=function(e,t){var r=[];return e&&(r=this.getHeaderFilters()),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r=r.concat(this.filtersToArray(this.filterList,t))},Filter.prototype.filtersToArray=function(e,t){var r=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(r.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,r,i){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:r,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var r=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(r=!1)}),r&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var r=this,i=[],n=[];return r.table.options.dataFiltering&&r.table.options.dataFiltering.call(r.table,r.getFilters()),r.table.options.ajaxFiltering||!r.filterList.length&&!Object.keys(r.headerFilters).length?i=e.slice(0):e.forEach(function(e){r.filterRow(e)&&i.push(e)}),r.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),r.table.options.dataFiltered.call(r.table,r.getFilters(),n)),i},Filter.prototype.filterRow=function(e,t){var r=this,i=!0,n=e.getData();r.filterList.forEach(function(e){r.filterRecurse(e,n)||(i=!1)});for(var l in r.headerFilters)r.headerFilters[l].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(e,t){var r=this,i=!1;return Array.isArray(e)?e.forEach(function(e){r.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},Filter.prototype.filters={"=":function(e,t,r,i){return t==e},"<":function(e,t,r,i){return t":function(e,t,r,i){return t>e},">=":function(e,t,r,i){return t>=e},"!=":function(e,t,r,i){return t!=e},regex:function(e,t,r,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,r,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),l=String(null===t||void 0===t?"":t).toLowerCase(),o=[];return n.forEach(function(e){l.includes(e)&&o.push(!0)}),i.matchAll?o.length===n.length:!!o.length},starts:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,r,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/format.js b/Sources/CustomControls/Table/control/dist/js/modules/format.js new file mode 100644 index 0000000..3a9ffb6 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/format.js @@ -0,0 +1,743 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Format = function Format(table) { + this.table = table; //hold Tabulator object +}; + +//initialize column formatter +Format.prototype.initializeColumn = function (column) { + column.modules.format = this.lookupFormatter(column, ""); + + if (typeof column.definition.formatterPrint !== "undefined") { + column.modules.format.print = this.lookupFormatter(column, "Print"); + } + + if (typeof column.definition.formatterClipboard !== "undefined") { + column.modules.format.clipboard = this.lookupFormatter(column, "Clipboard"); + } + + if (typeof column.definition.formatterHtmlOutput !== "undefined") { + column.modules.format.htmlOutput = this.lookupFormatter(column, "HtmlOutput"); + } +}; + +Format.prototype.lookupFormatter = function (column, type) { + var config = { params: column.definition["formatter" + type + "Params"] || {} }, + formatter = column.definition["formatter" + type]; + + //set column formatter + switch (typeof formatter === "undefined" ? "undefined" : _typeof(formatter)) { + case "string": + + if (formatter === "tick") { + formatter = "tickCross"; + + if (typeof config.params.crossElement == "undefined") { + config.params.crossElement = false; + } + + console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false"); + } + + if (this.formatters[formatter]) { + config.formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + config.formatter = this.formatters.plaintext; + } + break; + + case "function": + config.formatter = formatter; + break; + + default: + config.formatter = this.formatters.plaintext; + break; + } + + return config; +}; + +Format.prototype.cellRendered = function (cell) { + if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { + cell.modules.format.renderedCallback(); + cell.modules.format.rendered = true; + } +}; + +//return a formatted value for a cell +Format.prototype.formatValue = function (cell) { + var component = cell.getComponent(), + params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; + + function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); +}; + +Format.prototype.formatExportValue = function (cell, type) { + var formatter = cell.column.modules.format[type], + params; + + if (formatter) { + var onRendered = function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + }; + + params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; + + return formatter.formatter.call(this, cell.getComponent(), params, onRendered); + } else { + return this.formatValue(cell); + } +}; + +Format.prototype.sanitizeHTML = function (value) { + if (value) { + var entityMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + '`': '`', + '=': '=' + }; + + return String(value).replace(/[&<>"'`=\/]/g, function (s) { + return entityMap[s]; + }); + } else { + return value; + } +}; + +Format.prototype.emptyToSpace = function (value) { + return value === null || typeof value === "undefined" || value === "" ? " " : value; +}; + +//get formatter for cell +Format.prototype.getFormatter = function (formatter) { + var formatter; + + switch (typeof formatter === "undefined" ? "undefined" : _typeof(formatter)) { + case "string": + if (this.formatters[formatter]) { + formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + formatter = this.formatters.plaintext; + } + break; + + case "function": + formatter = formatter; + break; + + default: + formatter = this.formatters.plaintext; + break; + } + + return formatter; +}; + +//default data formatters +Format.prototype.formatters = { + //plain text value + plaintext: function plaintext(cell, formatterParams, onRendered) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + html: function html(cell, formatterParams, onRendered) { + return cell.getValue(); + }, + + //multiline text area + textarea: function textarea(cell, formatterParams, onRendered) { + cell.getElement().style.whiteSpace = "pre-wrap"; + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + money: function money(cell, formatterParams, onRendered) { + var floatVal = parseFloat(cell.getValue()), + number, + integer, + decimal, + rgx; + + var decimalSym = formatterParams.decimal || "."; + var thousandSym = formatterParams.thousand || ","; + var symbol = formatterParams.symbol || ""; + var after = !!formatterParams.symbolAfter; + var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; + + if (isNaN(floatVal)) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + } + + number = precision !== false ? floatVal.toFixed(precision) : floatVal; + number = String(number).split("."); + + integer = number[0]; + decimal = number.length > 1 ? decimalSym + number[1] : ""; + + rgx = /(\d+)(\d{3})/; + + while (rgx.test(integer)) { + integer = integer.replace(rgx, "$1" + thousandSym + "$2"); + } + + return after ? integer + decimal + symbol : symbol + integer + decimal; + }, + + //clickable anchor tag + link: function link(cell, formatterParams, onRendered) { + var value = cell.getValue(), + urlPrefix = formatterParams.urlPrefix || "", + download = formatterParams.download, + label = value, + el = document.createElement("a"), + data; + + if (formatterParams.labelField) { + data = cell.getData(); + label = data[formatterParams.labelField]; + } + + if (formatterParams.label) { + switch (_typeof(formatterParams.label)) { + case "string": + label = formatterParams.label; + break; + + case "function": + label = formatterParams.label(cell); + break; + } + } + + if (label) { + if (formatterParams.urlField) { + data = cell.getData(); + value = data[formatterParams.urlField]; + } + + if (formatterParams.url) { + switch (_typeof(formatterParams.url)) { + case "string": + value = formatterParams.url; + break; + + case "function": + value = formatterParams.url(cell); + break; + } + } + + el.setAttribute("href", urlPrefix + value); + + if (formatterParams.target) { + el.setAttribute("target", formatterParams.target); + } + + if (formatterParams.download) { + + if (typeof download == "function") { + download = download(cell); + } else { + download = download === true ? "" : download; + } + + el.setAttribute("download", download); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + } else { + return " "; + } + }, + + //image element + image: function image(cell, formatterParams, onRendered) { + var el = document.createElement("img"), + src = cell.getValue(); + + if (formatterParams.urlPrefix) { + src = formatterParams.urlPrefix + cell.getValue(); + } + + if (formatterParams.urlSuffix) { + src = src + formatterParams.urlSuffix; + } + + el.setAttribute("src", src); + + switch (_typeof(formatterParams.height)) { + case "number": + el.style.height = formatterParams.height + "px"; + break; + + case "string": + el.style.height = formatterParams.height; + break; + } + + switch (_typeof(formatterParams.width)) { + case "number": + el.style.width = formatterParams.width + "px"; + break; + + case "string": + el.style.width = formatterParams.width; + break; + } + + el.addEventListener("load", function () { + cell.getRow().normalizeHeight(); + }); + + return el; + }, + + //tick or cross + tickCross: function tickCross(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + empty = formatterParams.allowEmpty, + truthy = formatterParams.allowTruthy, + tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', + cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; + + if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { + element.setAttribute("aria-checked", true); + return tick || ""; + } else { + if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { + element.setAttribute("aria-checked", "mixed"); + return ""; + } else { + element.setAttribute("aria-checked", false); + return cross || ""; + } + } + }, + + datetime: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + return formatterParams.timezone ? newDatetime.tz(formatterParams.timezone).format(outputFormat) : newDatetime.format(outputFormat); + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + datetimediff: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; + var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; + var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; + var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + if (humanize) { + return moment.duration(newDatetime.diff(date)).humanize(suffix); + } else { + return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); + } + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + //select + lookup: function lookup(cell, formatterParams, onRendered) { + var value = cell.getValue(); + + if (typeof formatterParams[value] === "undefined") { + console.warn('Missing display value for ' + value); + return value; + } + + return formatterParams[value]; + }, + + //star rating + star: function star(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, + stars = document.createElement("span"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), + starActive = '', + starInactive = ''; + + //style stars holder + stars.style.verticalAlign = "middle"; + + //style star + star.setAttribute("width", "14"); + star.setAttribute("height", "14"); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + value = value && !isNaN(value) ? parseInt(value) : 0; + + value = Math.max(0, Math.min(value, maxStars)); + + for (var i = 1; i <= maxStars; i++) { + var nextStar = star.cloneNode(true); + nextStar.innerHTML = i <= value ? starActive : starInactive; + + stars.appendChild(nextStar); + } + + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + element.setAttribute("aria-label", value); + + return stars; + }, + + traffic: function traffic(cell, formatterParams, onRendered) { + var value = this.sanitizeHTML(cell.getValue()) || 0, + el = document.createElement("span"), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + colors = formatterParams && typeof formatterParams.color !== "undefined" ? formatterParams.color : ["red", "orange", "green"], + color = "#666666", + percent, + percentValue; + + if (isNaN(value) || typeof cell.getValue() === "undefined") { + return; + } + + el.classList.add("tabulator-traffic-light"); + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set color + switch (typeof colors === "undefined" ? "undefined" : _typeof(colors)) { + case "string": + color = colors; + break; + case "function": + color = colors(value); + break; + case "object": + if (Array.isArray(colors)) { + var unit = 100 / colors.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, colors.length - 1); + index = Math.max(index, 0); + color = colors[index]; + break; + } + } + + el.style.backgroundColor = color; + + return el; + }, + + //progress bar + progress: function progress(cell, formatterParams, onRendered) { + //progress bar + var value = this.sanitizeHTML(cell.getValue()) || 0, + element = cell.getElement(), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", + percent, + percentValue, + color, + legend, + legendColor, + top, + left, + right, + bottom; + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set bar color + switch (_typeof(formatterParams.color)) { + case "string": + color = formatterParams.color; + break; + case "function": + color = formatterParams.color(value); + break; + case "object": + if (Array.isArray(formatterParams.color)) { + var unit = 100 / formatterParams.color.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.color.length - 1); + index = Math.max(index, 0); + color = formatterParams.color[index]; + break; + } + default: + color = "#2DC214"; + } + + //generate legend + switch (_typeof(formatterParams.legend)) { + case "string": + legend = formatterParams.legend; + break; + case "function": + legend = formatterParams.legend(value); + break; + case "boolean": + legend = value; + break; + default: + legend = false; + } + + //set legend color + switch (_typeof(formatterParams.legendColor)) { + case "string": + legendColor = formatterParams.legendColor; + break; + case "function": + legendColor = formatterParams.legendColor(value); + break; + case "object": + if (Array.isArray(formatterParams.legendColor)) { + var unit = 100 / formatterParams.legendColor.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.legendColor.length - 1); + index = Math.max(index, 0); + legendColor = formatterParams.legendColor[index]; + } + break; + default: + legendColor = "#000"; + } + + element.style.minWidth = "30px"; + element.style.position = "relative"; + + element.setAttribute("aria-label", percentValue); + + var barEl = document.createElement("div"); + barEl.style.display = "inline-block"; + barEl.style.position = "relative"; + barEl.style.width = percentValue + "%"; + barEl.style.backgroundColor = color; + barEl.style.height = "100%"; + + barEl.setAttribute('data-max', max); + barEl.setAttribute('data-min', min); + + if (legend) { + var legendEl = document.createElement("div"); + legendEl.style.position = "absolute"; + legendEl.style.top = "4px"; + legendEl.style.left = 0; + legendEl.style.textAlign = legendAlign; + legendEl.style.width = "100%"; + legendEl.style.color = legendColor; + legendEl.innerHTML = legend; + } + + onRendered(function () { + + //handle custom element needed if formatter is to be included in printed/downloaded output + if (!(cell instanceof CellComponent)) { + var holderEl = document.createElement("div"); + holderEl.style.position = "absolute"; + holderEl.style.top = "4px"; + holderEl.style.bottom = "4px"; + holderEl.style.left = "4px"; + holderEl.style.right = "4px"; + + element.appendChild(holderEl); + + element = holderEl; + } + + element.appendChild(barEl); + + if (legend) { + element.appendChild(legendEl); + } + }); + + return ""; + }, + + //background color + color: function color(cell, formatterParams, onRendered) { + cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); + return ""; + }, + + //tick icon + buttonTick: function buttonTick(cell, formatterParams, onRendered) { + return ''; + }, + + //cross icon + buttonCross: function buttonCross(cell, formatterParams, onRendered) { + return ''; + }, + + //current row number + rownum: function rownum(cell, formatterParams, onRendered) { + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + handle: function handle(cell, formatterParams, onRendered) { + cell.getElement().classList.add("tabulator-row-handle"); + return "
"; + }, + + responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { + var self = this, + open = false, + el = document.createElement("div"), + config = cell.getRow()._row.modules.responsiveLayout; + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + function toggleList(isOpen) { + var collapseEl = config.element; + + config.open = isOpen; + + if (collapseEl) { + + if (config.open) { + el.classList.add("open"); + collapseEl.style.display = ''; + } else { + el.classList.remove("open"); + collapseEl.style.display = 'none'; + } + } + } + + el.addEventListener("click", function (e) { + e.stopImmediatePropagation(); + toggleList(!config.open); + }); + + toggleList(config.open); + + return el; + }, + + rowSelection: function rowSelection(cell, formatterParams, onRendered) { + var _this = this; + + var checkbox = document.createElement("input"); + + checkbox.type = 'checkbox'; + + if (this.table.modExists("selectRow", true)) { + + checkbox.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + if (typeof cell.getRow == 'function') { + var row = cell.getRow(); + + if (row instanceof RowComponent) { + + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected && row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + } else { + checkbox = ""; + } + } else { + checkbox.addEventListener("change", function (e) { + if (_this.table.modules.selectRow.selectedRows.length) { + _this.table.deselectRow(); + } else { + _this.table.selectRow(formatterParams.rowRange); + } + }); + + this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); + } + } + return checkbox; + } +}; + +Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/format.min.js b/Sources/CustomControls/Table/control/dist/js/modules/format.min.js new file mode 100644 index 0000000..4ce25ea --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/format.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},Format.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];switch(void 0===r?"undefined":_typeof(r)){case"string":"tick"===r&&(r="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[r]?o.formatter=this.formatters[r]:(console.warn("Formatter Error - No such formatter found: ",r),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=r;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},Format.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),r="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,r,t)},Format.prototype.formatExportValue=function(e,t){var o,r=e.column.modules.format[t];if(r){var a=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof r.params?r.params(component):r.params,r.formatter.call(this,e.getComponent(),o,a)}return this.formatValue(e)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var r,a,n,l,i=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?i.toFixed(m):i,r=String(r).split("."),a=r[0],n=r.length>1?s+r[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return d?a+n+u:u+a+n},link:function(e,t,o){var r,a=e.getValue(),n=t.urlPrefix||"",l=t.download,i=a,s=document.createElement("a");if(t.labelField&&(r=e.getData(),i=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":i=t.label;break;case"function":i=t.label(e)}if(i){if(t.urlField&&(r=e.getData(),a=r[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return s.setAttribute("href",n+a),t.target&&s.setAttribute("target",t.target),t.download&&(l="function"==typeof l?l(e):!0===l?"":l,s.setAttribute("download",l)),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(i)),s}return" "},image:function(e,t,o){var r=document.createElement("img"),a=e.getValue();switch(t.urlPrefix&&(a=t.urlPrefix+e.getValue()),t.urlSuffix&&(a+=t.urlSuffix),r.setAttribute("src",a),_typeof(t.height)){case"number":r.style.height=t.height+"px";break;case"string":r.style.height=t.height}switch(_typeof(t.width)){case"number":r.style.width=t.width+"px";break;case"string":r.style.width=t.width}return r.addEventListener("load",function(){e.getRow().normalizeHeight()}),r},tickCross:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t.allowEmpty,l=t.allowTruthy,i=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return l&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),i||""):!n||"null"!==r&&""!==r&&null!==r&&void 0!==r?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),i=moment(l,r);return i.isValid()?t.timezone?i.tz(t.timezone).format(a):i.format(a):!0===n?l:"function"==typeof n?n(l):n},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,i=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,r);return u.isValid()?i?moment.duration(u.diff(s)).humanize(n):u.diff(s,l)+(n?" "+n:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,o){var r=e.getValue();return void 0===t[r]?(console.warn("Missing display value for "+r),r):t[r]},star:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t&&t.stars?t.stars:5,l=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",i.setAttribute("width","14"),i.setAttribute("height","14"),i.setAttribute("viewBox","0 0 512 512"),i.setAttribute("xml:space","preserve"),i.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,n));for(var s=1;s<=n;s++){var c=i.cloneNode(!0);c.innerHTML=s<=r?'':'',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),l},traffic:function(e,t,o){var r,a,n=this.sanitizeHTML(e.getValue())||0,l=document.createElement("span"),i=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(l.classList.add("tabulator-traffic-light"),a=parseFloat(n)<=i?parseFloat(n):i,a=parseFloat(a)>=s?parseFloat(a):s,r=(i-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(n);break;case"object":if(Array.isArray(c)){var d=100/c.length,m=Math.floor(a/d);m=Math.min(m,c.length-1),m=Math.max(m,0),u=c[m];break}}return l.style.backgroundColor=u,l}},progress:function(e,t,o){var r,a,n,l,i,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t&&t.max?t.max:100,d=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=u?parseFloat(s):u,a=parseFloat(a)>=d?parseFloat(a):d,r=(u-d)/100,a=Math.round((a-d)/r),_typeof(t.color)){case"string":n=t.color;break;case"function":n=t.color(s);break;case"object":if(Array.isArray(t.color)){var f=100/t.color.length,p=Math.floor(a/f);p=Math.min(p,t.color.length-1),p=Math.max(p,0),n=t.color[p];break}default:n="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":i=t.legendColor;break;case"function":i=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var f=100/t.legendColor.length,p=Math.floor(a/f);p=Math.min(p,t.legendColor.length-1),p=Math.max(p,0),i=t.legendColor[p]}break;default:i="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var h=document.createElement("div");if(h.style.display="inline-block",h.style.position="relative",h.style.width=a+"%",h.style.backgroundColor=n,h.style.height="100%",h.setAttribute("data-max",u),h.setAttribute("data-min",d),l){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=m,g.style.width="100%",g.style.color=i,g.innerHTML=l}return o(function(){if(!(e instanceof CellComponent)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(h),l&&c.appendChild(g)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function r(e){var t=n.element;n.open=e,t&&(n.open?(a.classList.add("open"),t.style.display=""):(a.classList.remove("open"),t.style.display="none"))}var a=document.createElement("div"),n=e.getRow()._row.modules.responsiveLayout;return a.classList.add("tabulator-responsive-collapse-toggle"),a.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!n.open)}),r(n.open),a},rowSelection:function(e,t,o){var r=this,a=document.createElement("input");if(a.type="checkbox",this.table.modExists("selectRow",!0))if(a.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var n=e.getRow();n instanceof RowComponent?(a.addEventListener("change",function(e){n.toggleSelect()}),a.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,a)):a=""}else a.addEventListener("change",function(e){r.table.modules.selectRow.selectedRows.length?r.table.deselectRow():r.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(a);return a}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.js b/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.js new file mode 100644 index 0000000..73ea744 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.js @@ -0,0 +1,275 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var FrozenColumns = function FrozenColumns(table) { + this.table = table; //hold Tabulator object + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightPadding = 0; + this.initializationMode = "left"; + this.active = false; + this.scrollEndTimer = false; +}; + +//reset initial state +FrozenColumns.prototype.reset = function () { + this.initializationMode = "left"; + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightMargin = 0; + this.active = false; + + this.table.columnManager.headersElement.style.marginLeft = 0; + this.table.columnManager.element.style.paddingRight = 0; +}; + +//initialize specific column +FrozenColumns.prototype.initializeColumn = function (column) { + var config = { margin: 0, edge: false }; + + if (!column.isGroup) { + + if (this.frozenCheck(column)) { + + config.position = this.initializationMode; + + if (this.initializationMode == "left") { + this.leftColumns.push(column); + } else { + this.rightColumns.unshift(column); + } + + this.active = true; + + column.modules.frozen = config; + } else { + this.initializationMode = "right"; + } + } +}; + +FrozenColumns.prototype.frozenCheck = function (column) { + var frozen = false; + + if (column.parent.isGroup && column.definition.frozen) { + console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"); + } + + if (column.parent.isGroup) { + return this.frozenCheck(column.parent); + } else { + return column.definition.frozen; + } + + return frozen; +}; + +//quick layout to smooth horizontal scrolling +FrozenColumns.prototype.scrollHorizontal = function () { + var _this = this; + + var rows; + + if (this.active) { + clearTimeout(this.scrollEndTimer); + + //layout all rows after scroll is complete + this.scrollEndTimer = setTimeout(function () { + _this.layout(); + }, 100); + + rows = this.table.rowManager.getVisibleRows(); + + this.calcMargins(); + + this.layoutColumnPosition(); + + this.layoutCalcRows(); + + rows.forEach(function (row) { + if (row.type === "row") { + _this.layoutRow(row); + } + }); + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } +}; + +//calculate margins for rows +FrozenColumns.prototype.calcMargins = function () { + this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; + this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; + + this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; + this.table.columnManager.element.style.paddingRight = this.rightMargin; + + //calculate right frozen columns + this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft; +}; + +//layout calculation rows +FrozenColumns.prototype.layoutCalcRows = function () { + if (this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow) { + this.layoutRow(this.table.modules.columnCalcs.topRow); + } + if (this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow) { + this.layoutRow(this.table.modules.columnCalcs.botRow); + } + } +}; + +//calculate column positions and layout headers +FrozenColumns.prototype.layoutColumnPosition = function (allCells) { + var _this2 = this; + + var leftParents = []; + + this.leftColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this2._calcSpace(_this2.leftColumns, i) + _this2.table.columnManager.scrollLeft + "px"; + + if (i == _this2.leftColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + var parentEl = _this2.getColGroupParentElement(column); + if (!leftParents.includes(parentEl)) { + _this2.layoutElement(parentEl, column); + leftParents.push(parentEl); + } + + if (column.modules.frozen.edge) { + parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } else { + _this2.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this2.layoutElement(cell.getElement(true), column); + }); + } + }); + + this.rightColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this2.rightPadding - _this2._calcSpace(_this2.rightColumns, i + 1) + "px"; + + if (i == _this2.rightColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + _this2.layoutElement(_this2.getColGroupParentElement(column), column); + } else { + _this2.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this2.layoutElement(cell.getElement(true), column); + }); + } + }); +}; + +FrozenColumns.prototype.getColGroupParentElement = function (column) { + return column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement(); +}; + +//layout columns appropropriatly +FrozenColumns.prototype.layout = function () { + var self = this, + rightMargin = 0; + + if (self.active) { + + //calculate row padding + this.calcMargins(); + + // self.table.rowManager.activeRows.forEach(function(row){ + // self.layoutRow(row); + // }); + + // if(self.table.options.dataTree){ + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row") { + self.layoutRow(row); + } + }); + // } + + this.layoutCalcRows(); + + //calculate left columns + this.layoutColumnPosition(true); + + // if(tableHolder.scrollHeight > tableHolder.clientHeight){ + // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; + // } + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } +}; + +FrozenColumns.prototype.layoutRow = function (row) { + var _this3 = this; + + var rowEl = row.getElement(); + + rowEl.style.paddingLeft = this.leftMargin; + // rowEl.style.paddingRight = this.rightMargin + "px"; + + this.leftColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this3.layoutElement(cell.getElement(true), column); + } + }); + + this.rightColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this3.layoutElement(cell.getElement(true), column); + } + }); +}; + +FrozenColumns.prototype.layoutElement = function (element, column) { + + if (column.modules.frozen) { + element.style.position = "absolute"; + element.style.left = column.modules.frozen.margin; + + element.classList.add("tabulator-frozen"); + + if (column.modules.frozen.edge) { + element.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } +}; + +FrozenColumns.prototype._calcSpace = function (columns, index) { + var width = 0; + + for (var i = 0; i < index; i++) { + if (columns[i].visible) { + width += columns[i].getWidth(); + } + } + + return width; +}; + +Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.min.js b/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.min.js new file mode 100644 index 0000000..3b3e85f --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/frozen_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){e.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach(function(n,l){if(n.modules.frozen.margin=e._calcSpace(e.leftColumns,l)+e.table.columnManager.scrollLeft+"px",l==e.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var i=e.getColGroupParentElement(n);o.includes(i)||(e.layoutElement(i,n),o.push(i)),n.modules.frozen.edge&&i.classList.add("tabulator-frozen-"+n.modules.frozen.position)}else e.layoutElement(n.getElement(),n);t&&n.cells.forEach(function(t){e.layoutElement(t.getElement(!0),n)})}),this.rightColumns.forEach(function(o,n){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,n+1)+"px",n==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(!0),o)})})},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(!0),o)}),this.rightColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(!0),o)})},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,n=0;n -1) { + output.splice(index, 1); + } + }); + + return output; +}; + +FrozenRows.prototype.freezeRow = function (row) { + if (!row.modules.frozen) { + row.modules.frozen = true; + this.topElement.appendChild(row.getElement()); + row.initialize(); + row.normalizeHeight(); + this.table.rowManager.adjustTableSize(); + + this.rows.push(row); + + this.table.rowManager.refreshActiveData("display"); + + this.styleRows(); + } else { + console.warn("Freeze Error - Row is already frozen"); + } +}; + +FrozenRows.prototype.unfreezeRow = function (row) { + var index = this.rows.indexOf(row); + + if (row.modules.frozen) { + + row.modules.frozen = false; + + this.detachRow(row); + + this.table.rowManager.adjustTableSize(); + + this.table.rowManager.refreshActiveData("display"); + + if (this.rows.length) { + this.styleRows(); + } + } else { + console.warn("Freeze Error - Row is already unfrozen"); + } +}; + +FrozenRows.prototype.detachRow = function (row) { + var index = this.rows.indexOf(row); + + if (index > -1) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.rows.splice(index, 1); + } +}; + +FrozenRows.prototype.styleRows = function (row) { + var self = this; + + this.rows.forEach(function (row, i) { + self.table.rowManager.styleRow(row, i); + }); +}; + +Tabulator.prototype.registerModule("frozenRows", FrozenRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/frozen_rows.min.js b/Sources/CustomControls/Table/control/dist/js/modules/frozen_rows.min.js new file mode 100644 index 0000000..671441a --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/frozen_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(e){var o=this.rows.indexOf(e);if(o>-1){var t=e.getElement();t.parentNode.removeChild(t),this.rows.splice(o,1)}},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/group_rows.js b/Sources/CustomControls/Table/control/dist/js/modules/group_rows.js new file mode 100644 index 0000000..b6f761d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/group_rows.js @@ -0,0 +1,1126 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +//public group object +var GroupComponent = function GroupComponent(group) { + this._group = group; + this.type = "GroupComponent"; +}; + +GroupComponent.prototype.getKey = function () { + return this._group.key; +}; + +GroupComponent.prototype.getField = function () { + return this._group.field; +}; + +GroupComponent.prototype.getElement = function () { + return this._group.element; +}; + +GroupComponent.prototype.getRows = function () { + return this._group.getRows(true); +}; + +GroupComponent.prototype.getSubGroups = function () { + return this._group.getSubGroups(true); +}; + +GroupComponent.prototype.getParentGroup = function () { + return this._group.parent ? this._group.parent.getComponent() : false; +}; + +GroupComponent.prototype.getVisibility = function () { + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + return this._group.visible; +}; + +GroupComponent.prototype.isVisible = function () { + return this._group.visible; +}; + +GroupComponent.prototype.show = function () { + this._group.show(); +}; + +GroupComponent.prototype.hide = function () { + this._group.hide(); +}; + +GroupComponent.prototype.toggle = function () { + this._group.toggleVisibility(); +}; + +GroupComponent.prototype._getSelf = function () { + return this._group; +}; + +GroupComponent.prototype.getTable = function () { + return this._group.groupManager.table; +}; + +////////////////////////////////////////////////// +//////////////// Group Functions ///////////////// +////////////////////////////////////////////////// + +var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { + + this.groupManager = groupManager; + this.parent = parent; + this.key = key; + this.level = level; + this.field = field; + this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; + this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; + this.type = "group"; //type of element + this.old = oldGroup; + this.rows = []; + this.groups = []; + this.groupList = []; + this.generator = generator; + this.elementContents = false; + this.height = 0; + this.outerHeight = 0; + this.initialized = false; + this.calcs = {}; + this.initialized = false; + this.modules = {}; + this.arrowElement = false; + + this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; + + this.component = null; + + this.createElements(); + this.addBindings(); + + this.createValueGroups(); +}; + +Group.prototype.wipe = function () { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + group.wipe(); + }); + } else { + this.element = false; + this.arrowElement = false; + this.elementContents = false; + } +}; + +Group.prototype.createElements = function () { + var arrow = document.createElement("div"); + arrow.classList.add("tabulator-arrow"); + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-row"); + this.element.classList.add("tabulator-group"); + this.element.classList.add("tabulator-group-level-" + this.level); + this.element.setAttribute("role", "rowgroup"); + + this.arrowElement = document.createElement("div"); + this.arrowElement.classList.add("tabulator-group-toggle"); + this.arrowElement.appendChild(arrow); + + //setup movable rows + if (this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists("moveRow")) { + this.groupManager.table.modules.moveRow.initializeGroupHeader(this); + } +}; + +Group.prototype.createValueGroups = function () { + var _this = this; + + var level = this.level + 1; + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + this.groupManager.allowedValues[level].forEach(function (value) { + _this._createGroup(value, level); + }); + } +}; + +Group.prototype.addBindings = function () { + var self = this, + dblTap, + tapHold, + tap, + toggleElement; + + //handle group click events + if (self.groupManager.table.options.groupClick) { + self.element.addEventListener("click", function (e) { + self.groupManager.table.options.groupClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.groupManager.table.options.groupDblClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + self.element.addEventListener("contextmenu", function (e) { + self.groupManager.table.options.groupContext.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { + self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); + } + + if (self.groupManager.table.options.groupTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + self.groupManager.table.options.groupTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.groupManager.table.options.groupDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + self.groupManager.table.options.groupDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (self.groupManager.table.options.groupTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.groupManager.table.options.groupTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } + + if (self.groupManager.table.options.groupToggleElement) { + toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; + + toggleElement.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + self.toggleVisibility(); + }); + } +}; + +Group.prototype._createGroup = function (groupID, level) { + var groupKey = level + "_" + groupID; + var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); + + this.groups[groupKey] = group; + this.groupList.push(group); +}; + +Group.prototype._addRowToGroup = function (row) { + + var level = this.level + 1; + + if (this.hasSubGroups) { + var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), + groupKey = level + "_" + groupID; + + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } + } else { + if (!this.groups[groupKey]) { + this._createGroup(groupID, level); + } + + this.groups[groupKey].addRow(row); + } + } +}; + +Group.prototype._addRow = function (row) { + this.rows.push(row); + row.modules.group = this; +}; + +Group.prototype.insertRow = function (row, to, after) { + var data = this.conformRowData({}); + + row.updateData(data); + + var toIndex = this.rows.indexOf(to); + + if (toIndex > -1) { + if (after) { + this.rows.splice(toIndex + 1, 0, row); + } else { + this.rows.splice(toIndex, 0, row); + } + } else { + if (after) { + this.rows.push(row); + } else { + this.rows.unshift(row); + } + } + + row.modules.group = this; + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + + this.groupManager.updateGroupRows(true); +}; + +Group.prototype.scrollHeader = function (left) { + this.arrowElement.style.marginLeft = left; + + this.groupList.forEach(function (child) { + child.scrollHeader(left); + }); +}; + +Group.prototype.getRowIndex = function (row) {}; + +//update row data to match grouping contraints +Group.prototype.conformRowData = function (data) { + if (this.field) { + data[this.field] = this.key; + } else { + console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); + } + + if (this.parent) { + data = this.parent.conformRowData(data); + } + + return data; +}; + +Group.prototype.removeRow = function (row) { + var index = this.rows.indexOf(row); + var el = row.getElement(); + + if (index > -1) { + this.rows.splice(index, 1); + } + + if (!this.groupManager.table.options.groupValues && !this.rows.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + + this.groupManager.updateGroupRows(true); + } else { + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + } +}; + +Group.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + + if (!this.groupList.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + } + } +}; + +Group.prototype.getHeadersAndRows = function (noCalc) { + var output = []; + + output.push(this); + + this._visSet(); + + if (this.visible) { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows(noCalc)); + }); + } else { + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + + output = output.concat(this.rows); + + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } else { + if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table") { + + if (this.groupManager.table.modExists("columnCalcs")) { + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + } + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } + } + } + + return output; +}; + +Group.prototype.getData = function (visible, transform) { + var self = this, + output = []; + + this._visSet(); + + if (!visible || visible && this.visible) { + this.rows.forEach(function (row) { + output.push(row.getData(transform || "data")); + }); + } + + return output; +}; + +// Group.prototype.getRows = function(){ +// this._visSet(); + +// return this.visible ? this.rows : []; +// }; + +Group.prototype.getRowCount = function () { + var count = 0; + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + count += group.getRowCount(); + }); + } else { + count = this.rows.length; + } + return count; +}; + +Group.prototype.toggleVisibility = function () { + if (this.visible) { + this.hide(); + } else { + this.show(); + } +}; + +Group.prototype.hide = function () { + this.visible = false; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.remove("tabulator-group-visible"); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + row.detachElement(); + }); + }); + } else { + this.rows.forEach(function (row) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); +}; + +Group.prototype.show = function () { + var self = this; + + self.visible = true; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.add("tabulator-group-visible"); + + var prev = self.getElement(); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + }); + } else { + self.rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); +}; + +Group.prototype._visSet = function () { + var data = []; + + if (typeof this.visible == "function") { + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); + } +}; + +Group.prototype.getRowGroup = function (row) { + var match = false; + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + } else { + if (this.rows.find(function (item) { + return item === row; + })) { + match = this; + } + } + + return match; +}; + +Group.prototype.getSubGroups = function (component) { + var output = []; + + this.groupList.forEach(function (child) { + output.push(component ? child.getComponent() : child); + }); + + return output; +}; + +Group.prototype.getRows = function (compoment) { + var output = []; + + this.rows.forEach(function (row) { + output.push(compoment ? row.getComponent() : row); + }); + + return output; +}; + +Group.prototype.generateGroupHeaderContents = function () { + var data = []; + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (typeof this.elementContents === "string") { + this.element.innerHTML = this.elementContents; + } else { + this.element.appendChild(this.elementContents); + } + + this.element.insertBefore(this.arrowElement, this.element.firstChild); +}; + +Group.prototype.getPath = function () { + var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + path.unshift(this.key); + if (this.parent) { + this.parent.getPath(path); + } + return path; +}; +////////////// Standard Row Functions ////////////// + +Group.prototype.getElement = function () { + this.addBindingsd = false; + + this._visSet(); + + if (this.visible) { + this.element.classList.add("tabulator-group-visible"); + } else { + this.element.classList.remove("tabulator-group-visible"); + } + + for (var i = 0; i < this.element.childNodes.length; ++i) { + this.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]); + } + + this.generateGroupHeaderContents(); + + // this.addBindings(); + + return this.element; +}; + +Group.prototype.detachElement = function () { + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } +}; + +//normalize the height of elements in the row +Group.prototype.normalizeHeight = function () { + this.setHeight(this.element.clientHeight); +}; + +Group.prototype.initialize = function (force) { + if (!this.initialized || force) { + this.normalizeHeight(); + this.initialized = true; + } +}; + +Group.prototype.reinitialize = function () { + this.initialized = false; + this.height = 0; + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + this.initialize(true); + } +}; + +Group.prototype.setHeight = function (height) { + if (this.height != height) { + this.height = height; + this.outerHeight = this.element.offsetHeight; + } +}; + +//return rows outer height +Group.prototype.getHeight = function () { + return this.outerHeight; +}; + +Group.prototype.getGroup = function () { + return this; +}; + +Group.prototype.reinitializeHeight = function () {}; +Group.prototype.calcHeight = function () {}; +Group.prototype.setCellHeight = function () {}; +Group.prototype.clearCellHeight = function () {}; + +//////////////// Object Generation ///////////////// +Group.prototype.getComponent = function () { + if (!this.component) { + this.component = new GroupComponent(this); + } + + return this.component; +}; + +////////////////////////////////////////////////// +////////////// Group Row Extension /////////////// +////////////////////////////////////////////////// + +var GroupRows = function GroupRows(table) { + + this.table = table; //hold Tabulator object + + this.groupIDLookups = false; //enable table grouping and set field to group by + this.startOpen = [function () { + return false; + }]; //starting state of group + this.headerGenerator = [function () { + return ""; + }]; + this.groupList = []; //ordered list of groups + this.allowedValues = false; + this.groups = {}; //hold row groups + this.displayIndex = 0; //index in display pipeline +}; + +//initialize group configuration +GroupRows.prototype.initialize = function () { + var self = this, + groupBy = self.table.options.groupBy, + startOpen = self.table.options.groupStartOpen, + groupHeader = self.table.options.groupHeader; + + this.allowedValues = self.table.options.groupValues; + + if (Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length) { + console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"); + } + + self.headerGenerator = [function () { + return ""; + }]; + this.startOpen = [function () { + return false; + }]; //starting state of group + + self.table.modules.localize.bind("groups|item", function (langValue, lang) { + self.headerGenerator[0] = function (value, count, data) { + //header layout function + return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; + }; + }); + + this.groupIDLookups = []; + + if (Array.isArray(groupBy) || groupBy) { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { + this.table.modules.columnCalcs.removeCalcs(); + } + } else { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { + + var cols = this.table.columnManager.getRealColumns(); + + cols.forEach(function (col) { + if (col.definition.topCalc) { + self.table.modules.columnCalcs.initializeTopRow(); + } + + if (col.definition.bottomCalc) { + self.table.modules.columnCalcs.initializeBottomRow(); + } + }); + } + } + + if (!Array.isArray(groupBy)) { + groupBy = [groupBy]; + } + + groupBy.forEach(function (group, i) { + var lookupFunc, column; + + if (typeof group == "function") { + lookupFunc = group; + } else { + column = self.table.columnManager.getColumnByField(group); + + if (column) { + lookupFunc = function lookupFunc(data) { + return column.getFieldValue(data); + }; + } else { + lookupFunc = function lookupFunc(data) { + return data[group]; + }; + } + } + + self.groupIDLookups.push({ + field: typeof group === "function" ? false : group, + func: lookupFunc, + values: self.allowedValues ? self.allowedValues[i] : false + }); + }); + + if (startOpen) { + + if (!Array.isArray(startOpen)) { + startOpen = [startOpen]; + } + + startOpen.forEach(function (level) { + level = typeof level == "function" ? level : function () { + return true; + }; + }); + + self.startOpen = startOpen; + } + + if (groupHeader) { + self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; + } + + this.initialized = true; +}; + +GroupRows.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +GroupRows.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +//return appropriate rows with group headers +GroupRows.prototype.getRows = function (rows) { + if (this.groupIDLookups.length) { + + this.table.options.dataGrouping.call(this.table); + + this.generateGroups(rows); + + if (this.table.options.dataGrouped) { + this.table.options.dataGrouped.call(this.table, this.getGroups(true)); + } + + return this.updateGroupRows(); + } else { + return rows.slice(0); + } +}; + +GroupRows.prototype.getGroups = function (compoment) { + var groupComponents = []; + + this.groupList.forEach(function (group) { + groupComponents.push(compoment ? group.getComponent() : group); + }); + + return groupComponents; +}; + +GroupRows.prototype.getChildGroups = function (group) { + var _this2 = this; + + var groupComponents = []; + + if (!group) { + group = this; + } + + group.groupList.forEach(function (child) { + if (child.groupList.length) { + groupComponents = groupComponents.concat(_this2.getChildGroups(child)); + } else { + groupComponents.push(child); + } + }); + + return groupComponents; +}; + +GroupRows.prototype.wipe = function () { + this.groupList.forEach(function (group) { + group.wipe(); + }); +}; + +GroupRows.prototype.pullGroupListData = function (groupList) { + var self = this; + var groupListData = []; + + groupList.forEach(function (group) { + var groupHeader = {}; + groupHeader.level = 0; + groupHeader.rowCount = 0; + groupHeader.headerContent = ""; + var childData = []; + + if (group.hasSubGroups) { + childData = self.pullGroupListData(group.groupList); + + groupHeader.level = group.level; + groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers + groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); + + groupListData.push(groupHeader); + groupListData = groupListData.concat(childData); + } else { + groupHeader.level = group.level; + groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); + groupHeader.rowCount = group.getRows().length; + + groupListData.push(groupHeader); + + group.getRows().forEach(function (row) { + groupListData.push(row.getData("data")); + }); + } + }); + + return groupListData; +}; + +GroupRows.prototype.getGroupedData = function () { + + return this.pullGroupListData(this.groupList); +}; + +GroupRows.prototype.getRowGroup = function (row) { + var match = false; + + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + + return match; +}; + +GroupRows.prototype.countGroups = function () { + return this.groupList.length; +}; + +GroupRows.prototype.generateGroups = function (rows) { + var self = this, + oldGroups = self.groups; + + self.groups = {}; + self.groupList = []; + + if (this.allowedValues && this.allowedValues[0]) { + this.allowedValues[0].forEach(function (value) { + self.createGroup(value, 0, oldGroups); + }); + + rows.forEach(function (row) { + self.assignRowToExistingGroup(row, oldGroups); + }); + } else { + rows.forEach(function (row) { + self.assignRowToGroup(row, oldGroups); + }); + } +}; + +GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { + var groupKey = level + "_" + groupID, + group; + + oldGroups = oldGroups || []; + + group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); + + this.groups[groupKey] = group; + this.groupList.push(group); +}; + +// GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ +// var groupID = this.groupIDLookups[0].func(row.getData()), +// groupKey = "0_" + groupID; + +// if(!this.groups[groupKey]){ +// this.createGroup(groupID, 0, oldGroups); +// } + +// this.groups[groupKey].addRow(row); +// }; + +GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + groupKey = "0_" + groupID; + + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } +}; + +GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + newGroupNeeded = !this.groups["0_" + groupID]; + + if (newGroupNeeded) { + this.createGroup(groupID, 0, oldGroups); + } + + this.groups["0_" + groupID].addRow(row); + + return !newGroupNeeded; +}; + +GroupRows.prototype.reassignRowToGroup = function (row) { + var oldRowGroup = row.getGroup(), + oldGroupPath = oldRowGroup.getPath(), + newGroupPath = this.getExpectedPath(row), + samePath = true; + // figure out if new group path is the same as old group path + var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { + return element === newGroupPath[index]; + }); + // refresh if they new path and old path aren't the same (aka the row's groupings have changed) + if (!samePath) { + oldRowGroup.removeRow(row); + this.assignRowToGroup(row, self.groups); + this.table.rowManager.refreshActiveData("group", false, true); + } +}; + +GroupRows.prototype.getExpectedPath = function (row) { + var groupPath = [], + rowData = row.getData(); + this.groupIDLookups.forEach(function (groupId) { + groupPath.push(groupId.func(rowData)); + }); + return groupPath; +}; + +GroupRows.prototype.updateGroupRows = function (force) { + var self = this, + output = [], + oldRowCount; + + self.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows()); + }); + + //force update of table display + if (force) { + + var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); + + if (displayIndex !== true) { + this.setDisplayIndex(displayIndex); + } + + self.table.rowManager.refreshActiveData("group", true, true); + } + + return output; +}; + +GroupRows.prototype.scrollHeaders = function (left) { + if (this.table.options.virtualDomHoz) { + left -= this.table.vdomHoz.vDomPadLeft; + } + + left = left + "px"; + + this.groupList.forEach(function (group) { + group.scrollHeader(left); + }); +}; + +GroupRows.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + } +}; + +Tabulator.prototype.registerModule("groupRows", GroupRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/group_rows.min.js b/Sources/CustomControls/Table/control/dist/js/modules/group_rows.min.js new file mode 100644 index 0000000..388b256 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/group_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(o){o.scrollHeader(t)})},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t),e=t.getElement();o>-1&&this.rows.splice(o,1),this.groupManager.table.options.groupValues||this.rows.length?(e.parentNode&&e.parentNode.removeChild(e),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var o=[];return o.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top)),o=o.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom)))),o},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;tr.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"("+r+" "+(1===r?o:e.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.getChildGroups=function(t){var o=this,e=[];return t||(t=this),t.groupList.forEach(function(t){t.groupList.length?e=e.concat(o.getChildGroups(t)):e.push(t)}),e},GroupRows.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.reassignRowToGroup=function(t){var o=t.getGroup(),e=o.getPath(),r=this.getExpectedPath(t);e.length==r.length&&e.every(function(t,o){return t===r[o]})||(o.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var o=[],e=t.getData();return this.groupIDLookups.forEach(function(t){o.push(t.func(e))}),o},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach(function(o){o.scrollHeader(t)})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/history.js b/Sources/CustomControls/Table/control/dist/js/modules/history.js new file mode 100644 index 0000000..7b0ac1b --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/history.js @@ -0,0 +1,156 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var History = function History(table) { + this.table = table; //hold Tabulator object + + this.history = []; + this.index = -1; +}; + +History.prototype.clear = function () { + this.history = []; + this.index = -1; +}; + +History.prototype.action = function (type, component, data) { + + this.history = this.history.slice(0, this.index + 1); + + this.history.push({ + type: type, + component: component, + data: data + }); + + this.index++; +}; + +History.prototype.getHistoryUndoSize = function () { + return this.index + 1; +}; + +History.prototype.getHistoryRedoSize = function () { + return this.history.length - (this.index + 1); +}; + +History.prototype.clearComponentHistory = function (component) { + var index = this.history.findIndex(function (item) { + return item.component === component; + }); + + if (index > -1) { + this.history.splice(index, 1); + if (index <= this.index) { + this.index--; + } + + this.clearComponentHistory(component); + } +}; + +History.prototype.undo = function () { + + if (this.index > -1) { + var action = this.history[this.index]; + + this.undoers[action.type].call(this, action); + + this.index--; + + this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Undo Error - No more history to undo"); + return false; + } +}; + +History.prototype.redo = function () { + if (this.history.length - 1 > this.index) { + + this.index++; + + var action = this.history[this.index]; + + this.redoers[action.type].call(this, action); + + this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Redo Error - No more history to redo"); + return false; + } +}; + +History.prototype.undoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function rowAdd(action) { + action.component.deleteActual(); + }, + + rowDelete: function rowDelete(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after); + this.table.rowManager.redraw(); + } +}; + +History.prototype.redoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function rowAdd(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowDelete: function rowDelete(action) { + action.component.deleteActual(); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after); + this.table.rowManager.redraw(); + } +}; + +//rebind rows to new element after deletion +History.prototype._rebindRow = function (oldRow, newRow) { + this.history.forEach(function (action) { + if (action.component instanceof Row) { + if (action.component === oldRow) { + action.component = newRow; + } + } else if (action.component instanceof Cell) { + if (action.component.row === oldRow) { + var field = action.component.column.getField(); + + if (field) { + action.component = newRow.getCell(field); + } + } + } + }); +}; + +Tabulator.prototype.registerModule("history", History); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/history.min.js b/Sources/CustomControls/Table/control/dist/js/modules/history.min.js new file mode 100644 index 0000000..8ed5598 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/history.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var o=this.history.findIndex(function(o){return o.component===t});o>-1&&(this.history.splice(o,1),o<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var i=e.component.column.getField();i&&(e.component=o.getCell(i))}})},Tabulator.prototype.registerModule("history",History); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.js b/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.js new file mode 100644 index 0000000..3417f76 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.js @@ -0,0 +1,191 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var HtmlTableImport = function HtmlTableImport(table) { + this.table = table; //hold Tabulator object + this.fieldIndex = []; + this.hasIndex = false; +}; + +HtmlTableImport.prototype.parseTable = function () { + var self = this, + element = self.table.element, + options = self.table.options, + columns = options.columns, + headers = element.getElementsByTagName("th"), + rows = element.getElementsByTagName("tbody")[0], + data = [], + newTable; + + self.hasIndex = false; + + self.table.options.htmlImporting.call(this.table); + + rows = rows ? rows.getElementsByTagName("tr") : []; + + //check for tablator inline options + self._extractOptions(element, options); + + if (headers.length) { + self._extractHeaders(headers, rows); + } else { + self._generateBlankHeaders(headers, rows); + } + + //iterate through table rows and build data set + for (var index = 0; index < rows.length; index++) { + var row = rows[index], + cells = row.getElementsByTagName("td"), + item = {}; + + //create index if the dont exist in table + if (!self.hasIndex) { + item[options.index] = index; + } + + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (typeof this.fieldIndex[i] !== "undefined") { + item[this.fieldIndex[i]] = cell.innerHTML; + } + } + + //add row data to item + data.push(item); + } + + //create new element + var newElement = document.createElement("div"); + + //transfer attributes to new element + var attributes = element.attributes; + + // loop through attributes and apply them on div + + for (var i in attributes) { + if (_typeof(attributes[i]) == "object") { + newElement.setAttribute(attributes[i].name, attributes[i].value); + } + } + + // replace table with div element + element.parentNode.replaceChild(newElement, element); + + options.data = data; + + self.table.options.htmlImported.call(this.table); + + // // newElement.tabulator(options); + + this.table.element = newElement; +}; + +//extract tabulator attribute options +HtmlTableImport.prototype._extractOptions = function (element, options, defaultOptions) { + var attributes = element.attributes; + var optionsArr = defaultOptions ? Object.assign([], defaultOptions) : Object.keys(options); + var optionsList = {}; + + optionsArr.forEach(function (item) { + optionsList[item.toLowerCase()] = item; + }); + + for (var index in attributes) { + var attrib = attributes[index]; + var name; + + if (attrib && (typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + name = attrib.name.replace("tabulator-", ""); + + if (typeof optionsList[name] !== "undefined") { + options[optionsList[name]] = this._attribValue(attrib.value); + } + } + } +}; + +//get value of attribute +HtmlTableImport.prototype._attribValue = function (value) { + if (value === "true") { + return true; + } + + if (value === "false") { + return false; + } + + return value; +}; + +//find column if it has already been defined +HtmlTableImport.prototype._findCol = function (title) { + var match = this.table.options.columns.find(function (column) { + return column.title === title; + }); + + return match || false; +}; + +//extract column from headers +HtmlTableImport.prototype._extractHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + exists = false, + col = this._findCol(header.textContent), + width, + attributes; + + if (col) { + exists = true; + } else { + col = { title: header.textContent.trim() }; + } + + if (!col.field) { + col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); + } + + width = header.getAttribute("width"); + + if (width && !col.width) { + col.width = width; + } + + //check for tablator inline options + attributes = header.attributes; + + // //check for tablator inline options + this._extractOptions(header, col, Column.prototype.defaultOptionList); + + this.fieldIndex[index] = col.field; + + if (col.field == this.table.options.index) { + this.hasIndex = true; + } + + if (!exists) { + this.table.options.columns.push(col); + } + } +}; + +//generate blank headers +HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + col = { title: "", field: "col" + index }; + + this.fieldIndex[index] = col.field; + + var width = header.getAttribute("width"); + + if (width) { + col.width = width; + } + + this.table.options.columns.push(col); + } +}; + +Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.min.js b/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.min.js new file mode 100644 index 0000000..e5f83ea --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/html_table_import.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,a=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],l=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),a.length?t._extractHeaders(a,n):t._generateBlankHeaders(a,n);for(var r=0;r -1) { + self.pressedKeys.splice(index, 1); + } + } + }; + + this.table.element.addEventListener("keydown", this.keyupBinding); + + this.table.element.addEventListener("keyup", this.keydownBinding); +}; + +Keybindings.prototype.clearBindings = function () { + if (this.keyupBinding) { + this.table.element.removeEventListener("keydown", this.keyupBinding); + } + + if (this.keydownBinding) { + this.table.element.removeEventListener("keyup", this.keydownBinding); + } +}; + +Keybindings.prototype.checkBinding = function (e, binding) { + var self = this, + match = true; + + if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta) { + binding.keys.forEach(function (key) { + var index = self.pressedKeys.indexOf(key); + + if (index == -1) { + match = false; + } + }); + + if (match) { + binding.action.call(self, e); + } + + return true; + } + + return false; +}; + +//default bindings +Keybindings.prototype.bindings = { + navPrev: "shift + 9", + navNext: 9, + navUp: 38, + navDown: 40, + scrollPageUp: 33, + scrollPageDown: 34, + scrollToStart: 36, + scrollToEnd: 35, + undo: "ctrl + 90", + redo: "ctrl + 89", + copyToClipboard: "ctrl + 67" +}; + +//default actions +Keybindings.prototype.actions = { + keyBlock: function keyBlock(e) { + e.stopPropagation(); + e.preventDefault(); + }, + scrollPageUp: function scrollPageUp(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop - rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos >= 0) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + } + + this.table.element.focus(); + }, + scrollPageDown: function scrollPageDown(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop + rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos <= scrollMax) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + } + + this.table.element.focus(); + }, + scrollToStart: function scrollToStart(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + + this.table.element.focus(); + }, + scrollToEnd: function scrollToEnd(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + + this.table.element.focus(); + }, + navPrev: function navPrev(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().prev(); + } + } + }, + + navNext: function navNext(e) { + var cell = false; + var newRow = this.table.options.tabEndNewRow; + var nav; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + + nav = cell.nav(); + + if (!nav.next()) { + if (newRow) { + + cell.getElement().firstChild.blur(); + + if (newRow === true) { + newRow = this.table.addRow({}); + } else { + if (typeof newRow == "function") { + newRow = this.table.addRow(newRow(cell.row.getComponent())); + } else { + newRow = this.table.addRow(Object.assign({}, newRow)); + } + } + + newRow.then(function () { + setTimeout(function () { + nav.next(); + }); + }); + } + } + } + } + }, + + navLeft: function navLeft(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().left(); + } + } + }, + + navRight: function navRight(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().right(); + } + } + }, + + navUp: function navUp(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().up(); + } + } + }, + + navDown: function navDown(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().down(); + } + } + }, + + undo: function undo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.undo(); + } + } + }, + + redo: function redo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.redo(); + } + } + }, + + copyToClipboard: function copyToClipboard(e) { + if (!this.table.modules.edit.currentCell) { + if (this.table.modExists("clipboard", true)) { + this.table.modules.clipboard.copy(false, true); + } + } + } +}; + +Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/keybindings.min.js b/Sources/CustomControls/Table/control/dist/js/modules/keybindings.min.js new file mode 100644 index 0000000..ce8bfe2 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/keybindings.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var i in this.bindings)e[i]=this.bindings[i];if(Object.keys(t).length)for(var n in t)e[n]=t[n];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,i=this;for(var n in t)!function(n){e.actions[n]?t[n]&&("object"!==_typeof(t[n])&&(t[n]=[t[n]]),t[n].forEach(function(t){i.mapBinding(n,t)})):console.warn("Key Binding Error - no such action:",n)}(n)},Keybindings.prototype.mapBinding=function(t,e){var i=this,n={action:this.actions[t],keys:[],ctrl:!1,shift:!1,meta:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!0;break;case"meta":n.meta=!0;break;default:t=parseInt(t),n.keys.push(t),i.watchKeys[t]||(i.watchKeys[t]=[]),i.watchKeys[t].push(n)}})},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var i=e.keyCode,n=t.watchKeys[i];n&&(t.pressedKeys.push(i),n.forEach(function(i){t.checkBinding(e,i)}))},this.keydownBinding=function(e){var i=e.keyCode;if(t.watchKeys[i]){var n=t.pressedKeys.indexOf(i);n>-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var i=this,n=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach(function(t){-1==i.pressedKeys.indexOf(t)&&(n=!1)}),n&&e.action.call(i,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.height,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,i=!1,n=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(i=this.table.modules.edit.currentCell)&&(t.preventDefault(),e=i.nav(),e.next()||n&&(i.getElement().firstChild.blur(),n=!0===n?this.table.addRow({}):"function"==typeof n?this.table.addRow(n(i.row.getComponent())):this.table.addRow(Object.assign({},n)),n.then(function(){setTimeout(function(){e.next()})})))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/menu.js b/Sources/CustomControls/Table/control/dist/js/modules/menu.js new file mode 100644 index 0000000..1ad5df9 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/menu.js @@ -0,0 +1,310 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Menu = function Menu(table) { + this.table = table; //hold Tabulator object + this.menuElements = []; + this.blurEvent = this.hideMenu.bind(this); + this.escEvent = this.escMenu.bind(this); + this.nestedMenuBlock = false; + this.positionReversedX = false; +}; + +Menu.prototype.initializeColumnHeader = function (column) { + var _this = this; + + var headerMenuEl; + + if (column.definition.headerContextMenu) { + column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); + this.tapHold(column, column.definition.headerContextMenu); + } + + // if(column.definition.headerClickMenu){ + // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); + // } + + if (column.definition.headerMenu) { + + headerMenuEl = document.createElement("span"); + headerMenuEl.classList.add("tabulator-header-menu-button"); + headerMenuEl.innerHTML = "⋮"; + + headerMenuEl.addEventListener("click", function (e) { + e.stopPropagation(); + e.preventDefault(); + + _this.LoadMenuEvent(column, column.definition.headerMenu, e); + }); + + column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild); + } +}; + +Menu.prototype.LoadMenuEvent = function (component, menu, e) { + menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu; + + // if(component instanceof Cell){ + // e.stopImmediatePropagation(); + // } + + this.loadMenu(e, component, menu); +}; + +Menu.prototype.tapHold = function (component, menu) { + var _this2 = this; + + var element = component.getElement(), + tapHold = null, + loaded = false; + + element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + loaded = false; + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + loaded = true; + + _this2.LoadMenuEvent(component, menu, e); + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + + if (loaded) { + e.preventDefault(); + } + }); +}; + +Menu.prototype.initializeCell = function (cell) { + if (cell.column.definition.contextMenu) { + cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); + this.tapHold(cell, cell.column.definition.contextMenu); + } + + if (cell.column.definition.clickMenu) { + cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); + } +}; + +Menu.prototype.initializeRow = function (row) { + if (this.table.options.rowContextMenu) { + row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); + this.tapHold(row, this.table.options.rowContextMenu); + } + + if (this.table.options.rowClickMenu) { + row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); + } +}; + +Menu.prototype.initializeGroup = function (group) { + if (this.table.options.groupContextMenu) { + group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); + this.tapHold(group, this.table.options.groupContextMenu); + } + + if (this.table.options.groupClickMenu) { + group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); + } +}; + +Menu.prototype.loadMenu = function (e, component, menu, parentEl) { + var _this3 = this; + + var touch = !(e instanceof MouseEvent); + + var menuEl = document.createElement("div"); + menuEl.classList.add("tabulator-menu"); + + if (!touch) { + e.preventDefault(); + } + + //abort if no menu set + if (!menu || !menu.length) { + return; + } + + if (!parentEl) { + if (this.nestedMenuBlock) { + //abort if child menu already open + if (this.isOpen()) { + return; + } + } else { + this.nestedMenuBlock = setTimeout(function () { + _this3.nestedMenuBlock = false; + }, 100); + } + + this.hideMenu(); + this.menuElements = []; + } + + menu.forEach(function (item) { + var itemEl = document.createElement("div"), + label = item.label, + disabled = item.disabled; + + if (item.separator) { + itemEl.classList.add("tabulator-menu-separator"); + } else { + itemEl.classList.add("tabulator-menu-item"); + + if (typeof label == "function") { + label = label.call(_this3.table, component.getComponent()); + } + + if (label instanceof Node) { + itemEl.appendChild(label); + } else { + itemEl.innerHTML = label; + } + + if (typeof disabled == "function") { + disabled = disabled.call(_this3.table, component.getComponent()); + } + + if (disabled) { + itemEl.classList.add("tabulator-menu-item-disabled"); + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + }); + } else { + if (item.menu && item.menu.length) { + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this3.hideOldSubMenus(menuEl); + _this3.loadMenu(e, component, item.menu, itemEl); + }); + } else { + if (item.action) { + itemEl.addEventListener("click", function (e) { + item.action(e, component.getComponent()); + }); + } + } + } + + if (item.menu && item.menu.length) { + itemEl.classList.add("tabulator-menu-item-submenu"); + } + } + + menuEl.appendChild(itemEl); + }); + + menuEl.addEventListener("click", function (e) { + _this3.hideMenu(); + }); + + this.menuElements.push(menuEl); + this.positionMenu(menuEl, parentEl, touch, e); +}; + +Menu.prototype.hideOldSubMenus = function (menuEl) { + var index = this.menuElements.indexOf(menuEl); + + if (index > -1) { + for (var i = this.menuElements.length - 1; i > index; i--) { + var el = this.menuElements[i]; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.menuElements.pop(); + } + } +}; + +Menu.prototype.positionMenu = function (element, parentEl, touch, e) { + var _this4 = this; + + var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), + x, + y, + parentOffset; + + if (!parentEl) { + x = touch ? e.touches[0].pageX : e.pageX; + y = touch ? e.touches[0].pageY : e.pageY; + + this.positionReversedX = false; + } else { + parentOffset = Tabulator.prototype.helpers.elOffset(parentEl); + x = parentOffset.left + parentEl.offsetWidth; + y = parentOffset.top - 1; + } + + element.style.top = y + "px"; + element.style.left = x + "px"; + + setTimeout(function () { + _this4.table.rowManager.element.addEventListener("scroll", _this4.blurEvent); + document.body.addEventListener("click", _this4.blurEvent); + document.body.addEventListener("contextmenu", _this4.blurEvent); + window.addEventListener("resize", _this4.blurEvent); + document.body.addEventListener("keydown", _this4.escEvent); + }, 100); + + document.body.appendChild(element); + + //move menu to start on bottom edge if it is too close to the edge of the screen + if (y + element.offsetHeight >= docHeight) { + element.style.top = ""; + + if (parentEl) { + element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px"; + } else { + element.style.bottom = docHeight - y + "px"; + } + } + + //move menu to start on right edge if it is too close to the edge of the screen + if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) { + element.style.left = ""; + + if (parentEl) { + element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px"; + } else { + element.style.right = document.documentElement.offsetWidth - x + "px"; + } + + this.positionReversedX = true; + } +}; + +Menu.prototype.isOpen = function () { + return !!this.menuElements.length; +}; + +Menu.prototype.escMenu = function (e) { + if (e.keyCode == 27) { + this.hideMenu(); + } +}; + +Menu.prototype.hideMenu = function () { + this.menuElements.forEach(function (menuEl) { + if (menuEl.parentNode) { + menuEl.parentNode.removeChild(menuEl); + } + }); + + document.body.removeEventListener("keydown", this.escEvent); + document.body.removeEventListener("click", this.blurEvent); + document.body.removeEventListener("contextmenu", this.blurEvent); + window.removeEventListener("resize", this.blurEvent); + this.table.rowManager.element.removeEventListener("scroll", this.blurEvent); +}; + +//default accessors +Menu.prototype.menus = {}; + +Tabulator.prototype.registerModule("menu", Menu); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/menu.min.js b/Sources/CustomControls/Table/control/dist/js/modules/menu.min.js new file mode 100644 index 0000000..8821774 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/menu.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var Menu=function(e){this.table=e,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};Menu.prototype.initializeColumnHeader=function(e){var t,n=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){t.stopPropagation(),t.preventDefault(),n.LoadMenuEvent(e,e.definition.headerMenu,t)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(e,t,n){t="function"==typeof t?t.call(this.table,e.getComponent(),n):t,this.loadMenu(n,e,t)},Menu.prototype.tapHold=function(e,t){var n=this,i=e.getElement(),o=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(o),s=!1,o=setTimeout(function(){clearTimeout(o),o=null,s=!0,n.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(o),o=null,s&&e.preventDefault()})},Menu.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},Menu.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(e,t,n,i){var o=this,s=!(e instanceof MouseEvent),u=document.createElement("div");if(u.classList.add("tabulator-menu"),s||e.preventDefault(),n&&n.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){o.nestedMenuBlock=!1},100);this.hideMenu(),this.menuElements=[]}n.forEach(function(e){var n=document.createElement("div"),i=e.label,s=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(o.table,t.getComponent())),i instanceof Node?n.appendChild(i):n.innerHTML=i,"function"==typeof s&&(s=s.call(o.table,t.getComponent())),s?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",function(e){e.stopPropagation()})):e.menu&&e.menu.length?n.addEventListener("click",function(i){i.stopPropagation(),o.hideOldSubMenus(u),o.loadMenu(i,t,e.menu,n)}):e.action&&n.addEventListener("click",function(n){e.action(n,t.getComponent())}),e.menu&&e.menu.length&&n.classList.add("tabulator-menu-item-submenu")),u.appendChild(n)}),u.addEventListener("click",function(e){o.hideMenu()}),this.menuElements.push(u),this.positionMenu(u,i,s,e)}},Menu.prototype.hideOldSubMenus=function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var n=this.menuElements.length-1;n>t;n--){var i=this.menuElements[n];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},Menu.prototype.positionMenu=function(e,t,n,i){var o,s,u,d=this,l=Math.max(document.body.offsetHeight,window.innerHeight);t?(u=Tabulator.prototype.helpers.elOffset(t),o=u.left+t.offsetWidth,s=u.top-1):(o=n?i.touches[0].pageX:i.pageX,s=n?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),e.style.top=s+"px",e.style.left=o+"px",setTimeout(function(){d.table.rowManager.element.addEventListener("scroll",d.blurEvent),document.body.addEventListener("click",d.blurEvent),document.body.addEventListener("contextmenu",d.blurEvent),window.addEventListener("resize",d.blurEvent),document.body.addEventListener("keydown",d.escEvent)},100),document.body.appendChild(e),s+e.offsetHeight>=l&&(e.style.top="",e.style.bottom=t?l-u.top-t.offsetHeight-1+"px":l-s+"px"),(o+e.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?document.documentElement.offsetWidth-u.left+"px":document.documentElement.offsetWidth-o+"px",this.positionReversedX=!0)},Menu.prototype.isOpen=function(){return!!this.menuElements.length},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuElements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.js b/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.js new file mode 100644 index 0000000..08c4c37 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.js @@ -0,0 +1,289 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var MoveColumns = function MoveColumns(table) { + this.table = table; //hold Tabulator object + this.placeholderElement = this.createPlaceholderElement(); + this.hoverElement = false; //floating column header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving column + this.toCol = false; //destination column + this.toColAfter = false; //position of moving column relative to the desitnation column + this.startX = 0; //starting position within header element + this.autoScrollMargin = 40; //auto scroll on edge when within margin + this.autoScrollStep = 5; //auto scroll distance in pixels + this.autoScrollTimeout = false; //auto scroll timeout + this.touchMove = false; + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); +}; + +MoveColumns.prototype.createPlaceholderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + el.classList.add("tabulator-col-placeholder"); + + return el; +}; + +MoveColumns.prototype.initializeColumn = function (column) { + var self = this, + config = {}, + colEl; + + if (!column.modules.frozen) { + + colEl = column.getElement(); + + config.mousemove = function (e) { + if (column.parent === self.moving.parent) { + if ((self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { + if (self.toCol !== column || !self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); + self.moveColumn(column, true); + } + } else { + if (self.toCol !== column || self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl); + self.moveColumn(column, false); + } + } + } + }.bind(self); + + colEl.addEventListener("mousedown", function (e) { + self.touchMove = false; + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, column); + }, self.checkPeriod); + } + }); + + colEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + self.bindTouchEvents(column); + } + + column.modules.moveColumn = config; +}; + +MoveColumns.prototype.bindTouchEvents = function (column) { + var self = this, + colEl = column.getElement(), + startXMove = false, + //shifting center position of the cell + dir = false, + currentCol, + nextCol, + prevCol, + nextColWidth, + prevColWidth, + nextColWidthLast, + prevColWidthLast; + + colEl.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentCol = column; + nextCol = column.nextColumn(); + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = column.prevColumn(); + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + nextColWidthLast = 0; + prevColWidthLast = 0; + startXMove = false; + + self.startMove(e, column); + }, self.checkPeriod); + }, { passive: true }); + + colEl.addEventListener("touchmove", function (e) { + var halfCol, diff, moveToCol; + + if (self.moving) { + self.moveHover(e); + + if (!startXMove) { + startXMove = e.touches[0].pageX; + } + + diff = e.touches[0].pageX - startXMove; + + if (diff > 0) { + if (nextCol && diff - nextColWidthLast > nextColWidth) { + moveToCol = nextCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement().nextSibling); + self.moveColumn(moveToCol, true); + } + } + } else { + if (prevCol && -diff - prevColWidthLast > prevColWidth) { + moveToCol = prevCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement()); + self.moveColumn(moveToCol, false); + } + } + } + + if (moveToCol) { + currentCol = moveToCol; + nextCol = moveToCol.nextColumn(); + nextColWidthLast = nextColWidth; + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = moveToCol.prevColumn(); + prevColWidthLast = prevColWidth; + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + } + } + }, { passive: true }); + + colEl.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + } + }); +}; + +MoveColumns.prototype.startMove = function (e, column) { + var element = column.getElement(); + + this.moving = column; + this.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(element).left; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = column.getWidth() + "px"; + this.placeholderElement.style.height = column.getHeight() + "px"; + + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + this.table.columnManager.getElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.bottom = "0"; + + if (!this.touchMove) { + this._bindMouseMove(); + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + } + + this.moveHover(e); +}; + +MoveColumns.prototype._bindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype._unbindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype.moveColumn = function (column, after) { + var movingCells = this.moving.getCells(); + + this.toCol = column; + this.toColAfter = after; + + if (after) { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + } else { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); + }); + } +}; + +MoveColumns.prototype.endMove = function (e) { + if (e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toCol) { + this.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter); + } + + this.moving = false; + this.toCol = false; + this.toColAfter = false; + + if (!this.touchMove) { + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + } + } +}; + +MoveColumns.prototype.moveHover = function (e) { + var self = this, + columnHolder = self.table.columnManager.getElement(), + scrollLeft = columnHolder.scrollLeft, + xPos = (self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, + scrollPos; + + self.hoverElement.style.left = xPos - self.startX + "px"; + + if (xPos - scrollLeft < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.max(0, scrollLeft - 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } + + if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } +}; + +Tabulator.prototype.registerModule("moveColumn", MoveColumns); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.min.js b/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.min.js new file mode 100644 index 0000000..ad687f8 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/moveable_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===o.moving.parent&&((o.touchMove?n.touches[0].pageX:n.pageX)-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=n},MoveColumns.prototype.bindTouchEvents=function(e){var t,o,n,l,i,s,m,r=this,u=e.getElement(),h=!1;u.addEventListener("touchstart",function(u){r.checkTimeout=setTimeout(function(){r.touchMove=!0,t=e,o=e.nextColumn(),l=o?o.getWidth()/2:0,n=e.prevColumn(),i=n?n.getWidth()/2:0,s=0,m=0,h=!1,r.startMove(u,e)},r.checkPeriod)},{passive:!0}),u.addEventListener("touchmove",function(u){var a,c;r.moving&&(r.moveHover(u),h||(h=u.touches[0].pageX),a=u.touches[0].pageX-h,a>0?o&&a-s>l&&(c=o)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement().nextSibling),r.moveColumn(c,!0)):n&&-a-m>i&&(c=n)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement()),r.moveColumn(c,!1)),c&&(t=c,o=c.nextColumn(),s=l,l=o?o.getWidth()/2:0,n=c.prevColumn(),m=i,i=n?n.getWidth()/2:0))},{passive:!0}),u.addEventListener("touchend",function(e){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(e)})},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var n=e.getElement(!0);n.parentNode.insertBefore(o[t].getElement(),n.nextSibling)}):e.getCells().forEach(function(e,t){var n=e.getElement(!0);n.parentNode.insertBefore(o[t].getElement(),n)})},MoveColumns.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(e){var t,o=this,n=o.table.columnManager.getElement(),l=n.scrollLeft,i=(o.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(n).left+l;o.hoverElement.style.left=i-o.startX+"px",i-l group.getHeight() / 2) { + if (self.toRow !== group || !self.toRowAfter) { + var rowEl = group.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(group, true); + } + } else { + if (self.toRow !== group || self.toRowAfter) { + var rowEl = group.getElement(); + if (rowEl.previousSibling) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(group, false); + } + } + } + }.bind(self); + + group.modules.moveRow = config; +}; + +MoveRows.prototype.initializeRow = function (row) { + var self = this, + config = {}, + rowEl; + + //inter table drag drop + config.mouseup = function (e) { + self.tableRowDrop(e, row); + }.bind(self); + + //same table drag drop + config.mousemove = function (e) { + var rowEl = row.getElement(); + + if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { + if (self.toRow !== row || !self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + } else { + if (self.toRow !== row || self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(row, false); + } + } + }.bind(self); + + if (!this.hasHandle) { + + rowEl = row.getElement(); + + rowEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, row); + }, self.checkPeriod); + } + }); + + rowEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(row, row.getElement()); + } + + row.modules.moveRow = config; +}; + +MoveRows.prototype.initializeCell = function (cell) { + var self = this, + cellEl = cell.getElement(true); + + cellEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, cell.row); + }, self.checkPeriod); + } + }); + + cellEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(cell.row, cellEl); +}; + +MoveRows.prototype.bindTouchEvents = function (row, element) { + var self = this, + startYMove = false, + //shifting center position of the cell + dir = false, + currentRow, + nextRow, + prevRow, + nextRowHeight, + prevRowHeight, + nextRowHeightLast, + prevRowHeightLast; + + element.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentRow = row; + nextRow = row.nextRow(); + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = row.prevRow(); + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + nextRowHeightLast = 0; + prevRowHeightLast = 0; + startYMove = false; + + self.startMove(e, row); + }, self.checkPeriod); + }, { passive: true }); + this.moving, this.toRow, this.toRowAfter; + element.addEventListener("touchmove", function (e) { + + var halfCol, diff, moveToRow; + + if (self.moving) { + e.preventDefault(); + + self.moveHover(e); + + if (!startYMove) { + startYMove = e.touches[0].pageY; + } + + diff = e.touches[0].pageY - startYMove; + + if (diff > 0) { + if (nextRow && diff - nextRowHeightLast > nextRowHeight) { + moveToRow = nextRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement().nextSibling); + self.moveRow(moveToRow, true); + } + } + } else { + if (prevRow && -diff - prevRowHeightLast > prevRowHeight) { + moveToRow = prevRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement()); + self.moveRow(moveToRow, false); + } + } + } + + if (moveToRow) { + currentRow = moveToRow; + nextRow = moveToRow.nextRow(); + nextRowHeightLast = nextRowHeight; + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = moveToRow.prevRow(); + prevRowHeightLast = prevRowHeight; + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + } + } + }); + + element.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + self.touchMove = false; + } + }); +}; + +MoveRows.prototype._bindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype._unbindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype.startMove = function (e, row) { + var element = row.getElement(); + + this.setStartPosition(e, row); + + this.moving = row; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = row.getWidth() + "px"; + this.placeholderElement.style.height = row.getHeight() + "px"; + + if (!this.connection) { + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + } else { + this.table.element.classList.add("tabulator-movingrow-sending"); + this.connectToTables(row); + } + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + if (this.connection) { + document.body.appendChild(this.hoverElement); + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + this.hoverElement.style.width = this.table.element.clientWidth + "px"; + this.hoverElement.style.whiteSpace = "nowrap"; + this.hoverElement.style.overflow = "hidden"; + this.hoverElement.style.pointerEvents = "none"; + } else { + this.table.rowManager.getTableElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + + this._bindMouseMove(); + } + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + + this.moveHover(e); +}; + +MoveRows.prototype.setStartPosition = function (e, row) { + var pageX = this.touchMove ? e.touches[0].pageX : e.pageX, + pageY = this.touchMove ? e.touches[0].pageY : e.pageY, + element, + position; + + element = row.getElement(); + if (this.connection) { + position = element.getBoundingClientRect(); + + this.startX = position.left - pageX + window.pageXOffset; + this.startY = position.top - pageY + window.pageYOffset; + } else { + this.startY = pageY - element.getBoundingClientRect().top; + } +}; + +MoveRows.prototype.endMove = function (e) { + if (!e || e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + if (!this.connection) { + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + } + + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toRow) { + this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); + } + + this.moving = false; + this.toRow = false; + this.toRowAfter = false; + + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + + if (this.connection) { + this.table.element.classList.remove("tabulator-movingrow-sending"); + this.disconnectFromTables(); + } + } +}; + +MoveRows.prototype.moveRow = function (row, after) { + this.toRow = row; + this.toRowAfter = after; +}; + +MoveRows.prototype.moveHover = function (e) { + if (this.connection) { + this.moveHoverConnections.call(this, e); + } else { + this.moveHoverTable.call(this, e); + } +}; + +MoveRows.prototype.moveHoverTable = function (e) { + var rowHolder = this.table.rowManager.getElement(), + scrollTop = rowHolder.scrollTop, + yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop, + scrollPos; + + this.hoverElement.style.top = yPos - this.startY + "px"; +}; + +MoveRows.prototype.moveHoverConnections = function (e) { + this.hoverElement.style.left = this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX) + "px"; + this.hoverElement.style.top = this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY) + "px"; +}; + +MoveRows.prototype.elementRowDrop = function (e, element, row) { + if (this.table.options.movableRowsElementDrop) { + this.table.options.movableRowsElementDrop(e, element, row ? row.getComponent() : false); + } +}; + +//establish connection with other tables +MoveRows.prototype.connectToTables = function (row) { + var _this = this; + + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStart.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "connect", { + row: row + }); + } + + if (this.connectionSelectorsElements) { + + this.connectionElements = []; + + if (!Array.isArray(this.connectionSelectorsElements)) { + this.connectionSelectorsElements = [this.connectionSelectorsElements]; + } + + this.connectionSelectorsElements.forEach(function (query) { + if (typeof query === "string") { + _this.connectionElements = _this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); + } else { + _this.connectionElements.push(query); + } + }); + + this.connectionElements.forEach(function (element) { + var dropEvent = function dropEvent(e) { + _this.elementRowDrop(e, element, _this.moving); + }; + + element.addEventListener("mouseup", dropEvent); + element.tabulatorElementDropEvent = dropEvent; + + element.classList.add("tabulator-movingrow-receiving"); + }); + } +}; + +//disconnect from other tables +MoveRows.prototype.disconnectFromTables = function () { + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStop.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "disconnect"); + } + + this.connectionElements.forEach(function (element) { + element.classList.remove("tabulator-movingrow-receiving"); + element.removeEventListener("mouseup", element.tabulatorElementDropEvent); + delete element.tabulatorElementDropEvent; + }); +}; + +//accept incomming connection +MoveRows.prototype.connect = function (table, row) { + var self = this; + if (!this.connectedTable) { + this.connectedTable = table; + this.connectedRow = row; + + this.table.element.classList.add("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.tableRowDropEvent = self.tableRowDrop.bind(self); + + self.table.element.addEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStart.call(this.table, row, table); + + return true; + } else { + console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); + return false; + } +}; + +//close incomming connection +MoveRows.prototype.disconnect = function (table) { + var self = this; + if (table === this.connectedTable) { + this.connectedTable = false; + this.connectedRow = false; + + this.table.element.classList.remove("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStop.call(this.table, table); + } else { + console.warn("Move Row Error - trying to disconnect from non connected table"); + } +}; + +MoveRows.prototype.dropComplete = function (table, row, success) { + var sender = false; + + if (success) { + + switch (_typeof(this.table.options.movableRowsSender)) { + case "string": + sender = this.senders[this.table.options.movableRowsSender]; + break; + + case "function": + sender = this.table.options.movableRowsSender; + break; + } + + if (sender) { + sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + if (this.table.options.movableRowsSender) { + console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); + } + } + + this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } + + this.endMove(); +}; + +MoveRows.prototype.tableRowDrop = function (e, row) { + var receiver = false, + success = false; + + console.trace("drop"); + + e.stopImmediatePropagation(); + + switch (_typeof(this.table.options.movableRowsReceiver)) { + case "string": + receiver = this.receivers[this.table.options.movableRowsReceiver]; + break; + + case "function": + receiver = this.table.options.movableRowsReceiver; + break; + } + + if (receiver) { + success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); + } + + if (success) { + this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } + + this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { + row: row, + success: success + }); +}; + +MoveRows.prototype.receivers = { + insert: function insert(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData(), undefined, toRow); + return true; + }, + + add: function add(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData()); + return true; + }, + + update: function update(fromRow, toRow, fromTable) { + if (toRow) { + toRow.update(fromRow.getData()); + return true; + } + + return false; + }, + + replace: function replace(fromRow, toRow, fromTable) { + if (toRow) { + this.table.addRow(fromRow.getData(), undefined, toRow); + toRow.delete(); + return true; + } + + return false; + } +}; + +MoveRows.prototype.senders = { + delete: function _delete(fromRow, toRow, toTable) { + fromRow.delete(); + } +}; + +MoveRows.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "connect": + return this.connect(table, data.row); + break; + + case "disconnect": + return this.disconnect(table); + break; + + case "dropcomplete": + return this.dropComplete(table, data.row, data.success); + break; + } +}; + +Tabulator.prototype.registerModule("moveRow", MoveRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/moveable_rows.min.js b/Sources/CustomControls/Table/control/dist/js/modules/moveable_rows.min.js new file mode 100644 index 0000000..5070ffd --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/moveable_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MoveRows=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},MoveRows.prototype.initialize=function(e){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},MoveRows.prototype.setHandle=function(e){this.hasHandle=e},MoveRows.prototype.initializeGroupHeader=function(e){var t=this,o={};o.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),o.mousemove=function(o){if(o.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var n=e.getElement();n.previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){var n=e.getElement();t.pageY-Tabulator.prototype.helpers.elOffset(n).top+o.table.rowManager.element.scrollTop>e.getHeight()/2?o.toRow===e&&o.toRowAfter||(n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)):(o.toRow!==e||o.toRowAfter)&&(n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1))}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement(!0);o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,o)},MoveRows.prototype.bindTouchEvents=function(e,t){var o,n,s,i,l,c,r,a=this,h=!1;t.addEventListener("touchstart",function(t){a.checkTimeout=setTimeout(function(){a.touchMove=!0,o=e,n=e.nextRow(),i=n?n.getHeight()/2:0,s=e.prevRow(),l=s?s.getHeight()/2:0,c=0,r=0,h=!1,a.startMove(t,e)},a.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var m,v;a.moving&&(t.preventDefault(),a.moveHover(t),h||(h=t.touches[0].pageY),m=t.touches[0].pageY-h,m>0?n&&m-c>i&&(v=n)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement().nextSibling),a.moveRow(v,!0)):s&&-m-r>l&&(v=s)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement()),a.moveRow(v,!1)),v&&(o=v,n=v.nextRow(),c=i,i=n?n.getHeight()/2:0,s=v.prevRow(),r=l,l=s?s.getHeight()/2:0))}),t.addEventListener("touchend",function(e){a.checkTimeout&&clearTimeout(a.checkTimeout),a.moving&&(a.endMove(e),a.touchMove=!1)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n,s=this.touchMove?e.touches[0].pageX:e.pageX,i=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-s+window.pageXOffset,this.startY=n.top-i+window.pageYOffset):this.startY=i-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},MoveRows.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/mutator.js b/Sources/CustomControls/Table/control/dist/js/modules/mutator.js new file mode 100644 index 0000000..ece1f7d --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/mutator.js @@ -0,0 +1,116 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Mutator = function Mutator(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types + this.enabled = true; +}; + +//initialize column mutator +Mutator.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + mutator; + + if (column.definition[key]) { + mutator = self.lookupMutator(column.definition[key]); + + if (mutator) { + match = true; + + config[key] = { + mutator: mutator, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.mutate = config; + } +}; + +Mutator.prototype.lookupMutator = function (value) { + var mutator = false; + + //set column mutator + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "string": + if (this.mutators[value]) { + mutator = this.mutators[value]; + } else { + console.warn("Mutator Error - No such mutator found, ignoring: ", value); + } + break; + + case "function": + mutator = value; + break; + } + + return mutator; +}; + +//apply mutator to row +Mutator.prototype.transformRow = function (data, type, updatedData) { + var self = this, + key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + value; + + if (this.enabled) { + + self.table.columnManager.traverse(function (column) { + var mutator, params, component; + + if (column.modules.mutate) { + mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; + + if (mutator) { + value = column.getFieldValue(typeof updatedData !== "undefined" ? updatedData : data); + + if (type == "data" || typeof value !== "undefined") { + component = column.getComponent(); + params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; + column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); + } + } + } + }); + } + + return data; +}; + +//apply mutator to new cell value +Mutator.prototype.transformCell = function (cell, value) { + var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false, + tempData = {}; + + if (mutator) { + tempData = Object.assign(tempData, cell.row.getData()); + cell.column.setFieldValue(tempData, value); + return mutator.mutator(value, tempData, "edit", mutator.params, cell.getComponent()); + } else { + return value; + } +}; + +Mutator.prototype.enable = function () { + this.enabled = true; +}; + +Mutator.prototype.disable = function () { + this.enabled = false; +}; + +//default mutators +Mutator.prototype.mutators = {}; + +Tabulator.prototype.registerModule("mutator", Mutator); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/mutator.min.js b/Sources/CustomControls/Table/control/dist/js/modules/mutator.min.js new file mode 100644 index 0000000..5d1d73b --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/mutator.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var o=this,e=!1,a={};this.allowedTypes.forEach(function(r){var u,n="mutator"+(r.charAt(0).toUpperCase()+r.slice(1));t.definition[n]&&(u=o.lookupMutator(t.definition[n]))&&(e=!0,a[n]={mutator:u,params:t.definition[n+"Params"]||{}})}),e&&(t.modules.mutate=a)},Mutator.prototype.lookupMutator=function(t){var o=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?o=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":o=t}return o},Mutator.prototype.transformRow=function(t,o,e){var a,r=this,u="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));return this.enabled&&r.table.columnManager.traverse(function(r){var n,i,s;r.modules.mutate&&(n=r.modules.mutate[u]||r.modules.mutate.mutator||!1)&&(a=r.getFieldValue(void 0!==e?e:t),"data"!=o&&void 0===a||(s=r.getComponent(),i="function"==typeof n.params?n.params(a,t,o,s):n.params,r.setFieldValue(t,n.mutator(a,t,o,i,s))))}),t},Mutator.prototype.transformCell=function(t,o){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,a={};return e?(a=Object.assign(a,t.row.getData()),t.column.setFieldValue(a,o),e.mutator(o,a,"edit",e.params,t.getComponent())):o},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/page.js b/Sources/CustomControls/Table/control/dist/js/modules/page.js new file mode 100644 index 0000000..78b9a17 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/page.js @@ -0,0 +1,730 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Page = function Page(table) { + + this.table = table; //hold Tabulator object + + this.mode = "local"; + this.progressiveLoad = false; + + this.size = 0; + this.page = 1; + this.count = 5; + this.max = 1; + + this.displayIndex = 0; //index in display pipeline + + this.initialLoad = true; + + this.pageSizes = []; + + this.dataReceivedNames = {}; + this.dataSentNames = {}; + + this.createElements(); +}; + +Page.prototype.createElements = function () { + + var button; + + this.element = document.createElement("span"); + this.element.classList.add("tabulator-paginator"); + + this.pagesElement = document.createElement("span"); + this.pagesElement.classList.add("tabulator-pages"); + + button = document.createElement("button"); + button.classList.add("tabulator-page"); + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + button.setAttribute("aria-label", ""); + button.setAttribute("title", ""); + + this.firstBut = button.cloneNode(true); + this.firstBut.setAttribute("data-page", "first"); + + this.prevBut = button.cloneNode(true); + this.prevBut.setAttribute("data-page", "prev"); + + this.nextBut = button.cloneNode(true); + this.nextBut.setAttribute("data-page", "next"); + + this.lastBut = button.cloneNode(true); + this.lastBut.setAttribute("data-page", "last"); + + if (this.table.options.paginationSizeSelector) { + this.pageSizeSelect = document.createElement("select"); + this.pageSizeSelect.classList.add("tabulator-page-size"); + } +}; + +Page.prototype.generatePageSizeSelectList = function () { + var _this = this; + + var pageSizes = []; + + if (this.pageSizeSelect) { + + if (Array.isArray(this.table.options.paginationSizeSelector)) { + pageSizes = this.table.options.paginationSizeSelector; + this.pageSizes = pageSizes; + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes.unshift(this.size); + } + } else { + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes = []; + + for (var i = 1; i < 5; i++) { + pageSizes.push(this.size * i); + } + + this.pageSizes = pageSizes; + } else { + pageSizes = this.pageSizes; + } + } + + while (this.pageSizeSelect.firstChild) { + this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild); + }pageSizes.forEach(function (item) { + var itemEl = document.createElement("option"); + itemEl.value = item; + + if (item === true) { + _this.table.modules.localize.bind("pagination|all", function (value) { + itemEl.innerHTML = value; + }); + } else { + itemEl.innerHTML = item; + } + + _this.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } +}; + +//setup pageination +Page.prototype.initialize = function (hidden) { + var self = this, + pageSelectLabel, + testElRow, + testElCell; + + //update param names + this.dataSentNames = Object.assign({}, this.paginationDataSentNames); + this.dataSentNames = Object.assign(this.dataSentNames, this.table.options.paginationDataSent); + + this.dataReceivedNames = Object.assign({}, this.paginationDataReceivedNames); + this.dataReceivedNames = Object.assign(this.dataReceivedNames, this.table.options.paginationDataReceived); + + //build pagination element + + //bind localizations + self.table.modules.localize.bind("pagination|first", function (value) { + self.firstBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|first_title", function (value) { + self.firstBut.setAttribute("aria-label", value); + self.firstBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|prev", function (value) { + self.prevBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|prev_title", function (value) { + self.prevBut.setAttribute("aria-label", value); + self.prevBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|next", function (value) { + self.nextBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|next_title", function (value) { + self.nextBut.setAttribute("aria-label", value); + self.nextBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|last", function (value) { + self.lastBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|last_title", function (value) { + self.lastBut.setAttribute("aria-label", value); + self.lastBut.setAttribute("title", value); + }); + + //click bindings + self.firstBut.addEventListener("click", function () { + self.setPage(1).then(function () {}).catch(function () {}); + }); + + self.prevBut.addEventListener("click", function () { + self.previousPage().then(function () {}).catch(function () {}); + }); + + self.nextBut.addEventListener("click", function () { + self.nextPage().then(function () {}).catch(function () {}); + }); + + self.lastBut.addEventListener("click", function () { + self.setPage(self.max).then(function () {}).catch(function () {}); + }); + + if (self.table.options.paginationElement) { + self.element = self.table.options.paginationElement; + } + + if (this.pageSizeSelect) { + pageSelectLabel = document.createElement("label"); + + self.table.modules.localize.bind("pagination|page_size", function (value) { + self.pageSizeSelect.setAttribute("aria-label", value); + self.pageSizeSelect.setAttribute("title", value); + pageSelectLabel.innerHTML = value; + }); + + self.element.appendChild(pageSelectLabel); + self.element.appendChild(self.pageSizeSelect); + + self.pageSizeSelect.addEventListener("change", function (e) { + self.setPageSize(self.pageSizeSelect.value == "true" ? true : self.pageSizeSelect.value); + self.setPage(1).then(function () {}).catch(function () {}); + }); + } + + //append to DOM + self.element.appendChild(self.firstBut); + self.element.appendChild(self.prevBut); + self.element.appendChild(self.pagesElement); + self.element.appendChild(self.nextBut); + self.element.appendChild(self.lastBut); + + if (!self.table.options.paginationElement && !hidden) { + self.table.footerManager.append(self.element, self); + } + + //set default values + self.mode = self.table.options.pagination; + + if (self.table.options.paginationSize) { + self.size = self.table.options.paginationSize; + } else { + testElRow = document.createElement("div"); + testElRow.classList.add("tabulator-row"); + testElRow.style.visibility = hidden; + + testElCell = document.createElement("div"); + testElCell.classList.add("tabulator-cell"); + testElCell.innerHTML = "Page Row Test"; + + testElRow.appendChild(testElCell); + + self.table.rowManager.getTableElement().appendChild(testElRow); + + self.size = Math.floor(self.table.rowManager.getElement().clientHeight / testElRow.offsetHeight); + + self.table.rowManager.getTableElement().removeChild(testElRow); + } + + // self.page = self.table.options.paginationInitialPage || 1; + self.count = self.table.options.paginationButtonCount; + + self.generatePageSizeSelectList(); +}; + +Page.prototype.initializeProgressive = function (mode) { + this.initialize(true); + this.mode = "progressive_" + mode; + this.progressiveLoad = true; +}; + +Page.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +Page.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +//calculate maximum page from number of rows +Page.prototype.setMaxRows = function (rowCount) { + if (!rowCount) { + this.max = 1; + } else { + this.max = this.size === true ? 1 : Math.ceil(rowCount / this.size); + } + + if (this.page > this.max) { + this.page = this.max; + } +}; + +//reset to first page without triggering action +Page.prototype.reset = function (force, columnsChanged) { + if (this.mode == "local" || force) { + this.page = 1; + } + + if (columnsChanged) { + this.initialLoad = true; + } + + return true; +}; + +//set the maxmum page +Page.prototype.setMaxPage = function (max) { + + max = parseInt(max); + + this.max = max || 1; + + if (this.page > this.max) { + this.page = this.max; + this.trigger(); + } +}; + +//set current page number +Page.prototype.setPage = function (page) { + var _this2 = this; + + var self = this; + + switch (page) { + case "first": + return this.setPage(1); + break; + + case "prev": + return this.previousPage(); + break; + + case "next": + return this.nextPage(); + break; + + case "last": + return this.setPage(this.max); + break; + } + + return new Promise(function (resolve, reject) { + + page = parseInt(page); + + if (page > 0 && page <= _this2.max) { + _this2.page = page; + _this2.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.page) { + self.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Requested page is out of range of 1 - " + _this2.max + ":", page); + reject(); + } + }); +}; + +Page.prototype.setPageToRow = function (row) { + var _this3 = this; + + return new Promise(function (resolve, reject) { + + var rows = _this3.table.rowManager.getDisplayRows(_this3.displayIndex - 1); + var index = rows.indexOf(row); + + if (index > -1) { + var page = _this3.size === true ? 1 : Math.ceil((index + 1) / _this3.size); + + _this3.setPage(page).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Requested row is not visible"); + reject(); + } + }); +}; + +Page.prototype.setPageSize = function (size) { + if (size !== true) { + size = parseInt(size); + } + + if (size > 0) { + this.size = size; + } + + if (this.pageSizeSelect) { + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.page) { + this.table.modules.persistence.save("page"); + } +}; + +//setup the pagination buttons +Page.prototype._setPageButtons = function () { + var self = this; + + var leftSize = Math.floor((this.count - 1) / 2); + var rightSize = Math.ceil((this.count - 1) / 2); + var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); + var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); + + while (self.pagesElement.firstChild) { + self.pagesElement.removeChild(self.pagesElement.firstChild); + }if (self.page == 1) { + self.firstBut.disabled = true; + self.prevBut.disabled = true; + } else { + self.firstBut.disabled = false; + self.prevBut.disabled = false; + } + + if (self.page == self.max) { + self.lastBut.disabled = true; + self.nextBut.disabled = true; + } else { + self.lastBut.disabled = false; + self.nextBut.disabled = false; + } + + for (var i = min; i <= max; i++) { + if (i > 0 && i <= self.max) { + self.pagesElement.appendChild(self._generatePageButton(i)); + } + } + + this.footerRedraw(); +}; + +Page.prototype._generatePageButton = function (page) { + var self = this, + button = document.createElement("button"); + + button.classList.add("tabulator-page"); + if (page == self.page) { + button.classList.add("active"); + } + + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + + self.table.modules.localize.bind("pagination|page_title", function (value) { + button.setAttribute("aria-label", value + " " + page); + button.setAttribute("title", value + " " + page); + }); + + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function (e) { + self.setPage(page).then(function () {}).catch(function () {}); + }); + + return button; +}; + +//previous page +Page.prototype.previousPage = function () { + var _this4 = this; + + return new Promise(function (resolve, reject) { + if (_this4.page > 1) { + _this4.page--; + _this4.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this4.table.options.persistence && _this4.table.modExists("persistence", true) && _this4.table.modules.persistence.config.page) { + _this4.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + reject(); + } + }); +}; + +//next page +Page.prototype.nextPage = function () { + var _this5 = this; + + return new Promise(function (resolve, reject) { + if (_this5.page < _this5.max) { + _this5.page++; + _this5.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this5.table.options.persistence && _this5.table.modExists("persistence", true) && _this5.table.modules.persistence.config.page) { + _this5.table.modules.persistence.save("page"); + } + } else { + if (!_this5.progressiveLoad) { + console.warn("Pagination Error - Next page would be greater than maximum page of " + _this5.max + ":", _this5.max + 1); + } + reject(); + } + }); +}; + +//return current page number +Page.prototype.getPage = function () { + return this.page; +}; + +//return max page number +Page.prototype.getPageMax = function () { + return this.max; +}; + +Page.prototype.getPageSize = function (size) { + return this.size; +}; + +Page.prototype.getMode = function () { + return this.mode; +}; + +//return appropriate rows for current page +Page.prototype.getRows = function (data) { + var output, start, end; + + if (this.mode == "local") { + output = []; + + if (this.size === true) { + start = 0; + end = data.length; + } else { + start = this.size * (this.page - 1); + end = start + parseInt(this.size); + } + + this._setPageButtons(); + + for (var i = start; i < end; i++) { + if (data[i]) { + output.push(data[i]); + } + } + + return output; + } else { + + this._setPageButtons(); + + return data.slice(0); + } +}; + +Page.prototype.trigger = function () { + var _this6 = this; + + var left; + + return new Promise(function (resolve, reject) { + + switch (_this6.mode) { + case "local": + left = _this6.table.rowManager.scrollLeft; + + _this6.table.rowManager.refreshActiveData("page"); + _this6.table.rowManager.scrollHorizontal(left); + + _this6.table.options.pageLoaded.call(_this6.table, _this6.getPage()); + resolve(); + break; + + case "remote": + case "progressive_load": + case "progressive_scroll": + _this6.table.modules.ajax.blockActiveRequest(); + _this6._getRemotePage().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", _this6.mode); + reject(); + } + }); +}; + +Page.prototype._getRemotePage = function () { + var _this7 = this; + + var self = this, + oldParams, + pageParams; + + return new Promise(function (resolve, reject) { + + if (!self.table.modExists("ajax", true)) { + reject(); + } + + //record old params and restore after request has been made + oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); + pageParams = self.table.modules.ajax.getParams(); + + //configure request params + pageParams[_this7.dataSentNames.page] = self.page; + + //set page size if defined + if (_this7.size) { + pageParams[_this7.dataSentNames.size] = _this7.size; + } + + //set sort data if defined + if (_this7.table.options.ajaxSorting && _this7.table.modExists("sort")) { + var sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + pageParams[_this7.dataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (_this7.table.options.ajaxFiltering && _this7.table.modExists("filter")) { + var filters = self.table.modules.filter.getFilters(true, true); + pageParams[_this7.dataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(pageParams); + + self.table.modules.ajax.sendRequest(_this7.progressiveLoad).then(function (data) { + self._parseRemoteData(data); + resolve(); + }).catch(function (e) { + reject(); + }); + + self.table.modules.ajax.setParams(oldParams); + }); +}; + +Page.prototype._parseRemoteData = function (data) { + var self = this, + left, + data, + margin; + + if (typeof data[this.dataReceivedNames.last_page] === "undefined") { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property"); + } + + if (data[this.dataReceivedNames.data]) { + this.max = parseInt(data[this.dataReceivedNames.last_page]) || 1; + + if (this.progressiveLoad) { + switch (this.mode) { + case "progressive_load": + + if (this.page == 1) { + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + } else { + this.table.rowManager.addRows(data[this.dataReceivedNames.data]); + } + + if (this.page < this.max) { + setTimeout(function () { + self.nextPage().then(function () {}).catch(function () {}); + }, self.table.options.ajaxProgressiveLoadDelay); + } + break; + + case "progressive_scroll": + data = this.table.rowManager.getData().concat(data[this.dataReceivedNames.data]); + + this.table.rowManager.setData(data, true, this.initialLoad && this.page == 1); + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; + + if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { + self.nextPage().then(function () {}).catch(function () {}); + } + break; + } + } else { + left = this.table.rowManager.scrollLeft; + + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + + this.initialLoad = false; + } else { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property"); + } +}; + +//handle the footer element being redrawn +Page.prototype.footerRedraw = function () { + var footer = this.table.footerManager.element; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } else { + this.pagesElement.style.display = ''; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } + } +}; + +//set the paramter names for pagination requests +Page.prototype.paginationDataSentNames = { + "page": "page", + "size": "size", + "sorters": "sorters", + // "sort_dir":"sort_dir", + "filters": "filters" + // "filter_value":"filter_value", + // "filter_type":"filter_type", +}; + +//set the property names for pagination responses +Page.prototype.paginationDataReceivedNames = { + "current_page": "current_page", + "last_page": "last_page", + "data": "data" +}; + +Tabulator.prototype.registerModule("page", Page); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/page.min.js b/Sources/CustomControls/Table/control/dist/js/modules/page.min.js new file mode 100644 index 0000000..9a78676 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/page.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var Page=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var a=1;a<5;a++)t.push(this.size*a);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var a=document.createElement("option");a.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){a.innerHTML=e}):a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a,i,s=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),s.table.modules.localize.bind("pagination|first",function(e){s.firstBut.innerHTML=e}),s.table.modules.localize.bind("pagination|first_title",function(e){s.firstBut.setAttribute("aria-label",e),s.firstBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|prev",function(e){s.prevBut.innerHTML=e}),s.table.modules.localize.bind("pagination|prev_title",function(e){s.prevBut.setAttribute("aria-label",e),s.prevBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|next",function(e){s.nextBut.innerHTML=e}),s.table.modules.localize.bind("pagination|next_title",function(e){s.nextBut.setAttribute("aria-label",e),s.nextBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|last",function(e){s.lastBut.innerHTML=e}),s.table.modules.localize.bind("pagination|last_title",function(e){s.lastBut.setAttribute("aria-label",e),s.lastBut.setAttribute("title",e)}),s.firstBut.addEventListener("click",function(){s.setPage(1).then(function(){}).catch(function(){})}),s.prevBut.addEventListener("click",function(){s.previousPage().then(function(){}).catch(function(){})}),s.nextBut.addEventListener("click",function(){s.nextPage().then(function(){}).catch(function(){})}),s.lastBut.addEventListener("click",function(){s.setPage(s.max).then(function(){}).catch(function(){})}),s.table.options.paginationElement&&(s.element=s.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),s.table.modules.localize.bind("pagination|page_size",function(e){s.pageSizeSelect.setAttribute("aria-label",e),s.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),s.element.appendChild(t),s.element.appendChild(s.pageSizeSelect),s.pageSizeSelect.addEventListener("change",function(e){s.setPageSize("true"==s.pageSizeSelect.value||s.pageSizeSelect.value),s.setPage(1).then(function(){}).catch(function(){})})),s.element.appendChild(s.firstBut),s.element.appendChild(s.prevBut),s.element.appendChild(s.pagesElement),s.element.appendChild(s.nextBut),s.element.appendChild(s.lastBut),s.table.options.paginationElement||e||s.table.footerManager.append(s.element,s),s.mode=s.table.options.pagination,s.table.options.paginationSize?s.size=s.table.options.paginationSize:(a=document.createElement("div"),a.classList.add("tabulator-row"),a.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",a.appendChild(i),s.table.rowManager.getTableElement().appendChild(a),s.size=Math.floor(s.table.rowManager.getElement().clientHeight/a.offsetHeight),s.table.rowManager.getTableElement().removeChild(a)),s.count=s.table.options.paginationButtonCount,s.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(e){this.displayIndex=e},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(e){var t=this,a=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,s){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){s()}),a.table.options.persistence&&a.table.modExists("persistence",!0)&&a.table.modules.persistence.config.page&&a.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),s())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var s=t.table.rowManager.getDisplayRows(t.displayIndex-1),n=s.indexOf(e);if(n>-1){var o=!0===t.size?1:Math.ceil((n+1)/t.size);t.setPage(o).then(function(){a()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},Page.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&n<=e.max&&e.pagesElement.appendChild(e._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(e){var t=this,a=document.createElement("button");return a.classList.add("tabulator-page"),e==t.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){a.setAttribute("aria-label",t+" "+e),a.setAttribute("title",t+" "+e)}),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e).then(function(){}).catch(function(){})}),a},Page.prototype.previousPage=function(){var e=this;return new Promise(function(t,a){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var e=this;return new Promise(function(t,a){e.page i) { + output.splice(i, 0, column); + } else { + output.push(column); + } + } + }); + + return output; +}; + +//find matching columns +Persistence.prototype._findColumn = function (columns, subject) { + var type = subject.columns ? "group" : subject.field ? "field" : "object"; + + return columns.find(function (col) { + switch (type) { + case "group": + return col.title === subject.title && col.columns.length === subject.columns.length; + break; + + case "field": + return col.field === subject.field; + break; + + case "object": + return col === subject; + break; + } + }); +}; + +//save data +Persistence.prototype.save = function (type) { + var data = {}; + + switch (type) { + case "columns": + data = this.parseColumns(this.table.columnManager.getColumns()); + break; + + case "filter": + data = this.table.modules.filter.getFilters(); + break; + + case "sort": + data = this.validateSorters(this.table.modules.sort.getSort()); + break; + + case "group": + data = this.getGroupConfig(); + break; + + case "page": + data = this.getPageConfig(); + break; + } + + if (this.writeFunc) { + this.writeFunc(this.id, type, data); + } +}; + +//ensure sorters contain no function data +Persistence.prototype.validateSorters = function (data) { + data.forEach(function (item) { + item.column = item.field; + delete item.field; + }); + + return data; +}; + +Persistence.prototype.getGroupConfig = function () { + var data = {}; + + if (this.config.group) { + if (this.config.group === true || this.config.group.groupBy) { + data.groupBy = this.table.options.groupBy; + } + + if (this.config.group === true || this.config.group.groupStartOpen) { + data.groupStartOpen = this.table.options.groupStartOpen; + } + + if (this.config.group === true || this.config.group.groupHeader) { + data.groupHeader = this.table.options.groupHeader; + } + } + + return data; +}; + +Persistence.prototype.getPageConfig = function () { + var data = {}; + + if (this.config.page) { + if (this.config.page === true || this.config.page.size) { + data.paginationSize = this.table.modules.page.getPageSize(); + } + + if (this.config.page === true || this.config.page.page) { + data.paginationInitialPage = this.table.modules.page.getPage(); + } + } + + return data; +}; + +//parse columns for data to store +Persistence.prototype.parseColumns = function (columns) { + var self = this, + definitions = [], + excludedKeys = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; + + columns.forEach(function (column) { + var defStore = {}, + colDef = column.getDefinition(), + keys; + + if (column.isGroup) { + defStore.title = colDef.title; + defStore.columns = self.parseColumns(column.getColumns()); + } else { + defStore.field = column.getField(); + + if (self.config.columns === true || self.config.columns == undefined) { + keys = Object.keys(colDef); + keys.push("width"); + } else { + keys = self.config.columns; + } + + keys.forEach(function (key) { + + switch (key) { + case "width": + defStore.width = column.getWidth(); + break; + case "visible": + defStore.visible = column.visible; + break; + + default: + if (typeof colDef[key] !== "function" && excludedKeys.indexOf(key) === -1) { + defStore[key] = colDef[key]; + } + } + }); + } + + definitions.push(defStore); + }); + + return definitions; +}; + +// read peristence information from storage +Persistence.prototype.readers = { + local: function local(id, type) { + var data = localStorage.getItem(id + "-" + type); + + return data ? JSON.parse(data) : false; + }, + cookie: function cookie(id, type) { + var cookie = document.cookie, + key = id + "-" + type, + cookiePos = cookie.indexOf(key + "="), + end, + data; + + //if cookie exists, decode and load column data into tabulator + if (cookiePos > -1) { + cookie = cookie.substr(cookiePos); + + end = cookie.indexOf(";"); + + if (end > -1) { + cookie = cookie.substr(0, end); + } + + data = cookie.replace(key + "=", ""); + } + + return data ? JSON.parse(data) : false; + } +}; + +//write persistence information to storage +Persistence.prototype.writers = { + local: function local(id, type, data) { + localStorage.setItem(id + "-" + type, JSON.stringify(data)); + }, + cookie: function cookie(id, type, data) { + var expireDate = new Date(); + + expireDate.setDate(expireDate.getDate() + 10000); + + document.cookie = id + "-" + type + "=" + JSON.stringify(data) + "; expires=" + expireDate.toUTCString(); + } +}; + +Tabulator.prototype.registerModule("persistence", Persistence); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/persistence.min.js b/Sources/CustomControls/Table/control/dist/js/modules/persistence.min.js new file mode 100644 index 0000000..a0f79a1 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/persistence.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var Persistence=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},Persistence.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&this.load("columns",this.table.options.columns)},Persistence.prototype.initializeColumn=function(e){var t,i,o=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=!0===this.config.columns?Object.keys(t):this.config.columns,i.forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e),s=t[e];i&&Object.defineProperty(t,e,{set:function(e){s=e,o.defWatcherBlock||o.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),s}})}),this.defWatcherBlock=!1)},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var n,r=i._findColumn(e,t);r&&(!0===i.config.columns||void 0==i.config.columns?(n=Object.keys(r),n.push("width")):n=i.config.columns,n.forEach(function(e){"columns"!==e&&void 0!==t[e]&&(r[e]=t[e])}),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),o.push(r))}),e.forEach(function(e,s){i._findColumn(t,e)||(o.length>s?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},Persistence.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},Persistence.prototype.parseColumns=function(e){var t=this,i=[],o=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var s,n={},r=e.getDefinition();e.isGroup?(n.title=r.title,n.columns=t.parseColumns(e.getColumns())):(n.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(s=Object.keys(r),s.push("width")):s=t.config.columns,s.forEach(function(t){switch(t){case"width":n.width=e.getWidth();break;case"visible":n.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===o.indexOf(t)&&(n[t]=r[t])}})),i.push(n)}),i},Persistence.prototype.readers={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,o,s=document.cookie,n=e+"-"+t,r=s.indexOf(n+"=");return r>-1&&(s=s.substr(r),i=s.indexOf(";"),i>-1&&(s=s.substr(0,i)),o=s.replace(n+"=","")),!!o&&JSON.parse(o)}},Persistence.prototype.writers={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+o.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/print.js b/Sources/CustomControls/Table/control/dist/js/modules/print.js new file mode 100644 index 0000000..bc9bad0 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/print.js @@ -0,0 +1,96 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Print = function Print(table) { + this.table = table; //hold Tabulator object + this.element = false; + this.manualBlock = false; +}; + +Print.prototype.initialize = function () { + window.addEventListener("beforeprint", this.replaceTable.bind(this)); + window.addEventListener("afterprint", this.cleanup.bind(this)); +}; + +Print.prototype.replaceTable = function () { + if (!this.manualBlock) { + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-table"); + + this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print")); + + this.table.element.style.display = "none"; + + this.table.element.parentNode.insertBefore(this.element, this.table.element); + } +}; + +Print.prototype.cleanup = function () { + document.body.classList.remove("tabulator-print-fullscreen-hide"); + + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + this.table.element.style.display = ""; + } +}; + +Print.prototype.printFullscreen = function (visible, style, config) { + var scrollX = window.scrollX, + scrollY = window.scrollY, + headerEl = document.createElement("div"), + footerEl = document.createElement("div"), + tableEl = this.table.modules.export.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printStyled, visible, "print"), + headerContent, + footerContent; + + this.manualBlock = true; + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-fullscreen"); + + if (this.table.options.printHeader) { + headerEl.classList.add("tabulator-print-header"); + + headerContent = typeof this.table.options.printHeader == "function" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader; + + if (typeof headerContent == "string") { + headerEl.innerHTML = headerContent; + } else { + headerEl.appendChild(headerContent); + } + + this.element.appendChild(headerEl); + } + + this.element.appendChild(tableEl); + + if (this.table.options.printFooter) { + footerEl.classList.add("tabulator-print-footer"); + + footerContent = typeof this.table.options.printFooter == "function" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter; + + if (typeof footerContent == "string") { + footerEl.innerHTML = footerContent; + } else { + footerEl.appendChild(footerContent); + } + + this.element.appendChild(footerEl); + } + + document.body.classList.add("tabulator-print-fullscreen-hide"); + document.body.appendChild(this.element); + + if (this.table.options.printFormatter) { + this.table.options.printFormatter(this.element, tableEl); + } + + window.print(); + + this.cleanup(); + + window.scrollTo(scrollX, scrollY); + + this.manualBlock = false; +}; + +Tabulator.prototype.registerModule("print", Print); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/print.min.js b/Sources/CustomControls/Table/control/dist/js/modules/print.min.js new file mode 100644 index 0000000..9097e63 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/print.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,i){var n,l,o=window.scrollX,a=window.scrollY,s=document.createElement("div"),r=document.createElement("div"),p=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof n?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(p),this.table.options.printFooter&&(r.classList.add("tabulator-print-footer"),l="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof l?r.innerHTML=l:r.appendChild(l),this.element.appendChild(r)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,p),window.print(),this.cleanup(),window.scrollTo(o,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.js b/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.js new file mode 100644 index 0000000..fa2c288 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.js @@ -0,0 +1,323 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ReactiveData = function ReactiveData(table) { + this.table = table; //hold Tabulator object + this.data = false; + this.blocked = false; //block reactivity while performing update + this.origFuncs = {}; // hold original data array functions to allow replacement after data is done with + this.currentVersion = 0; +}; + +ReactiveData.prototype.watchData = function (data) { + var self = this, + pushFunc, + version; + + this.currentVersion++; + + version = this.currentVersion; + + self.unwatchData(); + + self.data = data; + + //override array push function + self.origFuncs.push = data.push; + + Object.defineProperty(self.data, "push", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, false); + }); + } + + return self.origFuncs.push.apply(data, arguments); + } + }); + + //override array unshift function + self.origFuncs.unshift = data.unshift; + + Object.defineProperty(self.data, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, true); + }); + } + + return self.origFuncs.unshift.apply(data, arguments); + } + }); + + //override array shift function + self.origFuncs.shift = data.shift; + + Object.defineProperty(self.data, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var row; + + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[0]); + + if (row) { + row.deleteActual(); + } + } + } + + return self.origFuncs.shift.call(data); + } + }); + + //override array pop function + self.origFuncs.pop = data.pop; + + Object.defineProperty(self.data, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var row; + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]); + + if (row) { + row.deleteActual(); + } + } + } + return self.origFuncs.pop.call(data); + } + }); + + //override array splice function + self.origFuncs.splice = data.splice; + + Object.defineProperty(self.data, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments), + start = args[0] < 0 ? data.length + args[0] : args[0], + end = args[1], + newRows = args[2] ? args.slice(2) : false, + startRow; + + if (!self.blocked && version === self.currentVersion) { + + //add new rows + if (newRows) { + startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false; + + if (startRow) { + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, startRow, true); + }); + } else { + newRows = newRows.slice().reverse(); + + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, false, true); + }); + } + } + + //delete removed rows + if (end !== 0) { + var oldRows = data.slice(start, typeof args[1] === "undefined" ? args[1] : start + end); + + oldRows.forEach(function (rowData, i) { + var row = self.table.rowManager.getRowFromDataObject(rowData); + + if (row) { + row.deleteActual(i !== oldRows.length - 1); + } + }); + } + + if (newRows || end !== 0) { + self.table.rowManager.reRenderInPosition(); + } + } + + return self.origFuncs.splice.apply(data, arguments); + } + }); +}; + +ReactiveData.prototype.unwatchData = function () { + if (this.data !== false) { + for (var key in this.origFuncs) { + Object.defineProperty(this.data, key, { + enumerable: true, + configurable: true, + writable: true, + value: this.origFuncs.key + }); + } + } +}; + +ReactiveData.prototype.watchRow = function (row) { + var data = row.getData(); + + this.blocked = true; + + for (var key in data) { + this.watchKey(row, data, key); + } + + if (this.table.options.dataTree) { + this.watchTreeChildren(row); + } + + this.blocked = false; +}; + +ReactiveData.prototype.watchTreeChildren = function (row) { + var self = this, + childField = row.getData()[this.table.options.dataTreeChildField], + origFuncs = {}; + + function rebuildTree() { + self.table.modules.dataTree.initializeRow(row); + self.table.modules.dataTree.layoutRow(row); + self.table.rowManager.refreshActiveData("tree", false, true); + } + + if (childField) { + + origFuncs.push = childField.push; + + Object.defineProperty(childField, "push", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.push.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.unshift = childField.unshift; + + Object.defineProperty(childField, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.unshift.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.shift = childField.shift; + + Object.defineProperty(childField, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.shift.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.pop = childField.pop; + + Object.defineProperty(childField, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.pop.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.splice = childField.splice; + + Object.defineProperty(childField, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.splice.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + } +}; + +ReactiveData.prototype.watchKey = function (row, data, key) { + var self = this, + props = Object.getOwnPropertyDescriptor(data, key), + value = data[key], + version = this.currentVersion; + + Object.defineProperty(data, key, { + set: function set(newValue) { + value = newValue; + if (!self.blocked && version === self.currentVersion) { + var update = {}; + update[key] = newValue; + row.updateData(update); + } + + if (props.set) { + props.set(newValue); + } + }, + get: function get() { + + if (props.get) { + props.get(); + } + + return value; + } + }); +}; + +ReactiveData.prototype.unwatchRow = function (row) { + var data = row.getData(); + + for (var key in data) { + Object.defineProperty(data, key, { + value: data[key] + }); + } +}; + +ReactiveData.prototype.block = function () { + this.blocked = true; +}; + +ReactiveData.prototype.unblock = function () { + this.blocked = false; +}; + +Tabulator.prototype.registerModule("reactiveData", ReactiveData); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.min.js b/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.min.js new file mode 100644 index 0000000..1b36128 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/reactive_data.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var ReactiveData=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(e){var t,a=this;this.currentVersion++,t=this.currentVersion,a.unwatchData(),a.data=e,a.origFuncs.push=e.push,Object.defineProperty(a.data,"push",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!1)}),a.origFuncs.push.apply(e,arguments)}}),a.origFuncs.unshift=e.unshift,Object.defineProperty(a.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!0)}),a.origFuncs.unshift.apply(e,arguments)}}),a.origFuncs.shift=e.shift,Object.defineProperty(a.data,"shift",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[0]))&&r.deleteActual(),a.origFuncs.shift.call(e)}}),a.origFuncs.pop=e.pop,Object.defineProperty(a.data,"pop",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[a.data.length-1]))&&r.deleteActual(),a.origFuncs.pop.call(e)}}),a.origFuncs.splice=e.splice,Object.defineProperty(a.data,"splice",{enumerable:!1,configurable:!0,value:function(){var r,n=Array.from(arguments),o=n[0]<0?e.length+n[0]:n[0],i=n[1],c=!!n[2]&&n.slice(2);if(!a.blocked&&t===a.currentVersion){if(c&&(r=!!e[o]&&a.table.rowManager.getRowFromDataObject(e[o]),r?c.forEach(function(e){a.table.rowManager.addRowActual(e,!0,r,!0)}):(c=c.slice().reverse(),c.forEach(function(e){a.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==i){var u=e.slice(o,void 0===n[1]?n[1]:o+i);u.forEach(function(e,t){var r=a.table.rowManager.getRowFromDataObject(e);r&&r.deleteActual(t!==u.length-1)})}(c||0!==i)&&a.table.rowManager.reRenderInPosition()}return a.origFuncs.splice.apply(e,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var a in t)this.watchKey(e,t,a);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},ReactiveData.prototype.watchTreeChildren=function(e){function t(){a.table.modules.dataTree.initializeRow(e),a.table.modules.dataTree.layoutRow(e),a.table.rowManager.refreshActiveData("tree",!1,!0)}var a=this,r=e.getData()[this.table.options.dataTreeChildField],n={};r&&(n.push=r.push,Object.defineProperty(r,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(r,arguments);return t(),e}}),n.unshift=r.unshift,Object.defineProperty(r,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(r,arguments);return t(),e}}),n.shift=r.shift,Object.defineProperty(r,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(r);return t(),e}}),n.pop=r.pop,Object.defineProperty(r,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(r);return t(),e}}),n.splice=r.splice,Object.defineProperty(r,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(r,arguments);return t(),e}}))},ReactiveData.prototype.watchKey=function(e,t,a){var r=this,n=Object.getOwnPropertyDescriptor(t,a),o=t[a],i=this.currentVersion;Object.defineProperty(t,a,{set:function(t){if(o=t,!r.blocked&&i===r.currentVersion){var c={};c[a]=t,e.updateData(c)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),o}})},ReactiveData.prototype.unwatchRow=function(e){var t=e.getData();for(var a in t)Object.defineProperty(t,a,{value:t[a]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.js new file mode 100644 index 0000000..1c1fa9e --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.js @@ -0,0 +1,171 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ResizeColumns = function ResizeColumns(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startX = false; + this.startWidth = false; + this.handle = null; + this.prevHandle = null; +}; + +ResizeColumns.prototype.initializeColumn = function (type, column, element) { + var self = this, + variableHeight = false, + mode = this.table.options.resizableColumns; + + //set column resize mode + if (type === "header") { + variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; + column.modules.resize = { variableHeight: variableHeight }; + } + + if (mode === true || mode == type) { + + var handle = document.createElement('div'); + handle.className = "tabulator-col-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-col-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + var nearestColumn = column.getLastColumn(); + + if (nearestColumn && self._checkResizability(nearestColumn)) { + self.startColumn = column; + self._mouseDown(e, nearestColumn, handle); + } + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + //reszie column on double click + handle.addEventListener("dblclick", function (e) { + var col = column.getLastColumn(); + + if (col && self._checkResizability(col)) { + e.stopPropagation(); + col.reinitializeWidth(true); + } + }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + self.startColumn = column; + self._mouseDown(e, prevColumn, prevHandle); + } + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + //resize column on double click + prevHandle.addEventListener("dblclick", function (e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + e.stopPropagation(); + prevColumn.reinitializeWidth(true); + } + } + }); + + element.appendChild(handle); + element.appendChild(prevHandle); + } +}; + +ResizeColumns.prototype._checkResizability = function (column) { + return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; +}; + +ResizeColumns.prototype._mouseDown = function (e, column, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + // self.table.columnManager.tempScrollBlock(); + + if (self.table.rtl) { + column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } else { + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } + + if (self.table.options.virtualDomHoz) { + self.table.vdomHoz.reinitialize(true); + } + + if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + } + + function mouseUp(e) { + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = false; + } + + if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + + document.body.removeEventListener("mouseup", mouseUp); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.columns) { + self.table.modules.persistence.save("columns"); + } + + self.table.options.columnResized.call(self.table, column.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = true; + } + + self.startX = typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX; + self.startWidth = column.getWidth(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); +}; + +Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.min.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.min.js new file mode 100644 index 0000000..99c450f --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var ResizeColumns=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(e,t,i){var o=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var l=document.createElement("div");l.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var r=function(e){var i=t.getLastColumn();i&&o._checkResizability(i)&&(o.startColumn=t,o._mouseDown(e,i,a))};a.addEventListener("mousedown",r),a.addEventListener("touchstart",r,{passive:!0}),a.addEventListener("dblclick",function(e){var i=t.getLastColumn();i&&o._checkResizability(i)&&(e.stopPropagation(),i.reinitializeWidth(!0))}),l.addEventListener("click",function(e){e.stopPropagation()});var d=function(e){var i,n,s;(i=t.getFirstColumn())&&(n=o.table.columnManager.findColumnIndex(i),(s=n>0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(o.startColumn=t,o._mouseDown(e,s,l)))};l.addEventListener("mousedown",d),l.addEventListener("touchstart",d,{passive:!0}),l.addEventListener("dblclick",function(e){var i,n,s;(i=t.getFirstColumn())&&(n=o.table.columnManager.findColumnIndex(i),(s=n>0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),i.appendChild(a),i.appendChild(l)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t,i){function o(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.js new file mode 100644 index 0000000..a04dd7c --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.js @@ -0,0 +1,98 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ResizeRows = function ResizeRows(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startY = false; + this.startHeight = false; + this.handle = null; + this.prevHandle = null; +}; + +ResizeRows.prototype.initializeRow = function (row) { + var self = this, + rowEl = row.getElement(); + + var handle = document.createElement('div'); + handle.className = "tabulator-row-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-row-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + self.startRow = row; + self._mouseDown(e, row, handle); + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var prevRow = self.table.rowManager.prevDisplayRow(row); + + if (prevRow) { + self.startRow = prevRow; + self._mouseDown(e, prevRow, prevHandle); + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + rowEl.appendChild(handle); + rowEl.appendChild(prevHandle); +}; + +ResizeRows.prototype._mouseDown = function (e, row, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + row.setHeight(self.startHeight + ((typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY) - self.startY)); + } + + function mouseUp(e) { + + // //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = false; + // } + + document.body.removeEventListener("mouseup", mouseMove); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + self.table.options.rowResized.call(this.table, row.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = true; + // } + + self.startY = typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY; + self.startHeight = row.getHeight(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); +}; + +Tabulator.prototype.registerModule("resizeRows", ResizeRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.min.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.min.js new file mode 100644 index 0000000..ca5598b --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var ResizeRows=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(e){var t=this,o=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",s.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){t.startRow=e,t._mouseDown(o,e,s)};s.addEventListener("mousedown",a),s.addEventListener("touchstart",a,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var r=function(o){var s=t.table.rowManager.prevDisplayRow(e);s&&(t.startRow=s,t._mouseDown(o,s,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(s),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(e,t,o){function s(e){t.setHeight(a.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-a.startY))}function n(e){document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",s),o.removeEventListener("touchmove",s),o.removeEventListener("touchend",n),a.table.element.classList.remove("tabulator-block-select"),a.table.options.rowResized.call(this.table,t.getComponent())}var a=this;a.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),a.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,a.startHeight=t.getHeight(),document.body.addEventListener("mousemove",s),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",s,{passive:!0}),o.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeRows",ResizeRows); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_table.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_table.js new file mode 100644 index 0000000..eaefb58 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_table.js @@ -0,0 +1,117 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ResizeTable = function ResizeTable(table) { + this.table = table; //hold Tabulator object + this.binding = false; + this.observer = false; + this.containerObserver = false; + + this.tableHeight = 0; + this.tableWidth = 0; + this.containerHeight = 0; + this.containerWidth = 0; + + this.autoResize = false; +}; + +ResizeTable.prototype.initialize = function (row) { + var _this = this; + + var table = this.table, + tableStyle; + + this.tableHeight = table.element.clientHeight; + this.tableWidth = table.element.clientWidth; + + if (table.element.parentNode) { + this.containerHeight = table.element.parentNode.clientHeight; + this.containerWidth = table.element.parentNode.clientWidth; + } + + if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { + + this.autoResize = true; + + this.observer = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this.tableHeight != nodeHeight || _this.tableWidth != nodeWidth) { + _this.tableHeight = nodeHeight; + _this.tableWidth = nodeWidth; + + if (table.element.parentNode) { + _this.containerHeight = table.element.parentNode.clientHeight; + _this.containerWidth = table.element.parentNode.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + } + }); + + this.observer.observe(table.element); + + tableStyle = window.getComputedStyle(table.element); + + if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) { + + this.containerObserver = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this.containerHeight != nodeHeight || _this.containerWidth != nodeWidth) { + _this.containerHeight = nodeHeight; + _this.containerWidth = nodeWidth; + _this.tableHeight = table.element.clientHeight; + _this.tableWidth = table.element.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }); + + this.containerObserver.observe(this.table.element.parentNode); + } + } else { + this.binding = function () { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }; + + window.addEventListener("resize", this.binding); + } +}; + +ResizeTable.prototype.clearBindings = function (row) { + if (this.binding) { + window.removeEventListener("resize", this.binding); + } + + if (this.observer) { + this.observer.unobserve(this.table.element); + } + + if (this.containerObserver) { + this.containerObserver.unobserve(this.table.element.parentNode); + } +}; + +Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/resize_table.min.js b/Sources/CustomControls/Table/control/dist/js/modules/resize_table.min.js new file mode 100644 index 0000000..f2f2e08 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/resize_table.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(e){var t,i=this,n=this.table;this.tableHeight=n.element.clientHeight,this.tableWidth=n.element.clientWidth,n.element.parentNode&&(this.containerHeight=n.element.parentNode.clientHeight,this.containerWidth=n.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===n.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.tableHeight==t&&i.tableWidth==r||(i.tableHeight=t,i.tableWidth=r,n.element.parentNode&&(i.containerHeight=n.element.parentNode.clientHeight,i.containerWidth=n.element.parentNode.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())}}),this.observer.observe(n.element),t=window.getComputedStyle(n.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.containerHeight==t&&i.containerWidth==r||(i.containerHeight=t,i.containerWidth=r,i.tableHeight=n.element.clientHeight,i.tableWidth=n.element.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell)&&(n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.js b/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.js new file mode 100644 index 0000000..7587c98 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.js @@ -0,0 +1,314 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var ResponsiveLayout = function ResponsiveLayout(table) { + this.table = table; //hold Tabulator object + this.columns = []; + this.hiddenColumns = []; + this.mode = ""; + this.index = 0; + this.collapseFormatter = []; + this.collapseStartOpen = true; + this.collapseHandleColumn = false; +}; + +//generate resposive columns list +ResponsiveLayout.prototype.initialize = function () { + var self = this, + columns = []; + + this.mode = this.table.options.responsiveLayout; + this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; + this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; + this.hiddenColumns = []; + + //detemine level of responsivity for each column + this.table.columnManager.columnsByIndex.forEach(function (column, i) { + if (column.modules.responsive) { + if (column.modules.responsive.order && column.modules.responsive.visible) { + column.modules.responsive.index = i; + columns.push(column); + + if (!column.visible && self.mode === "collapse") { + self.hiddenColumns.push(column); + } + } + } + }); + + //sort list by responsivity + columns = columns.reverse(); + columns = columns.sort(function (a, b) { + var diff = b.modules.responsive.order - a.modules.responsive.order; + return diff || b.modules.responsive.index - a.modules.responsive.index; + }); + + this.columns = columns; + + if (this.mode === "collapse") { + this.generateCollapsedContent(); + } + + //assign collapse column + for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var col = _ref; + + if (col.definition.formatter == "responsiveCollapse") { + this.collapseHandleColumn = col; + break; + } + } + + if (this.collapseHandleColumn) { + if (this.hiddenColumns.length) { + this.collapseHandleColumn.show(); + } else { + this.collapseHandleColumn.hide(); + } + } +}; + +//define layout information +ResponsiveLayout.prototype.initializeColumn = function (column) { + var def = column.getDefinition(); + + column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; +}; + +ResponsiveLayout.prototype.initializeRow = function (row) { + var el; + + if (row.type !== "calc") { + el = document.createElement("div"); + el.classList.add("tabulator-responsive-collapse"); + + row.modules.responsiveLayout = { + element: el, + open: this.collapseStartOpen + }; + + if (!this.collapseStartOpen) { + el.style.display = 'none'; + } + } +}; + +ResponsiveLayout.prototype.layoutRow = function (row) { + var rowEl = row.getElement(); + + if (row.modules.responsiveLayout) { + rowEl.appendChild(row.modules.responsiveLayout.element); + this.generateCollapsedRowContent(row); + } +}; + +//update column visibility +ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { + var index; + if (column.modules.responsive) { + column.modules.responsive.visible = visible; + this.initialize(); + } +}; + +ResponsiveLayout.prototype.hideColumn = function (column) { + var colCount = this.hiddenColumns.length; + + column.hide(false, true); + + if (this.mode === "collapse") { + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !colCount) { + this.collapseHandleColumn.show(); + } + } +}; + +ResponsiveLayout.prototype.showColumn = function (column) { + var index; + + column.show(false, true); + //set column width to prevent calculation loops on uninitialized columns + column.setWidth(column.getWidth()); + + if (this.mode === "collapse") { + index = this.hiddenColumns.indexOf(column); + + if (index > -1) { + this.hiddenColumns.splice(index, 1); + } + + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !this.hiddenColumns.length) { + this.collapseHandleColumn.hide(); + } + } +}; + +//redraw columns to fit space +ResponsiveLayout.prototype.update = function () { + var self = this, + working = true; + + while (working) { + + var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + var diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width; + + if (diff < 0) { + //table is too wide + var column = self.columns[self.index]; + + if (column) { + self.hideColumn(column); + self.index++; + } else { + working = false; + } + } else { + + //table has spare space + var _column = self.columns[self.index - 1]; + + if (_column) { + if (diff > 0) { + if (diff >= _column.getWidth()) { + self.showColumn(_column); + self.index--; + } else { + working = false; + } + } else { + working = false; + } + } else { + working = false; + } + } + + if (!self.table.rowManager.activeRowsCount) { + self.table.rowManager.renderEmptyScroll(); + } + } +}; + +ResponsiveLayout.prototype.generateCollapsedContent = function () { + var self = this, + rows = this.table.rowManager.getDisplayRows(); + + rows.forEach(function (row) { + self.generateCollapsedRowContent(row); + }); +}; + +ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { + var el, contents; + + if (row.modules.responsiveLayout) { + el = row.modules.responsiveLayout.element; + + while (el.firstChild) { + el.removeChild(el.firstChild); + }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); + if (contents) { + el.appendChild(contents); + } + } +}; + +ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { + var self = this, + data = row.getData(), + output = [], + mockCellComponent; + + this.hiddenColumns.forEach(function (column) { + var value = column.getFieldValue(data); + + if (column.definition.title && column.field) { + if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { + + mockCellComponent = { + value: false, + data: {}, + getValue: function getValue() { + return value; + }, + getData: function getData() { + return data; + }, + getElement: function getElement() { + return document.createElement("div"); + }, + getRow: function getRow() { + return row.getComponent(); + }, + getColumn: function getColumn() { + return column.getComponent(); + } + }; + + output.push({ + field: column.field, + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + } else { + output.push({ + field: column.field, + title: column.definition.title, + value: value + }); + } + } + }); + + return output; +}; + +ResponsiveLayout.prototype.formatCollapsedData = function (data) { + var list = document.createElement("table"); + + data.forEach(function (item) { + var row = document.createElement("tr"); + var titleData = document.createElement("td"); + var valueData = document.createElement("td"); + var node_content; + + var titleHighlight = document.createElement("strong"); + titleData.appendChild(titleHighlight); + this.table.modules.localize.bind("columns|" + item.field, function (text) { + titleHighlight.innerText = text || item.title; + }); + + if (item.value instanceof Node) { + node_content = document.createElement("div"); + node_content.appendChild(item.value); + valueData.appendChild(node_content); + } else { + valueData.innerHTML = item.value; + } + + row.appendChild(titleData); + row.appendChild(valueData); + list.appendChild(row); + }, this); + + return Object.keys(data).length ? list : ""; +}; + +Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.min.js b/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.min.js new file mode 100644 index 0000000..01ea705 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/responsive_layout.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,n){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=n,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,n=Array.isArray(o),s=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(s>=o.length)break;i=o[s++]}else{if(s=o.next(),s.done)break;i=s.value}var l=i;if("responsiveCollapse"==l.definition.formatter){this.collapseHandleColumn=l;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(n<0){var s=e.columns[e.index];s?(e.hideColumn(s),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&n>0&&n>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,n=e.getData(),s=[];return this.hiddenColumns.forEach(function(i){var l=i.getFieldValue(n);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return l},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},s.push({field:i.field,title:i.definition.title,value:i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)})):s.push({field:i.field,title:i.definition.title,value:l}))}),s},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table");return e.forEach(function(e){var o,n=document.createElement("tr"),s=document.createElement("td"),i=document.createElement("td"),l=document.createElement("strong");s.appendChild(l),this.table.modules.localize.bind("columns|"+e.field,function(t){l.innerText=t||e.title}),e.value instanceof Node?(o=document.createElement("div"),o.appendChild(e.value),i.appendChild(o)):i.innerHTML=e.value,n.appendChild(s),n.appendChild(i),t.appendChild(n)},this),Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/select_row.js b/Sources/CustomControls/Table/control/dist/js/modules/select_row.js new file mode 100644 index 0000000..016e57e --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/select_row.js @@ -0,0 +1,417 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var SelectRow = function SelectRow(table) { + this.table = table; //hold Tabulator object + this.selecting = false; //flag selecting in progress + this.lastClickedRow = false; //last clicked row + this.selectPrev = []; //hold previously selected element for drag drop selection + this.selectedRows = []; //hold selected rows + this.headerCheckboxElement = null; // hold header select element +}; + +SelectRow.prototype.clearSelectionData = function (silent) { + this.selecting = false; + this.lastClickedRow = false; + this.selectPrev = []; + this.selectedRows = []; + + if (!silent) { + this._rowSelectionChanged(); + } +}; + +SelectRow.prototype.initializeRow = function (row) { + var self = this, + element = row.getElement(); + + // trigger end of row selection + var endSelect = function endSelect() { + + setTimeout(function () { + self.selecting = false; + }, 50); + + document.body.removeEventListener("mouseup", endSelect); + }; + + row.modules.select = { selected: false }; + + //set row selection class + if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { + element.classList.add("tabulator-selectable"); + element.classList.remove("tabulator-unselectable"); + + if (self.table.options.selectable && self.table.options.selectable != "highlight") { + if (self.table.options.selectableRangeMode === "click") { + element.addEventListener("click", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + self.lastClickedRow = self.lastClickedRow || row; + + var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); + var rowIdx = self.table.rowManager.getDisplayRowIndex(row); + + var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; + var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; + + var rows = self.table.rowManager.getDisplayRows().slice(0); + var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); + + if (e.ctrlKey || e.metaKey) { + toggledRows.forEach(function (toggledRow) { + if (toggledRow !== self.lastClickedRow) { + + if (self.table.options.selectable !== true && !self.isRowSelected(row)) { + if (self.selectedRows.length < self.table.options.selectable) { + self.toggleRow(toggledRow); + } + } else { + self.toggleRow(toggledRow); + } + } + }); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + + if (self.table.options.selectable !== true) { + if (toggledRows.length > self.table.options.selectable) { + toggledRows = toggledRows.slice(0, self.table.options.selectable); + } + } + + self.selectRows(toggledRows); + } + self.table._clearSelection(); + } else if (e.ctrlKey || e.metaKey) { + self.toggleRow(row); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + self.selectRows(row); + self.lastClickedRow = row; + } + }); + } else { + element.addEventListener("click", function (e) { + if (!self.table.modExists("edit") || !self.table.modules.edit.getCurrentCell()) { + self.table._clearSelection(); + } + + if (!self.selecting) { + self.toggleRow(row); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + + self.selecting = true; + + self.selectPrev = []; + + document.body.addEventListener("mouseup", endSelect); + document.body.addEventListener("keyup", endSelect); + + self.toggleRow(row); + + return false; + } + }); + + element.addEventListener("mouseenter", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.toggleRow(row); + + if (self.selectPrev[1] == row) { + self.toggleRow(self.selectPrev[0]); + } + } + }); + + element.addEventListener("mouseout", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.selectPrev.unshift(row); + } + }); + } + } + } else { + element.classList.add("tabulator-unselectable"); + element.classList.remove("tabulator-selectable"); + } +}; + +//toggle row selection +SelectRow.prototype.toggleRow = function (row) { + if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { + if (row.modules.select && row.modules.select.selected) { + this._deselectRow(row); + } else { + this._selectRow(row); + } + } +}; + +//select a number of rows +SelectRow.prototype.selectRows = function (rows) { + var _this = this; + + var rowMatch; + + switch (typeof rows === "undefined" ? "undefined" : _typeof(rows)) { + case "undefined": + this.table.rowManager.rows.forEach(function (row) { + _this._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + break; + + case "string": + + rowMatch = this.table.rowManager.findRow(rows); + + if (rowMatch) { + this._selectRow(rowMatch, true, true); + } else { + this.table.rowManager.getRows(rows).forEach(function (row) { + _this._selectRow(row, true, true); + }); + } + + this._rowSelectionChanged(); + break; + + default: + if (Array.isArray(rows)) { + rows.forEach(function (row) { + _this._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + } else { + this._selectRow(rows, false, true); + } + break; + } +}; + +//select an individual row +SelectRow.prototype._selectRow = function (rowInfo, silent, force) { + var index; + + //handle max row count + if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { + if (this.selectedRows.length >= this.table.options.selectable) { + if (this.table.options.selectableRollingSelection) { + this._deselectRow(this.selectedRows[0]); + } else { + return false; + } + } + } + + var row = this.table.rowManager.findRow(rowInfo); + + if (row) { + if (this.selectedRows.indexOf(row) == -1) { + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = true; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = true; + } + row.getElement().classList.add("tabulator-selected"); + + this.selectedRows.push(row); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, true); + } + + if (!silent) { + this.table.options.rowSelected.call(this.table, row.getComponent()); + } + + this._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); + } + } +}; + +SelectRow.prototype.isRowSelected = function (row) { + return this.selectedRows.indexOf(row) !== -1; +}; + +//deselect a number of rows +SelectRow.prototype.deselectRows = function (rows, silent) { + var self = this, + rowCount; + + if (typeof rows == "undefined") { + + rowCount = self.selectedRows.length; + + for (var i = 0; i < rowCount; i++) { + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(silent); + } else { + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(silent); + } else { + self._deselectRow(rows, silent); + } + } +}; + +//deselect an individual row +SelectRow.prototype._deselectRow = function (rowInfo, silent) { + var self = this, + row = self.table.rowManager.findRow(rowInfo), + index; + + if (row) { + index = self.selectedRows.findIndex(function (selectedRow) { + return selectedRow == row; + }); + + if (index > -1) { + + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = false; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = false; + } + row.getElement().classList.remove("tabulator-selected"); + self.selectedRows.splice(index, 1); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, false); + } + + if (!silent) { + self.table.options.rowDeselected.call(this.table, row.getComponent()); + } + + self._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); + } + } +}; + +SelectRow.prototype.getSelectedData = function () { + var data = []; + + this.selectedRows.forEach(function (row) { + data.push(row.getData()); + }); + + return data; +}; + +SelectRow.prototype.getSelectedRows = function () { + + var rows = []; + + this.selectedRows.forEach(function (row) { + rows.push(row.getComponent()); + }); + + return rows; +}; + +SelectRow.prototype._rowSelectionChanged = function (silent) { + if (this.headerCheckboxElement) { + if (this.selectedRows.length === 0) { + this.headerCheckboxElement.checked = false; + this.headerCheckboxElement.indeterminate = false; + } else if (this.table.rowManager.rows.length === this.selectedRows.length) { + this.headerCheckboxElement.checked = true; + this.headerCheckboxElement.indeterminate = false; + } else { + this.headerCheckboxElement.indeterminate = true; + this.headerCheckboxElement.checked = false; + } + } + + if (!silent) { + this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); + } +}; + +SelectRow.prototype.registerRowSelectCheckbox = function (row, element) { + if (!row._row.modules.select) { + row._row.modules.select = {}; + } + + row._row.modules.select.checkboxEl = element; +}; + +SelectRow.prototype.registerHeaderSelectCheckbox = function (element) { + this.headerCheckboxElement = element; +}; + +SelectRow.prototype.childRowSelection = function (row, select) { + var children = this.table.modules.dataTree.getChildren(row); + + if (select) { + for (var _iterator = children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var child = _ref; + + this._selectRow(child, true); + } + } else { + for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _child = _ref2; + + this._deselectRow(_child, true); + } + } +}; + +Tabulator.prototype.registerModule("selectRow", SelectRow); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/select_row.min.js b/Sources/CustomControls/Table/control/dist/js/modules/select_row.min.js new file mode 100644 index 0000000..f3a84e5 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/select_row.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,i=l>=s?l:s,n=t.table.rowManager.getDisplayRows().slice(0),a=n.splice(c,i-c+1);o.ctrlKey||o.metaKey?(a.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.lengtht.table.options.selectable&&(a=a.slice(0,t.table.options.selectable)),t.selectRows(a)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.modules.select||(l.modules.select={}),l.modules.select.selected=!0,l.modules.select.checkboxEl&&(l.modules.select.checkboxEl.checked=!0),l.getElement().classList.add("tabulator-selected"),this.selectedRows.push(l),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(l,!0),t||this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e,t){var o,l=this;if(void 0===e){o=l.selectedRows.length;for(var s=0;s-1&&(s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),s.getElement().classList.remove("tabulator-selected"),l.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),t||l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},SelectRow.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},SelectRow.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var l=o,s=Array.isArray(l),c=0,l=s?l:l[Symbol.iterator]();;){var i;if(s){if(c>=l.length)break;i=l[c++]}else{if(c=l.next(),c.done)break;i=c.value}var n=i;this._selectRow(n,!0)}else for(var a=o,r=Array.isArray(a),d=0,a=r?a:a[Symbol.iterator]();;){var h;if(r){if(d>=a.length)break;h=a[d++]}else{if(d=a.next(),d.done)break;h=d.value}var w=h;this._deselectRow(w,!0)}},Tabulator.prototype.registerModule("selectRow",SelectRow); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/sort.js b/Sources/CustomControls/Table/control/dist/js/modules/sort.js new file mode 100644 index 0000000..805c71c --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/sort.js @@ -0,0 +1,593 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Sort = function Sort(table) { + this.table = table; //hold Tabulator object + this.sortList = []; //holder current sort + this.changed = false; //has the sort changed since last render +}; + +//initialize column header for sorting +Sort.prototype.initializeColumn = function (column, content) { + var self = this, + sorter = false, + colEl, + arrowEl; + + switch (_typeof(column.definition.sorter)) { + case "string": + if (self.sorters[column.definition.sorter]) { + sorter = self.sorters[column.definition.sorter]; + } else { + console.warn("Sort Error - No such sorter found: ", column.definition.sorter); + } + break; + + case "function": + sorter = column.definition.sorter; + break; + } + + column.modules.sort = { + sorter: sorter, dir: "none", + params: column.definition.sorterParams || {}, + startingDir: column.definition.headerSortStartingDir || "asc", + tristate: typeof column.definition.headerSortTristate !== "undefined" ? column.definition.headerSortTristate : this.table.options.headerSortTristate + }; + + if (typeof column.definition.headerSort === "undefined" ? this.table.options.headerSort !== false : column.definition.headerSort !== false) { + + colEl = column.getElement(); + + colEl.classList.add("tabulator-sortable"); + + arrowEl = document.createElement("div"); + arrowEl.classList.add("tabulator-col-sorter"); + + if (_typeof(this.table.options.headerSortElement) == "object") { + arrowEl.appendChild(this.table.options.headerSortElement); + } else { + arrowEl.innerHTML = this.table.options.headerSortElement; + } + + //create sorter arrow + content.appendChild(arrowEl); + + column.modules.sort.element = arrowEl; + + //sort on click + colEl.addEventListener("click", function (e) { + var dir = "", + sorters = [], + match = false; + + if (column.modules.sort) { + if (column.modules.sort.tristate) { + if (column.modules.sort.dir == "none") { + dir = column.modules.sort.startingDir; + } else { + if (column.modules.sort.dir == column.modules.sort.startingDir) { + dir = column.modules.sort.dir == "asc" ? "desc" : "asc"; + } else { + dir = "none"; + } + } + } else { + switch (column.modules.sort.dir) { + case "asc": + dir = "desc"; + break; + + case "desc": + dir = "asc"; + break; + + default: + dir = column.modules.sort.startingDir; + } + } + + if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { + sorters = self.getSort(); + + match = sorters.findIndex(function (sorter) { + return sorter.field === column.getField(); + }); + + if (match > -1) { + sorters[match].dir = dir; + + if (match != sorters.length - 1) { + match = sorters.splice(match, 1)[0]; + if (dir != "none") { + sorters.push(match); + } + } + } else { + if (dir != "none") { + sorters.push({ column: column, dir: dir }); + } + } + + //add to existing sort + self.setSort(sorters); + } else { + if (dir == "none") { + self.clear(); + } else { + //sort by column only + self.setSort(column, dir); + } + } + + self.table.rowManager.sorterRefresh(!self.sortList.length); + } + }); + } +}; + +//check if the sorters have changed since last use +Sort.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; +}; + +//return current sorters +Sort.prototype.getSort = function () { + var self = this, + sorters = []; + + self.sortList.forEach(function (item) { + if (item.column) { + sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); + } + }); + + return sorters; +}; + +//change sort list and trigger sort +Sort.prototype.setSort = function (sortList, dir) { + var self = this, + newSortList = []; + + if (!Array.isArray(sortList)) { + sortList = [{ column: sortList, dir: dir }]; + } + + sortList.forEach(function (item) { + var column; + + column = self.table.columnManager.findColumn(item.column); + + if (column) { + item.column = column; + newSortList.push(item); + self.changed = true; + } else { + console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); + } + }); + + self.sortList = newSortList; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.sort) { + this.table.modules.persistence.save("sort"); + } +}; + +//clear sorters +Sort.prototype.clear = function () { + this.setSort([]); +}; + +//find appropriate sorter for column +Sort.prototype.findSorter = function (column) { + var row = this.table.rowManager.activeRows[0], + sorter = "string", + field, + value; + + if (row) { + row = row.getData(); + field = column.getField(); + + if (field) { + + value = column.getFieldValue(row); + + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "undefined": + sorter = "string"; + break; + + case "boolean": + sorter = "boolean"; + break; + + default: + if (!isNaN(value) && value !== "") { + sorter = "number"; + } else { + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + sorter = "alphanum"; + } + } + break; + } + } + } + + return this.sorters[sorter]; +}; + +//work through sort list sorting data +Sort.prototype.sort = function (data) { + var self = this, + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList, + sortListActual = [], + rowComponents = [], + lastSort; + + if (self.table.options.dataSorting) { + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + //build list of valid sorters and trigger column specific callbacks before sort begins + sortList.forEach(function (item, i) { + var sortObj = item.column.modules.sort; + + if (item.column && sortObj) { + + //if no sorter has been defined, take a guess + if (!sortObj.sorter) { + sortObj.sorter = self.findSorter(item.column); + } + + item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params; + + sortListActual.push(item); + } + + self.setColumnHeader(item.column, item.dir); + }); + + //sort data + if (sortListActual.length) { + self._sortItems(data, sortListActual); + } + } else { + sortList.forEach(function (item, i) { + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + data.forEach(function (row) { + rowComponents.push(row.getComponent()); + }); + + self.table.options.dataSorted.call(self.table, self.getSort(), rowComponents); + } +}; + +//clear sort arrows on columns +Sort.prototype.clearColumnHeaders = function () { + this.table.columnManager.getRealColumns().forEach(function (column) { + if (column.modules.sort) { + column.modules.sort.dir = "none"; + column.getElement().setAttribute("aria-sort", "none"); + } + }); +}; + +//set the column header sort direction +Sort.prototype.setColumnHeader = function (column, dir) { + column.modules.sort.dir = dir; + column.getElement().setAttribute("aria-sort", dir); +}; + +//sort each item in sort list +Sort.prototype._sortItems = function (data, sortList) { + var _this = this; + + var sorterCount = sortList.length - 1; + + data.sort(function (a, b) { + var result; + + for (var i = sorterCount; i >= 0; i--) { + var sortItem = sortList[i]; + + result = _this._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); + + if (result !== 0) { + break; + } + } + + return result; + }); +}; + +//process individual rows for a sort function on active data +Sort.prototype._sortRow = function (a, b, column, dir, params) { + var el1Comp, el2Comp, colComp; + + //switch elements depending on search direction + var el1 = dir == "asc" ? a : b; + var el2 = dir == "asc" ? b : a; + + a = column.getFieldValue(el1.getData()); + b = column.getFieldValue(el2.getData()); + + a = typeof a !== "undefined" ? a : ""; + b = typeof b !== "undefined" ? b : ""; + + // el1Comp = el1.getComponent(); + // el2Comp = el2.getComponent(); + + return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); +}; + +//default data sorters +Sort.prototype.sorters = { + + //sort numbers + number: function number(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var decimal = params.decimalSeparator; + var thousand = params.thousandSeparator; + var emptyAlign = 0; + + a = String(a); + b = String(b); + + if (thousand) { + a = a.split(thousand).join(""); + b = b.split(thousand).join(""); + } + + if (decimal) { + a = a.split(decimal).join("."); + b = b.split(decimal).join("."); + } + + a = parseFloat(a); + b = parseFloat(b); + + //handle non numeric values + if (isNaN(a)) { + emptyAlign = isNaN(b) ? 0 : -1; + } else if (isNaN(b)) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort strings + string: function string(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + var locale; + + //handle empty values + if (!a) { + emptyAlign = !b ? 0 : -1; + } else if (!b) { + emptyAlign = 1; + } else { + //compare valid values + switch (_typeof(params.locale)) { + case "boolean": + if (params.locale) { + locale = this.table.modules.localize.getLocale(); + } + break; + case "string": + locale = params.locale; + break; + } + + return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort date + date: function date(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "DD/MM/YYYY"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort HH:mm formatted times + time: function time(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "HH:mm"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort datetime + datetime: function datetime(a, b, aRow, bRow, column, dir, params) { + var format = params.format || "DD/MM/YYYY HH:mm:ss", + alignEmptyValues = params.alignEmptyValues, + emptyAlign = 0; + + if (typeof moment != "undefined") { + a = moment(a, format); + b = moment(b, format); + + if (!a.isValid()) { + emptyAlign = !b.isValid() ? 0 : -1; + } else if (!b.isValid()) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } else { + console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); + } + }, + + //sort booleans + boolean: function boolean(a, b, aRow, bRow, column, dir, params) { + var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; + var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; + + return el1 - el2; + }, + + //sort if element contains any data + array: function array(a, b, aRow, bRow, column, dir, params) { + var el1 = 0; + var el2 = 0; + var type = params.type || "length"; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + function calc(value) { + + switch (type) { + case "length": + return value.length; + break; + + case "sum": + return value.reduce(function (c, d) { + return c + d; + }); + break; + + case "max": + return Math.max.apply(null, value); + break; + + case "min": + return Math.min.apply(null, value); + break; + + case "avg": + return value.reduce(function (c, d) { + return c + d; + }) / value.length; + break; + } + } + + //handle non array values + if (!Array.isArray(a)) { + alignEmptyValues = !Array.isArray(b) ? 0 : -1; + } else if (!Array.isArray(b)) { + alignEmptyValues = 1; + } else { + + //compare valid values + el1 = a ? calc(a) : 0; + el2 = b ? calc(b) : 0; + + return el1 - el2; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort if element contains any data + exists: function exists(a, b, aRow, bRow, column, dir, params) { + var el1 = typeof a == "undefined" ? 0 : 1; + var el2 = typeof b == "undefined" ? 0 : 1; + + return el1 - el2; + }, + + //sort alpha numeric strings + alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { + var a, + b, + a1, + b1, + i = 0, + L, + rx = /(\d+)|(\D+)/g, + rd = /\d/; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + //handle empty values + if (!as && as !== 0) { + emptyAlign = !bs && bs !== 0 ? 0 : -1; + } else if (!bs && bs !== 0) { + emptyAlign = 1; + } else { + + if (isFinite(as) && isFinite(bs)) return as - bs; + a = String(as).toLowerCase(); + b = String(bs).toLowerCase(); + if (a === b) return 0; + if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; + a = a.match(rx); + b = b.match(rx); + L = a.length > b.length ? b.length : a.length; + while (i < L) { + a1 = a[i]; + b1 = b[i++]; + if (a1 !== b1) { + if (isFinite(a1) && isFinite(b1)) { + if (a1.charAt(0) === "0") a1 = "." + a1; + if (b1.charAt(0) === "0") b1 = "." + b1; + return a1 - b1; + } else return a1 > b1 ? 1 : -1; + } + } + + return a.length > b.length; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } +}; + +Tabulator.prototype.registerModule("sort", Sort); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/sort.min.js b/Sources/CustomControls/Table/control/dist/js/modules/sort.min.js new file mode 100644 index 0000000..fe45208 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/sort.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,i=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?i=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":i=t.definition.sorter}t.modules.sort={sorter:i,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?o.appendChild(this.table.options.headerSortElement):o.innerHTML=this.table.options.headerSortElement,e.appendChild(o),t.modules.sort.element=o,r.addEventListener("click",function(e){var r="",o=[],i=!1;if(t.modules.sort){if(t.modules.sort.tristate)r="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),i=o.findIndex(function(e){return e.field===t.getField()}),i>-1?(o[i].dir=r,i!=o.length-1&&(i=o.splice(i,1)[0],"none"!=r&&o.push(i))):"none"!=r&&o.push({column:t,dir:r}),n.setSort(o)):"none"==r?n.clear():n.setSort(t,r),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(t){var e=this,r=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,o=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?r.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):(r.forEach(function(t,r){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,o.push(t)),e.setColumnHeader(t.column,t.dir)}),o.length&&e._sortItems(t,o)),e.table.options.dataSorted&&(t.forEach(function(t){n.push(t.getComponent())}),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var r=this,o=e.length-1;t.sort(function(t,n){for(var i,s=o;s>=0;s--){var a=e[s];if(0!==(i=r._sortRow(t,n,a.column,a.dir,a.params)))break}return i})},Sort.prototype._sortRow=function(t,e,r,o,n){var i="asc"==o?t:e,s="asc"==o?e:t;return t=r.getFieldValue(i.getData()),e=r.getFieldValue(s.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",r.modules.sort.sorter.call(this,t,e,void 0,void 0,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator,u=s.thousandSeparator,c=0;if(t=String(t),e=String(e),u&&(t=t.split(u).join(""),e=e.split(u).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===a&&"desc"===i||"bottom"===a&&"asc"===i)&&(c*=-1),c},string:function(t,e,r,o,n,i,s){var a,l=s.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(s.locale)){case"boolean":s.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u},date:function(t,e,r,o,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},time:function(t,e,r,o,n,i,s){return s.format||(s.format="HH:mm"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},datetime:function(t,e,r,o,n,i,s){var a=s.format||"DD/MM/YYYY HH:mm:ss",l=s.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,i,s){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,i,s){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=s.type||"length",d=s.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===i||"bottom"===d&&"asc"===i)&&(m*=-1),m},exists:function(t,e,r,o,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,i,s){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,h=s.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;mc?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===h&&"desc"===i||"bottom"===h&&"asc"===i)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/validate.js b/Sources/CustomControls/Table/control/dist/js/modules/validate.js new file mode 100644 index 0000000..5593840 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/validate.js @@ -0,0 +1,286 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +var Validate = function Validate(table) { + this.table = table; + this.invalidCells = []; +}; + +//validate +Validate.prototype.initializeColumn = function (column) { + var self = this, + config = [], + validator; + + if (column.definition.validator) { + + if (Array.isArray(column.definition.validator)) { + column.definition.validator.forEach(function (item) { + validator = self._extractValidator(item); + + if (validator) { + config.push(validator); + } + }); + } else { + validator = this._extractValidator(column.definition.validator); + + if (validator) { + config.push(validator); + } + } + + column.modules.validate = config.length ? config : false; + } +}; + +Validate.prototype._extractValidator = function (value) { + var type, params, pos; + + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "string": + pos = value.indexOf(':'); + + if (pos > -1) { + type = value.substring(0, pos); + params = value.substring(pos + 1); + } else { + type = value; + } + + return this._buildValidator(type, params); + break; + + case "function": + return this._buildValidator(value); + break; + + case "object": + return this._buildValidator(value.type, value.parameters); + break; + } +}; + +Validate.prototype._buildValidator = function (type, params) { + + var func = typeof type == "function" ? type : this.validators[type]; + + if (!func) { + console.warn("Validator Setup Error - No matching validator found:", type); + return false; + } else { + return { + type: typeof type == "function" ? "function" : type, + func: func, + params: params + }; + } +}; + +Validate.prototype.validate = function (validators, cell, value) { + var self = this, + valid = [], + invalidIndex = this.invalidCells.indexOf(cell); + + if (validators) { + validators.forEach(function (item) { + if (!item.func.call(self, cell.getComponent(), value, item.params)) { + valid.push({ + type: item.type, + parameters: item.params + }); + } + }); + } + + valid = valid.length ? valid : true; + + if (!cell.modules.validate) { + cell.modules.validate = {}; + } + + if (valid === true) { + cell.modules.validate.invalid = false; + cell.getElement().classList.remove("tabulator-validation-fail"); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } else { + cell.modules.validate.invalid = true; + + if (this.table.options.validationMode !== "manual") { + cell.getElement().classList.add("tabulator-validation-fail"); + } + + if (invalidIndex == -1) { + this.invalidCells.push(cell); + } + } + + return valid; +}; + +Validate.prototype.getInvalidCells = function () { + var output = []; + + this.invalidCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; +}; + +Validate.prototype.clearValidation = function (cell) { + var invalidIndex; + + if (cell.modules.validate && cell.modules.validate.invalid) { + + cell.getElement().classList.remove("tabulator-validation-fail"); + cell.modules.validate.invalid = false; + + invalidIndex = this.invalidCells.indexOf(cell); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } +}; + +Validate.prototype.validators = { + + //is integer + integer: function integer(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }, + + //is float + float: function float(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && value % 1 !== 0; + }, + + //must be a number + numeric: function numeric(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return !isNaN(value); + }, + + //must be a string + string: function string(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return isNaN(value); + }, + + //maximum value + max: function max(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) <= parameters; + }, + + //minimum value + min: function min(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) >= parameters; + }, + + //starts with value + starts: function starts(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().startsWith(String(parameters).toLowerCase()); + }, + + //ends with value + ends: function ends(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().endsWith(String(parameters).toLowerCase()); + }, + + //minimum string length + minLength: function minLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length >= parameters; + }, + + //maximum string length + maxLength: function maxLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length <= parameters; + }, + + //in provided value list + in: function _in(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + if (typeof parameters == "string") { + parameters = parameters.split("|"); + } + + return value === "" || parameters.indexOf(value) > -1; + }, + + //must match provided regex + regex: function regex(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var reg = new RegExp(parameters); + + return reg.test(value); + }, + + //value must be unique in this column + unique: function unique(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var unique = true; + + var cellData = cell.getData(); + var column = cell.getColumn()._getSelf(); + + this.table.rowManager.rows.forEach(function (row) { + var data = row.getData(); + + if (data !== cellData) { + if (value == column.getFieldValue(data)) { + unique = false; + } + } + }); + + return unique; + }, + + //must have a value + required: function required(cell, value, parameters) { + return value !== "" && value !== null && typeof value !== "undefined"; + } +}; + +Tabulator.prototype.registerModule("validate", Validate); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/modules/validate.min.js b/Sources/CustomControls/Table/control/dist/js/modules/validate.min.js new file mode 100644 index 0000000..43aad98 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/modules/validate.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var i,n=this,e=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(i=n._extractValidator(t))&&e.push(i)}):(i=this._extractValidator(t.definition.validator))&&e.push(i),t.modules.validate=!!e.length&&e)},Validate.prototype._extractValidator=function(t){var i,n,e;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.indexOf(":"),e>-1?(i=t.substring(0,e),n=t.substring(e+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,i){var n="function"==typeof t?t:this.validators[t];return n?{type:"function"==typeof t?"function":t,func:n,params:i}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,i,n){var e=this,a=[],o=this.invalidCells.indexOf(i);return t&&t.forEach(function(t){t.func.call(e,i.getComponent(),n,t.params)||a.push({type:t.type,parameters:t.params})}),a=!a.length||a,i.modules.validate||(i.modules.validate={}),!0===a?(i.modules.validate.invalid=!1,i.getElement().classList.remove("tabulator-validation-fail"),o>-1&&this.invalidCells.splice(o,1)):(i.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&i.getElement().classList.add("tabulator-validation-fail"),-1==o&&this.invalidCells.push(i)),a},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach(function(i){t.push(i.getComponent())}),t},Validate.prototype.clearValidation=function(t){var i;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(i=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(i,1))},Validate.prototype.validators={integer:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&Math.floor(i)===i},float:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&i%1!=0},numeric:function(t,i,n){return""===i||null===i||void 0===i||!isNaN(i)},string:function(t,i,n){return""===i||null===i||void 0===i||isNaN(i)},max:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)<=n},min:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)>=n},starts:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().startsWith(String(n).toLowerCase())},ends:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().endsWith(String(n).toLowerCase())},minLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length>=n},maxLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length<=n},in:function(t,i,n){return""===i||null===i||void 0===i||("string"==typeof n&&(n=n.split("|")),""===i||n.indexOf(i)>-1)},regex:function(t,i,n){return""===i||null===i||void 0===i||new RegExp(n).test(i)},unique:function(t,i,n){if(""===i||null===i||void 0===i)return!0;var e=!0,a=t.getData(),o=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var n=t.getData();n!==a&&i==o.getFieldValue(n)&&(e=!1)}),e},required:function(t,i,n){return""!==i&&null!==i&&void 0!==i}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.js b/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.js new file mode 100644 index 0000000..9011b6c --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.js @@ -0,0 +1,23646 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +'use strict'; + +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +if (!Array.prototype.findIndex) { + + Object.defineProperty(Array.prototype, 'findIndex', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + var k = 0; + + // 6. Repeat, while k < len + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + // b. Let kValue be ? Get(O, Pk). + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + // d. If testResult is true, return k. + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return k; + } + + // e. Increase k by 1. + + k++; + } + + // 7. Return -1. + + return -1; + } + + }); +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.find + +if (!Array.prototype.find) { + + Object.defineProperty(Array.prototype, 'find', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + var k = 0; + + // 6. Repeat, while k < len + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + // b. Let kValue be ? Get(O, Pk). + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + // d. If testResult is true, return kValue. + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return kValue; + } + + // e. Increase k by 1. + + k++; + } + + // 7. Return undefined. + + return undefined; + } + + }); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill + +if (!String.prototype.includes) { + + String.prototype.includes = function (search, start) { + + 'use strict'; + + if (search instanceof RegExp) { + + throw TypeError('first argument must not be a RegExp'); + } + + if (start === undefined) { + start = 0; + } + + return this.indexOf(search, start) !== -1; + }; +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.includes + +if (!Array.prototype.includes) { + + Object.defineProperty(Array.prototype, 'includes', { + + value: function value(searchElement, fromIndex) { + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + // 1. Let O be ? ToObject(this value). + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If len is 0, return false. + + if (len === 0) { + + return false; + } + + // 4. Let n be ? ToInteger(fromIndex). + + // (If fromIndex is undefined, this step produces the value 0.) + + var n = fromIndex | 0; + + // 5. If n ≥ 0, then + + // a. Let k be n. + + // 6. Else n < 0, + + // a. Let k be len + n. + + // b. If k < 0, let k be 0. + + var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + + function sameValueZero(x, y) { + + return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); + } + + // 7. Repeat, while k < len + + while (k < len) { + + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + + // b. If SameValueZero(searchElement, elementK) is true, return true. + + if (sameValueZero(o[k], searchElement)) { + + return true; + } + + // c. Increase k by 1. + + k++; + } + + // 8. Return false + + return false; + } + + }); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill + +if (typeof Object.assign !== 'function') { + + // Must be writable: true, enumerable: false, configurable: true + + Object.defineProperty(Object, "assign", { + + value: function assign(target, varArgs) { + // .length of function is 2 + + 'use strict'; + + if (target === null || target === undefined) { + + throw new TypeError('Cannot convert undefined or null to object'); + } + + var to = Object(target); + + for (var index = 1; index < arguments.length; index++) { + + var nextSource = arguments[index]; + + if (nextSource !== null && nextSource !== undefined) { + + for (var nextKey in nextSource) { + + // Avoid bugs when hasOwnProperty is shadowed + + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + + to[nextKey] = nextSource[nextKey]; + } + } + } + } + + return to; + }, + + writable: true, + + configurable: true + + }); +} + +var ColumnManager = function ColumnManager(table) { + + this.table = table; //hold parent table + + this.blockHozScrollEvent = false; + + this.headersElement = this.createHeadersElement(); + + this.element = this.createHeaderElement(); //containing element + + this.rowManager = null; //hold row manager object + + this.columns = []; // column definition object + + this.columnsByIndex = []; //columns by index + + this.columnsByField = {}; //columns by field + + this.scrollLeft = 0; + + this.element.insertBefore(this.headersElement, this.element.firstChild); +}; + +////////////// Setup Functions ///////////////// + + +ColumnManager.prototype.createHeadersElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-headers"); + + return el; +}; + +ColumnManager.prototype.createHeaderElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-header"); + + if (!this.table.options.headerVisible) { + + el.classList.add("tabulator-header-hidden"); + } + + return el; +}; + +ColumnManager.prototype.initialize = function () { + + var self = this; + + //scroll body along with header + + // self.element.addEventListener("scroll", function(e){ + + // if(!self.blockHozScrollEvent){ + + // self.table.rowManager.scrollHorizontal(self.element.scrollLeft); + + // } + + // }); +}; + +//link to row manager + +ColumnManager.prototype.setRowManager = function (manager) { + + this.rowManager = manager; +}; + +//return containing element + +ColumnManager.prototype.getElement = function () { + + return this.element; +}; + +//return header containing element + +ColumnManager.prototype.getHeadersElement = function () { + + return this.headersElement; +}; + +// ColumnManager.prototype.tempScrollBlock = function(){ + +// clearTimeout(this.blockHozScrollEvent); + +// this.blockHozScrollEvent = setTimeout(() => {this.blockHozScrollEvent = false;}, 50); + +// } + + +//scroll horizontally to match table body + +ColumnManager.prototype.scrollHorizontal = function (left) { + + var hozAdjust = 0, + scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; + + // this.tempScrollBlock(); + + this.element.scrollLeft = left; + + //adjust for vertical scrollbar moving table when present + + if (left > scrollWidth) { + + hozAdjust = left - scrollWidth; + + this.element.style.marginLeft = -hozAdjust + "px"; + } else { + + this.element.style.marginLeft = 0; + } + + //keep frozen columns fixed in position + + //this._calcFrozenColumnsPos(hozAdjust + 3); + + + this.scrollLeft = left; + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.scrollHorizontal(); + } +}; + +///////////// Column Setup Functions ///////////// + + +ColumnManager.prototype.generateColumnsFromRowData = function (data) { + + var cols = [], + definitions = this.table.options.autoColumnsDefinitions, + row, + sorter; + + if (data && data.length) { + + row = data[0]; + + for (var key in row) { + + var col = { + + field: key, + + title: key + + }; + + var value = row[key]; + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "undefined": + + sorter = "string"; + + break; + + case "boolean": + + sorter = "boolean"; + + break; + + case "object": + + if (Array.isArray(value)) { + + sorter = "array"; + } else { + + sorter = "string"; + } + + break; + + default: + + if (!isNaN(value) && value !== "") { + + sorter = "number"; + } else { + + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + + sorter = "alphanum"; + } else { + + sorter = "string"; + } + } + + break; + + } + + col.sorter = sorter; + + cols.push(col); + } + + if (definitions) { + + switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { + + case "function": + + this.table.options.columns = definitions.call(this.table, cols); + + break; + + case "object": + + if (Array.isArray(definitions)) { + + cols.forEach(function (col) { + + var match = definitions.find(function (def) { + + return def.field === col.field; + }); + + if (match) { + + Object.assign(col, match); + } + }); + } else { + + cols.forEach(function (col) { + + if (definitions[col.field]) { + + Object.assign(col, definitions[col.field]); + } + }); + } + + this.table.options.columns = cols; + + break; + + } + } else { + + this.table.options.columns = cols; + } + + this.setColumns(this.table.options.columns); + } +}; + +ColumnManager.prototype.setColumns = function (cols, row) { + + var self = this; + + while (self.headersElement.firstChild) { + self.headersElement.removeChild(self.headersElement.firstChild); + }self.columns = []; + + self.columnsByIndex = []; + + self.columnsByField = {}; + + //reset frozen columns + + if (self.table.modExists("frozenColumns")) { + + self.table.modules.frozenColumns.reset(); + } + + cols.forEach(function (def, i) { + + self._addColumn(def); + }); + + self._reIndexColumns(); + + if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { + + self.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(false, true); + } + + self.redraw(true); +}; + +ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { + + var column = new Column(definition, this), + colEl = column.getElement(), + index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; + + if (nextToColumn && index > -1) { + + var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); + + var nextEl = nextToColumn.getElement(); + + if (before) { + + this.columns.splice(parentIndex, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl); + } else { + + this.columns.splice(parentIndex + 1, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); + } + } else { + + if (before) { + + this.columns.unshift(column); + + this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); + } else { + + this.columns.push(column); + + this.headersElement.appendChild(column.getElement()); + } + + column.columnRendered(); + } + + return column; +}; + +ColumnManager.prototype.registerColumnField = function (col) { + + if (col.definition.field) { + + this.columnsByField[col.definition.field] = col; + } +}; + +ColumnManager.prototype.registerColumnPosition = function (col) { + + this.columnsByIndex.push(col); +}; + +ColumnManager.prototype._reIndexColumns = function () { + + this.columnsByIndex = []; + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); +}; + +//ensure column headers take up the correct amount of space in column groups + +ColumnManager.prototype._verticalAlignHeaders = function () { + + var self = this, + minHeight = 0; + + self.columns.forEach(function (column) { + + var height; + + column.clearVerticalAlign(); + + height = column.getHeight(); + + if (height > minHeight) { + + minHeight = height; + } + }); + + self.columns.forEach(function (column) { + + column.verticalAlign(self.table.options.columnHeaderVertAlign, minHeight); + }); + + self.rowManager.adjustTableSize(); +}; + +//////////////// Column Details ///////////////// + + +ColumnManager.prototype.findColumn = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Column) { + + //subject is column element + + return subject; + } else if (subject instanceof ColumnComponent) { + + //subject is public column component + + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + + //subject is a HTML element of the column header + + var match = self.columns.find(function (column) { + + return column.element === subject; + }); + + return match || false; + } + } else { + + //subject should be treated as the field name of the column + + return this.columnsByField[subject] || false; + } + + //catch all for any other type of input + + + return false; +}; + +ColumnManager.prototype.getColumnByField = function (field) { + + return this.columnsByField[field]; +}; + +ColumnManager.prototype.getColumnsByFieldRoot = function (root) { + var _this = this; + + var matches = []; + + Object.keys(this.columnsByField).forEach(function (field) { + + var fieldRoot = field.split(".")[0]; + + if (fieldRoot === root) { + + matches.push(_this.columnsByField[field]); + } + }); + + return matches; +}; + +ColumnManager.prototype.getColumnByIndex = function (index) { + + return this.columnsByIndex[index]; +}; + +ColumnManager.prototype.getFirstVisibileColumn = function (index) { + + var index = this.columnsByIndex.findIndex(function (col) { + + return col.visible; + }); + + return index > -1 ? this.columnsByIndex[index] : false; +}; + +ColumnManager.prototype.getColumns = function () { + + return this.columns; +}; + +ColumnManager.prototype.findColumnIndex = function (column) { + + return this.columnsByIndex.findIndex(function (col) { + + return column === col; + }); +}; + +//return all columns that are not groups + +ColumnManager.prototype.getRealColumns = function () { + + return this.columnsByIndex; +}; + +//travers across columns and call action + +ColumnManager.prototype.traverse = function (callback) { + + var self = this; + + self.columnsByIndex.forEach(function (column, i) { + + callback(column, i); + }); +}; + +//get defintions of actual columns + +ColumnManager.prototype.getDefinitions = function (active) { + + var self = this, + output = []; + + self.columnsByIndex.forEach(function (column) { + + if (!active || active && column.visible) { + + output.push(column.getDefinition()); + } + }); + + return output; +}; + +//get full nested definition tree + +ColumnManager.prototype.getDefinitionTree = function () { + + var self = this, + output = []; + + self.columns.forEach(function (column) { + + output.push(column.getDefinition(true)); + }); + + return output; +}; + +ColumnManager.prototype.getComponents = function (structured) { + + var self = this, + output = [], + columns = structured ? self.columns : self.columnsByIndex; + + columns.forEach(function (column) { + + output.push(column.getComponent()); + }); + + return output; +}; + +ColumnManager.prototype.getWidth = function () { + + var width = 0; + + this.columnsByIndex.forEach(function (column) { + + if (column.visible) { + + width += column.getWidth(); + } + }); + + return width; +}; + +ColumnManager.prototype.moveColumn = function (from, to, after) { + + this.moveColumnActual(from, to, after); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + to.element.parentNode.insertBefore(from.element, to.element); + + if (after) { + + to.element.parentNode.insertBefore(to.element, from.element); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); +}; + +ColumnManager.prototype.moveColumnActual = function (from, to, after) { + + if (from.parent.isGroup) { + + this._moveColumnInArray(from.parent.columns, from, to, after); + } else { + + this._moveColumnInArray(this.columns, from, to, after); + } + + this._moveColumnInArray(this.columnsByIndex, from, to, after, true); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(true); + } + + if (this.table.options.columnMoved) { + + this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } +}; + +ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { + var _this2 = this; + + var fromIndex = columns.indexOf(from), + toIndex, + rows = []; + + if (fromIndex > -1) { + + columns.splice(fromIndex, 1); + + toIndex = columns.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + toIndex = toIndex + 1; + } + } else { + + toIndex = fromIndex; + } + + columns.splice(toIndex, 0, from); + + if (updateRows) { + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + + this.table.rowManager.rows.forEach(function (row) { + + rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); + }); + } + + rows = rows.concat(this.table.rowManager.rows); + + rows.forEach(function (row) { + + if (row.cells.length) { + + var cell = row.cells.splice(fromIndex, 1)[0]; + + row.cells.splice(toIndex, 0, cell); + } + }); + } + } +}; + +ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { + var _this3 = this; + + var left = 0, + offset = 0, + adjust = 0, + colEl = column.getElement(); + + return new Promise(function (resolve, reject) { + + if (typeof position === "undefined") { + + position = _this3.table.options.scrollToColumnPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this3.table.options.scrollToColumnIfVisible; + } + + if (column.visible) { + + //align to correct position + + switch (position) { + + case "middle": + + case "center": + + adjust = -_this3.element.clientWidth / 2; + + break; + + case "right": + + adjust = colEl.clientWidth - _this3.headersElement.clientWidth; + + break; + + } + + //check column visibility + + if (!ifVisible) { + + offset = colEl.offsetLeft; + + if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { + + return false; + } + } + + //calculate scroll position + + left = colEl.offsetLeft + adjust; + + left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); + + _this3.table.rowManager.scrollHorizontal(left); + + _this3.scrollHorizontal(left); + + resolve(); + } else { + + console.warn("Scroll Error - Column not visible"); + + reject("Scroll Error - Column not visible"); + } + }); +}; + +//////////////// Cell Management ///////////////// + + +ColumnManager.prototype.generateCells = function (row) { + + var self = this; + + var cells = []; + + self.columnsByIndex.forEach(function (column) { + + cells.push(column.generateCell(row)); + }); + + return cells; +}; + +//////////////// Column Management ///////////////// + + +ColumnManager.prototype.getFlexBaseWidth = function () { + + var self = this, + totalWidth = self.table.element.clientWidth, + //table element width + + fixedWidth = 0; + + //adjust for vertical scrollbar if present + + if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { + + totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; + } + + this.columnsByIndex.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width || 0; + + minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + } + }); + + return fixedWidth; +}; + +ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { + var _this4 = this; + + return new Promise(function (resolve, reject) { + + var column = _this4._addColumn(definition, before, nextToColumn); + + _this4._reIndexColumns(); + + if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { + + _this4.table.modules.responsiveLayout.initialize(); + } + + if (_this4.table.modExists("columnCalcs")) { + + _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); + } + + _this4.redraw(true); + + if (_this4.table.modules.layout.getMode() != "fitColumns") { + + column.reinitializeWidth(); + } + + _this4._verticalAlignHeaders(); + + _this4.table.rowManager.reinitialize(); + + if (_this4.table.options.virtualDomHoz) { + + _this4.table.vdomHoz.reinitialize(); + } + + resolve(column); + }); +}; + +//remove column from system + +ColumnManager.prototype.deregisterColumn = function (column) { + + var field = column.getField(), + index; + + //remove from field list + + if (field) { + + delete this.columnsByField[field]; + } + + //remove from index list + + index = this.columnsByIndex.indexOf(column); + + if (index > -1) { + + this.columnsByIndex.splice(index, 1); + } + + //remove from column list + + index = this.columns.indexOf(column); + + if (index > -1) { + + this.columns.splice(index, 1); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + this._verticalAlignHeaders(); + + this.redraw(); +}; + +//redraw columns + +ColumnManager.prototype.redraw = function (force) { + + if (force) { + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + + this._verticalAlignHeaders(); + } + + this.table.rowManager.resetScroll(); + + this.table.rowManager.reinitialize(); + } + + if (["fitColumns", "fitDataStretch"].indexOf(this.table.modules.layout.getMode()) > -1) { + + this.table.modules.layout.layout(); + } else { + + if (force) { + + this.table.modules.layout.layout(); + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + } + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layout(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (force) { + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); +}; + +//public column object +var ColumnComponent = function ColumnComponent(column) { + this._column = column; + this.type = "ColumnComponent"; +}; + +ColumnComponent.prototype.getElement = function () { + return this._column.getElement(); +}; + +ColumnComponent.prototype.getDefinition = function () { + return this._column.getDefinition(); +}; + +ColumnComponent.prototype.getField = function () { + return this._column.getField(); +}; + +ColumnComponent.prototype.getCells = function () { + var cells = []; + + this._column.cells.forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; +}; + +ColumnComponent.prototype.getVisibility = function () { + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + return this._column.visible; +}; + +ColumnComponent.prototype.isVisible = function () { + return this._column.visible; +}; + +ColumnComponent.prototype.show = function () { + if (this._column.isGroup) { + this._column.columns.forEach(function (column) { + column.show(); + }); + } else { + this._column.show(); + } +}; + +ColumnComponent.prototype.hide = function () { + if (this._column.isGroup) { + this._column.columns.forEach(function (column) { + column.hide(); + }); + } else { + this._column.hide(); + } +}; + +ColumnComponent.prototype.toggle = function () { + if (this._column.visible) { + this.hide(); + } else { + this.show(); + } +}; + +ColumnComponent.prototype.delete = function () { + return this._column.delete(); +}; + +ColumnComponent.prototype.getSubColumns = function () { + var output = []; + + if (this._column.columns.length) { + this._column.columns.forEach(function (column) { + output.push(column.getComponent()); + }); + } + + return output; +}; + +ColumnComponent.prototype.getParentColumn = function () { + return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; +}; + +ColumnComponent.prototype._getSelf = function () { + return this._column; +}; + +ColumnComponent.prototype.scrollTo = function () { + return this._column.table.columnManager.scrollToColumn(this._column); +}; + +ColumnComponent.prototype.getTable = function () { + return this._column.table; +}; + +ColumnComponent.prototype.headerFilterFocus = function () { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.setHeaderFilterFocus(this._column); + } +}; + +ColumnComponent.prototype.reloadHeaderFilter = function () { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.reloadHeaderFilter(this._column); + } +}; + +ColumnComponent.prototype.getHeaderFilterValue = function () { + if (this._column.table.modExists("filter", true)) { + return this._column.table.modules.filter.getHeaderFilterValue(this._column); + } +}; + +ColumnComponent.prototype.setHeaderFilterValue = function (value) { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.setHeaderFilterValue(this._column, value); + } +}; + +ColumnComponent.prototype.move = function (to, after) { + var toColumn = this._column.table.columnManager.findColumn(to); + + if (toColumn) { + this._column.table.columnManager.moveColumn(this._column, toColumn, after); + } else { + console.warn("Move Error - No matching column found:", toColumn); + } +}; + +ColumnComponent.prototype.getNextColumn = function () { + var nextCol = this._column.nextColumn(); + + return nextCol ? nextCol.getComponent() : false; +}; + +ColumnComponent.prototype.getPrevColumn = function () { + var prevCol = this._column.prevColumn(); + + return prevCol ? prevCol.getComponent() : false; +}; + +ColumnComponent.prototype.updateDefinition = function (updates) { + return this._column.updateDefinition(updates); +}; + +ColumnComponent.prototype.getWidth = function () { + return this._column.getWidth(); +}; + +ColumnComponent.prototype.setWidth = function (width) { + var result; + + if (width === true) { + result = this._column.reinitializeWidth(true); + } else { + result = this._column.setWidth(width); + } + + if (this._column.table.options.virtualDomHoz) { + this._column.table.vdomHoz.reinitialize(true); + } + + return result; +}; + +ColumnComponent.prototype.validate = function () { + return this._column.validate(); +}; + +var Column = function Column(def, parent) { + var self = this; + + this.table = parent.table; + this.definition = def; //column definition + this.parent = parent; //hold parent object + this.type = "column"; //type of element + this.columns = []; //child columns + this.cells = []; //cells bound to this column + this.element = this.createElement(); //column header element + this.contentElement = false; + this.titleHolderElement = false; + this.titleElement = false; + this.groupElement = this.createGroupElement(); //column group holder element + this.isGroup = false; + this.tooltip = false; //hold column tooltip + this.hozAlign = ""; //horizontal text alignment + this.vertAlign = ""; //vert text alignment + + //multi dimensional filed handling + this.field = ""; + this.fieldStructure = ""; + this.getFieldValue = ""; + this.setFieldValue = ""; + + this.titleFormatterRendered = false; + + this.setField(this.definition.field); + + if (this.table.options.invalidOptionWarnings) { + this.checkDefinition(); + } + + this.modules = {}; //hold module variables; + + this.cellEvents = { + cellClick: false, + cellDblClick: false, + cellContext: false, + cellTap: false, + cellDblTap: false, + cellTapHold: false, + cellMouseEnter: false, + cellMouseLeave: false, + cellMouseOver: false, + cellMouseOut: false, + cellMouseMove: false + }; + + this.width = null; //column width + this.widthStyled = ""; //column width prestyled to improve render efficiency + this.maxWidth = null; //column maximum width + this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency + this.minWidth = null; //column minimum width + this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency + this.widthFixed = false; //user has specified a width for this column + + this.visible = true; //default visible state + + this.component = null; + + this._mapDepricatedFunctionality(); + + //initialize column + if (def.columns) { + + this.isGroup = true; + + def.columns.forEach(function (def, i) { + var newCol = new Column(def, self); + self.attachColumn(newCol); + }); + + self.checkColumnVisibility(); + } else { + parent.registerColumnField(this); + } + + if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { + this.table.modules.moveRow.setHandle(true); + } + + this._buildHeader(); + + this.bindModuleColumns(); +}; + +Column.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + el.setAttribute("role", "columnheader"); + el.setAttribute("aria-sort", "none"); + + return el; +}; + +Column.prototype.createGroupElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col-group-cols"); + + return el; +}; + +Column.prototype.checkDefinition = function () { + var _this5 = this; + + Object.keys(this.definition).forEach(function (key) { + if (_this5.defaultOptionList.indexOf(key) === -1) { + console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); + } + }); +}; + +Column.prototype.setField = function (field) { + this.field = field; + this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; + this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; + this.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData; +}; + +//register column position with column manager +Column.prototype.registerColumnPosition = function (column) { + this.parent.registerColumnPosition(column); +}; + +//register column position with column manager +Column.prototype.registerColumnField = function (column) { + this.parent.registerColumnField(column); +}; + +//trigger position registration +Column.prototype.reRegisterPosition = function () { + if (this.isGroup) { + this.columns.forEach(function (column) { + column.reRegisterPosition(); + }); + } else { + this.registerColumnPosition(this); + } +}; + +Column.prototype._mapDepricatedFunctionality = function () { + if (typeof this.definition.hideInHtml !== "undefined") { + this.definition.htmlOutput = !this.definition.hideInHtml; + console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput"); + } + + if (typeof this.definition.align !== "undefined") { + this.definition.hozAlign = this.definition.align; + console.warn("align column definition property is deprecated, you should now use hozAlign"); + } + + if (typeof this.definition.downloadTitle !== "undefined") { + this.definition.titleDownload = this.definition.downloadTitle; + console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"); + } +}; + +Column.prototype.setTooltip = function () { + var self = this, + def = self.definition; + + //set header tooltips + var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; + + if (tooltip) { + if (tooltip === true) { + if (def.field) { + self.table.modules.localize.bind("columns|" + def.field, function (value) { + self.element.setAttribute("title", value || def.title); + }); + } else { + self.element.setAttribute("title", def.title); + } + } else { + if (typeof tooltip == "function") { + tooltip = tooltip(self.getComponent()); + + if (tooltip === false) { + tooltip = ""; + } + } + + self.element.setAttribute("title", tooltip); + } + } else { + self.element.setAttribute("title", ""); + } +}; + +//build header element +Column.prototype._buildHeader = function () { + var self = this, + def = self.definition; + + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); + }if (def.headerVertical) { + self.element.classList.add("tabulator-col-vertical"); + + if (def.headerVertical === "flip") { + self.element.classList.add("tabulator-col-vertical-flip"); + } + } + + self.contentElement = self._bindEvents(); + + self.contentElement = self._buildColumnHeaderContent(); + + self.element.appendChild(self.contentElement); + + if (self.isGroup) { + self._buildGroupHeader(); + } else { + self._buildColumnHeader(); + } + + self.setTooltip(); + + //set resizable handles + if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { + self.table.modules.resizeColumns.initializeColumn("header", self, self.element); + } + + //set resizable handles + if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { + if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { + self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); + } + + self.table.modules.filter.initializeColumn(self); + } + + //set resizable handles + if (self.table.modExists("frozenColumns")) { + self.table.modules.frozenColumns.initializeColumn(self); + } + + //set movable column + if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { + self.table.modules.moveColumn.initializeColumn(self); + } + + //set calcs column + if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { + self.table.modules.columnCalcs.initializeColumn(self); + } + + //handle persistence + if (self.table.modExists("persistence") && self.table.modules.persistence.config.columns) { + self.table.modules.persistence.initializeColumn(self); + } + + //update header tooltip on mouse enter + self.element.addEventListener("mouseenter", function (e) { + self.setTooltip(); + }); +}; + +Column.prototype._bindEvents = function () { + + var self = this, + def = self.definition, + dblTap, + tapHold, + tap; + + //setup header click event bindings + if (typeof def.headerClick == "function") { + self.element.addEventListener("click", function (e) { + def.headerClick(e, self.getComponent()); + }); + } + + if (typeof def.headerDblClick == "function") { + self.element.addEventListener("dblclick", function (e) { + def.headerDblClick(e, self.getComponent()); + }); + } + + if (typeof def.headerContext == "function") { + self.element.addEventListener("contextmenu", function (e) { + def.headerContext(e, self.getComponent()); + }); + } + + //setup header tap event bindings + if (typeof def.headerTap == "function") { + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + def.headerTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (typeof def.headerDblTap == "function") { + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + def.headerDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (typeof def.headerTapHold == "function") { + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + def.headerTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } + + //store column cell click event bindings + if (typeof def.cellClick == "function") { + self.cellEvents.cellClick = def.cellClick; + } + + if (typeof def.cellDblClick == "function") { + self.cellEvents.cellDblClick = def.cellDblClick; + } + + if (typeof def.cellContext == "function") { + self.cellEvents.cellContext = def.cellContext; + } + + //store column mouse event bindings + if (typeof def.cellMouseEnter == "function") { + self.cellEvents.cellMouseEnter = def.cellMouseEnter; + } + + if (typeof def.cellMouseLeave == "function") { + self.cellEvents.cellMouseLeave = def.cellMouseLeave; + } + + if (typeof def.cellMouseOver == "function") { + self.cellEvents.cellMouseOver = def.cellMouseOver; + } + + if (typeof def.cellMouseOut == "function") { + self.cellEvents.cellMouseOut = def.cellMouseOut; + } + + if (typeof def.cellMouseMove == "function") { + self.cellEvents.cellMouseMove = def.cellMouseMove; + } + + //setup column cell tap event bindings + if (typeof def.cellTap == "function") { + self.cellEvents.cellTap = def.cellTap; + } + + if (typeof def.cellDblTap == "function") { + self.cellEvents.cellDblTap = def.cellDblTap; + } + + if (typeof def.cellTapHold == "function") { + self.cellEvents.cellTapHold = def.cellTapHold; + } + + //setup column cell edit callbacks + if (typeof def.cellEdited == "function") { + self.cellEvents.cellEdited = def.cellEdited; + } + + if (typeof def.cellEditing == "function") { + self.cellEvents.cellEditing = def.cellEditing; + } + + if (typeof def.cellEditCancelled == "function") { + self.cellEvents.cellEditCancelled = def.cellEditCancelled; + } +}; + +//build header element for header +Column.prototype._buildColumnHeader = function () { + var _this6 = this; + + var def = this.definition, + table = this.table, + sortable; + + //set column sorter + if (table.modExists("sort")) { + table.modules.sort.initializeColumn(this, this.titleHolderElement); + } + + //set column header context menu + if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { + table.modules.menu.initializeColumnHeader(this); + } + + //set column formatter + if (table.modExists("format")) { + table.modules.format.initializeColumn(this); + } + + //set column editor + if (typeof def.editor != "undefined" && table.modExists("edit")) { + table.modules.edit.initializeColumn(this); + } + + //set colum validator + if (typeof def.validator != "undefined" && table.modExists("validate")) { + table.modules.validate.initializeColumn(this); + } + + //set column mutator + if (table.modExists("mutator")) { + table.modules.mutator.initializeColumn(this); + } + + //set column accessor + if (table.modExists("accessor")) { + table.modules.accessor.initializeColumn(this); + } + + //set respoviveLayout + if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { + table.modules.responsiveLayout.initializeColumn(this); + } + + //set column visibility + if (typeof def.visible != "undefined") { + if (def.visible) { + this.show(true); + } else { + this.hide(true); + } + } + + //asign additional css classes to column header + if (def.cssClass) { + var classeNames = def.cssClass.split(" "); + classeNames.forEach(function (className) { + _this6.element.classList.add(className); + }); + } + + if (def.field) { + this.element.setAttribute("tabulator-field", def.field); + } + + //set min width if present + this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); + + if (def.maxWidth || this.table.options.columnMaxWidth) { + if (def.maxWidth !== false) { + this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth)); + } + } + + this.reinitializeWidth(); + + //set tooltip if present + this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; + + //set orizontal text alignment + this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; + this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; +}; + +Column.prototype._buildColumnHeaderContent = function () { + var def = this.definition, + table = this.table; + + var contentElement = document.createElement("div"); + contentElement.classList.add("tabulator-col-content"); + + this.titleHolderElement = document.createElement("div"); + this.titleHolderElement.classList.add("tabulator-col-title-holder"); + + contentElement.appendChild(this.titleHolderElement); + + this.titleElement = this._buildColumnHeaderTitle(); + + this.titleHolderElement.appendChild(this.titleElement); + + return contentElement; +}; + +//build title element of column +Column.prototype._buildColumnHeaderTitle = function () { + var self = this, + def = self.definition, + table = self.table, + title; + + var titleHolderElement = document.createElement("div"); + titleHolderElement.classList.add("tabulator-col-title"); + + if (def.editableTitle) { + var titleElement = document.createElement("input"); + titleElement.classList.add("tabulator-title-editor"); + + titleElement.addEventListener("click", function (e) { + e.stopPropagation(); + titleElement.focus(); + }); + + titleElement.addEventListener("change", function () { + def.title = titleElement.value; + table.options.columnTitleChanged.call(self.table, self.getComponent()); + }); + + titleHolderElement.appendChild(titleElement); + + if (def.field) { + table.modules.localize.bind("columns|" + def.field, function (text) { + titleElement.value = text || def.title || " "; + }); + } else { + titleElement.value = def.title || " "; + } + } else { + if (def.field) { + table.modules.localize.bind("columns|" + def.field, function (text) { + self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); + }); + } else { + self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); + } + } + + return titleHolderElement; +}; + +Column.prototype._formatColumnHeaderTitle = function (el, title) { + var _this7 = this; + + var formatter, contents, params, mockCell, onRendered; + + if (this.definition.titleFormatter && this.table.modExists("format")) { + + formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); + + onRendered = function onRendered(callback) { + _this7.titleFormatterRendered = callback; + }; + + mockCell = { + getValue: function getValue() { + return title; + }, + getElement: function getElement() { + return el; + } + }; + + params = this.definition.titleFormatterParams || {}; + + params = typeof params === "function" ? params() : params; + + contents = formatter.call(this.table.modules.format, mockCell, params, onRendered); + + switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { + case "object": + if (contents instanceof Node) { + el.appendChild(contents); + } else { + el.innerHTML = ""; + console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); + } + break; + case "undefined": + case "null": + el.innerHTML = ""; + break; + default: + el.innerHTML = contents; + } + } else { + el.innerHTML = title; + } +}; + +//build header element for column group +Column.prototype._buildGroupHeader = function () { + var _this8 = this; + + this.element.classList.add("tabulator-col-group"); + this.element.setAttribute("role", "columngroup"); + this.element.setAttribute("aria-title", this.definition.title); + + //asign additional css classes to column header + if (this.definition.cssClass) { + var classeNames = this.definition.cssClass.split(" "); + classeNames.forEach(function (className) { + _this8.element.classList.add(className); + }); + } + + //set column header context menu + if ((this.definition.headerContextMenu || this.definition.headerMenu) && this.table.modExists("menu")) { + this.table.modules.menu.initializeColumnHeader(this); + } + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + + this.element.appendChild(this.groupElement); +}; + +//flat field lookup +Column.prototype._getFlatData = function (data) { + return data[this.field]; +}; + +//nested field lookup +Column.prototype._getNestedData = function (data) { + var dataObj = data, + structure = this.fieldStructure, + length = structure.length, + output; + + for (var _i = 0; _i < length; _i++) { + + dataObj = dataObj[structure[_i]]; + + output = dataObj; + + if (!dataObj) { + break; + } + } + + return output; +}; + +//flat field set +Column.prototype._setFlatData = function (data, value) { + if (this.field) { + data[this.field] = value; + } +}; + +//nested field set +Column.prototype._setNestedData = function (data, value) { + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for (var _i2 = 0; _i2 < length; _i2++) { + + if (_i2 == length - 1) { + dataObj[structure[_i2]] = value; + } else { + if (!dataObj[structure[_i2]]) { + if (typeof value !== "undefined") { + dataObj[structure[_i2]] = {}; + } else { + break; + } + } + + dataObj = dataObj[structure[_i2]]; + } + } +}; + +//attach column to this group +Column.prototype.attachColumn = function (column) { + var self = this; + + if (self.groupElement) { + self.columns.push(column); + self.groupElement.appendChild(column.getElement()); + } else { + console.warn("Column Warning - Column being attached to another column instead of column group"); + } +}; + +//vertically align header in column +Column.prototype.verticalAlign = function (alignment, height) { + + //calculate height of column header and group holder element + var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; + // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; + + this.element.style.height = parentHeight + "px"; + + if (this.isGroup) { + this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; + } + + //vertically align cell contents + if (!this.isGroup && alignment !== "top") { + if (alignment === "bottom") { + this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; + } else { + this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; + } + } + + this.columns.forEach(function (column) { + column.verticalAlign(alignment); + }); +}; + +//clear vertical alignmenet +Column.prototype.clearVerticalAlign = function () { + this.element.style.paddingTop = ""; + this.element.style.height = ""; + this.element.style.minHeight = ""; + this.groupElement.style.minHeight = ""; + + this.columns.forEach(function (column) { + column.clearVerticalAlign(); + }); +}; + +Column.prototype.bindModuleColumns = function () { + //check if rownum formatter is being used on a column + if (this.definition.formatter == "rownum") { + this.table.rowManager.rowNumColumn = this; + } +}; + +//// Retreive Column Information //// + +//return column header element +Column.prototype.getElement = function () { + return this.element; +}; + +//return colunm group element +Column.prototype.getGroupElement = function () { + return this.groupElement; +}; + +//return field name +Column.prototype.getField = function () { + return this.field; +}; + +//return the first column in a group +Column.prototype.getFirstColumn = function () { + if (!this.isGroup) { + return this; + } else { + if (this.columns.length) { + return this.columns[0].getFirstColumn(); + } else { + return false; + } + } +}; + +//return the last column in a group +Column.prototype.getLastColumn = function () { + if (!this.isGroup) { + return this; + } else { + if (this.columns.length) { + return this.columns[this.columns.length - 1].getLastColumn(); + } else { + return false; + } + } +}; + +//return all columns in a group +Column.prototype.getColumns = function () { + return this.columns; +}; + +//return all columns in a group +Column.prototype.getCells = function () { + return this.cells; +}; + +//retreive the top column in a group of columns +Column.prototype.getTopColumn = function () { + if (this.parent.isGroup) { + return this.parent.getTopColumn(); + } else { + return this; + } +}; + +//return column definition object +Column.prototype.getDefinition = function (updateBranches) { + var colDefs = []; + + if (this.isGroup && updateBranches) { + this.columns.forEach(function (column) { + colDefs.push(column.getDefinition(true)); + }); + + this.definition.columns = colDefs; + } + + return this.definition; +}; + +//////////////////// Actions //////////////////// + +Column.prototype.checkColumnVisibility = function () { + var visible = false; + + this.columns.forEach(function (column) { + if (column.visible) { + visible = true; + } + }); + + if (visible) { + this.show(); + this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } else { + this.hide(); + } +}; + +//show column +Column.prototype.show = function (silent, responsiveToggle) { + if (!this.visible) { + this.visible = true; + + this.element.style.display = ""; + + if (this.parent.isGroup) { + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + cell.show(); + }); + + if (!this.isGroup && this.width === null) { + this.reinitializeWidth(); + } + + this.table.columnManager._verticalAlignHeaders(); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitialize(); + } + } +}; + +//hide column +Column.prototype.hide = function (silent, responsiveToggle) { + if (this.visible) { + this.visible = false; + + this.element.style.display = "none"; + + this.table.columnManager._verticalAlignHeaders(); + + if (this.parent.isGroup) { + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + cell.hide(); + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitialize(); + } + } +}; + +Column.prototype.matchChildWidths = function () { + var childWidth = 0; + + if (this.contentElement && this.columns.length) { + this.columns.forEach(function (column) { + if (column.visible) { + childWidth += column.getWidth(); + } + }); + + this.contentElement.style.maxWidth = childWidth - 1 + "px"; + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + } +}; + +Column.prototype.removeChild = function (child) { + var index = this.columns.indexOf(child); + + if (index > -1) { + this.columns.splice(index, 1); + } + + if (!this.columns.length) { + this.delete(); + } +}; + +Column.prototype.setWidth = function (width) { + this.widthFixed = true; + this.setWidthActual(width); +}; + +Column.prototype.setWidthActual = function (width) { + if (isNaN(width)) { + width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); + } + + width = Math.max(this.minWidth, width); + + if (this.maxWidth) { + width = Math.min(this.maxWidth, width); + } + + this.width = width; + this.widthStyled = width ? width + "px" : ""; + + this.element.style.width = this.widthStyled; + + if (!this.isGroup) { + this.cells.forEach(function (cell) { + cell.setWidth(); + }); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + //set resizable handles + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } +}; + +Column.prototype.checkCellHeights = function () { + var rows = []; + + this.cells.forEach(function (cell) { + if (cell.row.heightInitialized) { + if (cell.row.getElement().offsetParent !== null) { + rows.push(cell.row); + cell.row.clearCellHeight(); + } else { + cell.row.heightInitialized = false; + } + } + }); + + rows.forEach(function (row) { + row.calcHeight(); + }); + + rows.forEach(function (row) { + row.setCellHeight(); + }); +}; + +Column.prototype.getWidth = function () { + var width = 0; + + if (this.isGroup) { + this.columns.forEach(function (column) { + if (column.visible) { + width += column.getWidth(); + } + }); + } else { + width = this.width; + } + + return width; +}; + +Column.prototype.getHeight = function () { + return this.element.offsetHeight; +}; + +Column.prototype.setMinWidth = function (minWidth) { + this.minWidth = minWidth; + this.minWidthStyled = minWidth ? minWidth + "px" : ""; + + this.element.style.minWidth = this.minWidthStyled; + + this.cells.forEach(function (cell) { + cell.setMinWidth(); + }); +}; + +Column.prototype.setMaxWidth = function (maxWidth) { + this.maxWidth = maxWidth; + this.maxWidthStyled = maxWidth ? maxWidth + "px" : ""; + + this.element.style.maxWidth = this.maxWidthStyled; + + this.cells.forEach(function (cell) { + cell.setMaxWidth(); + }); +}; + +Column.prototype.delete = function () { + var _this9 = this; + + return new Promise(function (resolve, reject) { + var index; + + if (_this9.isGroup) { + _this9.columns.forEach(function (column) { + column.delete(); + }); + } + + //cancel edit if column is currently being edited + if (_this9.table.modExists("edit")) { + if (_this9.table.modules.edit.currentCell.column === _this9) { + _this9.table.modules.edit.cancelEdit(); + } + } + + var cellCount = _this9.cells.length; + + for (var _i3 = 0; _i3 < cellCount; _i3++) { + _this9.cells[0].delete(); + } + + if (_this9.element.parentNode) { + _this9.element.parentNode.removeChild(_this9.element); + } + + _this9.element = false; + _this9.contentElement = false; + _this9.titleElement = false; + _this9.groupElement = false; + + if (_this9.parent.isGroup) { + _this9.parent.removeChild(_this9); + } + + _this9.table.columnManager.deregisterColumn(_this9); + + if (_this9.table.options.virtualDomHoz) { + _this9.table.vdomHoz.reinitialize(true); + } + + resolve(); + }); +}; + +Column.prototype.columnRendered = function () { + if (this.titleFormatterRendered) { + this.titleFormatterRendered(); + } +}; + +Column.prototype.validate = function () { + var invalid = []; + + this.cells.forEach(function (cell) { + if (!cell.validate()) { + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; +}; + +//////////////// Cell Management ///////////////// + +//generate cell for this column +Column.prototype.generateCell = function (row) { + var self = this; + + var cell = new Cell(self, row); + + this.cells.push(cell); + + return cell; +}; + +Column.prototype.nextColumn = function () { + var index = this.table.columnManager.findColumnIndex(this); + return index > -1 ? this._nextVisibleColumn(index + 1) : false; +}; + +Column.prototype._nextVisibleColumn = function (index) { + var column = this.table.columnManager.getColumnByIndex(index); + return !column || column.visible ? column : this._nextVisibleColumn(index + 1); +}; + +Column.prototype.prevColumn = function () { + var index = this.table.columnManager.findColumnIndex(this); + return index > -1 ? this._prevVisibleColumn(index - 1) : false; +}; + +Column.prototype._prevVisibleColumn = function (index) { + var column = this.table.columnManager.getColumnByIndex(index); + return !column || column.visible ? column : this._prevVisibleColumn(index - 1); +}; + +Column.prototype.reinitializeWidth = function (force) { + this.widthFixed = false; + + //set width if present + if (typeof this.definition.width !== "undefined" && !force) { + this.setWidth(this.definition.width); + } + + //hide header filters to prevent them altering column width + if (this.table.modExists("filter")) { + this.table.modules.filter.hideHeaderFilterElements(); + } + + this.fitToData(); + + //show header filters again after layout is complete + if (this.table.modExists("filter")) { + this.table.modules.filter.showHeaderFilterElements(); + } +}; + +//set column width to maximum cell width +Column.prototype.fitToData = function () { + var self = this; + + if (!this.widthFixed) { + this.element.style.width = ""; + + self.cells.forEach(function (cell) { + cell.clearWidth(); + }); + } + + var maxWidth = this.element.offsetWidth; + + if (!self.width || !this.widthFixed) { + self.cells.forEach(function (cell) { + var width = cell.getWidth(); + + if (width > maxWidth) { + maxWidth = width; + } + }); + + if (maxWidth) { + self.setWidthActual(maxWidth + 1); + } + } +}; + +Column.prototype.updateDefinition = function (updates) { + var _this10 = this; + + return new Promise(function (resolve, reject) { + var definition; + + if (!_this10.isGroup) { + definition = Object.assign({}, _this10.getDefinition()); + definition = Object.assign(definition, updates); + + _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { + + if (definition.field == _this10.field) { + _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays + } + + _this10.delete().then(function () { + resolve(column.getComponent()); + }).catch(function (err) { + reject(err); + }); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + } + }); +}; + +Column.prototype.deleteCell = function (cell) { + var index = this.cells.indexOf(cell); + + if (index > -1) { + this.cells.splice(index, 1); + } +}; + +Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", +// "headerClickMenu", +"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; + +//////////////// Event Bindings ///////////////// + +//////////////// Object Generation ///////////////// +Column.prototype.getComponent = function () { + if (!this.component) { + this.component = new ColumnComponent(this); + } + + return this.component; +}; + +var RowManager = function RowManager(table) { + + this.table = table; + this.element = this.createHolderElement(); //containing element + this.tableElement = this.createTableElement(); //table element + this.heightFixer = this.createTableElement(); //table element + this.columnManager = null; //hold column manager object + this.height = 0; //hold height of table element + + this.firstRender = false; //handle first render + this.renderMode = "virtual"; //current rendering mode + this.fixedHeight = false; //current rendering mode + + this.rows = []; //hold row data objects + this.activeRows = []; //rows currently available to on display in the table + this.activeRowsCount = 0; //count of active rows + + this.displayRows = []; //rows currently on display in the table + this.displayRowsCount = 0; //count of display rows + + this.scrollTop = 0; + this.scrollLeft = 0; + + this.vDomRowHeight = 20; //approximation of row heights for padding + + this.vDomTop = 0; //hold position for first rendered row in the virtual DOM + this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM + + this.vDomScrollPosTop = 0; //last scroll position of the vDom top; + this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; + + this.vDomTopPad = 0; //hold value of padding for top of virtual DOM + this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM + + this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go + + this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling + + this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) + this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin + + this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed + this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed + + this.rowNumColumn = false; //hold column component for row number column + + this.redrawBlock = false; //prevent redraws to allow multiple data manipulations becore continuing + this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed + this.redrawBlockRederInPosition = false; //store latest redraw function calls for when redraw is needed +}; + +//////////////// Setup Functions ///////////////// + +RowManager.prototype.createHolderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-tableHolder"); + el.setAttribute("tabindex", 0); + + return el; +}; + +RowManager.prototype.createTableElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-table"); + + return el; +}; + +//return containing element +RowManager.prototype.getElement = function () { + return this.element; +}; + +//return table element +RowManager.prototype.getTableElement = function () { + return this.tableElement; +}; + +//return position of row in table +RowManager.prototype.getRowPosition = function (row, active) { + if (active) { + return this.activeRows.indexOf(row); + } else { + return this.rows.indexOf(row); + } +}; + +//link to column manager +RowManager.prototype.setColumnManager = function (manager) { + this.columnManager = manager; +}; + +RowManager.prototype.initialize = function () { + var self = this; + + self.setRenderMode(); + + //initialize manager + self.element.appendChild(self.tableElement); + + self.firstRender = true; + + //scroll header along with table body + self.element.addEventListener("scroll", function () { + var left = self.element.scrollLeft; + + //handle horizontal scrolling + if (self.scrollLeft != left) { + self.columnManager.scrollHorizontal(left); + + if (self.table.options.groupBy) { + self.table.modules.groupRows.scrollHeaders(left); + } + + if (self.table.modExists("columnCalcs")) { + self.table.modules.columnCalcs.scrollHorizontal(left); + } + + self.table.options.scrollHorizontal(left); + } + + self.scrollLeft = left; + }); + + //handle virtual dom scrolling + if (this.renderMode === "virtual") { + + self.element.addEventListener("scroll", function () { + var top = self.element.scrollTop; + var dir = self.scrollTop > top; + + //handle verical scrolling + if (self.scrollTop != top) { + self.scrollTop = top; + self.scrollVertical(dir); + + if (self.table.options.ajaxProgressiveLoad == "scroll") { + self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); + } + + self.table.options.scrollVertical(top); + } else { + self.scrollTop = top; + } + }); + } +}; + +////////////////// Row Manipulation ////////////////// + +RowManager.prototype.findRow = function (subject) { + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + //subject is row element + return subject; + } else if (subject instanceof RowComponent) { + //subject is public row component + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + //subject is a HTML element of the row + var match = self.rows.find(function (row) { + return row.getElement() === subject; + }); + + return match || false; + } + } else if (typeof subject == "undefined" || subject === null) { + return false; + } else { + //subject should be treated as the index of the row + var _match = self.rows.find(function (row) { + return row.data[self.table.options.index] == subject; + }); + + return _match || false; + } + + //catch all for any other type of input + + return false; +}; + +RowManager.prototype.getRowFromDataObject = function (data) { + var match = this.rows.find(function (row) { + return row.data === data; + }); + + return match || false; +}; + +RowManager.prototype.getRowFromPosition = function (position, active) { + if (active) { + return this.activeRows[position]; + } else { + return this.rows[position]; + } +}; + +RowManager.prototype.scrollToRow = function (row, position, ifVisible) { + var _this11 = this; + + var rowIndex = this.getDisplayRows().indexOf(row), + rowEl = row.getElement(), + rowTop, + offset = 0; + + return new Promise(function (resolve, reject) { + if (rowIndex > -1) { + + if (typeof position === "undefined") { + position = _this11.table.options.scrollToRowPosition; + } + + if (typeof ifVisible === "undefined") { + ifVisible = _this11.table.options.scrollToRowIfVisible; + } + + if (position === "nearest") { + switch (_this11.renderMode) { + case "classic": + rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; + position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; + break; + case "virtual": + position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; + break; + } + } + + //check row visibility + if (!ifVisible) { + if (Tabulator.prototype.helpers.elVisible(rowEl)) { + offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; + + if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { + return false; + } + } + } + + //scroll to row + switch (_this11.renderMode) { + case "classic": + _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; + break; + case "virtual": + _this11._virtualRenderFill(rowIndex, true); + break; + } + + //align to correct position + switch (position) { + case "middle": + case "center": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; + } else { + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; + } + + break; + + case "bottom": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + } else { + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; + } + + break; + } + + resolve(); + } else { + console.warn("Scroll Error - Row not visible"); + reject("Scroll Error - Row not visible"); + } + }); +}; + +////////////////// Data Handling ////////////////// + +RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { + var _this12 = this; + + var self = this; + + return new Promise(function (resolve, reject) { + if (renderInPosition && _this12.getDisplayRows().length) { + if (self.table.options.pagination) { + self._setDataActual(data, true); + } else { + _this12.reRenderInPosition(function () { + self._setDataActual(data); + }); + } + } else { + if (_this12.table.options.autoColumns && columnsChanged) { + _this12.table.columnManager.generateColumnsFromRowData(data); + } + _this12.resetScroll(); + + _this12._setDataActual(data); + } + + resolve(); + }); +}; + +RowManager.prototype._setDataActual = function (data, renderInPosition) { + var self = this; + + self.table.options.dataLoading.call(this.table, data); + + this._wipeElements(); + + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.clear(); + } + + if (Array.isArray(data)) { + + if (this.table.modExists("selectRow")) { + this.table.modules.selectRow.clearSelectionData(); + } + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + this.table.modules.reactiveData.watchData(data); + } + + data.forEach(function (def, i) { + if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { + var row = new Row(def, self); + self.rows.push(row); + } else { + console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); + } + }); + + self.refreshActiveData(false, false, renderInPosition); + + self.table.options.dataLoaded.call(this.table, data); + } else { + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); + } +}; + +RowManager.prototype._wipeElements = function () { + this.rows.forEach(function (row) { + row.wipe(); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.wipe(); + } + + this.rows = []; + this.activeRows = []; + this.activeRowsCount = 0; + this.displayRows = []; + this.displayRowsCount = 0; + + this.adjustTableSize(); +}; + +RowManager.prototype.deleteRow = function (row, blockRedraw) { + var allIndex = this.rows.indexOf(row), + activeIndex = this.activeRows.indexOf(row); + + if (activeIndex > -1) { + this.activeRows.splice(activeIndex, 1); + } + + if (allIndex > -1) { + this.rows.splice(allIndex, 1); + } + + this.setActiveRows(this.activeRows); + + this.displayRowIterator(function (rows) { + var displayIndex = rows.indexOf(row); + + if (displayIndex > -1) { + rows.splice(displayIndex, 1); + } + }); + + if (!blockRedraw) { + this.reRenderInPosition(); + } + + this.regenerateRowNumbers(); + + this.table.options.rowDeleted.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } else if (this.table.options.pagination && this.table.modExists("page")) { + this.refreshActiveData(false, false, true); + } else { + if (this.table.options.pagination && this.table.modExists("page")) { + this.refreshActiveData("page"); + } + } +}; + +RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { + + var row = this.addRowActual(data, pos, index, blockRedraw); + + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); + } + + return row; +}; + +//add multiple rows +RowManager.prototype.addRows = function (data, pos, index) { + var _this13 = this; + + var self = this, + length = 0, + rows = []; + + return new Promise(function (resolve, reject) { + pos = _this13.findAddRowPos(pos); + + if (!Array.isArray(data)) { + data = [data]; + } + + length = data.length - 1; + + if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { + data.reverse(); + } + + data.forEach(function (item, i) { + var row = self.addRow(item, pos, index, true); + rows.push(row); + }); + + if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { + _this13.table.modules.groupRows.updateGroupRows(true); + } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { + _this13.refreshActiveData(false, false, true); + } else { + _this13.reRenderInPosition(); + } + + //recalc column calculations if present + if (_this13.table.modExists("columnCalcs")) { + _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); + } + + _this13.regenerateRowNumbers(); + resolve(rows); + }); +}; + +RowManager.prototype.findAddRowPos = function (pos) { + if (typeof pos === "undefined") { + pos = this.table.options.addRowPos; + } + + if (pos === "pos") { + pos = true; + } + + if (pos === "bottom") { + pos = false; + } + + return pos; +}; + +RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { + var row = data instanceof Row ? data : new Row(data || {}, this), + top = this.findAddRowPos(pos), + allIndex = -1, + activeIndex, + dispRows; + + if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { + dispRows = this.getDisplayRows(); + + if (top) { + if (dispRows.length) { + index = dispRows[0]; + } else { + if (this.activeRows.length) { + index = this.activeRows[this.activeRows.length - 1]; + top = false; + } + } + } else { + if (dispRows.length) { + index = dispRows[dispRows.length - 1]; + top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; + } + } + } + + if (typeof index !== "undefined") { + index = this.findRow(index); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.assignRowToGroup(row); + + var groupRows = row.getGroup().rows; + + if (groupRows.length > 1) { + + if (!index || index && groupRows.indexOf(index) == -1) { + if (top) { + if (groupRows[0] !== row) { + index = groupRows[0]; + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } else { + if (groupRows[groupRows.length - 1] !== row) { + index = groupRows[groupRows.length - 1]; + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } else { + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } + + if (index) { + allIndex = this.rows.indexOf(index); + } + + if (index && allIndex > -1) { + activeIndex = this.activeRows.indexOf(index); + + this.displayRowIterator(function (rows) { + var displayIndex = rows.indexOf(index); + + if (displayIndex > -1) { + rows.splice(top ? displayIndex : displayIndex + 1, 0, row); + } + }); + + if (activeIndex > -1) { + this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); + } + + this.rows.splice(top ? allIndex : allIndex + 1, 0, row); + } else { + + if (top) { + + this.displayRowIterator(function (rows) { + rows.unshift(row); + }); + + this.activeRows.unshift(row); + this.rows.unshift(row); + } else { + this.displayRowIterator(function (rows) { + rows.push(row); + }); + + this.activeRows.push(row); + this.rows.push(row); + } + } + + this.setActiveRows(this.activeRows); + + this.table.options.rowAdded.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (!blockRedraw) { + this.reRenderInPosition(); + } + + return row; +}; + +RowManager.prototype.moveRow = function (from, to, after) { + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("rowMove", from, { posFrom: this.getRowPosition(from), posTo: this.getRowPosition(to), to: to, after: after }); + } + + this.moveRowActual(from, to, after); + + this.regenerateRowNumbers(); + + this.table.options.rowMoved.call(this.table, from.getComponent()); +}; + +RowManager.prototype.moveRowActual = function (from, to, after) { + var _this14 = this; + + this._moveRowInArray(this.rows, from, to, after); + this._moveRowInArray(this.activeRows, from, to, after); + + this.displayRowIterator(function (rows) { + _this14._moveRowInArray(rows, from, to, after); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (!after && to instanceof Group) { + to = this.table.rowManager.prevDisplayRow(from) || to; + } + + var toGroup = to.getGroup(); + var fromGroup = from.getGroup(); + + if (toGroup === fromGroup) { + this._moveRowInArray(toGroup.rows, from, to, after); + } else { + if (fromGroup) { + fromGroup.removeRow(from); + } + + toGroup.insertRow(from, to, after); + } + } +}; + +RowManager.prototype._moveRowInArray = function (rows, from, to, after) { + var fromIndex, toIndex, start, end; + + if (from !== to) { + + fromIndex = rows.indexOf(from); + + if (fromIndex > -1) { + + rows.splice(fromIndex, 1); + + toIndex = rows.indexOf(to); + + if (toIndex > -1) { + + if (after) { + rows.splice(toIndex + 1, 0, from); + } else { + rows.splice(toIndex, 0, from); + } + } else { + rows.splice(fromIndex, 0, from); + } + } + + //restyle rows + if (rows === this.getDisplayRows()) { + + start = fromIndex < toIndex ? fromIndex : toIndex; + end = toIndex > fromIndex ? toIndex : fromIndex + 1; + + for (var _i4 = start; _i4 <= end; _i4++) { + if (rows[_i4]) { + this.styleRow(rows[_i4], _i4); + } + } + } + } +}; + +RowManager.prototype.clearData = function () { + this.setData([]); +}; + +RowManager.prototype.getRowIndex = function (row) { + return this.findRowIndex(row, this.rows); +}; + +RowManager.prototype.getDisplayRowIndex = function (row) { + var index = this.getDisplayRows().indexOf(row); + return index > -1 ? index : false; +}; + +RowManager.prototype.nextDisplayRow = function (row, rowOnly) { + var index = this.getDisplayRowIndex(row), + nextRow = false; + + if (index !== false && index < this.displayRowsCount - 1) { + nextRow = this.getDisplayRows()[index + 1]; + } + + if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { + return this.nextDisplayRow(nextRow, rowOnly); + } + + return nextRow; +}; + +RowManager.prototype.prevDisplayRow = function (row, rowOnly) { + var index = this.getDisplayRowIndex(row), + prevRow = false; + + if (index) { + prevRow = this.getDisplayRows()[index - 1]; + } + + if (rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { + return this.prevDisplayRow(prevRow, rowOnly); + } + + return prevRow; +}; + +RowManager.prototype.findRowIndex = function (row, list) { + var rowIndex; + + row = this.findRow(row); + + if (row) { + rowIndex = list.indexOf(row); + + if (rowIndex > -1) { + return rowIndex; + } + } + + return false; +}; + +RowManager.prototype.getData = function (active, transform) { + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + if (row.type == "row") { + output.push(row.getData(transform || "data")); + } + }); + + return output; +}; + +RowManager.prototype.getComponents = function (active) { + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + output.push(row.getComponent()); + }); + + return output; +}; + +RowManager.prototype.getDataCount = function (active) { + var rows = this.getRows(active); + + return rows.length; +}; + +RowManager.prototype._genRemoteRequest = function () { + var _this15 = this; + + var table = this.table, + options = table.options, + params = {}; + + if (table.modExists("page")) { + //set sort data if defined + if (options.ajaxSorting) { + var sorters = this.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + params[this.table.modules.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (options.ajaxFiltering) { + var filters = this.table.modules.filter.getFilters(true, true); + + params[this.table.modules.page.paginationDataSentNames.filters] = filters; + } + + this.table.modules.ajax.setParams(params, true); + } + + table.modules.ajax.sendRequest().then(function (data) { + _this15._setDataActual(data, true); + }).catch(function (e) {}); +}; + +//choose the path to refresh data after a filter update +RowManager.prototype.filterRefresh = function () { + var table = this.table, + options = table.options, + left = this.scrollLeft; + + if (options.ajaxFiltering) { + if (options.pagination == "remote" && table.modExists("page")) { + table.modules.page.reset(true); + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + } else { + this.refreshActiveData("filter"); + } + + this.scrollHorizontal(left); +}; + +//choose the path to refresh data after a sorter update +RowManager.prototype.sorterRefresh = function (loadOrignalData) { + var table = this.table, + options = this.table.options, + left = this.scrollLeft; + + if (options.ajaxSorting) { + if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { + table.modules.page.reset(true); + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + } else { + this.refreshActiveData(loadOrignalData ? "filter" : "sort"); + } + + this.scrollHorizontal(left); +}; + +RowManager.prototype.scrollHorizontal = function (left) { + this.scrollLeft = left; + this.element.scrollLeft = left; + + if (this.table.options.groupBy) { + this.table.modules.groupRows.scrollHeaders(left); + } + + if (this.table.modExists("columnCalcs")) { + this.table.modules.columnCalcs.scrollHorizontal(left); + } +}; + +//set active data set +RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { + var self = this, + table = this.table, + cascadeOrder = ["all", "filter", "sort", "display", "freeze", "group", "tree", "page"], + displayIndex; + + if (this.redrawBlock) { + + if (!this.redrawBlockRestoreConfig || cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage)) { + this.redrawBlockRestoreConfig = { + stage: stage, + skipStage: skipStage, + renderInPosition: renderInPosition + }; + } + + return; + } else { + + if (self.table.modExists("edit")) { + self.table.modules.edit.cancelEdit(); + } + + if (!stage) { + stage = "all"; + } + + if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { + table.modules.selectRow.deselectRows(); + } + + //cascade through data refresh stages + switch (stage) { + case "all": + + case "filter": + if (!skipStage) { + if (table.modExists("filter")) { + self.setActiveRows(table.modules.filter.filter(self.rows)); + } else { + self.setActiveRows(self.rows.slice(0)); + } + } else { + skipStage = false; + } + + case "sort": + if (!skipStage) { + if (table.modExists("sort")) { + table.modules.sort.sort(this.activeRows); + } + } else { + skipStage = false; + } + + //regenerate row numbers for row number formatter if in use + this.regenerateRowNumbers(); + + //generic stage to allow for pipeline trigger after the data manipulation stage + case "display": + this.resetDisplayRows(); + + case "freeze": + if (!skipStage) { + if (this.table.modExists("frozenRows")) { + if (table.modules.frozenRows.isFrozen()) { + if (!table.modules.frozenRows.getDisplayIndex()) { + table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.frozenRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.frozenRows.setDisplayIndex(displayIndex); + } + } + } + } else { + skipStage = false; + } + + case "group": + if (!skipStage) { + if (table.options.groupBy && table.modExists("groupRows")) { + + if (!table.modules.groupRows.getDisplayIndex()) { + table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.groupRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.groupRows.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + + case "tree": + + if (!skipStage) { + if (table.options.dataTree && table.modExists("dataTree")) { + if (!table.modules.dataTree.getDisplayIndex()) { + table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.dataTree.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.dataTree.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + + if (table.options.pagination && table.modExists("page") && !renderInPosition) { + if (table.modules.page.getMode() == "local") { + table.modules.page.reset(); + } + } + + case "page": + if (!skipStage) { + if (table.options.pagination && table.modExists("page")) { + + if (!table.modules.page.getDisplayIndex()) { + table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.page.getDisplayIndex(); + + if (table.modules.page.getMode() == "local") { + table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); + } + + displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.page.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + } + + if (Tabulator.prototype.helpers.elVisible(self.element)) { + if (renderInPosition) { + self.reRenderInPosition(); + } else { + + if (stage === "all" && this.table.options.virtualDomHoz) { + this.table.vdomHoz.dataChange(); + } + + self.renderTable(); + + if (table.options.layoutColumnsOnNewData) { + self.table.columnManager.redraw(true); + } + } + } + + if (table.modExists("columnCalcs")) { + table.modules.columnCalcs.recalc(this.activeRows); + } + } +}; + +//regenerate row numbers for row number formatter if in use +RowManager.prototype.regenerateRowNumbers = function () { + var _this16 = this; + + if (this.rowNumColumn) { + this.activeRows.forEach(function (row) { + var cell = row.getCell(_this16.rowNumColumn); + + if (cell) { + cell._generateContents(); + } + }); + } +}; + +RowManager.prototype.setActiveRows = function (activeRows) { + this.activeRows = activeRows; + this.activeRowsCount = this.activeRows.length; +}; + +//reset display rows array +RowManager.prototype.resetDisplayRows = function () { + this.displayRows = []; + + this.displayRows.push(this.activeRows.slice(0)); + + this.displayRowsCount = this.displayRows[0].length; + + if (this.table.modExists("frozenRows")) { + this.table.modules.frozenRows.setDisplayIndex(0); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.setDisplayIndex(0); + } + + if (this.table.options.pagination && this.table.modExists("page")) { + this.table.modules.page.setDisplayIndex(0); + } +}; + +RowManager.prototype.getNextDisplayIndex = function () { + return this.displayRows.length; +}; + +//set display row pipeline data +RowManager.prototype.setDisplayRows = function (displayRows, index) { + + var output = true; + + if (index && typeof this.displayRows[index] != "undefined") { + this.displayRows[index] = displayRows; + output = true; + } else { + this.displayRows.push(displayRows); + output = index = this.displayRows.length - 1; + } + + if (index == this.displayRows.length - 1) { + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; + } + + return output; +}; + +RowManager.prototype.getDisplayRows = function (index) { + if (typeof index == "undefined") { + return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; + } else { + return this.displayRows[index] || []; + } +}; + +RowManager.prototype.getVisibleRows = function (viewable) { + var topEdge = this.element.scrollTop, + bottomEdge = this.element.clientHeight + topEdge, + topFound = false, + topRow = 0, + bottomRow = 0, + rows = this.getDisplayRows(); + + if (viewable) { + + this.getDisplayRows(); + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + if (rows[i]) { + if (!topFound) { + if (topEdge - rows[i].getElement().offsetTop >= 0) { + topRow = i; + } else { + topFound = true; + + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + bottomRow = i; + } else { + break; + } + } + } else { + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + bottomRow = i; + } else { + break; + } + } + } + } + } else { + topRow = this.vDomTop; + bottomRow = this.vDomBottom; + } + + return rows.slice(topRow, bottomRow + 1); +}; + +//repeat action accross display rows +RowManager.prototype.displayRowIterator = function (callback) { + this.displayRows.forEach(callback); + + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; +}; + +//return only actual rows (not group headers etc) +RowManager.prototype.getRows = function (active) { + var rows; + + switch (active) { + case "active": + rows = this.activeRows; + break; + + case "display": + rows = this.table.rowManager.getDisplayRows(); + break; + + case "visible": + rows = this.getVisibleRows(true); + break; + + case "selected": + rows = this.table.modules.selectRow.selectedRows; + break; + + default: + rows = this.rows; + } + + return rows; +}; + +///////////////// Table Rendering ///////////////// + +//trigger rerender of table in current position +RowManager.prototype.reRenderInPosition = function (callback) { + if (this.getRenderMode() == "virtual") { + + if (this.redrawBlock) { + if (callback) { + callback(); + } else { + this.redrawBlockRederInPosition = true; + } + } else { + var scrollTop = this.element.scrollTop; + var topRow = false; + var topOffset = false; + + var left = this.scrollLeft; + + var rows = this.getDisplayRows(); + + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + + if (rows[i]) { + var diff = scrollTop - rows[i].getElement().offsetTop; + + if (topOffset === false || Math.abs(diff) < topOffset) { + topOffset = diff; + topRow = i; + } else { + break; + } + } + } + + if (callback) { + callback(); + } + + this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); + + this.scrollHorizontal(left); + } + } else { + this.renderTable(); + + if (callback) { + callback(); + } + } +}; + +RowManager.prototype.setRenderMode = function () { + + if (this.table.options.virtualDom) { + + this.renderMode = "virtual"; + + if (this.table.element.clientHeight || this.table.options.height) { + this.fixedHeight = true; + } else { + this.fixedHeight = false; + } + } else { + this.renderMode = "classic"; + } +}; + +RowManager.prototype.getRenderMode = function () { + return this.renderMode; +}; + +RowManager.prototype.renderTable = function () { + + this.table.options.renderStarted.call(this.table); + + this.element.scrollTop = 0; + + switch (this.renderMode) { + case "classic": + this._simpleRender(); + break; + + case "virtual": + this._virtualRenderFill(); + break; + } + + if (this.firstRender) { + if (this.displayRowsCount) { + this.firstRender = false; + this.table.modules.layout.layout(); + } else { + this.renderEmptyScroll(); + } + } + + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } + + if (!this.displayRowsCount) { + if (this.table.options.placeholder) { + + this.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); + + this.getElement().appendChild(this.table.options.placeholder); + this.table.options.placeholder.style.width = this.table.columnManager.getWidth() + "px"; + } + } + + this.table.options.renderComplete.call(this.table); +}; + +//simple render on heightless table +RowManager.prototype._simpleRender = function () { + this._clearVirtualDom(); + + if (this.displayRowsCount) { + this.checkClassicModeGroupHeaderWidth(); + } else { + this.renderEmptyScroll(); + } +}; + +RowManager.prototype.checkClassicModeGroupHeaderWidth = function () { + var self = this, + element = this.tableElement, + onlyGroupHeaders = true; + + self.getDisplayRows().forEach(function (row, index) { + self.styleRow(row, index); + element.appendChild(row.getElement()); + row.initialize(true); + + if (row.type !== "group") { + onlyGroupHeaders = false; + } + }); + + if (onlyGroupHeaders) { + element.style.minWidth = self.table.columnManager.getWidth() + "px"; + } else { + element.style.minWidth = ""; + } +}; + +//show scrollbars on empty table div +RowManager.prototype.renderEmptyScroll = function () { + if (this.table.options.placeholder) { + this.tableElement.style.display = "none"; + } else { + this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; + // this.tableElement.style.minHeight = "1px"; + // this.tableElement.style.visibility = "hidden"; + } +}; + +RowManager.prototype._clearVirtualDom = function () { + var element = this.tableElement; + + if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { + this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); + } + + // element.children.detach(); + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.style.paddingTop = ""; + element.style.paddingBottom = ""; + element.style.minWidth = ""; + element.style.minHeight = ""; + element.style.display = ""; + element.style.visibility = ""; + + this.scrollTop = 0; + this.scrollLeft = 0; + this.vDomTop = 0; + this.vDomBottom = 0; + this.vDomTopPad = 0; + this.vDomBottomPad = 0; +}; + +RowManager.prototype.styleRow = function (row, index) { + var rowEl = row.getElement(); + + if (index % 2) { + rowEl.classList.add("tabulator-row-even"); + rowEl.classList.remove("tabulator-row-odd"); + } else { + rowEl.classList.add("tabulator-row-odd"); + rowEl.classList.remove("tabulator-row-even"); + } +}; + +//full virtual render +RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { + var self = this, + element = self.tableElement, + holder = self.element, + topPad = 0, + rowsHeight = 0, + topPadHeight = 0, + i = 0, + onlyGroupHeaders = true, + rows = self.getDisplayRows(); + + position = position || 0; + + offset = offset || 0; + + if (!position) { + self._clearVirtualDom(); + } else { + while (element.firstChild) { + element.removeChild(element.firstChild); + } //check if position is too close to bottom of table + var heightOccupied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; + + if (heightOccupied < self.height) { + position -= Math.ceil((self.height - heightOccupied) / self.vDomRowHeight); + + if (position < 0) { + position = 0; + } + } + + //calculate initial pad + topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); + position -= topPad; + } + + if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { + + self.vDomTop = position; + + self.vDomBottom = position - 1; + + while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { + var index = self.vDomBottom + 1, + row = rows[index], + rowHeight = 0; + + self.styleRow(row, index); + + element.appendChild(row.getElement()); + + row.initialize(); + + if (!row.heightInitialized) { + row.normalizeHeight(true); + } + + // if(!row.initialized){ + // row.initialize(true); + // }else{ + // if(!row.heightInitialized){ + // row.normalizeHeight(true); + // } + // } + + rowHeight = row.getHeight(); + + if (i < topPad) { + topPadHeight += rowHeight; + } else { + rowsHeight += rowHeight; + } + + if (rowHeight > this.vDomWindowBuffer) { + this.vDomWindowBuffer = rowHeight * 2; + } + + if (row.type !== "group") { + onlyGroupHeaders = false; + } + + self.vDomBottom++; + i++; + } + + if (!position) { + this.vDomTopPad = 0; + //adjust rowheight to match average of rendered elements + self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); + self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); + + self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; + } else { + self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; + self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); + } + + element.style.paddingTop = self.vDomTopPad + "px"; + element.style.paddingBottom = self.vDomBottomPad + "px"; + + if (forceMove) { + this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); + } + + this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); + + //adjust for horizontal scrollbar if present (and not at top of table) + if (this.element.scrollWidth > this.element.offsetWidth && forceMove) { + this.scrollTop += this.element.offsetHeight - this.element.clientHeight; + } + + this.vDomScrollPosTop = this.scrollTop; + this.vDomScrollPosBottom = this.scrollTop; + + holder.scrollTop = this.scrollTop; + + element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; + + if (self.table.options.groupBy) { + if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { + self.tableElement.style.minWidth = self.table.columnManager.getWidth(); + } + } + } else { + this.renderEmptyScroll(); + } + + if (!this.fixedHeight) { + this.adjustTableSize(); + } +}; + +//handle vertical scrolling +RowManager.prototype.scrollVertical = function (dir) { + var topDiff = this.scrollTop - this.vDomScrollPosTop; + var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + var margin = this.vDomWindowBuffer * 2; + + if (-topDiff > margin || bottomDiff > margin) { + //if big scroll redraw table; + var left = this.scrollLeft; + this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); + this.scrollHorizontal(left); + } else { + + if (dir) { + //scrolling up + if (topDiff < 0) { + + this._addTopRow(-topDiff); + } + + if (bottomDiff < 0) { + + //hide bottom row if needed + if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { + this._removeBottomRow(-bottomDiff); + } else { + this.vDomScrollPosBottom = this.scrollTop; + } + } + } else { + //scrolling down + if (topDiff >= 0) { + + //hide top row if needed + if (this.scrollTop > this.vDomWindowBuffer) { + + this._removeTopRow(topDiff); + } else { + this.vDomScrollPosTop = this.scrollTop; + } + } + + if (bottomDiff >= 0) { + + this._addBottomRow(bottomDiff); + } + } + } +}; + +RowManager.prototype._addTopRow = function (topDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomTop) { + var index = this.vDomTop - 1, + topRow = rows[index], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + //hide top row if needed + if (topDiff >= topRowHeight) { + this.styleRow(topRow, index); + table.insertBefore(topRow.getElement(), table.firstChild); + if (!topRow.initialized || !topRow.heightInitialized) { + this.vDomTopNewRows.push(topRow); + + if (!topRow.heightInitialized) { + topRow.clearCellHeight(); + } + } + topRow.initialize(); + + this.vDomTopPad -= topRowHeight; + + if (this.vDomTopPad < 0) { + this.vDomTopPad = index * this.vDomRowHeight; + } + + if (!index) { + this.vDomTopPad = 0; + } + + table.style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop -= topRowHeight; + this.vDomTop--; + } + + topDiff = -(this.scrollTop - this.vDomScrollPosTop); + + if (topRow.getHeight() > this.vDomWindowBuffer) { + this.vDomWindowBuffer = topRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { + this._addTopRow(topDiff, i + 1); + } else { + this._quickNormalizeRowHeight(this.vDomTopNewRows); + } + } +}; + +RowManager.prototype._removeTopRow = function (topDiff) { + var table = this.tableElement, + topRow = this.getDisplayRows()[this.vDomTop], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + if (topDiff >= topRowHeight) { + + var rowEl = topRow.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.vDomTopPad += topRowHeight; + table.style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; + this.vDomTop++; + + topDiff = this.scrollTop - this.vDomScrollPosTop; + + this._removeTopRow(topDiff); + } +}; + +RowManager.prototype._addBottomRow = function (bottomDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomBottom < this.displayRowsCount - 1) { + var index = this.vDomBottom + 1, + bottomRow = rows[index], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + //hide bottom row if needed + if (bottomDiff >= bottomRowHeight) { + this.styleRow(bottomRow, index); + table.appendChild(bottomRow.getElement()); + + if (!bottomRow.initialized || !bottomRow.heightInitialized) { + this.vDomBottomNewRows.push(bottomRow); + + if (!bottomRow.heightInitialized) { + bottomRow.clearCellHeight(); + } + } + + bottomRow.initialize(); + + this.vDomBottomPad -= bottomRowHeight; + + if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom += bottomRowHeight; + this.vDomBottom++; + } + + bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + if (bottomRow.getHeight() > this.vDomWindowBuffer) { + this.vDomWindowBuffer = bottomRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { + this._addBottomRow(bottomDiff, i + 1); + } else { + this._quickNormalizeRowHeight(this.vDomBottomNewRows); + } + } +}; + +RowManager.prototype._removeBottomRow = function (bottomDiff) { + var table = this.tableElement, + bottomRow = this.getDisplayRows()[this.vDomBottom], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + if (bottomDiff >= bottomRowHeight) { + + var rowEl = bottomRow.getElement(); + + if (rowEl.parentNode) { + rowEl.parentNode.removeChild(rowEl); + } + + this.vDomBottomPad += bottomRowHeight; + + if (this.vDomBottomPad < 0) { + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom -= bottomRowHeight; + this.vDomBottom--; + + bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); + + this._removeBottomRow(bottomDiff); + } +}; + +RowManager.prototype._quickNormalizeRowHeight = function (rows) { + rows.forEach(function (row) { + row.calcHeight(); + }); + + rows.forEach(function (row) { + row.setCellHeight(); + }); + + rows.length = 0; +}; + +//normalize height of active rows +RowManager.prototype.normalizeHeight = function () { + this.activeRows.forEach(function (row) { + row.normalizeHeight(); + }); +}; + +//adjust the height of the table holder to fit in the Tabulator element +RowManager.prototype.adjustTableSize = function () { + var initialHeight = this.element.clientHeight, + modExists; + + if (this.renderMode === "virtual") { + var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0)); + + if (this.fixedHeight) { + this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; + this.element.style.height = "calc(100% - " + otherHeight + "px)"; + this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; + } else { + this.element.style.height = ""; + this.element.style.height = this.table.element.clientHeight - otherHeight + "px"; + this.element.scrollTop = this.scrollTop; + } + + this.height = this.element.clientHeight; + this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; + + //check if the table has changed size when dealing with variable height tables + if (!this.fixedHeight && initialHeight != this.element.clientHeight) { + modExists = this.table.modExists("resizeTable"); + + if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) { + this.redraw(); + } + } + } +}; + +//renitialize all rows +RowManager.prototype.reinitialize = function () { + this.rows.forEach(function (row) { + row.reinitialize(true); + }); +}; + +//prevent table from being redrawn +RowManager.prototype.blockRedraw = function () { + this.redrawBlock = true; + this.redrawBlockRestoreConfig = false; +}; + +//restore table redrawing +RowManager.prototype.restoreRedraw = function () { + this.redrawBlock = false; + + if (this.redrawBlockRestoreConfig) { + this.refreshActiveData(this.redrawBlockRestoreConfig.stage, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition); + + this.redrawBlockRestoreConfig = false; + } else { + if (this.redrawBlockRederInPosition) { + this.reRenderInPosition(); + } + } + + this.redrawBlockRederInPosition = false; +}; + +//redraw table +RowManager.prototype.redraw = function (force) { + var pos = 0, + left = this.scrollLeft; + + this.adjustTableSize(); + + this.table.tableWidth = this.table.element.clientWidth; + + if (!force) { + if (this.renderMode == "classic") { + + if (this.table.options.groupBy) { + this.refreshActiveData("group", false, false); + } else { + this._simpleRender(); + } + } else { + this.reRenderInPosition(); + this.scrollHorizontal(left); + } + + if (!this.displayRowsCount) { + if (this.table.options.placeholder) { + this.getElement().appendChild(this.table.options.placeholder); + } + } + } else { + this.renderTable(); + } +}; + +RowManager.prototype.resetScroll = function () { + this.element.scrollLeft = 0; + this.element.scrollTop = 0; + + if (this.table.browser === "ie") { + var event = document.createEvent("Event"); + event.initEvent("scroll", false, true); + this.element.dispatchEvent(event); + } else { + this.element.dispatchEvent(new Event('scroll')); + } +}; + +var VDomHoz = function VDomHoz(table) { + this.table = table; + + this.element = this.table.rowManager.tableElement; + this.holderEl = this.table.rowManager.element; + + this.leftCol = 0; + this.rightCol = 0; + this.scrollLeft = 0; + + this.vDomScrollPosLeft = 0; + this.vDomScrollPosRight = 0; + + this.vDomPadLeft = 0; + this.vDomPadRight = 0; + + this.fitDataColAvg = 0; + + this.window = 200; //pixel margin to make column visible before it is shown on screen + + this.initialized = false; + + this.columns = []; + + if (this.compatabilityCheck()) { + this.initialize(); + } +}; + +VDomHoz.prototype.compatabilityCheck = function () { + var options = this.table.options, + frozen = false, + ok = true; + + if (options.layout == "fitDataTable") { + console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); + ok = false; + } + + if (options.responsiveLayout) { + console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); + ok = false; + } + + if (this.table.rtl) { + console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); + ok = false; + } + + // if(options.rowFormatter){ + // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); + // ok = false; + // } + + if (options.columns) { + frozen = options.columns.find(function (col) { + return col.frozen; + }); + + if (frozen) { + console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); + ok = false; + } + } + + if (!ok) { + options.virtualDomHoz = false; + } + + return ok; +}; + +VDomHoz.prototype.initialize = function () { + var _this17 = this; + + this.holderEl.addEventListener("scroll", function () { + var left = _this17.holderEl.scrollLeft; + + if (_this17.scrollLeft != left) { + _this17.scrollLeft = left; + _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); + } + }); +}; + +VDomHoz.prototype.deinitialize = function () { + this.initialized = false; +}; + +VDomHoz.prototype.clear = function () { + this.columns = []; + + this.leftCol = -1; + this.rightCol = 0; + + this.vDomScrollPosLeft = 0; + this.vDomScrollPosRight = 0; + this.vDomPadLeft = 0; + this.vDomPadRight = 0; +}; + +VDomHoz.prototype.dataChange = function () { + var change = false, + collsWidth = 0, + colEnd = 0, + group, + row, + rowEl; + + if (this.table.options.layout === "fitData") { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (!column.definition.width && column.visible) { + change = true; + } + }); + + if (change) { + if (change && this.table.rowManager.getDisplayRows().length) { + // this.table.vdomHoz.deinitialize(); + + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + if (this.table.options.groupBy) { + group = this.table.modules.groupRows.getGroups(false)[0]; + + row = group.getRows(false)[0]; + } else { + row = this.table.rowManager.getDisplayRows()[0]; + } + + if (row) { + + rowEl = row.getElement(); + + row.generateCells(); + + this.element.appendChild(rowEl); + + for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { + var cell = row.cells[colEnd]; + rowEl.appendChild(cell.getElement()); + + cell.column.reinitializeWidth(); + + collsWidth += cell.column.getWidth(); + + if (collsWidth > this.vDomScrollPosRight) { + break; + } + } + + rowEl.parentNode.removeChild(rowEl); + + this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); + + for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { + this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); + } + + this.reinitialize(false, true); + } + } + } + } else { + if (this.table.options.layout === "fitColumns") { + this.table.modules.layout.layout(); + this.table.vdomHoz.reinitialize(false, true); + } + } +}; + +VDomHoz.prototype.fitDataLayoutOverride = function () { + for (var _i5 = this.leftCol; _i5 <= this.rightCol; _i5++) { + this.columns[_i5].reinitializeWidth(); + } +}; + +VDomHoz.prototype.reinitialize = function (update, blockRedraw) { + var _this18 = this; + + var old = { + cols: this.columns, + leftCol: this.leftCol, + rightCol: this.rightCol + }; + + if (update && !this.initialized) { + return; + } + + this.clear(); + + this.scrollLeft = this.holderEl.scrollLeft; + + this.vDomScrollPosLeft = this.scrollLeft - this.window; + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + var colPos = 0; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + var config = {}; + + if (column.visible) { + var width = column.getWidth(); + + config.leftPos = colPos; + config.rightPos = colPos + width; + + if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { + //column is visible + + if (_this18.leftCol == -1) { + _this18.leftCol = _this18.columns.length; + _this18.vDomPadLeft = colPos; + } + + _this18.rightCol = _this18.columns.length; + } else { + // column is hidden + if (_this18.leftCol !== -1) { + _this18.vDomPadRight += width; + } + } + + _this18.columns.push(column); + + column.modules.vdomHoz = config; + + colPos += width; + } + }); + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.initialized = true; + + if (!blockRedraw) { + if (!update || this.reinitChanged(old)) { + this.renitializeRows(); + } + } + + this.holderEl.scrollLeft = this.scrollLeft; +}; + +VDomHoz.prototype.reinitChanged = function (old) { + var _this19 = this; + + var match = true; + + if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { + return true; + } + + old.cols.forEach(function (col, i) { + if (col !== _this19.columns[i]) { + match = false; + } + }); + + return !match; +}; + +VDomHoz.prototype.renitializeRows = function () { + var _this20 = this; + + var rows = this.table.rowManager.getVisibleRows(); + rows.forEach(function (row) { + _this20.reinitializeRow(row, true); + }); +}; + +VDomHoz.prototype.scroll = function (diff) { + this.vDomScrollPosLeft += diff; + this.vDomScrollPosRight += diff; + + if (diff > this.holderEl.clientWidth * .8) { + this.reinitialize(); + } else { + if (diff > 0) { + //scroll right + this.addColRight(); + this.removeColLeft(); + } else { + //scroll left + this.addColLeft(); + this.removeColRight(); + } + } +}; + +VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { + for (var _i6 = start; _i6 < end; _i6++) { + var column = this.columns[_i6]; + + column.modules.vdomHoz.leftPos -= diff; + column.modules.vdomHoz.rightPos -= diff; + } +}; + +VDomHoz.prototype.addColRight = function () { + var column = this.columns[this.rightCol + 1], + rows, + oldWidth, + widthDiff; + + if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().appendChild(cell.getElement()); + cell.cellRendered(); + } + }); + + if (this.fitDataColAvg) { + + oldWidth = column.getWidth(); + + if (oldWidth === this.fitDataColAvg) { + column.reinitializeWidth(); + + widthDiff = oldWidth - column.getWidth(); + + if (widthDiff) { + column.modules.vdomHoz.rightPos -= widthDiff; + this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); + } + } + } + + this.rightCol++; + + if (this.rightCol >= this.columns.length - 1) { + this.vDomPadRight = 0; + } else { + this.vDomPadRight -= column.getWidth(); + } + + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.addColRight(); + } +}; + +VDomHoz.prototype.addColLeft = function () { + var column = this.columns[this.leftCol - 1], + rows; + + if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { + var rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().prepend(cell.getElement()); + cell.cellRendered(); + } + }); + + if (!this.leftCol) { + this.vDomPadLeft = 0; + } else { + this.vDomPadLeft -= column.getWidth(); + } + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol--; + + this.addColLeft(); + } +}; + +VDomHoz.prototype.removeColRight = function (column) { + var column = this.columns[this.rightCol], + rows; + + if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { + rows = this.table.rowManager.getVisibleRows(); + + column.modules.vdomHoz.visible = false; + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadRight += column.getWidth(); + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.rightCol--; + + this.removeColRight(); + } +}; + +VDomHoz.prototype.removeColLeft = function () { + var column = this.columns[this.leftCol], + rows; + + if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadLeft += column.getWidth(); + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol++; + + this.removeColLeft(); + } +}; + +VDomHoz.prototype.initializeRow = function (row) { + if (row.type !== "group") { + row.modules.vdomHoz = { + leftCol: this.leftCol, + rightCol: this.rightCol + }; + + for (var _i7 = this.leftCol; _i7 <= this.rightCol; _i7++) { + var column = this.columns[_i7]; + + if (column.visible) { + var cell = row.getCell(column); + + row.getElement().appendChild(cell.getElement()); + cell.cellRendered(); + } + } + } +}; + +VDomHoz.prototype.reinitializeRow = function (row, force) { + if (row.type !== "group") { + if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { + var rowEl = row.getElement(); + while (rowEl.firstChild) { + rowEl.removeChild(rowEl.firstChild); + }this.initializeRow(row); + } + } +}; +//public row object +var RowComponent = function RowComponent(row) { + this._row = row; +}; + +RowComponent.prototype.getData = function (transform) { + return this._row.getData(transform); +}; + +RowComponent.prototype.getElement = function () { + return this._row.getElement(); +}; + +RowComponent.prototype.getCells = function () { + var cells = []; + + this._row.getCells().forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; +}; + +RowComponent.prototype.getCell = function (column) { + var cell = this._row.getCell(column); + return cell ? cell.getComponent() : false; +}; + +RowComponent.prototype.getIndex = function () { + return this._row.getData("data")[this._row.table.options.index]; +}; + +RowComponent.prototype.getPosition = function (active) { + return this._row.table.rowManager.getRowPosition(this._row, active); +}; + +RowComponent.prototype.delete = function () { + return this._row.delete(); +}; + +RowComponent.prototype.scrollTo = function () { + return this._row.table.rowManager.scrollToRow(this._row); +}; + +RowComponent.prototype.pageTo = function () { + if (this._row.table.modExists("page", true)) { + return this._row.table.modules.page.setPageToRow(this._row); + } +}; + +RowComponent.prototype.move = function (to, after) { + this._row.moveToRow(to, after); +}; + +RowComponent.prototype.update = function (data) { + return this._row.updateData(data); +}; + +RowComponent.prototype.normalizeHeight = function () { + this._row.normalizeHeight(true); +}; + +RowComponent.prototype.select = function () { + this._row.table.modules.selectRow.selectRows(this._row); +}; + +RowComponent.prototype.deselect = function () { + this._row.table.modules.selectRow.deselectRows(this._row); +}; + +RowComponent.prototype.toggleSelect = function () { + this._row.table.modules.selectRow.toggleRow(this._row); +}; + +RowComponent.prototype.isSelected = function () { + return this._row.table.modules.selectRow.isRowSelected(this._row); +}; + +RowComponent.prototype._getSelf = function () { + return this._row; +}; + +RowComponent.prototype.validate = function () { + return this._row.validate(); +}; + +RowComponent.prototype.freeze = function () { + if (this._row.table.modExists("frozenRows", true)) { + this._row.table.modules.frozenRows.freezeRow(this._row); + } +}; + +RowComponent.prototype.unfreeze = function () { + if (this._row.table.modExists("frozenRows", true)) { + this._row.table.modules.frozenRows.unfreezeRow(this._row); + } +}; + +RowComponent.prototype.isFrozen = function () { + if (this._row.table.modExists("frozenRows", true)) { + var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); + return index > -1; + } + + return false; +}; + +RowComponent.prototype.treeCollapse = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.collapseRow(this._row); + } +}; + +RowComponent.prototype.treeExpand = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.expandRow(this._row); + } +}; + +RowComponent.prototype.treeToggle = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.toggleRow(this._row); + } +}; + +RowComponent.prototype.getTreeParent = function () { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.getTreeParent(this._row); + } + + return false; +}; + +RowComponent.prototype.getTreeChildren = function () { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.getTreeChildren(this._row, true); + } + + return false; +}; + +RowComponent.prototype.addTreeChild = function (data, pos, index) { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.addTreeChildRow(this._row, data, pos, index); + } + + return false; +}; + +RowComponent.prototype.reformat = function () { + return this._row.reinitialize(); +}; + +RowComponent.prototype.getGroup = function () { + return this._row.getGroup().getComponent(); +}; + +RowComponent.prototype.getTable = function () { + return this._row.table; +}; + +RowComponent.prototype.getNextRow = function () { + var row = this._row.nextRow(); + return row ? row.getComponent() : row; +}; + +RowComponent.prototype.getPrevRow = function () { + var row = this._row.prevRow(); + return row ? row.getComponent() : row; +}; + +var Row = function Row(data, parent) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "row"; + + this.table = parent.table; + this.parent = parent; + this.data = {}; + this.type = type; //type of element + this.element = false; + this.modules = {}; //hold module variables; + this.cells = []; + this.height = 0; //hold element height + this.heightStyled = ""; //hold element height prestyled to improve render efficiency + this.manualHeight = false; //user has manually set row height + this.outerHeight = 0; //holde lements outer height + this.initialized = false; //element has been rendered + this.heightInitialized = false; //element has resized cells to fit + + this.component = null; + + this.created = false; + + this.setData(data); +}; + +Row.prototype.create = function () { + if (!this.created) { + this.created = true; + this.generateElement(); + } +}; + +Row.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + el.setAttribute("role", "row"); + + this.element = el; +}; + +Row.prototype.getElement = function () { + this.create(); + return this.element; +}; + +Row.prototype.detachElement = function () { + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } +}; + +Row.prototype.generateElement = function () { + var self = this, + dblTap, + tapHold, + tap; + + this.createElement(); + + //set row selection characteristics + if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { + self.table.modules.selectRow.initializeRow(this); + } + + //setup movable rows + if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + self.table.modules.moveRow.initializeRow(this); + } + + //setup data tree + if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { + self.table.modules.dataTree.initializeRow(this); + } + + //setup column colapse container + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { + self.table.modules.responsiveLayout.initializeRow(this); + } + + //set column menu + if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { + self.table.modules.menu.initializeRow(this); + } + + //handle row click events + if (self.table.options.rowClick) { + self.element.addEventListener("click", function (e) { + self.table.options.rowClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.table.options.rowDblClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowContext) { + self.element.addEventListener("contextmenu", function (e) { + self.table.options.rowContext(e, self.getComponent()); + }); + } + + //handle mouse events + if (self.table.options.rowMouseEnter) { + self.element.addEventListener("mouseenter", function (e) { + self.table.options.rowMouseEnter(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseLeave) { + self.element.addEventListener("mouseleave", function (e) { + self.table.options.rowMouseLeave(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOver) { + self.element.addEventListener("mouseover", function (e) { + self.table.options.rowMouseOver(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOut) { + self.element.addEventListener("mouseout", function (e) { + self.table.options.rowMouseOut(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseMove) { + self.element.addEventListener("mousemove", function (e) { + self.table.options.rowMouseMove(e, self.getComponent()); + }); + } + + if (self.table.options.rowTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + self.table.options.rowTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.table.options.rowDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + self.table.options.rowDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (self.table.options.rowTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.table.options.rowTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } +}; + +Row.prototype.generateCells = function () { + this.cells = this.table.columnManager.generateCells(this); +}; + +//functions to setup on first render +Row.prototype.initialize = function (force) { + var _this21 = this; + + this.create(); + + if (!this.initialized || force) { + + this.deleteCells(); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + } //handle frozen cells + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { + this.table.vdomHoz.initializeRow(this); + } else { + this.cells.forEach(function (cell) { + _this21.element.appendChild(cell.getElement()); + cell.cellRendered(); + }); + } + + if (force) { + this.normalizeHeight(); + } + + //setup movable rows + if (this.table.options.dataTree && this.table.modExists("dataTree")) { + this.table.modules.dataTree.layoutRow(this); + } + + //setup column colapse container + if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { + this.table.modules.responsiveLayout.layoutRow(this); + } + + if (this.table.options.rowFormatter) { + this.table.options.rowFormatter(this.getComponent()); + } + + //set resizable handles + if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { + this.table.modules.resizeRows.initializeRow(this); + } + + this.initialized = true; + } else { + if (this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitializeRow(this); + } + } +}; + +Row.prototype.reinitializeHeight = function () { + this.heightInitialized = false; + + if (this.element && this.element.offsetParent !== null) { + this.normalizeHeight(true); + } +}; + +Row.prototype.reinitialize = function (children) { + this.initialized = false; + this.heightInitialized = false; + + if (!this.manualHeight) { + this.height = 0; + this.heightStyled = ""; + } + + if (this.element && this.element.offsetParent !== null) { + this.initialize(true); + } + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { + child.reinitialize(true); + }); + } +}; + +//get heights when doing bulk row style calcs in virtual DOM +Row.prototype.calcHeight = function (force) { + + var maxHeight = 0, + minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; + + this.cells.forEach(function (cell) { + var height = cell.getHeight(); + if (height > maxHeight) { + maxHeight = height; + } + }); + + if (force) { + this.height = Math.max(maxHeight, minHeight); + } else { + this.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight); + } + + this.heightStyled = this.height ? this.height + "px" : ""; + this.outerHeight = this.element.offsetHeight; +}; + +//set of cells +Row.prototype.setCellHeight = function () { + this.cells.forEach(function (cell) { + cell.setHeight(); + }); + + this.heightInitialized = true; +}; + +Row.prototype.clearCellHeight = function () { + this.cells.forEach(function (cell) { + cell.clearHeight(); + }); +}; + +//normalize the height of elements in the row +Row.prototype.normalizeHeight = function (force) { + + if (force) { + this.clearCellHeight(); + } + + this.calcHeight(force); + + this.setCellHeight(); +}; + +// Row.prototype.setHeight = function(height){ +// this.height = height; + +// this.setCellHeight(); +// }; + +//set height of rows +Row.prototype.setHeight = function (height, force) { + if (this.height != height || force) { + + this.manualHeight = true; + + this.height = height; + this.heightStyled = height ? height + "px" : ""; + + this.setCellHeight(); + + // this.outerHeight = this.element.outerHeight(); + this.outerHeight = this.element.offsetHeight; + } +}; + +//return rows outer height +Row.prototype.getHeight = function () { + return this.outerHeight; +}; + +//return rows outer Width +Row.prototype.getWidth = function () { + return this.element.offsetWidth; +}; + +//////////////// Cell Management ///////////////// + +Row.prototype.deleteCell = function (cell) { + var index = this.cells.indexOf(cell); + + if (index > -1) { + this.cells.splice(index, 1); + } +}; + +//////////////// Data Management ///////////////// + +Row.prototype.setData = function (data) { + if (this.table.modExists("mutator")) { + data = this.table.modules.mutator.transformRow(data, "data"); + } + + this.data = data; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + this.table.modules.reactiveData.watchRow(this); + } +}; + +//update the rows data +Row.prototype.updateData = function (updatedData) { + var _this22 = this; + + var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element), + tempData = {}, + newRowData; + + return new Promise(function (resolve, reject) { + + if (typeof updatedData === "string") { + updatedData = JSON.parse(updatedData); + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + _this22.table.modules.reactiveData.block(); + } + + //mutate incomming data if needed + if (_this22.table.modExists("mutator")) { + + tempData = Object.assign(tempData, _this22.data); + tempData = Object.assign(tempData, updatedData); + + newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); + } else { + newRowData = updatedData; + } + + //set data + for (var attrname in newRowData) { + _this22.data[attrname] = newRowData[attrname]; + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + _this22.table.modules.reactiveData.unblock(); + } + + //update affected cells only + for (var attrname in updatedData) { + + var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); + + columns.forEach(function (column) { + var cell = _this22.getCell(column.getField()); + + if (cell) { + var value = column.getFieldValue(newRowData); + if (cell.getValue() != value) { + cell.setValueProcessData(value); + + if (visible) { + cell.cellRendered(); + } + } + } + }); + } + + if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { + _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); + } + + //Partial reinitialization if visible + if (visible) { + _this22.normalizeHeight(true); + + if (_this22.table.options.rowFormatter) { + _this22.table.options.rowFormatter(_this22.getComponent()); + } + } else { + _this22.initialized = false; + _this22.height = 0; + _this22.heightStyled = ""; + } + + if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { + _this22.table.modules.dataTree.initializeRow(_this22); + + if (visible) { + _this22.table.modules.dataTree.layoutRow(_this22); + _this22.table.rowManager.refreshActiveData("tree", false, true); + } + } + + //this.reinitialize(); + + _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); + + if (_this22.table.options.dataChanged) { + _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); + } + + resolve(); + }); +}; + +Row.prototype.getData = function (transform) { + if (transform) { + if (this.table.modExists("accessor")) { + return this.table.modules.accessor.transformRow(this, transform); + } + } + + return this.data; +}; + +Row.prototype.getCell = function (column) { + var match = false; + + column = this.table.columnManager.findColumn(column); + + match = this.cells.find(function (cell) { + return cell.column === column; + }); + + return match; +}; + +Row.prototype.getCellIndex = function (findCell) { + return this.cells.findIndex(function (cell) { + return cell === findCell; + }); +}; + +Row.prototype.findNextEditableCell = function (index) { + var nextCell = false; + + if (index < this.cells.length - 1) { + for (var i = index + 1; i < this.cells.length; i++) { + var cell = this.cells[i]; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + var allowEdit = true; + + if (typeof cell.column.modules.edit.check == "function") { + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + nextCell = cell; + break; + } + } + } + } + + return nextCell; +}; + +Row.prototype.findPrevEditableCell = function (index) { + var prevCell = false; + + if (index > 0) { + for (var i = index - 1; i >= 0; i--) { + var cell = this.cells[i], + allowEdit = true; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + if (typeof cell.column.modules.edit.check == "function") { + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + prevCell = cell; + break; + } + } + } + } + + return prevCell; +}; + +Row.prototype.getCells = function () { + return this.cells; +}; + +Row.prototype.nextRow = function () { + var row = this.table.rowManager.nextDisplayRow(this, true); + return row || false; +}; + +Row.prototype.prevRow = function () { + var row = this.table.rowManager.prevDisplayRow(this, true); + return row || false; +}; + +Row.prototype.moveToRow = function (to, before) { + var toRow = this.table.rowManager.findRow(to); + + if (toRow) { + this.table.rowManager.moveRowActual(this, toRow, !before); + this.table.rowManager.refreshActiveData("display", false, true); + } else { + console.warn("Move Error - No matching row found:", to); + } +}; + +Row.prototype.validate = function () { + var invalid = []; + + this.cells.forEach(function (cell) { + if (!cell.validate()) { + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; +}; + +///////////////////// Actions ///////////////////// + +Row.prototype.delete = function () { + var _this23 = this; + + return new Promise(function (resolve, reject) { + var index, rows; + + if (_this23.table.options.history && _this23.table.modExists("history")) { + + if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { + rows = _this23.getGroup().rows; + index = rows.indexOf(_this23); + + if (index) { + index = rows[index - 1]; + } + } else { + index = _this23.table.rowManager.getRowIndex(_this23); + + if (index) { + index = _this23.table.rowManager.rows[index - 1]; + } + } + + _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); + } + + _this23.deleteActual(); + + resolve(); + }); +}; + +Row.prototype.deleteActual = function (blockRedraw) { + var index = this.table.rowManager.getRowIndex(this); + + this.detatchModules(); + + // if(this.table.options.dataTree && this.table.modExists("dataTree")){ + // this.table.modules.dataTree.collapseRow(this, true); + // } + + //remove any reactive data watchers from row object + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) {} + // this.table.modules.reactiveData.unwatchRow(this); + + + //remove from group + if (this.modules.group) { + this.modules.group.removeRow(this); + } + + this.table.rowManager.deleteRow(this, blockRedraw); + + this.deleteCells(); + + this.initialized = false; + this.heightInitialized = false; + this.element = false; + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + this.table.modules.dataTree.rowDelete(this); + } + + //recalc column calculations if present + if (this.table.modExists("columnCalcs")) { + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.columnCalcs.recalcRowGroup(this); + } else { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } +}; + +Row.prototype.detatchModules = function () { + //deselect row if it is selected + if (this.table.modExists("selectRow")) { + this.table.modules.selectRow._deselectRow(this, true); + } + + //cancel edit if row is currently being edited + if (this.table.modExists("edit")) { + if (this.table.modules.edit.currentCell.row === this) { + this.table.modules.edit.cancelEdit(); + } + } + + if (this.table.modExists("frozenRows")) { + this.table.modules.frozenRows.detachRow(this); + } +}; + +Row.prototype.deleteCells = function () { + var cellCount = this.cells.length; + + for (var _i8 = 0; _i8 < cellCount; _i8++) { + this.cells[0].delete(); + } +}; + +Row.prototype.wipe = function () { + this.detatchModules(); + this.deleteCells(); + + if (this.element) { + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } + } + + this.element = false; + this.modules = {}; +}; + +Row.prototype.getGroup = function () { + return this.modules.group || false; +}; + +//////////////// Object Generation ///////////////// +Row.prototype.getComponent = function () { + if (!this.component) { + this.component = new RowComponent(this); + } + + return this.component; +}; + +//public row object +var CellComponent = function CellComponent(cell) { + this._cell = cell; +}; + +CellComponent.prototype.getValue = function () { + return this._cell.getValue(); +}; + +CellComponent.prototype.getOldValue = function () { + return this._cell.getOldValue(); +}; + +CellComponent.prototype.getInitialValue = function () { + return this._cell.initialValue; +}; + +CellComponent.prototype.getElement = function () { + return this._cell.getElement(); +}; + +CellComponent.prototype.getRow = function () { + return this._cell.row.getComponent(); +}; + +CellComponent.prototype.getData = function () { + return this._cell.row.getData(); +}; + +CellComponent.prototype.getField = function () { + return this._cell.column.getField(); +}; + +CellComponent.prototype.getColumn = function () { + return this._cell.column.getComponent(); +}; + +CellComponent.prototype.setValue = function (value, mutate) { + if (typeof mutate == "undefined") { + mutate = true; + } + + this._cell.setValue(value, mutate); +}; + +CellComponent.prototype.restoreOldValue = function () { + this._cell.setValueActual(this._cell.getOldValue()); +}; + +CellComponent.prototype.restoreInitialValue = function () { + this._cell.setValueActual(this._cell.initialValue); +}; + +CellComponent.prototype.edit = function (force) { + return this._cell.edit(force); +}; + +CellComponent.prototype.cancelEdit = function () { + this._cell.cancelEdit(); +}; + +CellComponent.prototype.isEdited = function () { + return !!this._cell.modules.edit && this._cell.modules.edit.edited; +}; + +CellComponent.prototype.clearEdited = function () { + if (self.table.modExists("edit", true)) { + this._cell.table.modules.edit.clearEdited(this._cell); + } +}; + +CellComponent.prototype.isValid = function () { + return this._cell.modules.validate ? !this._cell.modules.validate.invalid : true; +}; + +CellComponent.prototype.validate = function () { + return this._cell.validate(); +}; + +CellComponent.prototype.clearValidation = function () { + if (this._cell.table.modExists("validate", true)) { + this._cell.table.modules.validate.clearValidation(this._cell); + } +}; + +CellComponent.prototype.nav = function () { + return this._cell.nav(); +}; + +CellComponent.prototype.checkHeight = function () { + this._cell.checkHeight(); +}; + +CellComponent.prototype.getTable = function () { + return this._cell.table; +}; + +CellComponent.prototype._getSelf = function () { + return this._cell; +}; + +var Cell = function Cell(column, row) { + + this.table = column.table; + this.column = column; + this.row = row; + this.element = null; + this.value = null; + this.initialValue; + this.oldValue = null; + this.modules = {}; + + this.height = null; + this.width = null; + this.minWidth = null; + + this.component = null; + + this.loaded = false; //track if the cell has been added to the DOM yet + + this.build(); +}; + +//////////////// Setup Functions ///////////////// + +//generate element +Cell.prototype.build = function () { + this.generateElement(); + + this.setWidth(); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); + + this.initialValue = this.value; +}; + +Cell.prototype.generateElement = function () { + this.element = document.createElement('div'); + this.element.className = "tabulator-cell"; + this.element.setAttribute("role", "gridcell"); + this.element = this.element; +}; + +Cell.prototype._configureCell = function () { + var self = this, + cellEvents = self.column.cellEvents, + element = self.element, + field = this.column.getField(), + vertAligns = { + top: "flex-start", + bottom: "flex-end", + middle: "center" + }, + hozAligns = { + left: "flex-start", + right: "flex-end", + center: "center" + }; + + //set text alignment + element.style.textAlign = self.column.hozAlign; + + if (self.column.vertAlign) { + element.style.display = "inline-flex"; + + element.style.alignItems = vertAligns[self.column.vertAlign] || ""; + + if (self.column.hozAlign) { + element.style.justifyContent = hozAligns[self.column.hozAlign] || ""; + } + } + + if (field) { + element.setAttribute("tabulator-field", field); + } + + //add class to cell if needed + if (self.column.definition.cssClass) { + var classNames = self.column.definition.cssClass.split(" "); + classNames.forEach(function (className) { + element.classList.add(className); + }); + } + + //update tooltip on mouse enter + if (this.table.options.tooltipGenerationMode === "hover") { + element.addEventListener("mouseenter", function (e) { + self._generateTooltip(); + }); + } + + self._bindClickEvents(cellEvents); + + self._bindTouchEvents(cellEvents); + + self._bindMouseEvents(cellEvents); + + if (self.column.modules.edit) { + self.table.modules.edit.bindEditor(self); + } + + if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + self.table.modules.moveRow.initializeCell(self); + } + + //hide cell if not visible + if (!self.column.visible) { + self.hide(); + } +}; + +Cell.prototype._bindClickEvents = function (cellEvents) { + var self = this, + element = self.element; + + //set event bindings + if (cellEvents.cellClick || self.table.options.cellClick) { + element.addEventListener("click", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellClick) { + cellEvents.cellClick.call(self.table, e, component); + } + + if (self.table.options.cellClick) { + self.table.options.cellClick.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellDblClick || this.table.options.cellDblClick) { + element.addEventListener("dblclick", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellDblClick) { + cellEvents.cellDblClick.call(self.table, e, component); + } + + if (self.table.options.cellDblClick) { + self.table.options.cellDblClick.call(self.table, e, component); + } + }); + } else { + element.addEventListener("dblclick", function (e) { + + if (self.table.modExists("edit")) { + if (self.table.modules.edit.currentCell === self) { + return; //prevent instant selection of editor content + } + } + + e.preventDefault(); + + try { + if (document.selection) { + // IE + var range = document.body.createTextRange(); + range.moveToElementText(self.element); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNode(self.element); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + } catch (e) {} + }); + } + + if (cellEvents.cellContext || this.table.options.cellContext) { + element.addEventListener("contextmenu", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellContext) { + cellEvents.cellContext.call(self.table, e, component); + } + + if (self.table.options.cellContext) { + self.table.options.cellContext.call(self.table, e, component); + } + }); + } +}; + +Cell.prototype._bindMouseEvents = function (cellEvents) { + var self = this, + element = self.element; + + if (cellEvents.cellMouseEnter || self.table.options.cellMouseEnter) { + element.addEventListener("mouseenter", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseEnter) { + cellEvents.cellMouseEnter.call(self.table, e, component); + } + + if (self.table.options.cellMouseEnter) { + self.table.options.cellMouseEnter.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseLeave || self.table.options.cellMouseLeave) { + element.addEventListener("mouseleave", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseLeave) { + cellEvents.cellMouseLeave.call(self.table, e, component); + } + + if (self.table.options.cellMouseLeave) { + self.table.options.cellMouseLeave.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOver || self.table.options.cellMouseOver) { + element.addEventListener("mouseover", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseOver) { + cellEvents.cellMouseOver.call(self.table, e, component); + } + + if (self.table.options.cellMouseOver) { + self.table.options.cellMouseOver.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOut || self.table.options.cellMouseOut) { + element.addEventListener("mouseout", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseOut) { + cellEvents.cellMouseOut.call(self.table, e, component); + } + + if (self.table.options.cellMouseOut) { + self.table.options.cellMouseOut.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseMove || self.table.options.cellMouseMove) { + element.addEventListener("mousemove", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseMove) { + cellEvents.cellMouseMove.call(self.table, e, component); + } + + if (self.table.options.cellMouseMove) { + self.table.options.cellMouseMove.call(self.table, e, component); + } + }); + } +}; + +Cell.prototype._bindTouchEvents = function (cellEvents) { + var self = this, + element = self.element, + dblTap, + tapHold, + tap; + + if (cellEvents.cellTap || this.table.options.cellTap) { + tap = false; + + element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + if (tap) { + var component = self.getComponent(); + + if (cellEvents.cellTap) { + cellEvents.cellTap.call(self.table, e, component); + } + + if (self.table.options.cellTap) { + self.table.options.cellTap.call(self.table, e, component); + } + } + + tap = false; + }); + } + + if (cellEvents.cellDblTap || this.table.options.cellDblTap) { + dblTap = null; + + element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + var component = self.getComponent(); + + if (cellEvents.cellDblTap) { + cellEvents.cellDblTap.call(self.table, e, component); + } + + if (self.table.options.cellDblTap) { + self.table.options.cellDblTap.call(self.table, e, component); + } + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (cellEvents.cellTapHold || this.table.options.cellTapHold) { + tapHold = null; + + element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + var component = self.getComponent(); + + if (cellEvents.cellTapHold) { + cellEvents.cellTapHold.call(self.table, e, component); + } + + if (self.table.options.cellTapHold) { + self.table.options.cellTapHold.call(self.table, e, component); + } + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } +}; + +//generate cell contents +Cell.prototype._generateContents = function () { + var val; + + if (this.table.modExists("format")) { + val = this.table.modules.format.formatValue(this); + } else { + val = this.element.innerHTML = this.value; + } + + switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { + case "object": + if (val instanceof Node) { + + //clear previous cell contents + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }this.element.appendChild(val); + } else { + this.element.innerHTML = ""; + + if (val != null) { + console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); + } + } + break; + case "undefined": + case "null": + this.element.innerHTML = ""; + break; + default: + this.element.innerHTML = val; + } +}; + +Cell.prototype.cellRendered = function () { + if (this.table.modExists("format") && this.table.modules.format.cellRendered) { + this.table.modules.format.cellRendered(this); + } +}; + +//generate tooltip text +Cell.prototype._generateTooltip = function () { + var tooltip = this.column.tooltip; + + if (tooltip) { + if (tooltip === true) { + tooltip = this.value; + } else if (typeof tooltip == "function") { + tooltip = tooltip(this.getComponent()); + + if (tooltip === false) { + tooltip = ""; + } + } + + if (typeof tooltip === "undefined") { + tooltip = ""; + } + + this.element.setAttribute("title", tooltip); + } else { + this.element.setAttribute("title", ""); + } +}; + +//////////////////// Getters //////////////////// +Cell.prototype.getElement = function (containerOnly) { + if (!this.loaded) { + this.loaded = true; + if (!containerOnly) { + this.layoutElement(); + } + } + + return this.element; +}; + +Cell.prototype.getValue = function () { + return this.value; +}; + +Cell.prototype.getOldValue = function () { + return this.oldValue; +}; + +//////////////////// Actions //////////////////// + +Cell.prototype.setValue = function (value, mutate) { + + var changed = this.setValueProcessData(value, mutate), + component; + + if (changed) { + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); + } + + component = this.getComponent(); + + if (this.column.cellEvents.cellEdited) { + this.column.cellEvents.cellEdited.call(this.table, component); + } + + if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.reassignRowToGroup(this.row); + } + + this.cellRendered(); + + this.table.options.cellEdited.call(this.table, component); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); + } + } +}; + +Cell.prototype.setValueProcessData = function (value, mutate) { + var changed = false; + + if (this.value != value) { + + changed = true; + + if (mutate) { + if (this.column.modules.mutate) { + value = this.table.modules.mutator.transformCell(this, value); + } + } + } + + this.setValueActual(value); + + if (changed && this.table.modExists("columnCalcs")) { + if (this.column.definition.topCalc || this.column.definition.bottomCalc) { + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (this.table.options.columnCalcs == "table" || this.table.options.columnCalcs == "both") { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (this.table.options.columnCalcs != "table") { + this.table.modules.columnCalcs.recalcRowGroup(this.row); + } + } else { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } + } + + return changed; +}; + +Cell.prototype.setValueActual = function (value) { + this.oldValue = this.value; + + this.value = value; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + this.table.modules.reactiveData.block(); + } + + this.column.setFieldValue(this.row.data, value); + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + this.table.modules.reactiveData.unblock(); + } + + if (this.loaded) { + this.layoutElement(); + } +}; + +Cell.prototype.layoutElement = function () { + this._generateContents(); + this._generateTooltip(); + + //set resizable handles + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { + this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { + this.table.modules.menu.initializeCell(this); + } + + //handle frozen cells + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layoutElement(this.element, this.column); + } +}; + +Cell.prototype.setWidth = function () { + this.width = this.column.width; + this.element.style.width = this.column.widthStyled; +}; + +Cell.prototype.clearWidth = function () { + this.width = ""; + this.element.style.width = ""; +}; + +Cell.prototype.getWidth = function () { + return this.width || this.element.offsetWidth; +}; + +Cell.prototype.setMinWidth = function () { + this.minWidth = this.column.minWidth; + this.element.style.minWidth = this.column.minWidthStyled; +}; + +Cell.prototype.setMaxWidth = function () { + this.maxWidth = this.column.maxWidth; + this.element.style.maxWidth = this.column.maxWidthStyled; +}; + +Cell.prototype.checkHeight = function () { + // var height = this.element.css("height"); + this.row.reinitializeHeight(); +}; + +Cell.prototype.clearHeight = function () { + this.element.style.height = ""; + this.height = null; +}; + +Cell.prototype.setHeight = function () { + this.height = this.row.height; + this.element.style.height = this.row.heightStyled; +}; + +Cell.prototype.getHeight = function () { + return this.height || this.element.offsetHeight; +}; + +Cell.prototype.show = function () { + this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; +}; + +Cell.prototype.hide = function () { + this.element.style.display = "none"; +}; + +Cell.prototype.edit = function (force) { + if (this.table.modExists("edit", true)) { + return this.table.modules.edit.editCell(this, force); + } +}; + +Cell.prototype.cancelEdit = function () { + if (this.table.modExists("edit", true)) { + var editing = this.table.modules.edit.getCurrentCell(); + + if (editing && editing._getSelf() === this) { + this.table.modules.edit.cancelEdit(); + } else { + console.warn("Cancel Editor Error - This cell is not currently being edited "); + } + } +}; + +Cell.prototype.validate = function () { + if (this.column.modules.validate && this.table.modExists("validate", true)) { + var valid = this.table.modules.validate.validate(this.column.modules.validate, this, this.getValue()); + + return valid === true; + } else { + return true; + } +}; + +Cell.prototype.delete = function () { + if (!this.table.rowManager.redrawBlock && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } + + if (this.modules.validate && this.modules.validate.invalid) { + this.table.modules.validate.clearValidation(this); + } + + if (this.modules.edit && this.modules.edit.edited) { + this.table.modules.edit.clearEdited(this); + } + + if (this.table.options.history) { + this.table.modules.history.clearComponentHistory(this); + } + + this.element = false; + this.column.deleteCell(this); + this.row.deleteCell(this); + this.calcs = {}; +}; + +//////////////// Navigation ///////////////// + +Cell.prototype.nav = function () { + + var self = this, + nextCell = false, + index = this.row.getCellIndex(this); + + return { + next: function next() { + var nextCell = this.right(), + nextRow; + + if (!nextCell) { + nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + nextCell = nextRow.findNextEditableCell(-1); + + if (nextCell) { + nextCell.edit(); + return true; + } + } + } else { + return true; + } + + return false; + }, + prev: function prev() { + var nextCell = this.left(), + prevRow; + + if (!nextCell) { + prevRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (prevRow) { + nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); + + if (nextCell) { + nextCell.edit(); + return true; + } + } + } else { + return true; + } + + return false; + }, + left: function left() { + + nextCell = self.row.findPrevEditableCell(index); + + if (nextCell) { + nextCell.edit(); + return true; + } else { + return false; + } + }, + right: function right() { + nextCell = self.row.findNextEditableCell(index); + + if (nextCell) { + nextCell.edit(); + return true; + } else { + return false; + } + }, + up: function up() { + var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (nextRow) { + nextRow.cells[index].edit(); + } + }, + down: function down() { + var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + nextRow.cells[index].edit(); + } + } + + }; +}; + +Cell.prototype.getIndex = function () { + this.row.getCellIndex(this); +}; + +//////////////// Object Generation ///////////////// +Cell.prototype.getComponent = function () { + + if (!this.component) { + this.component = new CellComponent(this); + } + + return this.component; +}; +var FooterManager = function FooterManager(table) { + this.table = table; + this.active = false; + this.element = this.createElement(); //containing element + this.external = false; + this.links = []; + + this._initialize(); +}; + +FooterManager.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-footer"); + + return el; +}; + +FooterManager.prototype._initialize = function (element) { + if (this.table.options.footerElement) { + + switch (_typeof(this.table.options.footerElement)) { + case "string": + + if (this.table.options.footerElement[0] === "<") { + this.element.innerHTML = this.table.options.footerElement; + } else { + this.external = true; + this.element = document.querySelector(this.table.options.footerElement); + } + break; + default: + this.element = this.table.options.footerElement; + break; + } + } +}; + +FooterManager.prototype.getElement = function () { + return this.element; +}; + +FooterManager.prototype.append = function (element, parent) { + this.activate(parent); + + this.element.appendChild(element); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.prepend = function (element, parent) { + this.activate(parent); + + this.element.insertBefore(element, this.element.firstChild); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.remove = function (element) { + element.parentNode.removeChild(element); + this.deactivate(); +}; + +FooterManager.prototype.deactivate = function (force) { + if (!this.element.firstChild || force) { + if (!this.external) { + this.element.parentNode.removeChild(this.element); + } + this.active = false; + } + + // this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.activate = function (parent) { + if (!this.active) { + this.active = true; + if (!this.external) { + this.table.element.appendChild(this.getElement()); + this.table.element.style.display = ''; + } + } + + if (parent) { + this.links.push(parent); + } +}; + +FooterManager.prototype.redraw = function () { + this.links.forEach(function (link) { + link.footerRedraw(); + }); +}; + +var Tabulator = function Tabulator(element, options) { + + this.options = {}; + + this.columnManager = null; // hold Column Manager + this.rowManager = null; //hold Row Manager + this.footerManager = null; //holder Footer Manager + this.vdomHoz = null; //holder horizontal virtual dom + + + this.browser = ""; //hold current browser type + this.browserSlow = false; //handle reduced functionality for slower browsers + this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence + this.rtl = false; //check if the table is in RTL mode + + this.modules = {}; //hold all modules bound to this table + + if (this.initializeElement(element)) { + this.initializeOptions(options || {}); + this._create(); + } + + Tabulator.prototype.comms.register(this); //register table for inderdevice communication +}; + +//default setup options +Tabulator.prototype.defaultOptions = { + + height: false, //height of tabulator + minHeight: false, //minimum height of tabulator + maxHeight: false, //maximum height of tabulator + + layout: "fitData", ///layout type "fitColumns" | "fitData" + layoutColumnsOnNewData: false, //update column widths on setData + + columnMinWidth: 40, //minimum global width for a column + columnMaxWidth: false, //minimum global width for a column + columnHeaderVertAlign: "top", //vertical alignment of column headers + columnVertAlign: false, // DEPRECATED - Left to allow warning + + resizableColumns: true, //resizable columns + resizableRows: false, //resizable rows + autoResize: true, //auto resize table + + columns: [], //store for colum header info + + cellHozAlign: "", //horizontal align columns + cellVertAlign: "", //vertical align columns + headerHozAlign: "", //horizontal header alignment + + + data: [], //default starting data + + autoColumns: false, //build columns from data row structure + autoColumnsDefinitions: false, + + reactiveData: false, //enable data reactivity + + nestedFieldSeparator: ".", //seperatpr for nested data + + tooltips: false, //Tool tip value + tooltipsHeader: false, //Tool tip for headers + tooltipGenerationMode: "load", //when to generate tooltips + + initialSort: false, //initial sorting criteria + initialFilter: false, //initial filtering criteria + initialHeaderFilter: false, //initial header filtering criteria + + columnHeaderSortMulti: true, //multiple or single column sorting + + sortOrderReverse: false, //reverse internal sort ordering + + headerSort: true, //set default global header sort + headerSortTristate: false, //set default tristate header sorting + headerSortElement: "
", //header sort element + + footerElement: false, //hold footer element + + index: "id", //filed for row index + + textDirection: "auto", + + keybindings: [], //array for keybindings + + tabEndNewRow: false, //create new row when tab to end of table + + invalidOptionWarnings: true, //allow toggling of invalid option warnings + + clipboard: false, //enable clipboard + clipboardCopyStyled: true, //formatted table data + clipboardCopyConfig: false, //clipboard config + clipboardCopyFormatter: false, //DEPRICATED - REMOVE in 5.0 + clipboardCopyRowRange: "active", //restrict clipboard to visible rows only + clipboardPasteParser: "table", //convert pasted clipboard data to rows + clipboardPasteAction: "insert", //how to insert pasted data into the table + + clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard + clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table + clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table + + downloadDataFormatter: false, //function to manipulate table data before it is downloaded + downloadReady: function downloadReady(data, blob) { + return blob; + }, //function to manipulate download data + downloadComplete: false, //function to manipulate download data + downloadConfig: {}, //download config + downloadRowRange: "active", //restrict download to active rows only + + dataTree: false, //enable data tree + dataTreeFilter: true, //filter child rows + dataTreeSort: true, //sort child rows + dataTreeElementColumn: false, + dataTreeBranchElement: true, //show data tree branch element + dataTreeChildIndent: 9, //data tree child indent in px + dataTreeChildField: "_children", //data tre column field to look for child rows + dataTreeCollapseElement: false, //data tree row collapse element + dataTreeExpandElement: false, //data tree row expand element + dataTreeStartExpanded: false, + dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded + dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed + dataTreeChildColumnCalcs: false, //include visible data tree rows in column calculations + dataTreeSelectPropagate: false, //seleccting a parent row selects its children + + printAsHtml: false, //enable print as html + printFormatter: false, //printing page formatter + printHeader: false, //page header contents + printFooter: false, //page footer contents + printCopyStyle: true, //DEPRICATED - REMOVE in 5.0 + printStyled: true, //enable print as html styling + printVisibleRows: true, //DEPRICATED - REMOVE in 5.0 + printRowRange: "visible", //restrict print to visible rows only + printConfig: {}, //print config options + + addRowPos: "bottom", //position to insert blank rows, top|bottom + + selectable: "highlight", //highlight rows on hover + selectableRangeMode: "drag", //highlight rows on hover + selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached + selectablePersistence: true, // maintain selection when table view is updated + selectableCheck: function selectableCheck(data, row) { + return true; + }, //check wheather row is selectable + + headerFilterLiveFilterDelay: 300, //delay before updating column after user types in header filter + headerFilterPlaceholder: false, //placeholder text to display in header filters + + headerVisible: true, //hide header + + history: false, //enable edit history + + locale: false, //current system language + langs: {}, + + virtualDom: true, //enable DOM virtualization + virtualDomBuffer: 0, // set virtual DOM buffer size + virtualDomHoz: false, //enable horizontal DOM virtualization + + persistentLayout: false, //DEPRICATED - REMOVE in 5.0 + persistentSort: false, //DEPRICATED - REMOVE in 5.0 + persistentFilter: false, //DEPRICATED - REMOVE in 5.0 + persistenceID: "", //key for persistent storage + persistenceMode: true, //mode for storing persistence information + persistenceReaderFunc: false, //function for handling persistence data reading + persistenceWriterFunc: false, //function for handling persistence data writing + + persistence: false, + + responsiveLayout: false, //responsive layout flags + responsiveLayoutCollapseStartOpen: true, //start showing collapsed data + responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter + responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter + + pagination: false, //set pagination type + paginationSize: false, //set number of rows to a page + paginationInitialPage: 1, //initail page to show on load + paginationButtonCount: 5, // set count of page button + paginationSizeSelector: false, //add pagination size selector element + paginationElement: false, //element to hold pagination numbers + paginationDataSent: {}, //pagination data sent to the server + paginationDataReceived: {}, //pagination data received from the server + paginationAddRow: "page", //add rows on table or page + + ajaxURL: false, //url for ajax loading + ajaxURLGenerator: false, + ajaxParams: {}, //params for ajax loading + ajaxConfig: "get", //ajax request type + ajaxContentType: "form", //ajax request type + ajaxRequestFunc: false, //promise function + ajaxLoader: true, //show loader + ajaxLoaderLoading: false, //loader element + ajaxLoaderError: false, //loader element + ajaxFiltering: false, + ajaxSorting: false, + ajaxProgressiveLoad: false, //progressive loading + ajaxProgressiveLoadDelay: 0, //delay between requests + ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins + + groupBy: false, //enable table grouping and set field to group by + groupStartOpen: true, //starting state of group + groupValues: false, + groupUpdateOnCellEdit: false, + + groupHeader: false, //header generation function + groupHeaderPrint: null, + groupHeaderClipboard: null, + groupHeaderHtmlOutput: null, + groupHeaderDownload: null, + + htmlOutputConfig: false, //html outypu config + + movableColumns: false, //enable movable columns + + movableRows: false, //enable movable rows + movableRowsConnectedTables: false, //tables for movable rows to be connected to + movableRowsConnectedElements: false, //other elements for movable rows to be connected to + movableRowsSender: false, + movableRowsReceiver: "insert", + movableRowsSendingStart: function movableRowsSendingStart() {}, + movableRowsSent: function movableRowsSent() {}, + movableRowsSentFailed: function movableRowsSentFailed() {}, + movableRowsSendingStop: function movableRowsSendingStop() {}, + movableRowsReceivingStart: function movableRowsReceivingStart() {}, + movableRowsReceived: function movableRowsReceived() {}, + movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, + movableRowsReceivingStop: function movableRowsReceivingStop() {}, + movableRowsElementDrop: function movableRowsElementDrop() {}, + + scrollToRowPosition: "top", + scrollToRowIfVisible: true, + + scrollToColumnPosition: "left", + scrollToColumnIfVisible: true, + + rowFormatter: false, + rowFormatterPrint: null, + rowFormatterClipboard: null, + rowFormatterHtmlOutput: null, + + placeholder: false, + + //table building callbacks + tableBuilding: function tableBuilding() {}, + tableBuilt: function tableBuilt() {}, + + //render callbacks + renderStarted: function renderStarted() {}, + renderComplete: function renderComplete() {}, + + //row callbacks + rowClick: false, + rowDblClick: false, + rowContext: false, + rowTap: false, + rowDblTap: false, + rowTapHold: false, + rowMouseEnter: false, + rowMouseLeave: false, + rowMouseOver: false, + rowMouseOut: false, + rowMouseMove: false, + rowContextMenu: false, + rowClickMenu: false, + rowAdded: function rowAdded() {}, + rowDeleted: function rowDeleted() {}, + rowMoved: function rowMoved() {}, + rowUpdated: function rowUpdated() {}, + rowSelectionChanged: function rowSelectionChanged() {}, + rowSelected: function rowSelected() {}, + rowDeselected: function rowDeselected() {}, + rowResized: function rowResized() {}, + + //cell callbacks + //row callbacks + cellClick: false, + cellDblClick: false, + cellContext: false, + cellTap: false, + cellDblTap: false, + cellTapHold: false, + cellMouseEnter: false, + cellMouseLeave: false, + cellMouseOver: false, + cellMouseOut: false, + cellMouseMove: false, + cellEditing: function cellEditing() {}, + cellEdited: function cellEdited() {}, + cellEditCancelled: function cellEditCancelled() {}, + + //column callbacks + columnMoved: false, + columnResized: function columnResized() {}, + columnTitleChanged: function columnTitleChanged() {}, + columnVisibilityChanged: function columnVisibilityChanged() {}, + + //HTML iport callbacks + htmlImporting: function htmlImporting() {}, + htmlImported: function htmlImported() {}, + + //data callbacks + dataLoading: function dataLoading() {}, + dataLoaded: function dataLoaded() {}, + dataEdited: false, //DEPRECATED + dataChanged: false, + + //ajax callbacks + ajaxRequesting: function ajaxRequesting() {}, + ajaxResponse: false, + ajaxError: function ajaxError() {}, + + //filtering callbacks + dataFiltering: false, + dataFiltered: false, + + //sorting callbacks + dataSorting: function dataSorting() {}, + dataSorted: function dataSorted() {}, + + //grouping callbacks + groupToggleElement: "arrow", + groupClosedShowCalcs: false, + dataGrouping: function dataGrouping() {}, + dataGrouped: false, + groupVisibilityChanged: function groupVisibilityChanged() {}, + groupClick: false, + groupDblClick: false, + groupContext: false, + groupContextMenu: false, + groupClickMenu: false, + groupTap: false, + groupDblTap: false, + groupTapHold: false, + + columnCalcs: true, + + //pagination callbacks + pageLoaded: function pageLoaded() {}, + + //localization callbacks + localized: function localized() {}, + + //validation callbacks + validationMode: "blocking", + validationFailed: function validationFailed() {}, + + //history callbacks + historyUndo: function historyUndo() {}, + historyRedo: function historyRedo() {}, + + //scroll callbacks + scrollHorizontal: function scrollHorizontal() {}, + scrollVertical: function scrollVertical() {} +}; + +Tabulator.prototype.initializeOptions = function (options) { + + //warn user if option is not available + if (options.invalidOptionWarnings !== false) { + for (var key in options) { + if (typeof this.defaultOptions[key] === "undefined") { + console.warn("Invalid table constructor option:", key); + } + } + } + + //assign options to table + for (var key in this.defaultOptions) { + if (key in options) { + this.options[key] = options[key]; + } else { + if (Array.isArray(this.defaultOptions[key])) { + this.options[key] = Object.assign([], this.defaultOptions[key]); + } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { + this.options[key] = Object.assign({}, this.defaultOptions[key]); + } else { + this.options[key] = this.defaultOptions[key]; + } + } + } +}; + +Tabulator.prototype.initializeElement = function (element) { + + if (typeof HTMLElement !== "undefined" && element instanceof HTMLElement) { + this.element = element; + return true; + } else if (typeof element === "string") { + this.element = document.querySelector(element); + + if (this.element) { + return true; + } else { + console.error("Tabulator Creation Error - no element found matching selector: ", element); + return false; + } + } else { + console.error("Tabulator Creation Error - Invalid element provided:", element); + return false; + } +}; + +Tabulator.prototype.rtlCheck = function () { + var style = window.getComputedStyle(this.element); + + switch (this.options.textDirection) { + case "auto": + if (style.direction !== "rtl") { + break; + }; + + case "rtl": + this.element.classList.add("tabulator-rtl"); + this.rtl = true; + break; + + case "ltr": + this.element.classList.add("tabulator-ltr"); + + default: + this.rtl = false; + } +}; + +//convert depricated functionality to new functions +Tabulator.prototype._mapDepricatedFunctionality = function () { + + //map depricated persistance setup options + if (this.options.persistentLayout || this.options.persistentSort || this.options.persistentFilter) { + if (!this.options.persistence) { + this.options.persistence = {}; + } + } + + if (this.options.dataEdited) { + console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); + this.options.dataChanged = this.options.dataEdited; + } + + if (this.options.downloadDataFormatter) { + console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); + } + + if (typeof this.options.clipboardCopyHeader !== "undefined") { + this.options.columnHeaders = this.options.clipboardCopyHeader; + console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); + } + + if (this.options.printVisibleRows !== true) { + console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"); + + this.options.persistence.printRowRange = "active"; + } + + if (this.options.printCopyStyle !== true) { + console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"); + + this.options.persistence.printStyled = this.options.printCopyStyle; + } + + if (this.options.persistentLayout) { + console.warn("persistentLayout option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.columns === "undefined") { + this.options.persistence.columns = true; + } + } + + if (this.options.persistentSort) { + console.warn("persistentSort option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.sort === "undefined") { + this.options.persistence.sort = true; + } + } + + if (this.options.persistentFilter) { + console.warn("persistentFilter option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.filter === "undefined") { + this.options.persistence.filter = true; + } + } + + if (this.options.columnVertAlign) { + console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"); + + this.options.columnHeaderVertAlign = this.options.columnVertAlign; + } +}; + +Tabulator.prototype._clearSelection = function () { + + this.element.classList.add("tabulator-block-select"); + + if (window.getSelection) { + if (window.getSelection().empty) { + // Chrome + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { + // Firefox + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { + // IE? + document.selection.empty(); + } + + this.element.classList.remove("tabulator-block-select"); +}; + +//concreate table +Tabulator.prototype._create = function () { + this._clearObjectPointers(); + + this._mapDepricatedFunctionality(); + + this.bindModules(); + + this.rtlCheck(); + + if (this.element.tagName === "TABLE") { + if (this.modExists("htmlTableImport", true)) { + this.modules.htmlTableImport.parseTable(); + } + } + + this.columnManager = new ColumnManager(this); + this.rowManager = new RowManager(this); + this.footerManager = new FooterManager(this); + + this.columnManager.setRowManager(this.rowManager); + this.rowManager.setColumnManager(this.columnManager); + + if (this.options.virtualDomHoz) { + this.vdomHoz = new VDomHoz(this); + } + + this._buildElement(); + + this._loadInitialData(); +}; + +//clear pointers to objects in default config object +Tabulator.prototype._clearObjectPointers = function () { + this.options.columns = this.options.columns.slice(0); + + if (!this.options.reactiveData) { + this.options.data = this.options.data.slice(0); + } +}; + +//build tabulator element +Tabulator.prototype._buildElement = function () { + var _this24 = this; + + var element = this.element, + mod = this.modules, + options = this.options; + + options.tableBuilding.call(this); + + element.classList.add("tabulator"); + element.setAttribute("role", "grid"); + + //empty element + while (element.firstChild) { + element.removeChild(element.firstChild); + } //set table height + if (options.height) { + options.height = isNaN(options.height) ? options.height : options.height + "px"; + element.style.height = options.height; + } + + //set table min height + if (options.minHeight !== false) { + options.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + "px"; + element.style.minHeight = options.minHeight; + } + + //set table maxHeight + if (options.maxHeight !== false) { + options.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + "px"; + element.style.maxHeight = options.maxHeight; + } + + this.columnManager.initialize(); + this.rowManager.initialize(); + + this._detectBrowser(); + + if (this.modExists("layout", true)) { + mod.layout.initialize(options.layout); + } + + //set localization + + mod.localize.initialize(); + + if (options.headerFilterPlaceholder !== false) { + mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for (var locale in options.langs) { + mod.localize.installLang(locale, options.langs[locale]); + } + + mod.localize.setLocale(options.locale); + + //configure placeholder element + if (typeof options.placeholder == "string") { + + var el = document.createElement("div"); + el.classList.add("tabulator-placeholder"); + + var span = document.createElement("span"); + span.innerHTML = options.placeholder; + + el.appendChild(span); + + options.placeholder = el; + } + + //build table elements + element.appendChild(this.columnManager.getElement()); + element.appendChild(this.rowManager.getElement()); + + if (options.footerElement) { + this.footerManager.activate(); + } + + if (options.persistence && this.modExists("persistence", true)) { + mod.persistence.initialize(); + } + + if (options.movableRows && this.modExists("moveRow")) { + mod.moveRow.initialize(); + } + + if (options.autoColumns && this.options.data) { + this.columnManager.generateColumnsFromRowData(this.options.data); + } + + if (this.modExists("columnCalcs")) { + mod.columnCalcs.initialize(); + } + + this.columnManager.setColumns(options.columns); + + if (options.dataTree && this.modExists("dataTree", true)) { + mod.dataTree.initialize(); + } + + if (this.modExists("frozenRows")) { + this.modules.frozenRows.initialize(); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort || options.initialSort) && this.modExists("sort", true)) { + var sorters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort) { + sorters = mod.persistence.load("sort"); + + if (sorters === false && options.initialSort) { + sorters = options.initialSort; + } + } else if (options.initialSort) { + sorters = options.initialSort; + } + + mod.sort.setSort(sorters); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter || options.initialFilter) && this.modExists("filter", true)) { + var filters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter) { + filters = mod.persistence.load("filter"); + + if (filters === false && options.initialFilter) { + filters = options.initialFilter; + } + } else if (options.initialFilter) { + filters = options.initialFilter; + } + + mod.filter.setFilter(filters); + } + + if (options.initialHeaderFilter && this.modExists("filter", true)) { + options.initialHeaderFilter.forEach(function (item) { + + var column = _this24.columnManager.findColumn(item.field); + + if (column) { + mod.filter.setHeaderFilterValue(column, item.value); + } else { + console.warn("Column Filter Error - No matching column found:", item.field); + return false; + } + }); + } + + if (this.modExists("ajax")) { + mod.ajax.initialize(); + } + + if (options.pagination && this.modExists("page", true)) { + mod.page.initialize(); + } + + if (options.groupBy && this.modExists("groupRows", true)) { + mod.groupRows.initialize(); + } + + if (this.modExists("keybindings")) { + mod.keybindings.initialize(); + } + + if (this.modExists("selectRow")) { + mod.selectRow.clearSelectionData(true); + } + + if (options.autoResize && this.modExists("resizeTable")) { + mod.resizeTable.initialize(); + } + + if (this.modExists("clipboard")) { + mod.clipboard.initialize(); + } + + if (options.printAsHtml && this.modExists("print")) { + mod.print.initialize(); + } + + options.tableBuilt.call(this); +}; + +Tabulator.prototype._loadInitialData = function () { + var self = this; + + if (self.options.pagination && self.modExists("page")) { + self.modules.page.reset(true, true); + + if (self.options.pagination == "local") { + if (self.options.data.length) { + self.rowManager.setData(self.options.data, false, true); + } else { + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () { + if (self.options.paginationInitialPage) { + self.modules.page.setPage(self.options.paginationInitialPage); + } + }); + + return; + } else { + self.rowManager.setData(self.options.data, false, true); + } + } + + if (self.options.paginationInitialPage) { + self.modules.page.setPage(self.options.paginationInitialPage); + } + } else { + if (self.options.ajaxURL) { + self.modules.page.setPage(self.options.paginationInitialPage).then(function () {}).catch(function () {}); + } else { + self.rowManager.setData([], false, true); + } + } + } else { + if (self.options.data.length) { + self.rowManager.setData(self.options.data); + } else { + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () {}); + } else { + self.rowManager.setData(self.options.data, false, true); + } + } + } +}; + +//deconstructor +Tabulator.prototype.destroy = function () { + var element = this.element; + + Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication + + if (this.options.reactiveData && this.modExists("reactiveData", true)) { + this.modules.reactiveData.unwatchData(); + } + + //clear row data + this.rowManager.rows.forEach(function (row) { + row.wipe(); + }); + + this.rowManager.rows = []; + this.rowManager.activeRows = []; + this.rowManager.displayRows = []; + + //clear event bindings + if (this.options.autoResize && this.modExists("resizeTable")) { + this.modules.resizeTable.clearBindings(); + } + + if (this.modExists("keybindings")) { + this.modules.keybindings.clearBindings(); + } + + //clear DOM + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.classList.remove("tabulator"); +}; + +Tabulator.prototype._detectBrowser = function () { + var ua = navigator.userAgent || navigator.vendor || window.opera; + + if (ua.indexOf("Trident") > -1) { + this.browser = "ie"; + this.browserSlow = true; + } else if (ua.indexOf("Edge") > -1) { + this.browser = "edge"; + this.browserSlow = true; + } else if (ua.indexOf("Firefox") > -1) { + this.browser = "firefox"; + this.browserSlow = false; + } else { + this.browser = "other"; + this.browserSlow = false; + } + + this.browserMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0, 4)); +}; + +////////////////// Data Handling ////////////////// + +//block table redrawing +Tabulator.prototype.blockRedraw = function () { + return this.rowManager.blockRedraw(); +}; + +//restore table redrawing +Tabulator.prototype.restoreRedraw = function () { + return this.rowManager.restoreRedraw(); +}; + +//local data from local file +Tabulator.prototype.setDataFromLocalFile = function (extensions) { + var _this25 = this; + + return new Promise(function (resolve, reject) { + var input = document.createElement("input"); + input.type = "file"; + input.accept = extensions || ".json,application/json"; + + input.addEventListener("change", function (e) { + var file = input.files[0], + reader = new FileReader(), + data; + + reader.readAsText(file); + + reader.onload = function (e) { + + try { + data = JSON.parse(reader.result); + } catch (e) { + console.warn("File Load Error - File contents is invalid JSON", e); + reject(e); + return; + } + + _this25.setData(data).then(function (data) { + resolve(data); + }).catch(function (err) { + resolve(err); + }); + }; + + reader.onerror = function (e) { + console.warn("File Load Error - Unable to read file"); + reject(); + }; + }); + + input.click(); + }); +}; + +//load data +Tabulator.prototype.setData = function (data, params, config) { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, false, true); +}; + +Tabulator.prototype._setData = function (data, params, config, inPosition, columnsChanged) { + var self = this; + + if (typeof data === "string") { + if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { + //data is a json encoded string + return self.rowManager.setData(JSON.parse(data), inPosition, columnsChanged); + } else { + + if (self.modExists("ajax", true)) { + if (params) { + self.modules.ajax.setParams(params); + } + + if (config) { + self.modules.ajax.setConfig(config); + } + + self.modules.ajax.setUrl(data); + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + self.modules.page.reset(true, true); + return self.modules.page.setPage(1); + } else { + //assume data is url, make ajax call to url to get data + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } + } + } else { + if (data) { + //asume data is already an object + return self.rowManager.setData(data, inPosition, columnsChanged); + } else { + + //no data provided, check if ajaxURL is present; + if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + self.modules.page.reset(true, true); + return self.modules.page.setPage(1); + } else { + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } else { + //empty data + return self.rowManager.setData([], inPosition, columnsChanged); + } + } + } +}; + +//clear data +Tabulator.prototype.clearData = function () { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + this.rowManager.clearData(); +}; + +//get table data array +Tabulator.prototype.getData = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getData(active); +}; + +//get table data array count +Tabulator.prototype.getDataCount = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getDataCount(active); +}; + +//search for specific row components +Tabulator.prototype.searchRows = function (field, type, value) { + if (this.modExists("filter", true)) { + return this.modules.filter.search("rows", field, type, value); + } +}; + +//search for specific data +Tabulator.prototype.searchData = function (field, type, value) { + if (this.modExists("filter", true)) { + return this.modules.filter.search("data", field, type, value); + } +}; + +//get table html +Tabulator.prototype.getHtml = function (visible, style, config) { + if (this.modExists("export", true)) { + return this.modules.export.getHtml(visible, style, config); + } +}; + +//get print html +Tabulator.prototype.print = function (visible, style, config) { + if (this.modExists("print", true)) { + return this.modules.print.printFullscreen(visible, style, config); + } +}; + +//retrieve Ajax URL +Tabulator.prototype.getAjaxUrl = function () { + if (this.modExists("ajax", true)) { + return this.modules.ajax.getUrl(); + } +}; + +//replace data, keeping table in position with same sort +Tabulator.prototype.replaceData = function (data, params, config) { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, true); +}; + +//update table data +Tabulator.prototype.updateData = function (data) { + var _this26 = this; + + var self = this; + var responses = 0; + + return new Promise(function (resolve, reject) { + if (_this26.modExists("ajax")) { + _this26.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + data.forEach(function (item) { + var row = self.rowManager.findRow(item[self.options.index]); + + if (row) { + responses++; + + row.updateData(item).then(function () { + responses--; + + if (!responses) { + resolve(); + } + }); + } + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +Tabulator.prototype.addData = function (data, pos, index) { + var _this27 = this; + + return new Promise(function (resolve, reject) { + if (_this27.modExists("ajax")) { + _this27.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + _this27.rowManager.addRows(data, pos, index).then(function (rows) { + var output = []; + + rows.forEach(function (row) { + output.push(row.getComponent()); + }); + + resolve(output); + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +//update table data +Tabulator.prototype.updateOrAddData = function (data) { + var _this28 = this; + + var self = this, + rows = [], + responses = 0; + + return new Promise(function (resolve, reject) { + if (_this28.modExists("ajax")) { + _this28.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + data.forEach(function (item) { + var row = self.rowManager.findRow(item[self.options.index]); + + responses++; + + if (row) { + row.updateData(item).then(function () { + responses--; + rows.push(row.getComponent()); + + if (!responses) { + resolve(rows); + } + }); + } else { + self.rowManager.addRows(item).then(function (newRows) { + responses--; + rows.push(newRows[0].getComponent()); + + if (!responses) { + resolve(rows); + } + }); + } + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +//get row object +Tabulator.prototype.getRow = function (index) { + var row = this.rowManager.findRow(index); + + if (row) { + return row.getComponent(); + } else { + console.warn("Find Error - No matching row found:", index); + return false; + } +}; + +//get row object +Tabulator.prototype.getRowFromPosition = function (position, active) { + var row = this.rowManager.getRowFromPosition(position, active); + + if (row) { + return row.getComponent(); + } else { + console.warn("Find Error - No matching row found:", position); + return false; + } +}; + +//delete row from table +Tabulator.prototype.deleteRow = function (index) { + var _this29 = this; + + return new Promise(function (resolve, reject) { + var self = _this29, + count = 0, + successCount = 0, + foundRows = []; + + function doneCheck() { + count++; + + if (count == index.length) { + if (successCount) { + self.rowManager.reRenderInPosition(); + resolve(); + } + } + } + + if (!Array.isArray(index)) { + index = [index]; + } + + //find matching rows + index.forEach(function (item) { + var row = _this29.rowManager.findRow(item, true); + + if (row) { + foundRows.push(row); + } else { + console.warn("Delete Error - No matching row found:", item); + reject("Delete Error - No matching row found"); + doneCheck(); + } + }); + + //sort rows into correct order to ensure smooth delete from table + foundRows.sort(function (a, b) { + return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; + }); + + foundRows.forEach(function (row) { + row.delete().then(function () { + successCount++; + doneCheck(); + }).catch(function (err) { + doneCheck(); + reject(err); + }); + }); + }); +}; + +//add row to table +Tabulator.prototype.addRow = function (data, pos, index) { + var _this30 = this; + + return new Promise(function (resolve, reject) { + if (typeof data === "string") { + data = JSON.parse(data); + } + + _this30.rowManager.addRows(data, pos, index).then(function (rows) { + //recalc column calculations if present + if (_this30.modExists("columnCalcs")) { + _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }); + }); +}; + +//update a row if it exitsts otherwise create it +Tabulator.prototype.updateOrAddRow = function (index, data) { + var _this31 = this; + + return new Promise(function (resolve, reject) { + var row = _this31.rowManager.findRow(index); + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (row) { + row.updateData(data).then(function () { + //recalc column calculations if present + if (_this31.modExists("columnCalcs")) { + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(row.getComponent()); + }).catch(function (err) { + reject(err); + }); + } else { + row = _this31.rowManager.addRows(data).then(function (rows) { + //recalc column calculations if present + if (_this31.modExists("columnCalcs")) { + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }).catch(function (err) { + reject(err); + }); + } + }); +}; + +//update row data +Tabulator.prototype.updateRow = function (index, data) { + var _this32 = this; + + return new Promise(function (resolve, reject) { + var row = _this32.rowManager.findRow(index); + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (row) { + row.updateData(data).then(function () { + resolve(row.getComponent()); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Update Error - No matching row found:", index); + reject("Update Error - No matching row found"); + } + }); +}; + +//scroll to row in DOM +Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { + var _this33 = this; + + return new Promise(function (resolve, reject) { + var row = _this33.rowManager.findRow(index); + + if (row) { + _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Scroll Error - No matching row found:", index); + reject("Scroll Error - No matching row found"); + } + }); +}; + +Tabulator.prototype.moveRow = function (from, to, after) { + var fromRow = this.rowManager.findRow(from); + + if (fromRow) { + fromRow.moveToRow(to, after); + } else { + console.warn("Move Error - No matching row found:", from); + } +}; + +Tabulator.prototype.getRows = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getComponents(active); +}; + +//get position of row in table +Tabulator.prototype.getRowPosition = function (index, active) { + var row = this.rowManager.findRow(index); + + if (row) { + return this.rowManager.getRowPosition(row, active); + } else { + console.warn("Position Error - No matching row found:", index); + return false; + } +}; + +//copy table data to clipboard +Tabulator.prototype.copyToClipboard = function (selector) { + if (this.modExists("clipboard", true)) { + this.modules.clipboard.copy(selector); + } +}; + +/////////////// Column Functions /////////////// + +Tabulator.prototype.setColumns = function (definition) { + this.columnManager.setColumns(definition); +}; + +Tabulator.prototype.getColumns = function (structured) { + return this.columnManager.getComponents(structured); +}; + +Tabulator.prototype.getColumn = function (field) { + var col = this.columnManager.findColumn(field); + + if (col) { + return col.getComponent(); + } else { + console.warn("Find Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.getColumnDefinitions = function () { + return this.columnManager.getDefinitionTree(); +}; + +Tabulator.prototype.getColumnLayout = function () { + if (this.modExists("persistence", true)) { + return this.modules.persistence.parseColumns(this.columnManager.getColumns()); + } +}; + +Tabulator.prototype.setColumnLayout = function (layout) { + if (this.modExists("persistence", true)) { + this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); + return true; + } + return false; +}; + +Tabulator.prototype.showColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + column.show(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + this.modules.responsiveLayout.update(); + } + } else { + console.warn("Column Show Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.hideColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + column.hide(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + this.modules.responsiveLayout.update(); + } + } else { + console.warn("Column Hide Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.toggleColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + if (column.visible) { + column.hide(); + } else { + column.show(); + } + } else { + console.warn("Column Visibility Toggle Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.addColumn = function (definition, before, field) { + var _this34 = this; + + return new Promise(function (resolve, reject) { + var column = _this34.columnManager.findColumn(field); + + _this34.columnManager.addColumn(definition, before, column).then(function (column) { + resolve(column.getComponent()); + }).catch(function (err) { + reject(err); + }); + }); +}; + +Tabulator.prototype.deleteColumn = function (field) { + var _this35 = this; + + return new Promise(function (resolve, reject) { + var column = _this35.columnManager.findColumn(field); + + if (column) { + column.delete().then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Delete Error - No matching column found:", field); + reject(); + } + }); +}; + +Tabulator.prototype.updateColumnDefinition = function (field, definition) { + var _this36 = this; + + return new Promise(function (resolve, reject) { + var column = _this36.columnManager.findColumn(field); + + if (column) { + column.updateDefinition(definition).then(function (col) { + resolve(col); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Update Error - No matching column found:", field); + reject(); + } + }); +}; + +Tabulator.prototype.moveColumn = function (from, to, after) { + var fromColumn = this.columnManager.findColumn(from); + var toColumn = this.columnManager.findColumn(to); + + if (fromColumn) { + if (toColumn) { + this.columnManager.moveColumn(fromColumn, toColumn, after); + } else { + console.warn("Move Error - No matching column found:", toColumn); + } + } else { + console.warn("Move Error - No matching column found:", from); + } +}; + +//scroll to column in DOM +Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { + var _this37 = this; + + return new Promise(function (resolve, reject) { + var column = _this37.columnManager.findColumn(field); + + if (column) { + _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Scroll Error - No matching column found:", field); + reject("Scroll Error - No matching column found"); + } + }); +}; + +//////////// Localization Functions //////////// +Tabulator.prototype.setLocale = function (locale) { + this.modules.localize.setLocale(locale); +}; + +Tabulator.prototype.getLocale = function () { + return this.modules.localize.getLocale(); +}; + +Tabulator.prototype.getLang = function (locale) { + return this.modules.localize.getLang(locale); +}; + +//////////// General Public Functions //////////// + +//redraw list without updating data +Tabulator.prototype.redraw = function (force) { + this.columnManager.redraw(force); + this.rowManager.redraw(force); +}; + +Tabulator.prototype.setHeight = function (height) { + + if (this.rowManager.renderMode !== "classic") { + this.options.height = isNaN(height) ? height : height + "px"; + this.element.style.height = this.options.height; + this.rowManager.setRenderMode(); + this.rowManager.redraw(); + } else { + console.warn("setHeight function is not available in classic render mode"); + } +}; + +///////////////////// Sorting //////////////////// + +//trigger sort +Tabulator.prototype.setSort = function (sortList, dir) { + if (this.modExists("sort", true)) { + this.modules.sort.setSort(sortList, dir); + this.rowManager.sorterRefresh(); + } +}; + +Tabulator.prototype.getSorters = function () { + if (this.modExists("sort", true)) { + return this.modules.sort.getSort(); + } +}; + +Tabulator.prototype.clearSort = function () { + if (this.modExists("sort", true)) { + this.modules.sort.clear(); + this.rowManager.sorterRefresh(); + } +}; + +///////////////////// Filtering //////////////////// + +//set standard filters +Tabulator.prototype.setFilter = function (field, type, value, params) { + if (this.modExists("filter", true)) { + this.modules.filter.setFilter(field, type, value, params); + this.rowManager.filterRefresh(); + } +}; + +//set standard filters +Tabulator.prototype.refreshFilter = function () { + if (this.modExists("filter", true)) { + this.rowManager.filterRefresh(); + } +}; + +//add filter to array +Tabulator.prototype.addFilter = function (field, type, value, params) { + if (this.modExists("filter", true)) { + this.modules.filter.addFilter(field, type, value, params); + this.rowManager.filterRefresh(); + } +}; + +//get all filters +Tabulator.prototype.getFilters = function (all) { + if (this.modExists("filter", true)) { + return this.modules.filter.getFilters(all); + } +}; + +Tabulator.prototype.setHeaderFilterFocus = function (field) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + this.modules.filter.setHeaderFilterFocus(column); + } else { + console.warn("Column Filter Focus Error - No matching column found:", field); + return false; + } + } +}; + +Tabulator.prototype.getHeaderFilterValue = function (field) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + return this.modules.filter.getHeaderFilterValue(column); + } else { + console.warn("Column Filter Error - No matching column found:", field); + } + } +}; + +Tabulator.prototype.setHeaderFilterValue = function (field, value) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + this.modules.filter.setHeaderFilterValue(column, value); + } else { + console.warn("Column Filter Error - No matching column found:", field); + return false; + } + } +}; + +Tabulator.prototype.getHeaderFilters = function () { + if (this.modExists("filter", true)) { + return this.modules.filter.getHeaderFilters(); + } +}; + +//remove filter from array +Tabulator.prototype.removeFilter = function (field, type, value) { + if (this.modExists("filter", true)) { + this.modules.filter.removeFilter(field, type, value); + this.rowManager.filterRefresh(); + } +}; + +//clear filters +Tabulator.prototype.clearFilter = function (all) { + if (this.modExists("filter", true)) { + this.modules.filter.clearFilter(all); + this.rowManager.filterRefresh(); + } +}; + +//clear header filters +Tabulator.prototype.clearHeaderFilter = function () { + if (this.modExists("filter", true)) { + this.modules.filter.clearHeaderFilter(); + this.rowManager.filterRefresh(); + } +}; + +///////////////////// select //////////////////// +Tabulator.prototype.selectRow = function (rows) { + if (this.modExists("selectRow", true)) { + if (rows === true) { + console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"); + rows = "active"; + } + this.modules.selectRow.selectRows(rows); + } +}; + +Tabulator.prototype.deselectRow = function (rows) { + if (this.modExists("selectRow", true)) { + this.modules.selectRow.deselectRows(rows); + } +}; + +Tabulator.prototype.toggleSelectRow = function (row) { + if (this.modExists("selectRow", true)) { + this.modules.selectRow.toggleRow(row); + } +}; + +Tabulator.prototype.getSelectedRows = function () { + if (this.modExists("selectRow", true)) { + return this.modules.selectRow.getSelectedRows(); + } +}; + +Tabulator.prototype.getSelectedData = function () { + if (this.modExists("selectRow", true)) { + return this.modules.selectRow.getSelectedData(); + } +}; + +///////////////////// validation //////////////////// +Tabulator.prototype.getInvalidCells = function () { + if (this.modExists("validate", true)) { + return this.modules.validate.getInvalidCells(); + } +}; + +Tabulator.prototype.clearCellValidation = function (cells) { + var _this38 = this; + + if (this.modExists("validate", true)) { + + if (!cells) { + cells = this.modules.validate.getInvalidCells(); + } + + if (!Array.isArray(cells)) { + cells = [cells]; + } + + cells.forEach(function (cell) { + _this38.modules.validate.clearValidation(cell._getSelf()); + }); + } +}; + +Tabulator.prototype.validate = function (cells) { + var output = []; + + //clear row data + this.rowManager.rows.forEach(function (row) { + var valid = row.validate(); + + if (valid !== true) { + output = output.concat(valid); + } + }); + + return output.length ? output : true; +}; + +//////////// Pagination Functions //////////// + +Tabulator.prototype.setMaxPage = function (max) { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.setMaxPage(max); + } else { + return false; + } +}; + +Tabulator.prototype.setPage = function (page) { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.setPage(page); + } else { + return new Promise(function (resolve, reject) { + reject(); + }); + } +}; + +Tabulator.prototype.setPageToRow = function (row) { + var _this39 = this; + + return new Promise(function (resolve, reject) { + if (_this39.options.pagination && _this39.modExists("page")) { + row = _this39.rowManager.findRow(row); + + if (row) { + _this39.modules.page.setPageToRow(row).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + reject(); + } + } else { + reject(); + } + }); +}; + +Tabulator.prototype.setPageSize = function (size) { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.setPageSize(size); + this.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else { + return false; + } +}; + +Tabulator.prototype.getPageSize = function () { + if (this.options.pagination && this.modExists("page", true)) { + return this.modules.page.getPageSize(); + } +}; + +Tabulator.prototype.previousPage = function () { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.previousPage(); + } else { + return false; + } +}; + +Tabulator.prototype.nextPage = function () { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.nextPage(); + } else { + return false; + } +}; + +Tabulator.prototype.getPage = function () { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.getPage(); + } else { + return false; + } +}; + +Tabulator.prototype.getPageMax = function () { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.getPageMax(); + } else { + return false; + } +}; + +///////////////// Grouping Functions /////////////// + +Tabulator.prototype.setGroupBy = function (groups) { + if (this.modExists("groupRows", true)) { + this.options.groupBy = groups; + this.modules.groupRows.initialize(); + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupValues = function (groupValues) { + if (this.modExists("groupRows", true)) { + this.options.groupValues = groupValues; + this.modules.groupRows.initialize(); + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupStartOpen = function (values) { + if (this.modExists("groupRows", true)) { + this.options.groupStartOpen = values; + this.modules.groupRows.initialize(); + if (this.options.groupBy) { + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupHeader = function (values) { + if (this.modExists("groupRows", true)) { + this.options.groupHeader = values; + this.modules.groupRows.initialize(); + if (this.options.groupBy) { + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + return false; + } +}; + +Tabulator.prototype.getGroups = function (values) { + if (this.modExists("groupRows", true)) { + return this.modules.groupRows.getGroups(true); + } else { + return false; + } +}; + +// get grouped table data in the same format as getData() +Tabulator.prototype.getGroupedData = function () { + if (this.modExists("groupRows", true)) { + return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); + } +}; + +Tabulator.prototype.getEditedCells = function () { + if (this.modExists("edit", true)) { + return this.modules.edit.getEditedCells(); + } +}; + +Tabulator.prototype.clearCellEdited = function (cells) { + var _this40 = this; + + if (this.modExists("edit", true)) { + + if (!cells) { + cells = this.modules.edit.getEditedCells(); + } + + if (!Array.isArray(cells)) { + cells = [cells]; + } + + cells.forEach(function (cell) { + _this40.modules.edit.clearEdited(cell._getSelf()); + }); + } +}; + +///////////////// Column Calculation Functions /////////////// +Tabulator.prototype.getCalcResults = function () { + if (this.modExists("columnCalcs", true)) { + return this.modules.columnCalcs.getResults(); + } else { + return false; + } +}; + +Tabulator.prototype.recalc = function () { + if (this.modExists("columnCalcs", true)) { + this.modules.columnCalcs.recalcAll(this.rowManager.activeRows); + } +}; + +/////////////// Navigation Management ////////////// + +Tabulator.prototype.navigatePrev = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + return cell.nav().prev(); + } + } + + return false; +}; + +Tabulator.prototype.navigateNext = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + return cell.nav().next(); + } + } + + return false; +}; + +Tabulator.prototype.navigateLeft = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().left(); + } + } + + return false; +}; + +Tabulator.prototype.navigateRight = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().right(); + } + } + + return false; +}; + +Tabulator.prototype.navigateUp = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().up(); + } + } + + return false; +}; + +Tabulator.prototype.navigateDown = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().down(); + } + } + + return false; +}; + +/////////////// History Management ////////////// +Tabulator.prototype.undo = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.undo(); + } else { + return false; + } +}; + +Tabulator.prototype.redo = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.redo(); + } else { + return false; + } +}; + +Tabulator.prototype.getHistoryUndoSize = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.getHistoryUndoSize(); + } else { + return false; + } +}; + +Tabulator.prototype.getHistoryRedoSize = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.getHistoryRedoSize(); + } else { + return false; + } +}; + +Tabulator.prototype.clearHistory = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.clear(); + } else { + return false; + } +}; + +/////////////// Download Management ////////////// + +Tabulator.prototype.download = function (type, filename, options, active) { + if (this.modExists("download", true)) { + this.modules.download.download(type, filename, options, active); + } +}; + +Tabulator.prototype.downloadToTab = function (type, filename, options, active) { + if (this.modExists("download", true)) { + this.modules.download.download(type, filename, options, active, true); + } +}; + +/////////// Inter Table Communications /////////// + +Tabulator.prototype.tableComms = function (table, module, action, data) { + this.modules.comms.receive(table, module, action, data); +}; + +////////////// Extension Management ////////////// + +//object to hold module +Tabulator.prototype.moduleBindings = {}; + +//extend module +Tabulator.prototype.extendModule = function (name, property, values) { + + if (Tabulator.prototype.moduleBindings[name]) { + var source = Tabulator.prototype.moduleBindings[name].prototype[property]; + + if (source) { + if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { + for (var key in values) { + source[key] = values[key]; + } + } else { + console.warn("Module Error - Invalid value type, it must be an object"); + } + } else { + console.warn("Module Error - property does not exist:", property); + } + } else { + console.warn("Module Error - module does not exist:", name); + } +}; + +//add module to tabulator +Tabulator.prototype.registerModule = function (name, module) { + var self = this; + Tabulator.prototype.moduleBindings[name] = module; +}; + +//ensure that module are bound to instantiated function +Tabulator.prototype.bindModules = function () { + this.modules = {}; + + for (var name in Tabulator.prototype.moduleBindings) { + this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); + } +}; + +//Check for module +Tabulator.prototype.modExists = function (plugin, required) { + if (this.modules[plugin]) { + return true; + } else { + if (required) { + console.error("Tabulator Module Not Installed: " + plugin); + } + return false; + } +}; + +Tabulator.prototype.helpers = { + + elVisible: function elVisible(el) { + return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); + }, + + elOffset: function elOffset(el) { + var box = el.getBoundingClientRect(); + + return { + top: box.top + window.pageYOffset - document.documentElement.clientTop, + left: box.left + window.pageXOffset - document.documentElement.clientLeft + }; + }, + + deepClone: function deepClone(obj) { + var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); + + for (var i in obj) { + if (obj[i] != null && _typeof(obj[i]) === "object") { + if (obj[i] instanceof Date) { + clone[i] = new Date(obj[i]); + } else { + clone[i] = this.deepClone(obj[i]); + } + } + } + return clone; + } +}; + +Tabulator.prototype.comms = { + tables: [], + register: function register(table) { + Tabulator.prototype.comms.tables.push(table); + }, + deregister: function deregister(table) { + var index = Tabulator.prototype.comms.tables.indexOf(table); + + if (index > -1) { + Tabulator.prototype.comms.tables.splice(index, 1); + } + }, + lookupTable: function lookupTable(query, silent) { + var results = [], + matches, + match; + + if (typeof query === "string") { + matches = document.querySelectorAll(query); + + if (matches.length) { + for (var i = 0; i < matches.length; i++) { + match = Tabulator.prototype.comms.matchElement(matches[i]); + + if (match) { + results.push(match); + } + } + } + } else if (typeof HTMLElement !== "undefined" && query instanceof HTMLElement || query instanceof Tabulator) { + match = Tabulator.prototype.comms.matchElement(query); + + if (match) { + results.push(match); + } + } else if (Array.isArray(query)) { + query.forEach(function (item) { + results = results.concat(Tabulator.prototype.comms.lookupTable(item)); + }); + } else { + if (!silent) { + console.warn("Table Connection Error - Invalid Selector", query); + } + } + + return results; + }, + matchElement: function matchElement(element) { + return Tabulator.prototype.comms.tables.find(function (table) { + return element instanceof Tabulator ? table === element : table.element === element; + }); + } +}; + +Tabulator.prototype.findTable = function (query) { + var results = Tabulator.prototype.comms.lookupTable(query, true); + return Array.isArray(results) && !results.length ? false : results; +}; + +var Layout = function Layout(table) { + + this.table = table; + + this.mode = null; +}; + +//initialize layout system + +Layout.prototype.initialize = function (layout) { + + if (this.modes[layout]) { + + this.mode = layout; + } else { + + console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); + + this.mode = 'fitData'; + } + + this.table.element.setAttribute("tabulator-layout", this.mode); +}; + +Layout.prototype.getMode = function () { + + return this.mode; +}; + +//trigger table layout + +Layout.prototype.layout = function () { + + this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); + + if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } +}; + +//layout render functions + +Layout.prototype.modes = { + + //resize columns to fit data they contain + + "fitData": function fitData(columns) { + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.fitDataLayoutOverride(); + } else { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain and stretch row to fill table + + "fitDataFill": function fitDataFill(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain + + "fitDataTable": function fitDataTable(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data the contain and stretch last column to fill table + + "fitDataStretch": function fitDataStretch(columns) { + var _this41 = this; + + var colsWidth = 0, + tableWidth = this.table.rowManager.element.clientWidth, + gap = 0, + lastCol = false; + + columns.forEach(function (column, i) { + + if (!column.widthFixed) { + + column.reinitializeWidth(); + } + + if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { + + lastCol = column; + } + + if (column.visible) { + + colsWidth += column.getWidth(); + } + }); + + if (lastCol) { + + gap = tableWidth - colsWidth + lastCol.getWidth(); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + lastCol.setWidth(0); + + this.table.modules.responsiveLayout.update(); + } + + if (gap > 0) { + + lastCol.setWidth(gap); + } else { + + lastCol.reinitializeWidth(); + } + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + }, + + //resize columns to fit + + "fitColumns": function fitColumns(columns) { + + var self = this; + + var totalWidth = self.table.element.clientWidth; //table element width + + var fixedWidth = 0; //total width of columns with a defined width + + var flexWidth = 0; //total width available to flexible columns + + var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns + + var flexColWidth = 0; //desired width of flexible columns + + var flexColumns = []; //array of flexible width columns + + var fixedShrinkColumns = []; //array of fixed width columns that can shrink + + var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns + + var overflowWidth = 0; //horizontal overflow width + + var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps + + + function calcWidth(width) { + + var colWidth; + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + return colWidth; + } + + //ensure columns resize to take up the correct amount of space + + function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { + + var oversizeCols = [], + oversizeSpace = 0, + remainingSpace = 0, + nextColWidth = 0, + remainingFlexGrowUnits = flexGrowUnits, + gap = 0, + changeUnits = 0, + undersizeCols = []; + + function calcGrow(col) { + + return colWidth * (col.column.definition.widthGrow || 1); + } + + function calcShrink(col) { + + return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); + } + + columns.forEach(function (col, i) { + + var width = shrinkCols ? calcShrink(col) : calcGrow(col); + + if (col.column.minWidth >= width) { + + oversizeCols.push(col); + } else { + + if (col.column.maxWidth && col.column.maxWidth < width) { + + col.width = col.column.maxWidth; + + freeSpace -= col.column.maxWidth; + + remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + + if (remainingFlexGrowUnits) { + + colWidth = Math.floor(freeSpace / remainingFlexGrowUnits); + } + } else { + + undersizeCols.push(col); + + changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + } + } + }); + + if (oversizeCols.length) { + + oversizeCols.forEach(function (col) { + + oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; + + col.width = col.column.minWidth; + }); + + remainingSpace = freeSpace - oversizeSpace; + + nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; + + gap = remainingSpace - nextColWidth * changeUnits; + + gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); + } else { + + gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; + + undersizeCols.forEach(function (column) { + + column.width = shrinkCols ? calcShrink(column) : calcGrow(column); + }); + } + + return gap; + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + + //adjust for vertical scrollbar if present + + if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { + + totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; + } + + columns.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width; + + minWidth = parseInt(column.minWidth); + + if (width) { + + colWidth = calcWidth(width); + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + + if (column.definition.widthShrink) { + + fixedShrinkColumns.push({ + + column: column, + + width: colWidth > minWidth ? colWidth : minWidth + + }); + + flexShrinkUnits += column.definition.widthShrink; + } + } else { + + flexColumns.push({ + + column: column, + + width: 0 + + }); + + flexGrowUnits += column.definition.widthGrow || 1; + } + } + }); + + //calculate available space + + flexWidth = totalWidth - fixedWidth; + + //calculate correct column size + + flexColWidth = Math.floor(flexWidth / flexGrowUnits); + + //generate column widths + + var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); + + //increase width of last column to account for rounding errors + + if (flexColumns.length && gapFill > 0) { + + flexColumns[flexColumns.length - 1].width += +gapFill; + } + + //caculate space for columns to be shrunk into + + flexColumns.forEach(function (col) { + + flexWidth -= col.width; + }); + + overflowWidth = Math.abs(gapFill) + flexWidth; + + //shrink oversize columns if there is no available space + + if (overflowWidth > 0 && flexShrinkUnits) { + + gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); + } + + //decrease width of last column to account for rounding errors + + if (fixedShrinkColumns.length) { + + fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; + } + + flexColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + + fixedShrinkColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + } + +}; + +Tabulator.prototype.registerModule("layout", Layout); +var Localize = function Localize(table) { + this.table = table; //hold Tabulator object + this.locale = "default"; //current locale + this.lang = false; //current language + this.bindings = {}; //update events to call when locale is changed + this.langList = {}; +}; + +Localize.prototype.initialize = function () { + this.langList = Tabulator.prototype.helpers.deepClone(this.langs); +}; + +//set header placehoder +Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { + this.langList.default.headerFilters.default = placeholder; +}; + +//set header filter placeholder by column +Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { + this.langList.default.headerFilters.columns[column] = placeholder; + + if (this.lang && !this.lang.headerFilters.columns[column]) { + this.lang.headerFilters.columns[column] = placeholder; + } +}; + +//setup a lang description object +Localize.prototype.installLang = function (locale, lang) { + if (this.langList[locale]) { + this._setLangProp(this.langList[locale], lang); + } else { + this.langList[locale] = lang; + } +}; + +Localize.prototype._setLangProp = function (lang, values) { + for (var key in values) { + if (lang[key] && _typeof(lang[key]) == "object") { + this._setLangProp(lang[key], values[key]); + } else { + lang[key] = values[key]; + } + } +}; + +//set current locale +Localize.prototype.setLocale = function (desiredLocale) { + var self = this; + + desiredLocale = desiredLocale || "default"; + + //fill in any matching languge values + function traverseLang(trans, path) { + for (var prop in trans) { + if (_typeof(trans[prop]) == "object") { + if (!path[prop]) { + path[prop] = {}; + } + traverseLang(trans[prop], path[prop]); + } else { + path[prop] = trans[prop]; + } + } + } + + //determing correct locale to load + if (desiredLocale === true && navigator.language) { + //get local from system + desiredLocale = navigator.language.toLowerCase(); + } + + if (desiredLocale) { + + //if locale is not set, check for matching top level locale else use default + if (!self.langList[desiredLocale]) { + var prefix = desiredLocale.split("-")[0]; + + if (self.langList[prefix]) { + console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); + desiredLocale = prefix; + } else { + console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); + desiredLocale = "default"; + } + } + } + + self.locale = desiredLocale; + + //load default lang template + self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); + + if (desiredLocale != "default") { + traverseLang(self.langList[desiredLocale], self.lang); + } + + self.table.options.localized.call(self.table, self.locale, self.lang); + + self._executeBindings(); +}; + +//get current locale +Localize.prototype.getLocale = function (locale) { + return self.locale; +}; + +//get lang object for given local or current if none provided +Localize.prototype.getLang = function (locale) { + return locale ? this.langList[locale] : this.lang; +}; + +//get text for current locale +Localize.prototype.getText = function (path, value) { + var path = value ? path + "|" + value : path, + pathArray = path.split("|"), + text = this._getLangElement(pathArray, this.locale); + + // if(text === false){ + // console.warn("Localization Error - Matching localized text not found for given path: ", path); + // } + + return text || ""; +}; + +//traverse langs object and find localized copy +Localize.prototype._getLangElement = function (path, locale) { + var self = this; + var root = self.lang; + + path.forEach(function (level) { + var rootPath; + + if (root) { + rootPath = root[level]; + + if (typeof rootPath != "undefined") { + root = rootPath; + } else { + root = false; + } + } + }); + + return root; +}; + +//set update binding +Localize.prototype.bind = function (path, callback) { + if (!this.bindings[path]) { + this.bindings[path] = []; + } + + this.bindings[path].push(callback); + + callback(this.getText(path), this.lang); +}; + +//itterate through bindings and trigger updates +Localize.prototype._executeBindings = function () { + var self = this; + + var _loop = function _loop(path) { + self.bindings[path].forEach(function (binding) { + binding(self.getText(path), self.lang); + }); + }; + + for (var path in self.bindings) { + _loop(path); + } +}; + +//Localized text listings +Localize.prototype.langs = { + "default": { //hold default locale text + "groups": { + "item": "item", + "items": "items" + }, + "columns": {}, + "ajax": { + "loading": "Loading", + "error": "Error" + }, + "pagination": { + "page_size": "Page Size", + "page_title": "Show Page", + "first": "First", + "first_title": "First Page", + "last": "Last", + "last_title": "Last Page", + "prev": "Prev", + "prev_title": "Prev Page", + "next": "Next", + "next_title": "Next Page", + "all": "All" + }, + "headerFilters": { + "default": "filter column...", + "columns": {} + } + } +}; + +Tabulator.prototype.registerModule("localize", Localize); +var Comms = function Comms(table) { + this.table = table; +}; + +Comms.prototype.getConnections = function (selectors) { + var self = this, + connections = [], + connection; + + connection = Tabulator.prototype.comms.lookupTable(selectors); + + connection.forEach(function (con) { + if (self.table !== con) { + connections.push(con); + } + }); + + return connections; +}; + +Comms.prototype.send = function (selectors, module, action, data) { + var self = this, + connections = this.getConnections(selectors); + + connections.forEach(function (connection) { + connection.tableComms(self.table.element, module, action, data); + }); + + if (!connections.length && selectors) { + console.warn("Table Connection Error - No tables matching selector found", selectors); + } +}; + +Comms.prototype.receive = function (table, module, action, data) { + if (this.table.modExists(module)) { + return this.table.modules[module].commsReceived(table, action, data); + } else { + console.warn("Inter-table Comms Error - no such module:", module); + } +}; + +Tabulator.prototype.registerModule("comms", Comms); + +var Accessor = function Accessor(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "download", "clipboard", "print", "htmlOutput"]; //list of accessor types +}; + +//initialize column accessor +Accessor.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + accessor; + + if (column.definition[key]) { + accessor = self.lookupAccessor(column.definition[key]); + + if (accessor) { + match = true; + + config[key] = { + accessor: accessor, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.accessor = config; + } +}; + +Accessor.prototype.lookupAccessor = function (value) { + var accessor = false; + + //set column accessor + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + if (this.accessors[value]) { + accessor = this.accessors[value]; + } else { + console.warn("Accessor Error - No such accessor found, ignoring: ", value); + } + break; + + case "function": + accessor = value; + break; + } + + return accessor; +}; + +//apply accessor to row +Accessor.prototype.transformRow = function (row, type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + rowComponent = row.getComponent(); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(row.data || {}); + + this.table.columnManager.traverse(function (column) { + var value, accessor, params, colCompnent; + + if (column.modules.accessor) { + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if (accessor) { + value = column.getFieldValue(data); + + if (value != "undefined") { + colCompnent = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); + } + } + } + }); + + return data; +}, + +//default accessors +Accessor.prototype.accessors = {}; + +Tabulator.prototype.registerModule("accessor", Accessor); +var Ajax = function Ajax(table) { + + this.table = table; //hold Tabulator object + this.config = false; //hold config object for ajax request + this.url = ""; //request URL + this.urlGenerator = false; + this.params = false; //request parameters + + this.loaderElement = this.createLoaderElement(); //loader message div + this.msgElement = this.createMsgElement(); //message element + this.loadingElement = false; + this.errorElement = false; + this.loaderPromise = false; + + this.progressiveLoad = false; + this.loading = false; + + this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request +}; + +//initialize setup options +Ajax.prototype.initialize = function () { + var template; + + this.loaderElement.appendChild(this.msgElement); + + if (this.table.options.ajaxLoaderLoading) { + if (typeof this.table.options.ajaxLoaderLoading == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderLoading.trim(); + this.loadingElement = template.content.firstChild; + } else { + this.loadingElement = this.table.options.ajaxLoaderLoading; + } + } + + this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; + + this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; + + if (this.table.options.ajaxLoaderError) { + if (typeof this.table.options.ajaxLoaderError == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderError.trim(); + this.errorElement = template.content.firstChild; + } else { + this.errorElement = this.table.options.ajaxLoaderError; + } + } + + if (this.table.options.ajaxParams) { + this.setParams(this.table.options.ajaxParams); + } + + if (this.table.options.ajaxConfig) { + this.setConfig(this.table.options.ajaxConfig); + } + + if (this.table.options.ajaxURL) { + this.setUrl(this.table.options.ajaxURL); + } + + if (this.table.options.ajaxProgressiveLoad) { + if (this.table.options.pagination) { + this.progressiveLoad = false; + console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); + } else { + if (this.table.modExists("page")) { + this.progressiveLoad = this.table.options.ajaxProgressiveLoad; + this.table.modules.page.initializeProgressive(this.progressiveLoad); + } else { + console.error("Pagination plugin is required for progressive ajax loading"); + } + } + } +}; + +Ajax.prototype.createLoaderElement = function () { + var el = document.createElement("div"); + el.classList.add("tabulator-loader"); + return el; +}; + +Ajax.prototype.createMsgElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-loader-msg"); + el.setAttribute("role", "alert"); + + return el; +}; + +//set ajax params +Ajax.prototype.setParams = function (params, update) { + if (update) { + this.params = this.params || {}; + + for (var key in params) { + this.params[key] = params[key]; + } + } else { + this.params = params; + } +}; + +Ajax.prototype.getParams = function () { + return this.params || {}; +}; + +//load config object +Ajax.prototype.setConfig = function (config) { + this._loadDefaultConfig(); + + if (typeof config == "string") { + this.config.method = config; + } else { + for (var key in config) { + this.config[key] = config[key]; + } + } +}; + +//create config object from default +Ajax.prototype._loadDefaultConfig = function (force) { + var self = this; + if (!self.config || force) { + + self.config = {}; + + //load base config from defaults + for (var key in self.defaultConfig) { + self.config[key] = self.defaultConfig[key]; + } + } +}; + +//set request url +Ajax.prototype.setUrl = function (url) { + this.url = url; +}; + +//get request url +Ajax.prototype.getUrl = function () { + return this.url; +}; + +//lstandard loading function +Ajax.prototype.loadData = function (inPosition, columnsChanged) { + var self = this; + + if (this.progressiveLoad) { + return this._loadDataProgressive(); + } else { + return this._loadDataStandard(inPosition, columnsChanged); + } +}; + +Ajax.prototype.nextPage = function (diff) { + var margin; + + if (!this.loading) { + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; + + if (diff < margin) { + this.table.modules.page.nextPage().then(function () {}).catch(function () {}); + } + } +}; + +Ajax.prototype.blockActiveRequest = function () { + this.requestOrder++; +}; + +Ajax.prototype._loadDataProgressive = function () { + this.table.rowManager.setData([]); + return this.table.modules.page.setPage(1); +}; + +Ajax.prototype._loadDataStandard = function (inPosition, columnsChanged) { + var _this42 = this; + + return new Promise(function (resolve, reject) { + _this42.sendRequest(inPosition).then(function (data) { + _this42.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { + resolve(); + }).catch(function (e) { + reject(e); + }); + }).catch(function (e) { + reject(e); + }); + }); +}; + +Ajax.prototype.generateParamsList = function (data, prefix) { + var self = this, + output = []; + + prefix = prefix || ""; + + if (Array.isArray(data)) { + data.forEach(function (item, i) { + output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); + }); + } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") { + for (var key in data) { + output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); + } + } else { + output.push({ key: prefix, value: data }); + } + + return output; +}; + +Ajax.prototype.serializeParams = function (params) { + var output = this.generateParamsList(params), + encoded = []; + + output.forEach(function (item) { + encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); + }); + + return encoded.join("&"); +}; + +//send ajax request +Ajax.prototype.sendRequest = function (silent) { + var _this43 = this; + + var self = this, + url = self.url, + requestNo, + esc, + query; + + self.requestOrder++; + requestNo = self.requestOrder; + + self._loadDefaultConfig(); + + return new Promise(function (resolve, reject) { + if (self.table.options.ajaxRequesting.call(_this43.table, self.url, self.params) !== false) { + + self.loading = true; + + if (!silent) { + self.showLoader(); + } + + _this43.loaderPromise(url, self.config, self.params).then(function (data) { + if (requestNo === self.requestOrder) { + if (self.table.options.ajaxResponse) { + data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); + } + resolve(data); + + self.hideLoader(); + self.loading = false; + } else { + console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); + } + }).catch(function (error) { + console.error("Ajax Load Error: ", error); + self.table.options.ajaxError.call(self.table, error); + + self.showError(); + + setTimeout(function () { + self.hideLoader(); + }, 3000); + + self.loading = false; + + reject(error); + }); + } else { + reject(); + } + }); +}; + +Ajax.prototype.showLoader = function () { + var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; + + if (shouldLoad) { + + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-error"); + this.msgElement.classList.add("tabulator-loading"); + + if (this.loadingElement) { + this.msgElement.appendChild(this.loadingElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); + } + + this.table.element.appendChild(this.loaderElement); + } +}; + +Ajax.prototype.showError = function () { + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-loading"); + this.msgElement.classList.add("tabulator-error"); + + if (this.errorElement) { + this.msgElement.appendChild(this.errorElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); + } + + this.table.element.appendChild(this.loaderElement); +}; + +Ajax.prototype.hideLoader = function () { + if (this.loaderElement.parentNode) { + this.loaderElement.parentNode.removeChild(this.loaderElement); + } +}; + +//default ajax config object +Ajax.prototype.defaultConfig = { + method: "GET" +}; + +Ajax.prototype.defaultURLGenerator = function (url, config, params) { + + if (url) { + if (params && Object.keys(params).length) { + if (!config.method || config.method.toLowerCase() == "get") { + config.method = "get"; + + url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params); + } + } + } + + return url; +}; + +Ajax.prototype.defaultLoaderPromise = function (url, config, params) { + var self = this, + contentType; + + return new Promise(function (resolve, reject) { + + //set url + url = self.urlGenerator.call(self.table, url, config, params); + + //set body content if not GET request + if (config.method.toUpperCase() != "GET") { + contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; + if (contentType) { + + for (var key in contentType.headers) { + if (!config.headers) { + config.headers = {}; + } + + if (typeof config.headers[key] === "undefined") { + config.headers[key] = contentType.headers[key]; + } + } + + config.body = contentType.body.call(self, url, config, params); + } else { + console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); + } + } + + if (url) { + + //configure headers + if (typeof config.headers === "undefined") { + config.headers = {}; + } + + if (typeof config.headers.Accept === "undefined") { + config.headers.Accept = "application/json"; + } + + if (typeof config.headers["X-Requested-With"] === "undefined") { + config.headers["X-Requested-With"] = "XMLHttpRequest"; + } + + if (typeof config.mode === "undefined") { + config.mode = "cors"; + } + + if (config.mode == "cors") { + + if (typeof config.headers["Access-Control-Allow-Origin"] === "undefined") { + config.headers["Access-Control-Allow-Origin"] = window.location.origin; + } + + if (typeof config.credentials === "undefined") { + config.credentials = 'same-origin'; + } + } else { + if (typeof config.credentials === "undefined") { + config.credentials = 'include'; + } + } + + //send request + fetch(url, config).then(function (response) { + if (response.ok) { + response.json().then(function (data) { + resolve(data); + }).catch(function (error) { + reject(error); + console.warn("Ajax Load Error - Invalid JSON returned", error); + }); + } else { + console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); + reject(response); + } + }).catch(function (error) { + console.error("Ajax Load Error - Connection Error: ", error); + reject(error); + }); + } else { + console.warn("Ajax Load Error - No URL Set"); + resolve([]); + } + }); +}; + +Ajax.prototype.contentTypeFormatters = { + "json": { + headers: { + 'Content-Type': 'application/json' + }, + body: function body(url, config, params) { + return JSON.stringify(params); + } + }, + "form": { + headers: {}, + body: function body(url, config, params) { + var output = this.generateParamsList(params), + form = new FormData(); + + output.forEach(function (item) { + form.append(item.key, item.value); + }); + + return form; + } + } +}; + +Tabulator.prototype.registerModule("ajax", Ajax); + +//public calc object +var CalcComponent = function CalcComponent(row) { + this._row = row; +}; + +CalcComponent.prototype.getData = function (transform) { + return this._row.getData(transform); +}; + +CalcComponent.prototype.getElement = function () { + return this._row.getElement(); +}; + +CalcComponent.prototype.getTable = function () { + return this._row.table; +}; + +CalcComponent.prototype.getCells = function () { + var cells = []; + + this._row.getCells().forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; +}; + +CalcComponent.prototype.getCell = function (column) { + var cell = this._row.getCell(column); + return cell ? cell.getComponent() : false; +}; + +CalcComponent.prototype._getSelf = function () { + return this._row; +}; + +var ColumnCalcs = function ColumnCalcs(table) { + this.table = table; //hold Tabulator object + this.topCalcs = []; + this.botCalcs = []; + this.genColumn = false; + this.topElement = this.createElement(); + this.botElement = this.createElement(); + this.topRow = false; + this.botRow = false; + this.topInitialized = false; + this.botInitialized = false; + + this.initialize(); +}; + +ColumnCalcs.prototype.createElement = function () { + var el = document.createElement("div"); + el.classList.add("tabulator-calcs-holder"); + return el; +}; + +ColumnCalcs.prototype.initialize = function () { + this.genColumn = new Column({ field: "value" }, this); +}; + +//dummy functions to handle being mock column manager +ColumnCalcs.prototype.registerColumnField = function () {}; + +//initialize column calcs +ColumnCalcs.prototype.initializeColumn = function (column) { + var def = column.definition; + + var config = { + topCalcParams: def.topCalcParams || {}, + botCalcParams: def.bottomCalcParams || {} + }; + + if (def.topCalc) { + + switch (_typeof(def.topCalc)) { + case "string": + if (this.calculations[def.topCalc]) { + config.topCalc = this.calculations[def.topCalc]; + } else { + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); + } + break; + + case "function": + config.topCalc = def.topCalc; + break; + + } + + if (config.topCalc) { + column.modules.columnCalcs = config; + this.topCalcs.push(column); + + if (this.table.options.columnCalcs != "group") { + this.initializeTopRow(); + } + } + } + + if (def.bottomCalc) { + switch (_typeof(def.bottomCalc)) { + case "string": + if (this.calculations[def.bottomCalc]) { + config.botCalc = this.calculations[def.bottomCalc]; + } else { + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); + } + break; + + case "function": + config.botCalc = def.bottomCalc; + break; + + } + + if (config.botCalc) { + column.modules.columnCalcs = config; + this.botCalcs.push(column); + + if (this.table.options.columnCalcs != "group") { + this.initializeBottomRow(); + } + } + } +}; + +ColumnCalcs.prototype.removeCalcs = function () { + var changed = false; + + if (this.topInitialized) { + this.topInitialized = false; + this.topElement.parentNode.removeChild(this.topElement); + changed = true; + } + + if (this.botInitialized) { + this.botInitialized = false; + this.table.footerManager.remove(this.botElement); + changed = true; + } + + if (changed) { + this.table.rowManager.adjustTableSize(); + } +}; + +ColumnCalcs.prototype.initializeTopRow = function () { + if (!this.topInitialized) { + this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); + this.topInitialized = true; + } +}; + +ColumnCalcs.prototype.initializeBottomRow = function () { + if (!this.botInitialized) { + this.table.footerManager.prepend(this.botElement); + this.botInitialized = true; + } +}; + +ColumnCalcs.prototype.scrollHorizontal = function (left) { + if (this.botInitialized && this.botRow) { + this.botRow.getElement().style.marginLeft = -left + "px"; + } +}; + +ColumnCalcs.prototype.recalc = function (rows) { + var data, row; + + if (this.topInitialized || this.botInitialized) { + data = this.rowsToData(rows); + + if (this.topInitialized) { + if (this.topRow) { + this.topRow.deleteCells(); + } + + row = this.generateRow("top", this.rowsToData(rows)); + this.topRow = row; + while (this.topElement.firstChild) { + this.topElement.removeChild(this.topElement.firstChild); + }this.topElement.appendChild(row.getElement()); + row.initialize(true); + } + + if (this.botInitialized) { + if (this.botRow) { + this.botRow.deleteCells(); + } + + row = this.generateRow("bottom", this.rowsToData(rows)); + this.botRow = row; + while (this.botElement.firstChild) { + this.botElement.removeChild(this.botElement.firstChild); + }this.botElement.appendChild(row.getElement()); + row.initialize(true); + } + + this.table.rowManager.adjustTableSize(); + + //set resizable handles + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } + } +}; + +ColumnCalcs.prototype.recalcRowGroup = function (row) { + this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); +}; + +ColumnCalcs.prototype.recalcAll = function () { + var _this44 = this; + + if (this.topCalcs.length || this.botCalcs.length) { + if (this.table.options.columnCalcs !== "group") { + this.recalc(this.table.rowManager.activeRows); + } + + if (this.table.options.groupBy && this.table.options.columnCalcs !== "table") { + + var groups = table.modules.groupRows.getChildGroups(); + + groups.forEach(function (group) { + _this44.recalcGroup(group); + }); + } + } +}; + +ColumnCalcs.prototype.recalcGroup = function (group) { + var data, rowData; + + if (group) { + if (group.calcs) { + if (group.calcs.bottom) { + data = this.rowsToData(group.rows); + rowData = this.generateRowData("bottom", data); + + group.calcs.bottom.updateData(rowData); + group.calcs.bottom.reinitialize(); + } + + if (group.calcs.top) { + data = this.rowsToData(group.rows); + rowData = this.generateRowData("top", data); + + group.calcs.top.updateData(rowData); + group.calcs.top.reinitialize(); + } + } + } +}; + +//generate top stats row +ColumnCalcs.prototype.generateTopRow = function (rows) { + return this.generateRow("top", this.rowsToData(rows)); +}; +//generate bottom stats row +ColumnCalcs.prototype.generateBottomRow = function (rows) { + return this.generateRow("bottom", this.rowsToData(rows)); +}; + +ColumnCalcs.prototype.rowsToData = function (rows) { + var _this45 = this; + + var data = []; + + rows.forEach(function (row) { + data.push(row.getData()); + + if (_this45.table.options.dataTree && _this45.table.options.dataTreeChildColumnCalcs) { + if (row.modules.dataTree.open) { + var children = _this45.rowsToData(_this45.table.modules.dataTree.getFilteredTreeChildren(row)); + data = data.concat(children); + } + } + }); + + return data; +}; + +//generate stats row +ColumnCalcs.prototype.generateRow = function (pos, data) { + var self = this, + rowData = this.generateRowData(pos, data), + row; + + if (self.table.modExists("mutator")) { + self.table.modules.mutator.disable(); + } + + row = new Row(rowData, this, "calc"); + + if (self.table.modExists("mutator")) { + self.table.modules.mutator.enable(); + } + + row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); + + row.component = false; + + row.getComponent = function () { + if (!this.component) { + this.component = new CalcComponent(this); + } + + return this.component; + }; + + row.generateCells = function () { + + var cells = []; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + //set field name of mock column + self.genColumn.setField(column.getField()); + self.genColumn.hozAlign = column.hozAlign; + + if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { + self.genColumn.modules.format = { + formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), + params: column.definition[pos + "CalcFormatterParams"] || {} + }; + } else { + self.genColumn.modules.format = { + formatter: self.table.modules.format.getFormatter("plaintext"), + params: {} + }; + } + + //ensure css class defintion is replicated to calculation cell + self.genColumn.definition.cssClass = column.definition.cssClass; + + //generate cell and assign to correct column + var cell = new Cell(self.genColumn, row); + cell.getElement(); + cell.column = column; + cell.setWidth(); + + column.cells.push(cell); + cells.push(cell); + + if (!column.visible) { + cell.hide(); + } + }); + + this.cells = cells; + }; + + return row; +}; + +//generate stats row +ColumnCalcs.prototype.generateRowData = function (pos, data) { + var rowData = {}, + calcs = pos == "top" ? this.topCalcs : this.botCalcs, + type = pos == "top" ? "topCalc" : "botCalc", + params, + paramKey; + + calcs.forEach(function (column) { + var values = []; + + if (column.modules.columnCalcs && column.modules.columnCalcs[type]) { + data.forEach(function (item) { + values.push(column.getFieldValue(item)); + }); + + paramKey = type + "Params"; + params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey]; + + column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); + } + }); + + return rowData; +}; + +ColumnCalcs.prototype.hasTopCalcs = function () { + return !!this.topCalcs.length; +}; + +ColumnCalcs.prototype.hasBottomCalcs = function () { + return !!this.botCalcs.length; +}; + +//handle table redraw +ColumnCalcs.prototype.redraw = function () { + if (this.topRow) { + this.topRow.normalizeHeight(true); + } + if (this.botRow) { + this.botRow.normalizeHeight(true); + } +}; + +//return the calculated +ColumnCalcs.prototype.getResults = function () { + var self = this, + results = {}, + groups; + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + groups = this.table.modules.groupRows.getGroups(true); + + groups.forEach(function (group) { + results[group.getKey()] = self.getGroupResults(group); + }); + } else { + results = { + top: this.topRow ? this.topRow.getData() : {}, + bottom: this.botRow ? this.botRow.getData() : {} + }; + } + + return results; +}; + +//get results from a group +ColumnCalcs.prototype.getGroupResults = function (group) { + var self = this, + groupObj = group._getSelf(), + subGroups = group.getSubGroups(), + subGroupResults = {}, + results = {}; + + subGroups.forEach(function (subgroup) { + subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); + }); + + results = { + top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, + bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, + groups: subGroupResults + }; + + return results; +}; + +//default calculations +ColumnCalcs.prototype.calculations = { + "avg": function avg(values, data, calcParams) { + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; + + if (values.length) { + output = values.reduce(function (sum, value) { + return Number(sum) + Number(value); + }); + + output = output / values.length; + + output = precision !== false ? output.toFixed(precision) : output; + } + + return parseFloat(output).toString(); + }, + "max": function max(values, data, calcParams) { + var output = null, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + values.forEach(function (value) { + + value = Number(value); + + if (value > output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "min": function min(values, data, calcParams) { + var output = null, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + values.forEach(function (value) { + + value = Number(value); + + if (value < output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "sum": function sum(values, data, calcParams) { + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + if (values.length) { + values.forEach(function (value) { + value = Number(value); + + output += !isNaN(value) ? Number(value) : 0; + }); + } + + return precision !== false ? output.toFixed(precision) : output; + }, + "concat": function concat(values, data, calcParams) { + var output = 0; + + if (values.length) { + output = values.reduce(function (sum, value) { + return String(sum) + String(value); + }); + } + + return output; + }, + "count": function count(values, data, calcParams) { + var output = 0; + + if (values.length) { + values.forEach(function (value) { + if (value) { + output++; + } + }); + } + + return output; + } +}; + +Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); + +var Clipboard = function Clipboard(table) { + this.table = table; + this.mode = true; + + this.pasteParser = function () {}; + this.pasteAction = function () {}; + this.customSelection = false; + this.rowRange = false; + this.blocked = true; //block copy actions not originating from this command +}; + +Clipboard.prototype.initialize = function () { + var _this46 = this; + + this.mode = this.table.options.clipboard; + + this.rowRange = this.table.options.clipboardCopyRowRange; + + if (this.mode === true || this.mode === "copy") { + this.table.element.addEventListener("copy", function (e) { + var plain, html, list; + + if (!_this46.blocked) { + e.preventDefault(); + + if (_this46.customSelection) { + plain = _this46.customSelection; + + if (_this46.table.options.clipboardCopyFormatter) { + plain = _this46.table.options.clipboardCopyFormatter("plain", plain); + } + } else { + + var list = _this46.table.modules.export.generateExportList(_this46.table.options.clipboardCopyConfig, _this46.table.options.clipboardCopyStyled, _this46.rowRange, "clipboard"); + + html = _this46.table.modules.export.genereateHTMLTable(list); + plain = html ? _this46.generatePlainContent(list) : ""; + + if (_this46.table.options.clipboardCopyFormatter) { + plain = _this46.table.options.clipboardCopyFormatter("plain", plain); + html = _this46.table.options.clipboardCopyFormatter("html", html); + } + } + + if (window.clipboardData && window.clipboardData.setData) { + window.clipboardData.setData('Text', plain); + } else if (e.clipboardData && e.clipboardData.setData) { + e.clipboardData.setData('text/plain', plain); + if (html) { + e.clipboardData.setData('text/html', html); + } + } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { + e.originalEvent.clipboardData.setData('text/plain', plain); + if (html) { + e.originalEvent.clipboardData.setData('text/html', html); + } + } + + _this46.table.options.clipboardCopied.call(_this46.table, plain, html); + + _this46.reset(); + } + }); + } + + if (this.mode === true || this.mode === "paste") { + this.table.element.addEventListener("paste", function (e) { + _this46.paste(e); + }); + } + + this.setPasteParser(this.table.options.clipboardPasteParser); + this.setPasteAction(this.table.options.clipboardPasteAction); +}; + +Clipboard.prototype.reset = function () { + this.blocked = true; + this.customSelection = false; +}; + +Clipboard.prototype.generatePlainContent = function (list) { + var output = []; + + list.forEach(function (row) { + var rowData = []; + + row.columns.forEach(function (col) { + var value = ""; + + if (col) { + + if (row.type === "group") { + col.value = col.component.getKey(); + } + + if (col.value === null) { + value = ""; + } else { + switch (_typeof(col.value)) { + case "object": + value = JSON.stringify(col.value); + break; + + case "undefined": + value = ""; + break; + + default: + value = col.value; + } + } + } + + rowData.push(value); + }); + + output.push(rowData.join("\t")); + }); + + return output.join("\n"); +}; + +Clipboard.prototype.copy = function (range, internal) { + var range, sel, textRange; + this.blocked = false; + this.customSelection = false; + + if (this.mode === true || this.mode === "copy") { + + this.rowRange = range || this.table.options.clipboardCopyRowRange; + + if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { + range = document.createRange(); + range.selectNodeContents(this.table.element); + sel = window.getSelection(); + + if (sel.toString() && internal) { + this.customSelection = sel.toString(); + } + + sel.removeAllRanges(); + sel.addRange(range); + } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { + textRange = document.body.createTextRange(); + textRange.moveToElementText(this.table.element); + textRange.select(); + } + + document.execCommand('copy'); + + if (sel) { + sel.removeAllRanges(); + } + } +}; + +//PASTE EVENT HANDLING + +Clipboard.prototype.setPasteAction = function (action) { + + switch (typeof action === 'undefined' ? 'undefined' : _typeof(action)) { + case "string": + this.pasteAction = this.pasteActions[action]; + + if (!this.pasteAction) { + console.warn("Clipboard Error - No such paste action found:", action); + } + break; + + case "function": + this.pasteAction = action; + break; + } +}; + +Clipboard.prototype.setPasteParser = function (parser) { + switch (typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) { + case "string": + this.pasteParser = this.pasteParsers[parser]; + + if (!this.pasteParser) { + console.warn("Clipboard Error - No such paste parser found:", parser); + } + break; + + case "function": + this.pasteParser = parser; + break; + } +}; + +Clipboard.prototype.paste = function (e) { + var data, rowData, rows; + + if (this.checkPaseOrigin(e)) { + + data = this.getPasteData(e); + + rowData = this.pasteParser.call(this, data); + + if (rowData) { + e.preventDefault(); + + if (this.table.modExists("mutator")) { + rowData = this.mutateData(rowData); + } + + rows = this.pasteAction.call(this, rowData); + this.table.options.clipboardPasted.call(this.table, data, rowData, rows); + } else { + this.table.options.clipboardPasteError.call(this.table, data); + } + } +}; + +Clipboard.prototype.mutateData = function (data) { + var self = this, + output = []; + + if (Array.isArray(data)) { + data.forEach(function (row) { + output.push(self.table.modules.mutator.transformRow(row, "clipboard")); + }); + } else { + output = data; + } + + return output; +}; + +Clipboard.prototype.checkPaseOrigin = function (e) { + var valid = true; + + if (e.target.tagName != "DIV" || this.table.modules.edit.currentCell) { + valid = false; + } + + return valid; +}; + +Clipboard.prototype.getPasteData = function (e) { + var data; + + if (window.clipboardData && window.clipboardData.getData) { + data = window.clipboardData.getData('Text'); + } else if (e.clipboardData && e.clipboardData.getData) { + data = e.clipboardData.getData('text/plain'); + } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { + data = e.originalEvent.clipboardData.getData('text/plain'); + } + + return data; +}; + +Clipboard.prototype.pasteParsers = { + table: function table(clipboard) { + var data = [], + success = false, + headerFindSuccess = true, + columns = this.table.columnManager.columns, + columnMap = [], + rows = []; + + //get data from clipboard into array of columns and rows. + clipboard = clipboard.split("\n"); + + clipboard.forEach(function (row) { + data.push(row.split("\t")); + }); + + if (data.length && !(data.length === 1 && data[0].length < 2)) { + success = true; + + //check if headers are present by title + data[0].forEach(function (value) { + var column = columns.find(function (column) { + return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); + }); + + if (column) { + columnMap.push(column); + } else { + headerFindSuccess = false; + } + }); + + //check if column headers are present by field + if (!headerFindSuccess) { + headerFindSuccess = true; + columnMap = []; + + data[0].forEach(function (value) { + var column = columns.find(function (column) { + return value && column.field && value.trim() && column.field.trim() === value.trim(); + }); + + if (column) { + columnMap.push(column); + } else { + headerFindSuccess = false; + } + }); + + if (!headerFindSuccess) { + columnMap = this.table.columnManager.columnsByIndex; + } + } + + //remove header row if found + if (headerFindSuccess) { + data.shift(); + } + + data.forEach(function (item) { + var row = {}; + + item.forEach(function (value, i) { + if (columnMap[i]) { + row[columnMap[i].field] = value; + } + }); + + rows.push(row); + }); + + return rows; + } else { + return false; + } + } +}; + +Clipboard.prototype.pasteActions = { + replace: function replace(rows) { + return this.table.setData(rows); + }, + update: function update(rows) { + return this.table.updateOrAddData(rows); + }, + insert: function insert(rows) { + return this.table.addData(rows); + } +}; + +Tabulator.prototype.registerModule("clipboard", Clipboard); + +var DataTree = function DataTree(table) { + this.table = table; + this.indent = 10; + this.field = ""; + this.collapseEl = null; + this.expandEl = null; + this.branchEl = null; + this.elementField = false; + + this.startOpen = function () {}; + + this.displayIndex = 0; +}; + +DataTree.prototype.initialize = function () { + var dummyEl = null, + firstCol = this.table.columnManager.getFirstVisibileColumn(), + options = this.table.options; + + this.field = options.dataTreeChildField; + this.indent = options.dataTreeChildIndent; + this.elementField = options.dataTreeElementColumn || (firstCol ? firstCol.field : false); + + if (options.dataTreeBranchElement) { + + if (options.dataTreeBranchElement === true) { + this.branchEl = document.createElement("div"); + this.branchEl.classList.add("tabulator-data-tree-branch"); + } else { + if (typeof options.dataTreeBranchElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeBranchElement; + this.branchEl = dummyEl.firstChild; + } else { + this.branchEl = options.dataTreeBranchElement; + } + } + } + + if (options.dataTreeCollapseElement) { + if (typeof options.dataTreeCollapseElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeCollapseElement; + this.collapseEl = dummyEl.firstChild; + } else { + this.collapseEl = options.dataTreeCollapseElement; + } + } else { + this.collapseEl = document.createElement("div"); + this.collapseEl.classList.add("tabulator-data-tree-control"); + this.collapseEl.tabIndex = 0; + this.collapseEl.innerHTML = "
"; + } + + if (options.dataTreeExpandElement) { + if (typeof options.dataTreeExpandElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeExpandElement; + this.expandEl = dummyEl.firstChild; + } else { + this.expandEl = options.dataTreeExpandElement; + } + } else { + this.expandEl = document.createElement("div"); + this.expandEl.classList.add("tabulator-data-tree-control"); + this.expandEl.tabIndex = 0; + this.expandEl.innerHTML = "
"; + } + + switch (_typeof(options.dataTreeStartExpanded)) { + case "boolean": + this.startOpen = function (row, index) { + return options.dataTreeStartExpanded; + }; + break; + + case "function": + this.startOpen = options.dataTreeStartExpanded; + break; + + default: + this.startOpen = function (row, index) { + return options.dataTreeStartExpanded[index]; + }; + break; + } +}; + +DataTree.prototype.initializeRow = function (row) { + var childArray = row.getData()[this.field]; + var isArray = Array.isArray(childArray); + + var children = isArray || !isArray && (typeof childArray === 'undefined' ? 'undefined' : _typeof(childArray)) === "object" && childArray !== null; + + if (!children && row.modules.dataTree && row.modules.dataTree.branchEl) { + row.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl); + } + + if (!children && row.modules.dataTree && row.modules.dataTree.controlEl) { + row.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl); + } + + row.modules.dataTree = { + index: row.modules.dataTree ? row.modules.dataTree.index : 0, + open: children ? row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0) : false, + controlEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false, + branchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false, + parent: row.modules.dataTree ? row.modules.dataTree.parent : false, + children: children + }; +}; + +DataTree.prototype.layoutRow = function (row) { + var cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0], + el = cell.getElement(), + config = row.modules.dataTree; + + if (config.branchEl) { + if (config.branchEl.parentNode) { + config.branchEl.parentNode.removeChild(config.branchEl); + } + config.branchEl = false; + } + + if (config.controlEl) { + if (config.controlEl.parentNode) { + config.controlEl.parentNode.removeChild(config.controlEl); + } + config.controlEl = false; + } + + this.generateControlElement(row, el); + + row.getElement().classList.add("tabulator-tree-level-" + config.index); + + if (config.index) { + if (this.branchEl) { + config.branchEl = this.branchEl.cloneNode(true); + el.insertBefore(config.branchEl, el.firstChild); + + if (this.table.rtl) { + config.branchEl.style.marginRight = (config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1) + config.index * this.indent + "px"; + } else { + config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + config.index * this.indent + "px"; + } + } else { + + if (this.table.rtl) { + el.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + config.index * this.indent + "px"; + } else { + el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; + } + } + } +}; + +DataTree.prototype.generateControlElement = function (row, el) { + var _this47 = this; + + var config = row.modules.dataTree, + el = el || row.getCells()[0].getElement(), + oldControl = config.controlEl; + + if (config.children !== false) { + + if (config.open) { + config.controlEl = this.collapseEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this47.collapseRow(row); + }); + } else { + config.controlEl = this.expandEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this47.expandRow(row); + }); + } + + config.controlEl.addEventListener("mousedown", function (e) { + e.stopPropagation(); + }); + + if (oldControl && oldControl.parentNode === el) { + oldControl.parentNode.replaceChild(config.controlEl, oldControl); + } else { + el.insertBefore(config.controlEl, el.firstChild); + } + } +}; + +DataTree.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +DataTree.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +DataTree.prototype.getRows = function (rows) { + var _this48 = this; + + var output = []; + + rows.forEach(function (row, i) { + var config, children; + + output.push(row); + + if (row instanceof Row) { + + row.create(); + + config = row.modules.dataTree.children; + + if (!config.index && config.children !== false) { + children = _this48.getChildren(row); + + children.forEach(function (child) { + child.create(); + output.push(child); + }); + } + } + }); + + return output; +}; + +DataTree.prototype.getChildren = function (row) { + var _this49 = this; + + var config = row.modules.dataTree, + children = [], + output = []; + + if (config.children !== false && config.open) { + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + if (this.table.modExists("sort") && this.table.options.dataTreeSort) { + this.table.modules.sort.sort(children); + } + + children.forEach(function (child) { + output.push(child); + + var subChildren = _this49.getChildren(child); + + subChildren.forEach(function (sub) { + output.push(sub); + }); + }); + } + + return output; +}; + +DataTree.prototype.generateChildren = function (row) { + var _this50 = this; + + var children = []; + + var childArray = row.getData()[this.field]; + + if (!Array.isArray(childArray)) { + childArray = [childArray]; + } + + childArray.forEach(function (childData) { + var childRow = new Row(childData || {}, _this50.table.rowManager); + + childRow.create(); + + childRow.modules.dataTree.index = row.modules.dataTree.index + 1; + childRow.modules.dataTree.parent = row; + + if (childRow.modules.dataTree.children) { + childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index); + } + children.push(childRow); + }); + + return children; +}; + +DataTree.prototype.expandRow = function (row, silent) { + var config = row.modules.dataTree; + + if (config.children !== false) { + config.open = true; + + row.reinitialize(); + + this.table.rowManager.refreshActiveData("tree", false, true); + + this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); + } +}; + +DataTree.prototype.collapseRow = function (row) { + var config = row.modules.dataTree; + + if (config.children !== false) { + config.open = false; + + row.reinitialize(); + + this.table.rowManager.refreshActiveData("tree", false, true); + + this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); + } +}; + +DataTree.prototype.toggleRow = function (row) { + var config = row.modules.dataTree; + + if (config.children !== false) { + if (config.open) { + this.collapseRow(row); + } else { + this.expandRow(row); + } + } +}; + +DataTree.prototype.getTreeParent = function (row) { + return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; +}; + +DataTree.prototype.getFilteredTreeChildren = function (row) { + var config = row.modules.dataTree, + output = [], + children; + + if (config.children) { + + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + children.forEach(function (childRow) { + if (childRow instanceof Row) { + output.push(childRow); + } + }); + } + + return output; +}; + +DataTree.prototype.rowDelete = function (row) { + var parent = row.modules.dataTree.parent, + childIndex; + + if (parent) { + childIndex = this.findChildIndex(row, parent); + + if (childIndex !== false) { + parent.data[this.field].splice(childIndex, 1); + } + + if (!parent.data[this.field].length) { + delete parent.data[this.field]; + } + + this.initializeRow(parent); + this.layoutRow(parent); + } + + this.table.rowManager.refreshActiveData("tree", false, true); +}; + +DataTree.prototype.addTreeChildRow = function (row, data, top, index) { + var childIndex = false; + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (!Array.isArray(row.data[this.field])) { + row.data[this.field] = []; + + row.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index); + } + + if (typeof index !== "undefined") { + childIndex = this.findChildIndex(index, row); + + if (childIndex !== false) { + row.data[this.field].splice(top ? childIndex : childIndex + 1, 0, data); + } + } + + if (childIndex === false) { + if (top) { + row.data[this.field].unshift(data); + } else { + row.data[this.field].push(data); + } + } + + this.initializeRow(row); + this.layoutRow(row); + + this.table.rowManager.refreshActiveData("tree", false, true); +}; + +DataTree.prototype.findChildIndex = function (subject, parent) { + var _this51 = this; + + var match = false; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + //subject is row element + match = subject.data; + } else if (subject instanceof RowComponent) { + //subject is public row component + match = subject._getSelf().data; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + if (parent.modules.dataTree) { + match = parent.modules.dataTree.children.find(function (childRow) { + return childRow instanceof Row ? childRow.element === subject : false; + }); + + if (match) { + match = match.data; + } + } + } + } else if (typeof subject == "undefined" || subject === null) { + match = false; + } else { + //subject should be treated as the index of the row + match = parent.data[this.field].find(function (row) { + return row.data[_this51.table.options.index] == subject; + }); + } + + if (match) { + + if (Array.isArray(parent.data[this.field])) { + match = parent.data[this.field].indexOf(match); + } + + if (match == -1) { + match = false; + } + } + + //catch all for any other type of input + + return match; +}; + +DataTree.prototype.getTreeChildren = function (row, component, recurse) { + var _this52 = this; + + var config = row.modules.dataTree, + output = []; + + if (config.children) { + + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + config.children.forEach(function (childRow) { + if (childRow instanceof Row) { + output.push(component ? childRow.getComponent() : childRow); + + if (recurse) { + output = output.concat(_this52.getTreeChildren(childRow, component, recurse)); + } + } + }); + } + + return output; +}; + +DataTree.prototype.checkForRestyle = function (cell) { + if (!cell.row.cells.indexOf(cell)) { + cell.row.reinitialize(); + } +}; + +DataTree.prototype.getChildField = function () { + return this.field; +}; + +DataTree.prototype.redrawNeeded = function (data) { + return (this.field ? typeof data[this.field] !== "undefined" : false) || (this.elementField ? typeof data[this.elementField] !== "undefined" : false); +}; + +Tabulator.prototype.registerModule("dataTree", DataTree); + +var Download = function Download(table) { + this.table = table; //hold Tabulator object +}; + +//trigger file download +Download.prototype.download = function (type, filename, options, range, interceptCallback) { + var self = this, + downloadFunc = false; + + function buildLink(data, mime) { + if (interceptCallback) { + if (interceptCallback === true) { + self.triggerDownload(data, mime, type, filename, true); + } else { + interceptCallback(data); + } + } else { + self.triggerDownload(data, mime, type, filename); + } + } + + if (typeof type == "function") { + downloadFunc = type; + } else { + if (self.downloaders[type]) { + downloadFunc = self.downloaders[type]; + } else { + console.warn("Download Error - No such download type found: ", type); + } + } + + if (downloadFunc) { + var list = this.generateExportList(range); + + downloadFunc.call(this.table, list, options || {}, buildLink); + } +}; + +Download.prototype.generateExportList = function (range) { + var list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, "download"); + + //assign group header formatter + var groupHeader = this.table.options.groupHeaderDownload; + + if (groupHeader && !Array.isArray(groupHeader)) { + groupHeader = [groupHeader]; + } + + list.forEach(function (row) { + var group; + + if (row.type === "group") { + group = row.columns[0]; + + if (groupHeader && groupHeader[row.indent]) { + group.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + }); + + return list; +}; + +Download.prototype.triggerDownload = function (data, mime, type, filename, newTab) { + var element = document.createElement('a'), + blob = new Blob([data], { type: mime }), + filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); + + blob = this.table.options.downloadReady.call(this.table, data, blob); + + if (blob) { + + if (newTab) { + window.open(window.URL.createObjectURL(blob)); + } else { + if (navigator.msSaveOrOpenBlob) { + navigator.msSaveOrOpenBlob(blob, filename); + } else { + element.setAttribute('href', window.URL.createObjectURL(blob)); + + //set file title + element.setAttribute('download', filename); + + //trigger download + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + + //remove temporary link element + document.body.removeChild(element); + } + } + + if (this.table.options.downloadComplete) { + this.table.options.downloadComplete(); + } + } +}; + +Download.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "intercept": + this.download(data.type, "", data.options, data.active, data.intercept); + break; + } +}; + +//downloaders +Download.prototype.downloaders = { + csv: function csv(list, options, setFileContents) { + var delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents = [], + headers = []; + + list.forEach(function (row) { + var item = []; + + switch (row.type) { + case "group": + console.warn("Download Warning - CSV downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - CSV downloader cannot process column calculations"); + break; + + case "header": + row.columns.forEach(function (col, i) { + if (col && col.depth === 1) { + headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; + } + }); + break; + + case "row": + row.columns.forEach(function (col) { + + if (col) { + + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + item.push('"' + String(col.value).split('"').join('""') + '"'); + } + }); + + fileContents.push(item.join(delimiter)); + break; + } + }); + + if (headers.length) { + fileContents.unshift(headers.join(delimiter)); + } + + fileContents = fileContents.join("\n"); + + if (options.bom) { + fileContents = '\uFEFF' + fileContents; + } + + setFileContents(fileContents, "text/csv"); + }, + + json: function json(list, options, setFileContents) { + var fileContents = []; + + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + break; + + case "group": + console.warn("Download Warning - JSON downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - JSON downloader cannot process column calculations"); + break; + + case "row": + row.columns.forEach(function (col) { + if (col) { + item[col.component.getField()] = col.value; + } + }); + + fileContents.push(item); + break; + } + }); + + fileContents = JSON.stringify(fileContents, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf: function pdf(list, options, setFileContents) { + var header = [], + body = [], + autoTableParams = {}, + rowGroupStyles = options.rowGroupStyles || { + fontStyle: "bold", + fontSize: 12, + cellPadding: 6, + fillColor: 220 + }, + rowCalcStyles = options.rowCalcStyles || { + fontStyle: "bold", + fontSize: 10, + cellPadding: 4, + fillColor: 232 + }, + jsPDFParams = options.jsPDF || {}, + title = options && options.title ? options.title : ""; + + if (!jsPDFParams.orientation) { + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if (!jsPDFParams.unit) { + jsPDFParams.unit = "pt"; + } + + //parse row list + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + header.push(parseRow(row)); + break; + + case "group": + body.push(parseRow(row, rowGroupStyles)); + break; + + case "calc": + body.push(parseRow(row, rowCalcStyles)); + break; + + case "row": + body.push(parseRow(row)); + break; + } + }); + + function parseRow(row, styles) { + var rowData = []; + + row.columns.forEach(function (col) { + var cell; + + if (col) { + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + cell = { + content: col.value, + colSpan: col.width, + rowSpan: col.height + }; + + if (styles) { + cell.styles = styles; + } + + rowData.push(cell); + } else { + rowData.push(""); + } + }); + + return rowData; + } + + //configure PDF + var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables + + if (options && options.autoTable) { + if (typeof options.autoTable === "function") { + autoTableParams = options.autoTable(doc) || {}; + } else { + autoTableParams = options.autoTable; + } + } + + if (title) { + autoTableParams.addPageContent = function (data) { + doc.text(title, 40, 30); + }; + } + + autoTableParams.head = header; + autoTableParams.body = body; + + doc.autoTable(autoTableParams); + + if (options && options.documentProcessing) { + options.documentProcessing(doc); + } + + setFileContents(doc.output("arraybuffer"), "application/pdf"); + }, + + xlsx: function xlsx(list, options, setFileContents) { + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = XLSX.utils.book_new(), + output; + + workbook.SheetNames = []; + workbook.Sheets = {}; + + function generateSheet() { + var rows = [], + merges = [], + worksheet = {}, + range = { s: { c: 0, r: 0 }, e: { c: list[0] ? list[0].columns.reduce(function (a, b) { + return a + (b && b.width ? b.width : 1); + }, 0) : 0, r: list.length } }; + + //parse row list + list.forEach(function (row, i) { + var rowData = []; + + row.columns.forEach(function (col, j) { + + if (col) { + rowData.push(!(col.value instanceof Date) && _typeof(col.value) === "object" ? JSON.stringify(col.value) : col.value); + + if (col.width > 1 || col.height > -1) { + merges.push({ s: { r: i, c: j }, e: { r: i + col.height - 1, c: j + col.width - 1 } }); + } + } else { + rowData.push(""); + } + }); + + rows.push(rowData); + }); + + //convert rows to worksheet + XLSX.utils.sheet_add_aoa(worksheet, rows); + + worksheet['!ref'] = XLSX.utils.encode_range(range); + + if (merges.length) { + worksheet["!merges"] = merges; + } + + return worksheet; + } + + if (options.sheetOnly) { + setFileContents(generateSheet()); + return; + } + + if (options.sheets) { + for (var sheet in options.sheets) { + + if (options.sheets[sheet] === true) { + workbook.SheetNames.push(sheet); + workbook.Sheets[sheet] = generateSheet(); + } else { + + workbook.SheetNames.push(sheet); + + this.modules.comms.send(options.sheets[sheet], "download", "intercept", { + type: "xlsx", + options: { sheetOnly: true }, + active: self.active, + intercept: function intercept(data) { + workbook.Sheets[sheet] = data; + } + }); + } + } + } else { + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + if (options.documentProcessing) { + workbook = options.documentProcessing(workbook); + } + + //convert workbook to binary array + function s2ab(s) { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i = 0; i != s.length; ++i) { + view[i] = s.charCodeAt(i) & 0xFF; + }return buf; + } + + output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); + + setFileContents(s2ab(output), "application/octet-stream"); + }, + + html: function html(list, options, setFileContents) { + if (this.modExists("export", true)) { + setFileContents(this.modules.export.genereateHTMLTable(list), "text/html"); + } + } + +}; + +Tabulator.prototype.registerModule("download", Download); + +var Edit = function Edit(table) { + this.table = table; //hold Tabulator object + this.currentCell = false; //hold currently editing cell + this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening + this.recursionBlock = false; //prevent focus recursion + this.invalidEdit = false; + this.editedCells = []; +}; + +//initialize column editor +Edit.prototype.initializeColumn = function (column) { + var self = this, + config = { + editor: false, + blocked: false, + check: column.definition.editable, + params: column.definition.editorParams || {} + }; + + //set column editor + switch (_typeof(column.definition.editor)) { + case "string": + + if (column.definition.editor === "tick") { + column.definition.editor = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.editor]) { + config.editor = self.editors[column.definition.editor]; + } else { + console.warn("Editor Error - No such editor found: ", column.definition.editor); + } + break; + + case "function": + config.editor = column.definition.editor; + break; + + case "boolean": + + if (column.definition.editor === true) { + + if (typeof column.definition.formatter !== "function") { + + if (column.definition.formatter === "tick") { + column.definition.formatter = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.formatter]) { + config.editor = self.editors[column.definition.formatter]; + } else { + config.editor = self.editors["input"]; + } + } else { + console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); + } + } + break; + } + + if (config.editor) { + column.modules.edit = config; + } +}; + +Edit.prototype.getCurrentCell = function () { + return this.currentCell ? this.currentCell.getComponent() : false; +}; + +Edit.prototype.clearEditor = function (cancel) { + var cell = this.currentCell, + cellEl; + + this.invalidEdit = false; + + if (cell) { + this.currentCell = false; + + cellEl = cell.getElement(); + + if (cancel) { + cell.validate(); + } else { + cellEl.classList.remove("tabulator-validation-fail"); + } + + cellEl.classList.remove("tabulator-editing"); + while (cellEl.firstChild) { + cellEl.removeChild(cellEl.firstChild); + }cell.row.getElement().classList.remove("tabulator-row-editing"); + } +}; + +Edit.prototype.cancelEdit = function () { + + if (this.currentCell) { + var cell = this.currentCell; + var component = this.currentCell.getComponent(); + + this.clearEditor(true); + cell.setValueActual(cell.getValue()); + cell.cellRendered(); + + if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { + cell.row.normalizeHeight(true); + } + + if (cell.column.cellEvents.cellEditCancelled) { + cell.column.cellEvents.cellEditCancelled.call(this.table, component); + } + + this.table.options.cellEditCancelled.call(this.table, component); + } +}; + +//return a formatted value for a cell +Edit.prototype.bindEditor = function (cell) { + var self = this, + element = cell.getElement(true); + + element.setAttribute("tabindex", 0); + + element.addEventListener("click", function (e) { + if (!element.classList.contains("tabulator-editing")) { + element.focus({ preventScroll: true }); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.button === 2) { + e.preventDefault(); + } else { + self.mouseClick = true; + } + }); + + element.addEventListener("focus", function (e) { + if (!self.recursionBlock) { + self.edit(cell, e, false); + } + }); +}; + +Edit.prototype.focusCellNoEvent = function (cell, block) { + this.recursionBlock = true; + if (!(block && this.table.browser === "ie")) { + cell.getElement().focus({ preventScroll: true }); + } + this.recursionBlock = false; +}; + +Edit.prototype.editCell = function (cell, forceEdit) { + this.focusCellNoEvent(cell); + this.edit(cell, false, forceEdit); +}; + +Edit.prototype.focusScrollAdjust = function (cell) { + if (this.table.rowManager.getRenderMode() == "virtual") { + var topEdge = this.table.rowManager.element.scrollTop, + bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop, + rowEl = cell.row.getElement(), + offset = rowEl.offsetTop; + + if (rowEl.offsetTop < topEdge) { + this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop; + } else { + if (rowEl.offsetTop + rowEl.offsetHeight > bottomEdge) { + this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; + } + } + + var leftEdge = this.table.rowManager.element.scrollLeft, + rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, + cellEl = cell.getElement(), + offset = cellEl.offsetLeft; + + if (this.table.modExists("frozenColumns")) { + leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); + rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); + } + + if (cellEl.offsetLeft < leftEdge) { + this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; + } else { + if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { + this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; + } + } + } +}; + +Edit.prototype.edit = function (cell, e, forceEdit) { + var self = this, + allowEdit = true, + rendered = function rendered() {}, + element = cell.getElement(), + cellEditor, + component, + params; + + //prevent editing if another cell is refusing to leave focus (eg. validation fail) + if (this.currentCell) { + if (!this.invalidEdit) { + this.cancelEdit(); + } + return; + } + + //handle successfull value change + function success(value) { + if (self.currentCell === cell) { + var valid = true; + + if (cell.column.modules.validate && self.table.modExists("validate") && self.table.options.validationMode != "manual") { + valid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value); + } + + if (valid === true || self.table.options.validationMode === "highlight") { + self.clearEditor(); + + if (!cell.modules.edit) { + cell.modules.edit = {}; + } + + cell.modules.edit.edited = true; + + if (self.editedCells.indexOf(cell) == -1) { + self.editedCells.push(cell); + } + + cell.setValue(value, true); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + + if (valid !== true) { + element.classList.add("tabulator-validation-fail"); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + return false; + } + + return true; + } else { + self.invalidEdit = true; + element.classList.add("tabulator-validation-fail"); + self.focusCellNoEvent(cell, true); + rendered(); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + + return false; + } + } else { + // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); + } + } + + //handle aborted edit + function cancel() { + if (self.currentCell === cell) { + self.cancelEdit(); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + } else { + // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); + } + } + + function onRendered(callback) { + rendered = callback; + } + + if (!cell.column.modules.edit.blocked) { + if (e) { + e.stopPropagation(); + } + + switch (_typeof(cell.column.modules.edit.check)) { + case "function": + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + break; + + case "boolean": + allowEdit = cell.column.modules.edit.check; + break; + } + + if (allowEdit || forceEdit) { + + self.cancelEdit(); + + self.currentCell = cell; + + this.focusScrollAdjust(cell); + + component = cell.getComponent(); + + if (this.mouseClick) { + this.mouseClick = false; + + if (cell.column.cellEvents.cellClick) { + cell.column.cellEvents.cellClick.call(this.table, e, component); + } + } + + if (cell.column.cellEvents.cellEditing) { + cell.column.cellEvents.cellEditing.call(this.table, component); + } + + self.table.options.cellEditing.call(this.table, component); + + params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; + + cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); + + //if editor returned, add to DOM, if false, abort edit + if (cellEditor !== false) { + + if (cellEditor instanceof Node) { + element.classList.add("tabulator-editing"); + cell.row.getElement().classList.add("tabulator-row-editing"); + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.appendChild(cellEditor); + + //trigger onRendered Callback + rendered(); + + //prevent editing from triggering rowClick event + var children = element.children; + + for (var i = 0; i < children.length; i++) { + children[i].addEventListener("click", function (e) { + e.stopPropagation(); + }); + } + } else { + console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); + element.blur(); + return false; + } + } else { + element.blur(); + return false; + } + + return true; + } else { + this.mouseClick = false; + element.blur(); + return false; + } + } else { + this.mouseClick = false; + element.blur(); + return false; + } +}; + +Edit.prototype.maskInput = function (el, options) { + var mask = options.mask, + maskLetter = typeof options.maskLetterChar !== "undefined" ? options.maskLetterChar : "A", + maskNumber = typeof options.maskNumberChar !== "undefined" ? options.maskNumberChar : "9", + maskWildcard = typeof options.maskWildcardChar !== "undefined" ? options.maskWildcardChar : "*", + success = false; + + function fillSymbols(index) { + var symbol = mask[index]; + if (typeof symbol !== "undefined" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber) { + el.value = el.value + "" + symbol; + fillSymbols(index + 1); + } + } + + el.addEventListener("keydown", function (e) { + var index = el.value.length, + char = e.key; + + if (e.keyCode > 46) { + if (index >= mask.length) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } else { + switch (mask[index]) { + case maskLetter: + if (char.toUpperCase() == char.toLowerCase()) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskNumber: + if (isNaN(char)) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskWildcard: + break; + + default: + if (char !== mask[index]) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + } + } + + success = true; + } + + return; + }); + + el.addEventListener("keyup", function (e) { + if (e.keyCode > 46) { + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } + } + }); + + if (!el.placeholder) { + el.placeholder = mask; + } + + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } +}; + +Edit.prototype.getEditedCells = function () { + var output = []; + + this.editedCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; +}; + +Edit.prototype.clearEdited = function (cell) { + var editIndex; + + if (cell.modules.edit && cell.modules.edit.edited) { + cell.modules.edit.edited = false; + + if (cell.modules.validate) { + cell.modules.validate.invalid = false; + } + } + + editIndex = this.editedCells.indexOf(cell); + + if (editIndex > -1) { + this.editedCells.splice(editIndex, 1); + } +}; + +//default data editors +Edit.prototype.editors = { + + //input element + input: function input(cell, onRendered, success, cancel, editorParams) { + + //create and style input + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", editorParams.search ? "search" : "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof cellValue !== "undefined" ? cellValue : ""; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange(e) { + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + // case 9: + case 13: + onChange(e); + break; + + case 27: + cancel(); + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //resizable text area element + textarea: function textarea(cell, onRendered, success, cancel, editorParams) { + var self = this, + cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "hybrid", + value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""), + count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, + input = document.createElement("textarea"), + scrollHeight = 0; + + //create and style input + input.style.display = "block"; + input.style.padding = "2px"; + input.style.height = "100%"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.whiteSpace = "pre-wrap"; + input.style.resize = "none"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + input.scrollHeight; + input.style.height = input.scrollHeight + "px"; + cell.getRow().normalizeHeight(); + }); + + function onChange(e) { + + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + + setTimeout(function () { + cell.getRow().normalizeHeight(); + }, 300); + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + input.addEventListener("keyup", function () { + + input.style.height = ""; + + var heightNow = input.scrollHeight; + + input.style.height = heightNow + "px"; + + if (heightNow != scrollHeight) { + scrollHeight = heightNow; + cell.getRow().normalizeHeight(); + } + }); + + input.addEventListener("keydown", function (e) { + + switch (e.keyCode) { + case 27: + cancel(); + break; + + case 38: + //up arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + + break; + + case 40: + //down arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart !== input.value.length) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + number: function number(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + input = document.createElement("input"); + + input.setAttribute("type", "number"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + var blurFunc = function blurFunc(e) { + onChange(); + }; + + onRendered(function () { + //submit new value on blur + input.removeEventListener("blur", blurFunc); + + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + //submit new value on blur + input.addEventListener("blur", blurFunc); + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value !== cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + + case 38: //up arrow + case 40: + //down arrow + if (vertNav == "editor") { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + range: function range(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", "range"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value != cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur + input.addEventListener("blur", function (e) { + onChange(); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + } + }); + + return input; + }, + + //select + select: function select(cell, onRendered, success, cancel, editorParams) { + var _this53 = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], + input = document.createElement("input"), + listEl = document.createElement("div"), + multiselect = editorParams.multiselect, + dataItems = [], + currentItem = {}, + displayItems = [], + currentItems = [], + blurable = true, + blockListShow = false, + searchWord = "", + searchWordTimeout = null; + + if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { + console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); + editorParams = { values: editorParams }; + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + } else { + console.warn("unable to find matching column to create select lookup list:", field); + } + + return Object.keys(output); + } + + function parseItems(inputValues, curentValues) { + var dataList = []; + var displayList = []; + + function processComplexListItem(item) { + var item = { + label: item.label, + value: item.value, + itemParams: item.itemParams, + elementAttributes: item.elementAttributes, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + + return item; + } + + if (typeof inputValues == "function") { + inputValues = inputValues(cell); + } + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + var item; + + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { + + if (value.options) { + item = { + label: value.label, + group: true, + itemParams: value.itemParams, + elementAttributes: value.elementAttributes, + element: false + }; + + displayList.push(item); + + value.options.forEach(function (item) { + processComplexListItem(item); + }); + } else { + processComplexListItem(value); + } + } else { + + item = { + label: value, + value: value, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + }); + } else { + for (var key in inputValues) { + var item = { + label: inputValues[key], + value: key, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + } + + if (editorParams.sortValuesList) { + dataList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + displayList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + if (editorParams.sortValuesList !== "asc") { + dataList.reverse(); + displayList.reverse(); + } + } + + dataItems = dataList; + displayItems = displayList; + + fillList(); + } + + function fillList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }displayItems.forEach(function (item) { + + var el = item.element; + + if (!el) { + el = document.createElement("div"); + item.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label; + if (item.group) { + el.classList.add("tabulator-edit-select-list-group"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + } else { + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + + el.addEventListener("click", function () { + blockListShow = true; + + setTimeout(function () { + blockListShow = false; + }, 10); + + // setCurrentItem(item); + // chooseItem(); + if (multiselect) { + toggleItem(item); + input.focus(); + } else { + chooseItem(item); + } + }); + + // if(item === currentItem){ + // el.classList.add("active"); + // } + + if (currentItems.indexOf(item) > -1) { + el.classList.add("active"); + } + } + + if (item.elementAttributes && _typeof(item.elementAttributes) == "object") { + for (var key in item.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + el.setAttribute(key, input.getAttribute(key) + item.elementAttributes["+" + key]); + } else { + el.setAttribute(key, item.elementAttributes[key]); + } + } + } + el.addEventListener("mousedown", function () { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + } + + listEl.appendChild(el); + }); + } + + function setCurrentItem(item, active) { + + if (!multiselect && currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("focused"); + } + + currentItem = item; + + if (item.element) { + item.element.classList.add("focused"); + if (active) { + item.element.classList.add("active"); + } + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + // function chooseItem(){ + // hideList(); + + // if(initialValue !== currentItem.value){ + // initialValue = currentItem.value; + // success(currentItem.value); + // }else{ + // cancel(); + // } + // } + + function setItem(item) { + var index = currentItems.indexOf(item); + + if (index == -1) { + currentItems.push(item); + setCurrentItem(item, true); + } + + fillInput(); + } + + function unsetItem(index) { + var item = currentItems[index]; + + if (index > -1) { + currentItems.splice(index, 1); + if (item.element) { + item.element.classList.remove("active"); + } + } + } + + function toggleItem(item) { + if (!item) { + item = currentItem; + } + + var index = currentItems.indexOf(item); + + if (index > -1) { + unsetItem(index); + } else { + if (multiselect !== true && currentItems.length >= multiselect) { + unsetItem(0); + } + + setItem(item); + } + + fillInput(); + } + + function chooseItem(item) { + hideList(); + + if (!item) { + item = currentItem; + } + + if (item) { + input.value = item.label; + success(item.value); + } + + initialDisplayValue = input.value; + } + + function chooseItems(silent) { + if (!silent) { + hideList(); + } + + var output = []; + + currentItems.forEach(function (item) { + output.push(item.value); + }); + + initialDisplayValue = input.value; + + success(output); + } + + function fillInput() { + var output = []; + + currentItems.forEach(function (item) { + output.push(item.label); + }); + + input.value = output.join(", "); + + if (self.currentCell === false) { + chooseItems(true); + } + } + + function unsetItems() { + + var len = currentItems.length; + + for (var _i9 = 0; _i9 < len; _i9++) { + unsetItem(0); + } + } + + function cancelItem() { + hideList(); + cancel(); + } + + function showList() { + currentItems = []; + + if (!listEl.parentNode) { + if (editorParams.values === true) { + parseItems(getUniqueColumnValues(), initialDisplayValue); + } else if (typeof editorParams.values === "string") { + parseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue); + } else { + parseItems(editorParams.values || [], initialDisplayValue); + } + + var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + document.body.appendChild(listEl); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + function scrollTovalue(char) { + + clearTimeout(searchWordTimeout); + + var character = String.fromCharCode(event.keyCode).toLowerCase(); + searchWord += character.toLowerCase(); + + var match = dataItems.find(function (item) { + return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord); + }); + + if (match) { + setCurrentItem(match, !multiselect); + } + + searchWordTimeout = setTimeout(function () { + searchWord = ""; + }, 800); + } + + //style input + input.setAttribute("type", "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.cursor = "default"; + input.readOnly = this.currentCell != false; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof initialValue !== "undefined" || initialValue === null ? initialValue : ""; + + // if(editorParams.values === true){ + // parseItems(getUniqueColumnValues(), initialValue); + // }else if(typeof editorParams.values === "string"){ + // parseItems(getUniqueColumnValues(editorParams.values), initialValue); + // }else{ + // parseItems(editorParams.values || [], initialValue); + // } + + input.addEventListener("search", function (e) { + if (!input.value) { + unsetItems(); + chooseItems(); + } + }); + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(dataItems[index - 1], !multiselect); + } + } + break; + + case 40: + //down arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < dataItems.length - 1) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < dataItems.length - 1) { + if (index == -1) { + setCurrentItem(dataItems[0], !multiselect); + } else { + setCurrentItem(dataItems[index + 1], !multiselect); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + break; + + case 13: + //enter + // chooseItem(); + + if (multiselect) { + toggleItem(); + } else { + chooseItem(); + } + + break; + + case 27: + //escape + cancelItem(); + break; + + case 9: + //tab + break; + + default: + if (self.currentCell === false) { + e.preventDefault(); + } + + if (e.keyCode >= 38 && e.keyCode <= 90) { + scrollTovalue(e.keyCode); + } + } + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + if (multiselect) { + chooseItems(); + } else { + cancelItem(); + } + } + }); + + input.addEventListener("focus", function (e) { + if (!blockListShow) { + showList(); + } + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + setTimeout(function () { + _this53.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + return input; + }, + + //autocomplete + autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { + var _this54 = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : "", + input = document.createElement("input"), + listEl = document.createElement("div"), + allItems = [], + displayItems = [], + values = [], + currentItem = false, + blurable = true, + uniqueColumnValues = false; + + //style input + input.setAttribute("type", "search"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style list element + listEl.classList.add("tabulator-edit-select-list"); + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + function genUniqueColumnValues() { + if (editorParams.values === true) { + uniqueColumnValues = getUniqueColumnValues(); + } else if (typeof editorParams.values === "string") { + uniqueColumnValues = getUniqueColumnValues(editorParams.values); + } + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + + if (editorParams.sortValuesList) { + if (editorParams.sortValuesList == "asc") { + output = Object.keys(output).sort(); + } else { + output = Object.keys(output).sort().reverse(); + } + } else { + output = Object.keys(output); + } + } else { + console.warn("unable to find matching column to create autocomplete lookup list:", field); + } + + return output; + } + + function filterList(term, intialLoad) { + var matches = [], + values, + items, + searchEl; + + //lookup base values list + if (uniqueColumnValues) { + values = uniqueColumnValues; + } else { + values = editorParams.values || []; + } + + if (editorParams.searchFunc) { + matches = editorParams.searchFunc(term, values); + + if (matches instanceof Promise) { + + addNotice(typeof editorParams.searchingPlaceholder !== "undefined" ? editorParams.searchingPlaceholder : "Searching..."); + + matches.then(function (result) { + fillListIfNotEmpty(parseItems(result), intialLoad); + }).catch(function (err) { + console.err("error in autocomplete search promise:", err); + }); + } else { + fillListIfNotEmpty(parseItems(matches), intialLoad); + } + } else { + items = parseItems(values); + + if (term === "") { + if (editorParams.showListOnEmpty) { + matches = items; + } + } else { + items.forEach(function (item) { + if (item.value !== null || typeof item.value !== "undefined") { + if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { + matches.push(item); + } + } + }); + } + + fillListIfNotEmpty(matches, intialLoad); + } + } + + function addNotice(notice) { + var searchEl = document.createElement("div"); + + clearList(); + + if (notice !== false) { + searchEl.classList.add("tabulator-edit-select-list-notice"); + searchEl.tabIndex = 0; + + if (notice instanceof Node) { + searchEl.appendChild(notice); + } else { + searchEl.innerHTML = notice; + } + + listEl.appendChild(searchEl); + } + } + + function parseItems(inputValues) { + var itemList = []; + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + + var item = {}; + + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label; + item.value = value.value; + } else { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value; + item.value = value; + } + + itemList.push(item); + }); + } else { + for (var key in inputValues) { + var item = { + title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], + value: key + }; + + itemList.push(item); + } + } + + return itemList; + } + + function clearList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + } + } + + function fillListIfNotEmpty(items, intialLoad) { + if (items.length) { + fillList(items, intialLoad); + } else { + if (editorParams.emptyPlaceholder) { + addNotice(editorParams.emptyPlaceholder); + } + } + } + + function fillList(items, intialLoad) { + var current = false; + + clearList(); + + displayItems = items; + + displayItems.forEach(function (item) { + var el = item.element; + + if (!el) { + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.title; + + el.addEventListener("click", function (e) { + setCurrentItem(item); + chooseItem(); + }); + + el.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + + if (intialLoad && item.value == initialValue) { + input.value = item.title; + item.element.classList.add("active"); + current = true; + } + + if (item === currentItem) { + item.element.classList.add("active"); + current = true; + } + } + + listEl.appendChild(el); + }); + + if (!current) { + setCurrentItem(false); + } + } + + function chooseItem() { + hideList(); + + if (currentItem) { + if (initialValue !== currentItem.value) { + initialValue = currentItem.value; + input.value = currentItem.title; + success(currentItem.value); + } else { + cancel(); + } + } else { + if (editorParams.freetext) { + initialValue = input.value; + success(input.value); + } else { + if (editorParams.allowEmpty && input.value === "") { + initialValue = input.value; + success(input.value); + } else { + cancel(); + } + } + } + } + + function showList() { + if (!listEl.parentNode) { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + document.body.appendChild(listEl); + } + } + + function setCurrentItem(item, showInputValue) { + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + currentItem = item; + + if (item && item.element) { + item.element.classList.add("active"); + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function cancelItem() { + hideList(); + cancel(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(displayItems[index - 1]); + } else { + setCurrentItem(false); + } + } + break; + + case 40: + //down arrow + + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < displayItems.length - 1) { + + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < displayItems.length - 1) { + if (index == -1) { + setCurrentItem(displayItems[0]); + } else { + setCurrentItem(displayItems[index + 1]); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + // e.preventDefault(); + break; + + case 13: + //enter + chooseItem(); + break; + + case 27: + //escape + cancelItem(); + break; + + case 36: //home + case 35: + //end + //prevent table navigation while using input element + e.stopImmediatePropagation(); + break; + } + }); + + input.addEventListener("keyup", function (e) { + + switch (e.keyCode) { + case 38: //up arrow + case 37: //left arrow + case 39: //up arrow + case 40: //right arrow + case 13: //enter + case 27: + //escape + break; + + default: + filterList(input.value); + } + }); + + input.addEventListener("search", function (e) { + filterList(input.value); + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + chooseItem(); + } + }); + + input.addEventListener("focus", function (e) { + var value = initialDisplayValue; + genUniqueColumnValues(); + showList(); + input.value = value; + filterList(value, true); + }); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + setTimeout(function () { + _this54.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + genUniqueColumnValues(); + input.value = initialDisplayValue; + filterList(initialDisplayValue, true); + + return input; + }, + + //star rating + star: function star(cell, onRendered, success, cancel, editorParams) { + var self = this, + element = cell.getElement(), + value = cell.getValue(), + maxStars = element.getElementsByTagName("svg").length || 5, + size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, + stars = [], + starsHolder = document.createElement("div"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + + //change star type + function starChange(val) { + stars.forEach(function (star, i) { + if (i < val) { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-active"); + } else { + star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); + } + + star.innerHTML = ''; + } else { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-inactive"); + } else { + star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); + } + + star.innerHTML = ''; + } + }); + } + + //build stars + function buildStar(i) { + + var starHolder = document.createElement("span"); + var nextStar = star.cloneNode(true); + + stars.push(nextStar); + + starHolder.addEventListener("mouseenter", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + starChange(i); + }); + + starHolder.addEventListener("mousemove", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + }); + + starHolder.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + success(i); + element.blur(); + }); + + starHolder.appendChild(nextStar); + starsHolder.appendChild(starHolder); + } + + //handle keyboard navigation value change + function changeValue(val) { + value = val; + starChange(val); + } + + //style cell + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + //style holding element + starsHolder.style.verticalAlign = "middle"; + starsHolder.style.display = "inline-block"; + starsHolder.style.padding = "4px"; + + //style star + star.setAttribute("width", size); + star.setAttribute("height", size); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + starsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + starsHolder.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //create correct number of stars + for (var i = 1; i <= maxStars; i++) { + buildStar(i); + } + + //ensure value does not exceed number of stars + value = Math.min(parseInt(value), maxStars); + + // set initial styling of stars + starChange(value); + + starsHolder.addEventListener("mousemove", function (e) { + starChange(0); + }); + + starsHolder.addEventListener("click", function (e) { + success(0); + }); + + element.addEventListener("blur", function (e) { + cancel(); + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + changeValue(value + 1); + break; + + case 37: + //left arrow + changeValue(value - 1); + break; + + case 13: + //enter + success(value); + break; + + case 27: + //escape + cancel(); + break; + } + }); + + return starsHolder; + }, + + //draggable progress bar + progress: function progress(cell, onRendered, success, cancel, editorParams) { + var element = cell.getElement(), + max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, + min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, + percent = (max - min) / 100, + value = cell.getValue() || 0, + handle = document.createElement("div"), + bar = document.createElement("div"), + mouseDrag, + mouseDragWidth; + + //set new value + function updateValue() { + var style = window.getComputedStyle(element, null); + + var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min; + success(calcVal); + element.setAttribute("aria-valuenow", calcVal); + element.setAttribute("aria-label", value); + } + + //style handle + handle.style.position = "absolute"; + handle.style.right = "0"; + handle.style.top = "0"; + handle.style.bottom = "0"; + handle.style.width = "5px"; + handle.classList.add("tabulator-progress-handle"); + + //style bar + bar.style.display = "inline-block"; + bar.style.position = "relative"; + // bar.style.top = "8px"; + // bar.style.bottom = "8px"; + // bar.style.left = "4px"; + // bar.style.marginRight = "4px"; + bar.style.height = "100%"; + bar.style.backgroundColor = "#488CE9"; + bar.style.maxWidth = "100%"; + bar.style.minWidth = "0%"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + bar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + bar.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style cell + element.style.padding = "4px 4px"; + + //make sure value is in range + value = Math.min(parseFloat(value), max); + value = Math.max(parseFloat(value), min); + + //workout percentage + value = Math.round((value - min) / percent); + // bar.style.right = value + "%"; + bar.style.width = value + "%"; + + element.setAttribute("aria-valuemin", min); + element.setAttribute("aria-valuemax", max); + + bar.appendChild(handle); + + handle.addEventListener("mousedown", function (e) { + mouseDrag = e.screenX; + mouseDragWidth = bar.offsetWidth; + }); + + handle.addEventListener("mouseover", function () { + handle.style.cursor = "ew-resize"; + }); + + element.addEventListener("mousemove", function (e) { + if (mouseDrag) { + bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; + } + }); + + element.addEventListener("mouseup", function (e) { + if (mouseDrag) { + e.stopPropagation(); + e.stopImmediatePropagation(); + + mouseDrag = false; + mouseDragWidth = false; + + updateValue(); + } + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + e.preventDefault(); + bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; + break; + + case 37: + //left arrow + e.preventDefault(); + bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; + break; + + case 9: //tab + case 13: + //enter + updateValue(); + break; + + case 27: + //escape + cancel(); + break; + + } + }); + + element.addEventListener("blur", function () { + cancel(); + }); + + return bar; + }, + + //checkbox + tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { + var value = cell.getValue(), + input = document.createElement("input"), + tristate = editorParams.tristate, + indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, + indetermState = false; + + input.setAttribute("type", "checkbox"); + input.style.marginTop = "5px"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { + indetermState = true; + input.indeterminate = true; + } + + if (this.table.browser != "firefox") { + //prevent blur issue on mac firefox + onRendered(function () { + input.focus({ preventScroll: true }); + }); + } + + input.checked = value === true || value === "true" || value === "True" || value === 1; + + onRendered(function () { + input.focus(); + }); + + function setValue(blur) { + if (tristate) { + if (!blur) { + if (input.checked && !indetermState) { + input.checked = false; + input.indeterminate = true; + indetermState = true; + return indetermValue; + } else { + indetermState = false; + return input.checked; + } + } else { + if (indetermState) { + return indetermValue; + } else { + return input.checked; + } + } + } else { + return input.checked; + } + } + + //submit new value on blur + input.addEventListener("change", function (e) { + success(setValue()); + }); + + input.addEventListener("blur", function (e) { + success(setValue(true)); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + if (e.keyCode == 13) { + success(setValue()); + } + if (e.keyCode == 27) { + cancel(); + } + }); + + return input; + } +}; + +Tabulator.prototype.registerModule("edit", Edit); + +var ExportRow = function ExportRow(type, columns, component, indent) { + this.type = type; + this.columns = columns; + this.component = component || false; + this.indent = indent || 0; +}; + +var ExportColumn = function ExportColumn(value, component, width, height, depth) { + this.value = value; + this.component = component || false; + this.width = width; + this.height = height; + this.depth = depth; +}; + +var Export = function Export(table) { + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; +}; + +Export.prototype.generateExportList = function (config, style, range, colVisProp) { + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : []; + var body = this.bodyToExportRows(this.rowLookup(range)); + + return headers.concat(body); +}; + +Export.prototype.genereateTable = function (config, style, range, colVisProp) { + var list = this.generateExportList(config, style, range, colVisProp); + + return this.genereateTableElement(list); +}; + +Export.prototype.rowLookup = function (range) { + var _this55 = this; + + var rows = []; + + if (typeof range == "function") { + range.call(this.table).forEach(function (row) { + row = _this55.table.rowManager.findRow(row); + + if (row) { + rows.push(row); + } + }); + } else { + switch (range) { + case true: + case "visible": + rows = this.table.rowManager.getVisibleRows(true); + break; + + case "all": + rows = this.table.rowManager.rows; + break; + + case "selected": + rows = this.table.modules.selectRow.selectedRows; + break; + + case "active": + default: + if (this.table.options.pagination) { + rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); + } else { + rows = this.table.rowManager.getDisplayRows(); + } + } + } + + return Object.assign([], rows); +}; + +Export.prototype.generateColumnGroupHeaders = function () { + var _this56 = this; + + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach(function (column) { + var colData = _this56.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; +}; + +Export.prototype.processColumnGroup = function (column) { + var _this57 = this; + + var subGroups = column.columns, + maxDepth = 0, + title = column.definition["title" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title; + + var groupData = { + title: title, + column: column, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this57.processColumnGroup(subGroup); + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + + if (subGroupData.depth > maxDepth) { + maxDepth = subGroupData.depth; + } + } + }); + + groupData.depth += maxDepth; + + if (!groupData.width) { + return false; + } + } else { + if (this.columnVisCheck(column)) { + groupData.width = 1; + } else { + return false; + } + } + + return groupData; +}; + +Export.prototype.columnVisCheck = function (column) { + return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); +}; + +Export.prototype.headersToExportRows = function (columns) { + var headers = [], + headerDepth = 0, + exportRows = []; + + function parseColumnGroup(column, level) { + + var depth = headerDepth - level; + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + column.height = column.subGroups ? 1 : depth - column.depth + 1; + + headers[level].push(column); + + if (column.height > 1) { + for (var _i10 = 1; _i10 < column.height; _i10++) { + + if (typeof headers[level + _i10] === "undefined") { + headers[level + _i10] = []; + } + + headers[level + _i10].push(false); + } + } + + if (column.width > 1) { + for (var _i11 = 1; _i11 < column.width; _i11++) { + headers[level].push(false); + } + } + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } + } + + //calculate maximum header debth + columns.forEach(function (column) { + if (column.depth > headerDepth) { + headerDepth = column.depth; + } + }); + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + headers.forEach(function (header) { + var columns = []; + + header.forEach(function (col) { + if (col) { + columns.push(new ExportColumn(col.title, col.column.getComponent(), col.width, col.height, col.depth)); + } else { + columns.push(null); + } + }); + + exportRows.push(new ExportRow("header", columns)); + }); + + return exportRows; +}; + +Export.prototype.bodyToExportRows = function (rows) { + var _this58 = this; + + var columns = []; + var exportRows = []; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (_this58.columnVisCheck(column)) { + columns.push(column.getComponent()); + } + }); + + if (this.config.columnCalcs !== false && this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized) { + rows.unshift(this.table.modules.columnCalcs.topRow); + } + + if (this.table.modules.columnCalcs.botInitialized) { + rows.push(this.table.modules.columnCalcs.botRow); + } + } + + rows = rows.filter(function (row) { + switch (row.type) { + case "group": + return _this58.config.rowGroups !== false; + break; + + case "calc": + return _this58.config.columnCalcs !== false; + break; + + case "row": + return !(_this58.table.options.dataTree && _this58.config.dataTree === false && row.modules.dataTree.parent); + break; + } + + return true; + }); + + rows.forEach(function (row, i) { + var rowData = row.getData(_this58.colVisProp); + var exportCols = []; + var indent = 0; + + switch (row.type) { + case "group": + indent = row.level; + exportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1)); + break; + + case "calc": + case "row": + columns.forEach(function (col) { + exportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1)); + }); + + if (_this58.table.options.dataTree && _this58.config.dataTree !== false) { + indent = row.modules.dataTree.index; + } + break; + } + + exportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent)); + }); + + return exportRows; +}; + +Export.prototype.genereateTableElement = function (list) { + var _this59 = this; + + var table = document.createElement("table"), + headerEl = document.createElement("thead"), + bodyEl = document.createElement("tbody"), + styles = this.lookupTableStyles(), + rowFormatter = this.table.options["rowFormatter" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], + setup = {}; + + setup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter; + + if (this.table.options.dataTree && this.config.dataTree !== false && this.table.modExists("columnCalcs")) { + setup.treeElementField = this.table.modules.dataTree.elementField; + } + + //assign group header formatter + setup.groupHeader = this.table.options["groupHeader" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))]; + + if (setup.groupHeader && !Array.isArray(setup.groupHeader)) { + setup.groupHeader = [setup.groupHeader]; + } + + table.classList.add("tabulator-print-table"); + + this.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + if (list.length > 1000) { + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + list.forEach(function (row, i) { + switch (row.type) { + case "header": + headerEl.appendChild(_this59.genereateHeaderElement(row, setup, styles)); + break; + + case "group": + bodyEl.appendChild(_this59.genereateGroupElement(row, setup, styles)); + break; + + case "calc": + bodyEl.appendChild(_this59.genereateCalcElement(row, setup, styles)); + break; + + case "row": + var rowEl = _this59.genereateRowElement(row, setup, styles); + _this59.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + bodyEl.appendChild(rowEl); + break; + } + }); + + if (headerEl.innerHTML) { + table.appendChild(headerEl); + } + + table.appendChild(bodyEl); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + return table; +}; + +Export.prototype.lookupTableStyles = function () { + var styles = {}; + + //lookup row styles + if (this.cloneTableStyle && window.getComputedStyle) { + styles.oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + styles.evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + styles.calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + styles.firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + styles.firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (styles.firstRow) { + styles.styleCells = styles.firstRow.getElementsByClassName("tabulator-cell"); + styles.firstCell = styles.styleCells[0]; + styles.lastCell = styles.styleCells[styles.styleCells.length - 1]; + } + } + + return styles; +}; + +Export.prototype.genereateHeaderElement = function (row, setup, styles) { + var _this60 = this; + + var rowEl = document.createElement("tr"); + + row.columns.forEach(function (column) { + if (column) { + var cellEl = document.createElement("th"); + var classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(" ") : []; + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.value; + + if (_this60.cloneTableStyle) { + cellEl.style.boxSizing = "border-box"; + } + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + _this60.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this60.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if (column.component._column.visible) { + _this60.mapElementStyles(column.component.getElement(), cellEl, ["width"]); + } else { + if (column.component._column.definition.width) { + cellEl.style.width = column.component._column.definition.width + "px"; + } + } + + if (column.component._column.parent) { + _this60.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + } + }); + + return rowEl; +}; + +Export.prototype.genereateGroupElement = function (row, setup, styles) { + + var rowEl = document.createElement("tr"), + cellEl = document.createElement("td"), + group = row.columns[0]; + + rowEl.classList.add("tabulator-print-table-row"); + + if (setup.groupHeader && setup.groupHeader[row.indent]) { + group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } else { + if (setup.groupHeader === false) { + group.value = group.value; + } else { + group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + + cellEl.colSpan = group.width; + cellEl.innerHTML = group.value; + + rowEl.classList.add("tabulator-print-table-group"); + rowEl.classList.add("tabulator-group-level-" + row.indent); + + if (group.component.isVisible()) { + rowEl.classList.add("tabulator-group-visible"); + } + + this.mapElementStyles(styles.firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + this.mapElementStyles(styles.firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + rowEl.appendChild(cellEl); + + return rowEl; +}; + +Export.prototype.genereateCalcElement = function (row, setup, styles) { + var rowEl = this.genereateRowElement(row, setup, styles); + + rowEl.classList.add("tabulator-print-table-calcs"); + this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + return rowEl; +}; + +Export.prototype.genereateRowElement = function (row, setup, styles) { + var _this61 = this; + + var rowEl = document.createElement("tr"); + + rowEl.classList.add("tabulator-print-table-row"); + + row.columns.forEach(function (col) { + + if (col) { + var cellEl = document.createElement("td"), + column = col.component._column, + value = col.value; + + var cellWrapper = { + modules: {}, + getValue: function getValue() { + return value; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return cellEl; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getData: function getData() { + return row.component.getData(); + }, + getRow: function getRow() { + return row.component; + }, + getComponent: function getComponent() { + return cellWrapper; + }, + column: column + }; + + var classNames = column.definition.cssClass ? column.definition.cssClass.split(" ") : []; + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + if (_this61.table.modExists("format") && _this61.config.formatCells !== false) { + value = _this61.table.modules.format.formatExportValue(cellWrapper, _this61.colVisProp); + } else { + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + } + + if (value instanceof Node) { + cellEl.appendChild(value); + } else { + cellEl.innerHTML = value; + } + + if (styles.firstCell) { + _this61.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + + if (column.definition.align) { + cellEl.style.textAlign = column.definition.align; + } + } + + if (_this61.table.options.dataTree && _this61.config.dataTree !== false) { + if (setup.treeElementField && setup.treeElementField == column.field || !setup.treeElementField && i == 0) { + if (row.component._row.modules.dataTree.controlEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild); + } + if (row.component._row.modules.dataTree.branchEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild); + } + } + } + + rowEl.appendChild(cellEl); + + if (cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback) { + cellWrapper.modules.format.renderedCallback(); + } + + if (setup.rowFormatter && _this61.config.formatCells !== false) { + setup.rowFormatter(row.component); + } + } + }); + + return rowEl; +}; + +Export.prototype.genereateHTMLTable = function (list) { + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTableElement(list)); + + return holder.innerHTML; +}; + +Export.prototype.getHtml = function (visible, style, config, colVisProp) { + var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput"); + + return this.genereateHTMLTable(list); +}; + +Export.prototype.mapElementStyles = function (from, to, props) { + if (this.cloneTableStyle && from && to) { + + var lookup = { + "background-color": "backgroundColor", + "color": "fontColor", + "width": "width", + "font-weight": "fontWeight", + "font-family": "fontFamily", + "font-size": "fontSize", + "text-align": "textAlign", + "border-top": "borderTop", + "border-left": "borderLeft", + "border-right": "borderRight", + "border-bottom": "borderBottom", + "padding-top": "paddingTop", + "padding-left": "paddingLeft", + "padding-right": "paddingRight", + "padding-bottom": "paddingBottom" + }; + + if (window.getComputedStyle) { + var fromStyle = window.getComputedStyle(from); + + props.forEach(function (prop) { + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + } +}; + +Tabulator.prototype.registerModule("export", Export); + +var Filter = function Filter(table) { + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterColumns = []; //hold columns that use header filters + + this.prevHeaderFilterChangeCheck = ""; + this.prevHeaderFilterChangeCheck = "{}"; + + this.changed = false; //has filtering changed since last render +}; + +//initialize column header filter +Filter.prototype.initializeColumn = function (column, value) { + var self = this, + field = column.getField(), + params; + + //handle successfull value change + function success(value) { + var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", + type = "", + filterChangeCheck = "", + filterFunc; + + if (typeof column.modules.filter.prevSuccess === "undefined" || column.modules.filter.prevSuccess !== value) { + + column.modules.filter.prevSuccess = value; + + if (!column.modules.filter.emptyFunc(value)) { + column.modules.filter.value = value; + + switch (_typeof(column.definition.headerFilterFunc)) { + case "string": + if (self.filters[column.definition.headerFilterFunc]) { + type = column.definition.headerFilterFunc; + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return self.filters[column.definition.headerFilterFunc](value, fieldVal, data, params); + }; + } else { + console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); + } + break; + + case "function": + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return column.definition.headerFilterFunc(value, fieldVal, data, params); + }; + + type = filterFunc; + break; + } + + if (!filterFunc) { + switch (filterType) { + case "partial": + filterFunc = function filterFunc(data) { + var colVal = column.getFieldValue(data); + + if (typeof colVal !== 'undefined' && colVal !== null) { + return String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1; + } else { + return false; + } + }; + type = "like"; + break; + + default: + filterFunc = function filterFunc(data) { + return column.getFieldValue(data) == value; + }; + type = "="; + } + } + + self.headerFilters[field] = { value: value, func: filterFunc, type: type, params: params || {} }; + } else { + delete self.headerFilters[field]; + } + + filterChangeCheck = JSON.stringify(self.headerFilters); + + if (self.prevHeaderFilterChangeCheck !== filterChangeCheck) { + self.prevHeaderFilterChangeCheck = filterChangeCheck; + + self.changed = true; + self.table.rowManager.filterRefresh(); + } + } + + return true; + } + + column.modules.filter = { + success: success, + attrType: false, + tagType: false, + emptyFunc: false + }; + + this.generateHeaderFilterElement(column); +}; + +Filter.prototype.generateHeaderFilterElement = function (column, initialValue, reinitialize) { + var _this62 = this; + + var self = this, + success = column.modules.filter.success, + field = column.getField(), + filterElement, + editor, + editorElement, + cellWrapper, + typingTimer, + searchTrigger, + params; + + //handle aborted edit + function cancel() {} + + if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { + column.contentElement.removeChild(column.modules.filter.headerElement.parentNode); + } + + if (field) { + + //set empty value function + column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { + return !value && value !== "0"; + }; + + filterElement = document.createElement("div"); + filterElement.classList.add("tabulator-header-filter"); + + //set column editor + switch (_typeof(column.definition.headerFilter)) { + case "string": + if (self.table.modules.edit.editors[column.definition.headerFilter]) { + editor = self.table.modules.edit.editors[column.definition.headerFilter]; + + if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); + } + break; + + case "function": + editor = column.definition.headerFilter; + break; + + case "boolean": + if (column.modules.edit && column.modules.edit.editor) { + editor = column.modules.edit.editor; + } else { + if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { + editor = self.table.modules.edit.editors[column.definition.formatter]; + + if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + editor = self.table.modules.edit.editors["input"]; + } + } + break; + } + + if (editor) { + + cellWrapper = { + getValue: function getValue() { + return typeof initialValue !== "undefined" ? initialValue : ""; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return filterElement; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getRow: function getRow() { + return { + normalizeHeight: function normalizeHeight() {} + }; + } + }; + + params = column.definition.headerFilterParams || {}; + + params = typeof params === "function" ? params.call(self.table) : params; + + editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); + + if (!editorElement) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); + return; + } + + if (!(editorElement instanceof Node)) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); + return; + } + + //set Placeholder Text + if (field) { + self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { + editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); + }); + } else { + self.table.modules.localize.bind("headerFilters|default", function (value) { + editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); + }); + } + + //focus on element on click + editorElement.addEventListener("click", function (e) { + e.stopPropagation(); + editorElement.focus(); + }); + + editorElement.addEventListener("focus", function (e) { + var left = _this62.table.columnManager.element.scrollLeft; + + if (left !== _this62.table.rowManager.element.scrollLeft) { + _this62.table.rowManager.scrollHorizontal(left); + _this62.table.columnManager.scrollHorizontal(left); + } + }); + + //live update filters as user types + typingTimer = false; + + searchTrigger = function searchTrigger(e) { + if (typingTimer) { + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function () { + success(editorElement.value); + }, self.table.options.headerFilterLiveFilterDelay); + }; + + column.modules.filter.headerElement = editorElement; + column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; + column.modules.filter.tagType = editorElement.tagName.toLowerCase(); + + if (column.definition.headerFilterLiveFilter !== false) { + + if (!(column.definition.headerFilter === 'autocomplete' || column.definition.headerFilter === 'tickCross' || (column.definition.editor === 'autocomplete' || column.definition.editor === 'tickCross') && column.definition.headerFilter === true)) { + editorElement.addEventListener("keyup", searchTrigger); + editorElement.addEventListener("search", searchTrigger); + + //update number filtered columns on change + if (column.modules.filter.attrType == "number") { + editorElement.addEventListener("change", function (e) { + success(editorElement.value); + }); + } + + //change text inputs to search inputs to allow for clearing of field + if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { + editorElement.setAttribute("type", "search"); + // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click + } + } + + //prevent input and select elements from propegating click to column sorters etc + if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { + editorElement.addEventListener("mousedown", function (e) { + e.stopPropagation(); + }); + } + } + + filterElement.appendChild(editorElement); + + column.contentElement.appendChild(filterElement); + + if (!reinitialize) { + self.headerFilterColumns.push(column); + } + } + } else { + console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); + } +}; + +//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.hideHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = 'none'; + } + }); +}; + +//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.showHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = ''; + } + }); +}; + +//programatically set focus of header filter +Filter.prototype.setHeaderFilterFocus = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.focus(); + } else { + console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); + } +}; + +//programmatically get value of header filter +Filter.prototype.getHeaderFilterValue = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + return column.modules.filter.headerElement.value; + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } +}; + +//programatically set value of header filter +Filter.prototype.setHeaderFilterValue = function (column, value) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, value, true); + column.modules.filter.success(value); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } +}; + +Filter.prototype.reloadHeaderFilter = function (column) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, column.modules.filter.value, true); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } +}; + +//check if the filters has changed since last use +Filter.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; +}; + +//set standard filters +Filter.prototype.setFilter = function (field, type, value, params) { + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + self.addFilter(field); +}; + +//add filter to array +Filter.prototype.addFilter = function (field, type, value, params) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + field.forEach(function (filter) { + + filter = self.findFilter(filter); + + if (filter) { + self.filterList.push(filter); + + self.changed = true; + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +Filter.prototype.findFilter = function (filter) { + var self = this, + column; + + if (Array.isArray(filter)) { + return this.findSubFilters(filter); + } + + var filterFunc = false; + + if (typeof filter.field == "function") { + filterFunc = function filterFunc(data) { + return filter.field(data, filter.type || {}); // pass params to custom filter function + }; + } else { + + if (self.filters[filter.type]) { + + column = self.table.columnManager.getColumnByField(filter.field); + + if (column) { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {}); + }; + } else { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, data[filter.field], data, filter.params || {}); + }; + } + } else { + console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); + } + } + + filter.func = filterFunc; + + return filter.func ? filter : false; +}; + +Filter.prototype.findSubFilters = function (filters) { + var self = this, + output = []; + + filters.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + output.push(filter); + } + }); + + return output.length ? output : false; +}; + +//get all filters +Filter.prototype.getFilters = function (all, ajax) { + var output = []; + + if (all) { + output = this.getHeaderFilters(); + } + + if (ajax) { + output.forEach(function (item) { + if (typeof item.type == "function") { + item.type = "function"; + } + }); + } + + output = output.concat(this.filtersToArray(this.filterList, ajax)); + + return output; +}; + +//filter to Object +Filter.prototype.filtersToArray = function (filterList, ajax) { + var _this63 = this; + + var output = []; + + filterList.forEach(function (filter) { + var item; + + if (Array.isArray(filter)) { + output.push(_this63.filtersToArray(filter, ajax)); + } else { + item = { field: filter.field, type: filter.type, value: filter.value }; + + if (ajax) { + if (typeof item.type == "function") { + item.type = "function"; + } + } + + output.push(item); + } + }); + + return output; +}; + +//get all filters +Filter.prototype.getHeaderFilters = function () { + var self = this, + output = []; + + for (var key in this.headerFilters) { + output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); + } + + return output; +}; + +//remove filter from array +Filter.prototype.removeFilter = function (field, type, value) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + var index = -1; + + if (_typeof(filter.field) == "object") { + index = self.filterList.findIndex(function (element) { + return filter === element; + }); + } else { + index = self.filterList.findIndex(function (element) { + return filter.field === element.field && filter.type === element.type && filter.value === element.value; + }); + } + + if (index > -1) { + self.filterList.splice(index, 1); + self.changed = true; + } else { + console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +//clear filters +Filter.prototype.clearFilter = function (all) { + this.filterList = []; + + if (all) { + this.clearHeaderFilter(); + } + + this.changed = true; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } +}; + +//clear header filters +Filter.prototype.clearHeaderFilter = function () { + var self = this; + + this.headerFilters = {}; + self.prevHeaderFilterChangeCheck = "{}"; + + this.headerFilterColumns.forEach(function (column) { + column.modules.filter.value = null; + column.modules.filter.prevSuccess = undefined; + self.reloadHeaderFilter(column); + }); + + this.changed = true; +}; + +//search data and return matching rows +Filter.prototype.search = function (searchType, field, type, value) { + var self = this, + activeRows = [], + filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + filterList.push(filter); + } + }); + + this.table.rowManager.rows.forEach(function (row) { + var match = true; + + filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, row.getData())) { + match = false; + } + }); + + if (match) { + activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); + } + }); + + return activeRows; +}; + +//filter row array +Filter.prototype.filter = function (rowList, filters) { + var self = this, + activeRows = [], + activeRowComponents = []; + + if (self.table.options.dataFiltering) { + self.table.options.dataFiltering.call(self.table, self.getFilters()); + } + + if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { + + rowList.forEach(function (row) { + if (self.filterRow(row)) { + activeRows.push(row); + } + }); + } else { + activeRows = rowList.slice(0); + } + + if (self.table.options.dataFiltered) { + + activeRows.forEach(function (row) { + activeRowComponents.push(row.getComponent()); + }); + + self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); + } + + return activeRows; +}; + +//filter individual row +Filter.prototype.filterRow = function (row, filters) { + var self = this, + match = true, + data = row.getData(); + + self.filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, data)) { + match = false; + } + }); + + for (var field in self.headerFilters) { + if (!self.headerFilters[field].func(data)) { + match = false; + } + } + + return match; +}; + +Filter.prototype.filterRecurse = function (filter, data) { + var self = this, + match = false; + + if (Array.isArray(filter)) { + filter.forEach(function (subFilter) { + if (self.filterRecurse(subFilter, data)) { + match = true; + } + }); + } else { + match = filter.func(data); + } + + return match; +}; + +//list of available filters +Filter.prototype.filters = { + + //equal to + "=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal == filterVal ? true : false; + }, + + //less than + "<": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal < filterVal ? true : false; + }, + + //less than or equal to + "<=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal <= filterVal ? true : false; + }, + + //greater than + ">": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal > filterVal ? true : false; + }, + + //greater than or equal to + ">=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal >= filterVal ? true : false; + }, + + //not equal to + "!=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal != filterVal ? true : false; + }, + + "regex": function regex(filterVal, rowVal, rowData, filterParams) { + + if (typeof filterVal == "string") { + filterVal = new RegExp(filterVal); + } + + return filterVal.test(rowVal); + }, + + //contains the string + "like": function like(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1; + } else { + return false; + } + } + }, + + //contains the keywords + "keywords": function keywords(filterVal, rowVal, rowData, filterParams) { + var keywords = filterVal.toLowerCase().split(typeof filterParams.separator === "undefined" ? " " : filterParams.separator), + value = String(rowVal === null || typeof rowVal === "undefined" ? "" : rowVal).toLowerCase(), + matches = []; + + keywords.forEach(function (keyword) { + if (value.includes(keyword)) { + matches.push(true); + } + }); + + return filterParams.matchAll ? matches.length === keywords.length : !!matches.length; + }, + + //starts with the string + "starts": function starts(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //ends with the string + "ends": function ends(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //in array + "in": function _in(filterVal, rowVal, rowData, filterParams) { + if (Array.isArray(filterVal)) { + return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; + } else { + console.warn("Filter Error - filter value is not an array:", filterVal); + return false; + } + } +}; + +Tabulator.prototype.registerModule("filter", Filter); + +var Format = function Format(table) { + this.table = table; //hold Tabulator object +}; + +//initialize column formatter +Format.prototype.initializeColumn = function (column) { + column.modules.format = this.lookupFormatter(column, ""); + + if (typeof column.definition.formatterPrint !== "undefined") { + column.modules.format.print = this.lookupFormatter(column, "Print"); + } + + if (typeof column.definition.formatterClipboard !== "undefined") { + column.modules.format.clipboard = this.lookupFormatter(column, "Clipboard"); + } + + if (typeof column.definition.formatterHtmlOutput !== "undefined") { + column.modules.format.htmlOutput = this.lookupFormatter(column, "HtmlOutput"); + } +}; + +Format.prototype.lookupFormatter = function (column, type) { + var config = { params: column.definition["formatter" + type + "Params"] || {} }, + formatter = column.definition["formatter" + type]; + + //set column formatter + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + case "string": + + if (formatter === "tick") { + formatter = "tickCross"; + + if (typeof config.params.crossElement == "undefined") { + config.params.crossElement = false; + } + + console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false"); + } + + if (this.formatters[formatter]) { + config.formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + config.formatter = this.formatters.plaintext; + } + break; + + case "function": + config.formatter = formatter; + break; + + default: + config.formatter = this.formatters.plaintext; + break; + } + + return config; +}; + +Format.prototype.cellRendered = function (cell) { + if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { + cell.modules.format.renderedCallback(); + cell.modules.format.rendered = true; + } +}; + +//return a formatted value for a cell +Format.prototype.formatValue = function (cell) { + var component = cell.getComponent(), + params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; + + function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); +}; + +Format.prototype.formatExportValue = function (cell, type) { + var formatter = cell.column.modules.format[type], + params; + + if (formatter) { + var onRendered = function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + }; + + params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; + + return formatter.formatter.call(this, cell.getComponent(), params, onRendered); + } else { + return this.formatValue(cell); + } +}; + +Format.prototype.sanitizeHTML = function (value) { + if (value) { + var entityMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + '`': '`', + '=': '=' + }; + + return String(value).replace(/[&<>"'`=\/]/g, function (s) { + return entityMap[s]; + }); + } else { + return value; + } +}; + +Format.prototype.emptyToSpace = function (value) { + return value === null || typeof value === "undefined" || value === "" ? " " : value; +}; + +//get formatter for cell +Format.prototype.getFormatter = function (formatter) { + var formatter; + + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + case "string": + if (this.formatters[formatter]) { + formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + formatter = this.formatters.plaintext; + } + break; + + case "function": + formatter = formatter; + break; + + default: + formatter = this.formatters.plaintext; + break; + } + + return formatter; +}; + +//default data formatters +Format.prototype.formatters = { + //plain text value + plaintext: function plaintext(cell, formatterParams, onRendered) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + html: function html(cell, formatterParams, onRendered) { + return cell.getValue(); + }, + + //multiline text area + textarea: function textarea(cell, formatterParams, onRendered) { + cell.getElement().style.whiteSpace = "pre-wrap"; + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + money: function money(cell, formatterParams, onRendered) { + var floatVal = parseFloat(cell.getValue()), + number, + integer, + decimal, + rgx; + + var decimalSym = formatterParams.decimal || "."; + var thousandSym = formatterParams.thousand || ","; + var symbol = formatterParams.symbol || ""; + var after = !!formatterParams.symbolAfter; + var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; + + if (isNaN(floatVal)) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + } + + number = precision !== false ? floatVal.toFixed(precision) : floatVal; + number = String(number).split("."); + + integer = number[0]; + decimal = number.length > 1 ? decimalSym + number[1] : ""; + + rgx = /(\d+)(\d{3})/; + + while (rgx.test(integer)) { + integer = integer.replace(rgx, "$1" + thousandSym + "$2"); + } + + return after ? integer + decimal + symbol : symbol + integer + decimal; + }, + + //clickable anchor tag + link: function link(cell, formatterParams, onRendered) { + var value = cell.getValue(), + urlPrefix = formatterParams.urlPrefix || "", + download = formatterParams.download, + label = value, + el = document.createElement("a"), + data; + + if (formatterParams.labelField) { + data = cell.getData(); + label = data[formatterParams.labelField]; + } + + if (formatterParams.label) { + switch (_typeof(formatterParams.label)) { + case "string": + label = formatterParams.label; + break; + + case "function": + label = formatterParams.label(cell); + break; + } + } + + if (label) { + if (formatterParams.urlField) { + data = cell.getData(); + value = data[formatterParams.urlField]; + } + + if (formatterParams.url) { + switch (_typeof(formatterParams.url)) { + case "string": + value = formatterParams.url; + break; + + case "function": + value = formatterParams.url(cell); + break; + } + } + + el.setAttribute("href", urlPrefix + value); + + if (formatterParams.target) { + el.setAttribute("target", formatterParams.target); + } + + if (formatterParams.download) { + + if (typeof download == "function") { + download = download(cell); + } else { + download = download === true ? "" : download; + } + + el.setAttribute("download", download); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + } else { + return " "; + } + }, + + //image element + image: function image(cell, formatterParams, onRendered) { + var el = document.createElement("img"), + src = cell.getValue(); + + if (formatterParams.urlPrefix) { + src = formatterParams.urlPrefix + cell.getValue(); + } + + if (formatterParams.urlSuffix) { + src = src + formatterParams.urlSuffix; + } + + el.setAttribute("src", src); + + switch (_typeof(formatterParams.height)) { + case "number": + el.style.height = formatterParams.height + "px"; + break; + + case "string": + el.style.height = formatterParams.height; + break; + } + + switch (_typeof(formatterParams.width)) { + case "number": + el.style.width = formatterParams.width + "px"; + break; + + case "string": + el.style.width = formatterParams.width; + break; + } + + el.addEventListener("load", function () { + cell.getRow().normalizeHeight(); + }); + + return el; + }, + + //tick or cross + tickCross: function tickCross(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + empty = formatterParams.allowEmpty, + truthy = formatterParams.allowTruthy, + tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', + cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; + + if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { + element.setAttribute("aria-checked", true); + return tick || ""; + } else { + if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { + element.setAttribute("aria-checked", "mixed"); + return ""; + } else { + element.setAttribute("aria-checked", false); + return cross || ""; + } + } + }, + + datetime: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + return formatterParams.timezone ? newDatetime.tz(formatterParams.timezone).format(outputFormat) : newDatetime.format(outputFormat); + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + datetimediff: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; + var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; + var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; + var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + if (humanize) { + return moment.duration(newDatetime.diff(date)).humanize(suffix); + } else { + return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); + } + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + //select + lookup: function lookup(cell, formatterParams, onRendered) { + var value = cell.getValue(); + + if (typeof formatterParams[value] === "undefined") { + console.warn('Missing display value for ' + value); + return value; + } + + return formatterParams[value]; + }, + + //star rating + star: function star(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, + stars = document.createElement("span"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), + starActive = '', + starInactive = ''; + + //style stars holder + stars.style.verticalAlign = "middle"; + + //style star + star.setAttribute("width", "14"); + star.setAttribute("height", "14"); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + value = value && !isNaN(value) ? parseInt(value) : 0; + + value = Math.max(0, Math.min(value, maxStars)); + + for (var i = 1; i <= maxStars; i++) { + var nextStar = star.cloneNode(true); + nextStar.innerHTML = i <= value ? starActive : starInactive; + + stars.appendChild(nextStar); + } + + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + element.setAttribute("aria-label", value); + + return stars; + }, + + traffic: function traffic(cell, formatterParams, onRendered) { + var value = this.sanitizeHTML(cell.getValue()) || 0, + el = document.createElement("span"), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + colors = formatterParams && typeof formatterParams.color !== "undefined" ? formatterParams.color : ["red", "orange", "green"], + color = "#666666", + percent, + percentValue; + + if (isNaN(value) || typeof cell.getValue() === "undefined") { + return; + } + + el.classList.add("tabulator-traffic-light"); + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set color + switch (typeof colors === 'undefined' ? 'undefined' : _typeof(colors)) { + case "string": + color = colors; + break; + case "function": + color = colors(value); + break; + case "object": + if (Array.isArray(colors)) { + var unit = 100 / colors.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, colors.length - 1); + index = Math.max(index, 0); + color = colors[index]; + break; + } + } + + el.style.backgroundColor = color; + + return el; + }, + + //progress bar + progress: function progress(cell, formatterParams, onRendered) { + //progress bar + var value = this.sanitizeHTML(cell.getValue()) || 0, + element = cell.getElement(), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", + percent, + percentValue, + color, + legend, + legendColor, + top, + left, + right, + bottom; + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set bar color + switch (_typeof(formatterParams.color)) { + case "string": + color = formatterParams.color; + break; + case "function": + color = formatterParams.color(value); + break; + case "object": + if (Array.isArray(formatterParams.color)) { + var unit = 100 / formatterParams.color.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.color.length - 1); + index = Math.max(index, 0); + color = formatterParams.color[index]; + break; + } + default: + color = "#2DC214"; + } + + //generate legend + switch (_typeof(formatterParams.legend)) { + case "string": + legend = formatterParams.legend; + break; + case "function": + legend = formatterParams.legend(value); + break; + case "boolean": + legend = value; + break; + default: + legend = false; + } + + //set legend color + switch (_typeof(formatterParams.legendColor)) { + case "string": + legendColor = formatterParams.legendColor; + break; + case "function": + legendColor = formatterParams.legendColor(value); + break; + case "object": + if (Array.isArray(formatterParams.legendColor)) { + var unit = 100 / formatterParams.legendColor.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.legendColor.length - 1); + index = Math.max(index, 0); + legendColor = formatterParams.legendColor[index]; + } + break; + default: + legendColor = "#000"; + } + + element.style.minWidth = "30px"; + element.style.position = "relative"; + + element.setAttribute("aria-label", percentValue); + + var barEl = document.createElement("div"); + barEl.style.display = "inline-block"; + barEl.style.position = "relative"; + barEl.style.width = percentValue + "%"; + barEl.style.backgroundColor = color; + barEl.style.height = "100%"; + + barEl.setAttribute('data-max', max); + barEl.setAttribute('data-min', min); + + if (legend) { + var legendEl = document.createElement("div"); + legendEl.style.position = "absolute"; + legendEl.style.top = "4px"; + legendEl.style.left = 0; + legendEl.style.textAlign = legendAlign; + legendEl.style.width = "100%"; + legendEl.style.color = legendColor; + legendEl.innerHTML = legend; + } + + onRendered(function () { + + //handle custom element needed if formatter is to be included in printed/downloaded output + if (!(cell instanceof CellComponent)) { + var holderEl = document.createElement("div"); + holderEl.style.position = "absolute"; + holderEl.style.top = "4px"; + holderEl.style.bottom = "4px"; + holderEl.style.left = "4px"; + holderEl.style.right = "4px"; + + element.appendChild(holderEl); + + element = holderEl; + } + + element.appendChild(barEl); + + if (legend) { + element.appendChild(legendEl); + } + }); + + return ""; + }, + + //background color + color: function color(cell, formatterParams, onRendered) { + cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); + return ""; + }, + + //tick icon + buttonTick: function buttonTick(cell, formatterParams, onRendered) { + return ''; + }, + + //cross icon + buttonCross: function buttonCross(cell, formatterParams, onRendered) { + return ''; + }, + + //current row number + rownum: function rownum(cell, formatterParams, onRendered) { + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + handle: function handle(cell, formatterParams, onRendered) { + cell.getElement().classList.add("tabulator-row-handle"); + return "
"; + }, + + responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { + var self = this, + open = false, + el = document.createElement("div"), + config = cell.getRow()._row.modules.responsiveLayout; + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + function toggleList(isOpen) { + var collapseEl = config.element; + + config.open = isOpen; + + if (collapseEl) { + + if (config.open) { + el.classList.add("open"); + collapseEl.style.display = ''; + } else { + el.classList.remove("open"); + collapseEl.style.display = 'none'; + } + } + } + + el.addEventListener("click", function (e) { + e.stopImmediatePropagation(); + toggleList(!config.open); + }); + + toggleList(config.open); + + return el; + }, + + rowSelection: function rowSelection(cell, formatterParams, onRendered) { + var _this64 = this; + + var checkbox = document.createElement("input"); + + checkbox.type = 'checkbox'; + + if (this.table.modExists("selectRow", true)) { + + checkbox.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + if (typeof cell.getRow == 'function') { + var row = cell.getRow(); + + if (row instanceof RowComponent) { + + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected && row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + } else { + checkbox = ""; + } + } else { + checkbox.addEventListener("change", function (e) { + if (_this64.table.modules.selectRow.selectedRows.length) { + _this64.table.deselectRow(); + } else { + _this64.table.selectRow(formatterParams.rowRange); + } + }); + + this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); + } + } + return checkbox; + } +}; + +Tabulator.prototype.registerModule("format", Format); + +var FrozenColumns = function FrozenColumns(table) { + this.table = table; //hold Tabulator object + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightPadding = 0; + this.initializationMode = "left"; + this.active = false; + this.scrollEndTimer = false; +}; + +//reset initial state +FrozenColumns.prototype.reset = function () { + this.initializationMode = "left"; + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightMargin = 0; + this.active = false; + + this.table.columnManager.headersElement.style.marginLeft = 0; + this.table.columnManager.element.style.paddingRight = 0; +}; + +//initialize specific column +FrozenColumns.prototype.initializeColumn = function (column) { + var config = { margin: 0, edge: false }; + + if (!column.isGroup) { + + if (this.frozenCheck(column)) { + + config.position = this.initializationMode; + + if (this.initializationMode == "left") { + this.leftColumns.push(column); + } else { + this.rightColumns.unshift(column); + } + + this.active = true; + + column.modules.frozen = config; + } else { + this.initializationMode = "right"; + } + } +}; + +FrozenColumns.prototype.frozenCheck = function (column) { + var frozen = false; + + if (column.parent.isGroup && column.definition.frozen) { + console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"); + } + + if (column.parent.isGroup) { + return this.frozenCheck(column.parent); + } else { + return column.definition.frozen; + } + + return frozen; +}; + +//quick layout to smooth horizontal scrolling +FrozenColumns.prototype.scrollHorizontal = function () { + var _this65 = this; + + var rows; + + if (this.active) { + clearTimeout(this.scrollEndTimer); + + //layout all rows after scroll is complete + this.scrollEndTimer = setTimeout(function () { + _this65.layout(); + }, 100); + + rows = this.table.rowManager.getVisibleRows(); + + this.calcMargins(); + + this.layoutColumnPosition(); + + this.layoutCalcRows(); + + rows.forEach(function (row) { + if (row.type === "row") { + _this65.layoutRow(row); + } + }); + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } +}; + +//calculate margins for rows +FrozenColumns.prototype.calcMargins = function () { + this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; + this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; + + this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; + this.table.columnManager.element.style.paddingRight = this.rightMargin; + + //calculate right frozen columns + this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft; +}; + +//layout calculation rows +FrozenColumns.prototype.layoutCalcRows = function () { + if (this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow) { + this.layoutRow(this.table.modules.columnCalcs.topRow); + } + if (this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow) { + this.layoutRow(this.table.modules.columnCalcs.botRow); + } + } +}; + +//calculate column positions and layout headers +FrozenColumns.prototype.layoutColumnPosition = function (allCells) { + var _this66 = this; + + var leftParents = []; + + this.leftColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this66._calcSpace(_this66.leftColumns, i) + _this66.table.columnManager.scrollLeft + "px"; + + if (i == _this66.leftColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + var parentEl = _this66.getColGroupParentElement(column); + if (!leftParents.includes(parentEl)) { + _this66.layoutElement(parentEl, column); + leftParents.push(parentEl); + } + + if (column.modules.frozen.edge) { + parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } else { + _this66.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this66.layoutElement(cell.getElement(true), column); + }); + } + }); + + this.rightColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this66.rightPadding - _this66._calcSpace(_this66.rightColumns, i + 1) + "px"; + + if (i == _this66.rightColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + _this66.layoutElement(_this66.getColGroupParentElement(column), column); + } else { + _this66.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this66.layoutElement(cell.getElement(true), column); + }); + } + }); +}; + +FrozenColumns.prototype.getColGroupParentElement = function (column) { + return column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement(); +}; + +//layout columns appropropriatly +FrozenColumns.prototype.layout = function () { + var self = this, + rightMargin = 0; + + if (self.active) { + + //calculate row padding + this.calcMargins(); + + // self.table.rowManager.activeRows.forEach(function(row){ + // self.layoutRow(row); + // }); + + // if(self.table.options.dataTree){ + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row") { + self.layoutRow(row); + } + }); + // } + + this.layoutCalcRows(); + + //calculate left columns + this.layoutColumnPosition(true); + + // if(tableHolder.scrollHeight > tableHolder.clientHeight){ + // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; + // } + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } +}; + +FrozenColumns.prototype.layoutRow = function (row) { + var _this67 = this; + + var rowEl = row.getElement(); + + rowEl.style.paddingLeft = this.leftMargin; + // rowEl.style.paddingRight = this.rightMargin + "px"; + + this.leftColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this67.layoutElement(cell.getElement(true), column); + } + }); + + this.rightColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this67.layoutElement(cell.getElement(true), column); + } + }); +}; + +FrozenColumns.prototype.layoutElement = function (element, column) { + + if (column.modules.frozen) { + element.style.position = "absolute"; + element.style.left = column.modules.frozen.margin; + + element.classList.add("tabulator-frozen"); + + if (column.modules.frozen.edge) { + element.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } +}; + +FrozenColumns.prototype._calcSpace = function (columns, index) { + var width = 0; + + for (var _i12 = 0; _i12 < index; _i12++) { + if (columns[_i12].visible) { + width += columns[_i12].getWidth(); + } + } + + return width; +}; + +Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); +var FrozenRows = function FrozenRows(table) { + this.table = table; //hold Tabulator object + this.topElement = document.createElement("div"); + this.rows = []; + this.displayIndex = 0; //index in display pipeline +}; + +FrozenRows.prototype.initialize = function () { + this.rows = []; + + this.topElement.classList.add("tabulator-frozen-rows-holder"); + + // this.table.columnManager.element.append(this.topElement); + this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); +}; + +FrozenRows.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +FrozenRows.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +FrozenRows.prototype.isFrozen = function () { + return !!this.rows.length; +}; + +//filter frozen rows out of display data +FrozenRows.prototype.getRows = function (rows) { + var self = this, + frozen = [], + output = rows.slice(0); + + this.rows.forEach(function (row) { + var index = output.indexOf(row); + + if (index > -1) { + output.splice(index, 1); + } + }); + + return output; +}; + +FrozenRows.prototype.freezeRow = function (row) { + if (!row.modules.frozen) { + row.modules.frozen = true; + this.topElement.appendChild(row.getElement()); + row.initialize(); + row.normalizeHeight(); + this.table.rowManager.adjustTableSize(); + + this.rows.push(row); + + this.table.rowManager.refreshActiveData("display"); + + this.styleRows(); + } else { + console.warn("Freeze Error - Row is already frozen"); + } +}; + +FrozenRows.prototype.unfreezeRow = function (row) { + var index = this.rows.indexOf(row); + + if (row.modules.frozen) { + + row.modules.frozen = false; + + this.detachRow(row); + + this.table.rowManager.adjustTableSize(); + + this.table.rowManager.refreshActiveData("display"); + + if (this.rows.length) { + this.styleRows(); + } + } else { + console.warn("Freeze Error - Row is already unfrozen"); + } +}; + +FrozenRows.prototype.detachRow = function (row) { + var index = this.rows.indexOf(row); + + if (index > -1) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.rows.splice(index, 1); + } +}; + +FrozenRows.prototype.styleRows = function (row) { + var self = this; + + this.rows.forEach(function (row, i) { + self.table.rowManager.styleRow(row, i); + }); +}; + +Tabulator.prototype.registerModule("frozenRows", FrozenRows); + +//public group object +var GroupComponent = function GroupComponent(group) { + this._group = group; + this.type = "GroupComponent"; +}; + +GroupComponent.prototype.getKey = function () { + return this._group.key; +}; + +GroupComponent.prototype.getField = function () { + return this._group.field; +}; + +GroupComponent.prototype.getElement = function () { + return this._group.element; +}; + +GroupComponent.prototype.getRows = function () { + return this._group.getRows(true); +}; + +GroupComponent.prototype.getSubGroups = function () { + return this._group.getSubGroups(true); +}; + +GroupComponent.prototype.getParentGroup = function () { + return this._group.parent ? this._group.parent.getComponent() : false; +}; + +GroupComponent.prototype.getVisibility = function () { + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + return this._group.visible; +}; + +GroupComponent.prototype.isVisible = function () { + return this._group.visible; +}; + +GroupComponent.prototype.show = function () { + this._group.show(); +}; + +GroupComponent.prototype.hide = function () { + this._group.hide(); +}; + +GroupComponent.prototype.toggle = function () { + this._group.toggleVisibility(); +}; + +GroupComponent.prototype._getSelf = function () { + return this._group; +}; + +GroupComponent.prototype.getTable = function () { + return this._group.groupManager.table; +}; + +////////////////////////////////////////////////// +//////////////// Group Functions ///////////////// +////////////////////////////////////////////////// + +var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { + + this.groupManager = groupManager; + this.parent = parent; + this.key = key; + this.level = level; + this.field = field; + this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; + this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; + this.type = "group"; //type of element + this.old = oldGroup; + this.rows = []; + this.groups = []; + this.groupList = []; + this.generator = generator; + this.elementContents = false; + this.height = 0; + this.outerHeight = 0; + this.initialized = false; + this.calcs = {}; + this.initialized = false; + this.modules = {}; + this.arrowElement = false; + + this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; + + this.component = null; + + this.createElements(); + this.addBindings(); + + this.createValueGroups(); +}; + +Group.prototype.wipe = function () { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + group.wipe(); + }); + } else { + this.element = false; + this.arrowElement = false; + this.elementContents = false; + } +}; + +Group.prototype.createElements = function () { + var arrow = document.createElement("div"); + arrow.classList.add("tabulator-arrow"); + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-row"); + this.element.classList.add("tabulator-group"); + this.element.classList.add("tabulator-group-level-" + this.level); + this.element.setAttribute("role", "rowgroup"); + + this.arrowElement = document.createElement("div"); + this.arrowElement.classList.add("tabulator-group-toggle"); + this.arrowElement.appendChild(arrow); + + //setup movable rows + if (this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists("moveRow")) { + this.groupManager.table.modules.moveRow.initializeGroupHeader(this); + } +}; + +Group.prototype.createValueGroups = function () { + var _this68 = this; + + var level = this.level + 1; + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + this.groupManager.allowedValues[level].forEach(function (value) { + _this68._createGroup(value, level); + }); + } +}; + +Group.prototype.addBindings = function () { + var self = this, + dblTap, + tapHold, + tap, + toggleElement; + + //handle group click events + if (self.groupManager.table.options.groupClick) { + self.element.addEventListener("click", function (e) { + self.groupManager.table.options.groupClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.groupManager.table.options.groupDblClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + self.element.addEventListener("contextmenu", function (e) { + self.groupManager.table.options.groupContext.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { + self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); + } + + if (self.groupManager.table.options.groupTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + self.groupManager.table.options.groupTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.groupManager.table.options.groupDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + self.groupManager.table.options.groupDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (self.groupManager.table.options.groupTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.groupManager.table.options.groupTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } + + if (self.groupManager.table.options.groupToggleElement) { + toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; + + toggleElement.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + self.toggleVisibility(); + }); + } +}; + +Group.prototype._createGroup = function (groupID, level) { + var groupKey = level + "_" + groupID; + var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); + + this.groups[groupKey] = group; + this.groupList.push(group); +}; + +Group.prototype._addRowToGroup = function (row) { + + var level = this.level + 1; + + if (this.hasSubGroups) { + var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), + groupKey = level + "_" + groupID; + + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } + } else { + if (!this.groups[groupKey]) { + this._createGroup(groupID, level); + } + + this.groups[groupKey].addRow(row); + } + } +}; + +Group.prototype._addRow = function (row) { + this.rows.push(row); + row.modules.group = this; +}; + +Group.prototype.insertRow = function (row, to, after) { + var data = this.conformRowData({}); + + row.updateData(data); + + var toIndex = this.rows.indexOf(to); + + if (toIndex > -1) { + if (after) { + this.rows.splice(toIndex + 1, 0, row); + } else { + this.rows.splice(toIndex, 0, row); + } + } else { + if (after) { + this.rows.push(row); + } else { + this.rows.unshift(row); + } + } + + row.modules.group = this; + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + + this.groupManager.updateGroupRows(true); +}; + +Group.prototype.scrollHeader = function (left) { + this.arrowElement.style.marginLeft = left; + + this.groupList.forEach(function (child) { + child.scrollHeader(left); + }); +}; + +Group.prototype.getRowIndex = function (row) {}; + +//update row data to match grouping contraints +Group.prototype.conformRowData = function (data) { + if (this.field) { + data[this.field] = this.key; + } else { + console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); + } + + if (this.parent) { + data = this.parent.conformRowData(data); + } + + return data; +}; + +Group.prototype.removeRow = function (row) { + var index = this.rows.indexOf(row); + var el = row.getElement(); + + if (index > -1) { + this.rows.splice(index, 1); + } + + if (!this.groupManager.table.options.groupValues && !this.rows.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + + this.groupManager.updateGroupRows(true); + } else { + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + } +}; + +Group.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + + if (!this.groupList.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + } + } +}; + +Group.prototype.getHeadersAndRows = function (noCalc) { + var output = []; + + output.push(this); + + this._visSet(); + + if (this.visible) { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows(noCalc)); + }); + } else { + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + + output = output.concat(this.rows); + + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } else { + if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table") { + + if (this.groupManager.table.modExists("columnCalcs")) { + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + } + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } + } + } + + return output; +}; + +Group.prototype.getData = function (visible, transform) { + var self = this, + output = []; + + this._visSet(); + + if (!visible || visible && this.visible) { + this.rows.forEach(function (row) { + output.push(row.getData(transform || "data")); + }); + } + + return output; +}; + +// Group.prototype.getRows = function(){ +// this._visSet(); + +// return this.visible ? this.rows : []; +// }; + +Group.prototype.getRowCount = function () { + var count = 0; + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + count += group.getRowCount(); + }); + } else { + count = this.rows.length; + } + return count; +}; + +Group.prototype.toggleVisibility = function () { + if (this.visible) { + this.hide(); + } else { + this.show(); + } +}; + +Group.prototype.hide = function () { + this.visible = false; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.remove("tabulator-group-visible"); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + row.detachElement(); + }); + }); + } else { + this.rows.forEach(function (row) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); +}; + +Group.prototype.show = function () { + var self = this; + + self.visible = true; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.add("tabulator-group-visible"); + + var prev = self.getElement(); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + }); + } else { + self.rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); +}; + +Group.prototype._visSet = function () { + var data = []; + + if (typeof this.visible == "function") { + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); + } +}; + +Group.prototype.getRowGroup = function (row) { + var match = false; + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + } else { + if (this.rows.find(function (item) { + return item === row; + })) { + match = this; + } + } + + return match; +}; + +Group.prototype.getSubGroups = function (component) { + var output = []; + + this.groupList.forEach(function (child) { + output.push(component ? child.getComponent() : child); + }); + + return output; +}; + +Group.prototype.getRows = function (compoment) { + var output = []; + + this.rows.forEach(function (row) { + output.push(compoment ? row.getComponent() : row); + }); + + return output; +}; + +Group.prototype.generateGroupHeaderContents = function () { + var data = []; + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (typeof this.elementContents === "string") { + this.element.innerHTML = this.elementContents; + } else { + this.element.appendChild(this.elementContents); + } + + this.element.insertBefore(this.arrowElement, this.element.firstChild); +}; + +Group.prototype.getPath = function () { + var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + path.unshift(this.key); + if (this.parent) { + this.parent.getPath(path); + } + return path; +}; +////////////// Standard Row Functions ////////////// + +Group.prototype.getElement = function () { + this.addBindingsd = false; + + this._visSet(); + + if (this.visible) { + this.element.classList.add("tabulator-group-visible"); + } else { + this.element.classList.remove("tabulator-group-visible"); + } + + for (var i = 0; i < this.element.childNodes.length; ++i) { + this.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]); + } + + this.generateGroupHeaderContents(); + + // this.addBindings(); + + return this.element; +}; + +Group.prototype.detachElement = function () { + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } +}; + +//normalize the height of elements in the row +Group.prototype.normalizeHeight = function () { + this.setHeight(this.element.clientHeight); +}; + +Group.prototype.initialize = function (force) { + if (!this.initialized || force) { + this.normalizeHeight(); + this.initialized = true; + } +}; + +Group.prototype.reinitialize = function () { + this.initialized = false; + this.height = 0; + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + this.initialize(true); + } +}; + +Group.prototype.setHeight = function (height) { + if (this.height != height) { + this.height = height; + this.outerHeight = this.element.offsetHeight; + } +}; + +//return rows outer height +Group.prototype.getHeight = function () { + return this.outerHeight; +}; + +Group.prototype.getGroup = function () { + return this; +}; + +Group.prototype.reinitializeHeight = function () {}; +Group.prototype.calcHeight = function () {}; +Group.prototype.setCellHeight = function () {}; +Group.prototype.clearCellHeight = function () {}; + +//////////////// Object Generation ///////////////// +Group.prototype.getComponent = function () { + if (!this.component) { + this.component = new GroupComponent(this); + } + + return this.component; +}; + +////////////////////////////////////////////////// +////////////// Group Row Extension /////////////// +////////////////////////////////////////////////// + +var GroupRows = function GroupRows(table) { + + this.table = table; //hold Tabulator object + + this.groupIDLookups = false; //enable table grouping and set field to group by + this.startOpen = [function () { + return false; + }]; //starting state of group + this.headerGenerator = [function () { + return ""; + }]; + this.groupList = []; //ordered list of groups + this.allowedValues = false; + this.groups = {}; //hold row groups + this.displayIndex = 0; //index in display pipeline +}; + +//initialize group configuration +GroupRows.prototype.initialize = function () { + var self = this, + groupBy = self.table.options.groupBy, + startOpen = self.table.options.groupStartOpen, + groupHeader = self.table.options.groupHeader; + + this.allowedValues = self.table.options.groupValues; + + if (Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length) { + console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"); + } + + self.headerGenerator = [function () { + return ""; + }]; + this.startOpen = [function () { + return false; + }]; //starting state of group + + self.table.modules.localize.bind("groups|item", function (langValue, lang) { + self.headerGenerator[0] = function (value, count, data) { + //header layout function + return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; + }; + }); + + this.groupIDLookups = []; + + if (Array.isArray(groupBy) || groupBy) { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { + this.table.modules.columnCalcs.removeCalcs(); + } + } else { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { + + var cols = this.table.columnManager.getRealColumns(); + + cols.forEach(function (col) { + if (col.definition.topCalc) { + self.table.modules.columnCalcs.initializeTopRow(); + } + + if (col.definition.bottomCalc) { + self.table.modules.columnCalcs.initializeBottomRow(); + } + }); + } + } + + if (!Array.isArray(groupBy)) { + groupBy = [groupBy]; + } + + groupBy.forEach(function (group, i) { + var lookupFunc, column; + + if (typeof group == "function") { + lookupFunc = group; + } else { + column = self.table.columnManager.getColumnByField(group); + + if (column) { + lookupFunc = function lookupFunc(data) { + return column.getFieldValue(data); + }; + } else { + lookupFunc = function lookupFunc(data) { + return data[group]; + }; + } + } + + self.groupIDLookups.push({ + field: typeof group === "function" ? false : group, + func: lookupFunc, + values: self.allowedValues ? self.allowedValues[i] : false + }); + }); + + if (startOpen) { + + if (!Array.isArray(startOpen)) { + startOpen = [startOpen]; + } + + startOpen.forEach(function (level) { + level = typeof level == "function" ? level : function () { + return true; + }; + }); + + self.startOpen = startOpen; + } + + if (groupHeader) { + self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; + } + + this.initialized = true; +}; + +GroupRows.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +GroupRows.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +//return appropriate rows with group headers +GroupRows.prototype.getRows = function (rows) { + if (this.groupIDLookups.length) { + + this.table.options.dataGrouping.call(this.table); + + this.generateGroups(rows); + + if (this.table.options.dataGrouped) { + this.table.options.dataGrouped.call(this.table, this.getGroups(true)); + } + + return this.updateGroupRows(); + } else { + return rows.slice(0); + } +}; + +GroupRows.prototype.getGroups = function (compoment) { + var groupComponents = []; + + this.groupList.forEach(function (group) { + groupComponents.push(compoment ? group.getComponent() : group); + }); + + return groupComponents; +}; + +GroupRows.prototype.getChildGroups = function (group) { + var _this69 = this; + + var groupComponents = []; + + if (!group) { + group = this; + } + + group.groupList.forEach(function (child) { + if (child.groupList.length) { + groupComponents = groupComponents.concat(_this69.getChildGroups(child)); + } else { + groupComponents.push(child); + } + }); + + return groupComponents; +}; + +GroupRows.prototype.wipe = function () { + this.groupList.forEach(function (group) { + group.wipe(); + }); +}; + +GroupRows.prototype.pullGroupListData = function (groupList) { + var self = this; + var groupListData = []; + + groupList.forEach(function (group) { + var groupHeader = {}; + groupHeader.level = 0; + groupHeader.rowCount = 0; + groupHeader.headerContent = ""; + var childData = []; + + if (group.hasSubGroups) { + childData = self.pullGroupListData(group.groupList); + + groupHeader.level = group.level; + groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers + groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); + + groupListData.push(groupHeader); + groupListData = groupListData.concat(childData); + } else { + groupHeader.level = group.level; + groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); + groupHeader.rowCount = group.getRows().length; + + groupListData.push(groupHeader); + + group.getRows().forEach(function (row) { + groupListData.push(row.getData("data")); + }); + } + }); + + return groupListData; +}; + +GroupRows.prototype.getGroupedData = function () { + + return this.pullGroupListData(this.groupList); +}; + +GroupRows.prototype.getRowGroup = function (row) { + var match = false; + + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + + return match; +}; + +GroupRows.prototype.countGroups = function () { + return this.groupList.length; +}; + +GroupRows.prototype.generateGroups = function (rows) { + var self = this, + oldGroups = self.groups; + + self.groups = {}; + self.groupList = []; + + if (this.allowedValues && this.allowedValues[0]) { + this.allowedValues[0].forEach(function (value) { + self.createGroup(value, 0, oldGroups); + }); + + rows.forEach(function (row) { + self.assignRowToExistingGroup(row, oldGroups); + }); + } else { + rows.forEach(function (row) { + self.assignRowToGroup(row, oldGroups); + }); + } +}; + +GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { + var groupKey = level + "_" + groupID, + group; + + oldGroups = oldGroups || []; + + group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); + + this.groups[groupKey] = group; + this.groupList.push(group); +}; + +// GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ +// var groupID = this.groupIDLookups[0].func(row.getData()), +// groupKey = "0_" + groupID; + +// if(!this.groups[groupKey]){ +// this.createGroup(groupID, 0, oldGroups); +// } + +// this.groups[groupKey].addRow(row); +// }; + +GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + groupKey = "0_" + groupID; + + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } +}; + +GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + newGroupNeeded = !this.groups["0_" + groupID]; + + if (newGroupNeeded) { + this.createGroup(groupID, 0, oldGroups); + } + + this.groups["0_" + groupID].addRow(row); + + return !newGroupNeeded; +}; + +GroupRows.prototype.reassignRowToGroup = function (row) { + var oldRowGroup = row.getGroup(), + oldGroupPath = oldRowGroup.getPath(), + newGroupPath = this.getExpectedPath(row), + samePath = true; + // figure out if new group path is the same as old group path + var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { + return element === newGroupPath[index]; + }); + // refresh if they new path and old path aren't the same (aka the row's groupings have changed) + if (!samePath) { + oldRowGroup.removeRow(row); + this.assignRowToGroup(row, self.groups); + this.table.rowManager.refreshActiveData("group", false, true); + } +}; + +GroupRows.prototype.getExpectedPath = function (row) { + var groupPath = [], + rowData = row.getData(); + this.groupIDLookups.forEach(function (groupId) { + groupPath.push(groupId.func(rowData)); + }); + return groupPath; +}; + +GroupRows.prototype.updateGroupRows = function (force) { + var self = this, + output = [], + oldRowCount; + + self.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows()); + }); + + //force update of table display + if (force) { + + var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); + + if (displayIndex !== true) { + this.setDisplayIndex(displayIndex); + } + + self.table.rowManager.refreshActiveData("group", true, true); + } + + return output; +}; + +GroupRows.prototype.scrollHeaders = function (left) { + if (this.table.options.virtualDomHoz) { + left -= this.table.vdomHoz.vDomPadLeft; + } + + left = left + "px"; + + this.groupList.forEach(function (group) { + group.scrollHeader(left); + }); +}; + +GroupRows.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + } +}; + +Tabulator.prototype.registerModule("groupRows", GroupRows); +var History = function History(table) { + this.table = table; //hold Tabulator object + + this.history = []; + this.index = -1; +}; + +History.prototype.clear = function () { + this.history = []; + this.index = -1; +}; + +History.prototype.action = function (type, component, data) { + + this.history = this.history.slice(0, this.index + 1); + + this.history.push({ + type: type, + component: component, + data: data + }); + + this.index++; +}; + +History.prototype.getHistoryUndoSize = function () { + return this.index + 1; +}; + +History.prototype.getHistoryRedoSize = function () { + return this.history.length - (this.index + 1); +}; + +History.prototype.clearComponentHistory = function (component) { + var index = this.history.findIndex(function (item) { + return item.component === component; + }); + + if (index > -1) { + this.history.splice(index, 1); + if (index <= this.index) { + this.index--; + } + + this.clearComponentHistory(component); + } +}; + +History.prototype.undo = function () { + + if (this.index > -1) { + var action = this.history[this.index]; + + this.undoers[action.type].call(this, action); + + this.index--; + + this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Undo Error - No more history to undo"); + return false; + } +}; + +History.prototype.redo = function () { + if (this.history.length - 1 > this.index) { + + this.index++; + + var action = this.history[this.index]; + + this.redoers[action.type].call(this, action); + + this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Redo Error - No more history to redo"); + return false; + } +}; + +History.prototype.undoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function rowAdd(action) { + action.component.deleteActual(); + }, + + rowDelete: function rowDelete(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after); + this.table.rowManager.redraw(); + } +}; + +History.prototype.redoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function rowAdd(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowDelete: function rowDelete(action) { + action.component.deleteActual(); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after); + this.table.rowManager.redraw(); + } +}; + +//rebind rows to new element after deletion +History.prototype._rebindRow = function (oldRow, newRow) { + this.history.forEach(function (action) { + if (action.component instanceof Row) { + if (action.component === oldRow) { + action.component = newRow; + } + } else if (action.component instanceof Cell) { + if (action.component.row === oldRow) { + var field = action.component.column.getField(); + + if (field) { + action.component = newRow.getCell(field); + } + } + } + }); +}; + +Tabulator.prototype.registerModule("history", History); +var HtmlTableImport = function HtmlTableImport(table) { + this.table = table; //hold Tabulator object + this.fieldIndex = []; + this.hasIndex = false; +}; + +HtmlTableImport.prototype.parseTable = function () { + var self = this, + element = self.table.element, + options = self.table.options, + columns = options.columns, + headers = element.getElementsByTagName("th"), + rows = element.getElementsByTagName("tbody")[0], + data = [], + newTable; + + self.hasIndex = false; + + self.table.options.htmlImporting.call(this.table); + + rows = rows ? rows.getElementsByTagName("tr") : []; + + //check for tablator inline options + self._extractOptions(element, options); + + if (headers.length) { + self._extractHeaders(headers, rows); + } else { + self._generateBlankHeaders(headers, rows); + } + + //iterate through table rows and build data set + for (var index = 0; index < rows.length; index++) { + var row = rows[index], + cells = row.getElementsByTagName("td"), + item = {}; + + //create index if the dont exist in table + if (!self.hasIndex) { + item[options.index] = index; + } + + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (typeof this.fieldIndex[i] !== "undefined") { + item[this.fieldIndex[i]] = cell.innerHTML; + } + } + + //add row data to item + data.push(item); + } + + //create new element + var newElement = document.createElement("div"); + + //transfer attributes to new element + var attributes = element.attributes; + + // loop through attributes and apply them on div + + for (var i in attributes) { + if (_typeof(attributes[i]) == "object") { + newElement.setAttribute(attributes[i].name, attributes[i].value); + } + } + + // replace table with div element + element.parentNode.replaceChild(newElement, element); + + options.data = data; + + self.table.options.htmlImported.call(this.table); + + // // newElement.tabulator(options); + + this.table.element = newElement; +}; + +//extract tabulator attribute options +HtmlTableImport.prototype._extractOptions = function (element, options, defaultOptions) { + var attributes = element.attributes; + var optionsArr = defaultOptions ? Object.assign([], defaultOptions) : Object.keys(options); + var optionsList = {}; + + optionsArr.forEach(function (item) { + optionsList[item.toLowerCase()] = item; + }); + + for (var index in attributes) { + var attrib = attributes[index]; + var name; + + if (attrib && (typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + name = attrib.name.replace("tabulator-", ""); + + if (typeof optionsList[name] !== "undefined") { + options[optionsList[name]] = this._attribValue(attrib.value); + } + } + } +}; + +//get value of attribute +HtmlTableImport.prototype._attribValue = function (value) { + if (value === "true") { + return true; + } + + if (value === "false") { + return false; + } + + return value; +}; + +//find column if it has already been defined +HtmlTableImport.prototype._findCol = function (title) { + var match = this.table.options.columns.find(function (column) { + return column.title === title; + }); + + return match || false; +}; + +//extract column from headers +HtmlTableImport.prototype._extractHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + exists = false, + col = this._findCol(header.textContent), + width, + attributes; + + if (col) { + exists = true; + } else { + col = { title: header.textContent.trim() }; + } + + if (!col.field) { + col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); + } + + width = header.getAttribute("width"); + + if (width && !col.width) { + col.width = width; + } + + //check for tablator inline options + attributes = header.attributes; + + // //check for tablator inline options + this._extractOptions(header, col, Column.prototype.defaultOptionList); + + this.fieldIndex[index] = col.field; + + if (col.field == this.table.options.index) { + this.hasIndex = true; + } + + if (!exists) { + this.table.options.columns.push(col); + } + } +}; + +//generate blank headers +HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + col = { title: "", field: "col" + index }; + + this.fieldIndex[index] = col.field; + + var width = header.getAttribute("width"); + + if (width) { + col.width = width; + } + + this.table.options.columns.push(col); + } +}; + +Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); +var Keybindings = function Keybindings(table) { + this.table = table; //hold Tabulator object + this.watchKeys = null; + this.pressedKeys = null; + this.keyupBinding = false; + this.keydownBinding = false; +}; + +Keybindings.prototype.initialize = function () { + var bindings = this.table.options.keybindings, + mergedBindings = {}; + + this.watchKeys = {}; + this.pressedKeys = []; + + if (bindings !== false) { + + for (var key in this.bindings) { + mergedBindings[key] = this.bindings[key]; + } + + if (Object.keys(bindings).length) { + + for (var _key in bindings) { + mergedBindings[_key] = bindings[_key]; + } + } + + this.mapBindings(mergedBindings); + this.bindEvents(); + } +}; + +Keybindings.prototype.mapBindings = function (bindings) { + var _this70 = this; + + var self = this; + + var _loop2 = function _loop2(key) { + + if (_this70.actions[key]) { + + if (bindings[key]) { + + if (_typeof(bindings[key]) !== "object") { + bindings[key] = [bindings[key]]; + } + + bindings[key].forEach(function (binding) { + self.mapBinding(key, binding); + }); + } + } else { + console.warn("Key Binding Error - no such action:", key); + } + }; + + for (var key in bindings) { + _loop2(key); + } +}; + +Keybindings.prototype.mapBinding = function (action, symbolsList) { + var self = this; + + var binding = { + action: this.actions[action], + keys: [], + ctrl: false, + shift: false, + meta: false + }; + + var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); + + symbols.forEach(function (symbol) { + switch (symbol) { + case "ctrl": + binding.ctrl = true; + break; + + case "shift": + binding.shift = true; + break; + + case "meta": + binding.meta = true; + break; + + default: + symbol = parseInt(symbol); + binding.keys.push(symbol); + + if (!self.watchKeys[symbol]) { + self.watchKeys[symbol] = []; + } + + self.watchKeys[symbol].push(binding); + } + }); +}; + +Keybindings.prototype.bindEvents = function () { + var self = this; + + this.keyupBinding = function (e) { + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if (bindings) { + + self.pressedKeys.push(code); + + bindings.forEach(function (binding) { + self.checkBinding(e, binding); + }); + } + }; + + this.keydownBinding = function (e) { + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if (bindings) { + + var index = self.pressedKeys.indexOf(code); + + if (index > -1) { + self.pressedKeys.splice(index, 1); + } + } + }; + + this.table.element.addEventListener("keydown", this.keyupBinding); + + this.table.element.addEventListener("keyup", this.keydownBinding); +}; + +Keybindings.prototype.clearBindings = function () { + if (this.keyupBinding) { + this.table.element.removeEventListener("keydown", this.keyupBinding); + } + + if (this.keydownBinding) { + this.table.element.removeEventListener("keyup", this.keydownBinding); + } +}; + +Keybindings.prototype.checkBinding = function (e, binding) { + var self = this, + match = true; + + if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta) { + binding.keys.forEach(function (key) { + var index = self.pressedKeys.indexOf(key); + + if (index == -1) { + match = false; + } + }); + + if (match) { + binding.action.call(self, e); + } + + return true; + } + + return false; +}; + +//default bindings +Keybindings.prototype.bindings = { + navPrev: "shift + 9", + navNext: 9, + navUp: 38, + navDown: 40, + scrollPageUp: 33, + scrollPageDown: 34, + scrollToStart: 36, + scrollToEnd: 35, + undo: "ctrl + 90", + redo: "ctrl + 89", + copyToClipboard: "ctrl + 67" +}; + +//default actions +Keybindings.prototype.actions = { + keyBlock: function keyBlock(e) { + e.stopPropagation(); + e.preventDefault(); + }, + scrollPageUp: function scrollPageUp(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop - rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos >= 0) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + } + + this.table.element.focus(); + }, + scrollPageDown: function scrollPageDown(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop + rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos <= scrollMax) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + } + + this.table.element.focus(); + }, + scrollToStart: function scrollToStart(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + + this.table.element.focus(); + }, + scrollToEnd: function scrollToEnd(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + + this.table.element.focus(); + }, + navPrev: function navPrev(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().prev(); + } + } + }, + + navNext: function navNext(e) { + var cell = false; + var newRow = this.table.options.tabEndNewRow; + var nav; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + + nav = cell.nav(); + + if (!nav.next()) { + if (newRow) { + + cell.getElement().firstChild.blur(); + + if (newRow === true) { + newRow = this.table.addRow({}); + } else { + if (typeof newRow == "function") { + newRow = this.table.addRow(newRow(cell.row.getComponent())); + } else { + newRow = this.table.addRow(Object.assign({}, newRow)); + } + } + + newRow.then(function () { + setTimeout(function () { + nav.next(); + }); + }); + } + } + } + } + }, + + navLeft: function navLeft(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().left(); + } + } + }, + + navRight: function navRight(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().right(); + } + } + }, + + navUp: function navUp(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().up(); + } + } + }, + + navDown: function navDown(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().down(); + } + } + }, + + undo: function undo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.undo(); + } + } + }, + + redo: function redo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.redo(); + } + } + }, + + copyToClipboard: function copyToClipboard(e) { + if (!this.table.modules.edit.currentCell) { + if (this.table.modExists("clipboard", true)) { + this.table.modules.clipboard.copy(false, true); + } + } + } +}; + +Tabulator.prototype.registerModule("keybindings", Keybindings); +var Menu = function Menu(table) { + this.table = table; //hold Tabulator object + this.menuElements = []; + this.blurEvent = this.hideMenu.bind(this); + this.escEvent = this.escMenu.bind(this); + this.nestedMenuBlock = false; + this.positionReversedX = false; +}; + +Menu.prototype.initializeColumnHeader = function (column) { + var _this71 = this; + + var headerMenuEl; + + if (column.definition.headerContextMenu) { + column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); + this.tapHold(column, column.definition.headerContextMenu); + } + + // if(column.definition.headerClickMenu){ + // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); + // } + + if (column.definition.headerMenu) { + + headerMenuEl = document.createElement("span"); + headerMenuEl.classList.add("tabulator-header-menu-button"); + headerMenuEl.innerHTML = "⋮"; + + headerMenuEl.addEventListener("click", function (e) { + e.stopPropagation(); + e.preventDefault(); + + _this71.LoadMenuEvent(column, column.definition.headerMenu, e); + }); + + column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild); + } +}; + +Menu.prototype.LoadMenuEvent = function (component, menu, e) { + menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu; + + // if(component instanceof Cell){ + // e.stopImmediatePropagation(); + // } + + this.loadMenu(e, component, menu); +}; + +Menu.prototype.tapHold = function (component, menu) { + var _this72 = this; + + var element = component.getElement(), + tapHold = null, + loaded = false; + + element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + loaded = false; + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + loaded = true; + + _this72.LoadMenuEvent(component, menu, e); + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + + if (loaded) { + e.preventDefault(); + } + }); +}; + +Menu.prototype.initializeCell = function (cell) { + if (cell.column.definition.contextMenu) { + cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); + this.tapHold(cell, cell.column.definition.contextMenu); + } + + if (cell.column.definition.clickMenu) { + cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); + } +}; + +Menu.prototype.initializeRow = function (row) { + if (this.table.options.rowContextMenu) { + row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); + this.tapHold(row, this.table.options.rowContextMenu); + } + + if (this.table.options.rowClickMenu) { + row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); + } +}; + +Menu.prototype.initializeGroup = function (group) { + if (this.table.options.groupContextMenu) { + group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); + this.tapHold(group, this.table.options.groupContextMenu); + } + + if (this.table.options.groupClickMenu) { + group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); + } +}; + +Menu.prototype.loadMenu = function (e, component, menu, parentEl) { + var _this73 = this; + + var touch = !(e instanceof MouseEvent); + + var menuEl = document.createElement("div"); + menuEl.classList.add("tabulator-menu"); + + if (!touch) { + e.preventDefault(); + } + + //abort if no menu set + if (!menu || !menu.length) { + return; + } + + if (!parentEl) { + if (this.nestedMenuBlock) { + //abort if child menu already open + if (this.isOpen()) { + return; + } + } else { + this.nestedMenuBlock = setTimeout(function () { + _this73.nestedMenuBlock = false; + }, 100); + } + + this.hideMenu(); + this.menuElements = []; + } + + menu.forEach(function (item) { + var itemEl = document.createElement("div"), + label = item.label, + disabled = item.disabled; + + if (item.separator) { + itemEl.classList.add("tabulator-menu-separator"); + } else { + itemEl.classList.add("tabulator-menu-item"); + + if (typeof label == "function") { + label = label.call(_this73.table, component.getComponent()); + } + + if (label instanceof Node) { + itemEl.appendChild(label); + } else { + itemEl.innerHTML = label; + } + + if (typeof disabled == "function") { + disabled = disabled.call(_this73.table, component.getComponent()); + } + + if (disabled) { + itemEl.classList.add("tabulator-menu-item-disabled"); + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + }); + } else { + if (item.menu && item.menu.length) { + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this73.hideOldSubMenus(menuEl); + _this73.loadMenu(e, component, item.menu, itemEl); + }); + } else { + if (item.action) { + itemEl.addEventListener("click", function (e) { + item.action(e, component.getComponent()); + }); + } + } + } + + if (item.menu && item.menu.length) { + itemEl.classList.add("tabulator-menu-item-submenu"); + } + } + + menuEl.appendChild(itemEl); + }); + + menuEl.addEventListener("click", function (e) { + _this73.hideMenu(); + }); + + this.menuElements.push(menuEl); + this.positionMenu(menuEl, parentEl, touch, e); +}; + +Menu.prototype.hideOldSubMenus = function (menuEl) { + var index = this.menuElements.indexOf(menuEl); + + if (index > -1) { + for (var _i13 = this.menuElements.length - 1; _i13 > index; _i13--) { + var el = this.menuElements[_i13]; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.menuElements.pop(); + } + } +}; + +Menu.prototype.positionMenu = function (element, parentEl, touch, e) { + var _this74 = this; + + var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), + x, + y, + parentOffset; + + if (!parentEl) { + x = touch ? e.touches[0].pageX : e.pageX; + y = touch ? e.touches[0].pageY : e.pageY; + + this.positionReversedX = false; + } else { + parentOffset = Tabulator.prototype.helpers.elOffset(parentEl); + x = parentOffset.left + parentEl.offsetWidth; + y = parentOffset.top - 1; + } + + element.style.top = y + "px"; + element.style.left = x + "px"; + + setTimeout(function () { + _this74.table.rowManager.element.addEventListener("scroll", _this74.blurEvent); + document.body.addEventListener("click", _this74.blurEvent); + document.body.addEventListener("contextmenu", _this74.blurEvent); + window.addEventListener("resize", _this74.blurEvent); + document.body.addEventListener("keydown", _this74.escEvent); + }, 100); + + document.body.appendChild(element); + + //move menu to start on bottom edge if it is too close to the edge of the screen + if (y + element.offsetHeight >= docHeight) { + element.style.top = ""; + + if (parentEl) { + element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px"; + } else { + element.style.bottom = docHeight - y + "px"; + } + } + + //move menu to start on right edge if it is too close to the edge of the screen + if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) { + element.style.left = ""; + + if (parentEl) { + element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px"; + } else { + element.style.right = document.documentElement.offsetWidth - x + "px"; + } + + this.positionReversedX = true; + } +}; + +Menu.prototype.isOpen = function () { + return !!this.menuElements.length; +}; + +Menu.prototype.escMenu = function (e) { + if (e.keyCode == 27) { + this.hideMenu(); + } +}; + +Menu.prototype.hideMenu = function () { + this.menuElements.forEach(function (menuEl) { + if (menuEl.parentNode) { + menuEl.parentNode.removeChild(menuEl); + } + }); + + document.body.removeEventListener("keydown", this.escEvent); + document.body.removeEventListener("click", this.blurEvent); + document.body.removeEventListener("contextmenu", this.blurEvent); + window.removeEventListener("resize", this.blurEvent); + this.table.rowManager.element.removeEventListener("scroll", this.blurEvent); +}; + +//default accessors +Menu.prototype.menus = {}; + +Tabulator.prototype.registerModule("menu", Menu); +var MoveColumns = function MoveColumns(table) { + this.table = table; //hold Tabulator object + this.placeholderElement = this.createPlaceholderElement(); + this.hoverElement = false; //floating column header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving column + this.toCol = false; //destination column + this.toColAfter = false; //position of moving column relative to the desitnation column + this.startX = 0; //starting position within header element + this.autoScrollMargin = 40; //auto scroll on edge when within margin + this.autoScrollStep = 5; //auto scroll distance in pixels + this.autoScrollTimeout = false; //auto scroll timeout + this.touchMove = false; + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); +}; + +MoveColumns.prototype.createPlaceholderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + el.classList.add("tabulator-col-placeholder"); + + return el; +}; + +MoveColumns.prototype.initializeColumn = function (column) { + var self = this, + config = {}, + colEl; + + if (!column.modules.frozen) { + + colEl = column.getElement(); + + config.mousemove = function (e) { + if (column.parent === self.moving.parent) { + if ((self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { + if (self.toCol !== column || !self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); + self.moveColumn(column, true); + } + } else { + if (self.toCol !== column || self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl); + self.moveColumn(column, false); + } + } + } + }.bind(self); + + colEl.addEventListener("mousedown", function (e) { + self.touchMove = false; + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, column); + }, self.checkPeriod); + } + }); + + colEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + self.bindTouchEvents(column); + } + + column.modules.moveColumn = config; +}; + +MoveColumns.prototype.bindTouchEvents = function (column) { + var self = this, + colEl = column.getElement(), + startXMove = false, + //shifting center position of the cell + dir = false, + currentCol, + nextCol, + prevCol, + nextColWidth, + prevColWidth, + nextColWidthLast, + prevColWidthLast; + + colEl.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentCol = column; + nextCol = column.nextColumn(); + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = column.prevColumn(); + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + nextColWidthLast = 0; + prevColWidthLast = 0; + startXMove = false; + + self.startMove(e, column); + }, self.checkPeriod); + }, { passive: true }); + + colEl.addEventListener("touchmove", function (e) { + var halfCol, diff, moveToCol; + + if (self.moving) { + self.moveHover(e); + + if (!startXMove) { + startXMove = e.touches[0].pageX; + } + + diff = e.touches[0].pageX - startXMove; + + if (diff > 0) { + if (nextCol && diff - nextColWidthLast > nextColWidth) { + moveToCol = nextCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement().nextSibling); + self.moveColumn(moveToCol, true); + } + } + } else { + if (prevCol && -diff - prevColWidthLast > prevColWidth) { + moveToCol = prevCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement()); + self.moveColumn(moveToCol, false); + } + } + } + + if (moveToCol) { + currentCol = moveToCol; + nextCol = moveToCol.nextColumn(); + nextColWidthLast = nextColWidth; + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = moveToCol.prevColumn(); + prevColWidthLast = prevColWidth; + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + } + } + }, { passive: true }); + + colEl.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + } + }); +}; + +MoveColumns.prototype.startMove = function (e, column) { + var element = column.getElement(); + + this.moving = column; + this.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(element).left; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = column.getWidth() + "px"; + this.placeholderElement.style.height = column.getHeight() + "px"; + + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + this.table.columnManager.getElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.bottom = "0"; + + if (!this.touchMove) { + this._bindMouseMove(); + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + } + + this.moveHover(e); +}; + +MoveColumns.prototype._bindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype._unbindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype.moveColumn = function (column, after) { + var movingCells = this.moving.getCells(); + + this.toCol = column; + this.toColAfter = after; + + if (after) { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + } else { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); + }); + } +}; + +MoveColumns.prototype.endMove = function (e) { + if (e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toCol) { + this.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter); + } + + this.moving = false; + this.toCol = false; + this.toColAfter = false; + + if (!this.touchMove) { + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + } + } +}; + +MoveColumns.prototype.moveHover = function (e) { + var self = this, + columnHolder = self.table.columnManager.getElement(), + scrollLeft = columnHolder.scrollLeft, + xPos = (self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, + scrollPos; + + self.hoverElement.style.left = xPos - self.startX + "px"; + + if (xPos - scrollLeft < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.max(0, scrollLeft - 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } + + if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } +}; + +Tabulator.prototype.registerModule("moveColumn", MoveColumns); + +var MoveRows = function MoveRows(table) { + + this.table = table; //hold Tabulator object + this.placeholderElement = this.createPlaceholderElement(); + this.hoverElement = false; //floating row header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving row + this.toRow = false; //destination row + this.toRowAfter = false; //position of moving row relative to the desitnation row + this.hasHandle = false; //row has handle instead of fully movable row + this.startY = 0; //starting Y position within header element + this.startX = 0; //starting X position within header element + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); + this.tableRowDropEvent = false; + + this.touchMove = false; + + this.connection = false; + this.connectionSelectorsTables = false; + this.connectionSelectorsElements = false; + this.connectionElements = []; + this.connections = []; + + this.connectedTable = false; + this.connectedRow = false; +}; + +MoveRows.prototype.createPlaceholderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + el.classList.add("tabulator-row-placeholder"); + + return el; +}; + +MoveRows.prototype.initialize = function (handle) { + this.connectionSelectorsTables = this.table.options.movableRowsConnectedTables; + this.connectionSelectorsElements = this.table.options.movableRowsConnectedElements; + + this.connection = this.connectionSelectorsTables || this.connectionSelectorsElements; +}; + +MoveRows.prototype.setHandle = function (handle) { + this.hasHandle = handle; +}; + +MoveRows.prototype.initializeGroupHeader = function (group) { + var self = this, + config = {}, + rowEl; + + //inter table drag drop + config.mouseup = function (e) { + self.tableRowDrop(e, row); + }.bind(self); + + //same table drag drop + config.mousemove = function (e) { + if (e.pageY - Tabulator.prototype.helpers.elOffset(group.element).top + self.table.rowManager.element.scrollTop > group.getHeight() / 2) { + if (self.toRow !== group || !self.toRowAfter) { + var rowEl = group.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(group, true); + } + } else { + if (self.toRow !== group || self.toRowAfter) { + var rowEl = group.getElement(); + if (rowEl.previousSibling) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(group, false); + } + } + } + }.bind(self); + + group.modules.moveRow = config; +}; + +MoveRows.prototype.initializeRow = function (row) { + var self = this, + config = {}, + rowEl; + + //inter table drag drop + config.mouseup = function (e) { + self.tableRowDrop(e, row); + }.bind(self); + + //same table drag drop + config.mousemove = function (e) { + var rowEl = row.getElement(); + + if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { + if (self.toRow !== row || !self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + } else { + if (self.toRow !== row || self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(row, false); + } + } + }.bind(self); + + if (!this.hasHandle) { + + rowEl = row.getElement(); + + rowEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, row); + }, self.checkPeriod); + } + }); + + rowEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(row, row.getElement()); + } + + row.modules.moveRow = config; +}; + +MoveRows.prototype.initializeCell = function (cell) { + var self = this, + cellEl = cell.getElement(true); + + cellEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, cell.row); + }, self.checkPeriod); + } + }); + + cellEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(cell.row, cellEl); +}; + +MoveRows.prototype.bindTouchEvents = function (row, element) { + var self = this, + startYMove = false, + //shifting center position of the cell + dir = false, + currentRow, + nextRow, + prevRow, + nextRowHeight, + prevRowHeight, + nextRowHeightLast, + prevRowHeightLast; + + element.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentRow = row; + nextRow = row.nextRow(); + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = row.prevRow(); + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + nextRowHeightLast = 0; + prevRowHeightLast = 0; + startYMove = false; + + self.startMove(e, row); + }, self.checkPeriod); + }, { passive: true }); + this.moving, this.toRow, this.toRowAfter; + element.addEventListener("touchmove", function (e) { + + var halfCol, diff, moveToRow; + + if (self.moving) { + e.preventDefault(); + + self.moveHover(e); + + if (!startYMove) { + startYMove = e.touches[0].pageY; + } + + diff = e.touches[0].pageY - startYMove; + + if (diff > 0) { + if (nextRow && diff - nextRowHeightLast > nextRowHeight) { + moveToRow = nextRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement().nextSibling); + self.moveRow(moveToRow, true); + } + } + } else { + if (prevRow && -diff - prevRowHeightLast > prevRowHeight) { + moveToRow = prevRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement()); + self.moveRow(moveToRow, false); + } + } + } + + if (moveToRow) { + currentRow = moveToRow; + nextRow = moveToRow.nextRow(); + nextRowHeightLast = nextRowHeight; + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = moveToRow.prevRow(); + prevRowHeightLast = prevRowHeight; + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + } + } + }); + + element.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + self.touchMove = false; + } + }); +}; + +MoveRows.prototype._bindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype._unbindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype.startMove = function (e, row) { + var element = row.getElement(); + + this.setStartPosition(e, row); + + this.moving = row; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = row.getWidth() + "px"; + this.placeholderElement.style.height = row.getHeight() + "px"; + + if (!this.connection) { + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + } else { + this.table.element.classList.add("tabulator-movingrow-sending"); + this.connectToTables(row); + } + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + if (this.connection) { + document.body.appendChild(this.hoverElement); + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + this.hoverElement.style.width = this.table.element.clientWidth + "px"; + this.hoverElement.style.whiteSpace = "nowrap"; + this.hoverElement.style.overflow = "hidden"; + this.hoverElement.style.pointerEvents = "none"; + } else { + this.table.rowManager.getTableElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + + this._bindMouseMove(); + } + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + + this.moveHover(e); +}; + +MoveRows.prototype.setStartPosition = function (e, row) { + var pageX = this.touchMove ? e.touches[0].pageX : e.pageX, + pageY = this.touchMove ? e.touches[0].pageY : e.pageY, + element, + position; + + element = row.getElement(); + if (this.connection) { + position = element.getBoundingClientRect(); + + this.startX = position.left - pageX + window.pageXOffset; + this.startY = position.top - pageY + window.pageYOffset; + } else { + this.startY = pageY - element.getBoundingClientRect().top; + } +}; + +MoveRows.prototype.endMove = function (e) { + if (!e || e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + if (!this.connection) { + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + } + + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toRow) { + this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); + } + + this.moving = false; + this.toRow = false; + this.toRowAfter = false; + + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + + if (this.connection) { + this.table.element.classList.remove("tabulator-movingrow-sending"); + this.disconnectFromTables(); + } + } +}; + +MoveRows.prototype.moveRow = function (row, after) { + this.toRow = row; + this.toRowAfter = after; +}; + +MoveRows.prototype.moveHover = function (e) { + if (this.connection) { + this.moveHoverConnections.call(this, e); + } else { + this.moveHoverTable.call(this, e); + } +}; + +MoveRows.prototype.moveHoverTable = function (e) { + var rowHolder = this.table.rowManager.getElement(), + scrollTop = rowHolder.scrollTop, + yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop, + scrollPos; + + this.hoverElement.style.top = yPos - this.startY + "px"; +}; + +MoveRows.prototype.moveHoverConnections = function (e) { + this.hoverElement.style.left = this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX) + "px"; + this.hoverElement.style.top = this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY) + "px"; +}; + +MoveRows.prototype.elementRowDrop = function (e, element, row) { + if (this.table.options.movableRowsElementDrop) { + this.table.options.movableRowsElementDrop(e, element, row ? row.getComponent() : false); + } +}; + +//establish connection with other tables +MoveRows.prototype.connectToTables = function (row) { + var _this75 = this; + + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStart.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "connect", { + row: row + }); + } + + if (this.connectionSelectorsElements) { + + this.connectionElements = []; + + if (!Array.isArray(this.connectionSelectorsElements)) { + this.connectionSelectorsElements = [this.connectionSelectorsElements]; + } + + this.connectionSelectorsElements.forEach(function (query) { + if (typeof query === "string") { + _this75.connectionElements = _this75.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); + } else { + _this75.connectionElements.push(query); + } + }); + + this.connectionElements.forEach(function (element) { + var dropEvent = function dropEvent(e) { + _this75.elementRowDrop(e, element, _this75.moving); + }; + + element.addEventListener("mouseup", dropEvent); + element.tabulatorElementDropEvent = dropEvent; + + element.classList.add("tabulator-movingrow-receiving"); + }); + } +}; + +//disconnect from other tables +MoveRows.prototype.disconnectFromTables = function () { + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStop.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "disconnect"); + } + + this.connectionElements.forEach(function (element) { + element.classList.remove("tabulator-movingrow-receiving"); + element.removeEventListener("mouseup", element.tabulatorElementDropEvent); + delete element.tabulatorElementDropEvent; + }); +}; + +//accept incomming connection +MoveRows.prototype.connect = function (table, row) { + var self = this; + if (!this.connectedTable) { + this.connectedTable = table; + this.connectedRow = row; + + this.table.element.classList.add("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.tableRowDropEvent = self.tableRowDrop.bind(self); + + self.table.element.addEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStart.call(this.table, row, table); + + return true; + } else { + console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); + return false; + } +}; + +//close incomming connection +MoveRows.prototype.disconnect = function (table) { + var self = this; + if (table === this.connectedTable) { + this.connectedTable = false; + this.connectedRow = false; + + this.table.element.classList.remove("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStop.call(this.table, table); + } else { + console.warn("Move Row Error - trying to disconnect from non connected table"); + } +}; + +MoveRows.prototype.dropComplete = function (table, row, success) { + var sender = false; + + if (success) { + + switch (_typeof(this.table.options.movableRowsSender)) { + case "string": + sender = this.senders[this.table.options.movableRowsSender]; + break; + + case "function": + sender = this.table.options.movableRowsSender; + break; + } + + if (sender) { + sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + if (this.table.options.movableRowsSender) { + console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); + } + } + + this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } + + this.endMove(); +}; + +MoveRows.prototype.tableRowDrop = function (e, row) { + var receiver = false, + success = false; + + console.trace("drop"); + + e.stopImmediatePropagation(); + + switch (_typeof(this.table.options.movableRowsReceiver)) { + case "string": + receiver = this.receivers[this.table.options.movableRowsReceiver]; + break; + + case "function": + receiver = this.table.options.movableRowsReceiver; + break; + } + + if (receiver) { + success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); + } + + if (success) { + this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } + + this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { + row: row, + success: success + }); +}; + +MoveRows.prototype.receivers = { + insert: function insert(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData(), undefined, toRow); + return true; + }, + + add: function add(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData()); + return true; + }, + + update: function update(fromRow, toRow, fromTable) { + if (toRow) { + toRow.update(fromRow.getData()); + return true; + } + + return false; + }, + + replace: function replace(fromRow, toRow, fromTable) { + if (toRow) { + this.table.addRow(fromRow.getData(), undefined, toRow); + toRow.delete(); + return true; + } + + return false; + } +}; + +MoveRows.prototype.senders = { + delete: function _delete(fromRow, toRow, toTable) { + fromRow.delete(); + } +}; + +MoveRows.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "connect": + return this.connect(table, data.row); + break; + + case "disconnect": + return this.disconnect(table); + break; + + case "dropcomplete": + return this.dropComplete(table, data.row, data.success); + break; + } +}; + +Tabulator.prototype.registerModule("moveRow", MoveRows); +var Mutator = function Mutator(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types + this.enabled = true; +}; + +//initialize column mutator +Mutator.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + mutator; + + if (column.definition[key]) { + mutator = self.lookupMutator(column.definition[key]); + + if (mutator) { + match = true; + + config[key] = { + mutator: mutator, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.mutate = config; + } +}; + +Mutator.prototype.lookupMutator = function (value) { + var mutator = false; + + //set column mutator + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + if (this.mutators[value]) { + mutator = this.mutators[value]; + } else { + console.warn("Mutator Error - No such mutator found, ignoring: ", value); + } + break; + + case "function": + mutator = value; + break; + } + + return mutator; +}; + +//apply mutator to row +Mutator.prototype.transformRow = function (data, type, updatedData) { + var self = this, + key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + value; + + if (this.enabled) { + + self.table.columnManager.traverse(function (column) { + var mutator, params, component; + + if (column.modules.mutate) { + mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; + + if (mutator) { + value = column.getFieldValue(typeof updatedData !== "undefined" ? updatedData : data); + + if (type == "data" || typeof value !== "undefined") { + component = column.getComponent(); + params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; + column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); + } + } + } + }); + } + + return data; +}; + +//apply mutator to new cell value +Mutator.prototype.transformCell = function (cell, value) { + var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false, + tempData = {}; + + if (mutator) { + tempData = Object.assign(tempData, cell.row.getData()); + cell.column.setFieldValue(tempData, value); + return mutator.mutator(value, tempData, "edit", mutator.params, cell.getComponent()); + } else { + return value; + } +}; + +Mutator.prototype.enable = function () { + this.enabled = true; +}; + +Mutator.prototype.disable = function () { + this.enabled = false; +}; + +//default mutators +Mutator.prototype.mutators = {}; + +Tabulator.prototype.registerModule("mutator", Mutator); +var Page = function Page(table) { + + this.table = table; //hold Tabulator object + + this.mode = "local"; + this.progressiveLoad = false; + + this.size = 0; + this.page = 1; + this.count = 5; + this.max = 1; + + this.displayIndex = 0; //index in display pipeline + + this.initialLoad = true; + + this.pageSizes = []; + + this.dataReceivedNames = {}; + this.dataSentNames = {}; + + this.createElements(); +}; + +Page.prototype.createElements = function () { + + var button; + + this.element = document.createElement("span"); + this.element.classList.add("tabulator-paginator"); + + this.pagesElement = document.createElement("span"); + this.pagesElement.classList.add("tabulator-pages"); + + button = document.createElement("button"); + button.classList.add("tabulator-page"); + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + button.setAttribute("aria-label", ""); + button.setAttribute("title", ""); + + this.firstBut = button.cloneNode(true); + this.firstBut.setAttribute("data-page", "first"); + + this.prevBut = button.cloneNode(true); + this.prevBut.setAttribute("data-page", "prev"); + + this.nextBut = button.cloneNode(true); + this.nextBut.setAttribute("data-page", "next"); + + this.lastBut = button.cloneNode(true); + this.lastBut.setAttribute("data-page", "last"); + + if (this.table.options.paginationSizeSelector) { + this.pageSizeSelect = document.createElement("select"); + this.pageSizeSelect.classList.add("tabulator-page-size"); + } +}; + +Page.prototype.generatePageSizeSelectList = function () { + var _this76 = this; + + var pageSizes = []; + + if (this.pageSizeSelect) { + + if (Array.isArray(this.table.options.paginationSizeSelector)) { + pageSizes = this.table.options.paginationSizeSelector; + this.pageSizes = pageSizes; + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes.unshift(this.size); + } + } else { + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes = []; + + for (var _i14 = 1; _i14 < 5; _i14++) { + pageSizes.push(this.size * _i14); + } + + this.pageSizes = pageSizes; + } else { + pageSizes = this.pageSizes; + } + } + + while (this.pageSizeSelect.firstChild) { + this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild); + }pageSizes.forEach(function (item) { + var itemEl = document.createElement("option"); + itemEl.value = item; + + if (item === true) { + _this76.table.modules.localize.bind("pagination|all", function (value) { + itemEl.innerHTML = value; + }); + } else { + itemEl.innerHTML = item; + } + + _this76.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } +}; + +//setup pageination +Page.prototype.initialize = function (hidden) { + var self = this, + pageSelectLabel, + testElRow, + testElCell; + + //update param names + this.dataSentNames = Object.assign({}, this.paginationDataSentNames); + this.dataSentNames = Object.assign(this.dataSentNames, this.table.options.paginationDataSent); + + this.dataReceivedNames = Object.assign({}, this.paginationDataReceivedNames); + this.dataReceivedNames = Object.assign(this.dataReceivedNames, this.table.options.paginationDataReceived); + + //build pagination element + + //bind localizations + self.table.modules.localize.bind("pagination|first", function (value) { + self.firstBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|first_title", function (value) { + self.firstBut.setAttribute("aria-label", value); + self.firstBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|prev", function (value) { + self.prevBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|prev_title", function (value) { + self.prevBut.setAttribute("aria-label", value); + self.prevBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|next", function (value) { + self.nextBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|next_title", function (value) { + self.nextBut.setAttribute("aria-label", value); + self.nextBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|last", function (value) { + self.lastBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|last_title", function (value) { + self.lastBut.setAttribute("aria-label", value); + self.lastBut.setAttribute("title", value); + }); + + //click bindings + self.firstBut.addEventListener("click", function () { + self.setPage(1).then(function () {}).catch(function () {}); + }); + + self.prevBut.addEventListener("click", function () { + self.previousPage().then(function () {}).catch(function () {}); + }); + + self.nextBut.addEventListener("click", function () { + self.nextPage().then(function () {}).catch(function () {}); + }); + + self.lastBut.addEventListener("click", function () { + self.setPage(self.max).then(function () {}).catch(function () {}); + }); + + if (self.table.options.paginationElement) { + self.element = self.table.options.paginationElement; + } + + if (this.pageSizeSelect) { + pageSelectLabel = document.createElement("label"); + + self.table.modules.localize.bind("pagination|page_size", function (value) { + self.pageSizeSelect.setAttribute("aria-label", value); + self.pageSizeSelect.setAttribute("title", value); + pageSelectLabel.innerHTML = value; + }); + + self.element.appendChild(pageSelectLabel); + self.element.appendChild(self.pageSizeSelect); + + self.pageSizeSelect.addEventListener("change", function (e) { + self.setPageSize(self.pageSizeSelect.value == "true" ? true : self.pageSizeSelect.value); + self.setPage(1).then(function () {}).catch(function () {}); + }); + } + + //append to DOM + self.element.appendChild(self.firstBut); + self.element.appendChild(self.prevBut); + self.element.appendChild(self.pagesElement); + self.element.appendChild(self.nextBut); + self.element.appendChild(self.lastBut); + + if (!self.table.options.paginationElement && !hidden) { + self.table.footerManager.append(self.element, self); + } + + //set default values + self.mode = self.table.options.pagination; + + if (self.table.options.paginationSize) { + self.size = self.table.options.paginationSize; + } else { + testElRow = document.createElement("div"); + testElRow.classList.add("tabulator-row"); + testElRow.style.visibility = hidden; + + testElCell = document.createElement("div"); + testElCell.classList.add("tabulator-cell"); + testElCell.innerHTML = "Page Row Test"; + + testElRow.appendChild(testElCell); + + self.table.rowManager.getTableElement().appendChild(testElRow); + + self.size = Math.floor(self.table.rowManager.getElement().clientHeight / testElRow.offsetHeight); + + self.table.rowManager.getTableElement().removeChild(testElRow); + } + + // self.page = self.table.options.paginationInitialPage || 1; + self.count = self.table.options.paginationButtonCount; + + self.generatePageSizeSelectList(); +}; + +Page.prototype.initializeProgressive = function (mode) { + this.initialize(true); + this.mode = "progressive_" + mode; + this.progressiveLoad = true; +}; + +Page.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; +}; + +Page.prototype.getDisplayIndex = function () { + return this.displayIndex; +}; + +//calculate maximum page from number of rows +Page.prototype.setMaxRows = function (rowCount) { + if (!rowCount) { + this.max = 1; + } else { + this.max = this.size === true ? 1 : Math.ceil(rowCount / this.size); + } + + if (this.page > this.max) { + this.page = this.max; + } +}; + +//reset to first page without triggering action +Page.prototype.reset = function (force, columnsChanged) { + if (this.mode == "local" || force) { + this.page = 1; + } + + if (columnsChanged) { + this.initialLoad = true; + } + + return true; +}; + +//set the maxmum page +Page.prototype.setMaxPage = function (max) { + + max = parseInt(max); + + this.max = max || 1; + + if (this.page > this.max) { + this.page = this.max; + this.trigger(); + } +}; + +//set current page number +Page.prototype.setPage = function (page) { + var _this77 = this; + + var self = this; + + switch (page) { + case "first": + return this.setPage(1); + break; + + case "prev": + return this.previousPage(); + break; + + case "next": + return this.nextPage(); + break; + + case "last": + return this.setPage(this.max); + break; + } + + return new Promise(function (resolve, reject) { + + page = parseInt(page); + + if (page > 0 && page <= _this77.max) { + _this77.page = page; + _this77.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.page) { + self.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Requested page is out of range of 1 - " + _this77.max + ":", page); + reject(); + } + }); +}; + +Page.prototype.setPageToRow = function (row) { + var _this78 = this; + + return new Promise(function (resolve, reject) { + + var rows = _this78.table.rowManager.getDisplayRows(_this78.displayIndex - 1); + var index = rows.indexOf(row); + + if (index > -1) { + var page = _this78.size === true ? 1 : Math.ceil((index + 1) / _this78.size); + + _this78.setPage(page).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Requested row is not visible"); + reject(); + } + }); +}; + +Page.prototype.setPageSize = function (size) { + if (size !== true) { + size = parseInt(size); + } + + if (size > 0) { + this.size = size; + } + + if (this.pageSizeSelect) { + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.page) { + this.table.modules.persistence.save("page"); + } +}; + +//setup the pagination buttons +Page.prototype._setPageButtons = function () { + var self = this; + + var leftSize = Math.floor((this.count - 1) / 2); + var rightSize = Math.ceil((this.count - 1) / 2); + var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); + var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); + + while (self.pagesElement.firstChild) { + self.pagesElement.removeChild(self.pagesElement.firstChild); + }if (self.page == 1) { + self.firstBut.disabled = true; + self.prevBut.disabled = true; + } else { + self.firstBut.disabled = false; + self.prevBut.disabled = false; + } + + if (self.page == self.max) { + self.lastBut.disabled = true; + self.nextBut.disabled = true; + } else { + self.lastBut.disabled = false; + self.nextBut.disabled = false; + } + + for (var _i15 = min; _i15 <= max; _i15++) { + if (_i15 > 0 && _i15 <= self.max) { + self.pagesElement.appendChild(self._generatePageButton(_i15)); + } + } + + this.footerRedraw(); +}; + +Page.prototype._generatePageButton = function (page) { + var self = this, + button = document.createElement("button"); + + button.classList.add("tabulator-page"); + if (page == self.page) { + button.classList.add("active"); + } + + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + + self.table.modules.localize.bind("pagination|page_title", function (value) { + button.setAttribute("aria-label", value + " " + page); + button.setAttribute("title", value + " " + page); + }); + + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function (e) { + self.setPage(page).then(function () {}).catch(function () {}); + }); + + return button; +}; + +//previous page +Page.prototype.previousPage = function () { + var _this79 = this; + + return new Promise(function (resolve, reject) { + if (_this79.page > 1) { + _this79.page--; + _this79.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) { + _this79.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + reject(); + } + }); +}; + +//next page +Page.prototype.nextPage = function () { + var _this80 = this; + + return new Promise(function (resolve, reject) { + if (_this80.page < _this80.max) { + _this80.page++; + _this80.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this80.table.options.persistence && _this80.table.modExists("persistence", true) && _this80.table.modules.persistence.config.page) { + _this80.table.modules.persistence.save("page"); + } + } else { + if (!_this80.progressiveLoad) { + console.warn("Pagination Error - Next page would be greater than maximum page of " + _this80.max + ":", _this80.max + 1); + } + reject(); + } + }); +}; + +//return current page number +Page.prototype.getPage = function () { + return this.page; +}; + +//return max page number +Page.prototype.getPageMax = function () { + return this.max; +}; + +Page.prototype.getPageSize = function (size) { + return this.size; +}; + +Page.prototype.getMode = function () { + return this.mode; +}; + +//return appropriate rows for current page +Page.prototype.getRows = function (data) { + var output, start, end; + + if (this.mode == "local") { + output = []; + + if (this.size === true) { + start = 0; + end = data.length; + } else { + start = this.size * (this.page - 1); + end = start + parseInt(this.size); + } + + this._setPageButtons(); + + for (var _i16 = start; _i16 < end; _i16++) { + if (data[_i16]) { + output.push(data[_i16]); + } + } + + return output; + } else { + + this._setPageButtons(); + + return data.slice(0); + } +}; + +Page.prototype.trigger = function () { + var _this81 = this; + + var left; + + return new Promise(function (resolve, reject) { + + switch (_this81.mode) { + case "local": + left = _this81.table.rowManager.scrollLeft; + + _this81.table.rowManager.refreshActiveData("page"); + _this81.table.rowManager.scrollHorizontal(left); + + _this81.table.options.pageLoaded.call(_this81.table, _this81.getPage()); + resolve(); + break; + + case "remote": + case "progressive_load": + case "progressive_scroll": + _this81.table.modules.ajax.blockActiveRequest(); + _this81._getRemotePage().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", _this81.mode); + reject(); + } + }); +}; + +Page.prototype._getRemotePage = function () { + var _this82 = this; + + var self = this, + oldParams, + pageParams; + + return new Promise(function (resolve, reject) { + + if (!self.table.modExists("ajax", true)) { + reject(); + } + + //record old params and restore after request has been made + oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); + pageParams = self.table.modules.ajax.getParams(); + + //configure request params + pageParams[_this82.dataSentNames.page] = self.page; + + //set page size if defined + if (_this82.size) { + pageParams[_this82.dataSentNames.size] = _this82.size; + } + + //set sort data if defined + if (_this82.table.options.ajaxSorting && _this82.table.modExists("sort")) { + var sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + pageParams[_this82.dataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (_this82.table.options.ajaxFiltering && _this82.table.modExists("filter")) { + var filters = self.table.modules.filter.getFilters(true, true); + pageParams[_this82.dataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(pageParams); + + self.table.modules.ajax.sendRequest(_this82.progressiveLoad).then(function (data) { + self._parseRemoteData(data); + resolve(); + }).catch(function (e) { + reject(); + }); + + self.table.modules.ajax.setParams(oldParams); + }); +}; + +Page.prototype._parseRemoteData = function (data) { + var self = this, + left, + data, + margin; + + if (typeof data[this.dataReceivedNames.last_page] === "undefined") { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property"); + } + + if (data[this.dataReceivedNames.data]) { + this.max = parseInt(data[this.dataReceivedNames.last_page]) || 1; + + if (this.progressiveLoad) { + switch (this.mode) { + case "progressive_load": + + if (this.page == 1) { + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + } else { + this.table.rowManager.addRows(data[this.dataReceivedNames.data]); + } + + if (this.page < this.max) { + setTimeout(function () { + self.nextPage().then(function () {}).catch(function () {}); + }, self.table.options.ajaxProgressiveLoadDelay); + } + break; + + case "progressive_scroll": + data = this.table.rowManager.getData().concat(data[this.dataReceivedNames.data]); + + this.table.rowManager.setData(data, true, this.initialLoad && this.page == 1); + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; + + if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { + self.nextPage().then(function () {}).catch(function () {}); + } + break; + } + } else { + left = this.table.rowManager.scrollLeft; + + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + + this.initialLoad = false; + } else { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property"); + } +}; + +//handle the footer element being redrawn +Page.prototype.footerRedraw = function () { + var footer = this.table.footerManager.element; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } else { + this.pagesElement.style.display = ''; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } + } +}; + +//set the paramter names for pagination requests +Page.prototype.paginationDataSentNames = { + "page": "page", + "size": "size", + "sorters": "sorters", + // "sort_dir":"sort_dir", + "filters": "filters" + // "filter_value":"filter_value", + // "filter_type":"filter_type", +}; + +//set the property names for pagination responses +Page.prototype.paginationDataReceivedNames = { + "current_page": "current_page", + "last_page": "last_page", + "data": "data" +}; + +Tabulator.prototype.registerModule("page", Page); + +var Persistence = function Persistence(table) { + this.table = table; //hold Tabulator object + this.mode = ""; + this.id = ""; + // this.persistProps = ["field", "width", "visible"]; + this.defWatcherBlock = false; + this.config = {}; + this.readFunc = false; + this.writeFunc = false; +}; + +// Test for whether localStorage is available for use. +Persistence.prototype.localStorageTest = function () { + var testKey = "_tabulator_test"; + + try { + window.localStorage.setItem(testKey, testKey); + window.localStorage.removeItem(testKey); + return true; + } catch (e) { + return false; + } +}; + +//setup parameters +Persistence.prototype.initialize = function () { + //determine persistent layout storage type + + var mode = this.table.options.persistenceMode, + id = this.table.options.persistenceID, + retreivedData; + + this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie"; + + if (this.table.options.persistenceReaderFunc) { + if (typeof this.table.options.persistenceReaderFunc === "function") { + this.readFunc = this.table.options.persistenceReaderFunc; + } else { + if (this.readers[this.table.options.persistenceReaderFunc]) { + this.readFunc = this.readers[this.table.options.persistenceReaderFunc]; + } else { + console.warn("Persistence Read Error - invalid reader set", this.table.options.persistenceReaderFunc); + } + } + } else { + if (this.readers[this.mode]) { + this.readFunc = this.readers[this.mode]; + } else { + console.warn("Persistence Read Error - invalid reader set", this.mode); + } + } + + if (this.table.options.persistenceWriterFunc) { + if (typeof this.table.options.persistenceWriterFunc === "function") { + this.writeFunc = this.table.options.persistenceWriterFunc; + } else { + if (this.readers[this.table.options.persistenceWriterFunc]) { + this.writeFunc = this.readers[this.table.options.persistenceWriterFunc]; + } else { + console.warn("Persistence Write Error - invalid reader set", this.table.options.persistenceWriterFunc); + } + } + } else { + if (this.writers[this.mode]) { + this.writeFunc = this.writers[this.mode]; + } else { + console.warn("Persistence Write Error - invalid writer set", this.mode); + } + } + + //set storage tag + this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); + + this.config = { + sort: this.table.options.persistence === true || this.table.options.persistence.sort, + filter: this.table.options.persistence === true || this.table.options.persistence.filter, + group: this.table.options.persistence === true || this.table.options.persistence.group, + page: this.table.options.persistence === true || this.table.options.persistence.page, + columns: this.table.options.persistence === true ? ["title", "width", "visible"] : this.table.options.persistence.columns + }; + + //load pagination data if needed + if (this.config.page) { + retreivedData = this.retreiveData("page"); + + if (retreivedData) { + if (typeof retreivedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) { + this.table.options.paginationSize = retreivedData.paginationSize; + } + + if (typeof retreivedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) { + this.table.options.paginationInitialPage = retreivedData.paginationInitialPage; + } + } + } + + //load group data if needed + if (this.config.group) { + retreivedData = this.retreiveData("group"); + + if (retreivedData) { + if (typeof retreivedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) { + this.table.options.groupBy = retreivedData.groupBy; + } + if (typeof retreivedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) { + this.table.options.groupStartOpen = retreivedData.groupStartOpen; + } + if (typeof retreivedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) { + this.table.options.groupHeader = retreivedData.groupHeader; + } + } + } + + if (this.config.columns) { + this.load("columns", this.table.options.columns); + } +}; + +Persistence.prototype.initializeColumn = function (column) { + var self = this, + def, + keys; + + if (this.config.columns) { + this.defWatcherBlock = true; + + def = column.getDefinition(); + + keys = this.config.columns === true ? Object.keys(def) : this.config.columns; + + keys.forEach(function (key) { + var props = Object.getOwnPropertyDescriptor(def, key); + var value = def[key]; + if (props) { + Object.defineProperty(def, key, { + set: function set(newValue) { + value = newValue; + + if (!self.defWatcherBlock) { + self.save("columns"); + } + + if (props.set) { + props.set(newValue); + } + }, + get: function get() { + if (props.get) { + props.get(); + } + return value; + } + }); + } + }); + + this.defWatcherBlock = false; + } +}; + +//load saved definitions +Persistence.prototype.load = function (type, current) { + var data = this.retreiveData(type); + + if (current) { + data = data ? this.mergeDefinition(current, data) : current; + } + + return data; +}; + +//retreive data from memory +Persistence.prototype.retreiveData = function (type) { + return this.readFunc ? this.readFunc(this.id, type) : false; +}; + +//merge old and new column definitions +Persistence.prototype.mergeDefinition = function (oldCols, newCols) { + var self = this, + output = []; + + // oldCols = oldCols || []; + newCols = newCols || []; + + newCols.forEach(function (column, to) { + + var from = self._findColumn(oldCols, column), + keys; + + if (from) { + + if (self.config.columns === true || self.config.columns == undefined) { + keys = Object.keys(from); + keys.push("width"); + } else { + keys = self.config.columns; + } + + keys.forEach(function (key) { + if (key !== "columns" && typeof column[key] !== "undefined") { + from[key] = column[key]; + } + }); + + if (from.columns) { + from.columns = self.mergeDefinition(from.columns, column.columns); + } + + output.push(from); + } + }); + + oldCols.forEach(function (column, i) { + var from = self._findColumn(newCols, column); + if (!from) { + if (output.length > i) { + output.splice(i, 0, column); + } else { + output.push(column); + } + } + }); + + return output; +}; + +//find matching columns +Persistence.prototype._findColumn = function (columns, subject) { + var type = subject.columns ? "group" : subject.field ? "field" : "object"; + + return columns.find(function (col) { + switch (type) { + case "group": + return col.title === subject.title && col.columns.length === subject.columns.length; + break; + + case "field": + return col.field === subject.field; + break; + + case "object": + return col === subject; + break; + } + }); +}; + +//save data +Persistence.prototype.save = function (type) { + var data = {}; + + switch (type) { + case "columns": + data = this.parseColumns(this.table.columnManager.getColumns()); + break; + + case "filter": + data = this.table.modules.filter.getFilters(); + break; + + case "sort": + data = this.validateSorters(this.table.modules.sort.getSort()); + break; + + case "group": + data = this.getGroupConfig(); + break; + + case "page": + data = this.getPageConfig(); + break; + } + + if (this.writeFunc) { + this.writeFunc(this.id, type, data); + } +}; + +//ensure sorters contain no function data +Persistence.prototype.validateSorters = function (data) { + data.forEach(function (item) { + item.column = item.field; + delete item.field; + }); + + return data; +}; + +Persistence.prototype.getGroupConfig = function () { + var data = {}; + + if (this.config.group) { + if (this.config.group === true || this.config.group.groupBy) { + data.groupBy = this.table.options.groupBy; + } + + if (this.config.group === true || this.config.group.groupStartOpen) { + data.groupStartOpen = this.table.options.groupStartOpen; + } + + if (this.config.group === true || this.config.group.groupHeader) { + data.groupHeader = this.table.options.groupHeader; + } + } + + return data; +}; + +Persistence.prototype.getPageConfig = function () { + var data = {}; + + if (this.config.page) { + if (this.config.page === true || this.config.page.size) { + data.paginationSize = this.table.modules.page.getPageSize(); + } + + if (this.config.page === true || this.config.page.page) { + data.paginationInitialPage = this.table.modules.page.getPage(); + } + } + + return data; +}; + +//parse columns for data to store +Persistence.prototype.parseColumns = function (columns) { + var self = this, + definitions = [], + excludedKeys = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; + + columns.forEach(function (column) { + var defStore = {}, + colDef = column.getDefinition(), + keys; + + if (column.isGroup) { + defStore.title = colDef.title; + defStore.columns = self.parseColumns(column.getColumns()); + } else { + defStore.field = column.getField(); + + if (self.config.columns === true || self.config.columns == undefined) { + keys = Object.keys(colDef); + keys.push("width"); + } else { + keys = self.config.columns; + } + + keys.forEach(function (key) { + + switch (key) { + case "width": + defStore.width = column.getWidth(); + break; + case "visible": + defStore.visible = column.visible; + break; + + default: + if (typeof colDef[key] !== "function" && excludedKeys.indexOf(key) === -1) { + defStore[key] = colDef[key]; + } + } + }); + } + + definitions.push(defStore); + }); + + return definitions; +}; + +// read peristence information from storage +Persistence.prototype.readers = { + local: function local(id, type) { + var data = localStorage.getItem(id + "-" + type); + + return data ? JSON.parse(data) : false; + }, + cookie: function cookie(id, type) { + var cookie = document.cookie, + key = id + "-" + type, + cookiePos = cookie.indexOf(key + "="), + end, + data; + + //if cookie exists, decode and load column data into tabulator + if (cookiePos > -1) { + cookie = cookie.substr(cookiePos); + + end = cookie.indexOf(";"); + + if (end > -1) { + cookie = cookie.substr(0, end); + } + + data = cookie.replace(key + "=", ""); + } + + return data ? JSON.parse(data) : false; + } +}; + +//write persistence information to storage +Persistence.prototype.writers = { + local: function local(id, type, data) { + localStorage.setItem(id + "-" + type, JSON.stringify(data)); + }, + cookie: function cookie(id, type, data) { + var expireDate = new Date(); + + expireDate.setDate(expireDate.getDate() + 10000); + + document.cookie = id + "-" + type + "=" + JSON.stringify(data) + "; expires=" + expireDate.toUTCString(); + } +}; + +Tabulator.prototype.registerModule("persistence", Persistence); + +var Print = function Print(table) { + this.table = table; //hold Tabulator object + this.element = false; + this.manualBlock = false; +}; + +Print.prototype.initialize = function () { + window.addEventListener("beforeprint", this.replaceTable.bind(this)); + window.addEventListener("afterprint", this.cleanup.bind(this)); +}; + +Print.prototype.replaceTable = function () { + if (!this.manualBlock) { + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-table"); + + this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print")); + + this.table.element.style.display = "none"; + + this.table.element.parentNode.insertBefore(this.element, this.table.element); + } +}; + +Print.prototype.cleanup = function () { + document.body.classList.remove("tabulator-print-fullscreen-hide"); + + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + this.table.element.style.display = ""; + } +}; + +Print.prototype.printFullscreen = function (visible, style, config) { + var scrollX = window.scrollX, + scrollY = window.scrollY, + headerEl = document.createElement("div"), + footerEl = document.createElement("div"), + tableEl = this.table.modules.export.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printStyled, visible, "print"), + headerContent, + footerContent; + + this.manualBlock = true; + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-fullscreen"); + + if (this.table.options.printHeader) { + headerEl.classList.add("tabulator-print-header"); + + headerContent = typeof this.table.options.printHeader == "function" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader; + + if (typeof headerContent == "string") { + headerEl.innerHTML = headerContent; + } else { + headerEl.appendChild(headerContent); + } + + this.element.appendChild(headerEl); + } + + this.element.appendChild(tableEl); + + if (this.table.options.printFooter) { + footerEl.classList.add("tabulator-print-footer"); + + footerContent = typeof this.table.options.printFooter == "function" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter; + + if (typeof footerContent == "string") { + footerEl.innerHTML = footerContent; + } else { + footerEl.appendChild(footerContent); + } + + this.element.appendChild(footerEl); + } + + document.body.classList.add("tabulator-print-fullscreen-hide"); + document.body.appendChild(this.element); + + if (this.table.options.printFormatter) { + this.table.options.printFormatter(this.element, tableEl); + } + + window.print(); + + this.cleanup(); + + window.scrollTo(scrollX, scrollY); + + this.manualBlock = false; +}; + +Tabulator.prototype.registerModule("print", Print); +var ReactiveData = function ReactiveData(table) { + this.table = table; //hold Tabulator object + this.data = false; + this.blocked = false; //block reactivity while performing update + this.origFuncs = {}; // hold original data array functions to allow replacement after data is done with + this.currentVersion = 0; +}; + +ReactiveData.prototype.watchData = function (data) { + var self = this, + pushFunc, + version; + + this.currentVersion++; + + version = this.currentVersion; + + self.unwatchData(); + + self.data = data; + + //override array push function + self.origFuncs.push = data.push; + + Object.defineProperty(self.data, "push", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, false); + }); + } + + return self.origFuncs.push.apply(data, arguments); + } + }); + + //override array unshift function + self.origFuncs.unshift = data.unshift; + + Object.defineProperty(self.data, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, true); + }); + } + + return self.origFuncs.unshift.apply(data, arguments); + } + }); + + //override array shift function + self.origFuncs.shift = data.shift; + + Object.defineProperty(self.data, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var row; + + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[0]); + + if (row) { + row.deleteActual(); + } + } + } + + return self.origFuncs.shift.call(data); + } + }); + + //override array pop function + self.origFuncs.pop = data.pop; + + Object.defineProperty(self.data, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var row; + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]); + + if (row) { + row.deleteActual(); + } + } + } + return self.origFuncs.pop.call(data); + } + }); + + //override array splice function + self.origFuncs.splice = data.splice; + + Object.defineProperty(self.data, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments), + start = args[0] < 0 ? data.length + args[0] : args[0], + end = args[1], + newRows = args[2] ? args.slice(2) : false, + startRow; + + if (!self.blocked && version === self.currentVersion) { + + //add new rows + if (newRows) { + startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false; + + if (startRow) { + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, startRow, true); + }); + } else { + newRows = newRows.slice().reverse(); + + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, false, true); + }); + } + } + + //delete removed rows + if (end !== 0) { + var oldRows = data.slice(start, typeof args[1] === "undefined" ? args[1] : start + end); + + oldRows.forEach(function (rowData, i) { + var row = self.table.rowManager.getRowFromDataObject(rowData); + + if (row) { + row.deleteActual(i !== oldRows.length - 1); + } + }); + } + + if (newRows || end !== 0) { + self.table.rowManager.reRenderInPosition(); + } + } + + return self.origFuncs.splice.apply(data, arguments); + } + }); +}; + +ReactiveData.prototype.unwatchData = function () { + if (this.data !== false) { + for (var key in this.origFuncs) { + Object.defineProperty(this.data, key, { + enumerable: true, + configurable: true, + writable: true, + value: this.origFuncs.key + }); + } + } +}; + +ReactiveData.prototype.watchRow = function (row) { + var data = row.getData(); + + this.blocked = true; + + for (var key in data) { + this.watchKey(row, data, key); + } + + if (this.table.options.dataTree) { + this.watchTreeChildren(row); + } + + this.blocked = false; +}; + +ReactiveData.prototype.watchTreeChildren = function (row) { + var self = this, + childField = row.getData()[this.table.options.dataTreeChildField], + origFuncs = {}; + + function rebuildTree() { + self.table.modules.dataTree.initializeRow(row); + self.table.modules.dataTree.layoutRow(row); + self.table.rowManager.refreshActiveData("tree", false, true); + } + + if (childField) { + + origFuncs.push = childField.push; + + Object.defineProperty(childField, "push", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.push.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.unshift = childField.unshift; + + Object.defineProperty(childField, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.unshift.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.shift = childField.shift; + + Object.defineProperty(childField, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.shift.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.pop = childField.pop; + + Object.defineProperty(childField, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.pop.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.splice = childField.splice; + + Object.defineProperty(childField, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.splice.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + } +}; + +ReactiveData.prototype.watchKey = function (row, data, key) { + var self = this, + props = Object.getOwnPropertyDescriptor(data, key), + value = data[key], + version = this.currentVersion; + + Object.defineProperty(data, key, { + set: function set(newValue) { + value = newValue; + if (!self.blocked && version === self.currentVersion) { + var update = {}; + update[key] = newValue; + row.updateData(update); + } + + if (props.set) { + props.set(newValue); + } + }, + get: function get() { + + if (props.get) { + props.get(); + } + + return value; + } + }); +}; + +ReactiveData.prototype.unwatchRow = function (row) { + var data = row.getData(); + + for (var key in data) { + Object.defineProperty(data, key, { + value: data[key] + }); + } +}; + +ReactiveData.prototype.block = function () { + this.blocked = true; +}; + +ReactiveData.prototype.unblock = function () { + this.blocked = false; +}; + +Tabulator.prototype.registerModule("reactiveData", ReactiveData); + +var ResizeColumns = function ResizeColumns(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startX = false; + this.startWidth = false; + this.handle = null; + this.prevHandle = null; +}; + +ResizeColumns.prototype.initializeColumn = function (type, column, element) { + var self = this, + variableHeight = false, + mode = this.table.options.resizableColumns; + + //set column resize mode + if (type === "header") { + variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; + column.modules.resize = { variableHeight: variableHeight }; + } + + if (mode === true || mode == type) { + + var handle = document.createElement('div'); + handle.className = "tabulator-col-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-col-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + var nearestColumn = column.getLastColumn(); + + if (nearestColumn && self._checkResizability(nearestColumn)) { + self.startColumn = column; + self._mouseDown(e, nearestColumn, handle); + } + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + //reszie column on double click + handle.addEventListener("dblclick", function (e) { + var col = column.getLastColumn(); + + if (col && self._checkResizability(col)) { + e.stopPropagation(); + col.reinitializeWidth(true); + } + }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + self.startColumn = column; + self._mouseDown(e, prevColumn, prevHandle); + } + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + //resize column on double click + prevHandle.addEventListener("dblclick", function (e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + e.stopPropagation(); + prevColumn.reinitializeWidth(true); + } + } + }); + + element.appendChild(handle); + element.appendChild(prevHandle); + } +}; + +ResizeColumns.prototype._checkResizability = function (column) { + return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; +}; + +ResizeColumns.prototype._mouseDown = function (e, column, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + // self.table.columnManager.tempScrollBlock(); + + if (self.table.rtl) { + column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } else { + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } + + if (self.table.options.virtualDomHoz) { + self.table.vdomHoz.reinitialize(true); + } + + if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + } + + function mouseUp(e) { + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = false; + } + + if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + + document.body.removeEventListener("mouseup", mouseUp); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.columns) { + self.table.modules.persistence.save("columns"); + } + + self.table.options.columnResized.call(self.table, column.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = true; + } + + self.startX = typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX; + self.startWidth = column.getWidth(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); +}; + +Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); +var ResizeRows = function ResizeRows(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startY = false; + this.startHeight = false; + this.handle = null; + this.prevHandle = null; +}; + +ResizeRows.prototype.initializeRow = function (row) { + var self = this, + rowEl = row.getElement(); + + var handle = document.createElement('div'); + handle.className = "tabulator-row-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-row-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + self.startRow = row; + self._mouseDown(e, row, handle); + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var prevRow = self.table.rowManager.prevDisplayRow(row); + + if (prevRow) { + self.startRow = prevRow; + self._mouseDown(e, prevRow, prevHandle); + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + rowEl.appendChild(handle); + rowEl.appendChild(prevHandle); +}; + +ResizeRows.prototype._mouseDown = function (e, row, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + row.setHeight(self.startHeight + ((typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY) - self.startY)); + } + + function mouseUp(e) { + + // //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = false; + // } + + document.body.removeEventListener("mouseup", mouseMove); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + self.table.options.rowResized.call(this.table, row.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = true; + // } + + self.startY = typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY; + self.startHeight = row.getHeight(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); +}; + +Tabulator.prototype.registerModule("resizeRows", ResizeRows); +var ResizeTable = function ResizeTable(table) { + this.table = table; //hold Tabulator object + this.binding = false; + this.observer = false; + this.containerObserver = false; + + this.tableHeight = 0; + this.tableWidth = 0; + this.containerHeight = 0; + this.containerWidth = 0; + + this.autoResize = false; +}; + +ResizeTable.prototype.initialize = function (row) { + var _this83 = this; + + var table = this.table, + tableStyle; + + this.tableHeight = table.element.clientHeight; + this.tableWidth = table.element.clientWidth; + + if (table.element.parentNode) { + this.containerHeight = table.element.parentNode.clientHeight; + this.containerWidth = table.element.parentNode.clientWidth; + } + + if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { + + this.autoResize = true; + + this.observer = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this83.tableHeight != nodeHeight || _this83.tableWidth != nodeWidth) { + _this83.tableHeight = nodeHeight; + _this83.tableWidth = nodeWidth; + + if (table.element.parentNode) { + _this83.containerHeight = table.element.parentNode.clientHeight; + _this83.containerWidth = table.element.parentNode.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + } + }); + + this.observer.observe(table.element); + + tableStyle = window.getComputedStyle(table.element); + + if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) { + + this.containerObserver = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this83.containerHeight != nodeHeight || _this83.containerWidth != nodeWidth) { + _this83.containerHeight = nodeHeight; + _this83.containerWidth = nodeWidth; + _this83.tableHeight = table.element.clientHeight; + _this83.tableWidth = table.element.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }); + + this.containerObserver.observe(this.table.element.parentNode); + } + } else { + this.binding = function () { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }; + + window.addEventListener("resize", this.binding); + } +}; + +ResizeTable.prototype.clearBindings = function (row) { + if (this.binding) { + window.removeEventListener("resize", this.binding); + } + + if (this.observer) { + this.observer.unobserve(this.table.element); + } + + if (this.containerObserver) { + this.containerObserver.unobserve(this.table.element.parentNode); + } +}; + +Tabulator.prototype.registerModule("resizeTable", ResizeTable); +var ResponsiveLayout = function ResponsiveLayout(table) { + this.table = table; //hold Tabulator object + this.columns = []; + this.hiddenColumns = []; + this.mode = ""; + this.index = 0; + this.collapseFormatter = []; + this.collapseStartOpen = true; + this.collapseHandleColumn = false; +}; + +//generate resposive columns list +ResponsiveLayout.prototype.initialize = function () { + var self = this, + columns = []; + + this.mode = this.table.options.responsiveLayout; + this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; + this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; + this.hiddenColumns = []; + + //detemine level of responsivity for each column + this.table.columnManager.columnsByIndex.forEach(function (column, i) { + if (column.modules.responsive) { + if (column.modules.responsive.order && column.modules.responsive.visible) { + column.modules.responsive.index = i; + columns.push(column); + + if (!column.visible && self.mode === "collapse") { + self.hiddenColumns.push(column); + } + } + } + }); + + //sort list by responsivity + columns = columns.reverse(); + columns = columns.sort(function (a, b) { + var diff = b.modules.responsive.order - a.modules.responsive.order; + return diff || b.modules.responsive.index - a.modules.responsive.index; + }); + + this.columns = columns; + + if (this.mode === "collapse") { + this.generateCollapsedContent(); + } + + //assign collapse column + for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i17 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i17 >= _iterator.length) break; + _ref = _iterator[_i17++]; + } else { + _i17 = _iterator.next(); + if (_i17.done) break; + _ref = _i17.value; + } + + var col = _ref; + + if (col.definition.formatter == "responsiveCollapse") { + this.collapseHandleColumn = col; + break; + } + } + + if (this.collapseHandleColumn) { + if (this.hiddenColumns.length) { + this.collapseHandleColumn.show(); + } else { + this.collapseHandleColumn.hide(); + } + } +}; + +//define layout information +ResponsiveLayout.prototype.initializeColumn = function (column) { + var def = column.getDefinition(); + + column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; +}; + +ResponsiveLayout.prototype.initializeRow = function (row) { + var el; + + if (row.type !== "calc") { + el = document.createElement("div"); + el.classList.add("tabulator-responsive-collapse"); + + row.modules.responsiveLayout = { + element: el, + open: this.collapseStartOpen + }; + + if (!this.collapseStartOpen) { + el.style.display = 'none'; + } + } +}; + +ResponsiveLayout.prototype.layoutRow = function (row) { + var rowEl = row.getElement(); + + if (row.modules.responsiveLayout) { + rowEl.appendChild(row.modules.responsiveLayout.element); + this.generateCollapsedRowContent(row); + } +}; + +//update column visibility +ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { + var index; + if (column.modules.responsive) { + column.modules.responsive.visible = visible; + this.initialize(); + } +}; + +ResponsiveLayout.prototype.hideColumn = function (column) { + var colCount = this.hiddenColumns.length; + + column.hide(false, true); + + if (this.mode === "collapse") { + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !colCount) { + this.collapseHandleColumn.show(); + } + } +}; + +ResponsiveLayout.prototype.showColumn = function (column) { + var index; + + column.show(false, true); + //set column width to prevent calculation loops on uninitialized columns + column.setWidth(column.getWidth()); + + if (this.mode === "collapse") { + index = this.hiddenColumns.indexOf(column); + + if (index > -1) { + this.hiddenColumns.splice(index, 1); + } + + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !this.hiddenColumns.length) { + this.collapseHandleColumn.hide(); + } + } +}; + +//redraw columns to fit space +ResponsiveLayout.prototype.update = function () { + var self = this, + working = true; + + while (working) { + + var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + var diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width; + + if (diff < 0) { + //table is too wide + var column = self.columns[self.index]; + + if (column) { + self.hideColumn(column); + self.index++; + } else { + working = false; + } + } else { + + //table has spare space + var _column = self.columns[self.index - 1]; + + if (_column) { + if (diff > 0) { + if (diff >= _column.getWidth()) { + self.showColumn(_column); + self.index--; + } else { + working = false; + } + } else { + working = false; + } + } else { + working = false; + } + } + + if (!self.table.rowManager.activeRowsCount) { + self.table.rowManager.renderEmptyScroll(); + } + } +}; + +ResponsiveLayout.prototype.generateCollapsedContent = function () { + var self = this, + rows = this.table.rowManager.getDisplayRows(); + + rows.forEach(function (row) { + self.generateCollapsedRowContent(row); + }); +}; + +ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { + var el, contents; + + if (row.modules.responsiveLayout) { + el = row.modules.responsiveLayout.element; + + while (el.firstChild) { + el.removeChild(el.firstChild); + }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); + if (contents) { + el.appendChild(contents); + } + } +}; + +ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { + var self = this, + data = row.getData(), + output = [], + mockCellComponent; + + this.hiddenColumns.forEach(function (column) { + var value = column.getFieldValue(data); + + if (column.definition.title && column.field) { + if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { + + mockCellComponent = { + value: false, + data: {}, + getValue: function getValue() { + return value; + }, + getData: function getData() { + return data; + }, + getElement: function getElement() { + return document.createElement("div"); + }, + getRow: function getRow() { + return row.getComponent(); + }, + getColumn: function getColumn() { + return column.getComponent(); + } + }; + + output.push({ + field: column.field, + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + } else { + output.push({ + field: column.field, + title: column.definition.title, + value: value + }); + } + } + }); + + return output; +}; + +ResponsiveLayout.prototype.formatCollapsedData = function (data) { + var list = document.createElement("table"); + + data.forEach(function (item) { + var row = document.createElement("tr"); + var titleData = document.createElement("td"); + var valueData = document.createElement("td"); + var node_content; + + var titleHighlight = document.createElement("strong"); + titleData.appendChild(titleHighlight); + this.table.modules.localize.bind("columns|" + item.field, function (text) { + titleHighlight.innerText = text || item.title; + }); + + if (item.value instanceof Node) { + node_content = document.createElement("div"); + node_content.appendChild(item.value); + valueData.appendChild(node_content); + } else { + valueData.innerHTML = item.value; + } + + row.appendChild(titleData); + row.appendChild(valueData); + list.appendChild(row); + }, this); + + return Object.keys(data).length ? list : ""; +}; + +Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); + +var SelectRow = function SelectRow(table) { + this.table = table; //hold Tabulator object + this.selecting = false; //flag selecting in progress + this.lastClickedRow = false; //last clicked row + this.selectPrev = []; //hold previously selected element for drag drop selection + this.selectedRows = []; //hold selected rows + this.headerCheckboxElement = null; // hold header select element +}; + +SelectRow.prototype.clearSelectionData = function (silent) { + this.selecting = false; + this.lastClickedRow = false; + this.selectPrev = []; + this.selectedRows = []; + + if (!silent) { + this._rowSelectionChanged(); + } +}; + +SelectRow.prototype.initializeRow = function (row) { + var self = this, + element = row.getElement(); + + // trigger end of row selection + var endSelect = function endSelect() { + + setTimeout(function () { + self.selecting = false; + }, 50); + + document.body.removeEventListener("mouseup", endSelect); + }; + + row.modules.select = { selected: false }; + + //set row selection class + if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { + element.classList.add("tabulator-selectable"); + element.classList.remove("tabulator-unselectable"); + + if (self.table.options.selectable && self.table.options.selectable != "highlight") { + if (self.table.options.selectableRangeMode === "click") { + element.addEventListener("click", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + self.lastClickedRow = self.lastClickedRow || row; + + var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); + var rowIdx = self.table.rowManager.getDisplayRowIndex(row); + + var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; + var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; + + var rows = self.table.rowManager.getDisplayRows().slice(0); + var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); + + if (e.ctrlKey || e.metaKey) { + toggledRows.forEach(function (toggledRow) { + if (toggledRow !== self.lastClickedRow) { + + if (self.table.options.selectable !== true && !self.isRowSelected(row)) { + if (self.selectedRows.length < self.table.options.selectable) { + self.toggleRow(toggledRow); + } + } else { + self.toggleRow(toggledRow); + } + } + }); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + + if (self.table.options.selectable !== true) { + if (toggledRows.length > self.table.options.selectable) { + toggledRows = toggledRows.slice(0, self.table.options.selectable); + } + } + + self.selectRows(toggledRows); + } + self.table._clearSelection(); + } else if (e.ctrlKey || e.metaKey) { + self.toggleRow(row); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + self.selectRows(row); + self.lastClickedRow = row; + } + }); + } else { + element.addEventListener("click", function (e) { + if (!self.table.modExists("edit") || !self.table.modules.edit.getCurrentCell()) { + self.table._clearSelection(); + } + + if (!self.selecting) { + self.toggleRow(row); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + + self.selecting = true; + + self.selectPrev = []; + + document.body.addEventListener("mouseup", endSelect); + document.body.addEventListener("keyup", endSelect); + + self.toggleRow(row); + + return false; + } + }); + + element.addEventListener("mouseenter", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.toggleRow(row); + + if (self.selectPrev[1] == row) { + self.toggleRow(self.selectPrev[0]); + } + } + }); + + element.addEventListener("mouseout", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.selectPrev.unshift(row); + } + }); + } + } + } else { + element.classList.add("tabulator-unselectable"); + element.classList.remove("tabulator-selectable"); + } +}; + +//toggle row selection +SelectRow.prototype.toggleRow = function (row) { + if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { + if (row.modules.select && row.modules.select.selected) { + this._deselectRow(row); + } else { + this._selectRow(row); + } + } +}; + +//select a number of rows +SelectRow.prototype.selectRows = function (rows) { + var _this84 = this; + + var rowMatch; + + switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { + case "undefined": + this.table.rowManager.rows.forEach(function (row) { + _this84._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + break; + + case "string": + + rowMatch = this.table.rowManager.findRow(rows); + + if (rowMatch) { + this._selectRow(rowMatch, true, true); + } else { + this.table.rowManager.getRows(rows).forEach(function (row) { + _this84._selectRow(row, true, true); + }); + } + + this._rowSelectionChanged(); + break; + + default: + if (Array.isArray(rows)) { + rows.forEach(function (row) { + _this84._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + } else { + this._selectRow(rows, false, true); + } + break; + } +}; + +//select an individual row +SelectRow.prototype._selectRow = function (rowInfo, silent, force) { + var index; + + //handle max row count + if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { + if (this.selectedRows.length >= this.table.options.selectable) { + if (this.table.options.selectableRollingSelection) { + this._deselectRow(this.selectedRows[0]); + } else { + return false; + } + } + } + + var row = this.table.rowManager.findRow(rowInfo); + + if (row) { + if (this.selectedRows.indexOf(row) == -1) { + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = true; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = true; + } + row.getElement().classList.add("tabulator-selected"); + + this.selectedRows.push(row); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, true); + } + + if (!silent) { + this.table.options.rowSelected.call(this.table, row.getComponent()); + } + + this._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); + } + } +}; + +SelectRow.prototype.isRowSelected = function (row) { + return this.selectedRows.indexOf(row) !== -1; +}; + +//deselect a number of rows +SelectRow.prototype.deselectRows = function (rows, silent) { + var self = this, + rowCount; + + if (typeof rows == "undefined") { + + rowCount = self.selectedRows.length; + + for (var _i18 = 0; _i18 < rowCount; _i18++) { + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(silent); + } else { + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(silent); + } else { + self._deselectRow(rows, silent); + } + } +}; + +//deselect an individual row +SelectRow.prototype._deselectRow = function (rowInfo, silent) { + var self = this, + row = self.table.rowManager.findRow(rowInfo), + index; + + if (row) { + index = self.selectedRows.findIndex(function (selectedRow) { + return selectedRow == row; + }); + + if (index > -1) { + + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = false; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = false; + } + row.getElement().classList.remove("tabulator-selected"); + self.selectedRows.splice(index, 1); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, false); + } + + if (!silent) { + self.table.options.rowDeselected.call(this.table, row.getComponent()); + } + + self._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); + } + } +}; + +SelectRow.prototype.getSelectedData = function () { + var data = []; + + this.selectedRows.forEach(function (row) { + data.push(row.getData()); + }); + + return data; +}; + +SelectRow.prototype.getSelectedRows = function () { + + var rows = []; + + this.selectedRows.forEach(function (row) { + rows.push(row.getComponent()); + }); + + return rows; +}; + +SelectRow.prototype._rowSelectionChanged = function (silent) { + if (this.headerCheckboxElement) { + if (this.selectedRows.length === 0) { + this.headerCheckboxElement.checked = false; + this.headerCheckboxElement.indeterminate = false; + } else if (this.table.rowManager.rows.length === this.selectedRows.length) { + this.headerCheckboxElement.checked = true; + this.headerCheckboxElement.indeterminate = false; + } else { + this.headerCheckboxElement.indeterminate = true; + this.headerCheckboxElement.checked = false; + } + } + + if (!silent) { + this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); + } +}; + +SelectRow.prototype.registerRowSelectCheckbox = function (row, element) { + if (!row._row.modules.select) { + row._row.modules.select = {}; + } + + row._row.modules.select.checkboxEl = element; +}; + +SelectRow.prototype.registerHeaderSelectCheckbox = function (element) { + this.headerCheckboxElement = element; +}; + +SelectRow.prototype.childRowSelection = function (row, select) { + var children = this.table.modules.dataTree.getChildren(row); + + if (select) { + for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i19 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i19 >= _iterator2.length) break; + _ref2 = _iterator2[_i19++]; + } else { + _i19 = _iterator2.next(); + if (_i19.done) break; + _ref2 = _i19.value; + } + + var child = _ref2; + + this._selectRow(child, true); + } + } else { + for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i20 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i20 >= _iterator3.length) break; + _ref3 = _iterator3[_i20++]; + } else { + _i20 = _iterator3.next(); + if (_i20.done) break; + _ref3 = _i20.value; + } + + var _child = _ref3; + + this._deselectRow(_child, true); + } + } +}; + +Tabulator.prototype.registerModule("selectRow", SelectRow); + +var Sort = function Sort(table) { + this.table = table; //hold Tabulator object + this.sortList = []; //holder current sort + this.changed = false; //has the sort changed since last render +}; + +//initialize column header for sorting +Sort.prototype.initializeColumn = function (column, content) { + var self = this, + sorter = false, + colEl, + arrowEl; + + switch (_typeof(column.definition.sorter)) { + case "string": + if (self.sorters[column.definition.sorter]) { + sorter = self.sorters[column.definition.sorter]; + } else { + console.warn("Sort Error - No such sorter found: ", column.definition.sorter); + } + break; + + case "function": + sorter = column.definition.sorter; + break; + } + + column.modules.sort = { + sorter: sorter, dir: "none", + params: column.definition.sorterParams || {}, + startingDir: column.definition.headerSortStartingDir || "asc", + tristate: typeof column.definition.headerSortTristate !== "undefined" ? column.definition.headerSortTristate : this.table.options.headerSortTristate + }; + + if (typeof column.definition.headerSort === "undefined" ? this.table.options.headerSort !== false : column.definition.headerSort !== false) { + + colEl = column.getElement(); + + colEl.classList.add("tabulator-sortable"); + + arrowEl = document.createElement("div"); + arrowEl.classList.add("tabulator-col-sorter"); + + if (_typeof(this.table.options.headerSortElement) == "object") { + arrowEl.appendChild(this.table.options.headerSortElement); + } else { + arrowEl.innerHTML = this.table.options.headerSortElement; + } + + //create sorter arrow + content.appendChild(arrowEl); + + column.modules.sort.element = arrowEl; + + //sort on click + colEl.addEventListener("click", function (e) { + var dir = "", + sorters = [], + match = false; + + if (column.modules.sort) { + if (column.modules.sort.tristate) { + if (column.modules.sort.dir == "none") { + dir = column.modules.sort.startingDir; + } else { + if (column.modules.sort.dir == column.modules.sort.startingDir) { + dir = column.modules.sort.dir == "asc" ? "desc" : "asc"; + } else { + dir = "none"; + } + } + } else { + switch (column.modules.sort.dir) { + case "asc": + dir = "desc"; + break; + + case "desc": + dir = "asc"; + break; + + default: + dir = column.modules.sort.startingDir; + } + } + + if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { + sorters = self.getSort(); + + match = sorters.findIndex(function (sorter) { + return sorter.field === column.getField(); + }); + + if (match > -1) { + sorters[match].dir = dir; + + if (match != sorters.length - 1) { + match = sorters.splice(match, 1)[0]; + if (dir != "none") { + sorters.push(match); + } + } + } else { + if (dir != "none") { + sorters.push({ column: column, dir: dir }); + } + } + + //add to existing sort + self.setSort(sorters); + } else { + if (dir == "none") { + self.clear(); + } else { + //sort by column only + self.setSort(column, dir); + } + } + + self.table.rowManager.sorterRefresh(!self.sortList.length); + } + }); + } +}; + +//check if the sorters have changed since last use +Sort.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; +}; + +//return current sorters +Sort.prototype.getSort = function () { + var self = this, + sorters = []; + + self.sortList.forEach(function (item) { + if (item.column) { + sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); + } + }); + + return sorters; +}; + +//change sort list and trigger sort +Sort.prototype.setSort = function (sortList, dir) { + var self = this, + newSortList = []; + + if (!Array.isArray(sortList)) { + sortList = [{ column: sortList, dir: dir }]; + } + + sortList.forEach(function (item) { + var column; + + column = self.table.columnManager.findColumn(item.column); + + if (column) { + item.column = column; + newSortList.push(item); + self.changed = true; + } else { + console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); + } + }); + + self.sortList = newSortList; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.sort) { + this.table.modules.persistence.save("sort"); + } +}; + +//clear sorters +Sort.prototype.clear = function () { + this.setSort([]); +}; + +//find appropriate sorter for column +Sort.prototype.findSorter = function (column) { + var row = this.table.rowManager.activeRows[0], + sorter = "string", + field, + value; + + if (row) { + row = row.getData(); + field = column.getField(); + + if (field) { + + value = column.getFieldValue(row); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "undefined": + sorter = "string"; + break; + + case "boolean": + sorter = "boolean"; + break; + + default: + if (!isNaN(value) && value !== "") { + sorter = "number"; + } else { + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + sorter = "alphanum"; + } + } + break; + } + } + } + + return this.sorters[sorter]; +}; + +//work through sort list sorting data +Sort.prototype.sort = function (data) { + var self = this, + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList, + sortListActual = [], + rowComponents = [], + lastSort; + + if (self.table.options.dataSorting) { + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + //build list of valid sorters and trigger column specific callbacks before sort begins + sortList.forEach(function (item, i) { + var sortObj = item.column.modules.sort; + + if (item.column && sortObj) { + + //if no sorter has been defined, take a guess + if (!sortObj.sorter) { + sortObj.sorter = self.findSorter(item.column); + } + + item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params; + + sortListActual.push(item); + } + + self.setColumnHeader(item.column, item.dir); + }); + + //sort data + if (sortListActual.length) { + self._sortItems(data, sortListActual); + } + } else { + sortList.forEach(function (item, i) { + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + data.forEach(function (row) { + rowComponents.push(row.getComponent()); + }); + + self.table.options.dataSorted.call(self.table, self.getSort(), rowComponents); + } +}; + +//clear sort arrows on columns +Sort.prototype.clearColumnHeaders = function () { + this.table.columnManager.getRealColumns().forEach(function (column) { + if (column.modules.sort) { + column.modules.sort.dir = "none"; + column.getElement().setAttribute("aria-sort", "none"); + } + }); +}; + +//set the column header sort direction +Sort.prototype.setColumnHeader = function (column, dir) { + column.modules.sort.dir = dir; + column.getElement().setAttribute("aria-sort", dir); +}; + +//sort each item in sort list +Sort.prototype._sortItems = function (data, sortList) { + var _this85 = this; + + var sorterCount = sortList.length - 1; + + data.sort(function (a, b) { + var result; + + for (var i = sorterCount; i >= 0; i--) { + var sortItem = sortList[i]; + + result = _this85._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); + + if (result !== 0) { + break; + } + } + + return result; + }); +}; + +//process individual rows for a sort function on active data +Sort.prototype._sortRow = function (a, b, column, dir, params) { + var el1Comp, el2Comp, colComp; + + //switch elements depending on search direction + var el1 = dir == "asc" ? a : b; + var el2 = dir == "asc" ? b : a; + + a = column.getFieldValue(el1.getData()); + b = column.getFieldValue(el2.getData()); + + a = typeof a !== "undefined" ? a : ""; + b = typeof b !== "undefined" ? b : ""; + + // el1Comp = el1.getComponent(); + // el2Comp = el2.getComponent(); + + return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); +}; + +//default data sorters +Sort.prototype.sorters = { + + //sort numbers + number: function number(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var decimal = params.decimalSeparator; + var thousand = params.thousandSeparator; + var emptyAlign = 0; + + a = String(a); + b = String(b); + + if (thousand) { + a = a.split(thousand).join(""); + b = b.split(thousand).join(""); + } + + if (decimal) { + a = a.split(decimal).join("."); + b = b.split(decimal).join("."); + } + + a = parseFloat(a); + b = parseFloat(b); + + //handle non numeric values + if (isNaN(a)) { + emptyAlign = isNaN(b) ? 0 : -1; + } else if (isNaN(b)) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort strings + string: function string(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + var locale; + + //handle empty values + if (!a) { + emptyAlign = !b ? 0 : -1; + } else if (!b) { + emptyAlign = 1; + } else { + //compare valid values + switch (_typeof(params.locale)) { + case "boolean": + if (params.locale) { + locale = this.table.modules.localize.getLocale(); + } + break; + case "string": + locale = params.locale; + break; + } + + return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort date + date: function date(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "DD/MM/YYYY"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort HH:mm formatted times + time: function time(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "HH:mm"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort datetime + datetime: function datetime(a, b, aRow, bRow, column, dir, params) { + var format = params.format || "DD/MM/YYYY HH:mm:ss", + alignEmptyValues = params.alignEmptyValues, + emptyAlign = 0; + + if (typeof moment != "undefined") { + a = moment(a, format); + b = moment(b, format); + + if (!a.isValid()) { + emptyAlign = !b.isValid() ? 0 : -1; + } else if (!b.isValid()) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } else { + console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); + } + }, + + //sort booleans + boolean: function boolean(a, b, aRow, bRow, column, dir, params) { + var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; + var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; + + return el1 - el2; + }, + + //sort if element contains any data + array: function array(a, b, aRow, bRow, column, dir, params) { + var el1 = 0; + var el2 = 0; + var type = params.type || "length"; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + function calc(value) { + + switch (type) { + case "length": + return value.length; + break; + + case "sum": + return value.reduce(function (c, d) { + return c + d; + }); + break; + + case "max": + return Math.max.apply(null, value); + break; + + case "min": + return Math.min.apply(null, value); + break; + + case "avg": + return value.reduce(function (c, d) { + return c + d; + }) / value.length; + break; + } + } + + //handle non array values + if (!Array.isArray(a)) { + alignEmptyValues = !Array.isArray(b) ? 0 : -1; + } else if (!Array.isArray(b)) { + alignEmptyValues = 1; + } else { + + //compare valid values + el1 = a ? calc(a) : 0; + el2 = b ? calc(b) : 0; + + return el1 - el2; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort if element contains any data + exists: function exists(a, b, aRow, bRow, column, dir, params) { + var el1 = typeof a == "undefined" ? 0 : 1; + var el2 = typeof b == "undefined" ? 0 : 1; + + return el1 - el2; + }, + + //sort alpha numeric strings + alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { + var a, + b, + a1, + b1, + i = 0, + L, + rx = /(\d+)|(\D+)/g, + rd = /\d/; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + //handle empty values + if (!as && as !== 0) { + emptyAlign = !bs && bs !== 0 ? 0 : -1; + } else if (!bs && bs !== 0) { + emptyAlign = 1; + } else { + + if (isFinite(as) && isFinite(bs)) return as - bs; + a = String(as).toLowerCase(); + b = String(bs).toLowerCase(); + if (a === b) return 0; + if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; + a = a.match(rx); + b = b.match(rx); + L = a.length > b.length ? b.length : a.length; + while (i < L) { + a1 = a[i]; + b1 = b[i++]; + if (a1 !== b1) { + if (isFinite(a1) && isFinite(b1)) { + if (a1.charAt(0) === "0") a1 = "." + a1; + if (b1.charAt(0) === "0") b1 = "." + b1; + return a1 - b1; + } else return a1 > b1 ? 1 : -1; + } + } + + return a.length > b.length; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } +}; + +Tabulator.prototype.registerModule("sort", Sort); + +var Validate = function Validate(table) { + this.table = table; + this.invalidCells = []; +}; + +//validate +Validate.prototype.initializeColumn = function (column) { + var self = this, + config = [], + validator; + + if (column.definition.validator) { + + if (Array.isArray(column.definition.validator)) { + column.definition.validator.forEach(function (item) { + validator = self._extractValidator(item); + + if (validator) { + config.push(validator); + } + }); + } else { + validator = this._extractValidator(column.definition.validator); + + if (validator) { + config.push(validator); + } + } + + column.modules.validate = config.length ? config : false; + } +}; + +Validate.prototype._extractValidator = function (value) { + var type, params, pos; + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + pos = value.indexOf(':'); + + if (pos > -1) { + type = value.substring(0, pos); + params = value.substring(pos + 1); + } else { + type = value; + } + + return this._buildValidator(type, params); + break; + + case "function": + return this._buildValidator(value); + break; + + case "object": + return this._buildValidator(value.type, value.parameters); + break; + } +}; + +Validate.prototype._buildValidator = function (type, params) { + + var func = typeof type == "function" ? type : this.validators[type]; + + if (!func) { + console.warn("Validator Setup Error - No matching validator found:", type); + return false; + } else { + return { + type: typeof type == "function" ? "function" : type, + func: func, + params: params + }; + } +}; + +Validate.prototype.validate = function (validators, cell, value) { + var self = this, + valid = [], + invalidIndex = this.invalidCells.indexOf(cell); + + if (validators) { + validators.forEach(function (item) { + if (!item.func.call(self, cell.getComponent(), value, item.params)) { + valid.push({ + type: item.type, + parameters: item.params + }); + } + }); + } + + valid = valid.length ? valid : true; + + if (!cell.modules.validate) { + cell.modules.validate = {}; + } + + if (valid === true) { + cell.modules.validate.invalid = false; + cell.getElement().classList.remove("tabulator-validation-fail"); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } else { + cell.modules.validate.invalid = true; + + if (this.table.options.validationMode !== "manual") { + cell.getElement().classList.add("tabulator-validation-fail"); + } + + if (invalidIndex == -1) { + this.invalidCells.push(cell); + } + } + + return valid; +}; + +Validate.prototype.getInvalidCells = function () { + var output = []; + + this.invalidCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; +}; + +Validate.prototype.clearValidation = function (cell) { + var invalidIndex; + + if (cell.modules.validate && cell.modules.validate.invalid) { + + cell.getElement().classList.remove("tabulator-validation-fail"); + cell.modules.validate.invalid = false; + + invalidIndex = this.invalidCells.indexOf(cell); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } +}; + +Validate.prototype.validators = { + + //is integer + integer: function integer(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }, + + //is float + float: function float(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && value % 1 !== 0; + }, + + //must be a number + numeric: function numeric(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return !isNaN(value); + }, + + //must be a string + string: function string(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return isNaN(value); + }, + + //maximum value + max: function max(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) <= parameters; + }, + + //minimum value + min: function min(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) >= parameters; + }, + + //starts with value + starts: function starts(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().startsWith(String(parameters).toLowerCase()); + }, + + //ends with value + ends: function ends(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().endsWith(String(parameters).toLowerCase()); + }, + + //minimum string length + minLength: function minLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length >= parameters; + }, + + //maximum string length + maxLength: function maxLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length <= parameters; + }, + + //in provided value list + in: function _in(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + if (typeof parameters == "string") { + parameters = parameters.split("|"); + } + + return value === "" || parameters.indexOf(value) > -1; + }, + + //must match provided regex + regex: function regex(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var reg = new RegExp(parameters); + + return reg.test(value); + }, + + //value must be unique in this column + unique: function unique(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var unique = true; + + var cellData = cell.getData(); + var column = cell.getColumn()._getSelf(); + + this.table.rowManager.rows.forEach(function (row) { + var data = row.getData(); + + if (data !== cellData) { + if (value == column.getFieldValue(data)) { + unique = false; + } + } + }); + + return unique; + }, + + //must have a value + required: function required(cell, value, parameters) { + return value !== "" && value !== null && typeof value !== "undefined"; + } +}; + +Tabulator.prototype.registerModule("validate", Validate); + +export default Tabulator; \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.min.js b/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.min.js new file mode 100644 index 0000000..bbf94ef --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator.es2015.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;var n,s,a=0|e,r=Math.max(a>=0?a:i-Math.abs(a),0);for(;ro?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var s in e=t[0]){var a={field:s,title:s},r=e[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach((function(t){var e=n.find((function(e){return e.field===t.field}));e&&Object.assign(t,e)})):i.forEach((function(t){n[t.field]&&Object.assign(t,n[t.field])})),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach((function(t,e){o._addColumn(t)})),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),s=o?this.findColumnIndex(o):o;if(o&&s>-1){var a=this.columns.indexOf(o.getTopColumn()),r=o.getElement();e?(this.columns.splice(a,0,i),r.parentNode.insertBefore(n,r)):(this.columns.splice(a+1,0,i),r.parentNode.insertBefore(n,r.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach((function(t){t.reRegisterPosition()}))},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach((function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)})),t.columns.forEach((function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)})),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){return"object"!=(void 0===t?"undefined":_typeof(t))?this.columnsByField[t]||!1:t instanceof Column?t:t instanceof ColumnComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.columns.find((function(e){return e.element===t}))||!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach((function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])})),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){return(t=this.columnsByIndex.findIndex((function(t){return t.visible})))>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex((function(e){return t===e}))},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach((function(e,o){t(e,o)}))},ColumnManager.prototype.getDefinitions=function(t){var e=[];return this.columnsByIndex.forEach((function(o){(!t||t&&o.visible)&&e.push(o.getDefinition())})),e},ColumnManager.prototype.getDefinitionTree=function(){var t=[];return this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),t},ColumnManager.prototype.getComponents=function(t){var e=[];return(t?this.columns:this.columnsByIndex).forEach((function(t){e.push(t.getComponent())})),e},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach((function(e){e.visible&&(t+=e.getWidth())})),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var s,a=this,r=t.indexOf(e),l=[];r>-1&&(t.splice(r,1),(s=t.indexOf(o))>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach((function(t){l=l.concat(a.table.modules.dataTree.getTreeChildren(t,!1,!0))})),(l=l.concat(this.table.rowManager.rows)).forEach((function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,a=0,r=t.getElement();return new Promise((function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)})),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)}))},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],(e=this.columnsByIndex.indexOf(t))>-1&&this.columnsByIndex.splice(e,1),(e=this.columns.indexOf(t))>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1||t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.show()})):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.hide()})):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach((function(e,o){var n=new t(e,i);i.attachColumn(n)})),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach((function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)}))},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach((function(t){t.reRegisterPosition()})):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,(function(o){t.element.setAttribute("title",o||e.title)})):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",(function(e){t.setTooltip()}))},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",(function(t){n.headerClick(t,i.getComponent())})),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",(function(t){n.headerDblClick(t,i.getComponent())})),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",(function(t){n.headerContext(t,i.getComponent())})),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&n.headerTap(t,i.getComponent()),o=!1}))),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null}))),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),(e.maxWidth||this.table.options.columnMaxWidth)&&!1!==e.maxWidth&&this.setMaxWidth(void 0===e.maxWidth?this.table.options.columnMaxWidth:parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){this.definition,this.table;var t=document.createElement("div");return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(function(t){t.stopPropagation(),n.focus()})),n.addEventListener("change",(function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())})),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,(function(t){n.value=t||e.title||" "})):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,(function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")})):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(t){r.titleFormatterRendered=t},s={getValue:function(){return e},getElement:function(){return t}},n="function"==typeof(n=this.definition.titleFormatterParams||{})?n():n,void 0===(i=o.call(this.table.modules.format,s,n,a))?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s-1&&this.columns.splice(e,1),this.columns.length||this.delete()},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(t){t.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach((function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)})),t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()}))},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(t){t.setMinWidth()}))},Column.prototype.setMaxWidth=function(t){this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(t){t.setMaxWidth()}))},Column.prototype.delete=function(){var t=this;return new Promise((function(e,o){t.isGroup&&t.columns.forEach((function(t){t.delete()})),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){this.widthFixed||(this.element.style.width="",this.cells.forEach((function(t){t.clearWidth()})));var t=this.element.offsetWidth;this.width&&this.widthFixed||(this.cells.forEach((function(e){var o=e.getWidth();o>t&&(t=o)})),t&&this.setWidthActual(t+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise((function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then((function(t){n.field==e.field&&(e.field=!1),e.delete().then((function(){o(t.getComponent())})).catch((function(t){i(t)}))})).catch((function(t){i(t)})))}))},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",(function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e})),"virtual"===this.renderMode&&t.element.addEventListener("scroll",(function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e}))},RowManager.prototype.findRow=function(t){var e=this;return"object"!=(void 0===t?"undefined":_typeof(t))?null!=t&&(e.rows.find((function(o){return o.data[e.table.options.index]==t}))||!1):t instanceof Row?t:t instanceof RowComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.rows.find((function(e){return e.getElement()===t}))||!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find((function(e){return e.data===t}))||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),a=t.getElement(),r=0;return new Promise((function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(a).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(a)&&(r=Tabulator.prototype.helpers.elOffset(a).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&r-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)})),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,s=[];return new Promise((function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach((function(t,i){var a=n.addRow(t,e,o,!0);s.push(a)})),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)}))},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,s,a=t instanceof Row?t:new Row(t||{},this),r=this.findAddRowPos(e),l=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(l=this.rows.indexOf(o)),o&&l>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator((function(t){var e=t.indexOf(o);e>-1&&t.splice(r?e:e+1,0,a)})),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?l:l+1,0,a)):r?(this.displayRowIterator((function(t){t.unshift(a)})),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator((function(t){t.push(a)})),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator((function(n){i._moveRowInArray(n,t,e,o)})),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,s,a;if(e!==o&&((n=t.indexOf(e))>-1&&(t.splice(n,1),(s=t.indexOf(o))>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){a=s>n?s:n+1;for(var r=n-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach((function(t){"row"==t.type&&o.push(t.getData(e||"data"))})),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach((function(t){e.push(t.getComponent())})),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach((function(t){delete t.column})),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then((function(e){t._setDataActual(e,!0)})).catch((function(t){}))},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then((function(){})).catch((function(){}))):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then((function(){})).catch((function(){}))):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)(!this.redrawBlockRestoreConfig||s.indexOf(t)=0))break;s=r}else if(e-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=e-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*h),"group"!==m.type&&(u=!1),this.vDomBottom++,l++}t?(this.vDomTopPad=e?this.vDomRowHeight*this.vDomTop+o:this.scrollTop-r,this.vDomBottomPad=this.vDomBottom==this.displayRowsCount-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-r,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+r)/l),this.vDomBottomPad=this.vDomRowHeight*(this.displayRowsCount-this.vDomBottom-1),this.vDomScrollHeight=r+a+this.vDomBottomPad-this.height),i.style.paddingTop=this.vDomTopPad+"px",i.style.paddingBottom=this.vDomBottomPad+"px",e&&(this.scrollTop=this.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,i.style.minWidth=u?this.table.columnManager.getWidth()+"px":"",this.table.options.groupBy&&"fitDataFill"!=this.table.modules.layout.getMode()&&this.displayRowsCount==this.table.modules.groupRows.countGroups()&&(this.tableElement.style.minWidth=this.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()})),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach((function(t){t.normalizeHeight()}))},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach((function(t){t.reinitialize(!0)}))},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find((function(t){return t.frozen}))&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",(function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))}))},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o=!1,i=0,n=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach((function(t){!t.definition.width&&t.visible&&(o=!0)})),o&&o&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,t=this.table.options.groupBy?this.table.modules.groupRows.getGroups(!1)[0].getRows(!1)[0]:this.table.rowManager.getDisplayRows()[0])){e=t.getElement(),t.generateCells(),this.element.appendChild(e);for(n=0;nthis.vDomScrollPosRight)break}for(e.parentNode.removeChild(e),this.fitDataColAvg=Math.floor(i/(n+1));no.vDomScrollPosLeft&&n.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=o.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft&&(this.table.rowManager.getVisibleRows().forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}})),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft())},VDomHoz.prototype.removeColRight=function(t){var e;(t=this.columns[this.rightCol])&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}})),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos-1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(t)};Row.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},Row.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t},Row.prototype.getElement=function(){return this.create(),this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",(function(t){i.table.options.rowClick(t,i.getComponent())})),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",(function(t){i.table.options.rowDblClick(t,i.getComponent())})),i.table.options.rowContext&&i.element.addEventListener("contextmenu",(function(t){i.table.options.rowContext(t,i.getComponent())})),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",(function(t){i.table.options.rowMouseEnter(t,i.getComponent())})),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",(function(t){i.table.options.rowMouseLeave(t,i.getComponent())})),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",(function(t){i.table.options.rowMouseOver(t,i.getComponent())})),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",(function(t){i.table.options.rowMouseOut(t,i.getComponent())})),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",(function(t){i.table.options.rowMouseMove(t,i.getComponent())})),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1}))),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null})))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach((function(t){e.element.appendChild(t.getElement()),t.cellRendered()})),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach((function(t){t.reinitialize(!0)}))},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(t){var o=t.getHeight();o>e&&(e=o)})),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach((function(t){t.setHeight()})),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach((function(t){t.clearHeight()}))},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=this.element&&Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise((function(s,a){for(var r in"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t,e)o.data[r]=e[r];for(var r in o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock(),t){o.table.columnManager.getColumnsByFieldRoot(r).forEach((function(t){var n=o.getCell(t.getField());if(n){var s=t.getFieldValue(e);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}}))}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()}))},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find((function(e){return e.column===t}))},Row.prototype.getCellIndex=function(t){return this.cells.findIndex((function(e){return e===t}))},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach((function(e){e.validate()||t.push(e.getComponent())})),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise((function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(i=(n=t.getGroup().rows).indexOf(t))&&(i=n[i-1]):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()}))},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);for(var n in i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder),i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach((function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)})),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}));t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then((function(){})).catch((function(){})):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){})):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach((function(t){t.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise((function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",(function(t){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(t){try{s=JSON.parse(r.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(s).then((function(t){o(t)})).catch((function(t){o(t)}))},r.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}})),n.click()}))},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){return"string"!=typeof t?t?this.rowManager.setData(t,i,n):this.modExists("ajax")&&(this.modules.ajax.getUrl||this.options.ajaxURLGenerator)?"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n):this.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?this.rowManager.setData(JSON.parse(t),i,n):this.modExists("ajax",!0)?(e&&this.modules.ajax.setParams(e),o&&this.modules.ajax.setConfig(o),this.modules.ajax.setUrl(t),"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise((function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then((function(){--i||n()})))})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise((function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then((function(t){var e=[];t.forEach((function(t){e.push(t.getComponent())})),n(e)})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise((function(s,a){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then((function(){n--,i.push(e.getComponent()),n||s(i)})):o.rowManager.addRows(t).then((function(t){n--,i.push(t[0].getComponent()),n||s(i)}))})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}))},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise((function(o,i){var n=e,s=0,a=0,r=[];function l(){++s==t.length&&a&&(n.rowManager.reRenderInPosition(),o())}Array.isArray(t)||(t=[t]),t.forEach((function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),l())})),r.sort((function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1})),r.forEach((function(t){t.delete().then((function(){a++,l()})).catch((function(t){l(),i(t)}))}))}))},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise((function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then((function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())}))}))},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())})).catch((function(t){n(t)})):s=o.rowManager.addRows(e).then((function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())})).catch((function(t){n(t)}))}))},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){i(s.getComponent())})).catch((function(t){n(t)})):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))}))},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.rowManager.findRow(t);a?i.rowManager.scrollToRow(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))}))},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,a).then((function(t){n(t.getComponent())})).catch((function(t){s(t)}))}))},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise((function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then((function(){o()})).catch((function(t){i(t)})):(console.warn("Column Delete Error - No matching column found:",t),i())}))},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise((function(i,n){var s=o.columnManager.findColumn(t);s?s.updateDefinition(e).then((function(t){i(t)})).catch((function(t){n(t)})):(console.warn("Column Update Error - No matching column found:",t),n())}))},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(t);a?i.columnManager.scrollToColumn(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))}))},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.validate.clearValidation(t._getSelf())})))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach((function(t){var o=t.validate();!0!==o&&(e=e.concat(o))})),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise((function(t,e){e()}))},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){e.options.pagination&&e.modExists("page")&&(t=e.rowManager.findRow(t))?e.modules.page.setPageToRow(t).then((function(){o()})).catch((function(){i()})):i()}))},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then((function(){})).catch((function(){}))},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.edit.clearEdited(t._getSelf())})))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){for(var t in this.modules={},Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if((o=document.querySelectorAll(t)).length)for(var s=0;s0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){var e,o,i=this.table.element.clientWidth,n=0,s=0,a=0,r=[],l=[],u=0,c=0;function d(t){return"string"==typeof t?t.indexOf("%")>-1?i/100*parseInt(t):parseInt(t):t}function h(t,e,o,i){var n=[],s=0,r=0,l=0,u=a,c=0,p=0,m=[];function f(t){return o*(t.column.definition.widthGrow||1)}function g(t){return d(t.width)-o*(t.column.definition.widthShrink||0)}return t.forEach((function(t,s){var a=i?g(t):f(t);t.column.minWidth>=a?n.push(t):t.column.maxWidth&&t.column.maxWidththis.table.rowManager.element.clientHeight&&(i-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach((function(t){var e,o,i;t.visible&&(e=t.definition.width,o=parseInt(t.minWidth),e?(i=d(e),n+=i>o?i:o,t.definition.widthShrink&&(l.push({column:t,width:i>o?i:o}),u+=t.definition.widthShrink)):(r.push({column:t,width:0}),a+=t.definition.widthGrow||1))})),s=i-n,e=Math.floor(s/a);c=h(r,s,e,!1);r.length&&c>0&&(r[r.length-1].width+=+c),r.forEach((function(t){s-=t.width})),(o=Math.abs(c)+s)>0&&u&&(c=h(l,o,Math.floor(o/u),!0)),l.length&&(l[l.length-1].width-=c),r.forEach((function(t){t.column.setWidth(t.width)})),l.forEach((function(t){t.column.setWidth(t.width)}))}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){var e=t.split("-")[0];this.langList[e]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,e),t=e):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=Tabulator.prototype.helpers.deepClone(this.langList.default||{}),"default"!=t&&function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}(this.langList[t],this.lang),this.table.options.localized.call(this.table,this.locale,this.lang),this._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var o=(t=e?t+"|"+e:t).split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this.lang;return t.forEach((function(t){var e;o&&(e=o[t],o=void 0!==e&&e)})),o},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this,e=function(e){t.bindings[e].forEach((function(o){o(t.getText(e),t.lang)}))};for(var o in t.bindings)e(o)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e=this,o=[];return Tabulator.prototype.comms.lookupTable(t).forEach((function(t){e.table!==t&&o.push(t)})),o},Comms.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach((function(t){t.tableComms(n.table.element,e,o,i)})),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms);var Accessor=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupAccessor(t.definition[a]))&&(o=!0,i[a]={accessor:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.accessor=i)},Accessor.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},Accessor.prototype.transformRow=function(t,e){var o="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),i=t.getComponent(),n=Tabulator.prototype.helpers.deepClone(t.data||{});return this.table.columnManager.traverse((function(t){var s,a,r,l;t.modules.accessor&&(a=t.modules.accessor[o]||t.modules.accessor.accessor||!1)&&"undefined"!=(s=t.getFieldValue(n))&&(l=t.getComponent(),r="function"==typeof a.params?a.params(s,n,e,l,i):a.params,t.setFieldValue(n,a.accessor(s,n,e,r,l,i)))})),n},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor);var Ajax=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=t.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=t.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},Ajax.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},Ajax.prototype.setParams=function(t,e){if(e)for(var o in this.params=this.params||{},t)this.params[o]=t[o];else this.params=t},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},Ajax.prototype._loadDefaultConfig=function(t){if(!this.config||t)for(var e in this.config={},this.defaultConfig)this.config[e]=this.defaultConfig[e]},Ajax.prototype.setUrl=function(t){this.url=t},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(t,e){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t,e)},Ajax.prototype.nextPage=function(t){this.loading||t<(this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight)&&this.table.modules.page.nextPage().then((function(){})).catch((function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(t,e){var o=this;return new Promise((function(i,n){o.sendRequest(t).then((function(s){o.table.rowManager.setData(s,t,e).then((function(){i()})).catch((function(t){n(t)}))})).catch((function(t){n(t)}))}))},Ajax.prototype.generateParamsList=function(t,e){var o=this,i=[];if(e=e||"",Array.isArray(t))t.forEach((function(t,n){i=i.concat(o.generateParamsList(t,e?e+"["+n+"]":n))}));else if("object"===(void 0===t?"undefined":_typeof(t)))for(var n in t)i=i.concat(o.generateParamsList(t[n],e?e+"["+n+"]":n));else i.push({key:e,value:t});return i},Ajax.prototype.serializeParams=function(t){var e=this.generateParamsList(t),o=[];return e.forEach((function(t){o.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))})),o.join("&")},Ajax.prototype.sendRequest=function(t){var e,o=this,i=this,n=i.url;return i.requestOrder++,e=i.requestOrder,i._loadDefaultConfig(),new Promise((function(s,a){!1!==i.table.options.ajaxRequesting.call(o.table,i.url,i.params)?(i.loading=!0,t||i.showLoader(),o.loaderPromise(n,i.config,i.params).then((function(t){e===i.requestOrder?(i.table.options.ajaxResponse&&(t=i.table.options.ajaxResponse.call(i.table,i.url,i.params,t)),s(t),i.hideLoader(),i.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")})).catch((function(t){console.error("Ajax Load Error: ",t),i.table.options.ajaxError.call(i.table,t),i.showError(),setTimeout((function(){i.hideLoader()}),3e3),i.loading=!1,a(t)}))):a()}))},Ajax.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(t,e,o){return t&&o&&Object.keys(o).length&&(e.method&&"get"!=e.method.toLowerCase()||(e.method="get",t+=(t.includes("?")?"&":"?")+this.modules.ajax.serializeParams(o))),t},Ajax.prototype.defaultLoaderPromise=function(t,e,o){var i,n=this;return new Promise((function(s,a){if(t=n.urlGenerator.call(n.table,t,e,o),"GET"!=e.method.toUpperCase())if(i="object"===_typeof(n.table.options.ajaxContentType)?n.table.options.ajaxContentType:n.contentTypeFormatters[n.table.options.ajaxContentType]){for(var r in i.headers)e.headers||(e.headers={}),void 0===e.headers[r]&&(e.headers[r]=i.headers[r]);e.body=i.body.call(n,t,e,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",n.table.options.ajaxContentType);t?(void 0===e.headers&&(e.headers={}),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),void 0===e.headers["X-Requested-With"]&&(e.headers["X-Requested-With"]="XMLHttpRequest"),void 0===e.mode&&(e.mode="cors"),"cors"==e.mode?(void 0===e.headers["Access-Control-Allow-Origin"]&&(e.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===e.credentials&&(e.credentials="same-origin")):void 0===e.credentials&&(e.credentials="include"),fetch(t,e).then((function(t){t.ok?t.json().then((function(t){s(t)})).catch((function(t){a(t),console.warn("Ajax Load Error - Invalid JSON returned",t)})):(console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText),a(t))})).catch((function(t){console.error("Ajax Load Error - Connection Error: ",t),a(t)}))):(console.warn("Ajax Load Error - No URL Set"),s([]))}))},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(t,e,o){return JSON.stringify(o)}},form:{headers:{},body:function(t,e,o){var i=this.generateParamsList(o),n=new FormData;return i.forEach((function(t){n.append(t.key,t.value)})),n}}},Tabulator.prototype.registerModule("ajax",Ajax);var CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t},CalcComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var e=t.definition,o={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(_typeof(e.topCalc)){case"string":this.calculations[e.topCalc]?o.topCalc=this.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":o.topCalc=e.topCalc}o.topCalc&&(t.modules.columnCalcs=o,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(e.bottomCalc){switch(_typeof(e.bottomCalc)){case"string":this.calculations[e.bottomCalc]?o.botCalc=this.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":o.botCalc=e.bottomCalc}o.botCalc&&(t.modules.columnCalcs=o,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var e;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),e=this.generateRow("top",this.rowsToData(t)),this.topRow=e;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(e.getElement()),e.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(e.getElement()),e.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&table.modules.groupRows.getChildGroups().forEach((function(e){t.recalcGroup(e)})))},ColumnCalcs.prototype.recalcGroup=function(t){var e,o;t&&t.calcs&&(t.calcs.bottom&&(e=this.rowsToData(t.rows),o=this.generateRowData("bottom",e),t.calcs.bottom.updateData(o),t.calcs.bottom.reinitialize()),t.calcs.top&&(e=this.rowsToData(t.rows),o=this.generateRowData("top",e),t.calcs.top.updateData(o),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var e=this,o=[];return t.forEach((function(t){if(o.push(t.getData()),e.table.options.dataTree&&e.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var i=e.rowsToData(e.table.modules.dataTree.getFilteredTreeChildren(t));o=o.concat(i)}})),o},ColumnCalcs.prototype.generateRow=function(t,e){var o,i=this,n=this.generateRowData(t,e);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),o=new Row(n,this,"calc"),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),o.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),o.component=!1,o.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},o.generateCells=function(){var e=[];i.table.columnManager.columnsByIndex.forEach((function(n){i.genColumn.setField(n.getField()),i.genColumn.hozAlign=n.hozAlign,n.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(n.definition[t+"CalcFormatter"]),params:n.definition[t+"CalcFormatterParams"]||{}}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=n.definition.cssClass;var s=new Cell(i.genColumn,o);s.getElement(),s.column=n,s.setWidth(),n.cells.push(s),e.push(s),n.visible||s.hide()})),this.cells=e},o},ColumnCalcs.prototype.generateRowData=function(t,e){var o,i,n={},s="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return s.forEach((function(t){var s=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(e.forEach((function(e){s.push(t.getFieldValue(e))})),i=a+"Params",o="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](s,e):t.modules.columnCalcs[i],t.setFieldValue(n,t.modules.columnCalcs[a](s,e,o)))})),n},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((function(o){e[o.getKey()]=t.getGroupResults(o)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var e=this,o=t._getSelf(),i=t.getSubGroups(),n={};return i.forEach((function(t){n[t.getKey()]=e.getGroupResults(t)})),{top:o.calcs.top?o.calcs.top.getData():{},bottom:o.calcs.bottom?o.calcs.bottom.getData():{},groups:n}},ColumnCalcs.prototype.calculations={avg:function(t,e,o){var i=0,n=void 0!==o.precision?o.precision:2;return t.length&&(i=t.reduce((function(t,e){return Number(t)+Number(e)})),i/=t.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))>i||null===i)&&(i=t)})),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=o.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,e){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(t,e){return o.dataTreeStartExpanded[e]}}},DataTree.prototype.initializeRow=function(t){var e=t.getData()[this.field],o=Array.isArray(e),i=o||!o&&"object"===(void 0===e?"undefined":_typeof(e))&&null!==e;!i&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!i&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!i&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:i}},DataTree.prototype.layoutRow=function(t){var e=(this.elementField?t.getCell(this.elementField):t.getCells()[0]).getElement(),o=t.modules.dataTree;o.branchEl&&(o.branchEl.parentNode&&o.branchEl.parentNode.removeChild(o.branchEl),o.branchEl=!1),o.controlEl&&(o.controlEl.parentNode&&o.controlEl.parentNode.removeChild(o.controlEl),o.controlEl=!1),this.generateControlElement(t,e),t.getElement().classList.add("tabulator-tree-level-"+o.index),o.index&&(this.branchEl?(o.branchEl=this.branchEl.cloneNode(!0),e.insertBefore(o.branchEl,e.firstChild),this.table.rtl?o.branchEl.style.marginRight=(o.branchEl.offsetWidth+o.branchEl.style.marginLeft)*(o.index-1)+o.index*this.indent+"px":o.branchEl.style.marginLeft=(o.branchEl.offsetWidth+o.branchEl.style.marginRight)*(o.index-1)+o.index*this.indent+"px"):this.table.rtl?e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+o.index*this.indent+"px":e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+o.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,n=(e=e||t.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.collapseRow(t)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.expandRow(t)}))),i.controlEl.addEventListener("mousedown",(function(t){t.stopPropagation()})),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},DataTree.prototype.setDisplayIndex=function(t){this.displayIndex=t},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(t){var e=this,o=[];return t.forEach((function(t,i){var n;o.push(t),t instanceof Row&&(t.create(),(n=t.modules.dataTree.children).index||!1===n.children||e.getChildren(t).forEach((function(t){t.create(),o.push(t)})))})),o},DataTree.prototype.getChildren=function(t){var e=this,o=t.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(t)),i=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(i),i.forEach((function(t){n.push(t),e.getChildren(t).forEach((function(t){n.push(t)}))}))),n},DataTree.prototype.generateChildren=function(t){var e=this,o=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((function(i){var n=new Row(i||{},e.table.rowManager);n.create(),n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.children&&(n.modules.dataTree.open=e.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)})),o},DataTree.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},DataTree.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(e.children):e.children).forEach((function(t){t instanceof Row&&o.push(t)}))),o},DataTree.prototype.rowDelete=function(t){var e,o=t.modules.dataTree.parent;o&&(!1!==(e=this.findChildIndex(t,o))&&o.data[this.field].splice(e,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(t,e,o,i){var n=!1;"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(t.data[this.field])||(t.data[this.field]=[],t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,t))&&t.data[this.field].splice(o?n:n+1,0,e),!1===n&&(o?t.data[this.field].unshift(e):t.data[this.field].push(e)),this.initializeRow(t),this.layoutRow(t),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(t,e){var o=this,i=!1;return"object"==(void 0===t?"undefined":_typeof(t))?t instanceof Row?i=t.data:t instanceof RowComponent?i=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.modules.dataTree&&(i=e.modules.dataTree.children.find((function(e){return e instanceof Row&&e.element===t})))&&(i=i.data):i=null!=t&&e.data[this.field].find((function(e){return e.data[o.table.options.index]==t})),i&&(Array.isArray(e.data[this.field])&&(i=e.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},DataTree.prototype.getTreeChildren=function(t,e,o){var i=this,n=t.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(t)),n.children.forEach((function(t){t instanceof Row&&(s.push(e?t.getComponent():t),o&&(s=s.concat(i.getTreeChildren(t,e,o))))}))),s},DataTree.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||t.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);var Download=function(t){this.table=t};Download.prototype.download=function(t,e,o,i,n){var s=this,a=!1;if("function"==typeof t?a=t:s.downloaders[t]?a=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),a){var r=this.generateExportList(i);a.call(this.table,r,o||{},(function(o,i){n?!0===n?s.triggerDownload(o,i,t,e,!0):n(o):s.triggerDownload(o,i,t,e)}))}},Download.prototype.generateExportList=function(t){var e=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,t||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),e.forEach((function(t){var e;"group"===t.type&&(e=t.columns[0],o&&o[t.indent]&&(e.value=o[t.indent](e.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)))})),e},Download.prototype.triggerDownload=function(t,e,o,i,n){var s=document.createElement("a"),a=new Blob([t],{type:e});i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,t,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},Download.prototype.downloaders={csv:function(t,e,o){var i=e&&e.delimiter?e.delimiter:",",n=[],s=[];t.forEach((function(t){var e=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(t,e){t&&1===t.depth&&(s[e]=void 0===t.value||null===t.value?"":'"'+String(t.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((function(t){if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}e.push('"'+String(t.value).split('"').join('""')+'"')}})),n.push(e.join(i))}})),s.length&&n.unshift(s.join(i)),n=n.join("\n"),e.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(t,e,o){var i=[];t.forEach((function(t){var e={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((function(t){t&&(e[t.component.getField()]=t.value)})),i.push(e)}})),o(i=JSON.stringify(i,null,"\t"),"application/json")},pdf:function(t,e,o){var i=[],n=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},r=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},u=e&&e.title?e.title:"";function c(t,e){var o=[];return t.columns.forEach((function(t){var i;if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}i={content:t.value,colSpan:t.width,rowSpan:t.height},e&&(i.styles=e),o.push(i)}else o.push("")})),o}l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),t.forEach((function(t){switch(t.type){case"header":i.push(c(t));break;case"group":n.push(c(t,a));break;case"calc":n.push(c(t,r));break;case"row":n.push(c(t))}}));var d=new jsPDF(l);e&&e.autoTable&&(s="function"==typeof e.autoTable?e.autoTable(d)||{}:e.autoTable),u&&(s.addPageContent=function(t){d.text(u,40,30)}),s.head=i,s.body=n,d.autoTable(s),e&&e.documentProcessing&&e.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,o){var i=e.sheetName||"Sheet1",n=XLSX.utils.book_new();function s(){var e=[],o=[],i={},n={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((function(t,e){return t+(e&&e.width?e.width:1)}),0):0,r:t.length}};return t.forEach((function(t,i){var n=[];t.columns.forEach((function(t,e){t?(n.push(t.value instanceof Date||"object"!==_typeof(t.value)?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&o.push({s:{r:i,c:e},e:{r:i+t.height-1,c:e+t.width-1}})):n.push("")})),e.push(n)})),XLSX.utils.sheet_add_aoa(i,e),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}if(n.SheetNames=[],n.Sheets={},e.sheetOnly)o(s());else{if(e.sheets)for(var a in e.sheets)!0===e.sheets[a]?(n.SheetNames.push(a),n.Sheets[a]=s()):(n.SheetNames.push(a),this.modules.comms.send(e.sheets[a],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(t){n.Sheets[a]=t}}));else n.SheetNames.push(i),n.Sheets[i]=s();e.documentProcessing&&(n=e.documentProcessing(n)),o(function(t){for(var e=new ArrayBuffer(t.length),o=new Uint8Array(e),i=0;i!=t.length;++i)o[i]=255&t.charCodeAt(i);return e}(XLSX.write(n,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(t,e,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(t),"text/html")}},Tabulator.prototype.registerModule("download",Download);var Edit=function(t){this.table=t,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(t){var e={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(_typeof(t.definition.editor)){case"string":"tick"===t.definition.editor&&(t.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.editor]?e.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":e.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?("tick"===t.definition.formatter&&(t.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.formatter]?e.editor=this.editors[t.definition.formatter]:e.editor=this.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}e.editor&&(t.modules.edit=e)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(t){var e,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,e=o.getElement(),t?o.validate():e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell,e=this.currentCell.getComponent();this.clearEditor(!0),t.setValueActual(t.getValue()),t.cellRendered(),("textarea"==t.column.definition.editor||t.column.definition.variableHeight)&&t.row.normalizeHeight(!0),t.column.cellEvents.cellEditCancelled&&t.column.cellEvents.cellEditCancelled.call(this.table,e),this.table.options.cellEditCancelled.call(this.table,e)}},Edit.prototype.bindEditor=function(t){var e=this,o=t.getElement(!0);o.setAttribute("tabindex",0),o.addEventListener("click",(function(t){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})})),o.addEventListener("mousedown",(function(t){2===t.button?t.preventDefault():e.mouseClick=!0})),o.addEventListener("focus",(function(o){e.recursionBlock||e.edit(t,o,!1)}))},Edit.prototype.focusCellNoEvent=function(t,e){this.recursionBlock=!0,e&&"ie"===this.table.browser||t.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(t,e){this.focusCellNoEvent(t),this.edit(t,!1,e)},Edit.prototype.focusScrollAdjust=function(t){if("virtual"==this.table.rowManager.getRenderMode()){var e=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=t.row.getElement();i.offsetTop;i.offsetTopo&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=t.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),a.offsetLefts&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},Edit.prototype.edit=function(t,e,o){var i,n,s,a=this,r=!0,l=function(){},u=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,u.blur(),!1;switch(e&&e.stopPropagation(),_typeof(t.column.modules.edit.check)){case"function":r=t.column.modules.edit.check(t.getComponent());break;case"boolean":r=t.column.modules.edit.check}if(r||o){if(a.cancelEdit(),a.currentCell=t,this.focusScrollAdjust(t),n=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.cellEvents.cellClick&&t.column.cellEvents.cellClick.call(this.table,e,n)),t.column.cellEvents.cellEditing&&t.column.cellEvents.cellEditing.call(this.table,n),a.table.options.cellEditing.call(this.table,n),s="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(n):t.column.modules.edit.params,!1===(i=t.column.modules.edit.editor.call(a,n,(function(t){l=t}),(function(e){if(a.currentCell===t){var o=!0;return t.column.modules.validate&&a.table.modExists("validate")&&"manual"!=a.table.options.validationMode&&(o=a.table.modules.validate.validate(t.column.modules.validate,t,e)),!0===o||"highlight"===a.table.options.validationMode?(a.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==a.editedCells.indexOf(t)&&a.editedCells.push(t),t.setValue(e,!0),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t),!0===o||(u.classList.add("tabulator-validation-fail"),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)):(a.invalidEdit=!0,u.classList.add("tabulator-validation-fail"),a.focusCellNoEvent(t,!0),l(),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)}}),(function(){a.currentCell===t&&(a.cancelEdit(),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t))}),s)))return u.blur(),!1;if(!(i instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",i),u.blur(),!1;for(u.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");u.firstChild;)u.removeChild(u.firstChild);u.appendChild(i),l();for(var c=u.children,d=0;d46){if(a>=o.length)return e.preventDefault(),e.stopPropagation(),!1,!1;switch(o[a]){case i:if(r.toUpperCase()==r.toLowerCase())return e.preventDefault(),e.stopPropagation(),!1,!1;break;case n:if(isNaN(r))return e.preventDefault(),e.stopPropagation(),!1,!1;break;case s:break;default:if(r!==o[a])return e.preventDefault(),e.stopPropagation(),!1,!1}!0}})),t.addEventListener("keyup",(function(o){o.keyCode>46&&e.maskAutoFill&&a(t.value.length)})),t.placeholder||(t.placeholder=o),e.maskAutoFill&&a(t.value.length)},Edit.prototype.getEditedCells=function(){var t=[];return this.editedCells.forEach((function(e){t.push(e.getComponent())})),t},Edit.prototype.clearEdited=function(t){var e;t.modules.edit&&t.modules.edit.edited&&(t.modules.edit.edited=!1,t.modules.validate&&(t.modules.validate.invalid=!1)),(e=this.editedCells.indexOf(t))>-1&&this.editedCells.splice(e,1)},Edit.prototype.editors={input:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(t){null==s&&""!==a.value||a.value!==s?o(a.value)&&(s=a.value):i()}return a.value=void 0!==s?s:"",e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("change",l),a.addEventListener("blur",l),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i();break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(a,n),a},textarea:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"hybrid",r=String(null!=s?s:""),l=((r.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),u=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);function d(e){null==s&&""!==l.value||l.value!==s?(o(l.value)&&(s=l.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):i()}return l.value=r,e((function(){l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",t.getRow().normalizeHeight()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keyup",(function(){l.style.height="";var e=l.scrollHeight;l.style.height=e+"px",e!=u&&(u=e,t.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(t){switch(t.keyCode){case 27:i();break;case 38:("editor"==a||"hybrid"==a&&l.selectionStart)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 40:("editor"==a||"hybrid"==a&&l.selectionStart!==l.value.length)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(l,n),l},number:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"editor",r=document.createElement("input");if(r.setAttribute("type","number"),void 0!==n.max&&r.setAttribute("max",n.max),void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);r.value=s;var u=function(t){c()};function c(){var t=r.value;isNaN(t)||""===t||(t=Number(t)),t!==s?o(t)&&(s=t):i()}return e((function(){r.removeEventListener("blur",u),r.focus({preventScroll:!0}),r.style.height="100%",r.addEventListener("blur",u)})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:i();break;case 38:case 40:"editor"==a&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(r,n),r},range:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),void 0!==n.max&&a.setAttribute("max",n.max),void 0!==n.min&&a.setAttribute("min",n.min),void 0!==n.step&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=s?o(t)&&(s=t):i()}return a.value=s,e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("blur",(function(t){l()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i()}})),a},select:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?Array.isArray(l)?l:[l]:void 0!==n.defaultValue?n.defaultValue:[],d=document.createElement("input"),h=document.createElement("div"),p=n.multiselect,m=[],f={},g=[],b=[],v=!0,w=!1,y="",C=null;function E(e){var o,i={},n=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?n.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})):console.warn("unable to find matching column to create select lookup list:",e),Object.keys(i)}function R(e,o){var i=[],s=[];function a(t){t={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1};return o.indexOf(t.value)>-1&&M(t),i.push(t),s.push(t),t}if("function"==typeof e&&(e=e(t)),Array.isArray(e))e.forEach((function(t){var e;"object"===(void 0===t?"undefined":_typeof(t))?t.options?(e={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1},s.push(e),t.options.forEach((function(t){a(t)}))):a(t):(e={label:t,value:t,element:!1},o.indexOf(e.value)>-1&&M(e),i.push(e),s.push(e))}));else for(var r in e){var l={label:e[r],value:r,element:!1};o.indexOf(l.value)>-1&&M(l),i.push(l),s.push(l)}n.sortValuesList&&(i.sort((function(t,e){return t.labele.label?1:0})),s.sort((function(t,e){return t.labele.label?1:0})),"asc"!==n.sortValuesList&&(i.reverse(),s.reverse())),m=i,g=s,function(){for(;h.firstChild;)h.removeChild(h.firstChild);g.forEach((function(e){var o=e.element;if(!o){if(o=document.createElement("div"),e.label=n.listItemFormatter?n.listItemFormatter(e.value,e.label,t,o,e.itemParams):e.label,e.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label,o.addEventListener("click",(function(){w=!0,setTimeout((function(){w=!1}),10),p?(L(e),d.focus()):D(e)})),b.indexOf(e)>-1&&o.classList.add("active")),e.elementAttributes&&"object"==_typeof(e.elementAttributes))for(var i in e.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,d.getAttribute(i)+e.elementAttributes["+"+i])):o.setAttribute(i,e.elementAttributes[i]);o.addEventListener("mousedown",(function(){v=!1,setTimeout((function(){v=!0}),10)})),e.element=o}h.appendChild(o)}))}()}function x(t,e){!p&&f&&f.element&&f.element.classList.remove("active"),f&&f.element&&f.element.classList.remove("focused"),f=t,t.element&&(t.element.classList.add("focused"),e&&t.element.classList.add("active")),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(t){-1==b.indexOf(t)&&(b.push(t),x(t,!0)),k()}function T(t){var e=b[t];t>-1&&(b.splice(t,1),e.element&&e.element.classList.remove("active"))}function L(t){t||(t=f);var e=b.indexOf(t);e>-1?T(e):(!0!==p&&b.length>=p&&T(0),M(t)),k()}function D(t){H(),t||(t=f),t&&(d.value=t.label,o(t.value)),c=d.value}function z(t){t||H();var e=[];b.forEach((function(t){e.push(t.value)})),c=d.value,o(e)}function k(){var t=[];b.forEach((function(e){t.push(e.label)})),d.value=t.join(", "),!1===a.currentCell&&z(!0)}function S(){H(),i()}function H(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",S)}if((Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),d.setAttribute("type","text"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",d.style.cursor="default",d.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var P in n.elementAttributes)"+"==P.charAt(0)?(P=P.slice(1),d.setAttribute(P,d.getAttribute(P)+n.elementAttributes["+"+P])):d.setAttribute(P,n.elementAttributes[P]);return d.value=void 0!==l||null===l?l:"",d.addEventListener("search",(function(t){d.value||(!function(){for(var t=b.length,e=0;e0&&x(m[e-1],!p));break;case 40:e=m.indexOf(f),("editor"==u||"hybrid"==u&&e=38&&t.keyCode<=90&&function(t){clearTimeout(C);var e=String.fromCharCode(event.keyCode).toLowerCase();y+=e.toLowerCase();var o=m.find((function(t){return void 0!==t.label&&t.label.toLowerCase().startsWith(y)}));o&&x(o,!p),C=setTimeout((function(){y=""}),800)}(t.keyCode)}})),d.addEventListener("blur",(function(t){v&&(p?z():S())})),d.addEventListener("focus",(function(t){w||function(){if(b=[],!h.parentNode){!0===n.values?R(E(),c):"string"==typeof n.values?R(E(n.values),c):R(n.values||[],c);var t=Tabulator.prototype.helpers.elOffset(r);h.style.minWidth=r.offsetWidth+"px",h.style.top=t.top+r.offsetHeight+"px",h.style.left=t.left+"px",h.addEventListener("mousedown",(function(t){v=!1,setTimeout((function(){v=!0}),10)})),document.body.appendChild(h)}}()})),(h=document.createElement("div")).classList.add("tabulator-edit-select-list"),e((function(){d.style.height="100%",d.focus({preventScroll:!0})})),setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",S)}),10),d},autocomplete:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?l:void 0!==n.defaultValue?n.defaultValue:"",d=document.createElement("input"),h=document.createElement("div"),p=[],m=!1,f=!0,g=!1;if(d.setAttribute("type","search"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var b in n.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),d.setAttribute(b,d.getAttribute(b)+n.elementAttributes["+"+b])):d.setAttribute(b,n.elementAttributes[b]);function v(){!0===n.values?g=w():"string"==typeof n.values&&(g=w(n.values))}function w(e){var o,i={},s=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?(s.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",e),i}function y(t,e){var o,i,s=[];o=g||(n.values||[]),n.searchFunc?(s=n.searchFunc(t,o))instanceof Promise?(C(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then((function(t){x(E(t),e)})).catch((function(t){console.err("error in autocomplete search promise:",t)}))):x(E(s),e):(i=E(o),""===t?n.showListOnEmpty&&(s=i):i.forEach((function(e){null===e.value&&void 0===e.value||(String(e.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&s.push(e)})),x(s,e))}function C(t){var e=document.createElement("div");R(),!1!==t&&(e.classList.add("tabulator-edit-select-list-notice"),e.tabIndex=0,t instanceof Node?e.appendChild(t):e.innerHTML=t,h.appendChild(e))}function E(t){var e=[];if(Array.isArray(t))t.forEach((function(t){var o={};"object"===(void 0===t?"undefined":_typeof(t))?(o.title=n.listItemFormatter?n.listItemFormatter(t.value,t.label):t.label,o.value=t.value):(o.title=n.listItemFormatter?n.listItemFormatter(t,t):t,o.value=t),e.push(o)}));else for(var o in t){var i={title:n.listItemFormatter?n.listItemFormatter(o,t[o]):t[o],value:o};e.push(i)}return e}function R(){for(;h.firstChild;)h.removeChild(h.firstChild)}function x(t,e){t.length?function(t,e){var o=!1;R(),(p=t).forEach((function(t){var i=t.element;i||((i=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=t.title,i.addEventListener("click",(function(e){T(t),M()})),i.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),t.element=i,e&&t.value==l&&(d.value=t.title,t.element.classList.add("active"),o=!0),t===m&&(t.element.classList.add("active"),o=!0)),h.appendChild(i)})),o||T(!1)}(t,e):n.emptyPlaceholder&&C(n.emptyPlaceholder)}function M(){L(),m?l!==m.value?(l=m.value,d.value=m.title,o(m.value)):i():n.freetext||n.allowEmpty&&""===d.value?(l=d.value,o(d.value)):i()}function T(t,e){m&&m.element&&m.element.classList.remove("active"),m=t,t&&t.element&&t.element.classList.add("active"),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function L(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",D)}function D(){L(),i()}return h.classList.add("tabulator-edit-select-list"),h.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),d.addEventListener("keydown",(function(t){var e;switch(t.keyCode){case 38:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),T(e>0&&p[e-1]));break;case 40:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e'):("ie"==s.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='')}))}function m(t){var e=document.createElement("span"),i=h.cloneNode(!0);c.push(i),e.addEventListener("mouseenter",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),p(t)})),e.addEventListener("mousemove",(function(t){t.stopPropagation(),t.stopImmediatePropagation()})),e.addEventListener("click",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),o(t),a.blur()})),e.appendChild(i),d.appendChild(e)}function f(t){r=t,p(t)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",h.setAttribute("width",u),h.setAttribute("height",u),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var g in n.elementAttributes)"+"==g.charAt(0)?(g=g.slice(1),d.setAttribute(g,d.getAttribute(g)+n.elementAttributes["+"+g])):d.setAttribute(g,n.elementAttributes[g]);for(var b=1;b<=l;b++)m(b);return p(r=Math.min(parseInt(r),l)),d.addEventListener("mousemove",(function(t){p(0)})),d.addEventListener("click",(function(t){o(0)})),a.addEventListener("blur",(function(t){i()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:f(r+1);break;case 37:f(r-1);break;case 13:o(r);break;case 27:i()}})),d},progress:function(t,e,o,i,n){var s,a,r=t.getElement(),l=void 0===n.max?r.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?r.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,c=(l-u)/100,d=t.getValue()||0,h=document.createElement("div"),p=document.createElement("div");function m(){var t=window.getComputedStyle(r,null),e=c*Math.round(p.offsetWidth/((r.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+u;o(e),r.setAttribute("aria-valuenow",e),r.setAttribute("aria-label",d)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);return r.style.padding="4px 4px",d=Math.min(parseFloat(d),l),d=Math.max(parseFloat(d),u),d=Math.round((d-u)/c),p.style.width=d+"%",r.setAttribute("aria-valuemin",u),r.setAttribute("aria-valuemax",l),p.appendChild(h),h.addEventListener("mousedown",(function(t){s=t.screenX,a=p.offsetWidth})),h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"})),r.addEventListener("mousemove",(function(t){s&&(p.style.width=a+t.screenX-s+"px")})),r.addEventListener("mouseup",(function(t){s&&(t.stopPropagation(),t.stopImmediatePropagation(),s=!1,a=!1,m())})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault(),p.style.width=p.clientWidth+r.clientWidth/100+"px";break;case 37:t.preventDefault(),p.style.width=p.clientWidth-r.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:i()}})),r.addEventListener("blur",(function(){i()})),p},tickCross:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input"),r=n.tristate,l=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),a.setAttribute(c,a.getAttribute(c)+n.elementAttributes["+"+c])):a.setAttribute(c,n.elementAttributes[c]);function d(t){return r?t?u?l:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,a.checked):a.checked}return a.value=s,!r||void 0!==s&&s!==l&&""!==s||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e((function(){a.focus({preventScroll:!0})})),a.checked=!0===s||"true"===s||"True"===s||1===s,e((function(){a.focus()})),a.addEventListener("change",(function(t){o(d())})),a.addEventListener("blur",(function(t){o(d(!0))})),a.addEventListener("keydown",(function(t){13==t.keyCode&&o(d()),27==t.keyCode&&i()})),a}},Tabulator.prototype.registerModule("edit",Edit);var ExportRow=function(t,e,o,i){this.type=t,this.columns=e,this.component=o||!1,this.indent=i||0},ExportColumn=function(t,e,o,i,n){this.value=t,this.component=e||!1,this.width=o,this.height=i,this.depth=n},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,i){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},Export.prototype.genereateTable=function(t,e,o,i){var n=this.generateExportList(t,e,o,i);return this.genereateTableElement(n)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach((function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)}));else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(o){var i=t.processColumnGroup(o);i&&e.push(i)})),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i=0,n={title:t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,column:t,depth:1};if(o.length){if(n.subGroups=[],n.width=0,o.forEach((function(t){var o=e.processColumnGroup(t);o&&(n.width+=o.width,n.subGroups.push(o),o.depth>i&&(i=o.depth))})),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){var e=[],o=0,i=[];return t.forEach((function(t){t.depth>o&&(o=t.depth)})),t.forEach((function(t){!function t(i,n){var s=o-n;if(void 0===e[n]&&(e[n]=[]),i.height=i.subGroups?1:s-i.depth+1,e[n].push(i),i.height>1)for(var a=1;a1)for(var r=1;r1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach((function(t,o){switch(t.type){case"header":i.appendChild(e.genereateHeaderElement(t,r,s));break;case"group":n.appendChild(e.genereateGroupElement(t,r,s));break;case"calc":n.appendChild(e.genereateCalcElement(t,r,s));break;case"row":var a=e.genereateRowElement(t,r,s);e.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}})),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var i=this,n=document.createElement("tr");return t.columns.forEach((function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,i.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach((function(t){e.classList.add(t)})),i.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?i.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&i.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),n.appendChild(e)}})),n},Export.prototype.genereateGroupElement=function(t,e,o){var i=document.createElement("tr"),n=document.createElement("td"),s=t.columns[0];return i.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?s.value=e.groupHeader[t.indent](s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?s.value=s.value:s.value=t.component._group.generator(s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+t.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},Export.prototype.genereateCalcElement=function(t,e,o){var i=this.genereateRowElement(t,e,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},Export.prototype.genereateRowElement=function(t,e,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),t.columns.forEach((function(a){if(a){var r=document.createElement("td"),l=a.component._column,u=a.value,c={modules:{},getValue:function(){return u},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(t){r.classList.add(t)})),n.table.modExists("format")&&!1!==n.config.formatCells)u=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===u?"undefined":_typeof(u)){case"object":u=JSON.stringify(u);break;case"undefined":case"null":u="";break;default:u=u}u instanceof Node?r.appendChild(u):r.innerHTML=u,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==l.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&r.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),t.component._row.modules.dataTree.branchEl&&r.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}})),s},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,i||"htmlOutput");return this.genereateHTMLTable(n)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach((function(t){e.style[i[t]]=n.getPropertyValue(t)}))}}},Tabulator.prototype.registerModule("export",Export);var Filter=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(t,e){var o=this,i=t.getField();t.modules.filter={success:function(e){var n,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="",r="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==e){if(t.modules.filter.prevSuccess=e,t.modules.filter.emptyFunc(e))delete o.headerFilters[i];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":o.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,n=function(i){var n=t.definition.headerFilterFuncParams||{},s=t.getFieldValue(i);return n="function"==typeof n?n(e,s,i):n,o.filters[t.definition.headerFilterFunc](e,s,i,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":a=n=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)}}if(!n)switch(s){case"partial":n=function(o){var i=t.getFieldValue(o);return null!=i&&String(i).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like";break;default:n=function(o){return t.getFieldValue(o)==e},a="="}o.headerFilters[i]={value:e,func:n,type:a,params:{}}}r=JSON.stringify(o.headerFilters),o.prevHeaderFilterChangeCheck!==r&&(o.prevHeaderFilterChangeCheck=r,o.changed=!0,o.table.rowManager.filterRefresh())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},Filter.prototype.generateHeaderFilterElement=function(t,e,o){var i,n,s,a,r,l,u,c=this,d=this,h=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},(i=document.createElement("div")).classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":d.table.modules.edit.editors[t.definition.headerFilter]?(n=d.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":n=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?n=t.modules.edit.editor:t.definition.formatter&&d.table.modules.edit.editors[t.definition.formatter]?(n=d.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):n=d.table.modules.edit.editors.input}if(n){if(a={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return i},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u="function"==typeof(u=t.definition.headerFilterParams||{})?u.call(d.table):u,!(s=n.call(this.table.modules.edit,a,(function(){}),h,(function(){}),u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(s instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",s);p?d.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,(function(t){s.setAttribute("placeholder",void 0!==t&&t?t:d.table.modules.localize.getText("headerFilters|default"))})):d.table.modules.localize.bind("headerFilters|default",(function(t){s.setAttribute("placeholder",void 0!==d.column.definition.headerFilterPlaceholder&&d.column.definition.headerFilterPlaceholder?d.column.definition.headerFilterPlaceholder:t)})),s.addEventListener("click",(function(t){t.stopPropagation(),s.focus()})),s.addEventListener("focus",(function(t){var e=c.table.columnManager.element.scrollLeft;e!==c.table.rowManager.element.scrollLeft&&(c.table.rowManager.scrollHorizontal(e),c.table.columnManager.scrollHorizontal(e))})),r=!1,l=function(t){r&&clearTimeout(r),r=setTimeout((function(){h(s.value)}),d.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=s,t.modules.filter.attrType=s.hasAttribute("type")?s.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=s.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(s.addEventListener("keyup",l),s.addEventListener("search",l),"number"==t.modules.filter.attrType&&s.addEventListener("change",(function(t){h(s.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&s.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||s.addEventListener("mousedown",(function(t){t.stopPropagation()}))),i.appendChild(s),t.contentElement.appendChild(i),o||d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="none")}))},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="")}))},Filter.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},Filter.prototype.getHeaderFilterValue=function(t){if(t.modules.filter&&t.modules.filter.headerElement)return t.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",t.getField())},Filter.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e,!0),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Filter.prototype.setFilter=function(t,e,o,i){this.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),this.addFilter(t)},Filter.prototype.addFilter=function(t,e,o,i){var n=this;Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),t.forEach((function(t){(t=n.findFilter(t))&&(n.filterList.push(t),n.changed=!0)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?i=(e=o.table.columnManager.getColumnByField(t.field))?function(i){return o.filters[t.type](t.value,e.getFieldValue(i),i,t.params||{})}:function(e){return o.filters[t.type](t.value,e[t.field],e,t.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},Filter.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach((function(t){(t=e.findFilter(t))&&o.push(t)})),!!o.length&&o},Filter.prototype.getFilters=function(t,e){var o=[];return t&&(o=this.getHeaderFilters()),e&&o.forEach((function(t){"function"==typeof t.type&&(t.type="function")})),o=o.concat(this.filtersToArray(this.filterList,e))},Filter.prototype.filtersToArray=function(t,e){var o=this,i=[];return t.forEach((function(t){var n;Array.isArray(t)?i.push(o.filtersToArray(t,e)):(n={field:t.field,type:t.type,value:t.value},e&&"function"==typeof n.type&&(n.type="function"),i.push(n))})),i},Filter.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},Filter.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach((function(t){var e=-1;(e="object"==_typeof(t.field)?i.filterList.findIndex((function(e){return t===e})):i.filterList.findIndex((function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value})))>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},t.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(e){e.modules.filter.value=null,e.modules.filter.prevSuccess=void 0,t.reloadHeaderFilter(e)})),this.changed=!0},Filter.prototype.search=function(t,e,o,i){var n=this,s=[],a=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach((function(t){(t=n.findFilter(t))&&a.push(t)})),this.table.rowManager.rows.forEach((function(e){var o=!0;a.forEach((function(t){n.filterRecurse(t,e.getData())||(o=!1)})),o&&s.push("data"===t?e.getData("data"):e.getComponent())})),s},Filter.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach((function(t){o.filterRow(t)&&i.push(t)})),o.table.options.dataFiltered&&(i.forEach((function(t){n.push(t.getComponent())})),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},Filter.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();for(var s in o.filterList.forEach((function(t){o.filterRecurse(t,n)||(i=!1)})),o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach((function(t){o.filterRecurse(t,e)&&(i=!0)})):i=t.func(e),i},Filter.prototype.filters={"=":function(t,e,o,i){return e==t},"<":function(t,e,o,i){return e":function(t,e,o,i){return e>t},">=":function(t,e,o,i){return e>=t},"!=":function(t,e,o,i){return e!=t},regex:function(t,e,o,i){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},keywords:function(t,e,o,i){var n=t.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null==e?"":e).toLowerCase(),a=[];return n.forEach((function(t){s.includes(t)&&a.push(!0)})),i.matchAll?a.length===n.length:!!a.length},starts:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().startsWith(t.toLowerCase())},ends:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().endsWith(t.toLowerCase())},in:function(t,e,o,i){return Array.isArray(t)?!t.length||t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},Tabulator.prototype.registerModule("filter",Filter);var Format=function(t){this.table=t};Format.prototype.initializeColumn=function(t){t.modules.format=this.lookupFormatter(t,""),void 0!==t.definition.formatterPrint&&(t.modules.format.print=this.lookupFormatter(t,"Print")),void 0!==t.definition.formatterClipboard&&(t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")),void 0!==t.definition.formatterHtmlOutput&&(t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput"))},Format.prototype.lookupFormatter=function(t,e){var o={params:t.definition["formatter"+e+"Params"]||{}},i=t.definition["formatter"+e];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(t){t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered&&(t.modules.format.renderedCallback(),t.modules.format.rendered=!0)},Format.prototype.formatValue=function(t){var e=t.getComponent(),o="function"==typeof t.column.modules.format.params?t.column.modules.format.params(e):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,e,o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))},Format.prototype.formatExportValue=function(t,e){var o,i=t.column.modules.format[e];if(i){return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,t.getComponent(),o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))}return this.formatValue(t)},Format.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,(function(t){return e[t]}))}return t},Format.prototype.emptyToSpace=function(t){return null==t||""===t?" ":t},Format.prototype.getFormatter=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},Format.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,a,r=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?r.toFixed(h):r,n=(i=String(i).split("."))[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+u+"$2");return d?n+s+c:c+n+s},link:function(t,e,o){var i=t.getValue(),n=e.urlPrefix||"",s=e.download,a=i,r=document.createElement("a");if(e.labelField&&(a=t.getData()[e.labelField]),e.label)switch(_typeof(e.label)){case"string":a=e.label;break;case"function":a=e.label(t)}if(a){if(e.urlField&&(i=t.getData()[e.urlField]),e.url)switch(_typeof(e.url)){case"string":i=e.url;break;case"function":i=e.url(t)}return r.setAttribute("href",n+i),e.target&&r.setAttribute("target",e.target),e.download&&(s="function"==typeof s?s(t):!0===s?"":s,r.setAttribute("download",s)),r.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),r}return" "},image:function(t,e,o){var i=document.createElement("img"),n=t.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+t.getValue()),e.urlSuffix&&(n+=e.urlSuffix),i.setAttribute("src",n),_typeof(e.height)){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height}switch(_typeof(e.width)){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width}return i.addEventListener("load",(function(){t.getRow().normalizeHeight()})),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,a=e.allowTruthy,r=void 0!==e.tickElement?e.tickElement:'',l=void 0!==e.crossElement?e.crossElement:'';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!=i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",a=t.getValue(),r=moment(a,i);return r.isValid()?e.timezone?r.tz(e.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,a=void 0!==e.unit?e.unit:void 0,r=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?r?moment.duration(c.diff(l)).humanize(s):c.diff(l,a)+(s?" "+s:""):!0===n?u:"function"==typeof n?n(u):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var u=r.cloneNode(!0);u.innerHTML=l<=i?'':'',a.appendChild(u)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(t,e,o){var i,n,s=this.sanitizeHTML(t.getValue())||0,a=document.createElement("span"),r=e&&e.max?e.max:100,l=e&&e.min?e.min:0,u=e&&void 0!==e.color?e.color:["red","orange","green"],c="#666666";if(!isNaN(s)&&void 0!==t.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===u?"undefined":_typeof(u)){case"string":c=u;break;case"function":c=u(s);break;case"object":if(Array.isArray(u)){var d=100/u.length,h=Math.floor(n/d);h=Math.min(h,u.length-1),c=u[h=Math.max(h,0)];break}}return a.style.backgroundColor=c,a}},progress:function(t,e,o){var i,n,s,a,r,l=this.sanitizeHTML(t.getValue())||0,u=t.getElement(),c=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=c?parseFloat(l):c,n=parseFloat(n)>=d?parseFloat(n):d,i=(c-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":a=e.legend;break;case"function":a=e.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(e.legendColor)){case"string":r=e.legendColor;break;case"function":r=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),r=e.legendColor[m]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var f=document.createElement("div");if(f.style.display="inline-block",f.style.position="relative",f.style.width=n+"%",f.style.backgroundColor=s,f.style.height="100%",f.setAttribute("data-max",c),f.setAttribute("data-min",d),a){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=h,g.style.width="100%",g.style.color=r,g.innerHTML=a}return o((function(){if(!(t instanceof CellComponent)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",u.appendChild(e),u=e}u.appendChild(f),a&&u.appendChild(g)})),""},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return''},buttonCross:function(t,e,o){return''},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(t,e,o){var i=document.createElement("div"),n=t.getRow()._row.modules.responsiveLayout;function s(t){var e=n.element;n.open=t,e&&(n.open?(i.classList.add("open"),e.style.display=""):(i.classList.remove("open"),e.style.display="none"))}return i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML="+-",t.getElement().classList.add("tabulator-row-handle"),i.addEventListener("click",(function(t){t.stopImmediatePropagation(),s(!n.open)})),s(n.open),i},rowSelection:function(t,e,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",(function(t){t.stopPropagation()})),"function"==typeof t.getRow){var s=t.getRow();s instanceof RowComponent?(n.addEventListener("change",(function(t){s.toggleSelect()})),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",(function(t){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(e.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},Tabulator.prototype.registerModule("format",Format);var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout((function(){e.layout()}),100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach((function(t){"row"===t.type&&e.layoutRow(t)})),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach((function(i,n){if(i.modules.frozen.margin=e._calcSpace(e.leftColumns,n)+e.table.columnManager.scrollLeft+"px",n==e.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=e.getColGroupParentElement(i);o.includes(s)||(e.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else e.layoutElement(i.getElement(),i);t&&i.cells.forEach((function(t){e.layoutElement(t.getElement(!0),i)}))})),this.rightColumns.forEach((function(o,i){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,i+1)+"px",i==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach((function(t){e.layoutElement(t.getElement(!0),o)}))}))},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&t.layoutRow(e)})),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)})),this.rightColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)}))},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,i=0;i-1&&e.splice(o,1)})),e},FrozenRows.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(t){this.rows.indexOf(t);t.modules.frozen?(t.modules.frozen=!1,this.detachRow(t),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(t){var e=this.rows.indexOf(t);if(e>-1){var o=t.getElement();o.parentNode.removeChild(o),this.rows.splice(e,1)}},FrozenRows.prototype.styleRows=function(t){var e=this;this.rows.forEach((function(t,o){e.table.rowManager.styleRow(t,o)}))},Tabulator.prototype.registerModule("frozenRows",FrozenRows);var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,e,o,i,n,s,a){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach((function(e){e.scrollHeader(t)}))},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var e=this.rows.indexOf(t),o=t.getElement();e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var e=[];return e.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(o){e=e.concat(o.getHeadersAndRows(t))})):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom)))),e},Group.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach((function(t){o.push(t.getData(e||"data"))})),o},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach((function(e){t+=e.getRowCount()})):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(t){t.getHeadersAndRows().forEach((function(t){t.detachElement()}))})):this.rows.forEach((function(t){var e=t.getElement();e.parentNode.removeChild(e)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=this.getElement();this.groupList.length?this.groupList.forEach((function(e){e.getHeadersAndRows().forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}))})):this.rows.forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach((function(e){t.push(e.getData())})),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})):this.rows.find((function(e){return e===t}))&&(e=this),e},Group.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.getRows=function(t){var e=[];return this.rows.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach((function(e){t.push(e.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;ti.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",(function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"("+i+" "+(1===i?e:o.groups.items)+")"}})),this.groupIDLookups=[],Array.isArray(e)||e)?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(e)||(e=[e]),e.forEach((function(e,o){var i,n;i="function"==typeof e?e:(n=t.table.columnManager.getColumnByField(e))?function(t){return n.getFieldValue(t)}:function(t){return t[e]},t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})})),o&&(Array.isArray(o)||(o=[o]),o.forEach((function(t){t="function"==typeof t?t:function(){return!0}})),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},GroupRows.prototype.getChildGroups=function(t){var e=this,o=[];return t||(t=this),t.groupList.forEach((function(t){t.groupList.length?o=o.concat(e.getChildGroups(t)):o.push(t)})),o},GroupRows.prototype.wipe=function(){this.groupList.forEach((function(t){t.wipe()}))},GroupRows.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach((function(t){var i={level:0,rowCount:0,headerContent:""},n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach((function(t){o.push(t.getData("data"))})))})),o},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})),e},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(t){e.createGroup(t,0,o)})),t.forEach((function(t){e.assignRowToExistingGroup(t,o)}))):t.forEach((function(t){e.assignRowToGroup(t,o)}))},GroupRows.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new Group(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},GroupRows.prototype.assignRowToExistingGroup=function(t,e){var o="0_"+this.groupIDLookups[0].func(t.getData());this.groups[o]&&this.groups[o].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},GroupRows.prototype.reassignRowToGroup=function(t){var e=t.getGroup(),o=e.getPath(),i=this.getExpectedPath(t);o.length==i.length&&o.every((function(t,e){return t===i[e]}))||(e.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var e=[],o=t.getData();return this.groupIDLookups.forEach((function(t){e.push(t.func(o))})),e},GroupRows.prototype.updateGroupRows=function(t){var e=[];if(this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})),t){var o=this.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==o&&this.setDisplayIndex(o),this.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach((function(e){e.scrollHeader(t)}))},GroupRows.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},Tabulator.prototype.registerModule("groupRows",GroupRows);var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var e=this.history.findIndex((function(e){return e.component===t}));e>-1&&(this.history.splice(e,1),e<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,e){this.history.forEach((function(o){if(o.component instanceof Row)o.component===t&&(o.component=e);else if(o.component instanceof Cell&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}}))},Tabulator.prototype.registerModule("history",History);var HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this.table.element,e=this.table.options,o=(e.columns,t.getElementsByTagName("th")),i=t.getElementsByTagName("tbody")[0],n=[];this.hasIndex=!1,this.table.options.htmlImporting.call(this.table),i=i?i.getElementsByTagName("tr"):[],this._extractOptions(t,e),o.length?this._extractHeaders(o,i):this._generateBlankHeaders(o,i);for(var s=0;s-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach((function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)})),i&&e.action.call(o,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(t.preventDefault(),(e=o.nav()).next()||i&&(o.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i))).then((function(){setTimeout((function(){e.next()}))}))))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings);var Menu=function(t){this.table=t,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};Menu.prototype.initializeColumnHeader=function(t){var e,o=this;t.definition.headerContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.definition.headerContextMenu)),this.tapHold(t,t.definition.headerContextMenu)),t.definition.headerMenu&&((e=document.createElement("span")).classList.add("tabulator-header-menu-button"),e.innerHTML="⋮",e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault(),o.LoadMenuEvent(t,t.definition.headerMenu,e)})),t.titleElement.insertBefore(e,t.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(t,e,o){e="function"==typeof e?e.call(this.table,t.getComponent(),o):e,this.loadMenu(o,t,e)},Menu.prototype.tapHold=function(t,e){var o=this,i=t.getElement(),n=null,s=!1;i.addEventListener("touchstart",(function(i){clearTimeout(n),s=!1,n=setTimeout((function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(t,e,i)}),1e3)}),{passive:!0}),i.addEventListener("touchend",(function(t){clearTimeout(n),n=null,s&&t.preventDefault()}))},Menu.prototype.initializeCell=function(t){t.column.definition.contextMenu&&(t.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.column.definition.contextMenu)),this.tapHold(t,t.column.definition.contextMenu)),t.column.definition.clickMenu&&t.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,t,t.column.definition.clickMenu))},Menu.prototype.initializeRow=function(t){this.table.options.rowContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.rowContextMenu)),this.tapHold(t,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(t){this.table.options.groupContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.groupContextMenu)),this.tapHold(t,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(t,e,o,i){var n=this,s=!(t instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||t.preventDefault(),o&&o.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){n.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}o.forEach((function(t){var o=document.createElement("div"),i=t.label,s=t.disabled;t.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(n.table,e.getComponent())),i instanceof Node?o.appendChild(i):o.innerHTML=i,"function"==typeof s&&(s=s.call(n.table,e.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",(function(t){t.stopPropagation()}))):t.menu&&t.menu.length?o.addEventListener("click",(function(i){i.stopPropagation(),n.hideOldSubMenus(a),n.loadMenu(i,e,t.menu,o)})):t.action&&o.addEventListener("click",(function(o){t.action(o,e.getComponent())})),t.menu&&t.menu.length&&o.classList.add("tabulator-menu-item-submenu")),a.appendChild(o)})),a.addEventListener("click",(function(t){n.hideMenu()})),this.menuElements.push(a),this.positionMenu(a,i,s,t)}},Menu.prototype.hideOldSubMenus=function(t){var e=this.menuElements.indexOf(t);if(e>-1)for(var o=this.menuElements.length-1;o>e;o--){var i=this.menuElements[o];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},Menu.prototype.positionMenu=function(t,e,o,i){var n,s,a,r=this,l=Math.max(document.body.offsetHeight,window.innerHeight);e?(n=(a=Tabulator.prototype.helpers.elOffset(e)).left+e.offsetWidth,s=a.top-1):(n=o?i.touches[0].pageX:i.pageX,s=o?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),t.style.top=s+"px",t.style.left=n+"px",setTimeout((function(){r.table.rowManager.element.addEventListener("scroll",r.blurEvent),document.body.addEventListener("click",r.blurEvent),document.body.addEventListener("contextmenu",r.blurEvent),window.addEventListener("resize",r.blurEvent),document.body.addEventListener("keydown",r.escEvent)}),100),document.body.appendChild(t),s+t.offsetHeight>=l&&(t.style.top="",t.style.bottom=e?l-a.top-e.offsetHeight-1+"px":l-s+"px"),(n+t.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(t.style.left="",t.style.right=e?document.documentElement.offsetWidth-a.left+"px":document.documentElement.offsetWidth-n+"px",this.positionReversedX=!0)},Menu.prototype.isOpen=function(){return!!this.menuElements.length},Menu.prototype.escMenu=function(t){27==t.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuElements.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);var MoveColumns=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},MoveColumns.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-Tabulator.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",(function(e){o.touchMove=!1,1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),o.bindTouchEvents(t)),t.modules.moveColumn=i},MoveColumns.prototype.bindTouchEvents=function(t){var e,o,i,n,s,a,r=this,l=t.getElement(),u=!1;l.addEventListener("touchstart",(function(l){r.checkTimeout=setTimeout((function(){r.touchMove=!0,t,e=t.nextColumn(),i=e?e.getWidth()/2:0,o=t.prevColumn(),n=o?o.getWidth()/2:0,s=0,a=0,u=!1,r.startMove(l,t)}),r.checkPeriod)}),{passive:!0}),l.addEventListener("touchmove",(function(l){var c,d;r.moving&&(r.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?e&&c-s>i&&(d=e)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement().nextSibling),r.moveColumn(d,!0)):o&&-c-a>n&&(d=o)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement()),r.moveColumn(d,!1)),d&&(d,e=d.nextColumn(),s=i,i=e?e.getWidth()/2:0,o=d.prevColumn(),a=n,n=o?o.getWidth()/2:0))}),{passive:!0}),l.addEventListener("touchend",(function(t){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(t)}))},MoveColumns.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)})):t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i)}))},MoveColumns.prototype.endMove=function(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-nt.getHeight()/2?e.toRow===t&&e.toRowAfter||((i=t.getElement()).parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(i=t.getElement()).previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}.bind(e),t.modules.moveRow=o},MoveRows.prototype.initializeRow=function(t){var e,o=this,i={};i.mouseup=function(e){o.tableRowDrop(e,t)}.bind(o),i.mousemove=function(e){var i=t.getElement();e.pageY-Tabulator.prototype.helpers.elOffset(i).top+o.table.rowManager.element.scrollTop>t.getHeight()/2?o.toRow===t&&o.toRowAfter||(i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)):(o.toRow!==t||o.toRowAfter)&&(i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1))}.bind(o),this.hasHandle||((e=t.getElement()).addEventListener("mousedown",(function(e){1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=i},MoveRows.prototype.initializeCell=function(t){var e=this,o=t.getElement(!0);o.addEventListener("mousedown",(function(o){1===o.which&&(e.checkTimeout=setTimeout((function(){e.startMove(o,t.row)}),e.checkPeriod))})),o.addEventListener("mouseup",(function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})),this.bindTouchEvents(t.row,o)},MoveRows.prototype.bindTouchEvents=function(t,e){var o,i,n,s,a,r,l=this,u=!1;e.addEventListener("touchstart",(function(e){l.checkTimeout=setTimeout((function(){l.touchMove=!0,t,o=t.nextRow(),n=o?o.getHeight()/2:0,i=t.prevRow(),s=i?i.getHeight()/2:0,a=0,r=0,u=!1,l.startMove(e,t)}),l.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",(function(e){var c,d;l.moving&&(e.preventDefault(),l.moveHover(e),u||(u=e.touches[0].pageY),(c=e.touches[0].pageY-u)>0?o&&c-a>n&&(d=o)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement().nextSibling),l.moveRow(d,!0)):i&&-c-r>s&&(d=i)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement()),l.moveRow(d,!1)),d&&(d,o=d.nextRow(),a=n,n=o?o.getHeight()/2:0,i=d.prevRow(),r=s,s=i?i.getHeight()/2:0))})),e.addEventListener("touchend",(function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(t),l.touchMove=!1)}))},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},MoveRows.prototype.setStartPosition=function(t,e){var o,i,n=this.touchMove?t.touches[0].pageX:t.pageX,s=this.touchMove?t.touches[0].pageY:t.pageY;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},MoveRows.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},MoveRows.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(t,e,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(t,e,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(t){var e,o=this;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:t})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(t){"string"==typeof t?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t))):o.connectionElements.push(t)})),this.connectionElements.forEach((function(t){var e=function(e){o.elementRowDrop(e,t,o.moving)};t.addEventListener("mouseup",e),t.tabulatorElementDropEvent=e,t.classList.add("tabulator-movingrow-receiving")})))},MoveRows.prototype.disconnectFromTables=function(){var t;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(t){t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent}))},MoveRows.prototype.connect=function(t,e){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},MoveRows.prototype.disconnect=function(t){t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},MoveRows.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(console.trace("drop"),t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},MoveRows.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},MoveRows.prototype.senders={delete:function(t,e,o){t.delete()}},MoveRows.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);var Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupMutator(t.definition[a]))&&(o=!0,i[a]={mutator:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.mutate=i)},Mutator.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},Mutator.prototype.transformRow=function(t,e,o){var i,n="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&this.table.columnManager.traverse((function(s){var a,r,l;s.modules.mutate&&(a=s.modules.mutate[n]||s.modules.mutate.mutator||!1)&&(i=s.getFieldValue(void 0!==o?o:t),"data"!=e&&void 0===i||(l=s.getComponent(),r="function"==typeof a.params?a.params(i,t,e,l):a.params,s.setFieldValue(t,a.mutator(i,t,e,r,l))))})),t},Mutator.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,t.row.getData()),t.column.setFieldValue(i,e),o.mutator(e,i,"edit",o.params,t.getComponent())):e},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator);var Page=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(t=document.createElement("button")).classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var t=this,e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(var o=1;o<5;o++)e.push(this.size*o);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((function(e){var o=document.createElement("option");o.value=e,!0===e?t.table.modules.localize.bind("pagination|all",(function(t){o.innerHTML=t})):o.innerHTML=e,t.pageSizeSelect.appendChild(o)})),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(t){var e,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",(function(t){n.firstBut.innerHTML=t})),n.table.modules.localize.bind("pagination|first_title",(function(t){n.firstBut.setAttribute("aria-label",t),n.firstBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|prev",(function(t){n.prevBut.innerHTML=t})),n.table.modules.localize.bind("pagination|prev_title",(function(t){n.prevBut.setAttribute("aria-label",t),n.prevBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|next",(function(t){n.nextBut.innerHTML=t})),n.table.modules.localize.bind("pagination|next_title",(function(t){n.nextBut.setAttribute("aria-label",t),n.nextBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|last",(function(t){n.lastBut.innerHTML=t})),n.table.modules.localize.bind("pagination|last_title",(function(t){n.lastBut.setAttribute("aria-label",t),n.lastBut.setAttribute("title",t)})),n.firstBut.addEventListener("click",(function(){n.setPage(1).then((function(){})).catch((function(){}))})),n.prevBut.addEventListener("click",(function(){n.previousPage().then((function(){})).catch((function(){}))})),n.nextBut.addEventListener("click",(function(){n.nextPage().then((function(){})).catch((function(){}))})),n.lastBut.addEventListener("click",(function(){n.setPage(n.max).then((function(){})).catch((function(){}))})),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",(function(t){n.pageSizeSelect.setAttribute("aria-label",t),n.pageSizeSelect.setAttribute("title",t),e.innerHTML=t})),n.element.appendChild(e),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",(function(t){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then((function(){})).catch((function(){}))}))),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||t||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:((o=document.createElement("div")).classList.add("tabulator-row"),o.style.visibility=t,(i=document.createElement("div")).classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(t){this.displayIndex=t},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(t){this.max=t?!0===this.size?1:Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(t,e){return("local"==this.mode||t)&&(this.page=1),e&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(t){var e=this,o=this;switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(i,n){(t=parseInt(t))>0&&t<=e.max?(e.page=t,e.trigger().then((function(){i()})).catch((function(){n()})),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),n())}))},Page.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){var n=e.table.rowManager.getDisplayRows(e.displayIndex-1).indexOf(t);if(n>-1){var s=!0===e.size?1:Math.ceil((n+1)/e.size);e.setPage(s).then((function(){o()})).catch((function(){i()}))}else console.warn("Pagination Error - Requested row is not visible"),i()}))},Page.prototype.setPageSize=function(t){!0!==t&&(t=parseInt(t)),t>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var t=Math.floor((this.count-1)/2),e=Math.ceil((this.count-1)/2),o=this.max-this.page+t+10&&n<=this.max&&this.pagesElement.appendChild(this._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),e.table.modules.localize.bind("pagination|page_title",(function(e){o.setAttribute("aria-label",e+" "+t),o.setAttribute("title",e+" "+t)})),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",(function(o){e.setPage(t).then((function(){})).catch((function(){}))})),o},Page.prototype.previousPage=function(){var t=this;return new Promise((function(e,o){t.page>1?(t.page--,t.trigger().then((function(){e()})).catch((function(){o()})),t.table.options.persistence&&t.table.modExists("persistence",!0)&&t.table.modules.persistence.config.page&&t.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())}))},Page.prototype.nextPage=function(){var t=this;return new Promise((function(e,o){t.pagen?i.splice(n,0,t):i.push(t))})),i},Persistence.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find((function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}}))},Persistence.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort());break;case"group":e=this.getGroupConfig();break;case"page":e=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,t,e)},Persistence.prototype.validateSorters=function(t){return t.forEach((function(t){t.column=t.field,delete t.field})),t},Persistence.prototype.getGroupConfig=function(){var t={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(t.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(t.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(t.groupHeader=this.table.options.groupHeader)),t},Persistence.prototype.getPageConfig=function(){var t={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(t.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(t.paginationInitialPage=this.table.modules.page.getPage())),t},Persistence.prototype.parseColumns=function(t){var e=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return t.forEach((function(t){var n,s={},a=t.getDefinition();t.isGroup?(s.title=a.title,s.columns=e.parseColumns(t.getColumns())):(s.field=t.getField(),!0===e.config.columns||null==e.config.columns?(n=Object.keys(a)).push("width"):n=e.config.columns,n.forEach((function(e){switch(e){case"width":s.width=t.getWidth();break;case"visible":s.visible=t.visible;break;default:"function"!=typeof a[e]&&-1===i.indexOf(e)&&(s[e]=a[e])}}))),o.push(s)})),o},Persistence.prototype.readers={local:function(t,e){var o=localStorage.getItem(t+"-"+e);return!!o&&JSON.parse(o)},cookie:function(t,e){var o,i,n=document.cookie,s=t+"-"+e,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),(o=n.indexOf(";"))>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},Persistence.prototype.writers={local:function(t,e,o){localStorage.setItem(t+"-"+e,JSON.stringify(o))},cookie:function(t,e,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=t+"-"+e+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),u=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),"string"==typeof(i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(u),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print);var ReactiveData=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(t){var e,o=this;this.currentVersion++,e=this.currentVersion,o.unwatchData(),o.data=t,o.origFuncs.push=t.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!1)})),o.origFuncs.push.apply(t,arguments)}}),o.origFuncs.unshift=t.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!0)})),o.origFuncs.unshift.apply(t,arguments)}}),o.origFuncs.shift=t.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(t)}}),o.origFuncs.pop=t.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(t)}}),o.origFuncs.splice=t.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?t.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&e===o.currentVersion){if(r&&((i=!!t[s]&&o.table.rowManager.getRowFromDataObject(t[s]))?r.forEach((function(t){o.table.rowManager.addRowActual(t,!0,i,!0)})):(r=r.slice().reverse()).forEach((function(t){o.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==a){var l=t.slice(s,void 0===n[1]?n[1]:s+a);l.forEach((function(t,e){var i=o.table.rowManager.getRowFromDataObject(t);i&&i.deleteActual(e!==l.length-1)}))}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(t,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(t){var e=t.getData();for(var o in this.blocked=!0,e)this.watchKey(t,e,o);this.table.options.dataTree&&this.watchTreeChildren(t),this.blocked=!1},ReactiveData.prototype.watchTreeChildren=function(t){var e=this,o=t.getData()[this.table.options.dataTreeChildField],i={};function n(){e.table.modules.dataTree.initializeRow(t),e.table.modules.dataTree.layoutRow(t),e.table.rowManager.refreshActiveData("tree",!1,!0)}o&&(i.push=o.push,Object.defineProperty(o,"push",{enumerable:!1,configurable:!0,value:function(){var t=i.push.apply(o,arguments);return n(),t}}),i.unshift=o.unshift,Object.defineProperty(o,"unshift",{enumerable:!1,configurable:!0,value:function(){var t=i.unshift.apply(o,arguments);return n(),t}}),i.shift=o.shift,Object.defineProperty(o,"shift",{enumerable:!1,configurable:!0,value:function(){var t=i.shift.call(o);return n(),t}}),i.pop=o.pop,Object.defineProperty(o,"pop",{enumerable:!1,configurable:!0,value:function(){var t=i.pop.call(o);return n(),t}}),i.splice=o.splice,Object.defineProperty(o,"splice",{enumerable:!1,configurable:!0,value:function(){var t=i.splice.apply(o,arguments);return n(),t}}))},ReactiveData.prototype.watchKey=function(t,e,o){var i=this,n=Object.getOwnPropertyDescriptor(e,o),s=e[o],a=this.currentVersion;Object.defineProperty(e,o,{set:function(e){if(s=e,!i.blocked&&a===i.currentVersion){var r={};r[o]=e,t.updateData(r)}n.set&&n.set(e)},get:function(){return n.get&&n.get(),s}})},ReactiveData.prototype.unwatchRow=function(t){var e=t.getData();for(var o in e)Object.defineProperty(e,o,{value:e[o]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData);var ResizeColumns=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",(function(t){t.stopPropagation()}));var l=function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",(function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(t.stopPropagation(),o.reinitializeWidth(!0))})),r.addEventListener("click",(function(t){t.stopPropagation()}));var u=function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s,r))};r.addEventListener("mousedown",u),r.addEventListener("touchstart",u,{passive:!0}),r.addEventListener("dblclick",(function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(t.stopPropagation(),s.reinitializeWidth(!0))})),o.appendChild(a),o.appendChild(r)}},ResizeColumns.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(t,e,o){var i=this;function n(t){i.table.rtl?e.setWidth(i.startWidth-((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)):e.setWidth(i.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(!0),!i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function s(t){i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!1),i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.persistence&&i.table.modExists("persistence",!0)&&i.table.modules.persistence.config.columns&&i.table.modules.persistence.save("columns"),i.table.options.columnResized.call(i.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!0),i.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,i.startWidth=e.getWidth(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns);var ResizeRows=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",(function(t){t.stopPropagation()}));var s=function(o){e.startRow=t,e._mouseDown(o,t,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",(function(t){t.stopPropagation()}));var a=function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(t,e,o){var i=this;function n(t){e.setHeight(i.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-i.startY))}function s(t){document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.rowResized.call(this.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,i.startHeight=e.getHeight(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeRows",ResizeRows);var ResizeTable=function(t){this.table=t,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(t){var e,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.tableHeight==e&&o.tableWidth==n||(o.tableHeight=e,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}})),this.observer.observe(i.element),e=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.containerHeight==e&&o.containerWidth==n||(o.containerHeight=e,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}})),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable);var ResponsiveLayout=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))})),e=(e=e.reverse()).sort((function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index})),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if((n=o.next()).done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},ResponsiveLayout.prototype.initializeRow=function(t){var e;"calc"!==t.type&&((e=document.createElement("div")).classList.add("tabulator-responsive-collapse"),t.modules.responsiveLayout={element:e,open:this.collapseStartOpen},this.collapseStartOpen||(e.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(t){var e=t.getElement();t.modules.responsiveLayout&&(e.appendChild(t.modules.responsiveLayout.element),this.generateCollapsedRowContent(t))},ResponsiveLayout.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(t){var e=this.hiddenColumns.length;t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent(),this.collapseHandleColumn&&!e&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&((e=this.hiddenColumns.indexOf(t))>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var t=!0;t;){var e="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),o=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-e;if(o<0){var i=this.columns[this.index];i?(this.hideColumn(i),this.index++):t=!1}else{var n=this.columns[this.index-1];n&&o>0&&o>=n.getWidth()?(this.showColumn(n),this.index--):t=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach((function(e){t.generateCollapsedRowContent(e)}))},ResponsiveLayout.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);(o=this.collapseFormatter(this.generateCollapsedRowData(t)))&&e.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n=[];return this.hiddenColumns.forEach((function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)})):n.push({field:s.field,title:s.definition.title,value:a}))})),n},ResponsiveLayout.prototype.formatCollapsedData=function(t){var e=document.createElement("table");return t.forEach((function(t){var o,i=document.createElement("tr"),n=document.createElement("td"),s=document.createElement("td"),a=document.createElement("strong");n.appendChild(a),this.table.modules.localize.bind("columns|"+t.field,(function(e){a.innerText=e||t.title})),t.value instanceof Node?((o=document.createElement("div")).appendChild(t.value),s.appendChild(o)):s.innerHTML=t.value,i.appendChild(n),i.appendChild(s),e.appendChild(i)}),this),Object.keys(t).length?e:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);var SelectRow=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout((function(){e.selecting=!1}),50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&("click"===e.table.options.selectableRangeMode?o.addEventListener("click",(function(o){if(o.shiftKey){e.table._clearSelection(),e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,a=i>=n?i:n,r=e.table.rowManager.getDisplayRows().slice(0).splice(s,a-s+1);o.ctrlKey||o.metaKey?(r.forEach((function(o){o!==e.lastClickedRow&&(!0===e.table.options.selectable||e.isRowSelected(t)||e.selectedRows.lengthe.table.options.selectable&&(r=r.slice(0,e.table.options.selectable)),e.selectRows(r)),e.table._clearSelection()}else o.ctrlKey||o.metaKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(void 0,!0),e.selectRows(t),e.lastClickedRow=t)})):(o.addEventListener("click",(function(o){e.table.modExists("edit")&&e.table.modules.edit.getCurrentCell()||e.table._clearSelection(),e.selecting||e.toggleRow(t)})),o.addEventListener("mousedown",(function(o){if(o.shiftKey)return e.table._clearSelection(),e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1})),o.addEventListener("mouseenter",(function(o){e.selecting&&(e.table._clearSelection(),e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))})),o.addEventListener("mouseout",(function(o){e.selecting&&(e.table._clearSelection(),e.selectPrev.unshift(t))}))))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},SelectRow.prototype.selectRows=function(t){var e,o=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":this.table.rowManager.rows.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;case"string":(e=this.table.rowManager.findRow(t))?this._selectRow(e,!0,!0):this.table.rowManager.getRows(t).forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}},SelectRow.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),e||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},SelectRow.prototype.deselectRows=function(t,e){var o,i=this;if(void 0===t){o=i.selectedRows.length;for(var n=0;n-1&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!1,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!1),i.getElement().classList.remove("tabulator-selected"),this.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!1),e||this.table.options.rowDeselected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getData())})),t},SelectRow.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getComponent())})),t},SelectRow.prototype._rowSelectionChanged=function(t){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),t||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e},SelectRow.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t},SelectRow.prototype.childRowSelection=function(t,e){var o=this.table.modules.dataTree.getChildren(t);if(e){var i=o,n=Array.isArray(i),s=0;for(i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}var r=a;this._selectRow(r,!0)}}else{var l=o,u=Array.isArray(l),c=0;for(l=u?l:l[Symbol.iterator]();;){var d;if(u){if(c>=l.length)break;d=l[c++]}else{if((c=l.next()).done)break;d=c.value}var h=d;this._deselectRow(h,!0)}}},Tabulator.prototype.registerModule("selectRow",SelectRow);var Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&((o=t.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,e.appendChild(i),t.modules.sort.element=i,o.addEventListener("click",(function(e){var o="",i=[],s=!1;if(t.modules.sort){if(t.modules.sort.tristate)o="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((s=(i=n.getSort()).findIndex((function(e){return e.field===t.getField()})))>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:t,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(t,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}})))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=[];return this.sortList.forEach((function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})})),t},Sort.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach((function(t){var e;(e=o.table.columnManager.findColumn(t.column))?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)})),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(void 0===(e=t.getFieldValue(o))?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},Sort.prototype.sort=function(t){var e=this,o=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,i=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?o.forEach((function(t,o){e.setColumnHeader(t.column,t.dir)})):(o.forEach((function(t,o){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,i.push(t)),e.setColumnHeader(t.column,t.dir)})),i.length&&e._sortItems(t,i)),e.table.options.dataSorted&&(t.forEach((function(t){n.push(t.getComponent())})),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))}))},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var o=this,i=e.length-1;t.sort((function(t,n){for(var s,a=i;a>=0;a--){var r=e[a];if(0!==(s=o._sortRow(t,n,r.column,r.dir,r.params)))break}return s}))},Sort.prototype._sortRow=function(t,e,o,i,n){var s="asc"==i?t:e,a="asc"==i?e:t;return t=void 0!==(t=o.getFieldValue(s.getData()))?t:"",e=void 0!==(e=o.getFieldValue(a.getData()))?e:"",o.modules.sort.sorter.call(this,t,e,void 0,void 0,o.getComponent(),i,n)},Sort.prototype.sorters={number:function(t,e,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator,u=a.thousandSeparator,c=0;if(t=String(t),e=String(e),u&&(t=t.split(u).join(""),e=e.split(u).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(c*=-1),c},string:function(t,e,o,i,n,s,a){var r,l=a.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),r)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},time:function(t,e,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},datetime:function(t,e,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,r),e=moment(e,r),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,a){var r=a.type||"length",l=a.alignEmptyValues,u=0;function c(t){switch(r){case"length":return t.length;case"sum":return t.reduce((function(t,e){return t+e}));case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce((function(t,e){return t+e}))/t.length}}if(Array.isArray(t)){if(Array.isArray(e))return(t?c(t):0)-(e?c(e):0);l=1}else l=Array.isArray(e)?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},exists:function(t,e,o,i,n,s,a){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,a){var r,l,u,c,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((r=String(t).toLowerCase())===(l=String(e).toLowerCase()))return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;hc?1:-1;return r.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort);var Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach((function(t){(e=o._extractValidator(t))&&i.push(e)})):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},Validate.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return(i=t.indexOf(":"))>-1?(e=t.substring(0,i),o=t.substring(i+1)):e=t,this._buildValidator(e,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,e,o){var i=this,n=[],s=this.invalidCells.indexOf(e);return t&&t.forEach((function(t){t.func.call(i,e.getComponent(),o,t.params)||n.push({type:t.type,parameters:t.params})})),n=!n.length||n,e.modules.validate||(e.modules.validate={}),!0===n?(e.modules.validate.invalid=!1,e.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(e.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&e.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(e)),n},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach((function(e){t.push(e.getComponent())})),t},Validate.prototype.clearValidation=function(t){var e;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(e=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(e,1))},Validate.prototype.validators={integer:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null==e||!isNaN(e)},string:function(t,e,o){return""===e||null==e||isNaN(e)},max:function(t,e,o){return""===e||null==e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null==e||parseFloat(e)>=o},starts:function(t,e,o){return""===e||null==e||String(e).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(t,e,o){return""===e||null==e||String(e).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(t,e,o){return""===e||null==e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null==e||String(e).length<=o},in:function(t,e,o){return""===e||null==e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null==e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null==e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)})),i},required:function(t,e,o){return""!==e&&null!=e}},Tabulator.prototype.registerModule("validate",Validate);export default Tabulator; \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator.js b/Sources/CustomControls/Table/control/dist/js/tabulator.js new file mode 100644 index 0000000..669171e --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator.js @@ -0,0 +1,26530 @@ +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +;(function (global, factory) { + if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define(factory); + } else { + global.Tabulator = factory(); + } +})(this, function () { + + 'use strict'; + + // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + + + if (!Array.prototype.findIndex) { + + Object.defineProperty(Array.prototype, 'findIndex', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + + var k = 0; + + // 6. Repeat, while k < len + + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + + // b. Let kValue be ? Get(O, Pk). + + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + + // d. If testResult is true, return k. + + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return k; + } + + // e. Increase k by 1. + + + k++; + } + + // 7. Return -1. + + + return -1; + } + + }); + } + + // https://tc39.github.io/ecma262/#sec-array.prototype.find + + + if (!Array.prototype.find) { + + Object.defineProperty(Array.prototype, 'find', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + + var k = 0; + + // 6. Repeat, while k < len + + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + + // b. Let kValue be ? Get(O, Pk). + + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + + // d. If testResult is true, return kValue. + + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return kValue; + } + + // e. Increase k by 1. + + + k++; + } + + // 7. Return undefined. + + + return undefined; + } + + }); + } + + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill + + + if (!String.prototype.includes) { + + String.prototype.includes = function (search, start) { + + 'use strict'; + + if (search instanceof RegExp) { + + throw TypeError('first argument must not be a RegExp'); + } + + if (start === undefined) { + start = 0; + } + + return this.indexOf(search, start) !== -1; + }; + } + + // https://tc39.github.io/ecma262/#sec-array.prototype.includes + + + if (!Array.prototype.includes) { + + Object.defineProperty(Array.prototype, 'includes', { + + value: function value(searchElement, fromIndex) { + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + // 1. Let O be ? ToObject(this value). + + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + + var len = o.length >>> 0; + + // 3. If len is 0, return false. + + + if (len === 0) { + + return false; + } + + // 4. Let n be ? ToInteger(fromIndex). + + + // (If fromIndex is undefined, this step produces the value 0.) + + + var n = fromIndex | 0; + + // 5. If n ≥ 0, then + + + // a. Let k be n. + + + // 6. Else n < 0, + + + // a. Let k be len + n. + + + // b. If k < 0, let k be 0. + + + var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + + function sameValueZero(x, y) { + + return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); + } + + // 7. Repeat, while k < len + + + while (k < len) { + + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + + + // b. If SameValueZero(searchElement, elementK) is true, return true. + + + if (sameValueZero(o[k], searchElement)) { + + return true; + } + + // c. Increase k by 1. + + + k++; + } + + // 8. Return false + + + return false; + } + + }); + } + + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill + + + if (typeof Object.assign !== 'function') { + + // Must be writable: true, enumerable: false, configurable: true + + + Object.defineProperty(Object, "assign", { + + value: function assign(target, varArgs) { + // .length of function is 2 + + + 'use strict'; + + if (target === null || target === undefined) { + + throw new TypeError('Cannot convert undefined or null to object'); + } + + var to = Object(target); + + for (var index = 1; index < arguments.length; index++) { + + var nextSource = arguments[index]; + + if (nextSource !== null && nextSource !== undefined) { + + for (var nextKey in nextSource) { + + // Avoid bugs when hasOwnProperty is shadowed + + + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + + to[nextKey] = nextSource[nextKey]; + } + } + } + } + + return to; + }, + + writable: true, + + configurable: true + + }); + } + + var ColumnManager = function ColumnManager(table) { + + this.table = table; //hold parent table + + + this.blockHozScrollEvent = false; + + this.headersElement = this.createHeadersElement(); + + this.element = this.createHeaderElement(); //containing element + + + this.rowManager = null; //hold row manager object + + + this.columns = []; // column definition object + + + this.columnsByIndex = []; //columns by index + + + this.columnsByField = {}; //columns by field + + + this.scrollLeft = 0; + + this.element.insertBefore(this.headersElement, this.element.firstChild); + }; + + ////////////// Setup Functions ///////////////// + + + ColumnManager.prototype.createHeadersElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-headers"); + + return el; + }; + + ColumnManager.prototype.createHeaderElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-header"); + + if (!this.table.options.headerVisible) { + + el.classList.add("tabulator-header-hidden"); + } + + return el; + }; + + ColumnManager.prototype.initialize = function () { + + var self = this; + + //scroll body along with header + + + // self.element.addEventListener("scroll", function(e){ + + + // if(!self.blockHozScrollEvent){ + + + // self.table.rowManager.scrollHorizontal(self.element.scrollLeft); + + + // } + + + // }); + + }; + + //link to row manager + + + ColumnManager.prototype.setRowManager = function (manager) { + + this.rowManager = manager; + }; + + //return containing element + + + ColumnManager.prototype.getElement = function () { + + return this.element; + }; + + //return header containing element + + + ColumnManager.prototype.getHeadersElement = function () { + + return this.headersElement; + }; + + // ColumnManager.prototype.tempScrollBlock = function(){ + + + // clearTimeout(this.blockHozScrollEvent); + + + // this.blockHozScrollEvent = setTimeout(() => {this.blockHozScrollEvent = false;}, 50); + + + // } + + + //scroll horizontally to match table body + + + ColumnManager.prototype.scrollHorizontal = function (left) { + + var hozAdjust = 0, + scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; + + // this.tempScrollBlock(); + + + this.element.scrollLeft = left; + + //adjust for vertical scrollbar moving table when present + + + if (left > scrollWidth) { + + hozAdjust = left - scrollWidth; + + this.element.style.marginLeft = -hozAdjust + "px"; + } else { + + this.element.style.marginLeft = 0; + } + + //keep frozen columns fixed in position + + + //this._calcFrozenColumnsPos(hozAdjust + 3); + + + this.scrollLeft = left; + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.scrollHorizontal(); + } + }; + + ///////////// Column Setup Functions ///////////// + + + ColumnManager.prototype.generateColumnsFromRowData = function (data) { + + var cols = [], + definitions = this.table.options.autoColumnsDefinitions, + row, + sorter; + + if (data && data.length) { + + row = data[0]; + + for (var key in row) { + + var col = { + + field: key, + + title: key + + }; + + var value = row[key]; + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "undefined": + + sorter = "string"; + + break; + + case "boolean": + + sorter = "boolean"; + + break; + + case "object": + + if (Array.isArray(value)) { + + sorter = "array"; + } else { + + sorter = "string"; + } + + break; + + default: + + if (!isNaN(value) && value !== "") { + + sorter = "number"; + } else { + + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + + sorter = "alphanum"; + } else { + + sorter = "string"; + } + } + + break; + + } + + col.sorter = sorter; + + cols.push(col); + } + + if (definitions) { + + switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { + + case "function": + + this.table.options.columns = definitions.call(this.table, cols); + + break; + + case "object": + + if (Array.isArray(definitions)) { + + cols.forEach(function (col) { + + var match = definitions.find(function (def) { + + return def.field === col.field; + }); + + if (match) { + + Object.assign(col, match); + } + }); + } else { + + cols.forEach(function (col) { + + if (definitions[col.field]) { + + Object.assign(col, definitions[col.field]); + } + }); + } + + this.table.options.columns = cols; + + break; + + } + } else { + + this.table.options.columns = cols; + } + + this.setColumns(this.table.options.columns); + } + }; + + ColumnManager.prototype.setColumns = function (cols, row) { + + var self = this; + + while (self.headersElement.firstChild) { + self.headersElement.removeChild(self.headersElement.firstChild); + }self.columns = []; + + self.columnsByIndex = []; + + self.columnsByField = {}; + + //reset frozen columns + + + if (self.table.modExists("frozenColumns")) { + + self.table.modules.frozenColumns.reset(); + } + + cols.forEach(function (def, i) { + + self._addColumn(def); + }); + + self._reIndexColumns(); + + if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { + + self.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(false, true); + } + + self.redraw(true); + }; + + ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { + + var column = new Column(definition, this), + colEl = column.getElement(), + index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; + + if (nextToColumn && index > -1) { + + var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); + + var nextEl = nextToColumn.getElement(); + + if (before) { + + this.columns.splice(parentIndex, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl); + } else { + + this.columns.splice(parentIndex + 1, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); + } + } else { + + if (before) { + + this.columns.unshift(column); + + this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); + } else { + + this.columns.push(column); + + this.headersElement.appendChild(column.getElement()); + } + + column.columnRendered(); + } + + return column; + }; + + ColumnManager.prototype.registerColumnField = function (col) { + + if (col.definition.field) { + + this.columnsByField[col.definition.field] = col; + } + }; + + ColumnManager.prototype.registerColumnPosition = function (col) { + + this.columnsByIndex.push(col); + }; + + ColumnManager.prototype._reIndexColumns = function () { + + this.columnsByIndex = []; + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); + }; + + //ensure column headers take up the correct amount of space in column groups + + + ColumnManager.prototype._verticalAlignHeaders = function () { + + var self = this, + minHeight = 0; + + self.columns.forEach(function (column) { + + var height; + + column.clearVerticalAlign(); + + height = column.getHeight(); + + if (height > minHeight) { + + minHeight = height; + } + }); + + self.columns.forEach(function (column) { + + column.verticalAlign(self.table.options.columnHeaderVertAlign, minHeight); + }); + + self.rowManager.adjustTableSize(); + }; + + //////////////// Column Details ///////////////// + + + ColumnManager.prototype.findColumn = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Column) { + + //subject is column element + + + return subject; + } else if (subject instanceof ColumnComponent) { + + //subject is public column component + + + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + + //subject is a HTML element of the column header + + + var match = self.columns.find(function (column) { + + return column.element === subject; + }); + + return match || false; + } + } else { + + //subject should be treated as the field name of the column + + + return this.columnsByField[subject] || false; + } + + //catch all for any other type of input + + + return false; + }; + + ColumnManager.prototype.getColumnByField = function (field) { + + return this.columnsByField[field]; + }; + + ColumnManager.prototype.getColumnsByFieldRoot = function (root) { + var _this = this; + + var matches = []; + + Object.keys(this.columnsByField).forEach(function (field) { + + var fieldRoot = field.split(".")[0]; + + if (fieldRoot === root) { + + matches.push(_this.columnsByField[field]); + } + }); + + return matches; + }; + + ColumnManager.prototype.getColumnByIndex = function (index) { + + return this.columnsByIndex[index]; + }; + + ColumnManager.prototype.getFirstVisibileColumn = function (index) { + + var index = this.columnsByIndex.findIndex(function (col) { + + return col.visible; + }); + + return index > -1 ? this.columnsByIndex[index] : false; + }; + + ColumnManager.prototype.getColumns = function () { + + return this.columns; + }; + + ColumnManager.prototype.findColumnIndex = function (column) { + + return this.columnsByIndex.findIndex(function (col) { + + return column === col; + }); + }; + + //return all columns that are not groups + + + ColumnManager.prototype.getRealColumns = function () { + + return this.columnsByIndex; + }; + + //travers across columns and call action + + + ColumnManager.prototype.traverse = function (callback) { + + var self = this; + + self.columnsByIndex.forEach(function (column, i) { + + callback(column, i); + }); + }; + + //get defintions of actual columns + + + ColumnManager.prototype.getDefinitions = function (active) { + + var self = this, + output = []; + + self.columnsByIndex.forEach(function (column) { + + if (!active || active && column.visible) { + + output.push(column.getDefinition()); + } + }); + + return output; + }; + + //get full nested definition tree + + + ColumnManager.prototype.getDefinitionTree = function () { + + var self = this, + output = []; + + self.columns.forEach(function (column) { + + output.push(column.getDefinition(true)); + }); + + return output; + }; + + ColumnManager.prototype.getComponents = function (structured) { + + var self = this, + output = [], + columns = structured ? self.columns : self.columnsByIndex; + + columns.forEach(function (column) { + + output.push(column.getComponent()); + }); + + return output; + }; + + ColumnManager.prototype.getWidth = function () { + + var width = 0; + + this.columnsByIndex.forEach(function (column) { + + if (column.visible) { + + width += column.getWidth(); + } + }); + + return width; + }; + + ColumnManager.prototype.moveColumn = function (from, to, after) { + + this.moveColumnActual(from, to, after); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + to.element.parentNode.insertBefore(from.element, to.element); + + if (after) { + + to.element.parentNode.insertBefore(to.element, from.element); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); + }; + + ColumnManager.prototype.moveColumnActual = function (from, to, after) { + + if (from.parent.isGroup) { + + this._moveColumnInArray(from.parent.columns, from, to, after); + } else { + + this._moveColumnInArray(this.columns, from, to, after); + } + + this._moveColumnInArray(this.columnsByIndex, from, to, after, true); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(true); + } + + if (this.table.options.columnMoved) { + + this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + }; + + ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { + var _this2 = this; + + var fromIndex = columns.indexOf(from), + toIndex, + rows = []; + + if (fromIndex > -1) { + + columns.splice(fromIndex, 1); + + toIndex = columns.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + toIndex = toIndex + 1; + } + } else { + + toIndex = fromIndex; + } + + columns.splice(toIndex, 0, from); + + if (updateRows) { + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + + this.table.rowManager.rows.forEach(function (row) { + + rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); + }); + } + + rows = rows.concat(this.table.rowManager.rows); + + rows.forEach(function (row) { + + if (row.cells.length) { + + var cell = row.cells.splice(fromIndex, 1)[0]; + + row.cells.splice(toIndex, 0, cell); + } + }); + } + } + }; + + ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { + var _this3 = this; + + var left = 0, + offset = 0, + adjust = 0, + colEl = column.getElement(); + + return new Promise(function (resolve, reject) { + + if (typeof position === "undefined") { + + position = _this3.table.options.scrollToColumnPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this3.table.options.scrollToColumnIfVisible; + } + + if (column.visible) { + + //align to correct position + + + switch (position) { + + case "middle": + + case "center": + + adjust = -_this3.element.clientWidth / 2; + + break; + + case "right": + + adjust = colEl.clientWidth - _this3.headersElement.clientWidth; + + break; + + } + + //check column visibility + + + if (!ifVisible) { + + offset = colEl.offsetLeft; + + if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { + + return false; + } + } + + //calculate scroll position + + + left = colEl.offsetLeft + adjust; + + left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); + + _this3.table.rowManager.scrollHorizontal(left); + + _this3.scrollHorizontal(left); + + resolve(); + } else { + + console.warn("Scroll Error - Column not visible"); + + reject("Scroll Error - Column not visible"); + } + }); + }; + + //////////////// Cell Management ///////////////// + + + ColumnManager.prototype.generateCells = function (row) { + + var self = this; + + var cells = []; + + self.columnsByIndex.forEach(function (column) { + + cells.push(column.generateCell(row)); + }); + + return cells; + }; + + //////////////// Column Management ///////////////// + + + ColumnManager.prototype.getFlexBaseWidth = function () { + + var self = this, + totalWidth = self.table.element.clientWidth, + //table element width + + + fixedWidth = 0; + + //adjust for vertical scrollbar if present + + + if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { + + totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; + } + + this.columnsByIndex.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width || 0; + + minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + } + }); + + return fixedWidth; + }; + + ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { + var _this4 = this; + + return new Promise(function (resolve, reject) { + + var column = _this4._addColumn(definition, before, nextToColumn); + + _this4._reIndexColumns(); + + if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { + + _this4.table.modules.responsiveLayout.initialize(); + } + + if (_this4.table.modExists("columnCalcs")) { + + _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); + } + + _this4.redraw(true); + + if (_this4.table.modules.layout.getMode() != "fitColumns") { + + column.reinitializeWidth(); + } + + _this4._verticalAlignHeaders(); + + _this4.table.rowManager.reinitialize(); + + if (_this4.table.options.virtualDomHoz) { + + _this4.table.vdomHoz.reinitialize(); + } + + resolve(column); + }); + }; + + //remove column from system + + + ColumnManager.prototype.deregisterColumn = function (column) { + + var field = column.getField(), + index; + + //remove from field list + + + if (field) { + + delete this.columnsByField[field]; + } + + //remove from index list + + + index = this.columnsByIndex.indexOf(column); + + if (index > -1) { + + this.columnsByIndex.splice(index, 1); + } + + //remove from column list + + + index = this.columns.indexOf(column); + + if (index > -1) { + + this.columns.splice(index, 1); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + this._verticalAlignHeaders(); + + this.redraw(); + }; + + //redraw columns + + + ColumnManager.prototype.redraw = function (force) { + + if (force) { + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + + this._verticalAlignHeaders(); + } + + this.table.rowManager.resetScroll(); + + this.table.rowManager.reinitialize(); + } + + if (["fitColumns", "fitDataStretch"].indexOf(this.table.modules.layout.getMode()) > -1) { + + this.table.modules.layout.layout(); + } else { + + if (force) { + + this.table.modules.layout.layout(); + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + } + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layout(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (force) { + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); + }; + + //public column object + + var ColumnComponent = function ColumnComponent(column) { + + this._column = column; + + this.type = "ColumnComponent"; + }; + + ColumnComponent.prototype.getElement = function () { + + return this._column.getElement(); + }; + + ColumnComponent.prototype.getDefinition = function () { + + return this._column.getDefinition(); + }; + + ColumnComponent.prototype.getField = function () { + + return this._column.getField(); + }; + + ColumnComponent.prototype.getCells = function () { + + var cells = []; + + this._column.cells.forEach(function (cell) { + + cells.push(cell.getComponent()); + }); + + return cells; + }; + + ColumnComponent.prototype.getVisibility = function () { + + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + + return this._column.visible; + }; + + ColumnComponent.prototype.isVisible = function () { + + return this._column.visible; + }; + + ColumnComponent.prototype.show = function () { + + if (this._column.isGroup) { + + this._column.columns.forEach(function (column) { + + column.show(); + }); + } else { + + this._column.show(); + } + }; + + ColumnComponent.prototype.hide = function () { + + if (this._column.isGroup) { + + this._column.columns.forEach(function (column) { + + column.hide(); + }); + } else { + + this._column.hide(); + } + }; + + ColumnComponent.prototype.toggle = function () { + + if (this._column.visible) { + + this.hide(); + } else { + + this.show(); + } + }; + + ColumnComponent.prototype.delete = function () { + + return this._column.delete(); + }; + + ColumnComponent.prototype.getSubColumns = function () { + + var output = []; + + if (this._column.columns.length) { + + this._column.columns.forEach(function (column) { + + output.push(column.getComponent()); + }); + } + + return output; + }; + + ColumnComponent.prototype.getParentColumn = function () { + + return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; + }; + + ColumnComponent.prototype._getSelf = function () { + + return this._column; + }; + + ColumnComponent.prototype.scrollTo = function () { + + return this._column.table.columnManager.scrollToColumn(this._column); + }; + + ColumnComponent.prototype.getTable = function () { + + return this._column.table; + }; + + ColumnComponent.prototype.headerFilterFocus = function () { + + if (this._column.table.modExists("filter", true)) { + + this._column.table.modules.filter.setHeaderFilterFocus(this._column); + } + }; + + ColumnComponent.prototype.reloadHeaderFilter = function () { + + if (this._column.table.modExists("filter", true)) { + + this._column.table.modules.filter.reloadHeaderFilter(this._column); + } + }; + + ColumnComponent.prototype.getHeaderFilterValue = function () { + + if (this._column.table.modExists("filter", true)) { + + return this._column.table.modules.filter.getHeaderFilterValue(this._column); + } + }; + + ColumnComponent.prototype.setHeaderFilterValue = function (value) { + + if (this._column.table.modExists("filter", true)) { + + this._column.table.modules.filter.setHeaderFilterValue(this._column, value); + } + }; + + ColumnComponent.prototype.move = function (to, after) { + + var toColumn = this._column.table.columnManager.findColumn(to); + + if (toColumn) { + + this._column.table.columnManager.moveColumn(this._column, toColumn, after); + } else { + + console.warn("Move Error - No matching column found:", toColumn); + } + }; + + ColumnComponent.prototype.getNextColumn = function () { + + var nextCol = this._column.nextColumn(); + + return nextCol ? nextCol.getComponent() : false; + }; + + ColumnComponent.prototype.getPrevColumn = function () { + + var prevCol = this._column.prevColumn(); + + return prevCol ? prevCol.getComponent() : false; + }; + + ColumnComponent.prototype.updateDefinition = function (updates) { + + return this._column.updateDefinition(updates); + }; + + ColumnComponent.prototype.getWidth = function () { + + return this._column.getWidth(); + }; + + ColumnComponent.prototype.setWidth = function (width) { + + var result; + + if (width === true) { + + result = this._column.reinitializeWidth(true); + } else { + + result = this._column.setWidth(width); + } + + if (this._column.table.options.virtualDomHoz) { + + this._column.table.vdomHoz.reinitialize(true); + } + + return result; + }; + + ColumnComponent.prototype.validate = function () { + + return this._column.validate(); + }; + + var Column = function Column(def, parent) { + + var self = this; + + this.table = parent.table; + + this.definition = def; //column definition + + this.parent = parent; //hold parent object + + this.type = "column"; //type of element + + this.columns = []; //child columns + + this.cells = []; //cells bound to this column + + this.element = this.createElement(); //column header element + + this.contentElement = false; + + this.titleHolderElement = false; + + this.titleElement = false; + + this.groupElement = this.createGroupElement(); //column group holder element + + this.isGroup = false; + + this.tooltip = false; //hold column tooltip + + this.hozAlign = ""; //horizontal text alignment + + this.vertAlign = ""; //vert text alignment + + + //multi dimensional filed handling + + this.field = ""; + + this.fieldStructure = ""; + + this.getFieldValue = ""; + + this.setFieldValue = ""; + + this.titleFormatterRendered = false; + + this.setField(this.definition.field); + + if (this.table.options.invalidOptionWarnings) { + + this.checkDefinition(); + } + + this.modules = {}; //hold module variables; + + + this.cellEvents = { + + cellClick: false, + + cellDblClick: false, + + cellContext: false, + + cellTap: false, + + cellDblTap: false, + + cellTapHold: false, + + cellMouseEnter: false, + + cellMouseLeave: false, + + cellMouseOver: false, + + cellMouseOut: false, + + cellMouseMove: false + + }; + + this.width = null; //column width + + this.widthStyled = ""; //column width prestyled to improve render efficiency + + this.maxWidth = null; //column maximum width + + this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency + + this.minWidth = null; //column minimum width + + this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency + + this.widthFixed = false; //user has specified a width for this column + + + this.visible = true; //default visible state + + + this.component = null; + + this._mapDepricatedFunctionality(); + + //initialize column + + if (def.columns) { + + this.isGroup = true; + + def.columns.forEach(function (def, i) { + + var newCol = new Column(def, self); + + self.attachColumn(newCol); + }); + + self.checkColumnVisibility(); + } else { + + parent.registerColumnField(this); + } + + if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { + + this.table.modules.moveRow.setHandle(true); + } + + this._buildHeader(); + + this.bindModuleColumns(); + }; + + Column.prototype.createElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + + el.setAttribute("role", "columnheader"); + + el.setAttribute("aria-sort", "none"); + + return el; + }; + + Column.prototype.createGroupElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-col-group-cols"); + + return el; + }; + + Column.prototype.checkDefinition = function () { + var _this5 = this; + + Object.keys(this.definition).forEach(function (key) { + + if (_this5.defaultOptionList.indexOf(key) === -1) { + + console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); + } + }); + }; + + Column.prototype.setField = function (field) { + + this.field = field; + + this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; + + this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; + + this.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData; + }; + + //register column position with column manager + + Column.prototype.registerColumnPosition = function (column) { + + this.parent.registerColumnPosition(column); + }; + + //register column position with column manager + + Column.prototype.registerColumnField = function (column) { + + this.parent.registerColumnField(column); + }; + + //trigger position registration + + Column.prototype.reRegisterPosition = function () { + + if (this.isGroup) { + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); + } else { + + this.registerColumnPosition(this); + } + }; + + Column.prototype._mapDepricatedFunctionality = function () { + + if (typeof this.definition.hideInHtml !== "undefined") { + + this.definition.htmlOutput = !this.definition.hideInHtml; + + console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput"); + } + + if (typeof this.definition.align !== "undefined") { + + this.definition.hozAlign = this.definition.align; + + console.warn("align column definition property is deprecated, you should now use hozAlign"); + } + + if (typeof this.definition.downloadTitle !== "undefined") { + + this.definition.titleDownload = this.definition.downloadTitle; + + console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"); + } + }; + + Column.prototype.setTooltip = function () { + + var self = this, + def = self.definition; + + //set header tooltips + + var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; + + if (tooltip) { + + if (tooltip === true) { + + if (def.field) { + + self.table.modules.localize.bind("columns|" + def.field, function (value) { + + self.element.setAttribute("title", value || def.title); + }); + } else { + + self.element.setAttribute("title", def.title); + } + } else { + + if (typeof tooltip == "function") { + + tooltip = tooltip(self.getComponent()); + + if (tooltip === false) { + + tooltip = ""; + } + } + + self.element.setAttribute("title", tooltip); + } + } else { + + self.element.setAttribute("title", ""); + } + }; + + //build header element + + Column.prototype._buildHeader = function () { + + var self = this, + def = self.definition; + + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); + }if (def.headerVertical) { + + self.element.classList.add("tabulator-col-vertical"); + + if (def.headerVertical === "flip") { + + self.element.classList.add("tabulator-col-vertical-flip"); + } + } + + self.contentElement = self._bindEvents(); + + self.contentElement = self._buildColumnHeaderContent(); + + self.element.appendChild(self.contentElement); + + if (self.isGroup) { + + self._buildGroupHeader(); + } else { + + self._buildColumnHeader(); + } + + self.setTooltip(); + + //set resizable handles + + if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { + + self.table.modules.resizeColumns.initializeColumn("header", self, self.element); + } + + //set resizable handles + + if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { + + if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { + + self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); + } + + self.table.modules.filter.initializeColumn(self); + } + + //set resizable handles + + if (self.table.modExists("frozenColumns")) { + + self.table.modules.frozenColumns.initializeColumn(self); + } + + //set movable column + + if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { + + self.table.modules.moveColumn.initializeColumn(self); + } + + //set calcs column + + if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { + + self.table.modules.columnCalcs.initializeColumn(self); + } + + //handle persistence + + if (self.table.modExists("persistence") && self.table.modules.persistence.config.columns) { + + self.table.modules.persistence.initializeColumn(self); + } + + //update header tooltip on mouse enter + + self.element.addEventListener("mouseenter", function (e) { + + self.setTooltip(); + }); + }; + + Column.prototype._bindEvents = function () { + + var self = this, + def = self.definition, + dblTap, + tapHold, + tap; + + //setup header click event bindings + + if (typeof def.headerClick == "function") { + + self.element.addEventListener("click", function (e) { + def.headerClick(e, self.getComponent()); + }); + } + + if (typeof def.headerDblClick == "function") { + + self.element.addEventListener("dblclick", function (e) { + def.headerDblClick(e, self.getComponent()); + }); + } + + if (typeof def.headerContext == "function") { + + self.element.addEventListener("contextmenu", function (e) { + def.headerContext(e, self.getComponent()); + }); + } + + //setup header tap event bindings + + if (typeof def.headerTap == "function") { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + + if (tap) { + + def.headerTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (typeof def.headerDblTap == "function") { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + def.headerDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (typeof def.headerTapHold == "function") { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + def.headerTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + + //store column cell click event bindings + + if (typeof def.cellClick == "function") { + + self.cellEvents.cellClick = def.cellClick; + } + + if (typeof def.cellDblClick == "function") { + + self.cellEvents.cellDblClick = def.cellDblClick; + } + + if (typeof def.cellContext == "function") { + + self.cellEvents.cellContext = def.cellContext; + } + + //store column mouse event bindings + + if (typeof def.cellMouseEnter == "function") { + + self.cellEvents.cellMouseEnter = def.cellMouseEnter; + } + + if (typeof def.cellMouseLeave == "function") { + + self.cellEvents.cellMouseLeave = def.cellMouseLeave; + } + + if (typeof def.cellMouseOver == "function") { + + self.cellEvents.cellMouseOver = def.cellMouseOver; + } + + if (typeof def.cellMouseOut == "function") { + + self.cellEvents.cellMouseOut = def.cellMouseOut; + } + + if (typeof def.cellMouseMove == "function") { + + self.cellEvents.cellMouseMove = def.cellMouseMove; + } + + //setup column cell tap event bindings + + if (typeof def.cellTap == "function") { + + self.cellEvents.cellTap = def.cellTap; + } + + if (typeof def.cellDblTap == "function") { + + self.cellEvents.cellDblTap = def.cellDblTap; + } + + if (typeof def.cellTapHold == "function") { + + self.cellEvents.cellTapHold = def.cellTapHold; + } + + //setup column cell edit callbacks + + if (typeof def.cellEdited == "function") { + + self.cellEvents.cellEdited = def.cellEdited; + } + + if (typeof def.cellEditing == "function") { + + self.cellEvents.cellEditing = def.cellEditing; + } + + if (typeof def.cellEditCancelled == "function") { + + self.cellEvents.cellEditCancelled = def.cellEditCancelled; + } + }; + + //build header element for header + + Column.prototype._buildColumnHeader = function () { + var _this6 = this; + + var def = this.definition, + table = this.table, + sortable; + + //set column sorter + + if (table.modExists("sort")) { + + table.modules.sort.initializeColumn(this, this.titleHolderElement); + } + + //set column header context menu + + if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { + + table.modules.menu.initializeColumnHeader(this); + } + + //set column formatter + + if (table.modExists("format")) { + + table.modules.format.initializeColumn(this); + } + + //set column editor + + if (typeof def.editor != "undefined" && table.modExists("edit")) { + + table.modules.edit.initializeColumn(this); + } + + //set colum validator + + if (typeof def.validator != "undefined" && table.modExists("validate")) { + + table.modules.validate.initializeColumn(this); + } + + //set column mutator + + if (table.modExists("mutator")) { + + table.modules.mutator.initializeColumn(this); + } + + //set column accessor + + if (table.modExists("accessor")) { + + table.modules.accessor.initializeColumn(this); + } + + //set respoviveLayout + + if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { + + table.modules.responsiveLayout.initializeColumn(this); + } + + //set column visibility + + if (typeof def.visible != "undefined") { + + if (def.visible) { + + this.show(true); + } else { + + this.hide(true); + } + } + + //asign additional css classes to column header + + if (def.cssClass) { + + var classeNames = def.cssClass.split(" "); + + classeNames.forEach(function (className) { + + _this6.element.classList.add(className); + }); + } + + if (def.field) { + + this.element.setAttribute("tabulator-field", def.field); + } + + //set min width if present + + this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); + + if (def.maxWidth || this.table.options.columnMaxWidth) { + + if (def.maxWidth !== false) { + + this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth)); + } + } + + this.reinitializeWidth(); + + //set tooltip if present + + this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; + + //set orizontal text alignment + + this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; + + this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + }; + + Column.prototype._buildColumnHeaderContent = function () { + + var def = this.definition, + table = this.table; + + var contentElement = document.createElement("div"); + + contentElement.classList.add("tabulator-col-content"); + + this.titleHolderElement = document.createElement("div"); + + this.titleHolderElement.classList.add("tabulator-col-title-holder"); + + contentElement.appendChild(this.titleHolderElement); + + this.titleElement = this._buildColumnHeaderTitle(); + + this.titleHolderElement.appendChild(this.titleElement); + + return contentElement; + }; + + //build title element of column + + Column.prototype._buildColumnHeaderTitle = function () { + + var self = this, + def = self.definition, + table = self.table, + title; + + var titleHolderElement = document.createElement("div"); + + titleHolderElement.classList.add("tabulator-col-title"); + + if (def.editableTitle) { + + var titleElement = document.createElement("input"); + + titleElement.classList.add("tabulator-title-editor"); + + titleElement.addEventListener("click", function (e) { + + e.stopPropagation(); + + titleElement.focus(); + }); + + titleElement.addEventListener("change", function () { + + def.title = titleElement.value; + + table.options.columnTitleChanged.call(self.table, self.getComponent()); + }); + + titleHolderElement.appendChild(titleElement); + + if (def.field) { + + table.modules.localize.bind("columns|" + def.field, function (text) { + + titleElement.value = text || def.title || " "; + }); + } else { + + titleElement.value = def.title || " "; + } + } else { + + if (def.field) { + + table.modules.localize.bind("columns|" + def.field, function (text) { + + self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); + }); + } else { + + self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); + } + } + + return titleHolderElement; + }; + + Column.prototype._formatColumnHeaderTitle = function (el, title) { + var _this7 = this; + + var formatter, contents, params, mockCell, onRendered; + + if (this.definition.titleFormatter && this.table.modExists("format")) { + + formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); + + onRendered = function onRendered(callback) { + + _this7.titleFormatterRendered = callback; + }; + + mockCell = { + + getValue: function getValue() { + + return title; + }, + + getElement: function getElement() { + + return el; + } + + }; + + params = this.definition.titleFormatterParams || {}; + + params = typeof params === "function" ? params() : params; + + contents = formatter.call(this.table.modules.format, mockCell, params, onRendered); + + switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { + + case "object": + + if (contents instanceof Node) { + + el.appendChild(contents); + } else { + + el.innerHTML = ""; + + console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); + } + + break; + + case "undefined": + + case "null": + + el.innerHTML = ""; + + break; + + default: + + el.innerHTML = contents; + + } + } else { + + el.innerHTML = title; + } + }; + + //build header element for column group + + Column.prototype._buildGroupHeader = function () { + var _this8 = this; + + this.element.classList.add("tabulator-col-group"); + + this.element.setAttribute("role", "columngroup"); + + this.element.setAttribute("aria-title", this.definition.title); + + //asign additional css classes to column header + + if (this.definition.cssClass) { + + var classeNames = this.definition.cssClass.split(" "); + + classeNames.forEach(function (className) { + + _this8.element.classList.add(className); + }); + } + + //set column header context menu + + if ((this.definition.headerContextMenu || this.definition.headerMenu) && this.table.modExists("menu")) { + + this.table.modules.menu.initializeColumnHeader(this); + } + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + + this.element.appendChild(this.groupElement); + }; + + //flat field lookup + + Column.prototype._getFlatData = function (data) { + + return data[this.field]; + }; + + //nested field lookup + + Column.prototype._getNestedData = function (data) { + + var dataObj = data, + structure = this.fieldStructure, + length = structure.length, + output; + + for (var _i = 0; _i < length; _i++) { + + dataObj = dataObj[structure[_i]]; + + output = dataObj; + + if (!dataObj) { + + break; + } + } + + return output; + }; + + //flat field set + + Column.prototype._setFlatData = function (data, value) { + + if (this.field) { + + data[this.field] = value; + } + }; + + //nested field set + + Column.prototype._setNestedData = function (data, value) { + + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for (var _i2 = 0; _i2 < length; _i2++) { + + if (_i2 == length - 1) { + + dataObj[structure[_i2]] = value; + } else { + + if (!dataObj[structure[_i2]]) { + + if (typeof value !== "undefined") { + + dataObj[structure[_i2]] = {}; + } else { + + break; + } + } + + dataObj = dataObj[structure[_i2]]; + } + } + }; + + //attach column to this group + + Column.prototype.attachColumn = function (column) { + + var self = this; + + if (self.groupElement) { + + self.columns.push(column); + + self.groupElement.appendChild(column.getElement()); + } else { + + console.warn("Column Warning - Column being attached to another column instead of column group"); + } + }; + + //vertically align header in column + + Column.prototype.verticalAlign = function (alignment, height) { + + //calculate height of column header and group holder element + + var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; + + // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; + + + this.element.style.height = parentHeight + "px"; + + if (this.isGroup) { + + this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; + } + + //vertically align cell contents + + if (!this.isGroup && alignment !== "top") { + + if (alignment === "bottom") { + + this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; + } else { + + this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; + } + } + + this.columns.forEach(function (column) { + + column.verticalAlign(alignment); + }); + }; + + //clear vertical alignmenet + + Column.prototype.clearVerticalAlign = function () { + + this.element.style.paddingTop = ""; + + this.element.style.height = ""; + + this.element.style.minHeight = ""; + + this.groupElement.style.minHeight = ""; + + this.columns.forEach(function (column) { + + column.clearVerticalAlign(); + }); + }; + + Column.prototype.bindModuleColumns = function () { + + //check if rownum formatter is being used on a column + + if (this.definition.formatter == "rownum") { + + this.table.rowManager.rowNumColumn = this; + } + }; + + //// Retreive Column Information //// + + + //return column header element + + Column.prototype.getElement = function () { + + return this.element; + }; + + //return colunm group element + + Column.prototype.getGroupElement = function () { + + return this.groupElement; + }; + + //return field name + + Column.prototype.getField = function () { + + return this.field; + }; + + //return the first column in a group + + Column.prototype.getFirstColumn = function () { + + if (!this.isGroup) { + + return this; + } else { + + if (this.columns.length) { + + return this.columns[0].getFirstColumn(); + } else { + + return false; + } + } + }; + + //return the last column in a group + + Column.prototype.getLastColumn = function () { + + if (!this.isGroup) { + + return this; + } else { + + if (this.columns.length) { + + return this.columns[this.columns.length - 1].getLastColumn(); + } else { + + return false; + } + } + }; + + //return all columns in a group + + Column.prototype.getColumns = function () { + + return this.columns; + }; + + //return all columns in a group + + Column.prototype.getCells = function () { + + return this.cells; + }; + + //retreive the top column in a group of columns + + Column.prototype.getTopColumn = function () { + + if (this.parent.isGroup) { + + return this.parent.getTopColumn(); + } else { + + return this; + } + }; + + //return column definition object + + Column.prototype.getDefinition = function (updateBranches) { + + var colDefs = []; + + if (this.isGroup && updateBranches) { + + this.columns.forEach(function (column) { + + colDefs.push(column.getDefinition(true)); + }); + + this.definition.columns = colDefs; + } + + return this.definition; + }; + + //////////////////// Actions //////////////////// + + + Column.prototype.checkColumnVisibility = function () { + + var visible = false; + + this.columns.forEach(function (column) { + + if (column.visible) { + + visible = true; + } + }); + + if (visible) { + + this.show(); + + this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } else { + + this.hide(); + } + }; + + //show column + + Column.prototype.show = function (silent, responsiveToggle) { + + if (!this.visible) { + + this.visible = true; + + this.element.style.display = ""; + + if (this.parent.isGroup) { + + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + + cell.show(); + }); + + if (!this.isGroup && this.width === null) { + + this.reinitializeWidth(); + } + + this.table.columnManager._verticalAlignHeaders(); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); + } + + if (this.parent.isGroup) { + + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(); + } + } + }; + + //hide column + + Column.prototype.hide = function (silent, responsiveToggle) { + + if (this.visible) { + + this.visible = false; + + this.element.style.display = "none"; + + this.table.columnManager._verticalAlignHeaders(); + + if (this.parent.isGroup) { + + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + + cell.hide(); + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } + + if (this.parent.isGroup) { + + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(); + } + } + }; + + Column.prototype.matchChildWidths = function () { + + var childWidth = 0; + + if (this.contentElement && this.columns.length) { + + this.columns.forEach(function (column) { + + if (column.visible) { + + childWidth += column.getWidth(); + } + }); + + this.contentElement.style.maxWidth = childWidth - 1 + "px"; + + if (this.parent.isGroup) { + + this.parent.matchChildWidths(); + } + } + }; + + Column.prototype.removeChild = function (child) { + + var index = this.columns.indexOf(child); + + if (index > -1) { + + this.columns.splice(index, 1); + } + + if (!this.columns.length) { + + this.delete(); + } + }; + + Column.prototype.setWidth = function (width) { + + this.widthFixed = true; + + this.setWidthActual(width); + }; + + Column.prototype.setWidthActual = function (width) { + + if (isNaN(width)) { + + width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); + } + + width = Math.max(this.minWidth, width); + + if (this.maxWidth) { + + width = Math.min(this.maxWidth, width); + } + + this.width = width; + + this.widthStyled = width ? width + "px" : ""; + + this.element.style.width = this.widthStyled; + + if (!this.isGroup) { + + this.cells.forEach(function (cell) { + + cell.setWidth(); + }); + } + + if (this.parent.isGroup) { + + this.parent.matchChildWidths(); + } + + //set resizable handles + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layout(); + } + }; + + Column.prototype.checkCellHeights = function () { + + var rows = []; + + this.cells.forEach(function (cell) { + + if (cell.row.heightInitialized) { + + if (cell.row.getElement().offsetParent !== null) { + + rows.push(cell.row); + + cell.row.clearCellHeight(); + } else { + + cell.row.heightInitialized = false; + } + } + }); + + rows.forEach(function (row) { + + row.calcHeight(); + }); + + rows.forEach(function (row) { + + row.setCellHeight(); + }); + }; + + Column.prototype.getWidth = function () { + + var width = 0; + + if (this.isGroup) { + + this.columns.forEach(function (column) { + + if (column.visible) { + + width += column.getWidth(); + } + }); + } else { + + width = this.width; + } + + return width; + }; + + Column.prototype.getHeight = function () { + + return this.element.offsetHeight; + }; + + Column.prototype.setMinWidth = function (minWidth) { + + this.minWidth = minWidth; + + this.minWidthStyled = minWidth ? minWidth + "px" : ""; + + this.element.style.minWidth = this.minWidthStyled; + + this.cells.forEach(function (cell) { + + cell.setMinWidth(); + }); + }; + + Column.prototype.setMaxWidth = function (maxWidth) { + + this.maxWidth = maxWidth; + + this.maxWidthStyled = maxWidth ? maxWidth + "px" : ""; + + this.element.style.maxWidth = this.maxWidthStyled; + + this.cells.forEach(function (cell) { + + cell.setMaxWidth(); + }); + }; + + Column.prototype.delete = function () { + var _this9 = this; + + return new Promise(function (resolve, reject) { + + var index; + + if (_this9.isGroup) { + + _this9.columns.forEach(function (column) { + + column.delete(); + }); + } + + //cancel edit if column is currently being edited + + if (_this9.table.modExists("edit")) { + + if (_this9.table.modules.edit.currentCell.column === _this9) { + + _this9.table.modules.edit.cancelEdit(); + } + } + + var cellCount = _this9.cells.length; + + for (var _i3 = 0; _i3 < cellCount; _i3++) { + + _this9.cells[0].delete(); + } + + if (_this9.element.parentNode) { + + _this9.element.parentNode.removeChild(_this9.element); + } + + _this9.element = false; + + _this9.contentElement = false; + + _this9.titleElement = false; + + _this9.groupElement = false; + + if (_this9.parent.isGroup) { + + _this9.parent.removeChild(_this9); + } + + _this9.table.columnManager.deregisterColumn(_this9); + + if (_this9.table.options.virtualDomHoz) { + + _this9.table.vdomHoz.reinitialize(true); + } + + resolve(); + }); + }; + + Column.prototype.columnRendered = function () { + + if (this.titleFormatterRendered) { + + this.titleFormatterRendered(); + } + }; + + Column.prototype.validate = function () { + + var invalid = []; + + this.cells.forEach(function (cell) { + + if (!cell.validate()) { + + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; + }; + + //////////////// Cell Management ///////////////// + + + //generate cell for this column + + Column.prototype.generateCell = function (row) { + + var self = this; + + var cell = new Cell(self, row); + + this.cells.push(cell); + + return cell; + }; + + Column.prototype.nextColumn = function () { + + var index = this.table.columnManager.findColumnIndex(this); + + return index > -1 ? this._nextVisibleColumn(index + 1) : false; + }; + + Column.prototype._nextVisibleColumn = function (index) { + + var column = this.table.columnManager.getColumnByIndex(index); + + return !column || column.visible ? column : this._nextVisibleColumn(index + 1); + }; + + Column.prototype.prevColumn = function () { + + var index = this.table.columnManager.findColumnIndex(this); + + return index > -1 ? this._prevVisibleColumn(index - 1) : false; + }; + + Column.prototype._prevVisibleColumn = function (index) { + + var column = this.table.columnManager.getColumnByIndex(index); + + return !column || column.visible ? column : this._prevVisibleColumn(index - 1); + }; + + Column.prototype.reinitializeWidth = function (force) { + + this.widthFixed = false; + + //set width if present + + if (typeof this.definition.width !== "undefined" && !force) { + + this.setWidth(this.definition.width); + } + + //hide header filters to prevent them altering column width + + if (this.table.modExists("filter")) { + + this.table.modules.filter.hideHeaderFilterElements(); + } + + this.fitToData(); + + //show header filters again after layout is complete + + if (this.table.modExists("filter")) { + + this.table.modules.filter.showHeaderFilterElements(); + } + }; + + //set column width to maximum cell width + + Column.prototype.fitToData = function () { + + var self = this; + + if (!this.widthFixed) { + + this.element.style.width = ""; + + self.cells.forEach(function (cell) { + + cell.clearWidth(); + }); + } + + var maxWidth = this.element.offsetWidth; + + if (!self.width || !this.widthFixed) { + + self.cells.forEach(function (cell) { + + var width = cell.getWidth(); + + if (width > maxWidth) { + + maxWidth = width; + } + }); + + if (maxWidth) { + + self.setWidthActual(maxWidth + 1); + } + } + }; + + Column.prototype.updateDefinition = function (updates) { + var _this10 = this; + + return new Promise(function (resolve, reject) { + + var definition; + + if (!_this10.isGroup) { + + definition = Object.assign({}, _this10.getDefinition()); + + definition = Object.assign(definition, updates); + + _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { + + if (definition.field == _this10.field) { + + _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays + } + + _this10.delete().then(function () { + + resolve(column.getComponent()); + }).catch(function (err) { + + reject(err); + }); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + + reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + } + }); + }; + + Column.prototype.deleteCell = function (cell) { + + var index = this.cells.indexOf(cell); + + if (index > -1) { + + this.cells.splice(index, 1); + } + }; + + Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", + + // "headerClickMenu", + + "clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; + + //////////////// Event Bindings ///////////////// + + + //////////////// Object Generation ///////////////// + + Column.prototype.getComponent = function () { + + if (!this.component) { + + this.component = new ColumnComponent(this); + } + + return this.component; + }; + + var RowManager = function RowManager(table) { + + this.table = table; + + this.element = this.createHolderElement(); //containing element + + this.tableElement = this.createTableElement(); //table element + + this.heightFixer = this.createTableElement(); //table element + + this.columnManager = null; //hold column manager object + + this.height = 0; //hold height of table element + + + this.firstRender = false; //handle first render + + this.renderMode = "virtual"; //current rendering mode + + this.fixedHeight = false; //current rendering mode + + + this.rows = []; //hold row data objects + + this.activeRows = []; //rows currently available to on display in the table + + this.activeRowsCount = 0; //count of active rows + + + this.displayRows = []; //rows currently on display in the table + + this.displayRowsCount = 0; //count of display rows + + + this.scrollTop = 0; + + this.scrollLeft = 0; + + this.vDomRowHeight = 20; //approximation of row heights for padding + + + this.vDomTop = 0; //hold position for first rendered row in the virtual DOM + + this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM + + + this.vDomScrollPosTop = 0; //last scroll position of the vDom top; + + this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; + + + this.vDomTopPad = 0; //hold value of padding for top of virtual DOM + + this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM + + + this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go + + + this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling + + + this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) + + this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin + + + this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed + + this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed + + + this.rowNumColumn = false; //hold column component for row number column + + + this.redrawBlock = false; //prevent redraws to allow multiple data manipulations becore continuing + + this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed + + this.redrawBlockRederInPosition = false; //store latest redraw function calls for when redraw is needed + }; + + //////////////// Setup Functions ///////////////// + + + RowManager.prototype.createHolderElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-tableHolder"); + + el.setAttribute("tabindex", 0); + + return el; + }; + + RowManager.prototype.createTableElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-table"); + + return el; + }; + + //return containing element + + RowManager.prototype.getElement = function () { + + return this.element; + }; + + //return table element + + RowManager.prototype.getTableElement = function () { + + return this.tableElement; + }; + + //return position of row in table + + RowManager.prototype.getRowPosition = function (row, active) { + + if (active) { + + return this.activeRows.indexOf(row); + } else { + + return this.rows.indexOf(row); + } + }; + + //link to column manager + + RowManager.prototype.setColumnManager = function (manager) { + + this.columnManager = manager; + }; + + RowManager.prototype.initialize = function () { + + var self = this; + + self.setRenderMode(); + + //initialize manager + + self.element.appendChild(self.tableElement); + + self.firstRender = true; + + //scroll header along with table body + + self.element.addEventListener("scroll", function () { + + var left = self.element.scrollLeft; + + //handle horizontal scrolling + + if (self.scrollLeft != left) { + + self.columnManager.scrollHorizontal(left); + + if (self.table.options.groupBy) { + + self.table.modules.groupRows.scrollHeaders(left); + } + + if (self.table.modExists("columnCalcs")) { + + self.table.modules.columnCalcs.scrollHorizontal(left); + } + + self.table.options.scrollHorizontal(left); + } + + self.scrollLeft = left; + }); + + //handle virtual dom scrolling + + if (this.renderMode === "virtual") { + + self.element.addEventListener("scroll", function () { + + var top = self.element.scrollTop; + + var dir = self.scrollTop > top; + + //handle verical scrolling + + if (self.scrollTop != top) { + + self.scrollTop = top; + + self.scrollVertical(dir); + + if (self.table.options.ajaxProgressiveLoad == "scroll") { + + self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); + } + + self.table.options.scrollVertical(top); + } else { + + self.scrollTop = top; + } + }); + } + }; + + ////////////////// Row Manipulation ////////////////// + + + RowManager.prototype.findRow = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + + //subject is row element + + return subject; + } else if (subject instanceof RowComponent) { + + //subject is public row component + + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + + //subject is a HTML element of the row + + var match = self.rows.find(function (row) { + + return row.getElement() === subject; + }); + + return match || false; + } + } else if (typeof subject == "undefined" || subject === null) { + + return false; + } else { + + //subject should be treated as the index of the row + + var _match = self.rows.find(function (row) { + + return row.data[self.table.options.index] == subject; + }); + + return _match || false; + } + + //catch all for any other type of input + + + return false; + }; + + RowManager.prototype.getRowFromDataObject = function (data) { + + var match = this.rows.find(function (row) { + + return row.data === data; + }); + + return match || false; + }; + + RowManager.prototype.getRowFromPosition = function (position, active) { + + if (active) { + + return this.activeRows[position]; + } else { + + return this.rows[position]; + } + }; + + RowManager.prototype.scrollToRow = function (row, position, ifVisible) { + var _this11 = this; + + var rowIndex = this.getDisplayRows().indexOf(row), + rowEl = row.getElement(), + rowTop, + offset = 0; + + return new Promise(function (resolve, reject) { + + if (rowIndex > -1) { + + if (typeof position === "undefined") { + + position = _this11.table.options.scrollToRowPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this11.table.options.scrollToRowIfVisible; + } + + if (position === "nearest") { + + switch (_this11.renderMode) { + + case "classic": + + rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; + + position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; + + break; + + case "virtual": + + position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; + + break; + + } + } + + //check row visibility + + if (!ifVisible) { + + if (Tabulator.prototype.helpers.elVisible(rowEl)) { + + offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; + + if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { + + return false; + } + } + } + + //scroll to row + + switch (_this11.renderMode) { + + case "classic": + + _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; + + break; + + case "virtual": + + _this11._virtualRenderFill(rowIndex, true); + + break; + + } + + //align to correct position + + switch (position) { + + case "middle": + + case "center": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + + _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; + } else { + + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; + } + + break; + + case "bottom": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + + _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + } else { + + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; + } + + break; + + } + + resolve(); + } else { + + console.warn("Scroll Error - Row not visible"); + + reject("Scroll Error - Row not visible"); + } + }); + }; + + ////////////////// Data Handling ////////////////// + + + RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { + var _this12 = this; + + var self = this; + + return new Promise(function (resolve, reject) { + + if (renderInPosition && _this12.getDisplayRows().length) { + + if (self.table.options.pagination) { + + self._setDataActual(data, true); + } else { + + _this12.reRenderInPosition(function () { + + self._setDataActual(data); + }); + } + } else { + + if (_this12.table.options.autoColumns && columnsChanged) { + + _this12.table.columnManager.generateColumnsFromRowData(data); + } + + _this12.resetScroll(); + + _this12._setDataActual(data); + } + + resolve(); + }); + }; + + RowManager.prototype._setDataActual = function (data, renderInPosition) { + + var self = this; + + self.table.options.dataLoading.call(this.table, data); + + this._wipeElements(); + + if (this.table.options.history && this.table.modExists("history")) { + + this.table.modules.history.clear(); + } + + if (Array.isArray(data)) { + + if (this.table.modExists("selectRow")) { + + this.table.modules.selectRow.clearSelectionData(); + } + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + + this.table.modules.reactiveData.watchData(data); + } + + data.forEach(function (def, i) { + + if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { + + var row = new Row(def, self); + + self.rows.push(row); + } else { + + console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); + } + }); + + self.refreshActiveData(false, false, renderInPosition); + + self.table.options.dataLoaded.call(this.table, data); + } else { + + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); + } + }; + + RowManager.prototype._wipeElements = function () { + + this.rows.forEach(function (row) { + + row.wipe(); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.groupRows.wipe(); + } + + this.rows = []; + + this.activeRows = []; + + this.activeRowsCount = 0; + + this.displayRows = []; + + this.displayRowsCount = 0; + + this.adjustTableSize(); + }; + + RowManager.prototype.deleteRow = function (row, blockRedraw) { + + var allIndex = this.rows.indexOf(row), + activeIndex = this.activeRows.indexOf(row); + + if (activeIndex > -1) { + + this.activeRows.splice(activeIndex, 1); + } + + if (allIndex > -1) { + + this.rows.splice(allIndex, 1); + } + + this.setActiveRows(this.activeRows); + + this.displayRowIterator(function (rows) { + + var displayIndex = rows.indexOf(row); + + if (displayIndex > -1) { + + rows.splice(displayIndex, 1); + } + }); + + if (!blockRedraw) { + + this.reRenderInPosition(); + } + + this.regenerateRowNumbers(); + + this.table.options.rowDeleted.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.groupRows.updateGroupRows(true); + } else if (this.table.options.pagination && this.table.modExists("page")) { + + this.refreshActiveData(false, false, true); + } else { + + if (this.table.options.pagination && this.table.modExists("page")) { + + this.refreshActiveData("page"); + } + } + }; + + RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { + + var row = this.addRowActual(data, pos, index, blockRedraw); + + if (this.table.options.history && this.table.modExists("history")) { + + this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); + } + + return row; + }; + + //add multiple rows + + RowManager.prototype.addRows = function (data, pos, index) { + var _this13 = this; + + var self = this, + length = 0, + rows = []; + + return new Promise(function (resolve, reject) { + + pos = _this13.findAddRowPos(pos); + + if (!Array.isArray(data)) { + + data = [data]; + } + + length = data.length - 1; + + if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { + + data.reverse(); + } + + data.forEach(function (item, i) { + + var row = self.addRow(item, pos, index, true); + + rows.push(row); + }); + + if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { + + _this13.table.modules.groupRows.updateGroupRows(true); + } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { + + _this13.refreshActiveData(false, false, true); + } else { + + _this13.reRenderInPosition(); + } + + //recalc column calculations if present + + if (_this13.table.modExists("columnCalcs")) { + + _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); + } + + _this13.regenerateRowNumbers(); + + resolve(rows); + }); + }; + + RowManager.prototype.findAddRowPos = function (pos) { + + if (typeof pos === "undefined") { + + pos = this.table.options.addRowPos; + } + + if (pos === "pos") { + + pos = true; + } + + if (pos === "bottom") { + + pos = false; + } + + return pos; + }; + + RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { + + var row = data instanceof Row ? data : new Row(data || {}, this), + top = this.findAddRowPos(pos), + allIndex = -1, + activeIndex, + dispRows; + + if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { + + dispRows = this.getDisplayRows(); + + if (top) { + + if (dispRows.length) { + + index = dispRows[0]; + } else { + + if (this.activeRows.length) { + + index = this.activeRows[this.activeRows.length - 1]; + + top = false; + } + } + } else { + + if (dispRows.length) { + + index = dispRows[dispRows.length - 1]; + + top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; + } + } + } + + if (typeof index !== "undefined") { + + index = this.findRow(index); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.groupRows.assignRowToGroup(row); + + var groupRows = row.getGroup().rows; + + if (groupRows.length > 1) { + + if (!index || index && groupRows.indexOf(index) == -1) { + + if (top) { + + if (groupRows[0] !== row) { + + index = groupRows[0]; + + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } else { + + if (groupRows[groupRows.length - 1] !== row) { + + index = groupRows[groupRows.length - 1]; + + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } else { + + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } + + if (index) { + + allIndex = this.rows.indexOf(index); + } + + if (index && allIndex > -1) { + + activeIndex = this.activeRows.indexOf(index); + + this.displayRowIterator(function (rows) { + + var displayIndex = rows.indexOf(index); + + if (displayIndex > -1) { + + rows.splice(top ? displayIndex : displayIndex + 1, 0, row); + } + }); + + if (activeIndex > -1) { + + this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); + } + + this.rows.splice(top ? allIndex : allIndex + 1, 0, row); + } else { + + if (top) { + + this.displayRowIterator(function (rows) { + + rows.unshift(row); + }); + + this.activeRows.unshift(row); + + this.rows.unshift(row); + } else { + + this.displayRowIterator(function (rows) { + + rows.push(row); + }); + + this.activeRows.push(row); + + this.rows.push(row); + } + } + + this.setActiveRows(this.activeRows); + + this.table.options.rowAdded.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (!blockRedraw) { + + this.reRenderInPosition(); + } + + return row; + }; + + RowManager.prototype.moveRow = function (from, to, after) { + + if (this.table.options.history && this.table.modExists("history")) { + + this.table.modules.history.action("rowMove", from, { posFrom: this.getRowPosition(from), posTo: this.getRowPosition(to), to: to, after: after }); + } + + this.moveRowActual(from, to, after); + + this.regenerateRowNumbers(); + + this.table.options.rowMoved.call(this.table, from.getComponent()); + }; + + RowManager.prototype.moveRowActual = function (from, to, after) { + var _this14 = this; + + this._moveRowInArray(this.rows, from, to, after); + + this._moveRowInArray(this.activeRows, from, to, after); + + this.displayRowIterator(function (rows) { + + _this14._moveRowInArray(rows, from, to, after); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (!after && to instanceof Group) { + + to = this.table.rowManager.prevDisplayRow(from) || to; + } + + var toGroup = to.getGroup(); + + var fromGroup = from.getGroup(); + + if (toGroup === fromGroup) { + + this._moveRowInArray(toGroup.rows, from, to, after); + } else { + + if (fromGroup) { + + fromGroup.removeRow(from); + } + + toGroup.insertRow(from, to, after); + } + } + }; + + RowManager.prototype._moveRowInArray = function (rows, from, to, after) { + + var fromIndex, toIndex, start, end; + + if (from !== to) { + + fromIndex = rows.indexOf(from); + + if (fromIndex > -1) { + + rows.splice(fromIndex, 1); + + toIndex = rows.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + rows.splice(toIndex + 1, 0, from); + } else { + + rows.splice(toIndex, 0, from); + } + } else { + + rows.splice(fromIndex, 0, from); + } + } + + //restyle rows + + if (rows === this.getDisplayRows()) { + + start = fromIndex < toIndex ? fromIndex : toIndex; + + end = toIndex > fromIndex ? toIndex : fromIndex + 1; + + for (var _i4 = start; _i4 <= end; _i4++) { + + if (rows[_i4]) { + + this.styleRow(rows[_i4], _i4); + } + } + } + } + }; + + RowManager.prototype.clearData = function () { + + this.setData([]); + }; + + RowManager.prototype.getRowIndex = function (row) { + + return this.findRowIndex(row, this.rows); + }; + + RowManager.prototype.getDisplayRowIndex = function (row) { + + var index = this.getDisplayRows().indexOf(row); + + return index > -1 ? index : false; + }; + + RowManager.prototype.nextDisplayRow = function (row, rowOnly) { + + var index = this.getDisplayRowIndex(row), + nextRow = false; + + if (index !== false && index < this.displayRowsCount - 1) { + + nextRow = this.getDisplayRows()[index + 1]; + } + + if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { + + return this.nextDisplayRow(nextRow, rowOnly); + } + + return nextRow; + }; + + RowManager.prototype.prevDisplayRow = function (row, rowOnly) { + + var index = this.getDisplayRowIndex(row), + prevRow = false; + + if (index) { + + prevRow = this.getDisplayRows()[index - 1]; + } + + if (rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { + + return this.prevDisplayRow(prevRow, rowOnly); + } + + return prevRow; + }; + + RowManager.prototype.findRowIndex = function (row, list) { + + var rowIndex; + + row = this.findRow(row); + + if (row) { + + rowIndex = list.indexOf(row); + + if (rowIndex > -1) { + + return rowIndex; + } + } + + return false; + }; + + RowManager.prototype.getData = function (active, transform) { + + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + + if (row.type == "row") { + + output.push(row.getData(transform || "data")); + } + }); + + return output; + }; + + RowManager.prototype.getComponents = function (active) { + + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + + output.push(row.getComponent()); + }); + + return output; + }; + + RowManager.prototype.getDataCount = function (active) { + + var rows = this.getRows(active); + + return rows.length; + }; + + RowManager.prototype._genRemoteRequest = function () { + var _this15 = this; + + var table = this.table, + options = table.options, + params = {}; + + if (table.modExists("page")) { + + //set sort data if defined + + if (options.ajaxSorting) { + + var sorters = this.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + + delete item.column; + }); + + params[this.table.modules.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + + if (options.ajaxFiltering) { + + var filters = this.table.modules.filter.getFilters(true, true); + + params[this.table.modules.page.paginationDataSentNames.filters] = filters; + } + + this.table.modules.ajax.setParams(params, true); + } + + table.modules.ajax.sendRequest().then(function (data) { + + _this15._setDataActual(data, true); + }).catch(function (e) {}); + }; + + //choose the path to refresh data after a filter update + + RowManager.prototype.filterRefresh = function () { + + var table = this.table, + options = table.options, + left = this.scrollLeft; + + if (options.ajaxFiltering) { + + if (options.pagination == "remote" && table.modExists("page")) { + + table.modules.page.reset(true); + + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + + //assume data is url, make ajax call to url to get data + + this._genRemoteRequest(); + } + } else { + + this.refreshActiveData("filter"); + } + + this.scrollHorizontal(left); + }; + + //choose the path to refresh data after a sorter update + + RowManager.prototype.sorterRefresh = function (loadOrignalData) { + + var table = this.table, + options = this.table.options, + left = this.scrollLeft; + + if (options.ajaxSorting) { + + if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { + + table.modules.page.reset(true); + + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + + //assume data is url, make ajax call to url to get data + + this._genRemoteRequest(); + } + } else { + + this.refreshActiveData(loadOrignalData ? "filter" : "sort"); + } + + this.scrollHorizontal(left); + }; + + RowManager.prototype.scrollHorizontal = function (left) { + + this.scrollLeft = left; + + this.element.scrollLeft = left; + + if (this.table.options.groupBy) { + + this.table.modules.groupRows.scrollHeaders(left); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.scrollHorizontal(left); + } + }; + + //set active data set + + RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { + + var self = this, + table = this.table, + cascadeOrder = ["all", "filter", "sort", "display", "freeze", "group", "tree", "page"], + displayIndex; + + if (this.redrawBlock) { + + if (!this.redrawBlockRestoreConfig || cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage)) { + + this.redrawBlockRestoreConfig = { + + stage: stage, + + skipStage: skipStage, + + renderInPosition: renderInPosition + + }; + } + + return; + } else { + + if (self.table.modExists("edit")) { + + self.table.modules.edit.cancelEdit(); + } + + if (!stage) { + + stage = "all"; + } + + if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { + + table.modules.selectRow.deselectRows(); + } + + //cascade through data refresh stages + + switch (stage) { + + case "all": + + case "filter": + + if (!skipStage) { + + if (table.modExists("filter")) { + + self.setActiveRows(table.modules.filter.filter(self.rows)); + } else { + + self.setActiveRows(self.rows.slice(0)); + } + } else { + + skipStage = false; + } + + case "sort": + + if (!skipStage) { + + if (table.modExists("sort")) { + + table.modules.sort.sort(this.activeRows); + } + } else { + + skipStage = false; + } + + //regenerate row numbers for row number formatter if in use + + this.regenerateRowNumbers(); + + //generic stage to allow for pipeline trigger after the data manipulation stage + + case "display": + + this.resetDisplayRows(); + + case "freeze": + + if (!skipStage) { + + if (this.table.modExists("frozenRows")) { + + if (table.modules.frozenRows.isFrozen()) { + + if (!table.modules.frozenRows.getDisplayIndex()) { + + table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.frozenRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + + table.modules.frozenRows.setDisplayIndex(displayIndex); + } + } + } + } else { + + skipStage = false; + } + + case "group": + + if (!skipStage) { + + if (table.options.groupBy && table.modExists("groupRows")) { + + if (!table.modules.groupRows.getDisplayIndex()) { + + table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.groupRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + + table.modules.groupRows.setDisplayIndex(displayIndex); + } + } + } else { + + skipStage = false; + } + + case "tree": + + if (!skipStage) { + + if (table.options.dataTree && table.modExists("dataTree")) { + + if (!table.modules.dataTree.getDisplayIndex()) { + + table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.dataTree.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + + table.modules.dataTree.setDisplayIndex(displayIndex); + } + } + } else { + + skipStage = false; + } + + if (table.options.pagination && table.modExists("page") && !renderInPosition) { + + if (table.modules.page.getMode() == "local") { + + table.modules.page.reset(); + } + } + + case "page": + + if (!skipStage) { + + if (table.options.pagination && table.modExists("page")) { + + if (!table.modules.page.getDisplayIndex()) { + + table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.page.getDisplayIndex(); + + if (table.modules.page.getMode() == "local") { + + table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); + } + + displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + + table.modules.page.setDisplayIndex(displayIndex); + } + } + } else { + + skipStage = false; + } + + } + + if (Tabulator.prototype.helpers.elVisible(self.element)) { + + if (renderInPosition) { + + self.reRenderInPosition(); + } else { + + if (stage === "all" && this.table.options.virtualDomHoz) { + + this.table.vdomHoz.dataChange(); + } + + self.renderTable(); + + if (table.options.layoutColumnsOnNewData) { + + self.table.columnManager.redraw(true); + } + } + } + + if (table.modExists("columnCalcs")) { + + table.modules.columnCalcs.recalc(this.activeRows); + } + } + }; + + //regenerate row numbers for row number formatter if in use + + RowManager.prototype.regenerateRowNumbers = function () { + var _this16 = this; + + if (this.rowNumColumn) { + + this.activeRows.forEach(function (row) { + + var cell = row.getCell(_this16.rowNumColumn); + + if (cell) { + + cell._generateContents(); + } + }); + } + }; + + RowManager.prototype.setActiveRows = function (activeRows) { + + this.activeRows = activeRows; + + this.activeRowsCount = this.activeRows.length; + }; + + //reset display rows array + + RowManager.prototype.resetDisplayRows = function () { + + this.displayRows = []; + + this.displayRows.push(this.activeRows.slice(0)); + + this.displayRowsCount = this.displayRows[0].length; + + if (this.table.modExists("frozenRows")) { + + this.table.modules.frozenRows.setDisplayIndex(0); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.groupRows.setDisplayIndex(0); + } + + if (this.table.options.pagination && this.table.modExists("page")) { + + this.table.modules.page.setDisplayIndex(0); + } + }; + + RowManager.prototype.getNextDisplayIndex = function () { + + return this.displayRows.length; + }; + + //set display row pipeline data + + RowManager.prototype.setDisplayRows = function (displayRows, index) { + + var output = true; + + if (index && typeof this.displayRows[index] != "undefined") { + + this.displayRows[index] = displayRows; + + output = true; + } else { + + this.displayRows.push(displayRows); + + output = index = this.displayRows.length - 1; + } + + if (index == this.displayRows.length - 1) { + + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; + } + + return output; + }; + + RowManager.prototype.getDisplayRows = function (index) { + + if (typeof index == "undefined") { + + return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; + } else { + + return this.displayRows[index] || []; + } + }; + + RowManager.prototype.getVisibleRows = function (viewable) { + + var topEdge = this.element.scrollTop, + bottomEdge = this.element.clientHeight + topEdge, + topFound = false, + topRow = 0, + bottomRow = 0, + rows = this.getDisplayRows(); + + if (viewable) { + + this.getDisplayRows(); + + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + + if (rows[i]) { + + if (!topFound) { + + if (topEdge - rows[i].getElement().offsetTop >= 0) { + + topRow = i; + } else { + + topFound = true; + + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + + bottomRow = i; + } else { + + break; + } + } + } else { + + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + + bottomRow = i; + } else { + + break; + } + } + } + } + } else { + + topRow = this.vDomTop; + + bottomRow = this.vDomBottom; + } + + return rows.slice(topRow, bottomRow + 1); + }; + + //repeat action accross display rows + + RowManager.prototype.displayRowIterator = function (callback) { + + this.displayRows.forEach(callback); + + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; + }; + + //return only actual rows (not group headers etc) + + RowManager.prototype.getRows = function (active) { + + var rows; + + switch (active) { + + case "active": + + rows = this.activeRows; + + break; + + case "display": + + rows = this.table.rowManager.getDisplayRows(); + + break; + + case "visible": + + rows = this.getVisibleRows(true); + + break; + + case "selected": + + rows = this.table.modules.selectRow.selectedRows; + + break; + + default: + + rows = this.rows; + + } + + return rows; + }; + + ///////////////// Table Rendering ///////////////// + + + //trigger rerender of table in current position + + RowManager.prototype.reRenderInPosition = function (callback) { + + if (this.getRenderMode() == "virtual") { + + if (this.redrawBlock) { + + if (callback) { + + callback(); + } else { + + this.redrawBlockRederInPosition = true; + } + } else { + + var scrollTop = this.element.scrollTop; + + var topRow = false; + + var topOffset = false; + + var left = this.scrollLeft; + + var rows = this.getDisplayRows(); + + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + + if (rows[i]) { + + var diff = scrollTop - rows[i].getElement().offsetTop; + + if (topOffset === false || Math.abs(diff) < topOffset) { + + topOffset = diff; + + topRow = i; + } else { + + break; + } + } + } + + if (callback) { + + callback(); + } + + this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); + + this.scrollHorizontal(left); + } + } else { + + this.renderTable(); + + if (callback) { + + callback(); + } + } + }; + + RowManager.prototype.setRenderMode = function () { + + if (this.table.options.virtualDom) { + + this.renderMode = "virtual"; + + if (this.table.element.clientHeight || this.table.options.height) { + + this.fixedHeight = true; + } else { + + this.fixedHeight = false; + } + } else { + + this.renderMode = "classic"; + } + }; + + RowManager.prototype.getRenderMode = function () { + + return this.renderMode; + }; + + RowManager.prototype.renderTable = function () { + + this.table.options.renderStarted.call(this.table); + + this.element.scrollTop = 0; + + switch (this.renderMode) { + + case "classic": + + this._simpleRender(); + + break; + + case "virtual": + + this._virtualRenderFill(); + + break; + + } + + if (this.firstRender) { + + if (this.displayRowsCount) { + + this.firstRender = false; + + this.table.modules.layout.layout(); + } else { + + this.renderEmptyScroll(); + } + } + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layout(); + } + + if (!this.displayRowsCount) { + + if (this.table.options.placeholder) { + + this.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); + + this.getElement().appendChild(this.table.options.placeholder); + + this.table.options.placeholder.style.width = this.table.columnManager.getWidth() + "px"; + } + } + + this.table.options.renderComplete.call(this.table); + }; + + //simple render on heightless table + + RowManager.prototype._simpleRender = function () { + + this._clearVirtualDom(); + + if (this.displayRowsCount) { + + this.checkClassicModeGroupHeaderWidth(); + } else { + + this.renderEmptyScroll(); + } + }; + + RowManager.prototype.checkClassicModeGroupHeaderWidth = function () { + + var self = this, + element = this.tableElement, + onlyGroupHeaders = true; + + self.getDisplayRows().forEach(function (row, index) { + + self.styleRow(row, index); + + element.appendChild(row.getElement()); + + row.initialize(true); + + if (row.type !== "group") { + + onlyGroupHeaders = false; + } + }); + + if (onlyGroupHeaders) { + + element.style.minWidth = self.table.columnManager.getWidth() + "px"; + } else { + + element.style.minWidth = ""; + } + }; + + //show scrollbars on empty table div + + RowManager.prototype.renderEmptyScroll = function () { + + if (this.table.options.placeholder) { + + this.tableElement.style.display = "none"; + } else { + + this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; + + // this.tableElement.style.minHeight = "1px"; + + // this.tableElement.style.visibility = "hidden"; + } + }; + + RowManager.prototype._clearVirtualDom = function () { + + var element = this.tableElement; + + if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { + + this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); + } + + // element.children.detach(); + + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.style.paddingTop = ""; + + element.style.paddingBottom = ""; + + element.style.minWidth = ""; + + element.style.minHeight = ""; + + element.style.display = ""; + + element.style.visibility = ""; + + this.scrollTop = 0; + + this.scrollLeft = 0; + + this.vDomTop = 0; + + this.vDomBottom = 0; + + this.vDomTopPad = 0; + + this.vDomBottomPad = 0; + }; + + RowManager.prototype.styleRow = function (row, index) { + + var rowEl = row.getElement(); + + if (index % 2) { + + rowEl.classList.add("tabulator-row-even"); + + rowEl.classList.remove("tabulator-row-odd"); + } else { + + rowEl.classList.add("tabulator-row-odd"); + + rowEl.classList.remove("tabulator-row-even"); + } + }; + + //full virtual render + + RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { + + var self = this, + element = self.tableElement, + holder = self.element, + topPad = 0, + rowsHeight = 0, + topPadHeight = 0, + i = 0, + onlyGroupHeaders = true, + rows = self.getDisplayRows(); + + position = position || 0; + + offset = offset || 0; + + if (!position) { + + self._clearVirtualDom(); + } else { + + while (element.firstChild) { + element.removeChild(element.firstChild); + } //check if position is too close to bottom of table + + var heightOccupied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; + + if (heightOccupied < self.height) { + + position -= Math.ceil((self.height - heightOccupied) / self.vDomRowHeight); + + if (position < 0) { + + position = 0; + } + } + + //calculate initial pad + + topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); + + position -= topPad; + } + + if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { + + self.vDomTop = position; + + self.vDomBottom = position - 1; + + while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { + + var index = self.vDomBottom + 1, + row = rows[index], + rowHeight = 0; + + self.styleRow(row, index); + + element.appendChild(row.getElement()); + + row.initialize(); + + if (!row.heightInitialized) { + + row.normalizeHeight(true); + } + + // if(!row.initialized){ + + // row.initialize(true); + + // }else{ + + // if(!row.heightInitialized){ + + // row.normalizeHeight(true); + + // } + + // } + + + rowHeight = row.getHeight(); + + if (i < topPad) { + + topPadHeight += rowHeight; + } else { + + rowsHeight += rowHeight; + } + + if (rowHeight > this.vDomWindowBuffer) { + + this.vDomWindowBuffer = rowHeight * 2; + } + + if (row.type !== "group") { + + onlyGroupHeaders = false; + } + + self.vDomBottom++; + + i++; + } + + if (!position) { + + this.vDomTopPad = 0; + + //adjust rowheight to match average of rendered elements + + self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); + + self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); + + self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; + } else { + + self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; + + self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); + } + + element.style.paddingTop = self.vDomTopPad + "px"; + + element.style.paddingBottom = self.vDomBottomPad + "px"; + + if (forceMove) { + + this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); + } + + this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); + + //adjust for horizontal scrollbar if present (and not at top of table) + + if (this.element.scrollWidth > this.element.offsetWidth && forceMove) { + + this.scrollTop += this.element.offsetHeight - this.element.clientHeight; + } + + this.vDomScrollPosTop = this.scrollTop; + + this.vDomScrollPosBottom = this.scrollTop; + + holder.scrollTop = this.scrollTop; + + element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; + + if (self.table.options.groupBy) { + + if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { + + self.tableElement.style.minWidth = self.table.columnManager.getWidth(); + } + } + } else { + + this.renderEmptyScroll(); + } + + if (!this.fixedHeight) { + + this.adjustTableSize(); + } + }; + + //handle vertical scrolling + + RowManager.prototype.scrollVertical = function (dir) { + + var topDiff = this.scrollTop - this.vDomScrollPosTop; + + var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + var margin = this.vDomWindowBuffer * 2; + + if (-topDiff > margin || bottomDiff > margin) { + + //if big scroll redraw table; + + var left = this.scrollLeft; + + this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); + + this.scrollHorizontal(left); + } else { + + if (dir) { + + //scrolling up + + if (topDiff < 0) { + + this._addTopRow(-topDiff); + } + + if (bottomDiff < 0) { + + //hide bottom row if needed + + if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { + + this._removeBottomRow(-bottomDiff); + } else { + + this.vDomScrollPosBottom = this.scrollTop; + } + } + } else { + + //scrolling down + + if (topDiff >= 0) { + + //hide top row if needed + + if (this.scrollTop > this.vDomWindowBuffer) { + + this._removeTopRow(topDiff); + } else { + + this.vDomScrollPosTop = this.scrollTop; + } + } + + if (bottomDiff >= 0) { + + this._addBottomRow(bottomDiff); + } + } + } + }; + + RowManager.prototype._addTopRow = function (topDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomTop) { + + var index = this.vDomTop - 1, + topRow = rows[index], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + //hide top row if needed + + if (topDiff >= topRowHeight) { + + this.styleRow(topRow, index); + + table.insertBefore(topRow.getElement(), table.firstChild); + + if (!topRow.initialized || !topRow.heightInitialized) { + + this.vDomTopNewRows.push(topRow); + + if (!topRow.heightInitialized) { + + topRow.clearCellHeight(); + } + } + + topRow.initialize(); + + this.vDomTopPad -= topRowHeight; + + if (this.vDomTopPad < 0) { + + this.vDomTopPad = index * this.vDomRowHeight; + } + + if (!index) { + + this.vDomTopPad = 0; + } + + table.style.paddingTop = this.vDomTopPad + "px"; + + this.vDomScrollPosTop -= topRowHeight; + + this.vDomTop--; + } + + topDiff = -(this.scrollTop - this.vDomScrollPosTop); + + if (topRow.getHeight() > this.vDomWindowBuffer) { + + this.vDomWindowBuffer = topRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { + + this._addTopRow(topDiff, i + 1); + } else { + + this._quickNormalizeRowHeight(this.vDomTopNewRows); + } + } + }; + + RowManager.prototype._removeTopRow = function (topDiff) { + + var table = this.tableElement, + topRow = this.getDisplayRows()[this.vDomTop], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + if (topDiff >= topRowHeight) { + + var rowEl = topRow.getElement(); + + rowEl.parentNode.removeChild(rowEl); + + this.vDomTopPad += topRowHeight; + + table.style.paddingTop = this.vDomTopPad + "px"; + + this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; + + this.vDomTop++; + + topDiff = this.scrollTop - this.vDomScrollPosTop; + + this._removeTopRow(topDiff); + } + }; + + RowManager.prototype._addBottomRow = function (bottomDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomBottom < this.displayRowsCount - 1) { + + var index = this.vDomBottom + 1, + bottomRow = rows[index], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + //hide bottom row if needed + + if (bottomDiff >= bottomRowHeight) { + + this.styleRow(bottomRow, index); + + table.appendChild(bottomRow.getElement()); + + if (!bottomRow.initialized || !bottomRow.heightInitialized) { + + this.vDomBottomNewRows.push(bottomRow); + + if (!bottomRow.heightInitialized) { + + bottomRow.clearCellHeight(); + } + } + + bottomRow.initialize(); + + this.vDomBottomPad -= bottomRowHeight; + + if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { + + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + + this.vDomScrollPosBottom += bottomRowHeight; + + this.vDomBottom++; + } + + bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + if (bottomRow.getHeight() > this.vDomWindowBuffer) { + + this.vDomWindowBuffer = bottomRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { + + this._addBottomRow(bottomDiff, i + 1); + } else { + + this._quickNormalizeRowHeight(this.vDomBottomNewRows); + } + } + }; + + RowManager.prototype._removeBottomRow = function (bottomDiff) { + + var table = this.tableElement, + bottomRow = this.getDisplayRows()[this.vDomBottom], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + if (bottomDiff >= bottomRowHeight) { + + var rowEl = bottomRow.getElement(); + + if (rowEl.parentNode) { + + rowEl.parentNode.removeChild(rowEl); + } + + this.vDomBottomPad += bottomRowHeight; + + if (this.vDomBottomPad < 0) { + + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + + this.vDomScrollPosBottom -= bottomRowHeight; + + this.vDomBottom--; + + bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); + + this._removeBottomRow(bottomDiff); + } + }; + + RowManager.prototype._quickNormalizeRowHeight = function (rows) { + + rows.forEach(function (row) { + + row.calcHeight(); + }); + + rows.forEach(function (row) { + + row.setCellHeight(); + }); + + rows.length = 0; + }; + + //normalize height of active rows + + RowManager.prototype.normalizeHeight = function () { + + this.activeRows.forEach(function (row) { + + row.normalizeHeight(); + }); + }; + + //adjust the height of the table holder to fit in the Tabulator element + + RowManager.prototype.adjustTableSize = function () { + + var initialHeight = this.element.clientHeight, + modExists; + + if (this.renderMode === "virtual") { + + var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0)); + + if (this.fixedHeight) { + + this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; + + this.element.style.height = "calc(100% - " + otherHeight + "px)"; + + this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; + } else { + + this.element.style.height = ""; + + this.element.style.height = this.table.element.clientHeight - otherHeight + "px"; + + this.element.scrollTop = this.scrollTop; + } + + this.height = this.element.clientHeight; + + this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; + + //check if the table has changed size when dealing with variable height tables + + if (!this.fixedHeight && initialHeight != this.element.clientHeight) { + + modExists = this.table.modExists("resizeTable"); + + if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) { + + this.redraw(); + } + } + } + }; + + //renitialize all rows + + RowManager.prototype.reinitialize = function () { + + this.rows.forEach(function (row) { + + row.reinitialize(true); + }); + }; + + //prevent table from being redrawn + + RowManager.prototype.blockRedraw = function () { + + this.redrawBlock = true; + + this.redrawBlockRestoreConfig = false; + }; + + //restore table redrawing + + RowManager.prototype.restoreRedraw = function () { + + this.redrawBlock = false; + + if (this.redrawBlockRestoreConfig) { + + this.refreshActiveData(this.redrawBlockRestoreConfig.stage, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition); + + this.redrawBlockRestoreConfig = false; + } else { + + if (this.redrawBlockRederInPosition) { + + this.reRenderInPosition(); + } + } + + this.redrawBlockRederInPosition = false; + }; + + //redraw table + + RowManager.prototype.redraw = function (force) { + + var pos = 0, + left = this.scrollLeft; + + this.adjustTableSize(); + + this.table.tableWidth = this.table.element.clientWidth; + + if (!force) { + + if (this.renderMode == "classic") { + + if (this.table.options.groupBy) { + + this.refreshActiveData("group", false, false); + } else { + + this._simpleRender(); + } + } else { + + this.reRenderInPosition(); + + this.scrollHorizontal(left); + } + + if (!this.displayRowsCount) { + + if (this.table.options.placeholder) { + + this.getElement().appendChild(this.table.options.placeholder); + } + } + } else { + + this.renderTable(); + } + }; + + RowManager.prototype.resetScroll = function () { + + this.element.scrollLeft = 0; + + this.element.scrollTop = 0; + + if (this.table.browser === "ie") { + + var event = document.createEvent("Event"); + + event.initEvent("scroll", false, true); + + this.element.dispatchEvent(event); + } else { + + this.element.dispatchEvent(new Event('scroll')); + } + }; + + var VDomHoz = function VDomHoz(table) { + + this.table = table; + + this.element = this.table.rowManager.tableElement; + + this.holderEl = this.table.rowManager.element; + + this.leftCol = 0; + + this.rightCol = 0; + + this.scrollLeft = 0; + + this.vDomScrollPosLeft = 0; + + this.vDomScrollPosRight = 0; + + this.vDomPadLeft = 0; + + this.vDomPadRight = 0; + + this.fitDataColAvg = 0; + + this.window = 200; //pixel margin to make column visible before it is shown on screen + + + this.initialized = false; + + this.columns = []; + + if (this.compatabilityCheck()) { + + this.initialize(); + } + }; + + VDomHoz.prototype.compatabilityCheck = function () { + + var options = this.table.options, + frozen = false, + ok = true; + + if (options.layout == "fitDataTable") { + + console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); + + ok = false; + } + + if (options.responsiveLayout) { + + console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); + + ok = false; + } + + if (this.table.rtl) { + + console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); + + ok = false; + } + + // if(options.rowFormatter){ + + // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); + + // ok = false; + + // } + + + if (options.columns) { + + frozen = options.columns.find(function (col) { + + return col.frozen; + }); + + if (frozen) { + + console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); + + ok = false; + } + } + + if (!ok) { + + options.virtualDomHoz = false; + } + + return ok; + }; + + VDomHoz.prototype.initialize = function () { + var _this17 = this; + + this.holderEl.addEventListener("scroll", function () { + + var left = _this17.holderEl.scrollLeft; + + if (_this17.scrollLeft != left) { + + _this17.scrollLeft = left; + + _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); + } + }); + }; + + VDomHoz.prototype.deinitialize = function () { + + this.initialized = false; + }; + + VDomHoz.prototype.clear = function () { + + this.columns = []; + + this.leftCol = -1; + + this.rightCol = 0; + + this.vDomScrollPosLeft = 0; + + this.vDomScrollPosRight = 0; + + this.vDomPadLeft = 0; + + this.vDomPadRight = 0; + }; + + VDomHoz.prototype.dataChange = function () { + + var change = false, + collsWidth = 0, + colEnd = 0, + group, + row, + rowEl; + + if (this.table.options.layout === "fitData") { + + this.table.columnManager.columnsByIndex.forEach(function (column) { + + if (!column.definition.width && column.visible) { + + change = true; + } + }); + + if (change) { + + if (change && this.table.rowManager.getDisplayRows().length) { + + // this.table.vdomHoz.deinitialize(); + + + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + if (this.table.options.groupBy) { + + group = this.table.modules.groupRows.getGroups(false)[0]; + + row = group.getRows(false)[0]; + } else { + + row = this.table.rowManager.getDisplayRows()[0]; + } + + if (row) { + + rowEl = row.getElement(); + + row.generateCells(); + + this.element.appendChild(rowEl); + + for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { + + var cell = row.cells[colEnd]; + + rowEl.appendChild(cell.getElement()); + + cell.column.reinitializeWidth(); + + collsWidth += cell.column.getWidth(); + + if (collsWidth > this.vDomScrollPosRight) { + + break; + } + } + + rowEl.parentNode.removeChild(rowEl); + + this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); + + for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { + + this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); + } + + this.reinitialize(false, true); + } + } + } + } else { + + if (this.table.options.layout === "fitColumns") { + + this.table.modules.layout.layout(); + + this.table.vdomHoz.reinitialize(false, true); + } + } + }; + + VDomHoz.prototype.fitDataLayoutOverride = function () { + + for (var _i5 = this.leftCol; _i5 <= this.rightCol; _i5++) { + + this.columns[_i5].reinitializeWidth(); + } + }; + + VDomHoz.prototype.reinitialize = function (update, blockRedraw) { + var _this18 = this; + + var old = { + + cols: this.columns, + + leftCol: this.leftCol, + + rightCol: this.rightCol + + }; + + if (update && !this.initialized) { + + return; + } + + this.clear(); + + this.scrollLeft = this.holderEl.scrollLeft; + + this.vDomScrollPosLeft = this.scrollLeft - this.window; + + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + var colPos = 0; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + + var config = {}; + + if (column.visible) { + + var width = column.getWidth(); + + config.leftPos = colPos; + + config.rightPos = colPos + width; + + if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { + + //column is visible + + + if (_this18.leftCol == -1) { + + _this18.leftCol = _this18.columns.length; + + _this18.vDomPadLeft = colPos; + } + + _this18.rightCol = _this18.columns.length; + } else { + + // column is hidden + + if (_this18.leftCol !== -1) { + + _this18.vDomPadRight += width; + } + } + + _this18.columns.push(column); + + column.modules.vdomHoz = config; + + colPos += width; + } + }); + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.initialized = true; + + if (!blockRedraw) { + + if (!update || this.reinitChanged(old)) { + + this.renitializeRows(); + } + } + + this.holderEl.scrollLeft = this.scrollLeft; + }; + + VDomHoz.prototype.reinitChanged = function (old) { + var _this19 = this; + + var match = true; + + if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { + + return true; + } + + old.cols.forEach(function (col, i) { + + if (col !== _this19.columns[i]) { + + match = false; + } + }); + + return !match; + }; + + VDomHoz.prototype.renitializeRows = function () { + var _this20 = this; + + var rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + + _this20.reinitializeRow(row, true); + }); + }; + + VDomHoz.prototype.scroll = function (diff) { + + this.vDomScrollPosLeft += diff; + + this.vDomScrollPosRight += diff; + + if (diff > this.holderEl.clientWidth * .8) { + + this.reinitialize(); + } else { + + if (diff > 0) { + + //scroll right + + this.addColRight(); + + this.removeColLeft(); + } else { + + //scroll left + + this.addColLeft(); + + this.removeColRight(); + } + } + }; + + VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { + + for (var _i6 = start; _i6 < end; _i6++) { + + var column = this.columns[_i6]; + + column.modules.vdomHoz.leftPos -= diff; + + column.modules.vdomHoz.rightPos -= diff; + } + }; + + VDomHoz.prototype.addColRight = function () { + + var column = this.columns[this.rightCol + 1], + rows, + oldWidth, + widthDiff; + + if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + + if (row.type !== "group") { + + var cell = row.getCell(column); + + row.getElement().appendChild(cell.getElement()); + + cell.cellRendered(); + } + }); + + if (this.fitDataColAvg) { + + oldWidth = column.getWidth(); + + if (oldWidth === this.fitDataColAvg) { + + column.reinitializeWidth(); + + widthDiff = oldWidth - column.getWidth(); + + if (widthDiff) { + + column.modules.vdomHoz.rightPos -= widthDiff; + + this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); + } + } + } + + this.rightCol++; + + if (this.rightCol >= this.columns.length - 1) { + + this.vDomPadRight = 0; + } else { + + this.vDomPadRight -= column.getWidth(); + } + + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.addColRight(); + } + }; + + VDomHoz.prototype.addColLeft = function () { + + var column = this.columns[this.leftCol - 1], + rows; + + if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { + + var rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + + if (row.type !== "group") { + + var cell = row.getCell(column); + + row.getElement().prepend(cell.getElement()); + + cell.cellRendered(); + } + }); + + if (!this.leftCol) { + + this.vDomPadLeft = 0; + } else { + + this.vDomPadLeft -= column.getWidth(); + } + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol--; + + this.addColLeft(); + } + }; + + VDomHoz.prototype.removeColRight = function (column) { + + var column = this.columns[this.rightCol], + rows; + + if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { + + rows = this.table.rowManager.getVisibleRows(); + + column.modules.vdomHoz.visible = false; + + rows.forEach(function (row) { + + if (row.type !== "group") { + + var cell = row.getCell(column); + + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadRight += column.getWidth(); + + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.rightCol--; + + this.removeColRight(); + } + }; + + VDomHoz.prototype.removeColLeft = function () { + + var column = this.columns[this.leftCol], + rows; + + if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + + if (row.type !== "group") { + + var cell = row.getCell(column); + + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadLeft += column.getWidth(); + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol++; + + this.removeColLeft(); + } + }; + + VDomHoz.prototype.initializeRow = function (row) { + + if (row.type !== "group") { + + row.modules.vdomHoz = { + + leftCol: this.leftCol, + + rightCol: this.rightCol + + }; + + for (var _i7 = this.leftCol; _i7 <= this.rightCol; _i7++) { + + var column = this.columns[_i7]; + + if (column.visible) { + + var cell = row.getCell(column); + + row.getElement().appendChild(cell.getElement()); + + cell.cellRendered(); + } + } + } + }; + + VDomHoz.prototype.reinitializeRow = function (row, force) { + + if (row.type !== "group") { + + if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { + + var rowEl = row.getElement(); + + while (rowEl.firstChild) { + rowEl.removeChild(rowEl.firstChild); + }this.initializeRow(row); + } + } + }; + + //public row object + + var RowComponent = function RowComponent(row) { + + this._row = row; + }; + + RowComponent.prototype.getData = function (transform) { + + return this._row.getData(transform); + }; + + RowComponent.prototype.getElement = function () { + + return this._row.getElement(); + }; + + RowComponent.prototype.getCells = function () { + + var cells = []; + + this._row.getCells().forEach(function (cell) { + + cells.push(cell.getComponent()); + }); + + return cells; + }; + + RowComponent.prototype.getCell = function (column) { + + var cell = this._row.getCell(column); + + return cell ? cell.getComponent() : false; + }; + + RowComponent.prototype.getIndex = function () { + + return this._row.getData("data")[this._row.table.options.index]; + }; + + RowComponent.prototype.getPosition = function (active) { + + return this._row.table.rowManager.getRowPosition(this._row, active); + }; + + RowComponent.prototype.delete = function () { + + return this._row.delete(); + }; + + RowComponent.prototype.scrollTo = function () { + + return this._row.table.rowManager.scrollToRow(this._row); + }; + + RowComponent.prototype.pageTo = function () { + + if (this._row.table.modExists("page", true)) { + + return this._row.table.modules.page.setPageToRow(this._row); + } + }; + + RowComponent.prototype.move = function (to, after) { + + this._row.moveToRow(to, after); + }; + + RowComponent.prototype.update = function (data) { + + return this._row.updateData(data); + }; + + RowComponent.prototype.normalizeHeight = function () { + + this._row.normalizeHeight(true); + }; + + RowComponent.prototype.select = function () { + + this._row.table.modules.selectRow.selectRows(this._row); + }; + + RowComponent.prototype.deselect = function () { + + this._row.table.modules.selectRow.deselectRows(this._row); + }; + + RowComponent.prototype.toggleSelect = function () { + + this._row.table.modules.selectRow.toggleRow(this._row); + }; + + RowComponent.prototype.isSelected = function () { + + return this._row.table.modules.selectRow.isRowSelected(this._row); + }; + + RowComponent.prototype._getSelf = function () { + + return this._row; + }; + + RowComponent.prototype.validate = function () { + + return this._row.validate(); + }; + + RowComponent.prototype.freeze = function () { + + if (this._row.table.modExists("frozenRows", true)) { + + this._row.table.modules.frozenRows.freezeRow(this._row); + } + }; + + RowComponent.prototype.unfreeze = function () { + + if (this._row.table.modExists("frozenRows", true)) { + + this._row.table.modules.frozenRows.unfreezeRow(this._row); + } + }; + + RowComponent.prototype.isFrozen = function () { + + if (this._row.table.modExists("frozenRows", true)) { + + var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); + + return index > -1; + } + + return false; + }; + + RowComponent.prototype.treeCollapse = function () { + + if (this._row.table.modExists("dataTree", true)) { + + this._row.table.modules.dataTree.collapseRow(this._row); + } + }; + + RowComponent.prototype.treeExpand = function () { + + if (this._row.table.modExists("dataTree", true)) { + + this._row.table.modules.dataTree.expandRow(this._row); + } + }; + + RowComponent.prototype.treeToggle = function () { + + if (this._row.table.modExists("dataTree", true)) { + + this._row.table.modules.dataTree.toggleRow(this._row); + } + }; + + RowComponent.prototype.getTreeParent = function () { + + if (this._row.table.modExists("dataTree", true)) { + + return this._row.table.modules.dataTree.getTreeParent(this._row); + } + + return false; + }; + + RowComponent.prototype.getTreeChildren = function () { + + if (this._row.table.modExists("dataTree", true)) { + + return this._row.table.modules.dataTree.getTreeChildren(this._row, true); + } + + return false; + }; + + RowComponent.prototype.addTreeChild = function (data, pos, index) { + + if (this._row.table.modExists("dataTree", true)) { + + return this._row.table.modules.dataTree.addTreeChildRow(this._row, data, pos, index); + } + + return false; + }; + + RowComponent.prototype.reformat = function () { + + return this._row.reinitialize(); + }; + + RowComponent.prototype.getGroup = function () { + + return this._row.getGroup().getComponent(); + }; + + RowComponent.prototype.getTable = function () { + + return this._row.table; + }; + + RowComponent.prototype.getNextRow = function () { + + var row = this._row.nextRow(); + + return row ? row.getComponent() : row; + }; + + RowComponent.prototype.getPrevRow = function () { + + var row = this._row.prevRow(); + + return row ? row.getComponent() : row; + }; + + var Row = function Row(data, parent) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "row"; + + + this.table = parent.table; + + this.parent = parent; + + this.data = {}; + + this.type = type; //type of element + + this.element = false; + + this.modules = {}; //hold module variables; + + this.cells = []; + + this.height = 0; //hold element height + + this.heightStyled = ""; //hold element height prestyled to improve render efficiency + + this.manualHeight = false; //user has manually set row height + + this.outerHeight = 0; //holde lements outer height + + this.initialized = false; //element has been rendered + + this.heightInitialized = false; //element has resized cells to fit + + + this.component = null; + + this.created = false; + + this.setData(data); + }; + + Row.prototype.create = function () { + + if (!this.created) { + + this.created = true; + + this.generateElement(); + } + }; + + Row.prototype.createElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + + el.setAttribute("role", "row"); + + this.element = el; + }; + + Row.prototype.getElement = function () { + + this.create(); + + return this.element; + }; + + Row.prototype.detachElement = function () { + + if (this.element && this.element.parentNode) { + + this.element.parentNode.removeChild(this.element); + } + }; + + Row.prototype.generateElement = function () { + + var self = this, + dblTap, + tapHold, + tap; + + this.createElement(); + + //set row selection characteristics + + if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { + + self.table.modules.selectRow.initializeRow(this); + } + + //setup movable rows + + if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + + self.table.modules.moveRow.initializeRow(this); + } + + //setup data tree + + if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { + + self.table.modules.dataTree.initializeRow(this); + } + + //setup column colapse container + + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { + + self.table.modules.responsiveLayout.initializeRow(this); + } + + //set column menu + + if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { + + self.table.modules.menu.initializeRow(this); + } + + //handle row click events + + if (self.table.options.rowClick) { + + self.element.addEventListener("click", function (e) { + + self.table.options.rowClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowDblClick) { + + self.element.addEventListener("dblclick", function (e) { + + self.table.options.rowDblClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowContext) { + + self.element.addEventListener("contextmenu", function (e) { + + self.table.options.rowContext(e, self.getComponent()); + }); + } + + //handle mouse events + + if (self.table.options.rowMouseEnter) { + + self.element.addEventListener("mouseenter", function (e) { + + self.table.options.rowMouseEnter(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseLeave) { + + self.element.addEventListener("mouseleave", function (e) { + + self.table.options.rowMouseLeave(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOver) { + + self.element.addEventListener("mouseover", function (e) { + + self.table.options.rowMouseOver(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOut) { + + self.element.addEventListener("mouseout", function (e) { + + self.table.options.rowMouseOut(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseMove) { + + self.element.addEventListener("mousemove", function (e) { + + self.table.options.rowMouseMove(e, self.getComponent()); + }); + } + + if (self.table.options.rowTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + + if (tap) { + + self.table.options.rowTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.table.options.rowDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + self.table.options.rowDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (self.table.options.rowTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + self.table.options.rowTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + }; + + Row.prototype.generateCells = function () { + + this.cells = this.table.columnManager.generateCells(this); + }; + + //functions to setup on first render + + Row.prototype.initialize = function (force) { + var _this21 = this; + + this.create(); + + if (!this.initialized || force) { + + this.deleteCells(); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + } //handle frozen cells + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { + + this.table.vdomHoz.initializeRow(this); + } else { + + this.cells.forEach(function (cell) { + + _this21.element.appendChild(cell.getElement()); + + cell.cellRendered(); + }); + } + + if (force) { + + this.normalizeHeight(); + } + + //setup movable rows + + if (this.table.options.dataTree && this.table.modExists("dataTree")) { + + this.table.modules.dataTree.layoutRow(this); + } + + //setup column colapse container + + if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { + + this.table.modules.responsiveLayout.layoutRow(this); + } + + if (this.table.options.rowFormatter) { + + this.table.options.rowFormatter(this.getComponent()); + } + + //set resizable handles + + if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { + + this.table.modules.resizeRows.initializeRow(this); + } + + this.initialized = true; + } else { + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitializeRow(this); + } + } + }; + + Row.prototype.reinitializeHeight = function () { + + this.heightInitialized = false; + + if (this.element && this.element.offsetParent !== null) { + + this.normalizeHeight(true); + } + }; + + Row.prototype.reinitialize = function (children) { + + this.initialized = false; + + this.heightInitialized = false; + + if (!this.manualHeight) { + + this.height = 0; + + this.heightStyled = ""; + } + + if (this.element && this.element.offsetParent !== null) { + + this.initialize(true); + } + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + + this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { + + child.reinitialize(true); + }); + } + }; + + //get heights when doing bulk row style calcs in virtual DOM + + Row.prototype.calcHeight = function (force) { + + var maxHeight = 0, + minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; + + this.cells.forEach(function (cell) { + + var height = cell.getHeight(); + + if (height > maxHeight) { + + maxHeight = height; + } + }); + + if (force) { + + this.height = Math.max(maxHeight, minHeight); + } else { + + this.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight); + } + + this.heightStyled = this.height ? this.height + "px" : ""; + + this.outerHeight = this.element.offsetHeight; + }; + + //set of cells + + Row.prototype.setCellHeight = function () { + + this.cells.forEach(function (cell) { + + cell.setHeight(); + }); + + this.heightInitialized = true; + }; + + Row.prototype.clearCellHeight = function () { + + this.cells.forEach(function (cell) { + + cell.clearHeight(); + }); + }; + + //normalize the height of elements in the row + + Row.prototype.normalizeHeight = function (force) { + + if (force) { + + this.clearCellHeight(); + } + + this.calcHeight(force); + + this.setCellHeight(); + }; + + // Row.prototype.setHeight = function(height){ + + // this.height = height; + + + // this.setCellHeight(); + + // }; + + + //set height of rows + + Row.prototype.setHeight = function (height, force) { + + if (this.height != height || force) { + + this.manualHeight = true; + + this.height = height; + + this.heightStyled = height ? height + "px" : ""; + + this.setCellHeight(); + + // this.outerHeight = this.element.outerHeight(); + + this.outerHeight = this.element.offsetHeight; + } + }; + + //return rows outer height + + Row.prototype.getHeight = function () { + + return this.outerHeight; + }; + + //return rows outer Width + + Row.prototype.getWidth = function () { + + return this.element.offsetWidth; + }; + + //////////////// Cell Management ///////////////// + + + Row.prototype.deleteCell = function (cell) { + + var index = this.cells.indexOf(cell); + + if (index > -1) { + + this.cells.splice(index, 1); + } + }; + + //////////////// Data Management ///////////////// + + + Row.prototype.setData = function (data) { + + if (this.table.modExists("mutator")) { + + data = this.table.modules.mutator.transformRow(data, "data"); + } + + this.data = data; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + + this.table.modules.reactiveData.watchRow(this); + } + }; + + //update the rows data + + Row.prototype.updateData = function (updatedData) { + var _this22 = this; + + var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element), + tempData = {}, + newRowData; + + return new Promise(function (resolve, reject) { + + if (typeof updatedData === "string") { + + updatedData = JSON.parse(updatedData); + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + + _this22.table.modules.reactiveData.block(); + } + + //mutate incomming data if needed + + if (_this22.table.modExists("mutator")) { + + tempData = Object.assign(tempData, _this22.data); + + tempData = Object.assign(tempData, updatedData); + + newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); + } else { + + newRowData = updatedData; + } + + //set data + + for (var attrname in newRowData) { + + _this22.data[attrname] = newRowData[attrname]; + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + + _this22.table.modules.reactiveData.unblock(); + } + + //update affected cells only + + for (var attrname in updatedData) { + + var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); + + columns.forEach(function (column) { + + var cell = _this22.getCell(column.getField()); + + if (cell) { + + var value = column.getFieldValue(newRowData); + + if (cell.getValue() != value) { + + cell.setValueProcessData(value); + + if (visible) { + + cell.cellRendered(); + } + } + } + }); + } + + if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { + + _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); + } + + //Partial reinitialization if visible + + if (visible) { + + _this22.normalizeHeight(true); + + if (_this22.table.options.rowFormatter) { + + _this22.table.options.rowFormatter(_this22.getComponent()); + } + } else { + + _this22.initialized = false; + + _this22.height = 0; + + _this22.heightStyled = ""; + } + + if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { + + _this22.table.modules.dataTree.initializeRow(_this22); + + if (visible) { + + _this22.table.modules.dataTree.layoutRow(_this22); + + _this22.table.rowManager.refreshActiveData("tree", false, true); + } + } + + //this.reinitialize(); + + + _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); + + if (_this22.table.options.dataChanged) { + + _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); + } + + resolve(); + }); + }; + + Row.prototype.getData = function (transform) { + + if (transform) { + + if (this.table.modExists("accessor")) { + + return this.table.modules.accessor.transformRow(this, transform); + } + } + + return this.data; + }; + + Row.prototype.getCell = function (column) { + + var match = false; + + column = this.table.columnManager.findColumn(column); + + match = this.cells.find(function (cell) { + + return cell.column === column; + }); + + return match; + }; + + Row.prototype.getCellIndex = function (findCell) { + + return this.cells.findIndex(function (cell) { + + return cell === findCell; + }); + }; + + Row.prototype.findNextEditableCell = function (index) { + + var nextCell = false; + + if (index < this.cells.length - 1) { + + for (var i = index + 1; i < this.cells.length; i++) { + + var cell = this.cells[i]; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + + var allowEdit = true; + + if (typeof cell.column.modules.edit.check == "function") { + + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + + nextCell = cell; + + break; + } + } + } + } + + return nextCell; + }; + + Row.prototype.findPrevEditableCell = function (index) { + + var prevCell = false; + + if (index > 0) { + + for (var i = index - 1; i >= 0; i--) { + + var cell = this.cells[i], + allowEdit = true; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + + if (typeof cell.column.modules.edit.check == "function") { + + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + + prevCell = cell; + + break; + } + } + } + } + + return prevCell; + }; + + Row.prototype.getCells = function () { + + return this.cells; + }; + + Row.prototype.nextRow = function () { + + var row = this.table.rowManager.nextDisplayRow(this, true); + + return row || false; + }; + + Row.prototype.prevRow = function () { + + var row = this.table.rowManager.prevDisplayRow(this, true); + + return row || false; + }; + + Row.prototype.moveToRow = function (to, before) { + + var toRow = this.table.rowManager.findRow(to); + + if (toRow) { + + this.table.rowManager.moveRowActual(this, toRow, !before); + + this.table.rowManager.refreshActiveData("display", false, true); + } else { + + console.warn("Move Error - No matching row found:", to); + } + }; + + Row.prototype.validate = function () { + + var invalid = []; + + this.cells.forEach(function (cell) { + + if (!cell.validate()) { + + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; + }; + + ///////////////////// Actions ///////////////////// + + + Row.prototype.delete = function () { + var _this23 = this; + + return new Promise(function (resolve, reject) { + + var index, rows; + + if (_this23.table.options.history && _this23.table.modExists("history")) { + + if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { + + rows = _this23.getGroup().rows; + + index = rows.indexOf(_this23); + + if (index) { + + index = rows[index - 1]; + } + } else { + + index = _this23.table.rowManager.getRowIndex(_this23); + + if (index) { + + index = _this23.table.rowManager.rows[index - 1]; + } + } + + _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); + } + + _this23.deleteActual(); + + resolve(); + }); + }; + + Row.prototype.deleteActual = function (blockRedraw) { + + var index = this.table.rowManager.getRowIndex(this); + + this.detatchModules(); + + // if(this.table.options.dataTree && this.table.modExists("dataTree")){ + + // this.table.modules.dataTree.collapseRow(this, true); + + // } + + + //remove any reactive data watchers from row object + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) {} + + // this.table.modules.reactiveData.unwatchRow(this); + + //remove from group + + if (this.modules.group) { + + this.modules.group.removeRow(this); + } + + this.table.rowManager.deleteRow(this, blockRedraw); + + this.deleteCells(); + + this.initialized = false; + + this.heightInitialized = false; + + this.element = false; + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + + this.table.modules.dataTree.rowDelete(this); + } + + //recalc column calculations if present + + if (this.table.modExists("columnCalcs")) { + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.columnCalcs.recalcRowGroup(this); + } else { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } + }; + + Row.prototype.detatchModules = function () { + + //deselect row if it is selected + + if (this.table.modExists("selectRow")) { + + this.table.modules.selectRow._deselectRow(this, true); + } + + //cancel edit if row is currently being edited + + if (this.table.modExists("edit")) { + + if (this.table.modules.edit.currentCell.row === this) { + + this.table.modules.edit.cancelEdit(); + } + } + + if (this.table.modExists("frozenRows")) { + + this.table.modules.frozenRows.detachRow(this); + } + }; + + Row.prototype.deleteCells = function () { + + var cellCount = this.cells.length; + + for (var _i8 = 0; _i8 < cellCount; _i8++) { + + this.cells[0].delete(); + } + }; + + Row.prototype.wipe = function () { + + this.detatchModules(); + + this.deleteCells(); + + if (this.element) { + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (this.element.parentNode) { + + this.element.parentNode.removeChild(this.element); + } + } + + this.element = false; + + this.modules = {}; + }; + + Row.prototype.getGroup = function () { + + return this.modules.group || false; + }; + + //////////////// Object Generation ///////////////// + + Row.prototype.getComponent = function () { + + if (!this.component) { + + this.component = new RowComponent(this); + } + + return this.component; + }; + + //public row object + + var CellComponent = function CellComponent(cell) { + + this._cell = cell; + }; + + CellComponent.prototype.getValue = function () { + + return this._cell.getValue(); + }; + + CellComponent.prototype.getOldValue = function () { + + return this._cell.getOldValue(); + }; + + CellComponent.prototype.getInitialValue = function () { + + return this._cell.initialValue; + }; + + CellComponent.prototype.getElement = function () { + + return this._cell.getElement(); + }; + + CellComponent.prototype.getRow = function () { + + return this._cell.row.getComponent(); + }; + + CellComponent.prototype.getData = function () { + + return this._cell.row.getData(); + }; + + CellComponent.prototype.getField = function () { + + return this._cell.column.getField(); + }; + + CellComponent.prototype.getColumn = function () { + + return this._cell.column.getComponent(); + }; + + CellComponent.prototype.setValue = function (value, mutate) { + + if (typeof mutate == "undefined") { + + mutate = true; + } + + this._cell.setValue(value, mutate); + }; + + CellComponent.prototype.restoreOldValue = function () { + + this._cell.setValueActual(this._cell.getOldValue()); + }; + + CellComponent.prototype.restoreInitialValue = function () { + + this._cell.setValueActual(this._cell.initialValue); + }; + + CellComponent.prototype.edit = function (force) { + + return this._cell.edit(force); + }; + + CellComponent.prototype.cancelEdit = function () { + + this._cell.cancelEdit(); + }; + + CellComponent.prototype.isEdited = function () { + + return !!this._cell.modules.edit && this._cell.modules.edit.edited; + }; + + CellComponent.prototype.clearEdited = function () { + + if (self.table.modExists("edit", true)) { + + this._cell.table.modules.edit.clearEdited(this._cell); + } + }; + + CellComponent.prototype.isValid = function () { + + return this._cell.modules.validate ? !this._cell.modules.validate.invalid : true; + }; + + CellComponent.prototype.validate = function () { + + return this._cell.validate(); + }; + + CellComponent.prototype.clearValidation = function () { + + if (this._cell.table.modExists("validate", true)) { + + this._cell.table.modules.validate.clearValidation(this._cell); + } + }; + + CellComponent.prototype.nav = function () { + + return this._cell.nav(); + }; + + CellComponent.prototype.checkHeight = function () { + + this._cell.checkHeight(); + }; + + CellComponent.prototype.getTable = function () { + + return this._cell.table; + }; + + CellComponent.prototype._getSelf = function () { + + return this._cell; + }; + + var Cell = function Cell(column, row) { + + this.table = column.table; + + this.column = column; + + this.row = row; + + this.element = null; + + this.value = null; + + this.initialValue; + + this.oldValue = null; + + this.modules = {}; + + this.height = null; + + this.width = null; + + this.minWidth = null; + + this.component = null; + + this.loaded = false; //track if the cell has been added to the DOM yet + + + this.build(); + }; + + //////////////// Setup Functions ///////////////// + + + //generate element + + Cell.prototype.build = function () { + + this.generateElement(); + + this.setWidth(); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); + + this.initialValue = this.value; + }; + + Cell.prototype.generateElement = function () { + + this.element = document.createElement('div'); + + this.element.className = "tabulator-cell"; + + this.element.setAttribute("role", "gridcell"); + + this.element = this.element; + }; + + Cell.prototype._configureCell = function () { + + var self = this, + cellEvents = self.column.cellEvents, + element = self.element, + field = this.column.getField(), + vertAligns = { + + top: "flex-start", + + bottom: "flex-end", + + middle: "center" + + }, + hozAligns = { + + left: "flex-start", + + right: "flex-end", + + center: "center" + + }; + + //set text alignment + + element.style.textAlign = self.column.hozAlign; + + if (self.column.vertAlign) { + + element.style.display = "inline-flex"; + + element.style.alignItems = vertAligns[self.column.vertAlign] || ""; + + if (self.column.hozAlign) { + + element.style.justifyContent = hozAligns[self.column.hozAlign] || ""; + } + } + + if (field) { + + element.setAttribute("tabulator-field", field); + } + + //add class to cell if needed + + if (self.column.definition.cssClass) { + + var classNames = self.column.definition.cssClass.split(" "); + + classNames.forEach(function (className) { + + element.classList.add(className); + }); + } + + //update tooltip on mouse enter + + if (this.table.options.tooltipGenerationMode === "hover") { + + element.addEventListener("mouseenter", function (e) { + + self._generateTooltip(); + }); + } + + self._bindClickEvents(cellEvents); + + self._bindTouchEvents(cellEvents); + + self._bindMouseEvents(cellEvents); + + if (self.column.modules.edit) { + + self.table.modules.edit.bindEditor(self); + } + + if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + + self.table.modules.moveRow.initializeCell(self); + } + + //hide cell if not visible + + if (!self.column.visible) { + + self.hide(); + } + }; + + Cell.prototype._bindClickEvents = function (cellEvents) { + + var self = this, + element = self.element; + + //set event bindings + + if (cellEvents.cellClick || self.table.options.cellClick) { + + element.addEventListener("click", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellClick) { + + cellEvents.cellClick.call(self.table, e, component); + } + + if (self.table.options.cellClick) { + + self.table.options.cellClick.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellDblClick || this.table.options.cellDblClick) { + + element.addEventListener("dblclick", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellDblClick) { + + cellEvents.cellDblClick.call(self.table, e, component); + } + + if (self.table.options.cellDblClick) { + + self.table.options.cellDblClick.call(self.table, e, component); + } + }); + } else { + + element.addEventListener("dblclick", function (e) { + + if (self.table.modExists("edit")) { + + if (self.table.modules.edit.currentCell === self) { + + return; //prevent instant selection of editor content + } + } + + e.preventDefault(); + + try { + + if (document.selection) { + // IE + + var range = document.body.createTextRange(); + + range.moveToElementText(self.element); + + range.select(); + } else if (window.getSelection) { + + var range = document.createRange(); + + range.selectNode(self.element); + + window.getSelection().removeAllRanges(); + + window.getSelection().addRange(range); + } + } catch (e) {} + }); + } + + if (cellEvents.cellContext || this.table.options.cellContext) { + + element.addEventListener("contextmenu", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellContext) { + + cellEvents.cellContext.call(self.table, e, component); + } + + if (self.table.options.cellContext) { + + self.table.options.cellContext.call(self.table, e, component); + } + }); + } + }; + + Cell.prototype._bindMouseEvents = function (cellEvents) { + + var self = this, + element = self.element; + + if (cellEvents.cellMouseEnter || self.table.options.cellMouseEnter) { + + element.addEventListener("mouseenter", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellMouseEnter) { + + cellEvents.cellMouseEnter.call(self.table, e, component); + } + + if (self.table.options.cellMouseEnter) { + + self.table.options.cellMouseEnter.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseLeave || self.table.options.cellMouseLeave) { + + element.addEventListener("mouseleave", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellMouseLeave) { + + cellEvents.cellMouseLeave.call(self.table, e, component); + } + + if (self.table.options.cellMouseLeave) { + + self.table.options.cellMouseLeave.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOver || self.table.options.cellMouseOver) { + + element.addEventListener("mouseover", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellMouseOver) { + + cellEvents.cellMouseOver.call(self.table, e, component); + } + + if (self.table.options.cellMouseOver) { + + self.table.options.cellMouseOver.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOut || self.table.options.cellMouseOut) { + + element.addEventListener("mouseout", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellMouseOut) { + + cellEvents.cellMouseOut.call(self.table, e, component); + } + + if (self.table.options.cellMouseOut) { + + self.table.options.cellMouseOut.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseMove || self.table.options.cellMouseMove) { + + element.addEventListener("mousemove", function (e) { + + var component = self.getComponent(); + + if (cellEvents.cellMouseMove) { + + cellEvents.cellMouseMove.call(self.table, e, component); + } + + if (self.table.options.cellMouseMove) { + + self.table.options.cellMouseMove.call(self.table, e, component); + } + }); + } + }; + + Cell.prototype._bindTouchEvents = function (cellEvents) { + + var self = this, + element = self.element, + dblTap, + tapHold, + tap; + + if (cellEvents.cellTap || this.table.options.cellTap) { + + tap = false; + + element.addEventListener("touchstart", function (e) { + + tap = true; + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + + if (tap) { + + var component = self.getComponent(); + + if (cellEvents.cellTap) { + + cellEvents.cellTap.call(self.table, e, component); + } + + if (self.table.options.cellTap) { + + self.table.options.cellTap.call(self.table, e, component); + } + } + + tap = false; + }); + } + + if (cellEvents.cellDblTap || this.table.options.cellDblTap) { + + dblTap = null; + + element.addEventListener("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + var component = self.getComponent(); + + if (cellEvents.cellDblTap) { + + cellEvents.cellDblTap.call(self.table, e, component); + } + + if (self.table.options.cellDblTap) { + + self.table.options.cellDblTap.call(self.table, e, component); + } + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (cellEvents.cellTapHold || this.table.options.cellTapHold) { + + tapHold = null; + + element.addEventListener("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + var component = self.getComponent(); + + if (cellEvents.cellTapHold) { + + cellEvents.cellTapHold.call(self.table, e, component); + } + + if (self.table.options.cellTapHold) { + + self.table.options.cellTapHold.call(self.table, e, component); + } + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + }; + + //generate cell contents + + Cell.prototype._generateContents = function () { + + var val; + + if (this.table.modExists("format")) { + + val = this.table.modules.format.formatValue(this); + } else { + + val = this.element.innerHTML = this.value; + } + + switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { + + case "object": + + if (val instanceof Node) { + + //clear previous cell contents + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }this.element.appendChild(val); + } else { + + this.element.innerHTML = ""; + + if (val != null) { + + console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); + } + } + + break; + + case "undefined": + + case "null": + + this.element.innerHTML = ""; + + break; + + default: + + this.element.innerHTML = val; + + } + }; + + Cell.prototype.cellRendered = function () { + + if (this.table.modExists("format") && this.table.modules.format.cellRendered) { + + this.table.modules.format.cellRendered(this); + } + }; + + //generate tooltip text + + Cell.prototype._generateTooltip = function () { + + var tooltip = this.column.tooltip; + + if (tooltip) { + + if (tooltip === true) { + + tooltip = this.value; + } else if (typeof tooltip == "function") { + + tooltip = tooltip(this.getComponent()); + + if (tooltip === false) { + + tooltip = ""; + } + } + + if (typeof tooltip === "undefined") { + + tooltip = ""; + } + + this.element.setAttribute("title", tooltip); + } else { + + this.element.setAttribute("title", ""); + } + }; + + //////////////////// Getters //////////////////// + + Cell.prototype.getElement = function (containerOnly) { + + if (!this.loaded) { + + this.loaded = true; + + if (!containerOnly) { + + this.layoutElement(); + } + } + + return this.element; + }; + + Cell.prototype.getValue = function () { + + return this.value; + }; + + Cell.prototype.getOldValue = function () { + + return this.oldValue; + }; + + //////////////////// Actions //////////////////// + + + Cell.prototype.setValue = function (value, mutate) { + + var changed = this.setValueProcessData(value, mutate), + component; + + if (changed) { + + if (this.table.options.history && this.table.modExists("history")) { + + this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); + } + + component = this.getComponent(); + + if (this.column.cellEvents.cellEdited) { + + this.column.cellEvents.cellEdited.call(this.table, component); + } + + if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { + + this.table.modules.groupRows.reassignRowToGroup(this.row); + } + + this.cellRendered(); + + this.table.options.cellEdited.call(this.table, component); + + if (this.table.options.dataChanged) { + + this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); + } + } + }; + + Cell.prototype.setValueProcessData = function (value, mutate) { + + var changed = false; + + if (this.value != value) { + + changed = true; + + if (mutate) { + + if (this.column.modules.mutate) { + + value = this.table.modules.mutator.transformCell(this, value); + } + } + } + + this.setValueActual(value); + + if (changed && this.table.modExists("columnCalcs")) { + + if (this.column.definition.topCalc || this.column.definition.bottomCalc) { + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (this.table.options.columnCalcs == "table" || this.table.options.columnCalcs == "both") { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (this.table.options.columnCalcs != "table") { + + this.table.modules.columnCalcs.recalcRowGroup(this.row); + } + } else { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } + } + + return changed; + }; + + Cell.prototype.setValueActual = function (value) { + + this.oldValue = this.value; + + this.value = value; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + + this.table.modules.reactiveData.block(); + } + + this.column.setFieldValue(this.row.data, value); + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + + this.table.modules.reactiveData.unblock(); + } + + if (this.loaded) { + + this.layoutElement(); + } + }; + + Cell.prototype.layoutElement = function () { + + this._generateContents(); + + this._generateTooltip(); + + //set resizable handles + + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { + + this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { + + this.table.modules.menu.initializeCell(this); + } + + //handle frozen cells + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layoutElement(this.element, this.column); + } + }; + + Cell.prototype.setWidth = function () { + + this.width = this.column.width; + + this.element.style.width = this.column.widthStyled; + }; + + Cell.prototype.clearWidth = function () { + + this.width = ""; + + this.element.style.width = ""; + }; + + Cell.prototype.getWidth = function () { + + return this.width || this.element.offsetWidth; + }; + + Cell.prototype.setMinWidth = function () { + + this.minWidth = this.column.minWidth; + + this.element.style.minWidth = this.column.minWidthStyled; + }; + + Cell.prototype.setMaxWidth = function () { + + this.maxWidth = this.column.maxWidth; + + this.element.style.maxWidth = this.column.maxWidthStyled; + }; + + Cell.prototype.checkHeight = function () { + + // var height = this.element.css("height"); + + this.row.reinitializeHeight(); + }; + + Cell.prototype.clearHeight = function () { + + this.element.style.height = ""; + + this.height = null; + }; + + Cell.prototype.setHeight = function () { + + this.height = this.row.height; + + this.element.style.height = this.row.heightStyled; + }; + + Cell.prototype.getHeight = function () { + + return this.height || this.element.offsetHeight; + }; + + Cell.prototype.show = function () { + + this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; + }; + + Cell.prototype.hide = function () { + + this.element.style.display = "none"; + }; + + Cell.prototype.edit = function (force) { + + if (this.table.modExists("edit", true)) { + + return this.table.modules.edit.editCell(this, force); + } + }; + + Cell.prototype.cancelEdit = function () { + + if (this.table.modExists("edit", true)) { + + var editing = this.table.modules.edit.getCurrentCell(); + + if (editing && editing._getSelf() === this) { + + this.table.modules.edit.cancelEdit(); + } else { + + console.warn("Cancel Editor Error - This cell is not currently being edited "); + } + } + }; + + Cell.prototype.validate = function () { + + if (this.column.modules.validate && this.table.modExists("validate", true)) { + + var valid = this.table.modules.validate.validate(this.column.modules.validate, this, this.getValue()); + + return valid === true; + } else { + + return true; + } + }; + + Cell.prototype.delete = function () { + + if (!this.table.rowManager.redrawBlock && this.element.parentNode) { + + this.element.parentNode.removeChild(this.element); + } + + if (this.modules.validate && this.modules.validate.invalid) { + + this.table.modules.validate.clearValidation(this); + } + + if (this.modules.edit && this.modules.edit.edited) { + + this.table.modules.edit.clearEdited(this); + } + + if (this.table.options.history) { + + this.table.modules.history.clearComponentHistory(this); + } + + this.element = false; + + this.column.deleteCell(this); + + this.row.deleteCell(this); + + this.calcs = {}; + }; + + //////////////// Navigation ///////////////// + + + Cell.prototype.nav = function () { + + var self = this, + nextCell = false, + index = this.row.getCellIndex(this); + + return { + + next: function next() { + + var nextCell = this.right(), + nextRow; + + if (!nextCell) { + + nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + + nextCell = nextRow.findNextEditableCell(-1); + + if (nextCell) { + + nextCell.edit(); + + return true; + } + } + } else { + + return true; + } + + return false; + }, + + prev: function prev() { + + var nextCell = this.left(), + prevRow; + + if (!nextCell) { + + prevRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (prevRow) { + + nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); + + if (nextCell) { + + nextCell.edit(); + + return true; + } + } + } else { + + return true; + } + + return false; + }, + + left: function left() { + + nextCell = self.row.findPrevEditableCell(index); + + if (nextCell) { + + nextCell.edit(); + + return true; + } else { + + return false; + } + }, + + right: function right() { + + nextCell = self.row.findNextEditableCell(index); + + if (nextCell) { + + nextCell.edit(); + + return true; + } else { + + return false; + } + }, + + up: function up() { + + var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (nextRow) { + + nextRow.cells[index].edit(); + } + }, + + down: function down() { + + var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + + nextRow.cells[index].edit(); + } + } + + }; + }; + + Cell.prototype.getIndex = function () { + + this.row.getCellIndex(this); + }; + + //////////////// Object Generation ///////////////// + + Cell.prototype.getComponent = function () { + + if (!this.component) { + + this.component = new CellComponent(this); + } + + return this.component; + }; + + var FooterManager = function FooterManager(table) { + + this.table = table; + + this.active = false; + + this.element = this.createElement(); //containing element + + this.external = false; + + this.links = []; + + this._initialize(); + }; + + FooterManager.prototype.createElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-footer"); + + return el; + }; + + FooterManager.prototype._initialize = function (element) { + + if (this.table.options.footerElement) { + + switch (_typeof(this.table.options.footerElement)) { + + case "string": + + if (this.table.options.footerElement[0] === "<") { + + this.element.innerHTML = this.table.options.footerElement; + } else { + + this.external = true; + + this.element = document.querySelector(this.table.options.footerElement); + } + + break; + + default: + + this.element = this.table.options.footerElement; + + break; + + } + } + }; + + FooterManager.prototype.getElement = function () { + + return this.element; + }; + + FooterManager.prototype.append = function (element, parent) { + + this.activate(parent); + + this.element.appendChild(element); + + this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.prepend = function (element, parent) { + + this.activate(parent); + + this.element.insertBefore(element, this.element.firstChild); + + this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.remove = function (element) { + + element.parentNode.removeChild(element); + + this.deactivate(); + }; + + FooterManager.prototype.deactivate = function (force) { + + if (!this.element.firstChild || force) { + + if (!this.external) { + + this.element.parentNode.removeChild(this.element); + } + + this.active = false; + } + + // this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.activate = function (parent) { + + if (!this.active) { + + this.active = true; + + if (!this.external) { + + this.table.element.appendChild(this.getElement()); + + this.table.element.style.display = ''; + } + } + + if (parent) { + + this.links.push(parent); + } + }; + + FooterManager.prototype.redraw = function () { + + this.links.forEach(function (link) { + + link.footerRedraw(); + }); + }; + + var Tabulator = function Tabulator(element, options) { + + this.options = {}; + + this.columnManager = null; // hold Column Manager + + this.rowManager = null; //hold Row Manager + + this.footerManager = null; //holder Footer Manager + + this.vdomHoz = null; //holder horizontal virtual dom + + + this.browser = ""; //hold current browser type + + this.browserSlow = false; //handle reduced functionality for slower browsers + + this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence + + this.rtl = false; //check if the table is in RTL mode + + + this.modules = {}; //hold all modules bound to this table + + + if (this.initializeElement(element)) { + + this.initializeOptions(options || {}); + + this._create(); + } + + Tabulator.prototype.comms.register(this); //register table for inderdevice communication + }; + + //default setup options + + Tabulator.prototype.defaultOptions = { + + height: false, //height of tabulator + + minHeight: false, //minimum height of tabulator + + maxHeight: false, //maximum height of tabulator + + + layout: "fitData", ///layout type "fitColumns" | "fitData" + + layoutColumnsOnNewData: false, //update column widths on setData + + + columnMinWidth: 40, //minimum global width for a column + + columnMaxWidth: false, //minimum global width for a column + + columnHeaderVertAlign: "top", //vertical alignment of column headers + + columnVertAlign: false, // DEPRECATED - Left to allow warning + + + resizableColumns: true, //resizable columns + + resizableRows: false, //resizable rows + + autoResize: true, //auto resize table + + + columns: [], //store for colum header info + + + cellHozAlign: "", //horizontal align columns + + cellVertAlign: "", //vertical align columns + + headerHozAlign: "", //horizontal header alignment + + + data: [], //default starting data + + + autoColumns: false, //build columns from data row structure + + autoColumnsDefinitions: false, + + reactiveData: false, //enable data reactivity + + + nestedFieldSeparator: ".", //seperatpr for nested data + + + tooltips: false, //Tool tip value + + tooltipsHeader: false, //Tool tip for headers + + tooltipGenerationMode: "load", //when to generate tooltips + + + initialSort: false, //initial sorting criteria + + initialFilter: false, //initial filtering criteria + + initialHeaderFilter: false, //initial header filtering criteria + + + columnHeaderSortMulti: true, //multiple or single column sorting + + + sortOrderReverse: false, //reverse internal sort ordering + + + headerSort: true, //set default global header sort + + headerSortTristate: false, //set default tristate header sorting + + headerSortElement: "
", //header sort element + + + footerElement: false, //hold footer element + + + index: "id", //filed for row index + + + textDirection: "auto", + + keybindings: [], //array for keybindings + + + tabEndNewRow: false, //create new row when tab to end of table + + + invalidOptionWarnings: true, //allow toggling of invalid option warnings + + + clipboard: false, //enable clipboard + + clipboardCopyStyled: true, //formatted table data + + clipboardCopyConfig: false, //clipboard config + + clipboardCopyFormatter: false, //DEPRICATED - REMOVE in 5.0 + + clipboardCopyRowRange: "active", //restrict clipboard to visible rows only + + clipboardPasteParser: "table", //convert pasted clipboard data to rows + + clipboardPasteAction: "insert", //how to insert pasted data into the table + + + clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard + + clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table + + clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table + + + downloadDataFormatter: false, //function to manipulate table data before it is downloaded + + downloadReady: function downloadReady(data, blob) { + return blob; + }, //function to manipulate download data + + downloadComplete: false, //function to manipulate download data + + downloadConfig: {}, //download config + + downloadRowRange: "active", //restrict download to active rows only + + + dataTree: false, //enable data tree + + dataTreeFilter: true, //filter child rows + + dataTreeSort: true, //sort child rows + + dataTreeElementColumn: false, + + dataTreeBranchElement: true, //show data tree branch element + + dataTreeChildIndent: 9, //data tree child indent in px + + dataTreeChildField: "_children", //data tre column field to look for child rows + + dataTreeCollapseElement: false, //data tree row collapse element + + dataTreeExpandElement: false, //data tree row expand element + + dataTreeStartExpanded: false, + + dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded + + dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed + + dataTreeChildColumnCalcs: false, //include visible data tree rows in column calculations + + dataTreeSelectPropagate: false, //seleccting a parent row selects its children + + + printAsHtml: false, //enable print as html + + printFormatter: false, //printing page formatter + + printHeader: false, //page header contents + + printFooter: false, //page footer contents + + printCopyStyle: true, //DEPRICATED - REMOVE in 5.0 + + printStyled: true, //enable print as html styling + + printVisibleRows: true, //DEPRICATED - REMOVE in 5.0 + + printRowRange: "visible", //restrict print to visible rows only + + printConfig: {}, //print config options + + + addRowPos: "bottom", //position to insert blank rows, top|bottom + + + selectable: "highlight", //highlight rows on hover + + selectableRangeMode: "drag", //highlight rows on hover + + selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached + + selectablePersistence: true, // maintain selection when table view is updated + + selectableCheck: function selectableCheck(data, row) { + return true; + }, //check wheather row is selectable + + + headerFilterLiveFilterDelay: 300, //delay before updating column after user types in header filter + + headerFilterPlaceholder: false, //placeholder text to display in header filters + + + headerVisible: true, //hide header + + + history: false, //enable edit history + + + locale: false, //current system language + + langs: {}, + + virtualDom: true, //enable DOM virtualization + + virtualDomBuffer: 0, // set virtual DOM buffer size + + virtualDomHoz: false, //enable horizontal DOM virtualization + + + persistentLayout: false, //DEPRICATED - REMOVE in 5.0 + + persistentSort: false, //DEPRICATED - REMOVE in 5.0 + + persistentFilter: false, //DEPRICATED - REMOVE in 5.0 + + persistenceID: "", //key for persistent storage + + persistenceMode: true, //mode for storing persistence information + + persistenceReaderFunc: false, //function for handling persistence data reading + + persistenceWriterFunc: false, //function for handling persistence data writing + + + persistence: false, + + responsiveLayout: false, //responsive layout flags + + responsiveLayoutCollapseStartOpen: true, //start showing collapsed data + + responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter + + responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter + + + pagination: false, //set pagination type + + paginationSize: false, //set number of rows to a page + + paginationInitialPage: 1, //initail page to show on load + + paginationButtonCount: 5, // set count of page button + + paginationSizeSelector: false, //add pagination size selector element + + paginationElement: false, //element to hold pagination numbers + + paginationDataSent: {}, //pagination data sent to the server + + paginationDataReceived: {}, //pagination data received from the server + + paginationAddRow: "page", //add rows on table or page + + + ajaxURL: false, //url for ajax loading + + ajaxURLGenerator: false, + + ajaxParams: {}, //params for ajax loading + + ajaxConfig: "get", //ajax request type + + ajaxContentType: "form", //ajax request type + + ajaxRequestFunc: false, //promise function + + ajaxLoader: true, //show loader + + ajaxLoaderLoading: false, //loader element + + ajaxLoaderError: false, //loader element + + ajaxFiltering: false, + + ajaxSorting: false, + + ajaxProgressiveLoad: false, //progressive loading + + ajaxProgressiveLoadDelay: 0, //delay between requests + + ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins + + + groupBy: false, //enable table grouping and set field to group by + + groupStartOpen: true, //starting state of group + + groupValues: false, + + groupUpdateOnCellEdit: false, + + groupHeader: false, //header generation function + + groupHeaderPrint: null, + + groupHeaderClipboard: null, + + groupHeaderHtmlOutput: null, + + groupHeaderDownload: null, + + htmlOutputConfig: false, //html outypu config + + + movableColumns: false, //enable movable columns + + + movableRows: false, //enable movable rows + + movableRowsConnectedTables: false, //tables for movable rows to be connected to + + movableRowsConnectedElements: false, //other elements for movable rows to be connected to + + movableRowsSender: false, + + movableRowsReceiver: "insert", + + movableRowsSendingStart: function movableRowsSendingStart() {}, + + movableRowsSent: function movableRowsSent() {}, + + movableRowsSentFailed: function movableRowsSentFailed() {}, + + movableRowsSendingStop: function movableRowsSendingStop() {}, + + movableRowsReceivingStart: function movableRowsReceivingStart() {}, + + movableRowsReceived: function movableRowsReceived() {}, + + movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, + + movableRowsReceivingStop: function movableRowsReceivingStop() {}, + + movableRowsElementDrop: function movableRowsElementDrop() {}, + + scrollToRowPosition: "top", + + scrollToRowIfVisible: true, + + scrollToColumnPosition: "left", + + scrollToColumnIfVisible: true, + + rowFormatter: false, + + rowFormatterPrint: null, + + rowFormatterClipboard: null, + + rowFormatterHtmlOutput: null, + + placeholder: false, + + //table building callbacks + + tableBuilding: function tableBuilding() {}, + + tableBuilt: function tableBuilt() {}, + + //render callbacks + + renderStarted: function renderStarted() {}, + + renderComplete: function renderComplete() {}, + + //row callbacks + + rowClick: false, + + rowDblClick: false, + + rowContext: false, + + rowTap: false, + + rowDblTap: false, + + rowTapHold: false, + + rowMouseEnter: false, + + rowMouseLeave: false, + + rowMouseOver: false, + + rowMouseOut: false, + + rowMouseMove: false, + + rowContextMenu: false, + + rowClickMenu: false, + + rowAdded: function rowAdded() {}, + + rowDeleted: function rowDeleted() {}, + + rowMoved: function rowMoved() {}, + + rowUpdated: function rowUpdated() {}, + + rowSelectionChanged: function rowSelectionChanged() {}, + + rowSelected: function rowSelected() {}, + + rowDeselected: function rowDeselected() {}, + + rowResized: function rowResized() {}, + + //cell callbacks + + //row callbacks + + cellClick: false, + + cellDblClick: false, + + cellContext: false, + + cellTap: false, + + cellDblTap: false, + + cellTapHold: false, + + cellMouseEnter: false, + + cellMouseLeave: false, + + cellMouseOver: false, + + cellMouseOut: false, + + cellMouseMove: false, + + cellEditing: function cellEditing() {}, + + cellEdited: function cellEdited() {}, + + cellEditCancelled: function cellEditCancelled() {}, + + //column callbacks + + columnMoved: false, + + columnResized: function columnResized() {}, + + columnTitleChanged: function columnTitleChanged() {}, + + columnVisibilityChanged: function columnVisibilityChanged() {}, + + //HTML iport callbacks + + htmlImporting: function htmlImporting() {}, + + htmlImported: function htmlImported() {}, + + //data callbacks + + dataLoading: function dataLoading() {}, + + dataLoaded: function dataLoaded() {}, + + dataEdited: false, //DEPRECATED + + dataChanged: false, + + //ajax callbacks + + ajaxRequesting: function ajaxRequesting() {}, + + ajaxResponse: false, + + ajaxError: function ajaxError() {}, + + //filtering callbacks + + dataFiltering: false, + + dataFiltered: false, + + //sorting callbacks + + dataSorting: function dataSorting() {}, + + dataSorted: function dataSorted() {}, + + //grouping callbacks + + groupToggleElement: "arrow", + + groupClosedShowCalcs: false, + + dataGrouping: function dataGrouping() {}, + + dataGrouped: false, + + groupVisibilityChanged: function groupVisibilityChanged() {}, + + groupClick: false, + + groupDblClick: false, + + groupContext: false, + + groupContextMenu: false, + + groupClickMenu: false, + + groupTap: false, + + groupDblTap: false, + + groupTapHold: false, + + columnCalcs: true, + + //pagination callbacks + + pageLoaded: function pageLoaded() {}, + + //localization callbacks + + localized: function localized() {}, + + //validation callbacks + + validationMode: "blocking", + + validationFailed: function validationFailed() {}, + + //history callbacks + + historyUndo: function historyUndo() {}, + + historyRedo: function historyRedo() {}, + + //scroll callbacks + + scrollHorizontal: function scrollHorizontal() {}, + + scrollVertical: function scrollVertical() {} + + }; + + Tabulator.prototype.initializeOptions = function (options) { + + //warn user if option is not available + + if (options.invalidOptionWarnings !== false) { + + for (var key in options) { + + if (typeof this.defaultOptions[key] === "undefined") { + + console.warn("Invalid table constructor option:", key); + } + } + } + + //assign options to table + + for (var key in this.defaultOptions) { + + if (key in options) { + + this.options[key] = options[key]; + } else { + + if (Array.isArray(this.defaultOptions[key])) { + + this.options[key] = Object.assign([], this.defaultOptions[key]); + } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { + + this.options[key] = Object.assign({}, this.defaultOptions[key]); + } else { + + this.options[key] = this.defaultOptions[key]; + } + } + } + }; + + Tabulator.prototype.initializeElement = function (element) { + + if (typeof HTMLElement !== "undefined" && element instanceof HTMLElement) { + + this.element = element; + + return true; + } else if (typeof element === "string") { + + this.element = document.querySelector(element); + + if (this.element) { + + return true; + } else { + + console.error("Tabulator Creation Error - no element found matching selector: ", element); + + return false; + } + } else { + + console.error("Tabulator Creation Error - Invalid element provided:", element); + + return false; + } + }; + + Tabulator.prototype.rtlCheck = function () { + + var style = window.getComputedStyle(this.element); + + switch (this.options.textDirection) { + + case "auto": + + if (style.direction !== "rtl") { + + break; + }; + + case "rtl": + + this.element.classList.add("tabulator-rtl"); + + this.rtl = true; + + break; + + case "ltr": + + this.element.classList.add("tabulator-ltr"); + + default: + + this.rtl = false; + + } + }; + + //convert depricated functionality to new functions + + Tabulator.prototype._mapDepricatedFunctionality = function () { + + //map depricated persistance setup options + + if (this.options.persistentLayout || this.options.persistentSort || this.options.persistentFilter) { + + if (!this.options.persistence) { + + this.options.persistence = {}; + } + } + + if (this.options.dataEdited) { + + console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); + + this.options.dataChanged = this.options.dataEdited; + } + + if (this.options.downloadDataFormatter) { + + console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); + } + + if (typeof this.options.clipboardCopyHeader !== "undefined") { + + this.options.columnHeaders = this.options.clipboardCopyHeader; + + console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); + } + + if (this.options.printVisibleRows !== true) { + + console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"); + + this.options.persistence.printRowRange = "active"; + } + + if (this.options.printCopyStyle !== true) { + + console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"); + + this.options.persistence.printStyled = this.options.printCopyStyle; + } + + if (this.options.persistentLayout) { + + console.warn("persistentLayout option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.columns === "undefined") { + + this.options.persistence.columns = true; + } + } + + if (this.options.persistentSort) { + + console.warn("persistentSort option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.sort === "undefined") { + + this.options.persistence.sort = true; + } + } + + if (this.options.persistentFilter) { + + console.warn("persistentFilter option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.filter === "undefined") { + + this.options.persistence.filter = true; + } + } + + if (this.options.columnVertAlign) { + + console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"); + + this.options.columnHeaderVertAlign = this.options.columnVertAlign; + } + }; + + Tabulator.prototype._clearSelection = function () { + + this.element.classList.add("tabulator-block-select"); + + if (window.getSelection) { + + if (window.getSelection().empty) { + // Chrome + + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { + // Firefox + + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { + // IE? + + document.selection.empty(); + } + + this.element.classList.remove("tabulator-block-select"); + }; + + //concreate table + + Tabulator.prototype._create = function () { + + this._clearObjectPointers(); + + this._mapDepricatedFunctionality(); + + this.bindModules(); + + this.rtlCheck(); + + if (this.element.tagName === "TABLE") { + + if (this.modExists("htmlTableImport", true)) { + + this.modules.htmlTableImport.parseTable(); + } + } + + this.columnManager = new ColumnManager(this); + + this.rowManager = new RowManager(this); + + this.footerManager = new FooterManager(this); + + this.columnManager.setRowManager(this.rowManager); + + this.rowManager.setColumnManager(this.columnManager); + + if (this.options.virtualDomHoz) { + + this.vdomHoz = new VDomHoz(this); + } + + this._buildElement(); + + this._loadInitialData(); + }; + + //clear pointers to objects in default config object + + Tabulator.prototype._clearObjectPointers = function () { + + this.options.columns = this.options.columns.slice(0); + + if (!this.options.reactiveData) { + + this.options.data = this.options.data.slice(0); + } + }; + + //build tabulator element + + Tabulator.prototype._buildElement = function () { + var _this24 = this; + + var element = this.element, + mod = this.modules, + options = this.options; + + options.tableBuilding.call(this); + + element.classList.add("tabulator"); + + element.setAttribute("role", "grid"); + + //empty element + + while (element.firstChild) { + element.removeChild(element.firstChild); + } //set table height + + if (options.height) { + + options.height = isNaN(options.height) ? options.height : options.height + "px"; + + element.style.height = options.height; + } + + //set table min height + + if (options.minHeight !== false) { + + options.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + "px"; + + element.style.minHeight = options.minHeight; + } + + //set table maxHeight + + if (options.maxHeight !== false) { + + options.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + "px"; + + element.style.maxHeight = options.maxHeight; + } + + this.columnManager.initialize(); + + this.rowManager.initialize(); + + this._detectBrowser(); + + if (this.modExists("layout", true)) { + + mod.layout.initialize(options.layout); + } + + //set localization + + + mod.localize.initialize(); + + if (options.headerFilterPlaceholder !== false) { + + mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for (var locale in options.langs) { + + mod.localize.installLang(locale, options.langs[locale]); + } + + mod.localize.setLocale(options.locale); + + //configure placeholder element + + if (typeof options.placeholder == "string") { + + var el = document.createElement("div"); + + el.classList.add("tabulator-placeholder"); + + var span = document.createElement("span"); + + span.innerHTML = options.placeholder; + + el.appendChild(span); + + options.placeholder = el; + } + + //build table elements + + element.appendChild(this.columnManager.getElement()); + + element.appendChild(this.rowManager.getElement()); + + if (options.footerElement) { + + this.footerManager.activate(); + } + + if (options.persistence && this.modExists("persistence", true)) { + + mod.persistence.initialize(); + } + + if (options.movableRows && this.modExists("moveRow")) { + + mod.moveRow.initialize(); + } + + if (options.autoColumns && this.options.data) { + + this.columnManager.generateColumnsFromRowData(this.options.data); + } + + if (this.modExists("columnCalcs")) { + + mod.columnCalcs.initialize(); + } + + this.columnManager.setColumns(options.columns); + + if (options.dataTree && this.modExists("dataTree", true)) { + + mod.dataTree.initialize(); + } + + if (this.modExists("frozenRows")) { + + this.modules.frozenRows.initialize(); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort || options.initialSort) && this.modExists("sort", true)) { + + var sorters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort) { + + sorters = mod.persistence.load("sort"); + + if (sorters === false && options.initialSort) { + + sorters = options.initialSort; + } + } else if (options.initialSort) { + + sorters = options.initialSort; + } + + mod.sort.setSort(sorters); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter || options.initialFilter) && this.modExists("filter", true)) { + + var filters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter) { + + filters = mod.persistence.load("filter"); + + if (filters === false && options.initialFilter) { + + filters = options.initialFilter; + } + } else if (options.initialFilter) { + + filters = options.initialFilter; + } + + mod.filter.setFilter(filters); + } + + if (options.initialHeaderFilter && this.modExists("filter", true)) { + + options.initialHeaderFilter.forEach(function (item) { + + var column = _this24.columnManager.findColumn(item.field); + + if (column) { + + mod.filter.setHeaderFilterValue(column, item.value); + } else { + + console.warn("Column Filter Error - No matching column found:", item.field); + + return false; + } + }); + } + + if (this.modExists("ajax")) { + + mod.ajax.initialize(); + } + + if (options.pagination && this.modExists("page", true)) { + + mod.page.initialize(); + } + + if (options.groupBy && this.modExists("groupRows", true)) { + + mod.groupRows.initialize(); + } + + if (this.modExists("keybindings")) { + + mod.keybindings.initialize(); + } + + if (this.modExists("selectRow")) { + + mod.selectRow.clearSelectionData(true); + } + + if (options.autoResize && this.modExists("resizeTable")) { + + mod.resizeTable.initialize(); + } + + if (this.modExists("clipboard")) { + + mod.clipboard.initialize(); + } + + if (options.printAsHtml && this.modExists("print")) { + + mod.print.initialize(); + } + + options.tableBuilt.call(this); + }; + + Tabulator.prototype._loadInitialData = function () { + + var self = this; + + if (self.options.pagination && self.modExists("page")) { + + self.modules.page.reset(true, true); + + if (self.options.pagination == "local") { + + if (self.options.data.length) { + + self.rowManager.setData(self.options.data, false, true); + } else { + + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () { + + if (self.options.paginationInitialPage) { + + self.modules.page.setPage(self.options.paginationInitialPage); + } + }); + + return; + } else { + + self.rowManager.setData(self.options.data, false, true); + } + } + + if (self.options.paginationInitialPage) { + + self.modules.page.setPage(self.options.paginationInitialPage); + } + } else { + + if (self.options.ajaxURL) { + + self.modules.page.setPage(self.options.paginationInitialPage).then(function () {}).catch(function () {}); + } else { + + self.rowManager.setData([], false, true); + } + } + } else { + + if (self.options.data.length) { + + self.rowManager.setData(self.options.data); + } else { + + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () {}); + } else { + + self.rowManager.setData(self.options.data, false, true); + } + } + } + }; + + //deconstructor + + Tabulator.prototype.destroy = function () { + + var element = this.element; + + Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication + + + if (this.options.reactiveData && this.modExists("reactiveData", true)) { + + this.modules.reactiveData.unwatchData(); + } + + //clear row data + + this.rowManager.rows.forEach(function (row) { + + row.wipe(); + }); + + this.rowManager.rows = []; + + this.rowManager.activeRows = []; + + this.rowManager.displayRows = []; + + //clear event bindings + + if (this.options.autoResize && this.modExists("resizeTable")) { + + this.modules.resizeTable.clearBindings(); + } + + if (this.modExists("keybindings")) { + + this.modules.keybindings.clearBindings(); + } + + //clear DOM + + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.classList.remove("tabulator"); + }; + + Tabulator.prototype._detectBrowser = function () { + + var ua = navigator.userAgent || navigator.vendor || window.opera; + + if (ua.indexOf("Trident") > -1) { + + this.browser = "ie"; + + this.browserSlow = true; + } else if (ua.indexOf("Edge") > -1) { + + this.browser = "edge"; + + this.browserSlow = true; + } else if (ua.indexOf("Firefox") > -1) { + + this.browser = "firefox"; + + this.browserSlow = false; + } else { + + this.browser = "other"; + + this.browserSlow = false; + } + + this.browserMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0, 4)); + }; + + ////////////////// Data Handling ////////////////// + + + //block table redrawing + + Tabulator.prototype.blockRedraw = function () { + + return this.rowManager.blockRedraw(); + }; + + //restore table redrawing + + Tabulator.prototype.restoreRedraw = function () { + + return this.rowManager.restoreRedraw(); + }; + + //local data from local file + + Tabulator.prototype.setDataFromLocalFile = function (extensions) { + var _this25 = this; + + return new Promise(function (resolve, reject) { + + var input = document.createElement("input"); + + input.type = "file"; + + input.accept = extensions || ".json,application/json"; + + input.addEventListener("change", function (e) { + + var file = input.files[0], + reader = new FileReader(), + data; + + reader.readAsText(file); + + reader.onload = function (e) { + + try { + + data = JSON.parse(reader.result); + } catch (e) { + + console.warn("File Load Error - File contents is invalid JSON", e); + + reject(e); + + return; + } + + _this25.setData(data).then(function (data) { + + resolve(data); + }).catch(function (err) { + + resolve(err); + }); + }; + + reader.onerror = function (e) { + + console.warn("File Load Error - Unable to read file"); + + reject(); + }; + }); + + input.click(); + }); + }; + + //load data + + Tabulator.prototype.setData = function (data, params, config) { + + if (this.modExists("ajax")) { + + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, false, true); + }; + + Tabulator.prototype._setData = function (data, params, config, inPosition, columnsChanged) { + + var self = this; + + if (typeof data === "string") { + + if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { + + //data is a json encoded string + + return self.rowManager.setData(JSON.parse(data), inPosition, columnsChanged); + } else { + + if (self.modExists("ajax", true)) { + + if (params) { + + self.modules.ajax.setParams(params); + } + + if (config) { + + self.modules.ajax.setConfig(config); + } + + self.modules.ajax.setUrl(data); + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + + self.modules.page.reset(true, true); + + return self.modules.page.setPage(1); + } else { + + //assume data is url, make ajax call to url to get data + + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } + } + } else { + + if (data) { + + //asume data is already an object + + return self.rowManager.setData(data, inPosition, columnsChanged); + } else { + + //no data provided, check if ajaxURL is present; + + if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + + self.modules.page.reset(true, true); + + return self.modules.page.setPage(1); + } else { + + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } else { + + //empty data + + return self.rowManager.setData([], inPosition, columnsChanged); + } + } + } + }; + + //clear data + + Tabulator.prototype.clearData = function () { + + if (this.modExists("ajax")) { + + this.modules.ajax.blockActiveRequest(); + } + + this.rowManager.clearData(); + }; + + //get table data array + + Tabulator.prototype.getData = function (active) { + + if (active === true) { + + console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"); + + active = "active"; + } + + return this.rowManager.getData(active); + }; + + //get table data array count + + Tabulator.prototype.getDataCount = function (active) { + + if (active === true) { + + console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"); + + active = "active"; + } + + return this.rowManager.getDataCount(active); + }; + + //search for specific row components + + Tabulator.prototype.searchRows = function (field, type, value) { + + if (this.modExists("filter", true)) { + + return this.modules.filter.search("rows", field, type, value); + } + }; + + //search for specific data + + Tabulator.prototype.searchData = function (field, type, value) { + + if (this.modExists("filter", true)) { + + return this.modules.filter.search("data", field, type, value); + } + }; + + //get table html + + Tabulator.prototype.getHtml = function (visible, style, config) { + + if (this.modExists("export", true)) { + + return this.modules.export.getHtml(visible, style, config); + } + }; + + //get print html + + Tabulator.prototype.print = function (visible, style, config) { + + if (this.modExists("print", true)) { + + return this.modules.print.printFullscreen(visible, style, config); + } + }; + + //retrieve Ajax URL + + Tabulator.prototype.getAjaxUrl = function () { + + if (this.modExists("ajax", true)) { + + return this.modules.ajax.getUrl(); + } + }; + + //replace data, keeping table in position with same sort + + Tabulator.prototype.replaceData = function (data, params, config) { + + if (this.modExists("ajax")) { + + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, true); + }; + + //update table data + + Tabulator.prototype.updateData = function (data) { + var _this26 = this; + + var self = this; + + var responses = 0; + + return new Promise(function (resolve, reject) { + + if (_this26.modExists("ajax")) { + + _this26.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (data) { + + data.forEach(function (item) { + + var row = self.rowManager.findRow(item[self.options.index]); + + if (row) { + + responses++; + + row.updateData(item).then(function () { + + responses--; + + if (!responses) { + + resolve(); + } + }); + } + }); + } else { + + console.warn("Update Error - No data provided"); + + reject("Update Error - No data provided"); + } + }); + }; + + Tabulator.prototype.addData = function (data, pos, index) { + var _this27 = this; + + return new Promise(function (resolve, reject) { + + if (_this27.modExists("ajax")) { + + _this27.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (data) { + + _this27.rowManager.addRows(data, pos, index).then(function (rows) { + + var output = []; + + rows.forEach(function (row) { + + output.push(row.getComponent()); + }); + + resolve(output); + }); + } else { + + console.warn("Update Error - No data provided"); + + reject("Update Error - No data provided"); + } + }); + }; + + //update table data + + Tabulator.prototype.updateOrAddData = function (data) { + var _this28 = this; + + var self = this, + rows = [], + responses = 0; + + return new Promise(function (resolve, reject) { + + if (_this28.modExists("ajax")) { + + _this28.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (data) { + + data.forEach(function (item) { + + var row = self.rowManager.findRow(item[self.options.index]); + + responses++; + + if (row) { + + row.updateData(item).then(function () { + + responses--; + + rows.push(row.getComponent()); + + if (!responses) { + + resolve(rows); + } + }); + } else { + + self.rowManager.addRows(item).then(function (newRows) { + + responses--; + + rows.push(newRows[0].getComponent()); + + if (!responses) { + + resolve(rows); + } + }); + } + }); + } else { + + console.warn("Update Error - No data provided"); + + reject("Update Error - No data provided"); + } + }); + }; + + //get row object + + Tabulator.prototype.getRow = function (index) { + + var row = this.rowManager.findRow(index); + + if (row) { + + return row.getComponent(); + } else { + + console.warn("Find Error - No matching row found:", index); + + return false; + } + }; + + //get row object + + Tabulator.prototype.getRowFromPosition = function (position, active) { + + var row = this.rowManager.getRowFromPosition(position, active); + + if (row) { + + return row.getComponent(); + } else { + + console.warn("Find Error - No matching row found:", position); + + return false; + } + }; + + //delete row from table + + Tabulator.prototype.deleteRow = function (index) { + var _this29 = this; + + return new Promise(function (resolve, reject) { + + var self = _this29, + count = 0, + successCount = 0, + foundRows = []; + + function doneCheck() { + + count++; + + if (count == index.length) { + + if (successCount) { + + self.rowManager.reRenderInPosition(); + + resolve(); + } + } + } + + if (!Array.isArray(index)) { + + index = [index]; + } + + //find matching rows + + index.forEach(function (item) { + + var row = _this29.rowManager.findRow(item, true); + + if (row) { + + foundRows.push(row); + } else { + + console.warn("Delete Error - No matching row found:", item); + + reject("Delete Error - No matching row found"); + + doneCheck(); + } + }); + + //sort rows into correct order to ensure smooth delete from table + + foundRows.sort(function (a, b) { + + return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; + }); + + foundRows.forEach(function (row) { + + row.delete().then(function () { + + successCount++; + + doneCheck(); + }).catch(function (err) { + + doneCheck(); + + reject(err); + }); + }); + }); + }; + + //add row to table + + Tabulator.prototype.addRow = function (data, pos, index) { + var _this30 = this; + + return new Promise(function (resolve, reject) { + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + _this30.rowManager.addRows(data, pos, index).then(function (rows) { + + //recalc column calculations if present + + if (_this30.modExists("columnCalcs")) { + + _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }); + }); + }; + + //update a row if it exitsts otherwise create it + + Tabulator.prototype.updateOrAddRow = function (index, data) { + var _this31 = this; + + return new Promise(function (resolve, reject) { + + var row = _this31.rowManager.findRow(index); + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (row) { + + row.updateData(data).then(function () { + + //recalc column calculations if present + + if (_this31.modExists("columnCalcs")) { + + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(row.getComponent()); + }).catch(function (err) { + + reject(err); + }); + } else { + + row = _this31.rowManager.addRows(data).then(function (rows) { + + //recalc column calculations if present + + if (_this31.modExists("columnCalcs")) { + + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }).catch(function (err) { + + reject(err); + }); + } + }); + }; + + //update row data + + Tabulator.prototype.updateRow = function (index, data) { + var _this32 = this; + + return new Promise(function (resolve, reject) { + + var row = _this32.rowManager.findRow(index); + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (row) { + + row.updateData(data).then(function () { + + resolve(row.getComponent()); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Update Error - No matching row found:", index); + + reject("Update Error - No matching row found"); + } + }); + }; + + //scroll to row in DOM + + Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { + var _this33 = this; + + return new Promise(function (resolve, reject) { + + var row = _this33.rowManager.findRow(index); + + if (row) { + + _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { + + resolve(); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Scroll Error - No matching row found:", index); + + reject("Scroll Error - No matching row found"); + } + }); + }; + + Tabulator.prototype.moveRow = function (from, to, after) { + + var fromRow = this.rowManager.findRow(from); + + if (fromRow) { + + fromRow.moveToRow(to, after); + } else { + + console.warn("Move Error - No matching row found:", from); + } + }; + + Tabulator.prototype.getRows = function (active) { + + if (active === true) { + + console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"); + + active = "active"; + } + + return this.rowManager.getComponents(active); + }; + + //get position of row in table + + Tabulator.prototype.getRowPosition = function (index, active) { + + var row = this.rowManager.findRow(index); + + if (row) { + + return this.rowManager.getRowPosition(row, active); + } else { + + console.warn("Position Error - No matching row found:", index); + + return false; + } + }; + + //copy table data to clipboard + + Tabulator.prototype.copyToClipboard = function (selector) { + + if (this.modExists("clipboard", true)) { + + this.modules.clipboard.copy(selector); + } + }; + + /////////////// Column Functions /////////////// + + + Tabulator.prototype.setColumns = function (definition) { + + this.columnManager.setColumns(definition); + }; + + Tabulator.prototype.getColumns = function (structured) { + + return this.columnManager.getComponents(structured); + }; + + Tabulator.prototype.getColumn = function (field) { + + var col = this.columnManager.findColumn(field); + + if (col) { + + return col.getComponent(); + } else { + + console.warn("Find Error - No matching column found:", field); + + return false; + } + }; + + Tabulator.prototype.getColumnDefinitions = function () { + + return this.columnManager.getDefinitionTree(); + }; + + Tabulator.prototype.getColumnLayout = function () { + + if (this.modExists("persistence", true)) { + + return this.modules.persistence.parseColumns(this.columnManager.getColumns()); + } + }; + + Tabulator.prototype.setColumnLayout = function (layout) { + + if (this.modExists("persistence", true)) { + + this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); + + return true; + } + + return false; + }; + + Tabulator.prototype.showColumn = function (field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.show(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + + this.modules.responsiveLayout.update(); + } + } else { + + console.warn("Column Show Error - No matching column found:", field); + + return false; + } + }; + + Tabulator.prototype.hideColumn = function (field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.hide(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + + this.modules.responsiveLayout.update(); + } + } else { + + console.warn("Column Hide Error - No matching column found:", field); + + return false; + } + }; + + Tabulator.prototype.toggleColumn = function (field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + if (column.visible) { + + column.hide(); + } else { + + column.show(); + } + } else { + + console.warn("Column Visibility Toggle Error - No matching column found:", field); + + return false; + } + }; + + Tabulator.prototype.addColumn = function (definition, before, field) { + var _this34 = this; + + return new Promise(function (resolve, reject) { + + var column = _this34.columnManager.findColumn(field); + + _this34.columnManager.addColumn(definition, before, column).then(function (column) { + + resolve(column.getComponent()); + }).catch(function (err) { + + reject(err); + }); + }); + }; + + Tabulator.prototype.deleteColumn = function (field) { + var _this35 = this; + + return new Promise(function (resolve, reject) { + + var column = _this35.columnManager.findColumn(field); + + if (column) { + + column.delete().then(function () { + + resolve(); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Column Delete Error - No matching column found:", field); + + reject(); + } + }); + }; + + Tabulator.prototype.updateColumnDefinition = function (field, definition) { + var _this36 = this; + + return new Promise(function (resolve, reject) { + + var column = _this36.columnManager.findColumn(field); + + if (column) { + + column.updateDefinition(definition).then(function (col) { + + resolve(col); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Column Update Error - No matching column found:", field); + + reject(); + } + }); + }; + + Tabulator.prototype.moveColumn = function (from, to, after) { + + var fromColumn = this.columnManager.findColumn(from); + + var toColumn = this.columnManager.findColumn(to); + + if (fromColumn) { + + if (toColumn) { + + this.columnManager.moveColumn(fromColumn, toColumn, after); + } else { + + console.warn("Move Error - No matching column found:", toColumn); + } + } else { + + console.warn("Move Error - No matching column found:", from); + } + }; + + //scroll to column in DOM + + Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { + var _this37 = this; + + return new Promise(function (resolve, reject) { + + var column = _this37.columnManager.findColumn(field); + + if (column) { + + _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { + + resolve(); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Scroll Error - No matching column found:", field); + + reject("Scroll Error - No matching column found"); + } + }); + }; + + //////////// Localization Functions //////////// + + Tabulator.prototype.setLocale = function (locale) { + + this.modules.localize.setLocale(locale); + }; + + Tabulator.prototype.getLocale = function () { + + return this.modules.localize.getLocale(); + }; + + Tabulator.prototype.getLang = function (locale) { + + return this.modules.localize.getLang(locale); + }; + + //////////// General Public Functions //////////// + + + //redraw list without updating data + + Tabulator.prototype.redraw = function (force) { + + this.columnManager.redraw(force); + + this.rowManager.redraw(force); + }; + + Tabulator.prototype.setHeight = function (height) { + + if (this.rowManager.renderMode !== "classic") { + + this.options.height = isNaN(height) ? height : height + "px"; + + this.element.style.height = this.options.height; + + this.rowManager.setRenderMode(); + + this.rowManager.redraw(); + } else { + + console.warn("setHeight function is not available in classic render mode"); + } + }; + + ///////////////////// Sorting //////////////////// + + + //trigger sort + + Tabulator.prototype.setSort = function (sortList, dir) { + + if (this.modExists("sort", true)) { + + this.modules.sort.setSort(sortList, dir); + + this.rowManager.sorterRefresh(); + } + }; + + Tabulator.prototype.getSorters = function () { + + if (this.modExists("sort", true)) { + + return this.modules.sort.getSort(); + } + }; + + Tabulator.prototype.clearSort = function () { + + if (this.modExists("sort", true)) { + + this.modules.sort.clear(); + + this.rowManager.sorterRefresh(); + } + }; + + ///////////////////// Filtering //////////////////// + + + //set standard filters + + Tabulator.prototype.setFilter = function (field, type, value, params) { + + if (this.modExists("filter", true)) { + + this.modules.filter.setFilter(field, type, value, params); + + this.rowManager.filterRefresh(); + } + }; + + //set standard filters + + Tabulator.prototype.refreshFilter = function () { + + if (this.modExists("filter", true)) { + + this.rowManager.filterRefresh(); + } + }; + + //add filter to array + + Tabulator.prototype.addFilter = function (field, type, value, params) { + + if (this.modExists("filter", true)) { + + this.modules.filter.addFilter(field, type, value, params); + + this.rowManager.filterRefresh(); + } + }; + + //get all filters + + Tabulator.prototype.getFilters = function (all) { + + if (this.modExists("filter", true)) { + + return this.modules.filter.getFilters(all); + } + }; + + Tabulator.prototype.setHeaderFilterFocus = function (field) { + + if (this.modExists("filter", true)) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + this.modules.filter.setHeaderFilterFocus(column); + } else { + + console.warn("Column Filter Focus Error - No matching column found:", field); + + return false; + } + } + }; + + Tabulator.prototype.getHeaderFilterValue = function (field) { + + if (this.modExists("filter", true)) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + return this.modules.filter.getHeaderFilterValue(column); + } else { + + console.warn("Column Filter Error - No matching column found:", field); + } + } + }; + + Tabulator.prototype.setHeaderFilterValue = function (field, value) { + + if (this.modExists("filter", true)) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + this.modules.filter.setHeaderFilterValue(column, value); + } else { + + console.warn("Column Filter Error - No matching column found:", field); + + return false; + } + } + }; + + Tabulator.prototype.getHeaderFilters = function () { + + if (this.modExists("filter", true)) { + + return this.modules.filter.getHeaderFilters(); + } + }; + + //remove filter from array + + Tabulator.prototype.removeFilter = function (field, type, value) { + + if (this.modExists("filter", true)) { + + this.modules.filter.removeFilter(field, type, value); + + this.rowManager.filterRefresh(); + } + }; + + //clear filters + + Tabulator.prototype.clearFilter = function (all) { + + if (this.modExists("filter", true)) { + + this.modules.filter.clearFilter(all); + + this.rowManager.filterRefresh(); + } + }; + + //clear header filters + + Tabulator.prototype.clearHeaderFilter = function () { + + if (this.modExists("filter", true)) { + + this.modules.filter.clearHeaderFilter(); + + this.rowManager.filterRefresh(); + } + }; + + ///////////////////// select //////////////////// + + Tabulator.prototype.selectRow = function (rows) { + + if (this.modExists("selectRow", true)) { + + if (rows === true) { + + console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"); + + rows = "active"; + } + + this.modules.selectRow.selectRows(rows); + } + }; + + Tabulator.prototype.deselectRow = function (rows) { + + if (this.modExists("selectRow", true)) { + + this.modules.selectRow.deselectRows(rows); + } + }; + + Tabulator.prototype.toggleSelectRow = function (row) { + + if (this.modExists("selectRow", true)) { + + this.modules.selectRow.toggleRow(row); + } + }; + + Tabulator.prototype.getSelectedRows = function () { + + if (this.modExists("selectRow", true)) { + + return this.modules.selectRow.getSelectedRows(); + } + }; + + Tabulator.prototype.getSelectedData = function () { + + if (this.modExists("selectRow", true)) { + + return this.modules.selectRow.getSelectedData(); + } + }; + + ///////////////////// validation //////////////////// + + Tabulator.prototype.getInvalidCells = function () { + + if (this.modExists("validate", true)) { + + return this.modules.validate.getInvalidCells(); + } + }; + + Tabulator.prototype.clearCellValidation = function (cells) { + var _this38 = this; + + if (this.modExists("validate", true)) { + + if (!cells) { + + cells = this.modules.validate.getInvalidCells(); + } + + if (!Array.isArray(cells)) { + + cells = [cells]; + } + + cells.forEach(function (cell) { + + _this38.modules.validate.clearValidation(cell._getSelf()); + }); + } + }; + + Tabulator.prototype.validate = function (cells) { + + var output = []; + + //clear row data + + this.rowManager.rows.forEach(function (row) { + + var valid = row.validate(); + + if (valid !== true) { + + output = output.concat(valid); + } + }); + + return output.length ? output : true; + }; + + //////////// Pagination Functions //////////// + + + Tabulator.prototype.setMaxPage = function (max) { + + if (this.options.pagination && this.modExists("page")) { + + this.modules.page.setMaxPage(max); + } else { + + return false; + } + }; + + Tabulator.prototype.setPage = function (page) { + + if (this.options.pagination && this.modExists("page")) { + + return this.modules.page.setPage(page); + } else { + + return new Promise(function (resolve, reject) { + reject(); + }); + } + }; + + Tabulator.prototype.setPageToRow = function (row) { + var _this39 = this; + + return new Promise(function (resolve, reject) { + + if (_this39.options.pagination && _this39.modExists("page")) { + + row = _this39.rowManager.findRow(row); + + if (row) { + + _this39.modules.page.setPageToRow(row).then(function () { + + resolve(); + }).catch(function () { + + reject(); + }); + } else { + + reject(); + } + } else { + + reject(); + } + }); + }; + + Tabulator.prototype.setPageSize = function (size) { + + if (this.options.pagination && this.modExists("page")) { + + this.modules.page.setPageSize(size); + + this.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else { + + return false; + } + }; + + Tabulator.prototype.getPageSize = function () { + + if (this.options.pagination && this.modExists("page", true)) { + + return this.modules.page.getPageSize(); + } + }; + + Tabulator.prototype.previousPage = function () { + + if (this.options.pagination && this.modExists("page")) { + + this.modules.page.previousPage(); + } else { + + return false; + } + }; + + Tabulator.prototype.nextPage = function () { + + if (this.options.pagination && this.modExists("page")) { + + this.modules.page.nextPage(); + } else { + + return false; + } + }; + + Tabulator.prototype.getPage = function () { + + if (this.options.pagination && this.modExists("page")) { + + return this.modules.page.getPage(); + } else { + + return false; + } + }; + + Tabulator.prototype.getPageMax = function () { + + if (this.options.pagination && this.modExists("page")) { + + return this.modules.page.getPageMax(); + } else { + + return false; + } + }; + + ///////////////// Grouping Functions /////////////// + + + Tabulator.prototype.setGroupBy = function (groups) { + + if (this.modExists("groupRows", true)) { + + this.options.groupBy = groups; + + this.modules.groupRows.initialize(); + + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + + this.modules.persistence.save("group"); + } + } else { + + return false; + } + }; + + Tabulator.prototype.setGroupValues = function (groupValues) { + + if (this.modExists("groupRows", true)) { + + this.options.groupValues = groupValues; + + this.modules.groupRows.initialize(); + + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + + this.modules.persistence.save("group"); + } + } else { + + return false; + } + }; + + Tabulator.prototype.setGroupStartOpen = function (values) { + + if (this.modExists("groupRows", true)) { + + this.options.groupStartOpen = values; + + this.modules.groupRows.initialize(); + + if (this.options.groupBy) { + + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + + this.modules.persistence.save("group"); + } + } else { + + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + + return false; + } + }; + + Tabulator.prototype.setGroupHeader = function (values) { + + if (this.modExists("groupRows", true)) { + + this.options.groupHeader = values; + + this.modules.groupRows.initialize(); + + if (this.options.groupBy) { + + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + + this.modules.persistence.save("group"); + } + } else { + + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + + return false; + } + }; + + Tabulator.prototype.getGroups = function (values) { + + if (this.modExists("groupRows", true)) { + + return this.modules.groupRows.getGroups(true); + } else { + + return false; + } + }; + + // get grouped table data in the same format as getData() + + Tabulator.prototype.getGroupedData = function () { + + if (this.modExists("groupRows", true)) { + + return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); + } + }; + + Tabulator.prototype.getEditedCells = function () { + + if (this.modExists("edit", true)) { + + return this.modules.edit.getEditedCells(); + } + }; + + Tabulator.prototype.clearCellEdited = function (cells) { + var _this40 = this; + + if (this.modExists("edit", true)) { + + if (!cells) { + + cells = this.modules.edit.getEditedCells(); + } + + if (!Array.isArray(cells)) { + + cells = [cells]; + } + + cells.forEach(function (cell) { + + _this40.modules.edit.clearEdited(cell._getSelf()); + }); + } + }; + + ///////////////// Column Calculation Functions /////////////// + + Tabulator.prototype.getCalcResults = function () { + + if (this.modExists("columnCalcs", true)) { + + return this.modules.columnCalcs.getResults(); + } else { + + return false; + } + }; + + Tabulator.prototype.recalc = function () { + + if (this.modExists("columnCalcs", true)) { + + this.modules.columnCalcs.recalcAll(this.rowManager.activeRows); + } + }; + + /////////////// Navigation Management ////////////// + + + Tabulator.prototype.navigatePrev = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + return cell.nav().prev(); + } + } + + return false; + }; + + Tabulator.prototype.navigateNext = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + return cell.nav().next(); + } + } + + return false; + }; + + Tabulator.prototype.navigateLeft = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().left(); + } + } + + return false; + }; + + Tabulator.prototype.navigateRight = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().right(); + } + } + + return false; + }; + + Tabulator.prototype.navigateUp = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().up(); + } + } + + return false; + }; + + Tabulator.prototype.navigateDown = function () { + + var cell = false; + + if (this.modExists("edit", true)) { + + cell = this.modules.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().down(); + } + } + + return false; + }; + + /////////////// History Management ////////////// + + Tabulator.prototype.undo = function () { + + if (this.options.history && this.modExists("history", true)) { + + return this.modules.history.undo(); + } else { + + return false; + } + }; + + Tabulator.prototype.redo = function () { + + if (this.options.history && this.modExists("history", true)) { + + return this.modules.history.redo(); + } else { + + return false; + } + }; + + Tabulator.prototype.getHistoryUndoSize = function () { + + if (this.options.history && this.modExists("history", true)) { + + return this.modules.history.getHistoryUndoSize(); + } else { + + return false; + } + }; + + Tabulator.prototype.getHistoryRedoSize = function () { + + if (this.options.history && this.modExists("history", true)) { + + return this.modules.history.getHistoryRedoSize(); + } else { + + return false; + } + }; + + Tabulator.prototype.clearHistory = function () { + + if (this.options.history && this.modExists("history", true)) { + + return this.modules.history.clear(); + } else { + + return false; + } + }; + + /////////////// Download Management ////////////// + + + Tabulator.prototype.download = function (type, filename, options, active) { + + if (this.modExists("download", true)) { + + this.modules.download.download(type, filename, options, active); + } + }; + + Tabulator.prototype.downloadToTab = function (type, filename, options, active) { + + if (this.modExists("download", true)) { + + this.modules.download.download(type, filename, options, active, true); + } + }; + + /////////// Inter Table Communications /////////// + + + Tabulator.prototype.tableComms = function (table, module, action, data) { + + this.modules.comms.receive(table, module, action, data); + }; + + ////////////// Extension Management ////////////// + + + //object to hold module + + Tabulator.prototype.moduleBindings = {}; + + //extend module + + Tabulator.prototype.extendModule = function (name, property, values) { + + if (Tabulator.prototype.moduleBindings[name]) { + + var source = Tabulator.prototype.moduleBindings[name].prototype[property]; + + if (source) { + + if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { + + for (var key in values) { + + source[key] = values[key]; + } + } else { + + console.warn("Module Error - Invalid value type, it must be an object"); + } + } else { + + console.warn("Module Error - property does not exist:", property); + } + } else { + + console.warn("Module Error - module does not exist:", name); + } + }; + + //add module to tabulator + + Tabulator.prototype.registerModule = function (name, module) { + + var self = this; + + Tabulator.prototype.moduleBindings[name] = module; + }; + + //ensure that module are bound to instantiated function + + Tabulator.prototype.bindModules = function () { + + this.modules = {}; + + for (var name in Tabulator.prototype.moduleBindings) { + + this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); + } + }; + + //Check for module + + Tabulator.prototype.modExists = function (plugin, required) { + + if (this.modules[plugin]) { + + return true; + } else { + + if (required) { + + console.error("Tabulator Module Not Installed: " + plugin); + } + + return false; + } + }; + + Tabulator.prototype.helpers = { + + elVisible: function elVisible(el) { + + return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); + }, + + elOffset: function elOffset(el) { + + var box = el.getBoundingClientRect(); + + return { + + top: box.top + window.pageYOffset - document.documentElement.clientTop, + + left: box.left + window.pageXOffset - document.documentElement.clientLeft + + }; + }, + + deepClone: function deepClone(obj) { + + var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); + + for (var i in obj) { + + if (obj[i] != null && _typeof(obj[i]) === "object") { + + if (obj[i] instanceof Date) { + + clone[i] = new Date(obj[i]); + } else { + + clone[i] = this.deepClone(obj[i]); + } + } + } + + return clone; + } + + }; + + Tabulator.prototype.comms = { + + tables: [], + + register: function register(table) { + + Tabulator.prototype.comms.tables.push(table); + }, + + deregister: function deregister(table) { + + var index = Tabulator.prototype.comms.tables.indexOf(table); + + if (index > -1) { + + Tabulator.prototype.comms.tables.splice(index, 1); + } + }, + + lookupTable: function lookupTable(query, silent) { + + var results = [], + matches, + match; + + if (typeof query === "string") { + + matches = document.querySelectorAll(query); + + if (matches.length) { + + for (var i = 0; i < matches.length; i++) { + + match = Tabulator.prototype.comms.matchElement(matches[i]); + + if (match) { + + results.push(match); + } + } + } + } else if (typeof HTMLElement !== "undefined" && query instanceof HTMLElement || query instanceof Tabulator) { + + match = Tabulator.prototype.comms.matchElement(query); + + if (match) { + + results.push(match); + } + } else if (Array.isArray(query)) { + + query.forEach(function (item) { + + results = results.concat(Tabulator.prototype.comms.lookupTable(item)); + }); + } else { + + if (!silent) { + + console.warn("Table Connection Error - Invalid Selector", query); + } + } + + return results; + }, + + matchElement: function matchElement(element) { + + return Tabulator.prototype.comms.tables.find(function (table) { + + return element instanceof Tabulator ? table === element : table.element === element; + }); + } + + }; + + Tabulator.prototype.findTable = function (query) { + + var results = Tabulator.prototype.comms.lookupTable(query, true); + + return Array.isArray(results) && !results.length ? false : results; + }; + + var Layout = function Layout(table) { + + this.table = table; + + this.mode = null; + }; + + //initialize layout system + + + Layout.prototype.initialize = function (layout) { + + if (this.modes[layout]) { + + this.mode = layout; + } else { + + console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); + + this.mode = 'fitData'; + } + + this.table.element.setAttribute("tabulator-layout", this.mode); + }; + + Layout.prototype.getMode = function () { + + return this.mode; + }; + + //trigger table layout + + + Layout.prototype.layout = function () { + + this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); + + if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + }; + + //layout render functions + + + Layout.prototype.modes = { + + //resize columns to fit data they contain + + + "fitData": function fitData(columns) { + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.fitDataLayoutOverride(); + } else { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain and stretch row to fill table + + + "fitDataFill": function fitDataFill(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain + + + "fitDataTable": function fitDataTable(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data the contain and stretch last column to fill table + + + "fitDataStretch": function fitDataStretch(columns) { + var _this41 = this; + + var colsWidth = 0, + tableWidth = this.table.rowManager.element.clientWidth, + gap = 0, + lastCol = false; + + columns.forEach(function (column, i) { + + if (!column.widthFixed) { + + column.reinitializeWidth(); + } + + if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { + + lastCol = column; + } + + if (column.visible) { + + colsWidth += column.getWidth(); + } + }); + + if (lastCol) { + + gap = tableWidth - colsWidth + lastCol.getWidth(); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + lastCol.setWidth(0); + + this.table.modules.responsiveLayout.update(); + } + + if (gap > 0) { + + lastCol.setWidth(gap); + } else { + + lastCol.reinitializeWidth(); + } + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + }, + + //resize columns to fit + + + "fitColumns": function fitColumns(columns) { + + var self = this; + + var totalWidth = self.table.element.clientWidth; //table element width + + + var fixedWidth = 0; //total width of columns with a defined width + + + var flexWidth = 0; //total width available to flexible columns + + + var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns + + + var flexColWidth = 0; //desired width of flexible columns + + + var flexColumns = []; //array of flexible width columns + + + var fixedShrinkColumns = []; //array of fixed width columns that can shrink + + + var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns + + + var overflowWidth = 0; //horizontal overflow width + + + var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps + + + function calcWidth(width) { + + var colWidth; + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + return colWidth; + } + + //ensure columns resize to take up the correct amount of space + + + function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { + + var oversizeCols = [], + oversizeSpace = 0, + remainingSpace = 0, + nextColWidth = 0, + remainingFlexGrowUnits = flexGrowUnits, + gap = 0, + changeUnits = 0, + undersizeCols = []; + + function calcGrow(col) { + + return colWidth * (col.column.definition.widthGrow || 1); + } + + function calcShrink(col) { + + return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); + } + + columns.forEach(function (col, i) { + + var width = shrinkCols ? calcShrink(col) : calcGrow(col); + + if (col.column.minWidth >= width) { + + oversizeCols.push(col); + } else { + + if (col.column.maxWidth && col.column.maxWidth < width) { + + col.width = col.column.maxWidth; + + freeSpace -= col.column.maxWidth; + + remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + + if (remainingFlexGrowUnits) { + + colWidth = Math.floor(freeSpace / remainingFlexGrowUnits); + } + } else { + + undersizeCols.push(col); + + changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + } + } + }); + + if (oversizeCols.length) { + + oversizeCols.forEach(function (col) { + + oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; + + col.width = col.column.minWidth; + }); + + remainingSpace = freeSpace - oversizeSpace; + + nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; + + gap = remainingSpace - nextColWidth * changeUnits; + + gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); + } else { + + gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; + + undersizeCols.forEach(function (column) { + + column.width = shrinkCols ? calcShrink(column) : calcGrow(column); + }); + } + + return gap; + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + + //adjust for vertical scrollbar if present + + + if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { + + totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; + } + + columns.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width; + + minWidth = parseInt(column.minWidth); + + if (width) { + + colWidth = calcWidth(width); + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + + if (column.definition.widthShrink) { + + fixedShrinkColumns.push({ + + column: column, + + width: colWidth > minWidth ? colWidth : minWidth + + }); + + flexShrinkUnits += column.definition.widthShrink; + } + } else { + + flexColumns.push({ + + column: column, + + width: 0 + + }); + + flexGrowUnits += column.definition.widthGrow || 1; + } + } + }); + + //calculate available space + + + flexWidth = totalWidth - fixedWidth; + + //calculate correct column size + + + flexColWidth = Math.floor(flexWidth / flexGrowUnits); + + //generate column widths + + + var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); + + //increase width of last column to account for rounding errors + + + if (flexColumns.length && gapFill > 0) { + + flexColumns[flexColumns.length - 1].width += +gapFill; + } + + //caculate space for columns to be shrunk into + + + flexColumns.forEach(function (col) { + + flexWidth -= col.width; + }); + + overflowWidth = Math.abs(gapFill) + flexWidth; + + //shrink oversize columns if there is no available space + + + if (overflowWidth > 0 && flexShrinkUnits) { + + gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); + } + + //decrease width of last column to account for rounding errors + + + if (fixedShrinkColumns.length) { + + fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; + } + + flexColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + + fixedShrinkColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + } + + }; + + Tabulator.prototype.registerModule("layout", Layout); + + var Localize = function Localize(table) { + + this.table = table; //hold Tabulator object + + this.locale = "default"; //current locale + + this.lang = false; //current language + + this.bindings = {}; //update events to call when locale is changed + + this.langList = {}; + }; + + Localize.prototype.initialize = function () { + + this.langList = Tabulator.prototype.helpers.deepClone(this.langs); + }; + + //set header placehoder + + Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { + + this.langList.default.headerFilters.default = placeholder; + }; + + //set header filter placeholder by column + + Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { + + this.langList.default.headerFilters.columns[column] = placeholder; + + if (this.lang && !this.lang.headerFilters.columns[column]) { + + this.lang.headerFilters.columns[column] = placeholder; + } + }; + + //setup a lang description object + + Localize.prototype.installLang = function (locale, lang) { + + if (this.langList[locale]) { + + this._setLangProp(this.langList[locale], lang); + } else { + + this.langList[locale] = lang; + } + }; + + Localize.prototype._setLangProp = function (lang, values) { + + for (var key in values) { + + if (lang[key] && _typeof(lang[key]) == "object") { + + this._setLangProp(lang[key], values[key]); + } else { + + lang[key] = values[key]; + } + } + }; + + //set current locale + + Localize.prototype.setLocale = function (desiredLocale) { + + var self = this; + + desiredLocale = desiredLocale || "default"; + + //fill in any matching languge values + + function traverseLang(trans, path) { + + for (var prop in trans) { + + if (_typeof(trans[prop]) == "object") { + + if (!path[prop]) { + + path[prop] = {}; + } + + traverseLang(trans[prop], path[prop]); + } else { + + path[prop] = trans[prop]; + } + } + } + + //determing correct locale to load + + if (desiredLocale === true && navigator.language) { + + //get local from system + + desiredLocale = navigator.language.toLowerCase(); + } + + if (desiredLocale) { + + //if locale is not set, check for matching top level locale else use default + + if (!self.langList[desiredLocale]) { + + var prefix = desiredLocale.split("-")[0]; + + if (self.langList[prefix]) { + + console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); + + desiredLocale = prefix; + } else { + + console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); + + desiredLocale = "default"; + } + } + } + + self.locale = desiredLocale; + + //load default lang template + + self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); + + if (desiredLocale != "default") { + + traverseLang(self.langList[desiredLocale], self.lang); + } + + self.table.options.localized.call(self.table, self.locale, self.lang); + + self._executeBindings(); + }; + + //get current locale + + Localize.prototype.getLocale = function (locale) { + + return self.locale; + }; + + //get lang object for given local or current if none provided + + Localize.prototype.getLang = function (locale) { + + return locale ? this.langList[locale] : this.lang; + }; + + //get text for current locale + + Localize.prototype.getText = function (path, value) { + + var path = value ? path + "|" + value : path, + pathArray = path.split("|"), + text = this._getLangElement(pathArray, this.locale); + + // if(text === false){ + + // console.warn("Localization Error - Matching localized text not found for given path: ", path); + + // } + + + return text || ""; + }; + + //traverse langs object and find localized copy + + Localize.prototype._getLangElement = function (path, locale) { + + var self = this; + + var root = self.lang; + + path.forEach(function (level) { + + var rootPath; + + if (root) { + + rootPath = root[level]; + + if (typeof rootPath != "undefined") { + + root = rootPath; + } else { + + root = false; + } + } + }); + + return root; + }; + + //set update binding + + Localize.prototype.bind = function (path, callback) { + + if (!this.bindings[path]) { + + this.bindings[path] = []; + } + + this.bindings[path].push(callback); + + callback(this.getText(path), this.lang); + }; + + //itterate through bindings and trigger updates + + Localize.prototype._executeBindings = function () { + + var self = this; + + var _loop = function _loop(path) { + + self.bindings[path].forEach(function (binding) { + + binding(self.getText(path), self.lang); + }); + }; + + for (var path in self.bindings) { + _loop(path); + } + }; + + //Localized text listings + + Localize.prototype.langs = { + + "default": { //hold default locale text + + "groups": { + + "item": "item", + + "items": "items" + + }, + + "columns": {}, + + "ajax": { + + "loading": "Loading", + + "error": "Error" + + }, + + "pagination": { + + "page_size": "Page Size", + + "page_title": "Show Page", + + "first": "First", + + "first_title": "First Page", + + "last": "Last", + + "last_title": "Last Page", + + "prev": "Prev", + + "prev_title": "Prev Page", + + "next": "Next", + + "next_title": "Next Page", + + "all": "All" + + }, + + "headerFilters": { + + "default": "filter column...", + + "columns": {} + + } + + } + + }; + + Tabulator.prototype.registerModule("localize", Localize); + + var Comms = function Comms(table) { + + this.table = table; + }; + + Comms.prototype.getConnections = function (selectors) { + + var self = this, + connections = [], + connection; + + connection = Tabulator.prototype.comms.lookupTable(selectors); + + connection.forEach(function (con) { + + if (self.table !== con) { + + connections.push(con); + } + }); + + return connections; + }; + + Comms.prototype.send = function (selectors, module, action, data) { + + var self = this, + connections = this.getConnections(selectors); + + connections.forEach(function (connection) { + + connection.tableComms(self.table.element, module, action, data); + }); + + if (!connections.length && selectors) { + + console.warn("Table Connection Error - No tables matching selector found", selectors); + } + }; + + Comms.prototype.receive = function (table, module, action, data) { + + if (this.table.modExists(module)) { + + return this.table.modules[module].commsReceived(table, action, data); + } else { + + console.warn("Inter-table Comms Error - no such module:", module); + } + }; + + Tabulator.prototype.registerModule("comms", Comms); + + var Accessor = function Accessor(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "download", "clipboard", "print", "htmlOutput"]; //list of accessor types + }; + + //initialize column accessor + Accessor.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + accessor; + + if (column.definition[key]) { + accessor = self.lookupAccessor(column.definition[key]); + + if (accessor) { + match = true; + + config[key] = { + accessor: accessor, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.accessor = config; + } + }; + + Accessor.prototype.lookupAccessor = function (value) { + var accessor = false; + + //set column accessor + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + if (this.accessors[value]) { + accessor = this.accessors[value]; + } else { + console.warn("Accessor Error - No such accessor found, ignoring: ", value); + } + break; + + case "function": + accessor = value; + break; + } + + return accessor; + }; + + //apply accessor to row + Accessor.prototype.transformRow = function (row, type) { + var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), + rowComponent = row.getComponent(); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(row.data || {}); + + this.table.columnManager.traverse(function (column) { + var value, accessor, params, colCompnent; + + if (column.modules.accessor) { + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if (accessor) { + value = column.getFieldValue(data); + + if (value != "undefined") { + colCompnent = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); + } + } + } + }); + + return data; + }, + + //default accessors + Accessor.prototype.accessors = {}; + + Tabulator.prototype.registerModule("accessor", Accessor); + var Ajax = function Ajax(table) { + + this.table = table; //hold Tabulator object + this.config = false; //hold config object for ajax request + this.url = ""; //request URL + this.urlGenerator = false; + this.params = false; //request parameters + + this.loaderElement = this.createLoaderElement(); //loader message div + this.msgElement = this.createMsgElement(); //message element + this.loadingElement = false; + this.errorElement = false; + this.loaderPromise = false; + + this.progressiveLoad = false; + this.loading = false; + + this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request + }; + + //initialize setup options + Ajax.prototype.initialize = function () { + var template; + + this.loaderElement.appendChild(this.msgElement); + + if (this.table.options.ajaxLoaderLoading) { + if (typeof this.table.options.ajaxLoaderLoading == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderLoading.trim(); + this.loadingElement = template.content.firstChild; + } else { + this.loadingElement = this.table.options.ajaxLoaderLoading; + } + } + + this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; + + this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; + + if (this.table.options.ajaxLoaderError) { + if (typeof this.table.options.ajaxLoaderError == "string") { + template = document.createElement('template'); + template.innerHTML = this.table.options.ajaxLoaderError.trim(); + this.errorElement = template.content.firstChild; + } else { + this.errorElement = this.table.options.ajaxLoaderError; + } + } + + if (this.table.options.ajaxParams) { + this.setParams(this.table.options.ajaxParams); + } + + if (this.table.options.ajaxConfig) { + this.setConfig(this.table.options.ajaxConfig); + } + + if (this.table.options.ajaxURL) { + this.setUrl(this.table.options.ajaxURL); + } + + if (this.table.options.ajaxProgressiveLoad) { + if (this.table.options.pagination) { + this.progressiveLoad = false; + console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); + } else { + if (this.table.modExists("page")) { + this.progressiveLoad = this.table.options.ajaxProgressiveLoad; + this.table.modules.page.initializeProgressive(this.progressiveLoad); + } else { + console.error("Pagination plugin is required for progressive ajax loading"); + } + } + } + }; + + Ajax.prototype.createLoaderElement = function () { + var el = document.createElement("div"); + el.classList.add("tabulator-loader"); + return el; + }; + + Ajax.prototype.createMsgElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-loader-msg"); + el.setAttribute("role", "alert"); + + return el; + }; + + //set ajax params + Ajax.prototype.setParams = function (params, update) { + if (update) { + this.params = this.params || {}; + + for (var key in params) { + this.params[key] = params[key]; + } + } else { + this.params = params; + } + }; + + Ajax.prototype.getParams = function () { + return this.params || {}; + }; + + //load config object + Ajax.prototype.setConfig = function (config) { + this._loadDefaultConfig(); + + if (typeof config == "string") { + this.config.method = config; + } else { + for (var key in config) { + this.config[key] = config[key]; + } + } + }; + + //create config object from default + Ajax.prototype._loadDefaultConfig = function (force) { + var self = this; + if (!self.config || force) { + + self.config = {}; + + //load base config from defaults + for (var key in self.defaultConfig) { + self.config[key] = self.defaultConfig[key]; + } + } + }; + + //set request url + Ajax.prototype.setUrl = function (url) { + this.url = url; + }; + + //get request url + Ajax.prototype.getUrl = function () { + return this.url; + }; + + //lstandard loading function + Ajax.prototype.loadData = function (inPosition, columnsChanged) { + var self = this; + + if (this.progressiveLoad) { + return this._loadDataProgressive(); + } else { + return this._loadDataStandard(inPosition, columnsChanged); + } + }; + + Ajax.prototype.nextPage = function (diff) { + var margin; + + if (!this.loading) { + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; + + if (diff < margin) { + this.table.modules.page.nextPage().then(function () {}).catch(function () {}); + } + } + }; + + Ajax.prototype.blockActiveRequest = function () { + this.requestOrder++; + }; + + Ajax.prototype._loadDataProgressive = function () { + this.table.rowManager.setData([]); + return this.table.modules.page.setPage(1); + }; + + Ajax.prototype._loadDataStandard = function (inPosition, columnsChanged) { + var _this42 = this; + + return new Promise(function (resolve, reject) { + _this42.sendRequest(inPosition).then(function (data) { + _this42.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { + resolve(); + }).catch(function (e) { + reject(e); + }); + }).catch(function (e) { + reject(e); + }); + }); + }; + + Ajax.prototype.generateParamsList = function (data, prefix) { + var self = this, + output = []; + + prefix = prefix || ""; + + if (Array.isArray(data)) { + data.forEach(function (item, i) { + output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); + }); + } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") { + for (var key in data) { + output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); + } + } else { + output.push({ key: prefix, value: data }); + } + + return output; + }; + + Ajax.prototype.serializeParams = function (params) { + var output = this.generateParamsList(params), + encoded = []; + + output.forEach(function (item) { + encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); + }); + + return encoded.join("&"); + }; + + //send ajax request + Ajax.prototype.sendRequest = function (silent) { + var _this43 = this; + + var self = this, + url = self.url, + requestNo, + esc, + query; + + self.requestOrder++; + requestNo = self.requestOrder; + + self._loadDefaultConfig(); + + return new Promise(function (resolve, reject) { + if (self.table.options.ajaxRequesting.call(_this43.table, self.url, self.params) !== false) { + + self.loading = true; + + if (!silent) { + self.showLoader(); + } + + _this43.loaderPromise(url, self.config, self.params).then(function (data) { + if (requestNo === self.requestOrder) { + if (self.table.options.ajaxResponse) { + data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); + } + resolve(data); + + self.hideLoader(); + self.loading = false; + } else { + console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); + } + }).catch(function (error) { + console.error("Ajax Load Error: ", error); + self.table.options.ajaxError.call(self.table, error); + + self.showError(); + + setTimeout(function () { + self.hideLoader(); + }, 3000); + + self.loading = false; + + reject(error); + }); + } else { + reject(); + } + }); + }; + + Ajax.prototype.showLoader = function () { + var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; + + if (shouldLoad) { + + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-error"); + this.msgElement.classList.add("tabulator-loading"); + + if (this.loadingElement) { + this.msgElement.appendChild(this.loadingElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); + } + + this.table.element.appendChild(this.loaderElement); + } + }; + + Ajax.prototype.showError = function () { + this.hideLoader(); + + while (this.msgElement.firstChild) { + this.msgElement.removeChild(this.msgElement.firstChild); + }this.msgElement.classList.remove("tabulator-loading"); + this.msgElement.classList.add("tabulator-error"); + + if (this.errorElement) { + this.msgElement.appendChild(this.errorElement); + } else { + this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); + } + + this.table.element.appendChild(this.loaderElement); + }; + + Ajax.prototype.hideLoader = function () { + if (this.loaderElement.parentNode) { + this.loaderElement.parentNode.removeChild(this.loaderElement); + } + }; + + //default ajax config object + Ajax.prototype.defaultConfig = { + method: "GET" + }; + + Ajax.prototype.defaultURLGenerator = function (url, config, params) { + + if (url) { + if (params && Object.keys(params).length) { + if (!config.method || config.method.toLowerCase() == "get") { + config.method = "get"; + + url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params); + } + } + } + + return url; + }; + + Ajax.prototype.defaultLoaderPromise = function (url, config, params) { + var self = this, + contentType; + + return new Promise(function (resolve, reject) { + + //set url + url = self.urlGenerator.call(self.table, url, config, params); + + //set body content if not GET request + if (config.method.toUpperCase() != "GET") { + contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; + if (contentType) { + + for (var key in contentType.headers) { + if (!config.headers) { + config.headers = {}; + } + + if (typeof config.headers[key] === "undefined") { + config.headers[key] = contentType.headers[key]; + } + } + + config.body = contentType.body.call(self, url, config, params); + } else { + console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); + } + } + + if (url) { + + //configure headers + if (typeof config.headers === "undefined") { + config.headers = {}; + } + + if (typeof config.headers.Accept === "undefined") { + config.headers.Accept = "application/json"; + } + + if (typeof config.headers["X-Requested-With"] === "undefined") { + config.headers["X-Requested-With"] = "XMLHttpRequest"; + } + + if (typeof config.mode === "undefined") { + config.mode = "cors"; + } + + if (config.mode == "cors") { + + if (typeof config.headers["Access-Control-Allow-Origin"] === "undefined") { + config.headers["Access-Control-Allow-Origin"] = window.location.origin; + } + + if (typeof config.credentials === "undefined") { + config.credentials = 'same-origin'; + } + } else { + if (typeof config.credentials === "undefined") { + config.credentials = 'include'; + } + } + + //send request + fetch(url, config).then(function (response) { + if (response.ok) { + response.json().then(function (data) { + resolve(data); + }).catch(function (error) { + reject(error); + console.warn("Ajax Load Error - Invalid JSON returned", error); + }); + } else { + console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); + reject(response); + } + }).catch(function (error) { + console.error("Ajax Load Error - Connection Error: ", error); + reject(error); + }); + } else { + console.warn("Ajax Load Error - No URL Set"); + resolve([]); + } + }); + }; + + Ajax.prototype.contentTypeFormatters = { + "json": { + headers: { + 'Content-Type': 'application/json' + }, + body: function body(url, config, params) { + return JSON.stringify(params); + } + }, + "form": { + headers: {}, + body: function body(url, config, params) { + var output = this.generateParamsList(params), + form = new FormData(); + + output.forEach(function (item) { + form.append(item.key, item.value); + }); + + return form; + } + } + }; + + Tabulator.prototype.registerModule("ajax", Ajax); + + //public calc object + var CalcComponent = function CalcComponent(row) { + this._row = row; + }; + + CalcComponent.prototype.getData = function (transform) { + return this._row.getData(transform); + }; + + CalcComponent.prototype.getElement = function () { + return this._row.getElement(); + }; + + CalcComponent.prototype.getTable = function () { + return this._row.table; + }; + + CalcComponent.prototype.getCells = function () { + var cells = []; + + this._row.getCells().forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; + }; + + CalcComponent.prototype.getCell = function (column) { + var cell = this._row.getCell(column); + return cell ? cell.getComponent() : false; + }; + + CalcComponent.prototype._getSelf = function () { + return this._row; + }; + + var ColumnCalcs = function ColumnCalcs(table) { + this.table = table; //hold Tabulator object + this.topCalcs = []; + this.botCalcs = []; + this.genColumn = false; + this.topElement = this.createElement(); + this.botElement = this.createElement(); + this.topRow = false; + this.botRow = false; + this.topInitialized = false; + this.botInitialized = false; + + this.initialize(); + }; + + ColumnCalcs.prototype.createElement = function () { + var el = document.createElement("div"); + el.classList.add("tabulator-calcs-holder"); + return el; + }; + + ColumnCalcs.prototype.initialize = function () { + this.genColumn = new Column({ field: "value" }, this); + }; + + //dummy functions to handle being mock column manager + ColumnCalcs.prototype.registerColumnField = function () {}; + + //initialize column calcs + ColumnCalcs.prototype.initializeColumn = function (column) { + var def = column.definition; + + var config = { + topCalcParams: def.topCalcParams || {}, + botCalcParams: def.bottomCalcParams || {} + }; + + if (def.topCalc) { + + switch (_typeof(def.topCalc)) { + case "string": + if (this.calculations[def.topCalc]) { + config.topCalc = this.calculations[def.topCalc]; + } else { + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); + } + break; + + case "function": + config.topCalc = def.topCalc; + break; + + } + + if (config.topCalc) { + column.modules.columnCalcs = config; + this.topCalcs.push(column); + + if (this.table.options.columnCalcs != "group") { + this.initializeTopRow(); + } + } + } + + if (def.bottomCalc) { + switch (_typeof(def.bottomCalc)) { + case "string": + if (this.calculations[def.bottomCalc]) { + config.botCalc = this.calculations[def.bottomCalc]; + } else { + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); + } + break; + + case "function": + config.botCalc = def.bottomCalc; + break; + + } + + if (config.botCalc) { + column.modules.columnCalcs = config; + this.botCalcs.push(column); + + if (this.table.options.columnCalcs != "group") { + this.initializeBottomRow(); + } + } + } + }; + + ColumnCalcs.prototype.removeCalcs = function () { + var changed = false; + + if (this.topInitialized) { + this.topInitialized = false; + this.topElement.parentNode.removeChild(this.topElement); + changed = true; + } + + if (this.botInitialized) { + this.botInitialized = false; + this.table.footerManager.remove(this.botElement); + changed = true; + } + + if (changed) { + this.table.rowManager.adjustTableSize(); + } + }; + + ColumnCalcs.prototype.initializeTopRow = function () { + if (!this.topInitialized) { + this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); + this.topInitialized = true; + } + }; + + ColumnCalcs.prototype.initializeBottomRow = function () { + if (!this.botInitialized) { + this.table.footerManager.prepend(this.botElement); + this.botInitialized = true; + } + }; + + ColumnCalcs.prototype.scrollHorizontal = function (left) { + if (this.botInitialized && this.botRow) { + this.botRow.getElement().style.marginLeft = -left + "px"; + } + }; + + ColumnCalcs.prototype.recalc = function (rows) { + var data, row; + + if (this.topInitialized || this.botInitialized) { + data = this.rowsToData(rows); + + if (this.topInitialized) { + if (this.topRow) { + this.topRow.deleteCells(); + } + + row = this.generateRow("top", this.rowsToData(rows)); + this.topRow = row; + while (this.topElement.firstChild) { + this.topElement.removeChild(this.topElement.firstChild); + }this.topElement.appendChild(row.getElement()); + row.initialize(true); + } + + if (this.botInitialized) { + if (this.botRow) { + this.botRow.deleteCells(); + } + + row = this.generateRow("bottom", this.rowsToData(rows)); + this.botRow = row; + while (this.botElement.firstChild) { + this.botElement.removeChild(this.botElement.firstChild); + }this.botElement.appendChild(row.getElement()); + row.initialize(true); + } + + this.table.rowManager.adjustTableSize(); + + //set resizable handles + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } + } + }; + + ColumnCalcs.prototype.recalcRowGroup = function (row) { + this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); + }; + + ColumnCalcs.prototype.recalcAll = function () { + var _this44 = this; + + if (this.topCalcs.length || this.botCalcs.length) { + if (this.table.options.columnCalcs !== "group") { + this.recalc(this.table.rowManager.activeRows); + } + + if (this.table.options.groupBy && this.table.options.columnCalcs !== "table") { + + var groups = table.modules.groupRows.getChildGroups(); + + groups.forEach(function (group) { + _this44.recalcGroup(group); + }); + } + } + }; + + ColumnCalcs.prototype.recalcGroup = function (group) { + var data, rowData; + + if (group) { + if (group.calcs) { + if (group.calcs.bottom) { + data = this.rowsToData(group.rows); + rowData = this.generateRowData("bottom", data); + + group.calcs.bottom.updateData(rowData); + group.calcs.bottom.reinitialize(); + } + + if (group.calcs.top) { + data = this.rowsToData(group.rows); + rowData = this.generateRowData("top", data); + + group.calcs.top.updateData(rowData); + group.calcs.top.reinitialize(); + } + } + } + }; + + //generate top stats row + ColumnCalcs.prototype.generateTopRow = function (rows) { + return this.generateRow("top", this.rowsToData(rows)); + }; + //generate bottom stats row + ColumnCalcs.prototype.generateBottomRow = function (rows) { + return this.generateRow("bottom", this.rowsToData(rows)); + }; + + ColumnCalcs.prototype.rowsToData = function (rows) { + var _this45 = this; + + var data = []; + + rows.forEach(function (row) { + data.push(row.getData()); + + if (_this45.table.options.dataTree && _this45.table.options.dataTreeChildColumnCalcs) { + if (row.modules.dataTree.open) { + var children = _this45.rowsToData(_this45.table.modules.dataTree.getFilteredTreeChildren(row)); + data = data.concat(children); + } + } + }); + + return data; + }; + + //generate stats row + ColumnCalcs.prototype.generateRow = function (pos, data) { + var self = this, + rowData = this.generateRowData(pos, data), + row; + + if (self.table.modExists("mutator")) { + self.table.modules.mutator.disable(); + } + + row = new Row(rowData, this, "calc"); + + if (self.table.modExists("mutator")) { + self.table.modules.mutator.enable(); + } + + row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); + + row.component = false; + + row.getComponent = function () { + if (!this.component) { + this.component = new CalcComponent(this); + } + + return this.component; + }; + + row.generateCells = function () { + + var cells = []; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + //set field name of mock column + self.genColumn.setField(column.getField()); + self.genColumn.hozAlign = column.hozAlign; + + if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { + self.genColumn.modules.format = { + formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), + params: column.definition[pos + "CalcFormatterParams"] || {} + }; + } else { + self.genColumn.modules.format = { + formatter: self.table.modules.format.getFormatter("plaintext"), + params: {} + }; + } + + //ensure css class defintion is replicated to calculation cell + self.genColumn.definition.cssClass = column.definition.cssClass; + + //generate cell and assign to correct column + var cell = new Cell(self.genColumn, row); + cell.getElement(); + cell.column = column; + cell.setWidth(); + + column.cells.push(cell); + cells.push(cell); + + if (!column.visible) { + cell.hide(); + } + }); + + this.cells = cells; + }; + + return row; + }; + + //generate stats row + ColumnCalcs.prototype.generateRowData = function (pos, data) { + var rowData = {}, + calcs = pos == "top" ? this.topCalcs : this.botCalcs, + type = pos == "top" ? "topCalc" : "botCalc", + params, + paramKey; + + calcs.forEach(function (column) { + var values = []; + + if (column.modules.columnCalcs && column.modules.columnCalcs[type]) { + data.forEach(function (item) { + values.push(column.getFieldValue(item)); + }); + + paramKey = type + "Params"; + params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey]; + + column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); + } + }); + + return rowData; + }; + + ColumnCalcs.prototype.hasTopCalcs = function () { + return !!this.topCalcs.length; + }; + + ColumnCalcs.prototype.hasBottomCalcs = function () { + return !!this.botCalcs.length; + }; + + //handle table redraw + ColumnCalcs.prototype.redraw = function () { + if (this.topRow) { + this.topRow.normalizeHeight(true); + } + if (this.botRow) { + this.botRow.normalizeHeight(true); + } + }; + + //return the calculated + ColumnCalcs.prototype.getResults = function () { + var self = this, + results = {}, + groups; + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + groups = this.table.modules.groupRows.getGroups(true); + + groups.forEach(function (group) { + results[group.getKey()] = self.getGroupResults(group); + }); + } else { + results = { + top: this.topRow ? this.topRow.getData() : {}, + bottom: this.botRow ? this.botRow.getData() : {} + }; + } + + return results; + }; + + //get results from a group + ColumnCalcs.prototype.getGroupResults = function (group) { + var self = this, + groupObj = group._getSelf(), + subGroups = group.getSubGroups(), + subGroupResults = {}, + results = {}; + + subGroups.forEach(function (subgroup) { + subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); + }); + + results = { + top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, + bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, + groups: subGroupResults + }; + + return results; + }; + + //default calculations + ColumnCalcs.prototype.calculations = { + "avg": function avg(values, data, calcParams) { + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; + + if (values.length) { + output = values.reduce(function (sum, value) { + return Number(sum) + Number(value); + }); + + output = output / values.length; + + output = precision !== false ? output.toFixed(precision) : output; + } + + return parseFloat(output).toString(); + }, + "max": function max(values, data, calcParams) { + var output = null, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + values.forEach(function (value) { + + value = Number(value); + + if (value > output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "min": function min(values, data, calcParams) { + var output = null, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + values.forEach(function (value) { + + value = Number(value); + + if (value < output || output === null) { + output = value; + } + }); + + return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; + }, + "sum": function sum(values, data, calcParams) { + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; + + if (values.length) { + values.forEach(function (value) { + value = Number(value); + + output += !isNaN(value) ? Number(value) : 0; + }); + } + + return precision !== false ? output.toFixed(precision) : output; + }, + "concat": function concat(values, data, calcParams) { + var output = 0; + + if (values.length) { + output = values.reduce(function (sum, value) { + return String(sum) + String(value); + }); + } + + return output; + }, + "count": function count(values, data, calcParams) { + var output = 0; + + if (values.length) { + values.forEach(function (value) { + if (value) { + output++; + } + }); + } + + return output; + } + }; + + Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); + + var Clipboard = function Clipboard(table) { + this.table = table; + this.mode = true; + + this.pasteParser = function () {}; + this.pasteAction = function () {}; + this.customSelection = false; + this.rowRange = false; + this.blocked = true; //block copy actions not originating from this command + }; + + Clipboard.prototype.initialize = function () { + var _this46 = this; + + this.mode = this.table.options.clipboard; + + this.rowRange = this.table.options.clipboardCopyRowRange; + + if (this.mode === true || this.mode === "copy") { + this.table.element.addEventListener("copy", function (e) { + var plain, html, list; + + if (!_this46.blocked) { + e.preventDefault(); + + if (_this46.customSelection) { + plain = _this46.customSelection; + + if (_this46.table.options.clipboardCopyFormatter) { + plain = _this46.table.options.clipboardCopyFormatter("plain", plain); + } + } else { + + var list = _this46.table.modules.export.generateExportList(_this46.table.options.clipboardCopyConfig, _this46.table.options.clipboardCopyStyled, _this46.rowRange, "clipboard"); + + html = _this46.table.modules.export.genereateHTMLTable(list); + plain = html ? _this46.generatePlainContent(list) : ""; + + if (_this46.table.options.clipboardCopyFormatter) { + plain = _this46.table.options.clipboardCopyFormatter("plain", plain); + html = _this46.table.options.clipboardCopyFormatter("html", html); + } + } + + if (window.clipboardData && window.clipboardData.setData) { + window.clipboardData.setData('Text', plain); + } else if (e.clipboardData && e.clipboardData.setData) { + e.clipboardData.setData('text/plain', plain); + if (html) { + e.clipboardData.setData('text/html', html); + } + } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { + e.originalEvent.clipboardData.setData('text/plain', plain); + if (html) { + e.originalEvent.clipboardData.setData('text/html', html); + } + } + + _this46.table.options.clipboardCopied.call(_this46.table, plain, html); + + _this46.reset(); + } + }); + } + + if (this.mode === true || this.mode === "paste") { + this.table.element.addEventListener("paste", function (e) { + _this46.paste(e); + }); + } + + this.setPasteParser(this.table.options.clipboardPasteParser); + this.setPasteAction(this.table.options.clipboardPasteAction); + }; + + Clipboard.prototype.reset = function () { + this.blocked = true; + this.customSelection = false; + }; + + Clipboard.prototype.generatePlainContent = function (list) { + var output = []; + + list.forEach(function (row) { + var rowData = []; + + row.columns.forEach(function (col) { + var value = ""; + + if (col) { + + if (row.type === "group") { + col.value = col.component.getKey(); + } + + if (col.value === null) { + value = ""; + } else { + switch (_typeof(col.value)) { + case "object": + value = JSON.stringify(col.value); + break; + + case "undefined": + value = ""; + break; + + default: + value = col.value; + } + } + } + + rowData.push(value); + }); + + output.push(rowData.join("\t")); + }); + + return output.join("\n"); + }; + + Clipboard.prototype.copy = function (range, internal) { + var range, sel, textRange; + this.blocked = false; + this.customSelection = false; + + if (this.mode === true || this.mode === "copy") { + + this.rowRange = range || this.table.options.clipboardCopyRowRange; + + if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { + range = document.createRange(); + range.selectNodeContents(this.table.element); + sel = window.getSelection(); + + if (sel.toString() && internal) { + this.customSelection = sel.toString(); + } + + sel.removeAllRanges(); + sel.addRange(range); + } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { + textRange = document.body.createTextRange(); + textRange.moveToElementText(this.table.element); + textRange.select(); + } + + document.execCommand('copy'); + + if (sel) { + sel.removeAllRanges(); + } + } + }; + + //PASTE EVENT HANDLING + + Clipboard.prototype.setPasteAction = function (action) { + + switch (typeof action === 'undefined' ? 'undefined' : _typeof(action)) { + case "string": + this.pasteAction = this.pasteActions[action]; + + if (!this.pasteAction) { + console.warn("Clipboard Error - No such paste action found:", action); + } + break; + + case "function": + this.pasteAction = action; + break; + } + }; + + Clipboard.prototype.setPasteParser = function (parser) { + switch (typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) { + case "string": + this.pasteParser = this.pasteParsers[parser]; + + if (!this.pasteParser) { + console.warn("Clipboard Error - No such paste parser found:", parser); + } + break; + + case "function": + this.pasteParser = parser; + break; + } + }; + + Clipboard.prototype.paste = function (e) { + var data, rowData, rows; + + if (this.checkPaseOrigin(e)) { + + data = this.getPasteData(e); + + rowData = this.pasteParser.call(this, data); + + if (rowData) { + e.preventDefault(); + + if (this.table.modExists("mutator")) { + rowData = this.mutateData(rowData); + } + + rows = this.pasteAction.call(this, rowData); + this.table.options.clipboardPasted.call(this.table, data, rowData, rows); + } else { + this.table.options.clipboardPasteError.call(this.table, data); + } + } + }; + + Clipboard.prototype.mutateData = function (data) { + var self = this, + output = []; + + if (Array.isArray(data)) { + data.forEach(function (row) { + output.push(self.table.modules.mutator.transformRow(row, "clipboard")); + }); + } else { + output = data; + } + + return output; + }; + + Clipboard.prototype.checkPaseOrigin = function (e) { + var valid = true; + + if (e.target.tagName != "DIV" || this.table.modules.edit.currentCell) { + valid = false; + } + + return valid; + }; + + Clipboard.prototype.getPasteData = function (e) { + var data; + + if (window.clipboardData && window.clipboardData.getData) { + data = window.clipboardData.getData('Text'); + } else if (e.clipboardData && e.clipboardData.getData) { + data = e.clipboardData.getData('text/plain'); + } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { + data = e.originalEvent.clipboardData.getData('text/plain'); + } + + return data; + }; + + Clipboard.prototype.pasteParsers = { + table: function table(clipboard) { + var data = [], + success = false, + headerFindSuccess = true, + columns = this.table.columnManager.columns, + columnMap = [], + rows = []; + + //get data from clipboard into array of columns and rows. + clipboard = clipboard.split("\n"); + + clipboard.forEach(function (row) { + data.push(row.split("\t")); + }); + + if (data.length && !(data.length === 1 && data[0].length < 2)) { + success = true; + + //check if headers are present by title + data[0].forEach(function (value) { + var column = columns.find(function (column) { + return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); + }); + + if (column) { + columnMap.push(column); + } else { + headerFindSuccess = false; + } + }); + + //check if column headers are present by field + if (!headerFindSuccess) { + headerFindSuccess = true; + columnMap = []; + + data[0].forEach(function (value) { + var column = columns.find(function (column) { + return value && column.field && value.trim() && column.field.trim() === value.trim(); + }); + + if (column) { + columnMap.push(column); + } else { + headerFindSuccess = false; + } + }); + + if (!headerFindSuccess) { + columnMap = this.table.columnManager.columnsByIndex; + } + } + + //remove header row if found + if (headerFindSuccess) { + data.shift(); + } + + data.forEach(function (item) { + var row = {}; + + item.forEach(function (value, i) { + if (columnMap[i]) { + row[columnMap[i].field] = value; + } + }); + + rows.push(row); + }); + + return rows; + } else { + return false; + } + } + }; + + Clipboard.prototype.pasteActions = { + replace: function replace(rows) { + return this.table.setData(rows); + }, + update: function update(rows) { + return this.table.updateOrAddData(rows); + }, + insert: function insert(rows) { + return this.table.addData(rows); + } + }; + + Tabulator.prototype.registerModule("clipboard", Clipboard); + + var DataTree = function DataTree(table) { + this.table = table; + this.indent = 10; + this.field = ""; + this.collapseEl = null; + this.expandEl = null; + this.branchEl = null; + this.elementField = false; + + this.startOpen = function () {}; + + this.displayIndex = 0; + }; + + DataTree.prototype.initialize = function () { + var dummyEl = null, + firstCol = this.table.columnManager.getFirstVisibileColumn(), + options = this.table.options; + + this.field = options.dataTreeChildField; + this.indent = options.dataTreeChildIndent; + this.elementField = options.dataTreeElementColumn || (firstCol ? firstCol.field : false); + + if (options.dataTreeBranchElement) { + + if (options.dataTreeBranchElement === true) { + this.branchEl = document.createElement("div"); + this.branchEl.classList.add("tabulator-data-tree-branch"); + } else { + if (typeof options.dataTreeBranchElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeBranchElement; + this.branchEl = dummyEl.firstChild; + } else { + this.branchEl = options.dataTreeBranchElement; + } + } + } + + if (options.dataTreeCollapseElement) { + if (typeof options.dataTreeCollapseElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeCollapseElement; + this.collapseEl = dummyEl.firstChild; + } else { + this.collapseEl = options.dataTreeCollapseElement; + } + } else { + this.collapseEl = document.createElement("div"); + this.collapseEl.classList.add("tabulator-data-tree-control"); + this.collapseEl.tabIndex = 0; + this.collapseEl.innerHTML = "
"; + } + + if (options.dataTreeExpandElement) { + if (typeof options.dataTreeExpandElement === "string") { + dummyEl = document.createElement("div"); + dummyEl.innerHTML = options.dataTreeExpandElement; + this.expandEl = dummyEl.firstChild; + } else { + this.expandEl = options.dataTreeExpandElement; + } + } else { + this.expandEl = document.createElement("div"); + this.expandEl.classList.add("tabulator-data-tree-control"); + this.expandEl.tabIndex = 0; + this.expandEl.innerHTML = "
"; + } + + switch (_typeof(options.dataTreeStartExpanded)) { + case "boolean": + this.startOpen = function (row, index) { + return options.dataTreeStartExpanded; + }; + break; + + case "function": + this.startOpen = options.dataTreeStartExpanded; + break; + + default: + this.startOpen = function (row, index) { + return options.dataTreeStartExpanded[index]; + }; + break; + } + }; + + DataTree.prototype.initializeRow = function (row) { + var childArray = row.getData()[this.field]; + var isArray = Array.isArray(childArray); + + var children = isArray || !isArray && (typeof childArray === 'undefined' ? 'undefined' : _typeof(childArray)) === "object" && childArray !== null; + + if (!children && row.modules.dataTree && row.modules.dataTree.branchEl) { + row.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl); + } + + if (!children && row.modules.dataTree && row.modules.dataTree.controlEl) { + row.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl); + } + + row.modules.dataTree = { + index: row.modules.dataTree ? row.modules.dataTree.index : 0, + open: children ? row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0) : false, + controlEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false, + branchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false, + parent: row.modules.dataTree ? row.modules.dataTree.parent : false, + children: children + }; + }; + + DataTree.prototype.layoutRow = function (row) { + var cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0], + el = cell.getElement(), + config = row.modules.dataTree; + + if (config.branchEl) { + if (config.branchEl.parentNode) { + config.branchEl.parentNode.removeChild(config.branchEl); + } + config.branchEl = false; + } + + if (config.controlEl) { + if (config.controlEl.parentNode) { + config.controlEl.parentNode.removeChild(config.controlEl); + } + config.controlEl = false; + } + + this.generateControlElement(row, el); + + row.getElement().classList.add("tabulator-tree-level-" + config.index); + + if (config.index) { + if (this.branchEl) { + config.branchEl = this.branchEl.cloneNode(true); + el.insertBefore(config.branchEl, el.firstChild); + + if (this.table.rtl) { + config.branchEl.style.marginRight = (config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1) + config.index * this.indent + "px"; + } else { + config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + config.index * this.indent + "px"; + } + } else { + + if (this.table.rtl) { + el.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + config.index * this.indent + "px"; + } else { + el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; + } + } + } + }; + + DataTree.prototype.generateControlElement = function (row, el) { + var _this47 = this; + + var config = row.modules.dataTree, + el = el || row.getCells()[0].getElement(), + oldControl = config.controlEl; + + if (config.children !== false) { + + if (config.open) { + config.controlEl = this.collapseEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this47.collapseRow(row); + }); + } else { + config.controlEl = this.expandEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this47.expandRow(row); + }); + } + + config.controlEl.addEventListener("mousedown", function (e) { + e.stopPropagation(); + }); + + if (oldControl && oldControl.parentNode === el) { + oldControl.parentNode.replaceChild(config.controlEl, oldControl); + } else { + el.insertBefore(config.controlEl, el.firstChild); + } + } + }; + + DataTree.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; + }; + + DataTree.prototype.getDisplayIndex = function () { + return this.displayIndex; + }; + + DataTree.prototype.getRows = function (rows) { + var _this48 = this; + + var output = []; + + rows.forEach(function (row, i) { + var config, children; + + output.push(row); + + if (row instanceof Row) { + + row.create(); + + config = row.modules.dataTree.children; + + if (!config.index && config.children !== false) { + children = _this48.getChildren(row); + + children.forEach(function (child) { + child.create(); + output.push(child); + }); + } + } + }); + + return output; + }; + + DataTree.prototype.getChildren = function (row) { + var _this49 = this; + + var config = row.modules.dataTree, + children = [], + output = []; + + if (config.children !== false && config.open) { + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + if (this.table.modExists("sort") && this.table.options.dataTreeSort) { + this.table.modules.sort.sort(children); + } + + children.forEach(function (child) { + output.push(child); + + var subChildren = _this49.getChildren(child); + + subChildren.forEach(function (sub) { + output.push(sub); + }); + }); + } + + return output; + }; + + DataTree.prototype.generateChildren = function (row) { + var _this50 = this; + + var children = []; + + var childArray = row.getData()[this.field]; + + if (!Array.isArray(childArray)) { + childArray = [childArray]; + } + + childArray.forEach(function (childData) { + var childRow = new Row(childData || {}, _this50.table.rowManager); + + childRow.create(); + + childRow.modules.dataTree.index = row.modules.dataTree.index + 1; + childRow.modules.dataTree.parent = row; + + if (childRow.modules.dataTree.children) { + childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index); + } + children.push(childRow); + }); + + return children; + }; + + DataTree.prototype.expandRow = function (row, silent) { + var config = row.modules.dataTree; + + if (config.children !== false) { + config.open = true; + + row.reinitialize(); + + this.table.rowManager.refreshActiveData("tree", false, true); + + this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); + } + }; + + DataTree.prototype.collapseRow = function (row) { + var config = row.modules.dataTree; + + if (config.children !== false) { + config.open = false; + + row.reinitialize(); + + this.table.rowManager.refreshActiveData("tree", false, true); + + this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); + } + }; + + DataTree.prototype.toggleRow = function (row) { + var config = row.modules.dataTree; + + if (config.children !== false) { + if (config.open) { + this.collapseRow(row); + } else { + this.expandRow(row); + } + } + }; + + DataTree.prototype.getTreeParent = function (row) { + return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; + }; + + DataTree.prototype.getFilteredTreeChildren = function (row) { + var config = row.modules.dataTree, + output = [], + children; + + if (config.children) { + + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + children.forEach(function (childRow) { + if (childRow instanceof Row) { + output.push(childRow); + } + }); + } + + return output; + }; + + DataTree.prototype.rowDelete = function (row) { + var parent = row.modules.dataTree.parent, + childIndex; + + if (parent) { + childIndex = this.findChildIndex(row, parent); + + if (childIndex !== false) { + parent.data[this.field].splice(childIndex, 1); + } + + if (!parent.data[this.field].length) { + delete parent.data[this.field]; + } + + this.initializeRow(parent); + this.layoutRow(parent); + } + + this.table.rowManager.refreshActiveData("tree", false, true); + }; + + DataTree.prototype.addTreeChildRow = function (row, data, top, index) { + var childIndex = false; + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (!Array.isArray(row.data[this.field])) { + row.data[this.field] = []; + + row.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index); + } + + if (typeof index !== "undefined") { + childIndex = this.findChildIndex(index, row); + + if (childIndex !== false) { + row.data[this.field].splice(top ? childIndex : childIndex + 1, 0, data); + } + } + + if (childIndex === false) { + if (top) { + row.data[this.field].unshift(data); + } else { + row.data[this.field].push(data); + } + } + + this.initializeRow(row); + this.layoutRow(row); + + this.table.rowManager.refreshActiveData("tree", false, true); + }; + + DataTree.prototype.findChildIndex = function (subject, parent) { + var _this51 = this; + + var match = false; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + //subject is row element + match = subject.data; + } else if (subject instanceof RowComponent) { + //subject is public row component + match = subject._getSelf().data; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + if (parent.modules.dataTree) { + match = parent.modules.dataTree.children.find(function (childRow) { + return childRow instanceof Row ? childRow.element === subject : false; + }); + + if (match) { + match = match.data; + } + } + } + } else if (typeof subject == "undefined" || subject === null) { + match = false; + } else { + //subject should be treated as the index of the row + match = parent.data[this.field].find(function (row) { + return row.data[_this51.table.options.index] == subject; + }); + } + + if (match) { + + if (Array.isArray(parent.data[this.field])) { + match = parent.data[this.field].indexOf(match); + } + + if (match == -1) { + match = false; + } + } + + //catch all for any other type of input + + return match; + }; + + DataTree.prototype.getTreeChildren = function (row, component, recurse) { + var _this52 = this; + + var config = row.modules.dataTree, + output = []; + + if (config.children) { + + if (!Array.isArray(config.children)) { + config.children = this.generateChildren(row); + } + + config.children.forEach(function (childRow) { + if (childRow instanceof Row) { + output.push(component ? childRow.getComponent() : childRow); + + if (recurse) { + output = output.concat(_this52.getTreeChildren(childRow, component, recurse)); + } + } + }); + } + + return output; + }; + + DataTree.prototype.checkForRestyle = function (cell) { + if (!cell.row.cells.indexOf(cell)) { + cell.row.reinitialize(); + } + }; + + DataTree.prototype.getChildField = function () { + return this.field; + }; + + DataTree.prototype.redrawNeeded = function (data) { + return (this.field ? typeof data[this.field] !== "undefined" : false) || (this.elementField ? typeof data[this.elementField] !== "undefined" : false); + }; + + Tabulator.prototype.registerModule("dataTree", DataTree); + + var Download = function Download(table) { + this.table = table; //hold Tabulator object + }; + + //trigger file download + Download.prototype.download = function (type, filename, options, range, interceptCallback) { + var self = this, + downloadFunc = false; + + function buildLink(data, mime) { + if (interceptCallback) { + if (interceptCallback === true) { + self.triggerDownload(data, mime, type, filename, true); + } else { + interceptCallback(data); + } + } else { + self.triggerDownload(data, mime, type, filename); + } + } + + if (typeof type == "function") { + downloadFunc = type; + } else { + if (self.downloaders[type]) { + downloadFunc = self.downloaders[type]; + } else { + console.warn("Download Error - No such download type found: ", type); + } + } + + if (downloadFunc) { + var list = this.generateExportList(range); + + downloadFunc.call(this.table, list, options || {}, buildLink); + } + }; + + Download.prototype.generateExportList = function (range) { + var list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, "download"); + + //assign group header formatter + var groupHeader = this.table.options.groupHeaderDownload; + + if (groupHeader && !Array.isArray(groupHeader)) { + groupHeader = [groupHeader]; + } + + list.forEach(function (row) { + var group; + + if (row.type === "group") { + group = row.columns[0]; + + if (groupHeader && groupHeader[row.indent]) { + group.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + }); + + return list; + }; + + Download.prototype.triggerDownload = function (data, mime, type, filename, newTab) { + var element = document.createElement('a'), + blob = new Blob([data], { type: mime }), + filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); + + blob = this.table.options.downloadReady.call(this.table, data, blob); + + if (blob) { + + if (newTab) { + window.open(window.URL.createObjectURL(blob)); + } else { + if (navigator.msSaveOrOpenBlob) { + navigator.msSaveOrOpenBlob(blob, filename); + } else { + element.setAttribute('href', window.URL.createObjectURL(blob)); + + //set file title + element.setAttribute('download', filename); + + //trigger download + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + + //remove temporary link element + document.body.removeChild(element); + } + } + + if (this.table.options.downloadComplete) { + this.table.options.downloadComplete(); + } + } + }; + + Download.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "intercept": + this.download(data.type, "", data.options, data.active, data.intercept); + break; + } + }; + + //downloaders + Download.prototype.downloaders = { + csv: function csv(list, options, setFileContents) { + var delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents = [], + headers = []; + + list.forEach(function (row) { + var item = []; + + switch (row.type) { + case "group": + console.warn("Download Warning - CSV downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - CSV downloader cannot process column calculations"); + break; + + case "header": + row.columns.forEach(function (col, i) { + if (col && col.depth === 1) { + headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; + } + }); + break; + + case "row": + row.columns.forEach(function (col) { + + if (col) { + + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + item.push('"' + String(col.value).split('"').join('""') + '"'); + } + }); + + fileContents.push(item.join(delimiter)); + break; + } + }); + + if (headers.length) { + fileContents.unshift(headers.join(delimiter)); + } + + fileContents = fileContents.join("\n"); + + if (options.bom) { + fileContents = '\uFEFF' + fileContents; + } + + setFileContents(fileContents, "text/csv"); + }, + + json: function json(list, options, setFileContents) { + var fileContents = []; + + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + break; + + case "group": + console.warn("Download Warning - JSON downloader cannot process row groups"); + break; + + case "calc": + console.warn("Download Warning - JSON downloader cannot process column calculations"); + break; + + case "row": + row.columns.forEach(function (col) { + if (col) { + item[col.component.getField()] = col.value; + } + }); + + fileContents.push(item); + break; + } + }); + + fileContents = JSON.stringify(fileContents, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf: function pdf(list, options, setFileContents) { + var header = [], + body = [], + autoTableParams = {}, + rowGroupStyles = options.rowGroupStyles || { + fontStyle: "bold", + fontSize: 12, + cellPadding: 6, + fillColor: 220 + }, + rowCalcStyles = options.rowCalcStyles || { + fontStyle: "bold", + fontSize: 10, + cellPadding: 4, + fillColor: 232 + }, + jsPDFParams = options.jsPDF || {}, + title = options && options.title ? options.title : ""; + + if (!jsPDFParams.orientation) { + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if (!jsPDFParams.unit) { + jsPDFParams.unit = "pt"; + } + + //parse row list + list.forEach(function (row) { + var item = {}; + + switch (row.type) { + case "header": + header.push(parseRow(row)); + break; + + case "group": + body.push(parseRow(row, rowGroupStyles)); + break; + + case "calc": + body.push(parseRow(row, rowCalcStyles)); + break; + + case "row": + body.push(parseRow(row)); + break; + } + }); + + function parseRow(row, styles) { + var rowData = []; + + row.columns.forEach(function (col) { + var cell; + + if (col) { + switch (_typeof(col.value)) { + case "object": + col.value = JSON.stringify(col.value); + break; + + case "undefined": + case "null": + col.value = ""; + break; + } + + cell = { + content: col.value, + colSpan: col.width, + rowSpan: col.height + }; + + if (styles) { + cell.styles = styles; + } + + rowData.push(cell); + } else { + rowData.push(""); + } + }); + + return rowData; + } + + //configure PDF + var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables + + if (options && options.autoTable) { + if (typeof options.autoTable === "function") { + autoTableParams = options.autoTable(doc) || {}; + } else { + autoTableParams = options.autoTable; + } + } + + if (title) { + autoTableParams.addPageContent = function (data) { + doc.text(title, 40, 30); + }; + } + + autoTableParams.head = header; + autoTableParams.body = body; + + doc.autoTable(autoTableParams); + + if (options && options.documentProcessing) { + options.documentProcessing(doc); + } + + setFileContents(doc.output("arraybuffer"), "application/pdf"); + }, + + xlsx: function xlsx(list, options, setFileContents) { + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = XLSX.utils.book_new(), + output; + + workbook.SheetNames = []; + workbook.Sheets = {}; + + function generateSheet() { + var rows = [], + merges = [], + worksheet = {}, + range = { s: { c: 0, r: 0 }, e: { c: list[0] ? list[0].columns.reduce(function (a, b) { + return a + (b && b.width ? b.width : 1); + }, 0) : 0, r: list.length } }; + + //parse row list + list.forEach(function (row, i) { + var rowData = []; + + row.columns.forEach(function (col, j) { + + if (col) { + rowData.push(!(col.value instanceof Date) && _typeof(col.value) === "object" ? JSON.stringify(col.value) : col.value); + + if (col.width > 1 || col.height > -1) { + merges.push({ s: { r: i, c: j }, e: { r: i + col.height - 1, c: j + col.width - 1 } }); + } + } else { + rowData.push(""); + } + }); + + rows.push(rowData); + }); + + //convert rows to worksheet + XLSX.utils.sheet_add_aoa(worksheet, rows); + + worksheet['!ref'] = XLSX.utils.encode_range(range); + + if (merges.length) { + worksheet["!merges"] = merges; + } + + return worksheet; + } + + if (options.sheetOnly) { + setFileContents(generateSheet()); + return; + } + + if (options.sheets) { + for (var sheet in options.sheets) { + + if (options.sheets[sheet] === true) { + workbook.SheetNames.push(sheet); + workbook.Sheets[sheet] = generateSheet(); + } else { + + workbook.SheetNames.push(sheet); + + this.modules.comms.send(options.sheets[sheet], "download", "intercept", { + type: "xlsx", + options: { sheetOnly: true }, + active: self.active, + intercept: function intercept(data) { + workbook.Sheets[sheet] = data; + } + }); + } + } + } else { + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + if (options.documentProcessing) { + workbook = options.documentProcessing(workbook); + } + + //convert workbook to binary array + function s2ab(s) { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i = 0; i != s.length; ++i) { + view[i] = s.charCodeAt(i) & 0xFF; + }return buf; + } + + output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); + + setFileContents(s2ab(output), "application/octet-stream"); + }, + + html: function html(list, options, setFileContents) { + if (this.modExists("export", true)) { + setFileContents(this.modules.export.genereateHTMLTable(list), "text/html"); + } + } + + }; + + Tabulator.prototype.registerModule("download", Download); + + var Edit = function Edit(table) { + this.table = table; //hold Tabulator object + this.currentCell = false; //hold currently editing cell + this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening + this.recursionBlock = false; //prevent focus recursion + this.invalidEdit = false; + this.editedCells = []; + }; + + //initialize column editor + Edit.prototype.initializeColumn = function (column) { + var self = this, + config = { + editor: false, + blocked: false, + check: column.definition.editable, + params: column.definition.editorParams || {} + }; + + //set column editor + switch (_typeof(column.definition.editor)) { + case "string": + + if (column.definition.editor === "tick") { + column.definition.editor = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.editor]) { + config.editor = self.editors[column.definition.editor]; + } else { + console.warn("Editor Error - No such editor found: ", column.definition.editor); + } + break; + + case "function": + config.editor = column.definition.editor; + break; + + case "boolean": + + if (column.definition.editor === true) { + + if (typeof column.definition.formatter !== "function") { + + if (column.definition.formatter === "tick") { + column.definition.formatter = "tickCross"; + console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); + } + + if (self.editors[column.definition.formatter]) { + config.editor = self.editors[column.definition.formatter]; + } else { + config.editor = self.editors["input"]; + } + } else { + console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); + } + } + break; + } + + if (config.editor) { + column.modules.edit = config; + } + }; + + Edit.prototype.getCurrentCell = function () { + return this.currentCell ? this.currentCell.getComponent() : false; + }; + + Edit.prototype.clearEditor = function (cancel) { + var cell = this.currentCell, + cellEl; + + this.invalidEdit = false; + + if (cell) { + this.currentCell = false; + + cellEl = cell.getElement(); + + if (cancel) { + cell.validate(); + } else { + cellEl.classList.remove("tabulator-validation-fail"); + } + + cellEl.classList.remove("tabulator-editing"); + while (cellEl.firstChild) { + cellEl.removeChild(cellEl.firstChild); + }cell.row.getElement().classList.remove("tabulator-row-editing"); + } + }; + + Edit.prototype.cancelEdit = function () { + + if (this.currentCell) { + var cell = this.currentCell; + var component = this.currentCell.getComponent(); + + this.clearEditor(true); + cell.setValueActual(cell.getValue()); + cell.cellRendered(); + + if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { + cell.row.normalizeHeight(true); + } + + if (cell.column.cellEvents.cellEditCancelled) { + cell.column.cellEvents.cellEditCancelled.call(this.table, component); + } + + this.table.options.cellEditCancelled.call(this.table, component); + } + }; + + //return a formatted value for a cell + Edit.prototype.bindEditor = function (cell) { + var self = this, + element = cell.getElement(true); + + element.setAttribute("tabindex", 0); + + element.addEventListener("click", function (e) { + if (!element.classList.contains("tabulator-editing")) { + element.focus({ preventScroll: true }); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.button === 2) { + e.preventDefault(); + } else { + self.mouseClick = true; + } + }); + + element.addEventListener("focus", function (e) { + if (!self.recursionBlock) { + self.edit(cell, e, false); + } + }); + }; + + Edit.prototype.focusCellNoEvent = function (cell, block) { + this.recursionBlock = true; + if (!(block && this.table.browser === "ie")) { + cell.getElement().focus({ preventScroll: true }); + } + this.recursionBlock = false; + }; + + Edit.prototype.editCell = function (cell, forceEdit) { + this.focusCellNoEvent(cell); + this.edit(cell, false, forceEdit); + }; + + Edit.prototype.focusScrollAdjust = function (cell) { + if (this.table.rowManager.getRenderMode() == "virtual") { + var topEdge = this.table.rowManager.element.scrollTop, + bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop, + rowEl = cell.row.getElement(), + offset = rowEl.offsetTop; + + if (rowEl.offsetTop < topEdge) { + this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop; + } else { + if (rowEl.offsetTop + rowEl.offsetHeight > bottomEdge) { + this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; + } + } + + var leftEdge = this.table.rowManager.element.scrollLeft, + rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, + cellEl = cell.getElement(), + offset = cellEl.offsetLeft; + + if (this.table.modExists("frozenColumns")) { + leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); + rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); + } + + if (cellEl.offsetLeft < leftEdge) { + this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; + } else { + if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { + this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; + } + } + } + }; + + Edit.prototype.edit = function (cell, e, forceEdit) { + var self = this, + allowEdit = true, + rendered = function rendered() {}, + element = cell.getElement(), + cellEditor, + component, + params; + + //prevent editing if another cell is refusing to leave focus (eg. validation fail) + if (this.currentCell) { + if (!this.invalidEdit) { + this.cancelEdit(); + } + return; + } + + //handle successfull value change + function success(value) { + if (self.currentCell === cell) { + var valid = true; + + if (cell.column.modules.validate && self.table.modExists("validate") && self.table.options.validationMode != "manual") { + valid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value); + } + + if (valid === true || self.table.options.validationMode === "highlight") { + self.clearEditor(); + + if (!cell.modules.edit) { + cell.modules.edit = {}; + } + + cell.modules.edit.edited = true; + + if (self.editedCells.indexOf(cell) == -1) { + self.editedCells.push(cell); + } + + cell.setValue(value, true); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + + if (valid !== true) { + element.classList.add("tabulator-validation-fail"); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + return false; + } + + return true; + } else { + self.invalidEdit = true; + element.classList.add("tabulator-validation-fail"); + self.focusCellNoEvent(cell, true); + rendered(); + self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); + + return false; + } + } else { + // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); + } + } + + //handle aborted edit + function cancel() { + if (self.currentCell === cell) { + self.cancelEdit(); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + } else { + // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); + } + } + + function onRendered(callback) { + rendered = callback; + } + + if (!cell.column.modules.edit.blocked) { + if (e) { + e.stopPropagation(); + } + + switch (_typeof(cell.column.modules.edit.check)) { + case "function": + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + break; + + case "boolean": + allowEdit = cell.column.modules.edit.check; + break; + } + + if (allowEdit || forceEdit) { + + self.cancelEdit(); + + self.currentCell = cell; + + this.focusScrollAdjust(cell); + + component = cell.getComponent(); + + if (this.mouseClick) { + this.mouseClick = false; + + if (cell.column.cellEvents.cellClick) { + cell.column.cellEvents.cellClick.call(this.table, e, component); + } + } + + if (cell.column.cellEvents.cellEditing) { + cell.column.cellEvents.cellEditing.call(this.table, component); + } + + self.table.options.cellEditing.call(this.table, component); + + params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; + + cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); + + //if editor returned, add to DOM, if false, abort edit + if (cellEditor !== false) { + + if (cellEditor instanceof Node) { + element.classList.add("tabulator-editing"); + cell.row.getElement().classList.add("tabulator-row-editing"); + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.appendChild(cellEditor); + + //trigger onRendered Callback + rendered(); + + //prevent editing from triggering rowClick event + var children = element.children; + + for (var i = 0; i < children.length; i++) { + children[i].addEventListener("click", function (e) { + e.stopPropagation(); + }); + } + } else { + console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); + element.blur(); + return false; + } + } else { + element.blur(); + return false; + } + + return true; + } else { + this.mouseClick = false; + element.blur(); + return false; + } + } else { + this.mouseClick = false; + element.blur(); + return false; + } + }; + + Edit.prototype.maskInput = function (el, options) { + var mask = options.mask, + maskLetter = typeof options.maskLetterChar !== "undefined" ? options.maskLetterChar : "A", + maskNumber = typeof options.maskNumberChar !== "undefined" ? options.maskNumberChar : "9", + maskWildcard = typeof options.maskWildcardChar !== "undefined" ? options.maskWildcardChar : "*", + success = false; + + function fillSymbols(index) { + var symbol = mask[index]; + if (typeof symbol !== "undefined" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber) { + el.value = el.value + "" + symbol; + fillSymbols(index + 1); + } + } + + el.addEventListener("keydown", function (e) { + var index = el.value.length, + char = e.key; + + if (e.keyCode > 46) { + if (index >= mask.length) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } else { + switch (mask[index]) { + case maskLetter: + if (char.toUpperCase() == char.toLowerCase()) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskNumber: + if (isNaN(char)) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + break; + + case maskWildcard: + break; + + default: + if (char !== mask[index]) { + e.preventDefault(); + e.stopPropagation(); + success = false; + return false; + } + } + } + + success = true; + } + + return; + }); + + el.addEventListener("keyup", function (e) { + if (e.keyCode > 46) { + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } + } + }); + + if (!el.placeholder) { + el.placeholder = mask; + } + + if (options.maskAutoFill) { + fillSymbols(el.value.length); + } + }; + + Edit.prototype.getEditedCells = function () { + var output = []; + + this.editedCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; + }; + + Edit.prototype.clearEdited = function (cell) { + var editIndex; + + if (cell.modules.edit && cell.modules.edit.edited) { + cell.modules.edit.edited = false; + + if (cell.modules.validate) { + cell.modules.validate.invalid = false; + } + } + + editIndex = this.editedCells.indexOf(cell); + + if (editIndex > -1) { + this.editedCells.splice(editIndex, 1); + } + }; + + //default data editors + Edit.prototype.editors = { + + //input element + input: function input(cell, onRendered, success, cancel, editorParams) { + + //create and style input + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", editorParams.search ? "search" : "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof cellValue !== "undefined" ? cellValue : ""; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange(e) { + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + // case 9: + case 13: + onChange(e); + break; + + case 27: + cancel(); + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //resizable text area element + textarea: function textarea(cell, onRendered, success, cancel, editorParams) { + var self = this, + cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "hybrid", + value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""), + count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, + input = document.createElement("textarea"), + scrollHeight = 0; + + //create and style input + input.style.display = "block"; + input.style.padding = "2px"; + input.style.height = "100%"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.whiteSpace = "pre-wrap"; + input.style.resize = "none"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + input.scrollHeight; + input.style.height = input.scrollHeight + "px"; + cell.getRow().normalizeHeight(); + }); + + function onChange(e) { + + if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { + + if (success(input.value)) { + cellValue = input.value; //persist value if successfully validated incase editor is used as header filter + } + + setTimeout(function () { + cell.getRow().normalizeHeight(); + }, 300); + } else { + cancel(); + } + } + + //submit new value on blur or change + input.addEventListener("change", onChange); + input.addEventListener("blur", onChange); + + input.addEventListener("keyup", function () { + + input.style.height = ""; + + var heightNow = input.scrollHeight; + + input.style.height = heightNow + "px"; + + if (heightNow != scrollHeight) { + scrollHeight = heightNow; + cell.getRow().normalizeHeight(); + } + }); + + input.addEventListener("keydown", function (e) { + + switch (e.keyCode) { + case 27: + cancel(); + break; + + case 38: + //up arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + + break; + + case 40: + //down arrow + if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart !== input.value.length) { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + number: function number(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + input = document.createElement("input"); + + input.setAttribute("type", "number"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + var blurFunc = function blurFunc(e) { + onChange(); + }; + + onRendered(function () { + //submit new value on blur + input.removeEventListener("blur", blurFunc); + + input.focus({ preventScroll: true }); + input.style.height = "100%"; + + //submit new value on blur + input.addEventListener("blur", blurFunc); + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value !== cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + + case 38: //up arrow + case 40: + //down arrow + if (vertNav == "editor") { + e.stopImmediatePropagation(); + e.stopPropagation(); + } + break; + + case 35: + case 36: + e.stopPropagation(); + break; + } + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + return input; + }, + + //input element with type of number + range: function range(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + input = document.createElement("input"); + + input.setAttribute("type", "range"); + + if (typeof editorParams.max != "undefined") { + input.setAttribute("max", editorParams.max); + } + + if (typeof editorParams.min != "undefined") { + input.setAttribute("min", editorParams.min); + } + + if (typeof editorParams.step != "undefined") { + input.setAttribute("step", editorParams.step); + } + + //create and style input + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = cellValue; + + onRendered(function () { + input.focus({ preventScroll: true }); + input.style.height = "100%"; + }); + + function onChange() { + var value = input.value; + + if (!isNaN(value) && value !== "") { + value = Number(value); + } + + if (value != cellValue) { + if (success(value)) { + cellValue = value; //persist value if successfully validated incase editor is used as header filter + } + } else { + cancel(); + } + } + + //submit new value on blur + input.addEventListener("blur", function (e) { + onChange(); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + // case 9: + onChange(); + break; + + case 27: + cancel(); + break; + } + }); + + return input; + }, + + //select + select: function select(cell, onRendered, success, cancel, editorParams) { + var _this53 = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], + input = document.createElement("input"), + listEl = document.createElement("div"), + multiselect = editorParams.multiselect, + dataItems = [], + currentItem = {}, + displayItems = [], + currentItems = [], + blurable = true, + blockListShow = false, + searchWord = "", + searchWordTimeout = null; + + if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { + console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); + editorParams = { values: editorParams }; + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + } else { + console.warn("unable to find matching column to create select lookup list:", field); + } + + return Object.keys(output); + } + + function parseItems(inputValues, curentValues) { + var dataList = []; + var displayList = []; + + function processComplexListItem(item) { + var item = { + label: item.label, + value: item.value, + itemParams: item.itemParams, + elementAttributes: item.elementAttributes, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + + return item; + } + + if (typeof inputValues == "function") { + inputValues = inputValues(cell); + } + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + var item; + + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { + + if (value.options) { + item = { + label: value.label, + group: true, + itemParams: value.itemParams, + elementAttributes: value.elementAttributes, + element: false + }; + + displayList.push(item); + + value.options.forEach(function (item) { + processComplexListItem(item); + }); + } else { + processComplexListItem(value); + } + } else { + + item = { + label: value, + value: value, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + }); + } else { + for (var key in inputValues) { + var item = { + label: inputValues[key], + value: key, + element: false + }; + + // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + // setCurrentItem(item); + // } + + if (curentValues.indexOf(item.value) > -1) { + setItem(item); + } + + dataList.push(item); + displayList.push(item); + } + } + + if (editorParams.sortValuesList) { + dataList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + displayList.sort(function (a, b) { + return a.label < b.label ? -1 : a.label > b.label ? 1 : 0; + }); + + if (editorParams.sortValuesList !== "asc") { + dataList.reverse(); + displayList.reverse(); + } + } + + dataItems = dataList; + displayItems = displayList; + + fillList(); + } + + function fillList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }displayItems.forEach(function (item) { + + var el = item.element; + + if (!el) { + el = document.createElement("div"); + item.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label; + if (item.group) { + el.classList.add("tabulator-edit-select-list-group"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + } else { + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + + el.addEventListener("click", function () { + blockListShow = true; + + setTimeout(function () { + blockListShow = false; + }, 10); + + // setCurrentItem(item); + // chooseItem(); + if (multiselect) { + toggleItem(item); + input.focus(); + } else { + chooseItem(item); + } + }); + + // if(item === currentItem){ + // el.classList.add("active"); + // } + + if (currentItems.indexOf(item) > -1) { + el.classList.add("active"); + } + } + + if (item.elementAttributes && _typeof(item.elementAttributes) == "object") { + for (var key in item.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + el.setAttribute(key, input.getAttribute(key) + item.elementAttributes["+" + key]); + } else { + el.setAttribute(key, item.elementAttributes[key]); + } + } + } + el.addEventListener("mousedown", function () { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + } + + listEl.appendChild(el); + }); + } + + function setCurrentItem(item, active) { + + if (!multiselect && currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("focused"); + } + + currentItem = item; + + if (item.element) { + item.element.classList.add("focused"); + if (active) { + item.element.classList.add("active"); + } + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + // function chooseItem(){ + // hideList(); + + // if(initialValue !== currentItem.value){ + // initialValue = currentItem.value; + // success(currentItem.value); + // }else{ + // cancel(); + // } + // } + + function setItem(item) { + var index = currentItems.indexOf(item); + + if (index == -1) { + currentItems.push(item); + setCurrentItem(item, true); + } + + fillInput(); + } + + function unsetItem(index) { + var item = currentItems[index]; + + if (index > -1) { + currentItems.splice(index, 1); + if (item.element) { + item.element.classList.remove("active"); + } + } + } + + function toggleItem(item) { + if (!item) { + item = currentItem; + } + + var index = currentItems.indexOf(item); + + if (index > -1) { + unsetItem(index); + } else { + if (multiselect !== true && currentItems.length >= multiselect) { + unsetItem(0); + } + + setItem(item); + } + + fillInput(); + } + + function chooseItem(item) { + hideList(); + + if (!item) { + item = currentItem; + } + + if (item) { + input.value = item.label; + success(item.value); + } + + initialDisplayValue = input.value; + } + + function chooseItems(silent) { + if (!silent) { + hideList(); + } + + var output = []; + + currentItems.forEach(function (item) { + output.push(item.value); + }); + + initialDisplayValue = input.value; + + success(output); + } + + function fillInput() { + var output = []; + + currentItems.forEach(function (item) { + output.push(item.label); + }); + + input.value = output.join(", "); + + if (self.currentCell === false) { + chooseItems(true); + } + } + + function unsetItems() { + + var len = currentItems.length; + + for (var _i9 = 0; _i9 < len; _i9++) { + unsetItem(0); + } + } + + function cancelItem() { + hideList(); + cancel(); + } + + function showList() { + currentItems = []; + + if (!listEl.parentNode) { + if (editorParams.values === true) { + parseItems(getUniqueColumnValues(), initialDisplayValue); + } else if (typeof editorParams.values === "string") { + parseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue); + } else { + parseItems(editorParams.values || [], initialDisplayValue); + } + + var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + document.body.appendChild(listEl); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + function scrollTovalue(char) { + + clearTimeout(searchWordTimeout); + + var character = String.fromCharCode(event.keyCode).toLowerCase(); + searchWord += character.toLowerCase(); + + var match = dataItems.find(function (item) { + return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord); + }); + + if (match) { + setCurrentItem(match, !multiselect); + } + + searchWordTimeout = setTimeout(function () { + searchWord = ""; + }, 800); + } + + //style input + input.setAttribute("type", "text"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + input.style.cursor = "default"; + input.readOnly = this.currentCell != false; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = typeof initialValue !== "undefined" || initialValue === null ? initialValue : ""; + + // if(editorParams.values === true){ + // parseItems(getUniqueColumnValues(), initialValue); + // }else if(typeof editorParams.values === "string"){ + // parseItems(getUniqueColumnValues(editorParams.values), initialValue); + // }else{ + // parseItems(editorParams.values || [], initialValue); + // } + + input.addEventListener("search", function (e) { + if (!input.value) { + unsetItems(); + chooseItems(); + } + }); + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(dataItems[index - 1], !multiselect); + } + } + break; + + case 40: + //down arrow + index = dataItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < dataItems.length - 1) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < dataItems.length - 1) { + if (index == -1) { + setCurrentItem(dataItems[0], !multiselect); + } else { + setCurrentItem(dataItems[index + 1], !multiselect); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + break; + + case 13: + //enter + // chooseItem(); + + if (multiselect) { + toggleItem(); + } else { + chooseItem(); + } + + break; + + case 27: + //escape + cancelItem(); + break; + + case 9: + //tab + break; + + default: + if (self.currentCell === false) { + e.preventDefault(); + } + + if (e.keyCode >= 38 && e.keyCode <= 90) { + scrollTovalue(e.keyCode); + } + } + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + if (multiselect) { + chooseItems(); + } else { + cancelItem(); + } + } + }); + + input.addEventListener("focus", function (e) { + if (!blockListShow) { + showList(); + } + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + setTimeout(function () { + _this53.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + return input; + }, + + //autocomplete + autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { + var _this54 = this; + + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + vertNav = editorParams.verticalNavigation || "editor", + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : "", + input = document.createElement("input"), + listEl = document.createElement("div"), + allItems = [], + displayItems = [], + values = [], + currentItem = false, + blurable = true, + uniqueColumnValues = false; + + //style input + input.setAttribute("type", "search"); + + input.style.padding = "4px"; + input.style.width = "100%"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style list element + listEl.classList.add("tabulator-edit-select-list"); + + listEl.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + function genUniqueColumnValues() { + if (editorParams.values === true) { + uniqueColumnValues = getUniqueColumnValues(); + } else if (typeof editorParams.values === "string") { + uniqueColumnValues = getUniqueColumnValues(editorParams.values); + } + } + + function getUniqueColumnValues(field) { + var output = {}, + data = self.table.getData(), + column; + + if (field) { + column = self.table.columnManager.getColumnByField(field); + } else { + column = cell.getColumn()._getSelf(); + } + + if (column) { + data.forEach(function (row) { + var val = column.getFieldValue(row); + + if (val !== null && typeof val !== "undefined" && val !== "") { + output[val] = true; + } + }); + + if (editorParams.sortValuesList) { + if (editorParams.sortValuesList == "asc") { + output = Object.keys(output).sort(); + } else { + output = Object.keys(output).sort().reverse(); + } + } else { + output = Object.keys(output); + } + } else { + console.warn("unable to find matching column to create autocomplete lookup list:", field); + } + + return output; + } + + function filterList(term, intialLoad) { + var matches = [], + values, + items, + searchEl; + + //lookup base values list + if (uniqueColumnValues) { + values = uniqueColumnValues; + } else { + values = editorParams.values || []; + } + + if (editorParams.searchFunc) { + matches = editorParams.searchFunc(term, values); + + if (matches instanceof Promise) { + + addNotice(typeof editorParams.searchingPlaceholder !== "undefined" ? editorParams.searchingPlaceholder : "Searching..."); + + matches.then(function (result) { + fillListIfNotEmpty(parseItems(result), intialLoad); + }).catch(function (err) { + console.err("error in autocomplete search promise:", err); + }); + } else { + fillListIfNotEmpty(parseItems(matches), intialLoad); + } + } else { + items = parseItems(values); + + if (term === "") { + if (editorParams.showListOnEmpty) { + matches = items; + } + } else { + items.forEach(function (item) { + if (item.value !== null || typeof item.value !== "undefined") { + if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { + matches.push(item); + } + } + }); + } + + fillListIfNotEmpty(matches, intialLoad); + } + } + + function addNotice(notice) { + var searchEl = document.createElement("div"); + + clearList(); + + if (notice !== false) { + searchEl.classList.add("tabulator-edit-select-list-notice"); + searchEl.tabIndex = 0; + + if (notice instanceof Node) { + searchEl.appendChild(notice); + } else { + searchEl.innerHTML = notice; + } + + listEl.appendChild(searchEl); + } + } + + function parseItems(inputValues) { + var itemList = []; + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + + var item = {}; + + if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label; + item.value = value.value; + } else { + item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value; + item.value = value; + } + + itemList.push(item); + }); + } else { + for (var key in inputValues) { + var item = { + title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], + value: key + }; + + itemList.push(item); + } + } + + return itemList; + } + + function clearList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + } + } + + function fillListIfNotEmpty(items, intialLoad) { + if (items.length) { + fillList(items, intialLoad); + } else { + if (editorParams.emptyPlaceholder) { + addNotice(editorParams.emptyPlaceholder); + } + } + } + + function fillList(items, intialLoad) { + var current = false; + + clearList(); + + displayItems = items; + + displayItems.forEach(function (item) { + var el = item.element; + + if (!el) { + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.title; + + el.addEventListener("click", function (e) { + setCurrentItem(item); + chooseItem(); + }); + + el.addEventListener("mousedown", function (e) { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + + if (intialLoad && item.value == initialValue) { + input.value = item.title; + item.element.classList.add("active"); + current = true; + } + + if (item === currentItem) { + item.element.classList.add("active"); + current = true; + } + } + + listEl.appendChild(el); + }); + + if (!current) { + setCurrentItem(false); + } + } + + function chooseItem() { + hideList(); + + if (currentItem) { + if (initialValue !== currentItem.value) { + initialValue = currentItem.value; + input.value = currentItem.title; + success(currentItem.value); + } else { + cancel(); + } + } else { + if (editorParams.freetext) { + initialValue = input.value; + success(input.value); + } else { + if (editorParams.allowEmpty && input.value === "") { + initialValue = input.value; + success(input.value); + } else { + cancel(); + } + } + } + } + + function showList() { + if (!listEl.parentNode) { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }var offset = Tabulator.prototype.helpers.elOffset(cellEl); + + listEl.style.minWidth = cellEl.offsetWidth + "px"; + + listEl.style.top = offset.top + cellEl.offsetHeight + "px"; + listEl.style.left = offset.left + "px"; + document.body.appendChild(listEl); + } + } + + function setCurrentItem(item, showInputValue) { + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + currentItem = item; + + if (item && item.element) { + item.element.classList.add("active"); + } + + if (item && item.element && item.element.scrollIntoView) { + item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function cancelItem() { + hideList(); + cancel(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index) { + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index > 0) { + setCurrentItem(displayItems[index - 1]); + } else { + setCurrentItem(false); + } + } + break; + + case 40: + //down arrow + + index = displayItems.indexOf(currentItem); + + if (vertNav == "editor" || vertNav == "hybrid" && index < displayItems.length - 1) { + + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + if (index < displayItems.length - 1) { + if (index == -1) { + setCurrentItem(displayItems[0]); + } else { + setCurrentItem(displayItems[index + 1]); + } + } + } + break; + + case 37: //left arrow + case 39: + //right arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + // e.preventDefault(); + break; + + case 13: + //enter + chooseItem(); + break; + + case 27: + //escape + cancelItem(); + break; + + case 36: //home + case 35: + //end + //prevent table navigation while using input element + e.stopImmediatePropagation(); + break; + } + }); + + input.addEventListener("keyup", function (e) { + + switch (e.keyCode) { + case 38: //up arrow + case 37: //left arrow + case 39: //up arrow + case 40: //right arrow + case 13: //enter + case 27: + //escape + break; + + default: + filterList(input.value); + } + }); + + input.addEventListener("search", function (e) { + filterList(input.value); + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + chooseItem(); + } + }); + + input.addEventListener("focus", function (e) { + var value = initialDisplayValue; + genUniqueColumnValues(); + showList(); + input.value = value; + filterList(value, true); + }); + + onRendered(function () { + input.style.height = "100%"; + input.focus({ preventScroll: true }); + }); + + if (editorParams.mask) { + this.table.modules.edit.maskInput(input, editorParams); + } + + setTimeout(function () { + _this54.table.rowManager.element.addEventListener("scroll", cancelItem); + }, 10); + + genUniqueColumnValues(); + input.value = initialDisplayValue; + filterList(initialDisplayValue, true); + + return input; + }, + + //star rating + star: function star(cell, onRendered, success, cancel, editorParams) { + var self = this, + element = cell.getElement(), + value = cell.getValue(), + maxStars = element.getElementsByTagName("svg").length || 5, + size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, + stars = [], + starsHolder = document.createElement("div"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); + + //change star type + function starChange(val) { + stars.forEach(function (star, i) { + if (i < val) { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-active"); + } else { + star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); + } + + star.innerHTML = ''; + } else { + if (self.table.browser == "ie") { + star.setAttribute("class", "tabulator-star-inactive"); + } else { + star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); + } + + star.innerHTML = ''; + } + }); + } + + //build stars + function buildStar(i) { + + var starHolder = document.createElement("span"); + var nextStar = star.cloneNode(true); + + stars.push(nextStar); + + starHolder.addEventListener("mouseenter", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + starChange(i); + }); + + starHolder.addEventListener("mousemove", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + }); + + starHolder.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + success(i); + element.blur(); + }); + + starHolder.appendChild(nextStar); + starsHolder.appendChild(starHolder); + } + + //handle keyboard navigation value change + function changeValue(val) { + value = val; + starChange(val); + } + + //style cell + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + //style holding element + starsHolder.style.verticalAlign = "middle"; + starsHolder.style.display = "inline-block"; + starsHolder.style.padding = "4px"; + + //style star + star.setAttribute("width", size); + star.setAttribute("height", size); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + starsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + starsHolder.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //create correct number of stars + for (var i = 1; i <= maxStars; i++) { + buildStar(i); + } + + //ensure value does not exceed number of stars + value = Math.min(parseInt(value), maxStars); + + // set initial styling of stars + starChange(value); + + starsHolder.addEventListener("mousemove", function (e) { + starChange(0); + }); + + starsHolder.addEventListener("click", function (e) { + success(0); + }); + + element.addEventListener("blur", function (e) { + cancel(); + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + changeValue(value + 1); + break; + + case 37: + //left arrow + changeValue(value - 1); + break; + + case 13: + //enter + success(value); + break; + + case 27: + //escape + cancel(); + break; + } + }); + + return starsHolder; + }, + + //draggable progress bar + progress: function progress(cell, onRendered, success, cancel, editorParams) { + var element = cell.getElement(), + max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, + min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, + percent = (max - min) / 100, + value = cell.getValue() || 0, + handle = document.createElement("div"), + bar = document.createElement("div"), + mouseDrag, + mouseDragWidth; + + //set new value + function updateValue() { + var style = window.getComputedStyle(element, null); + + var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min; + success(calcVal); + element.setAttribute("aria-valuenow", calcVal); + element.setAttribute("aria-label", value); + } + + //style handle + handle.style.position = "absolute"; + handle.style.right = "0"; + handle.style.top = "0"; + handle.style.bottom = "0"; + handle.style.width = "5px"; + handle.classList.add("tabulator-progress-handle"); + + //style bar + bar.style.display = "inline-block"; + bar.style.position = "relative"; + // bar.style.top = "8px"; + // bar.style.bottom = "8px"; + // bar.style.left = "4px"; + // bar.style.marginRight = "4px"; + bar.style.height = "100%"; + bar.style.backgroundColor = "#488CE9"; + bar.style.maxWidth = "100%"; + bar.style.minWidth = "0%"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + bar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + bar.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + //style cell + element.style.padding = "4px 4px"; + + //make sure value is in range + value = Math.min(parseFloat(value), max); + value = Math.max(parseFloat(value), min); + + //workout percentage + value = Math.round((value - min) / percent); + // bar.style.right = value + "%"; + bar.style.width = value + "%"; + + element.setAttribute("aria-valuemin", min); + element.setAttribute("aria-valuemax", max); + + bar.appendChild(handle); + + handle.addEventListener("mousedown", function (e) { + mouseDrag = e.screenX; + mouseDragWidth = bar.offsetWidth; + }); + + handle.addEventListener("mouseover", function () { + handle.style.cursor = "ew-resize"; + }); + + element.addEventListener("mousemove", function (e) { + if (mouseDrag) { + bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; + } + }); + + element.addEventListener("mouseup", function (e) { + if (mouseDrag) { + e.stopPropagation(); + e.stopImmediatePropagation(); + + mouseDrag = false; + mouseDragWidth = false; + + updateValue(); + } + }); + + //allow key based navigation + element.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 39: + //right arrow + e.preventDefault(); + bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; + break; + + case 37: + //left arrow + e.preventDefault(); + bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; + break; + + case 9: //tab + case 13: + //enter + updateValue(); + break; + + case 27: + //escape + cancel(); + break; + + } + }); + + element.addEventListener("blur", function () { + cancel(); + }); + + return bar; + }, + + //checkbox + tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { + var value = cell.getValue(), + input = document.createElement("input"), + tristate = editorParams.tristate, + indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, + indetermState = false; + + input.setAttribute("type", "checkbox"); + input.style.marginTop = "5px"; + input.style.boxSizing = "border-box"; + + if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { + for (var key in editorParams.elementAttributes) { + if (key.charAt(0) == "+") { + key = key.slice(1); + input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); + } else { + input.setAttribute(key, editorParams.elementAttributes[key]); + } + } + } + + input.value = value; + + if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { + indetermState = true; + input.indeterminate = true; + } + + if (this.table.browser != "firefox") { + //prevent blur issue on mac firefox + onRendered(function () { + input.focus({ preventScroll: true }); + }); + } + + input.checked = value === true || value === "true" || value === "True" || value === 1; + + onRendered(function () { + input.focus(); + }); + + function setValue(blur) { + if (tristate) { + if (!blur) { + if (input.checked && !indetermState) { + input.checked = false; + input.indeterminate = true; + indetermState = true; + return indetermValue; + } else { + indetermState = false; + return input.checked; + } + } else { + if (indetermState) { + return indetermValue; + } else { + return input.checked; + } + } + } else { + return input.checked; + } + } + + //submit new value on blur + input.addEventListener("change", function (e) { + success(setValue()); + }); + + input.addEventListener("blur", function (e) { + success(setValue(true)); + }); + + //submit new value on enter + input.addEventListener("keydown", function (e) { + if (e.keyCode == 13) { + success(setValue()); + } + if (e.keyCode == 27) { + cancel(); + } + }); + + return input; + } + }; + + Tabulator.prototype.registerModule("edit", Edit); + + var ExportRow = function ExportRow(type, columns, component, indent) { + this.type = type; + this.columns = columns; + this.component = component || false; + this.indent = indent || 0; + }; + + var ExportColumn = function ExportColumn(value, component, width, height, depth) { + this.value = value; + this.component = component || false; + this.width = width; + this.height = height; + this.depth = depth; + }; + + var Export = function Export(table) { + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; + }; + + Export.prototype.generateExportList = function (config, style, range, colVisProp) { + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : []; + var body = this.bodyToExportRows(this.rowLookup(range)); + + return headers.concat(body); + }; + + Export.prototype.genereateTable = function (config, style, range, colVisProp) { + var list = this.generateExportList(config, style, range, colVisProp); + + return this.genereateTableElement(list); + }; + + Export.prototype.rowLookup = function (range) { + var _this55 = this; + + var rows = []; + + if (typeof range == "function") { + range.call(this.table).forEach(function (row) { + row = _this55.table.rowManager.findRow(row); + + if (row) { + rows.push(row); + } + }); + } else { + switch (range) { + case true: + case "visible": + rows = this.table.rowManager.getVisibleRows(true); + break; + + case "all": + rows = this.table.rowManager.rows; + break; + + case "selected": + rows = this.table.modules.selectRow.selectedRows; + break; + + case "active": + default: + if (this.table.options.pagination) { + rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); + } else { + rows = this.table.rowManager.getDisplayRows(); + } + } + } + + return Object.assign([], rows); + }; + + Export.prototype.generateColumnGroupHeaders = function () { + var _this56 = this; + + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach(function (column) { + var colData = _this56.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; + }; + + Export.prototype.processColumnGroup = function (column) { + var _this57 = this; + + var subGroups = column.columns, + maxDepth = 0, + title = column.definition["title" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title; + + var groupData = { + title: title, + column: column, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this57.processColumnGroup(subGroup); + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + + if (subGroupData.depth > maxDepth) { + maxDepth = subGroupData.depth; + } + } + }); + + groupData.depth += maxDepth; + + if (!groupData.width) { + return false; + } + } else { + if (this.columnVisCheck(column)) { + groupData.width = 1; + } else { + return false; + } + } + + return groupData; + }; + + Export.prototype.columnVisCheck = function (column) { + return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); + }; + + Export.prototype.headersToExportRows = function (columns) { + var headers = [], + headerDepth = 0, + exportRows = []; + + function parseColumnGroup(column, level) { + + var depth = headerDepth - level; + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + column.height = column.subGroups ? 1 : depth - column.depth + 1; + + headers[level].push(column); + + if (column.height > 1) { + for (var _i10 = 1; _i10 < column.height; _i10++) { + + if (typeof headers[level + _i10] === "undefined") { + headers[level + _i10] = []; + } + + headers[level + _i10].push(false); + } + } + + if (column.width > 1) { + for (var _i11 = 1; _i11 < column.width; _i11++) { + headers[level].push(false); + } + } + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } + } + + //calculate maximum header debth + columns.forEach(function (column) { + if (column.depth > headerDepth) { + headerDepth = column.depth; + } + }); + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + headers.forEach(function (header) { + var columns = []; + + header.forEach(function (col) { + if (col) { + columns.push(new ExportColumn(col.title, col.column.getComponent(), col.width, col.height, col.depth)); + } else { + columns.push(null); + } + }); + + exportRows.push(new ExportRow("header", columns)); + }); + + return exportRows; + }; + + Export.prototype.bodyToExportRows = function (rows) { + var _this58 = this; + + var columns = []; + var exportRows = []; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (_this58.columnVisCheck(column)) { + columns.push(column.getComponent()); + } + }); + + if (this.config.columnCalcs !== false && this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized) { + rows.unshift(this.table.modules.columnCalcs.topRow); + } + + if (this.table.modules.columnCalcs.botInitialized) { + rows.push(this.table.modules.columnCalcs.botRow); + } + } + + rows = rows.filter(function (row) { + switch (row.type) { + case "group": + return _this58.config.rowGroups !== false; + break; + + case "calc": + return _this58.config.columnCalcs !== false; + break; + + case "row": + return !(_this58.table.options.dataTree && _this58.config.dataTree === false && row.modules.dataTree.parent); + break; + } + + return true; + }); + + rows.forEach(function (row, i) { + var rowData = row.getData(_this58.colVisProp); + var exportCols = []; + var indent = 0; + + switch (row.type) { + case "group": + indent = row.level; + exportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1)); + break; + + case "calc": + case "row": + columns.forEach(function (col) { + exportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1)); + }); + + if (_this58.table.options.dataTree && _this58.config.dataTree !== false) { + indent = row.modules.dataTree.index; + } + break; + } + + exportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent)); + }); + + return exportRows; + }; + + Export.prototype.genereateTableElement = function (list) { + var _this59 = this; + + var table = document.createElement("table"), + headerEl = document.createElement("thead"), + bodyEl = document.createElement("tbody"), + styles = this.lookupTableStyles(), + rowFormatter = this.table.options["rowFormatter" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], + setup = {}; + + setup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter; + + if (this.table.options.dataTree && this.config.dataTree !== false && this.table.modExists("columnCalcs")) { + setup.treeElementField = this.table.modules.dataTree.elementField; + } + + //assign group header formatter + setup.groupHeader = this.table.options["groupHeader" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))]; + + if (setup.groupHeader && !Array.isArray(setup.groupHeader)) { + setup.groupHeader = [setup.groupHeader]; + } + + table.classList.add("tabulator-print-table"); + + this.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + if (list.length > 1000) { + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + list.forEach(function (row, i) { + switch (row.type) { + case "header": + headerEl.appendChild(_this59.genereateHeaderElement(row, setup, styles)); + break; + + case "group": + bodyEl.appendChild(_this59.genereateGroupElement(row, setup, styles)); + break; + + case "calc": + bodyEl.appendChild(_this59.genereateCalcElement(row, setup, styles)); + break; + + case "row": + var rowEl = _this59.genereateRowElement(row, setup, styles); + _this59.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + bodyEl.appendChild(rowEl); + break; + } + }); + + if (headerEl.innerHTML) { + table.appendChild(headerEl); + } + + table.appendChild(bodyEl); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + return table; + }; + + Export.prototype.lookupTableStyles = function () { + var styles = {}; + + //lookup row styles + if (this.cloneTableStyle && window.getComputedStyle) { + styles.oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + styles.evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + styles.calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + styles.firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + styles.firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (styles.firstRow) { + styles.styleCells = styles.firstRow.getElementsByClassName("tabulator-cell"); + styles.firstCell = styles.styleCells[0]; + styles.lastCell = styles.styleCells[styles.styleCells.length - 1]; + } + } + + return styles; + }; + + Export.prototype.genereateHeaderElement = function (row, setup, styles) { + var _this60 = this; + + var rowEl = document.createElement("tr"); + + row.columns.forEach(function (column) { + if (column) { + var cellEl = document.createElement("th"); + var classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(" ") : []; + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.value; + + if (_this60.cloneTableStyle) { + cellEl.style.boxSizing = "border-box"; + } + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + _this60.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this60.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if (column.component._column.visible) { + _this60.mapElementStyles(column.component.getElement(), cellEl, ["width"]); + } else { + if (column.component._column.definition.width) { + cellEl.style.width = column.component._column.definition.width + "px"; + } + } + + if (column.component._column.parent) { + _this60.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + } + }); + + return rowEl; + }; + + Export.prototype.genereateGroupElement = function (row, setup, styles) { + + var rowEl = document.createElement("tr"), + cellEl = document.createElement("td"), + group = row.columns[0]; + + rowEl.classList.add("tabulator-print-table-row"); + + if (setup.groupHeader && setup.groupHeader[row.indent]) { + group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } else { + if (setup.groupHeader === false) { + group.value = group.value; + } else { + group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); + } + } + + cellEl.colSpan = group.width; + cellEl.innerHTML = group.value; + + rowEl.classList.add("tabulator-print-table-group"); + rowEl.classList.add("tabulator-group-level-" + row.indent); + + if (group.component.isVisible()) { + rowEl.classList.add("tabulator-group-visible"); + } + + this.mapElementStyles(styles.firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + this.mapElementStyles(styles.firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + rowEl.appendChild(cellEl); + + return rowEl; + }; + + Export.prototype.genereateCalcElement = function (row, setup, styles) { + var rowEl = this.genereateRowElement(row, setup, styles); + + rowEl.classList.add("tabulator-print-table-calcs"); + this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + return rowEl; + }; + + Export.prototype.genereateRowElement = function (row, setup, styles) { + var _this61 = this; + + var rowEl = document.createElement("tr"); + + rowEl.classList.add("tabulator-print-table-row"); + + row.columns.forEach(function (col) { + + if (col) { + var cellEl = document.createElement("td"), + column = col.component._column, + value = col.value; + + var cellWrapper = { + modules: {}, + getValue: function getValue() { + return value; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return cellEl; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getData: function getData() { + return row.component.getData(); + }, + getRow: function getRow() { + return row.component; + }, + getComponent: function getComponent() { + return cellWrapper; + }, + column: column + }; + + var classNames = column.definition.cssClass ? column.definition.cssClass.split(" ") : []; + + classNames.forEach(function (className) { + cellEl.classList.add(className); + }); + + if (_this61.table.modExists("format") && _this61.config.formatCells !== false) { + value = _this61.table.modules.format.formatExportValue(cellWrapper, _this61.colVisProp); + } else { + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + } + + if (value instanceof Node) { + cellEl.appendChild(value); + } else { + cellEl.innerHTML = value; + } + + if (styles.firstCell) { + _this61.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + + if (column.definition.align) { + cellEl.style.textAlign = column.definition.align; + } + } + + if (_this61.table.options.dataTree && _this61.config.dataTree !== false) { + if (setup.treeElementField && setup.treeElementField == column.field || !setup.treeElementField && i == 0) { + if (row.component._row.modules.dataTree.controlEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild); + } + if (row.component._row.modules.dataTree.branchEl) { + cellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild); + } + } + } + + rowEl.appendChild(cellEl); + + if (cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback) { + cellWrapper.modules.format.renderedCallback(); + } + + if (setup.rowFormatter && _this61.config.formatCells !== false) { + setup.rowFormatter(row.component); + } + } + }); + + return rowEl; + }; + + Export.prototype.genereateHTMLTable = function (list) { + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTableElement(list)); + + return holder.innerHTML; + }; + + Export.prototype.getHtml = function (visible, style, config, colVisProp) { + var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput"); + + return this.genereateHTMLTable(list); + }; + + Export.prototype.mapElementStyles = function (from, to, props) { + if (this.cloneTableStyle && from && to) { + + var lookup = { + "background-color": "backgroundColor", + "color": "fontColor", + "width": "width", + "font-weight": "fontWeight", + "font-family": "fontFamily", + "font-size": "fontSize", + "text-align": "textAlign", + "border-top": "borderTop", + "border-left": "borderLeft", + "border-right": "borderRight", + "border-bottom": "borderBottom", + "padding-top": "paddingTop", + "padding-left": "paddingLeft", + "padding-right": "paddingRight", + "padding-bottom": "paddingBottom" + }; + + if (window.getComputedStyle) { + var fromStyle = window.getComputedStyle(from); + + props.forEach(function (prop) { + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + } + }; + + Tabulator.prototype.registerModule("export", Export); + + var Filter = function Filter(table) { + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterColumns = []; //hold columns that use header filters + + this.prevHeaderFilterChangeCheck = ""; + this.prevHeaderFilterChangeCheck = "{}"; + + this.changed = false; //has filtering changed since last render + }; + + //initialize column header filter + Filter.prototype.initializeColumn = function (column, value) { + var self = this, + field = column.getField(), + params; + + //handle successfull value change + function success(value) { + var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", + type = "", + filterChangeCheck = "", + filterFunc; + + if (typeof column.modules.filter.prevSuccess === "undefined" || column.modules.filter.prevSuccess !== value) { + + column.modules.filter.prevSuccess = value; + + if (!column.modules.filter.emptyFunc(value)) { + column.modules.filter.value = value; + + switch (_typeof(column.definition.headerFilterFunc)) { + case "string": + if (self.filters[column.definition.headerFilterFunc]) { + type = column.definition.headerFilterFunc; + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return self.filters[column.definition.headerFilterFunc](value, fieldVal, data, params); + }; + } else { + console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); + } + break; + + case "function": + filterFunc = function filterFunc(data) { + var params = column.definition.headerFilterFuncParams || {}; + var fieldVal = column.getFieldValue(data); + + params = typeof params === "function" ? params(value, fieldVal, data) : params; + + return column.definition.headerFilterFunc(value, fieldVal, data, params); + }; + + type = filterFunc; + break; + } + + if (!filterFunc) { + switch (filterType) { + case "partial": + filterFunc = function filterFunc(data) { + var colVal = column.getFieldValue(data); + + if (typeof colVal !== 'undefined' && colVal !== null) { + return String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1; + } else { + return false; + } + }; + type = "like"; + break; + + default: + filterFunc = function filterFunc(data) { + return column.getFieldValue(data) == value; + }; + type = "="; + } + } + + self.headerFilters[field] = { value: value, func: filterFunc, type: type, params: params || {} }; + } else { + delete self.headerFilters[field]; + } + + filterChangeCheck = JSON.stringify(self.headerFilters); + + if (self.prevHeaderFilterChangeCheck !== filterChangeCheck) { + self.prevHeaderFilterChangeCheck = filterChangeCheck; + + self.changed = true; + self.table.rowManager.filterRefresh(); + } + } + + return true; + } + + column.modules.filter = { + success: success, + attrType: false, + tagType: false, + emptyFunc: false + }; + + this.generateHeaderFilterElement(column); + }; + + Filter.prototype.generateHeaderFilterElement = function (column, initialValue, reinitialize) { + var _this62 = this; + + var self = this, + success = column.modules.filter.success, + field = column.getField(), + filterElement, + editor, + editorElement, + cellWrapper, + typingTimer, + searchTrigger, + params; + + //handle aborted edit + function cancel() {} + + if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { + column.contentElement.removeChild(column.modules.filter.headerElement.parentNode); + } + + if (field) { + + //set empty value function + column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { + return !value && value !== "0"; + }; + + filterElement = document.createElement("div"); + filterElement.classList.add("tabulator-header-filter"); + + //set column editor + switch (_typeof(column.definition.headerFilter)) { + case "string": + if (self.table.modules.edit.editors[column.definition.headerFilter]) { + editor = self.table.modules.edit.editors[column.definition.headerFilter]; + + if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); + } + break; + + case "function": + editor = column.definition.headerFilter; + break; + + case "boolean": + if (column.modules.edit && column.modules.edit.editor) { + editor = column.modules.edit.editor; + } else { + if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { + editor = self.table.modules.edit.editors[column.definition.formatter]; + + if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { + column.modules.filter.emptyFunc = function (value) { + return value !== true && value !== false; + }; + } + } else { + editor = self.table.modules.edit.editors["input"]; + } + } + break; + } + + if (editor) { + + cellWrapper = { + getValue: function getValue() { + return typeof initialValue !== "undefined" ? initialValue : ""; + }, + getField: function getField() { + return column.definition.field; + }, + getElement: function getElement() { + return filterElement; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getRow: function getRow() { + return { + normalizeHeight: function normalizeHeight() {} + }; + } + }; + + params = column.definition.headerFilterParams || {}; + + params = typeof params === "function" ? params.call(self.table) : params; + + editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); + + if (!editorElement) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); + return; + } + + if (!(editorElement instanceof Node)) { + console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); + return; + } + + //set Placeholder Text + if (field) { + self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { + editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); + }); + } else { + self.table.modules.localize.bind("headerFilters|default", function (value) { + editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); + }); + } + + //focus on element on click + editorElement.addEventListener("click", function (e) { + e.stopPropagation(); + editorElement.focus(); + }); + + editorElement.addEventListener("focus", function (e) { + var left = _this62.table.columnManager.element.scrollLeft; + + if (left !== _this62.table.rowManager.element.scrollLeft) { + _this62.table.rowManager.scrollHorizontal(left); + _this62.table.columnManager.scrollHorizontal(left); + } + }); + + //live update filters as user types + typingTimer = false; + + searchTrigger = function searchTrigger(e) { + if (typingTimer) { + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function () { + success(editorElement.value); + }, self.table.options.headerFilterLiveFilterDelay); + }; + + column.modules.filter.headerElement = editorElement; + column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; + column.modules.filter.tagType = editorElement.tagName.toLowerCase(); + + if (column.definition.headerFilterLiveFilter !== false) { + + if (!(column.definition.headerFilter === 'autocomplete' || column.definition.headerFilter === 'tickCross' || (column.definition.editor === 'autocomplete' || column.definition.editor === 'tickCross') && column.definition.headerFilter === true)) { + editorElement.addEventListener("keyup", searchTrigger); + editorElement.addEventListener("search", searchTrigger); + + //update number filtered columns on change + if (column.modules.filter.attrType == "number") { + editorElement.addEventListener("change", function (e) { + success(editorElement.value); + }); + } + + //change text inputs to search inputs to allow for clearing of field + if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { + editorElement.setAttribute("type", "search"); + // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click + } + } + + //prevent input and select elements from propegating click to column sorters etc + if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { + editorElement.addEventListener("mousedown", function (e) { + e.stopPropagation(); + }); + } + } + + filterElement.appendChild(editorElement); + + column.contentElement.appendChild(filterElement); + + if (!reinitialize) { + self.headerFilterColumns.push(column); + } + } + } else { + console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); + } + }; + + //hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) + Filter.prototype.hideHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = 'none'; + } + }); + }; + + //show all header filter elements (used to ensure correct column widths in "fitData" layout mode) + Filter.prototype.showHeaderFilterElements = function () { + this.headerFilterColumns.forEach(function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.style.display = ''; + } + }); + }; + + //programatically set focus of header filter + Filter.prototype.setHeaderFilterFocus = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + column.modules.filter.headerElement.focus(); + } else { + console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); + } + }; + + //programmatically get value of header filter + Filter.prototype.getHeaderFilterValue = function (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + return column.modules.filter.headerElement.value; + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + }; + + //programatically set value of header filter + Filter.prototype.setHeaderFilterValue = function (column, value) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, value, true); + column.modules.filter.success(value); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } + }; + + Filter.prototype.reloadHeaderFilter = function (column) { + if (column) { + if (column.modules.filter && column.modules.filter.headerElement) { + this.generateHeaderFilterElement(column, column.modules.filter.value, true); + } else { + console.warn("Column Filter Error - No header filter set on column:", column.getField()); + } + } + }; + + //check if the filters has changed since last use + Filter.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; + }; + + //set standard filters + Filter.prototype.setFilter = function (field, type, value, params) { + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + self.addFilter(field); + }; + + //add filter to array + Filter.prototype.addFilter = function (field, type, value, params) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value, params: params }]; + } + + field.forEach(function (filter) { + + filter = self.findFilter(filter); + + if (filter) { + self.filterList.push(filter); + + self.changed = true; + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } + }; + + Filter.prototype.findFilter = function (filter) { + var self = this, + column; + + if (Array.isArray(filter)) { + return this.findSubFilters(filter); + } + + var filterFunc = false; + + if (typeof filter.field == "function") { + filterFunc = function filterFunc(data) { + return filter.field(data, filter.type || {}); // pass params to custom filter function + }; + } else { + + if (self.filters[filter.type]) { + + column = self.table.columnManager.getColumnByField(filter.field); + + if (column) { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {}); + }; + } else { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, data[filter.field], data, filter.params || {}); + }; + } + } else { + console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); + } + } + + filter.func = filterFunc; + + return filter.func ? filter : false; + }; + + Filter.prototype.findSubFilters = function (filters) { + var self = this, + output = []; + + filters.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + output.push(filter); + } + }); + + return output.length ? output : false; + }; + + //get all filters + Filter.prototype.getFilters = function (all, ajax) { + var output = []; + + if (all) { + output = this.getHeaderFilters(); + } + + if (ajax) { + output.forEach(function (item) { + if (typeof item.type == "function") { + item.type = "function"; + } + }); + } + + output = output.concat(this.filtersToArray(this.filterList, ajax)); + + return output; + }; + + //filter to Object + Filter.prototype.filtersToArray = function (filterList, ajax) { + var _this63 = this; + + var output = []; + + filterList.forEach(function (filter) { + var item; + + if (Array.isArray(filter)) { + output.push(_this63.filtersToArray(filter, ajax)); + } else { + item = { field: filter.field, type: filter.type, value: filter.value }; + + if (ajax) { + if (typeof item.type == "function") { + item.type = "function"; + } + } + + output.push(item); + } + }); + + return output; + }; + + //get all filters + Filter.prototype.getHeaderFilters = function () { + var self = this, + output = []; + + for (var key in this.headerFilters) { + output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); + } + + return output; + }; + + //remove filter from array + Filter.prototype.removeFilter = function (field, type, value) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + var index = -1; + + if (_typeof(filter.field) == "object") { + index = self.filterList.findIndex(function (element) { + return filter === element; + }); + } else { + index = self.filterList.findIndex(function (element) { + return filter.field === element.field && filter.type === element.type && filter.value === element.value; + }); + } + + if (index > -1) { + self.filterList.splice(index, 1); + self.changed = true; + } else { + console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); + } + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } + }; + + //clear filters + Filter.prototype.clearFilter = function (all) { + this.filterList = []; + + if (all) { + this.clearHeaderFilter(); + } + + this.changed = true; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { + this.table.modules.persistence.save("filter"); + } + }; + + //clear header filters + Filter.prototype.clearHeaderFilter = function () { + var self = this; + + this.headerFilters = {}; + self.prevHeaderFilterChangeCheck = "{}"; + + this.headerFilterColumns.forEach(function (column) { + column.modules.filter.value = null; + column.modules.filter.prevSuccess = undefined; + self.reloadHeaderFilter(column); + }); + + this.changed = true; + }; + + //search data and return matching rows + Filter.prototype.search = function (searchType, field, type, value) { + var self = this, + activeRows = [], + filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + filter = self.findFilter(filter); + + if (filter) { + filterList.push(filter); + } + }); + + this.table.rowManager.rows.forEach(function (row) { + var match = true; + + filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, row.getData())) { + match = false; + } + }); + + if (match) { + activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); + } + }); + + return activeRows; + }; + + //filter row array + Filter.prototype.filter = function (rowList, filters) { + var self = this, + activeRows = [], + activeRowComponents = []; + + if (self.table.options.dataFiltering) { + self.table.options.dataFiltering.call(self.table, self.getFilters()); + } + + if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { + + rowList.forEach(function (row) { + if (self.filterRow(row)) { + activeRows.push(row); + } + }); + } else { + activeRows = rowList.slice(0); + } + + if (self.table.options.dataFiltered) { + + activeRows.forEach(function (row) { + activeRowComponents.push(row.getComponent()); + }); + + self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); + } + + return activeRows; + }; + + //filter individual row + Filter.prototype.filterRow = function (row, filters) { + var self = this, + match = true, + data = row.getData(); + + self.filterList.forEach(function (filter) { + if (!self.filterRecurse(filter, data)) { + match = false; + } + }); + + for (var field in self.headerFilters) { + if (!self.headerFilters[field].func(data)) { + match = false; + } + } + + return match; + }; + + Filter.prototype.filterRecurse = function (filter, data) { + var self = this, + match = false; + + if (Array.isArray(filter)) { + filter.forEach(function (subFilter) { + if (self.filterRecurse(subFilter, data)) { + match = true; + } + }); + } else { + match = filter.func(data); + } + + return match; + }; + + //list of available filters + Filter.prototype.filters = { + + //equal to + "=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal == filterVal ? true : false; + }, + + //less than + "<": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal < filterVal ? true : false; + }, + + //less than or equal to + "<=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal <= filterVal ? true : false; + }, + + //greater than + ">": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal > filterVal ? true : false; + }, + + //greater than or equal to + ">=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal >= filterVal ? true : false; + }, + + //not equal to + "!=": function _(filterVal, rowVal, rowData, filterParams) { + return rowVal != filterVal ? true : false; + }, + + "regex": function regex(filterVal, rowVal, rowData, filterParams) { + + if (typeof filterVal == "string") { + filterVal = new RegExp(filterVal); + } + + return filterVal.test(rowVal); + }, + + //contains the string + "like": function like(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1; + } else { + return false; + } + } + }, + + //contains the keywords + "keywords": function keywords(filterVal, rowVal, rowData, filterParams) { + var keywords = filterVal.toLowerCase().split(typeof filterParams.separator === "undefined" ? " " : filterParams.separator), + value = String(rowVal === null || typeof rowVal === "undefined" ? "" : rowVal).toLowerCase(), + matches = []; + + keywords.forEach(function (keyword) { + if (value.includes(keyword)) { + matches.push(true); + } + }); + + return filterParams.matchAll ? matches.length === keywords.length : !!matches.length; + }, + + //starts with the string + "starts": function starts(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //ends with the string + "ends": function ends(filterVal, rowVal, rowData, filterParams) { + if (filterVal === null || typeof filterVal === "undefined") { + return rowVal === filterVal ? true : false; + } else { + if (typeof rowVal !== 'undefined' && rowVal !== null) { + return String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase()); + } else { + return false; + } + } + }, + + //in array + "in": function _in(filterVal, rowVal, rowData, filterParams) { + if (Array.isArray(filterVal)) { + return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; + } else { + console.warn("Filter Error - filter value is not an array:", filterVal); + return false; + } + } + }; + + Tabulator.prototype.registerModule("filter", Filter); + + var Format = function Format(table) { + this.table = table; //hold Tabulator object + }; + + //initialize column formatter + Format.prototype.initializeColumn = function (column) { + column.modules.format = this.lookupFormatter(column, ""); + + if (typeof column.definition.formatterPrint !== "undefined") { + column.modules.format.print = this.lookupFormatter(column, "Print"); + } + + if (typeof column.definition.formatterClipboard !== "undefined") { + column.modules.format.clipboard = this.lookupFormatter(column, "Clipboard"); + } + + if (typeof column.definition.formatterHtmlOutput !== "undefined") { + column.modules.format.htmlOutput = this.lookupFormatter(column, "HtmlOutput"); + } + }; + + Format.prototype.lookupFormatter = function (column, type) { + var config = { params: column.definition["formatter" + type + "Params"] || {} }, + formatter = column.definition["formatter" + type]; + + //set column formatter + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + case "string": + + if (formatter === "tick") { + formatter = "tickCross"; + + if (typeof config.params.crossElement == "undefined") { + config.params.crossElement = false; + } + + console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false"); + } + + if (this.formatters[formatter]) { + config.formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + config.formatter = this.formatters.plaintext; + } + break; + + case "function": + config.formatter = formatter; + break; + + default: + config.formatter = this.formatters.plaintext; + break; + } + + return config; + }; + + Format.prototype.cellRendered = function (cell) { + if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { + cell.modules.format.renderedCallback(); + cell.modules.format.rendered = true; + } + }; + + //return a formatted value for a cell + Format.prototype.formatValue = function (cell) { + var component = cell.getComponent(), + params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; + + function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); + }; + + Format.prototype.formatExportValue = function (cell, type) { + var formatter = cell.column.modules.format[type], + params; + + if (formatter) { + var onRendered = function onRendered(callback) { + if (!cell.modules.format) { + cell.modules.format = {}; + } + + cell.modules.format.renderedCallback = callback; + cell.modules.format.rendered = false; + }; + + params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; + + return formatter.formatter.call(this, cell.getComponent(), params, onRendered); + } else { + return this.formatValue(cell); + } + }; + + Format.prototype.sanitizeHTML = function (value) { + if (value) { + var entityMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + '`': '`', + '=': '=' + }; + + return String(value).replace(/[&<>"'`=\/]/g, function (s) { + return entityMap[s]; + }); + } else { + return value; + } + }; + + Format.prototype.emptyToSpace = function (value) { + return value === null || typeof value === "undefined" || value === "" ? " " : value; + }; + + //get formatter for cell + Format.prototype.getFormatter = function (formatter) { + var formatter; + + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + case "string": + if (this.formatters[formatter]) { + formatter = this.formatters[formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", formatter); + formatter = this.formatters.plaintext; + } + break; + + case "function": + formatter = formatter; + break; + + default: + formatter = this.formatters.plaintext; + break; + } + + return formatter; + }; + + //default data formatters + Format.prototype.formatters = { + //plain text value + plaintext: function plaintext(cell, formatterParams, onRendered) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + html: function html(cell, formatterParams, onRendered) { + return cell.getValue(); + }, + + //multiline text area + textarea: function textarea(cell, formatterParams, onRendered) { + cell.getElement().style.whiteSpace = "pre-wrap"; + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + money: function money(cell, formatterParams, onRendered) { + var floatVal = parseFloat(cell.getValue()), + number, + integer, + decimal, + rgx; + + var decimalSym = formatterParams.decimal || "."; + var thousandSym = formatterParams.thousand || ","; + var symbol = formatterParams.symbol || ""; + var after = !!formatterParams.symbolAfter; + var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; + + if (isNaN(floatVal)) { + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + } + + number = precision !== false ? floatVal.toFixed(precision) : floatVal; + number = String(number).split("."); + + integer = number[0]; + decimal = number.length > 1 ? decimalSym + number[1] : ""; + + rgx = /(\d+)(\d{3})/; + + while (rgx.test(integer)) { + integer = integer.replace(rgx, "$1" + thousandSym + "$2"); + } + + return after ? integer + decimal + symbol : symbol + integer + decimal; + }, + + //clickable anchor tag + link: function link(cell, formatterParams, onRendered) { + var value = cell.getValue(), + urlPrefix = formatterParams.urlPrefix || "", + download = formatterParams.download, + label = value, + el = document.createElement("a"), + data; + + if (formatterParams.labelField) { + data = cell.getData(); + label = data[formatterParams.labelField]; + } + + if (formatterParams.label) { + switch (_typeof(formatterParams.label)) { + case "string": + label = formatterParams.label; + break; + + case "function": + label = formatterParams.label(cell); + break; + } + } + + if (label) { + if (formatterParams.urlField) { + data = cell.getData(); + value = data[formatterParams.urlField]; + } + + if (formatterParams.url) { + switch (_typeof(formatterParams.url)) { + case "string": + value = formatterParams.url; + break; + + case "function": + value = formatterParams.url(cell); + break; + } + } + + el.setAttribute("href", urlPrefix + value); + + if (formatterParams.target) { + el.setAttribute("target", formatterParams.target); + } + + if (formatterParams.download) { + + if (typeof download == "function") { + download = download(cell); + } else { + download = download === true ? "" : download; + } + + el.setAttribute("download", download); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + } else { + return " "; + } + }, + + //image element + image: function image(cell, formatterParams, onRendered) { + var el = document.createElement("img"), + src = cell.getValue(); + + if (formatterParams.urlPrefix) { + src = formatterParams.urlPrefix + cell.getValue(); + } + + if (formatterParams.urlSuffix) { + src = src + formatterParams.urlSuffix; + } + + el.setAttribute("src", src); + + switch (_typeof(formatterParams.height)) { + case "number": + el.style.height = formatterParams.height + "px"; + break; + + case "string": + el.style.height = formatterParams.height; + break; + } + + switch (_typeof(formatterParams.width)) { + case "number": + el.style.width = formatterParams.width + "px"; + break; + + case "string": + el.style.width = formatterParams.width; + break; + } + + el.addEventListener("load", function () { + cell.getRow().normalizeHeight(); + }); + + return el; + }, + + //tick or cross + tickCross: function tickCross(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + empty = formatterParams.allowEmpty, + truthy = formatterParams.allowTruthy, + tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', + cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; + + if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { + element.setAttribute("aria-checked", true); + return tick || ""; + } else { + if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { + element.setAttribute("aria-checked", "mixed"); + return ""; + } else { + element.setAttribute("aria-checked", false); + return cross || ""; + } + } + }, + + datetime: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + return formatterParams.timezone ? newDatetime.tz(formatterParams.timezone).format(outputFormat) : newDatetime.format(outputFormat); + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + datetimediff: function datetime(cell, formatterParams, onRendered) { + var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; + var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; + var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; + var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; + var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; + var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); + var value = cell.getValue(); + + var newDatetime = moment(value, inputFormat); + + if (newDatetime.isValid()) { + if (humanize) { + return moment.duration(newDatetime.diff(date)).humanize(suffix); + } else { + return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); + } + } else { + + if (invalid === true) { + return value; + } else if (typeof invalid === "function") { + return invalid(value); + } else { + return invalid; + } + } + }, + + //select + lookup: function lookup(cell, formatterParams, onRendered) { + var value = cell.getValue(); + + if (typeof formatterParams[value] === "undefined") { + console.warn('Missing display value for ' + value); + return value; + } + + return formatterParams[value]; + }, + + //star rating + star: function star(cell, formatterParams, onRendered) { + var value = cell.getValue(), + element = cell.getElement(), + maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, + stars = document.createElement("span"), + star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), + starActive = '', + starInactive = ''; + + //style stars holder + stars.style.verticalAlign = "middle"; + + //style star + star.setAttribute("width", "14"); + star.setAttribute("height", "14"); + star.setAttribute("viewBox", "0 0 512 512"); + star.setAttribute("xml:space", "preserve"); + star.style.padding = "0 1px"; + + value = value && !isNaN(value) ? parseInt(value) : 0; + + value = Math.max(0, Math.min(value, maxStars)); + + for (var i = 1; i <= maxStars; i++) { + var nextStar = star.cloneNode(true); + nextStar.innerHTML = i <= value ? starActive : starInactive; + + stars.appendChild(nextStar); + } + + element.style.whiteSpace = "nowrap"; + element.style.overflow = "hidden"; + element.style.textOverflow = "ellipsis"; + + element.setAttribute("aria-label", value); + + return stars; + }, + + traffic: function traffic(cell, formatterParams, onRendered) { + var value = this.sanitizeHTML(cell.getValue()) || 0, + el = document.createElement("span"), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + colors = formatterParams && typeof formatterParams.color !== "undefined" ? formatterParams.color : ["red", "orange", "green"], + color = "#666666", + percent, + percentValue; + + if (isNaN(value) || typeof cell.getValue() === "undefined") { + return; + } + + el.classList.add("tabulator-traffic-light"); + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set color + switch (typeof colors === 'undefined' ? 'undefined' : _typeof(colors)) { + case "string": + color = colors; + break; + case "function": + color = colors(value); + break; + case "object": + if (Array.isArray(colors)) { + var unit = 100 / colors.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, colors.length - 1); + index = Math.max(index, 0); + color = colors[index]; + break; + } + } + + el.style.backgroundColor = color; + + return el; + }, + + //progress bar + progress: function progress(cell, formatterParams, onRendered) { + //progress bar + var value = this.sanitizeHTML(cell.getValue()) || 0, + element = cell.getElement(), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", + percent, + percentValue, + color, + legend, + legendColor, + top, + left, + right, + bottom; + + //make sure value is in range + percentValue = parseFloat(value) <= max ? parseFloat(value) : max; + percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; + + //workout percentage + percent = (max - min) / 100; + percentValue = Math.round((percentValue - min) / percent); + + //set bar color + switch (_typeof(formatterParams.color)) { + case "string": + color = formatterParams.color; + break; + case "function": + color = formatterParams.color(value); + break; + case "object": + if (Array.isArray(formatterParams.color)) { + var unit = 100 / formatterParams.color.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.color.length - 1); + index = Math.max(index, 0); + color = formatterParams.color[index]; + break; + } + default: + color = "#2DC214"; + } + + //generate legend + switch (_typeof(formatterParams.legend)) { + case "string": + legend = formatterParams.legend; + break; + case "function": + legend = formatterParams.legend(value); + break; + case "boolean": + legend = value; + break; + default: + legend = false; + } + + //set legend color + switch (_typeof(formatterParams.legendColor)) { + case "string": + legendColor = formatterParams.legendColor; + break; + case "function": + legendColor = formatterParams.legendColor(value); + break; + case "object": + if (Array.isArray(formatterParams.legendColor)) { + var unit = 100 / formatterParams.legendColor.length; + var index = Math.floor(percentValue / unit); + + index = Math.min(index, formatterParams.legendColor.length - 1); + index = Math.max(index, 0); + legendColor = formatterParams.legendColor[index]; + } + break; + default: + legendColor = "#000"; + } + + element.style.minWidth = "30px"; + element.style.position = "relative"; + + element.setAttribute("aria-label", percentValue); + + var barEl = document.createElement("div"); + barEl.style.display = "inline-block"; + barEl.style.position = "relative"; + barEl.style.width = percentValue + "%"; + barEl.style.backgroundColor = color; + barEl.style.height = "100%"; + + barEl.setAttribute('data-max', max); + barEl.setAttribute('data-min', min); + + if (legend) { + var legendEl = document.createElement("div"); + legendEl.style.position = "absolute"; + legendEl.style.top = "4px"; + legendEl.style.left = 0; + legendEl.style.textAlign = legendAlign; + legendEl.style.width = "100%"; + legendEl.style.color = legendColor; + legendEl.innerHTML = legend; + } + + onRendered(function () { + + //handle custom element needed if formatter is to be included in printed/downloaded output + if (!(cell instanceof CellComponent)) { + var holderEl = document.createElement("div"); + holderEl.style.position = "absolute"; + holderEl.style.top = "4px"; + holderEl.style.bottom = "4px"; + holderEl.style.left = "4px"; + holderEl.style.right = "4px"; + + element.appendChild(holderEl); + + element = holderEl; + } + + element.appendChild(barEl); + + if (legend) { + element.appendChild(legendEl); + } + }); + + return ""; + }, + + //background color + color: function color(cell, formatterParams, onRendered) { + cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); + return ""; + }, + + //tick icon + buttonTick: function buttonTick(cell, formatterParams, onRendered) { + return ''; + }, + + //cross icon + buttonCross: function buttonCross(cell, formatterParams, onRendered) { + return ''; + }, + + //current row number + rownum: function rownum(cell, formatterParams, onRendered) { + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + handle: function handle(cell, formatterParams, onRendered) { + cell.getElement().classList.add("tabulator-row-handle"); + return "
"; + }, + + responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { + var self = this, + open = false, + el = document.createElement("div"), + config = cell.getRow()._row.modules.responsiveLayout; + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + function toggleList(isOpen) { + var collapseEl = config.element; + + config.open = isOpen; + + if (collapseEl) { + + if (config.open) { + el.classList.add("open"); + collapseEl.style.display = ''; + } else { + el.classList.remove("open"); + collapseEl.style.display = 'none'; + } + } + } + + el.addEventListener("click", function (e) { + e.stopImmediatePropagation(); + toggleList(!config.open); + }); + + toggleList(config.open); + + return el; + }, + + rowSelection: function rowSelection(cell, formatterParams, onRendered) { + var _this64 = this; + + var checkbox = document.createElement("input"); + + checkbox.type = 'checkbox'; + + if (this.table.modExists("selectRow", true)) { + + checkbox.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + if (typeof cell.getRow == 'function') { + var row = cell.getRow(); + + if (row instanceof RowComponent) { + + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected && row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + } else { + checkbox = ""; + } + } else { + checkbox.addEventListener("change", function (e) { + if (_this64.table.modules.selectRow.selectedRows.length) { + _this64.table.deselectRow(); + } else { + _this64.table.selectRow(formatterParams.rowRange); + } + }); + + this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); + } + } + return checkbox; + } + }; + + Tabulator.prototype.registerModule("format", Format); + + var FrozenColumns = function FrozenColumns(table) { + this.table = table; //hold Tabulator object + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightPadding = 0; + this.initializationMode = "left"; + this.active = false; + this.scrollEndTimer = false; + }; + + //reset initial state + FrozenColumns.prototype.reset = function () { + this.initializationMode = "left"; + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.rightMargin = 0; + this.active = false; + + this.table.columnManager.headersElement.style.marginLeft = 0; + this.table.columnManager.element.style.paddingRight = 0; + }; + + //initialize specific column + FrozenColumns.prototype.initializeColumn = function (column) { + var config = { margin: 0, edge: false }; + + if (!column.isGroup) { + + if (this.frozenCheck(column)) { + + config.position = this.initializationMode; + + if (this.initializationMode == "left") { + this.leftColumns.push(column); + } else { + this.rightColumns.unshift(column); + } + + this.active = true; + + column.modules.frozen = config; + } else { + this.initializationMode = "right"; + } + } + }; + + FrozenColumns.prototype.frozenCheck = function (column) { + var frozen = false; + + if (column.parent.isGroup && column.definition.frozen) { + console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"); + } + + if (column.parent.isGroup) { + return this.frozenCheck(column.parent); + } else { + return column.definition.frozen; + } + + return frozen; + }; + + //quick layout to smooth horizontal scrolling + FrozenColumns.prototype.scrollHorizontal = function () { + var _this65 = this; + + var rows; + + if (this.active) { + clearTimeout(this.scrollEndTimer); + + //layout all rows after scroll is complete + this.scrollEndTimer = setTimeout(function () { + _this65.layout(); + }, 100); + + rows = this.table.rowManager.getVisibleRows(); + + this.calcMargins(); + + this.layoutColumnPosition(); + + this.layoutCalcRows(); + + rows.forEach(function (row) { + if (row.type === "row") { + _this65.layoutRow(row); + } + }); + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } + }; + + //calculate margins for rows + FrozenColumns.prototype.calcMargins = function () { + this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; + this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; + + this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; + this.table.columnManager.element.style.paddingRight = this.rightMargin; + + //calculate right frozen columns + this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft; + }; + + //layout calculation rows + FrozenColumns.prototype.layoutCalcRows = function () { + if (this.table.modExists("columnCalcs")) { + if (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow) { + this.layoutRow(this.table.modules.columnCalcs.topRow); + } + if (this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow) { + this.layoutRow(this.table.modules.columnCalcs.botRow); + } + } + }; + + //calculate column positions and layout headers + FrozenColumns.prototype.layoutColumnPosition = function (allCells) { + var _this66 = this; + + var leftParents = []; + + this.leftColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this66._calcSpace(_this66.leftColumns, i) + _this66.table.columnManager.scrollLeft + "px"; + + if (i == _this66.leftColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + var parentEl = _this66.getColGroupParentElement(column); + if (!leftParents.includes(parentEl)) { + _this66.layoutElement(parentEl, column); + leftParents.push(parentEl); + } + + if (column.modules.frozen.edge) { + parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } else { + _this66.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this66.layoutElement(cell.getElement(true), column); + }); + } + }); + + this.rightColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this66.rightPadding - _this66._calcSpace(_this66.rightColumns, i + 1) + "px"; + + if (i == _this66.rightColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + if (column.parent.isGroup) { + _this66.layoutElement(_this66.getColGroupParentElement(column), column); + } else { + _this66.layoutElement(column.getElement(), column); + } + + if (allCells) { + column.cells.forEach(function (cell) { + _this66.layoutElement(cell.getElement(true), column); + }); + } + }); + }; + + FrozenColumns.prototype.getColGroupParentElement = function (column) { + return column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement(); + }; + + //layout columns appropropriatly + FrozenColumns.prototype.layout = function () { + var self = this, + rightMargin = 0; + + if (self.active) { + + //calculate row padding + this.calcMargins(); + + // self.table.rowManager.activeRows.forEach(function(row){ + // self.layoutRow(row); + // }); + + // if(self.table.options.dataTree){ + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row") { + self.layoutRow(row); + } + }); + // } + + this.layoutCalcRows(); + + //calculate left columns + this.layoutColumnPosition(true); + + // if(tableHolder.scrollHeight > tableHolder.clientHeight){ + // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; + // } + + this.table.rowManager.tableElement.style.marginRight = this.rightMargin; + } + }; + + FrozenColumns.prototype.layoutRow = function (row) { + var _this67 = this; + + var rowEl = row.getElement(); + + rowEl.style.paddingLeft = this.leftMargin; + // rowEl.style.paddingRight = this.rightMargin + "px"; + + this.leftColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this67.layoutElement(cell.getElement(true), column); + } + }); + + this.rightColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this67.layoutElement(cell.getElement(true), column); + } + }); + }; + + FrozenColumns.prototype.layoutElement = function (element, column) { + + if (column.modules.frozen) { + element.style.position = "absolute"; + element.style.left = column.modules.frozen.margin; + + element.classList.add("tabulator-frozen"); + + if (column.modules.frozen.edge) { + element.classList.add("tabulator-frozen-" + column.modules.frozen.position); + } + } + }; + + FrozenColumns.prototype._calcSpace = function (columns, index) { + var width = 0; + + for (var _i12 = 0; _i12 < index; _i12++) { + if (columns[_i12].visible) { + width += columns[_i12].getWidth(); + } + } + + return width; + }; + + Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); + var FrozenRows = function FrozenRows(table) { + this.table = table; //hold Tabulator object + this.topElement = document.createElement("div"); + this.rows = []; + this.displayIndex = 0; //index in display pipeline + }; + + FrozenRows.prototype.initialize = function () { + this.rows = []; + + this.topElement.classList.add("tabulator-frozen-rows-holder"); + + // this.table.columnManager.element.append(this.topElement); + this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); + }; + + FrozenRows.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; + }; + + FrozenRows.prototype.getDisplayIndex = function () { + return this.displayIndex; + }; + + FrozenRows.prototype.isFrozen = function () { + return !!this.rows.length; + }; + + //filter frozen rows out of display data + FrozenRows.prototype.getRows = function (rows) { + var self = this, + frozen = [], + output = rows.slice(0); + + this.rows.forEach(function (row) { + var index = output.indexOf(row); + + if (index > -1) { + output.splice(index, 1); + } + }); + + return output; + }; + + FrozenRows.prototype.freezeRow = function (row) { + if (!row.modules.frozen) { + row.modules.frozen = true; + this.topElement.appendChild(row.getElement()); + row.initialize(); + row.normalizeHeight(); + this.table.rowManager.adjustTableSize(); + + this.rows.push(row); + + this.table.rowManager.refreshActiveData("display"); + + this.styleRows(); + } else { + console.warn("Freeze Error - Row is already frozen"); + } + }; + + FrozenRows.prototype.unfreezeRow = function (row) { + var index = this.rows.indexOf(row); + + if (row.modules.frozen) { + + row.modules.frozen = false; + + this.detachRow(row); + + this.table.rowManager.adjustTableSize(); + + this.table.rowManager.refreshActiveData("display"); + + if (this.rows.length) { + this.styleRows(); + } + } else { + console.warn("Freeze Error - Row is already unfrozen"); + } + }; + + FrozenRows.prototype.detachRow = function (row) { + var index = this.rows.indexOf(row); + + if (index > -1) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.rows.splice(index, 1); + } + }; + + FrozenRows.prototype.styleRows = function (row) { + var self = this; + + this.rows.forEach(function (row, i) { + self.table.rowManager.styleRow(row, i); + }); + }; + + Tabulator.prototype.registerModule("frozenRows", FrozenRows); + + //public group object + var GroupComponent = function GroupComponent(group) { + this._group = group; + this.type = "GroupComponent"; + }; + + GroupComponent.prototype.getKey = function () { + return this._group.key; + }; + + GroupComponent.prototype.getField = function () { + return this._group.field; + }; + + GroupComponent.prototype.getElement = function () { + return this._group.element; + }; + + GroupComponent.prototype.getRows = function () { + return this._group.getRows(true); + }; + + GroupComponent.prototype.getSubGroups = function () { + return this._group.getSubGroups(true); + }; + + GroupComponent.prototype.getParentGroup = function () { + return this._group.parent ? this._group.parent.getComponent() : false; + }; + + GroupComponent.prototype.getVisibility = function () { + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + return this._group.visible; + }; + + GroupComponent.prototype.isVisible = function () { + return this._group.visible; + }; + + GroupComponent.prototype.show = function () { + this._group.show(); + }; + + GroupComponent.prototype.hide = function () { + this._group.hide(); + }; + + GroupComponent.prototype.toggle = function () { + this._group.toggleVisibility(); + }; + + GroupComponent.prototype._getSelf = function () { + return this._group; + }; + + GroupComponent.prototype.getTable = function () { + return this._group.groupManager.table; + }; + + ////////////////////////////////////////////////// + //////////////// Group Functions ///////////////// + ////////////////////////////////////////////////// + + var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { + + this.groupManager = groupManager; + this.parent = parent; + this.key = key; + this.level = level; + this.field = field; + this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; + this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; + this.type = "group"; //type of element + this.old = oldGroup; + this.rows = []; + this.groups = []; + this.groupList = []; + this.generator = generator; + this.elementContents = false; + this.height = 0; + this.outerHeight = 0; + this.initialized = false; + this.calcs = {}; + this.initialized = false; + this.modules = {}; + this.arrowElement = false; + + this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; + + this.component = null; + + this.createElements(); + this.addBindings(); + + this.createValueGroups(); + }; + + Group.prototype.wipe = function () { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + group.wipe(); + }); + } else { + this.element = false; + this.arrowElement = false; + this.elementContents = false; + } + }; + + Group.prototype.createElements = function () { + var arrow = document.createElement("div"); + arrow.classList.add("tabulator-arrow"); + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-row"); + this.element.classList.add("tabulator-group"); + this.element.classList.add("tabulator-group-level-" + this.level); + this.element.setAttribute("role", "rowgroup"); + + this.arrowElement = document.createElement("div"); + this.arrowElement.classList.add("tabulator-group-toggle"); + this.arrowElement.appendChild(arrow); + + //setup movable rows + if (this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists("moveRow")) { + this.groupManager.table.modules.moveRow.initializeGroupHeader(this); + } + }; + + Group.prototype.createValueGroups = function () { + var _this68 = this; + + var level = this.level + 1; + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + this.groupManager.allowedValues[level].forEach(function (value) { + _this68._createGroup(value, level); + }); + } + }; + + Group.prototype.addBindings = function () { + var self = this, + dblTap, + tapHold, + tap, + toggleElement; + + //handle group click events + if (self.groupManager.table.options.groupClick) { + self.element.addEventListener("click", function (e) { + self.groupManager.table.options.groupClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.groupManager.table.options.groupDblClick.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + self.element.addEventListener("contextmenu", function (e) { + self.groupManager.table.options.groupContext.call(self.groupManager.table, e, self.getComponent()); + }); + } + + if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { + self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); + } + + if (self.groupManager.table.options.groupTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + self.groupManager.table.options.groupTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.groupManager.table.options.groupDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + self.groupManager.table.options.groupDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (self.groupManager.table.options.groupTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.groupManager.table.options.groupTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } + + if (self.groupManager.table.options.groupToggleElement) { + toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; + + toggleElement.addEventListener("click", function (e) { + e.stopPropagation(); + e.stopImmediatePropagation(); + self.toggleVisibility(); + }); + } + }; + + Group.prototype._createGroup = function (groupID, level) { + var groupKey = level + "_" + groupID; + var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); + + this.groups[groupKey] = group; + this.groupList.push(group); + }; + + Group.prototype._addRowToGroup = function (row) { + + var level = this.level + 1; + + if (this.hasSubGroups) { + var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), + groupKey = level + "_" + groupID; + + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } + } else { + if (!this.groups[groupKey]) { + this._createGroup(groupID, level); + } + + this.groups[groupKey].addRow(row); + } + } + }; + + Group.prototype._addRow = function (row) { + this.rows.push(row); + row.modules.group = this; + }; + + Group.prototype.insertRow = function (row, to, after) { + var data = this.conformRowData({}); + + row.updateData(data); + + var toIndex = this.rows.indexOf(to); + + if (toIndex > -1) { + if (after) { + this.rows.splice(toIndex + 1, 0, row); + } else { + this.rows.splice(toIndex, 0, row); + } + } else { + if (after) { + this.rows.push(row); + } else { + this.rows.unshift(row); + } + } + + row.modules.group = this; + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + + this.groupManager.updateGroupRows(true); + }; + + Group.prototype.scrollHeader = function (left) { + this.arrowElement.style.marginLeft = left; + + this.groupList.forEach(function (child) { + child.scrollHeader(left); + }); + }; + + Group.prototype.getRowIndex = function (row) {}; + + //update row data to match grouping contraints + Group.prototype.conformRowData = function (data) { + if (this.field) { + data[this.field] = this.key; + } else { + console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); + } + + if (this.parent) { + data = this.parent.conformRowData(data); + } + + return data; + }; + + Group.prototype.removeRow = function (row) { + var index = this.rows.indexOf(row); + var el = row.getElement(); + + if (index > -1) { + this.rows.splice(index, 1); + } + + if (!this.groupManager.table.options.groupValues && !this.rows.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + + this.groupManager.updateGroupRows(true); + } else { + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.generateGroupHeaderContents(); + + if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { + this.groupManager.table.modules.columnCalcs.recalcGroup(this); + } + } + }; + + Group.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + + if (!this.groupList.length) { + if (this.parent) { + this.parent.removeGroup(this); + } else { + this.groupManager.removeGroup(this); + } + } + } + }; + + Group.prototype.getHeadersAndRows = function (noCalc) { + var output = []; + + output.push(this); + + this._visSet(); + + if (this.visible) { + if (this.groupList.length) { + this.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows(noCalc)); + }); + } else { + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + + output = output.concat(this.rows); + + if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } else { + if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table") { + + if (this.groupManager.table.modExists("columnCalcs")) { + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { + if (this.calcs.top) { + this.calcs.top.detachElement(); + this.calcs.top.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + } + + if (!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { + if (this.calcs.bottom) { + this.calcs.bottom.detachElement(); + this.calcs.bottom.deleteCells(); + } + + if (this.groupManager.table.options.groupClosedShowCalcs) { + this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } + } + } + + return output; + }; + + Group.prototype.getData = function (visible, transform) { + var self = this, + output = []; + + this._visSet(); + + if (!visible || visible && this.visible) { + this.rows.forEach(function (row) { + output.push(row.getData(transform || "data")); + }); + } + + return output; + }; + + // Group.prototype.getRows = function(){ + // this._visSet(); + + // return this.visible ? this.rows : []; + // }; + + Group.prototype.getRowCount = function () { + var count = 0; + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + count += group.getRowCount(); + }); + } else { + count = this.rows.length; + } + return count; + }; + + Group.prototype.toggleVisibility = function () { + if (this.visible) { + this.hide(); + } else { + this.show(); + } + }; + + Group.prototype.hide = function () { + this.visible = false; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.remove("tabulator-group-visible"); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + row.detachElement(); + }); + }); + } else { + this.rows.forEach(function (row) { + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); + }; + + Group.prototype.show = function () { + var self = this; + + self.visible = true; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { + + this.element.classList.add("tabulator-group-visible"); + + var prev = self.getElement(); + + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var rows = group.getHeadersAndRows(); + + rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + }); + } else { + self.rows.forEach(function (row) { + var rowEl = row.getElement(); + prev.parentNode.insertBefore(rowEl, prev.nextSibling); + row.initialize(); + prev = rowEl; + }); + } + + this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); + + this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); + } else { + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); + }; + + Group.prototype._visSet = function () { + var data = []; + + if (typeof this.visible == "function") { + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); + } + }; + + Group.prototype.getRowGroup = function (row) { + var match = false; + if (this.groupList.length) { + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + } else { + if (this.rows.find(function (item) { + return item === row; + })) { + match = this; + } + } + + return match; + }; + + Group.prototype.getSubGroups = function (component) { + var output = []; + + this.groupList.forEach(function (child) { + output.push(component ? child.getComponent() : child); + }); + + return output; + }; + + Group.prototype.getRows = function (compoment) { + var output = []; + + this.rows.forEach(function (row) { + output.push(compoment ? row.getComponent() : row); + }); + + return output; + }; + + Group.prototype.generateGroupHeaderContents = function () { + var data = []; + + this.rows.forEach(function (row) { + data.push(row.getData()); + }); + + this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (typeof this.elementContents === "string") { + this.element.innerHTML = this.elementContents; + } else { + this.element.appendChild(this.elementContents); + } + + this.element.insertBefore(this.arrowElement, this.element.firstChild); + }; + + Group.prototype.getPath = function () { + var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + path.unshift(this.key); + if (this.parent) { + this.parent.getPath(path); + } + return path; + }; + ////////////// Standard Row Functions ////////////// + + Group.prototype.getElement = function () { + this.addBindingsd = false; + + this._visSet(); + + if (this.visible) { + this.element.classList.add("tabulator-group-visible"); + } else { + this.element.classList.remove("tabulator-group-visible"); + } + + for (var i = 0; i < this.element.childNodes.length; ++i) { + this.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]); + } + + this.generateGroupHeaderContents(); + + // this.addBindings(); + + return this.element; + }; + + Group.prototype.detachElement = function () { + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } + }; + + //normalize the height of elements in the row + Group.prototype.normalizeHeight = function () { + this.setHeight(this.element.clientHeight); + }; + + Group.prototype.initialize = function (force) { + if (!this.initialized || force) { + this.normalizeHeight(); + this.initialized = true; + } + }; + + Group.prototype.reinitialize = function () { + this.initialized = false; + this.height = 0; + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + this.initialize(true); + } + }; + + Group.prototype.setHeight = function (height) { + if (this.height != height) { + this.height = height; + this.outerHeight = this.element.offsetHeight; + } + }; + + //return rows outer height + Group.prototype.getHeight = function () { + return this.outerHeight; + }; + + Group.prototype.getGroup = function () { + return this; + }; + + Group.prototype.reinitializeHeight = function () {}; + Group.prototype.calcHeight = function () {}; + Group.prototype.setCellHeight = function () {}; + Group.prototype.clearCellHeight = function () {}; + + //////////////// Object Generation ///////////////// + Group.prototype.getComponent = function () { + if (!this.component) { + this.component = new GroupComponent(this); + } + + return this.component; + }; + + ////////////////////////////////////////////////// + ////////////// Group Row Extension /////////////// + ////////////////////////////////////////////////// + + var GroupRows = function GroupRows(table) { + + this.table = table; //hold Tabulator object + + this.groupIDLookups = false; //enable table grouping and set field to group by + this.startOpen = [function () { + return false; + }]; //starting state of group + this.headerGenerator = [function () { + return ""; + }]; + this.groupList = []; //ordered list of groups + this.allowedValues = false; + this.groups = {}; //hold row groups + this.displayIndex = 0; //index in display pipeline + }; + + //initialize group configuration + GroupRows.prototype.initialize = function () { + var self = this, + groupBy = self.table.options.groupBy, + startOpen = self.table.options.groupStartOpen, + groupHeader = self.table.options.groupHeader; + + this.allowedValues = self.table.options.groupValues; + + if (Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length) { + console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"); + } + + self.headerGenerator = [function () { + return ""; + }]; + this.startOpen = [function () { + return false; + }]; //starting state of group + + self.table.modules.localize.bind("groups|item", function (langValue, lang) { + self.headerGenerator[0] = function (value, count, data) { + //header layout function + return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; + }; + }); + + this.groupIDLookups = []; + + if (Array.isArray(groupBy) || groupBy) { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { + this.table.modules.columnCalcs.removeCalcs(); + } + } else { + if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { + + var cols = this.table.columnManager.getRealColumns(); + + cols.forEach(function (col) { + if (col.definition.topCalc) { + self.table.modules.columnCalcs.initializeTopRow(); + } + + if (col.definition.bottomCalc) { + self.table.modules.columnCalcs.initializeBottomRow(); + } + }); + } + } + + if (!Array.isArray(groupBy)) { + groupBy = [groupBy]; + } + + groupBy.forEach(function (group, i) { + var lookupFunc, column; + + if (typeof group == "function") { + lookupFunc = group; + } else { + column = self.table.columnManager.getColumnByField(group); + + if (column) { + lookupFunc = function lookupFunc(data) { + return column.getFieldValue(data); + }; + } else { + lookupFunc = function lookupFunc(data) { + return data[group]; + }; + } + } + + self.groupIDLookups.push({ + field: typeof group === "function" ? false : group, + func: lookupFunc, + values: self.allowedValues ? self.allowedValues[i] : false + }); + }); + + if (startOpen) { + + if (!Array.isArray(startOpen)) { + startOpen = [startOpen]; + } + + startOpen.forEach(function (level) { + level = typeof level == "function" ? level : function () { + return true; + }; + }); + + self.startOpen = startOpen; + } + + if (groupHeader) { + self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; + } + + this.initialized = true; + }; + + GroupRows.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; + }; + + GroupRows.prototype.getDisplayIndex = function () { + return this.displayIndex; + }; + + //return appropriate rows with group headers + GroupRows.prototype.getRows = function (rows) { + if (this.groupIDLookups.length) { + + this.table.options.dataGrouping.call(this.table); + + this.generateGroups(rows); + + if (this.table.options.dataGrouped) { + this.table.options.dataGrouped.call(this.table, this.getGroups(true)); + } + + return this.updateGroupRows(); + } else { + return rows.slice(0); + } + }; + + GroupRows.prototype.getGroups = function (compoment) { + var groupComponents = []; + + this.groupList.forEach(function (group) { + groupComponents.push(compoment ? group.getComponent() : group); + }); + + return groupComponents; + }; + + GroupRows.prototype.getChildGroups = function (group) { + var _this69 = this; + + var groupComponents = []; + + if (!group) { + group = this; + } + + group.groupList.forEach(function (child) { + if (child.groupList.length) { + groupComponents = groupComponents.concat(_this69.getChildGroups(child)); + } else { + groupComponents.push(child); + } + }); + + return groupComponents; + }; + + GroupRows.prototype.wipe = function () { + this.groupList.forEach(function (group) { + group.wipe(); + }); + }; + + GroupRows.prototype.pullGroupListData = function (groupList) { + var self = this; + var groupListData = []; + + groupList.forEach(function (group) { + var groupHeader = {}; + groupHeader.level = 0; + groupHeader.rowCount = 0; + groupHeader.headerContent = ""; + var childData = []; + + if (group.hasSubGroups) { + childData = self.pullGroupListData(group.groupList); + + groupHeader.level = group.level; + groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers + groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); + + groupListData.push(groupHeader); + groupListData = groupListData.concat(childData); + } else { + groupHeader.level = group.level; + groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); + groupHeader.rowCount = group.getRows().length; + + groupListData.push(groupHeader); + + group.getRows().forEach(function (row) { + groupListData.push(row.getData("data")); + }); + } + }); + + return groupListData; + }; + + GroupRows.prototype.getGroupedData = function () { + + return this.pullGroupListData(this.groupList); + }; + + GroupRows.prototype.getRowGroup = function (row) { + var match = false; + + this.groupList.forEach(function (group) { + var result = group.getRowGroup(row); + + if (result) { + match = result; + } + }); + + return match; + }; + + GroupRows.prototype.countGroups = function () { + return this.groupList.length; + }; + + GroupRows.prototype.generateGroups = function (rows) { + var self = this, + oldGroups = self.groups; + + self.groups = {}; + self.groupList = []; + + if (this.allowedValues && this.allowedValues[0]) { + this.allowedValues[0].forEach(function (value) { + self.createGroup(value, 0, oldGroups); + }); + + rows.forEach(function (row) { + self.assignRowToExistingGroup(row, oldGroups); + }); + } else { + rows.forEach(function (row) { + self.assignRowToGroup(row, oldGroups); + }); + } + }; + + GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { + var groupKey = level + "_" + groupID, + group; + + oldGroups = oldGroups || []; + + group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); + + this.groups[groupKey] = group; + this.groupList.push(group); + }; + + // GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ + // var groupID = this.groupIDLookups[0].func(row.getData()), + // groupKey = "0_" + groupID; + + // if(!this.groups[groupKey]){ + // this.createGroup(groupID, 0, oldGroups); + // } + + // this.groups[groupKey].addRow(row); + // }; + + GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + groupKey = "0_" + groupID; + + if (this.groups[groupKey]) { + this.groups[groupKey].addRow(row); + } + }; + + GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { + var groupID = this.groupIDLookups[0].func(row.getData()), + newGroupNeeded = !this.groups["0_" + groupID]; + + if (newGroupNeeded) { + this.createGroup(groupID, 0, oldGroups); + } + + this.groups["0_" + groupID].addRow(row); + + return !newGroupNeeded; + }; + + GroupRows.prototype.reassignRowToGroup = function (row) { + var oldRowGroup = row.getGroup(), + oldGroupPath = oldRowGroup.getPath(), + newGroupPath = this.getExpectedPath(row), + samePath = true; + // figure out if new group path is the same as old group path + var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { + return element === newGroupPath[index]; + }); + // refresh if they new path and old path aren't the same (aka the row's groupings have changed) + if (!samePath) { + oldRowGroup.removeRow(row); + this.assignRowToGroup(row, self.groups); + this.table.rowManager.refreshActiveData("group", false, true); + } + }; + + GroupRows.prototype.getExpectedPath = function (row) { + var groupPath = [], + rowData = row.getData(); + this.groupIDLookups.forEach(function (groupId) { + groupPath.push(groupId.func(rowData)); + }); + return groupPath; + }; + + GroupRows.prototype.updateGroupRows = function (force) { + var self = this, + output = [], + oldRowCount; + + self.groupList.forEach(function (group) { + output = output.concat(group.getHeadersAndRows()); + }); + + //force update of table display + if (force) { + + var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); + + if (displayIndex !== true) { + this.setDisplayIndex(displayIndex); + } + + self.table.rowManager.refreshActiveData("group", true, true); + } + + return output; + }; + + GroupRows.prototype.scrollHeaders = function (left) { + if (this.table.options.virtualDomHoz) { + left -= this.table.vdomHoz.vDomPadLeft; + } + + left = left + "px"; + + this.groupList.forEach(function (group) { + group.scrollHeader(left); + }); + }; + + GroupRows.prototype.removeGroup = function (group) { + var groupKey = group.level + "_" + group.key, + index; + + if (this.groups[groupKey]) { + delete this.groups[groupKey]; + + index = this.groupList.indexOf(group); + + if (index > -1) { + this.groupList.splice(index, 1); + } + } + }; + + Tabulator.prototype.registerModule("groupRows", GroupRows); + var History = function History(table) { + this.table = table; //hold Tabulator object + + this.history = []; + this.index = -1; + }; + + History.prototype.clear = function () { + this.history = []; + this.index = -1; + }; + + History.prototype.action = function (type, component, data) { + + this.history = this.history.slice(0, this.index + 1); + + this.history.push({ + type: type, + component: component, + data: data + }); + + this.index++; + }; + + History.prototype.getHistoryUndoSize = function () { + return this.index + 1; + }; + + History.prototype.getHistoryRedoSize = function () { + return this.history.length - (this.index + 1); + }; + + History.prototype.clearComponentHistory = function (component) { + var index = this.history.findIndex(function (item) { + return item.component === component; + }); + + if (index > -1) { + this.history.splice(index, 1); + if (index <= this.index) { + this.index--; + } + + this.clearComponentHistory(component); + } + }; + + History.prototype.undo = function () { + + if (this.index > -1) { + var action = this.history[this.index]; + + this.undoers[action.type].call(this, action); + + this.index--; + + this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Undo Error - No more history to undo"); + return false; + } + }; + + History.prototype.redo = function () { + if (this.history.length - 1 > this.index) { + + this.index++; + + var action = this.history[this.index]; + + this.redoers[action.type].call(this, action); + + this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); + + return true; + } else { + console.warn("History Redo Error - No more history to redo"); + return false; + } + }; + + History.prototype.undoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function rowAdd(action) { + action.component.deleteActual(); + }, + + rowDelete: function rowDelete(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after); + this.table.rowManager.redraw(); + } + }; + + History.prototype.redoers = { + cellEdit: function cellEdit(action) { + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function rowAdd(action) { + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } + + this._rebindRow(action.component, newRow); + }, + + rowDelete: function rowDelete(action) { + action.component.deleteActual(); + }, + + rowMove: function rowMove(action) { + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after); + this.table.rowManager.redraw(); + } + }; + + //rebind rows to new element after deletion + History.prototype._rebindRow = function (oldRow, newRow) { + this.history.forEach(function (action) { + if (action.component instanceof Row) { + if (action.component === oldRow) { + action.component = newRow; + } + } else if (action.component instanceof Cell) { + if (action.component.row === oldRow) { + var field = action.component.column.getField(); + + if (field) { + action.component = newRow.getCell(field); + } + } + } + }); + }; + + Tabulator.prototype.registerModule("history", History); + var HtmlTableImport = function HtmlTableImport(table) { + this.table = table; //hold Tabulator object + this.fieldIndex = []; + this.hasIndex = false; + }; + + HtmlTableImport.prototype.parseTable = function () { + var self = this, + element = self.table.element, + options = self.table.options, + columns = options.columns, + headers = element.getElementsByTagName("th"), + rows = element.getElementsByTagName("tbody")[0], + data = [], + newTable; + + self.hasIndex = false; + + self.table.options.htmlImporting.call(this.table); + + rows = rows ? rows.getElementsByTagName("tr") : []; + + //check for tablator inline options + self._extractOptions(element, options); + + if (headers.length) { + self._extractHeaders(headers, rows); + } else { + self._generateBlankHeaders(headers, rows); + } + + //iterate through table rows and build data set + for (var index = 0; index < rows.length; index++) { + var row = rows[index], + cells = row.getElementsByTagName("td"), + item = {}; + + //create index if the dont exist in table + if (!self.hasIndex) { + item[options.index] = index; + } + + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (typeof this.fieldIndex[i] !== "undefined") { + item[this.fieldIndex[i]] = cell.innerHTML; + } + } + + //add row data to item + data.push(item); + } + + //create new element + var newElement = document.createElement("div"); + + //transfer attributes to new element + var attributes = element.attributes; + + // loop through attributes and apply them on div + + for (var i in attributes) { + if (_typeof(attributes[i]) == "object") { + newElement.setAttribute(attributes[i].name, attributes[i].value); + } + } + + // replace table with div element + element.parentNode.replaceChild(newElement, element); + + options.data = data; + + self.table.options.htmlImported.call(this.table); + + // // newElement.tabulator(options); + + this.table.element = newElement; + }; + + //extract tabulator attribute options + HtmlTableImport.prototype._extractOptions = function (element, options, defaultOptions) { + var attributes = element.attributes; + var optionsArr = defaultOptions ? Object.assign([], defaultOptions) : Object.keys(options); + var optionsList = {}; + + optionsArr.forEach(function (item) { + optionsList[item.toLowerCase()] = item; + }); + + for (var index in attributes) { + var attrib = attributes[index]; + var name; + + if (attrib && (typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + name = attrib.name.replace("tabulator-", ""); + + if (typeof optionsList[name] !== "undefined") { + options[optionsList[name]] = this._attribValue(attrib.value); + } + } + } + }; + + //get value of attribute + HtmlTableImport.prototype._attribValue = function (value) { + if (value === "true") { + return true; + } + + if (value === "false") { + return false; + } + + return value; + }; + + //find column if it has already been defined + HtmlTableImport.prototype._findCol = function (title) { + var match = this.table.options.columns.find(function (column) { + return column.title === title; + }); + + return match || false; + }; + + //extract column from headers + HtmlTableImport.prototype._extractHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + exists = false, + col = this._findCol(header.textContent), + width, + attributes; + + if (col) { + exists = true; + } else { + col = { title: header.textContent.trim() }; + } + + if (!col.field) { + col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); + } + + width = header.getAttribute("width"); + + if (width && !col.width) { + col.width = width; + } + + //check for tablator inline options + attributes = header.attributes; + + // //check for tablator inline options + this._extractOptions(header, col, Column.prototype.defaultOptionList); + + this.fieldIndex[index] = col.field; + + if (col.field == this.table.options.index) { + this.hasIndex = true; + } + + if (!exists) { + this.table.options.columns.push(col); + } + } + }; + + //generate blank headers + HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { + for (var index = 0; index < headers.length; index++) { + var header = headers[index], + col = { title: "", field: "col" + index }; + + this.fieldIndex[index] = col.field; + + var width = header.getAttribute("width"); + + if (width) { + col.width = width; + } + + this.table.options.columns.push(col); + } + }; + + Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); + var Keybindings = function Keybindings(table) { + this.table = table; //hold Tabulator object + this.watchKeys = null; + this.pressedKeys = null; + this.keyupBinding = false; + this.keydownBinding = false; + }; + + Keybindings.prototype.initialize = function () { + var bindings = this.table.options.keybindings, + mergedBindings = {}; + + this.watchKeys = {}; + this.pressedKeys = []; + + if (bindings !== false) { + + for (var key in this.bindings) { + mergedBindings[key] = this.bindings[key]; + } + + if (Object.keys(bindings).length) { + + for (var _key in bindings) { + mergedBindings[_key] = bindings[_key]; + } + } + + this.mapBindings(mergedBindings); + this.bindEvents(); + } + }; + + Keybindings.prototype.mapBindings = function (bindings) { + var _this70 = this; + + var self = this; + + var _loop2 = function _loop2(key) { + + if (_this70.actions[key]) { + + if (bindings[key]) { + + if (_typeof(bindings[key]) !== "object") { + bindings[key] = [bindings[key]]; + } + + bindings[key].forEach(function (binding) { + self.mapBinding(key, binding); + }); + } + } else { + console.warn("Key Binding Error - no such action:", key); + } + }; + + for (var key in bindings) { + _loop2(key); + } + }; + + Keybindings.prototype.mapBinding = function (action, symbolsList) { + var self = this; + + var binding = { + action: this.actions[action], + keys: [], + ctrl: false, + shift: false, + meta: false + }; + + var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); + + symbols.forEach(function (symbol) { + switch (symbol) { + case "ctrl": + binding.ctrl = true; + break; + + case "shift": + binding.shift = true; + break; + + case "meta": + binding.meta = true; + break; + + default: + symbol = parseInt(symbol); + binding.keys.push(symbol); + + if (!self.watchKeys[symbol]) { + self.watchKeys[symbol] = []; + } + + self.watchKeys[symbol].push(binding); + } + }); + }; + + Keybindings.prototype.bindEvents = function () { + var self = this; + + this.keyupBinding = function (e) { + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if (bindings) { + + self.pressedKeys.push(code); + + bindings.forEach(function (binding) { + self.checkBinding(e, binding); + }); + } + }; + + this.keydownBinding = function (e) { + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if (bindings) { + + var index = self.pressedKeys.indexOf(code); + + if (index > -1) { + self.pressedKeys.splice(index, 1); + } + } + }; + + this.table.element.addEventListener("keydown", this.keyupBinding); + + this.table.element.addEventListener("keyup", this.keydownBinding); + }; + + Keybindings.prototype.clearBindings = function () { + if (this.keyupBinding) { + this.table.element.removeEventListener("keydown", this.keyupBinding); + } + + if (this.keydownBinding) { + this.table.element.removeEventListener("keyup", this.keydownBinding); + } + }; + + Keybindings.prototype.checkBinding = function (e, binding) { + var self = this, + match = true; + + if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta) { + binding.keys.forEach(function (key) { + var index = self.pressedKeys.indexOf(key); + + if (index == -1) { + match = false; + } + }); + + if (match) { + binding.action.call(self, e); + } + + return true; + } + + return false; + }; + + //default bindings + Keybindings.prototype.bindings = { + navPrev: "shift + 9", + navNext: 9, + navUp: 38, + navDown: 40, + scrollPageUp: 33, + scrollPageDown: 34, + scrollToStart: 36, + scrollToEnd: 35, + undo: "ctrl + 90", + redo: "ctrl + 89", + copyToClipboard: "ctrl + 67" + }; + + //default actions + Keybindings.prototype.actions = { + keyBlock: function keyBlock(e) { + e.stopPropagation(); + e.preventDefault(); + }, + scrollPageUp: function scrollPageUp(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop - rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos >= 0) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + } + + this.table.element.focus(); + }, + scrollPageDown: function scrollPageDown(e) { + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop + rowManager.height, + scrollMax = rowManager.element.scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + if (newPos <= scrollMax) { + rowManager.element.scrollTop = newPos; + } else { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + } + + this.table.element.focus(); + }, + scrollToStart: function scrollToStart(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + + this.table.element.focus(); + }, + scrollToEnd: function scrollToEnd(e) { + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + + this.table.element.focus(); + }, + navPrev: function navPrev(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().prev(); + } + } + }, + + navNext: function navNext(e) { + var cell = false; + var newRow = this.table.options.tabEndNewRow; + var nav; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + + nav = cell.nav(); + + if (!nav.next()) { + if (newRow) { + + cell.getElement().firstChild.blur(); + + if (newRow === true) { + newRow = this.table.addRow({}); + } else { + if (typeof newRow == "function") { + newRow = this.table.addRow(newRow(cell.row.getComponent())); + } else { + newRow = this.table.addRow(Object.assign({}, newRow)); + } + } + + newRow.then(function () { + setTimeout(function () { + nav.next(); + }); + }); + } + } + } + } + }, + + navLeft: function navLeft(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().left(); + } + } + }, + + navRight: function navRight(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().right(); + } + } + }, + + navUp: function navUp(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().up(); + } + } + }, + + navDown: function navDown(e) { + var cell = false; + + if (this.table.modExists("edit")) { + cell = this.table.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + cell.nav().down(); + } + } + }, + + undo: function undo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.undo(); + } + } + }, + + redo: function redo(e) { + var cell = false; + if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { + + cell = this.table.modules.edit.currentCell; + + if (!cell) { + e.preventDefault(); + this.table.modules.history.redo(); + } + } + }, + + copyToClipboard: function copyToClipboard(e) { + if (!this.table.modules.edit.currentCell) { + if (this.table.modExists("clipboard", true)) { + this.table.modules.clipboard.copy(false, true); + } + } + } + }; + + Tabulator.prototype.registerModule("keybindings", Keybindings); + var Menu = function Menu(table) { + this.table = table; //hold Tabulator object + this.menuElements = []; + this.blurEvent = this.hideMenu.bind(this); + this.escEvent = this.escMenu.bind(this); + this.nestedMenuBlock = false; + this.positionReversedX = false; + }; + + Menu.prototype.initializeColumnHeader = function (column) { + var _this71 = this; + + var headerMenuEl; + + if (column.definition.headerContextMenu) { + column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); + this.tapHold(column, column.definition.headerContextMenu); + } + + // if(column.definition.headerClickMenu){ + // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); + // } + + if (column.definition.headerMenu) { + + headerMenuEl = document.createElement("span"); + headerMenuEl.classList.add("tabulator-header-menu-button"); + headerMenuEl.innerHTML = "⋮"; + + headerMenuEl.addEventListener("click", function (e) { + e.stopPropagation(); + e.preventDefault(); + + _this71.LoadMenuEvent(column, column.definition.headerMenu, e); + }); + + column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild); + } + }; + + Menu.prototype.LoadMenuEvent = function (component, menu, e) { + menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu; + + // if(component instanceof Cell){ + // e.stopImmediatePropagation(); + // } + + this.loadMenu(e, component, menu); + }; + + Menu.prototype.tapHold = function (component, menu) { + var _this72 = this; + + var element = component.getElement(), + tapHold = null, + loaded = false; + + element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + loaded = false; + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + loaded = true; + + _this72.LoadMenuEvent(component, menu, e); + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + + if (loaded) { + e.preventDefault(); + } + }); + }; + + Menu.prototype.initializeCell = function (cell) { + if (cell.column.definition.contextMenu) { + cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); + this.tapHold(cell, cell.column.definition.contextMenu); + } + + if (cell.column.definition.clickMenu) { + cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); + } + }; + + Menu.prototype.initializeRow = function (row) { + if (this.table.options.rowContextMenu) { + row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); + this.tapHold(row, this.table.options.rowContextMenu); + } + + if (this.table.options.rowClickMenu) { + row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); + } + }; + + Menu.prototype.initializeGroup = function (group) { + if (this.table.options.groupContextMenu) { + group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); + this.tapHold(group, this.table.options.groupContextMenu); + } + + if (this.table.options.groupClickMenu) { + group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); + } + }; + + Menu.prototype.loadMenu = function (e, component, menu, parentEl) { + var _this73 = this; + + var touch = !(e instanceof MouseEvent); + + var menuEl = document.createElement("div"); + menuEl.classList.add("tabulator-menu"); + + if (!touch) { + e.preventDefault(); + } + + //abort if no menu set + if (!menu || !menu.length) { + return; + } + + if (!parentEl) { + if (this.nestedMenuBlock) { + //abort if child menu already open + if (this.isOpen()) { + return; + } + } else { + this.nestedMenuBlock = setTimeout(function () { + _this73.nestedMenuBlock = false; + }, 100); + } + + this.hideMenu(); + this.menuElements = []; + } + + menu.forEach(function (item) { + var itemEl = document.createElement("div"), + label = item.label, + disabled = item.disabled; + + if (item.separator) { + itemEl.classList.add("tabulator-menu-separator"); + } else { + itemEl.classList.add("tabulator-menu-item"); + + if (typeof label == "function") { + label = label.call(_this73.table, component.getComponent()); + } + + if (label instanceof Node) { + itemEl.appendChild(label); + } else { + itemEl.innerHTML = label; + } + + if (typeof disabled == "function") { + disabled = disabled.call(_this73.table, component.getComponent()); + } + + if (disabled) { + itemEl.classList.add("tabulator-menu-item-disabled"); + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + }); + } else { + if (item.menu && item.menu.length) { + itemEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this73.hideOldSubMenus(menuEl); + _this73.loadMenu(e, component, item.menu, itemEl); + }); + } else { + if (item.action) { + itemEl.addEventListener("click", function (e) { + item.action(e, component.getComponent()); + }); + } + } + } + + if (item.menu && item.menu.length) { + itemEl.classList.add("tabulator-menu-item-submenu"); + } + } + + menuEl.appendChild(itemEl); + }); + + menuEl.addEventListener("click", function (e) { + _this73.hideMenu(); + }); + + this.menuElements.push(menuEl); + this.positionMenu(menuEl, parentEl, touch, e); + }; + + Menu.prototype.hideOldSubMenus = function (menuEl) { + var index = this.menuElements.indexOf(menuEl); + + if (index > -1) { + for (var _i13 = this.menuElements.length - 1; _i13 > index; _i13--) { + var el = this.menuElements[_i13]; + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + this.menuElements.pop(); + } + } + }; + + Menu.prototype.positionMenu = function (element, parentEl, touch, e) { + var _this74 = this; + + var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), + x, + y, + parentOffset; + + if (!parentEl) { + x = touch ? e.touches[0].pageX : e.pageX; + y = touch ? e.touches[0].pageY : e.pageY; + + this.positionReversedX = false; + } else { + parentOffset = Tabulator.prototype.helpers.elOffset(parentEl); + x = parentOffset.left + parentEl.offsetWidth; + y = parentOffset.top - 1; + } + + element.style.top = y + "px"; + element.style.left = x + "px"; + + setTimeout(function () { + _this74.table.rowManager.element.addEventListener("scroll", _this74.blurEvent); + document.body.addEventListener("click", _this74.blurEvent); + document.body.addEventListener("contextmenu", _this74.blurEvent); + window.addEventListener("resize", _this74.blurEvent); + document.body.addEventListener("keydown", _this74.escEvent); + }, 100); + + document.body.appendChild(element); + + //move menu to start on bottom edge if it is too close to the edge of the screen + if (y + element.offsetHeight >= docHeight) { + element.style.top = ""; + + if (parentEl) { + element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px"; + } else { + element.style.bottom = docHeight - y + "px"; + } + } + + //move menu to start on right edge if it is too close to the edge of the screen + if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) { + element.style.left = ""; + + if (parentEl) { + element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px"; + } else { + element.style.right = document.documentElement.offsetWidth - x + "px"; + } + + this.positionReversedX = true; + } + }; + + Menu.prototype.isOpen = function () { + return !!this.menuElements.length; + }; + + Menu.prototype.escMenu = function (e) { + if (e.keyCode == 27) { + this.hideMenu(); + } + }; + + Menu.prototype.hideMenu = function () { + this.menuElements.forEach(function (menuEl) { + if (menuEl.parentNode) { + menuEl.parentNode.removeChild(menuEl); + } + }); + + document.body.removeEventListener("keydown", this.escEvent); + document.body.removeEventListener("click", this.blurEvent); + document.body.removeEventListener("contextmenu", this.blurEvent); + window.removeEventListener("resize", this.blurEvent); + this.table.rowManager.element.removeEventListener("scroll", this.blurEvent); + }; + + //default accessors + Menu.prototype.menus = {}; + + Tabulator.prototype.registerModule("menu", Menu); + var MoveColumns = function MoveColumns(table) { + this.table = table; //hold Tabulator object + this.placeholderElement = this.createPlaceholderElement(); + this.hoverElement = false; //floating column header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving column + this.toCol = false; //destination column + this.toColAfter = false; //position of moving column relative to the desitnation column + this.startX = 0; //starting position within header element + this.autoScrollMargin = 40; //auto scroll on edge when within margin + this.autoScrollStep = 5; //auto scroll distance in pixels + this.autoScrollTimeout = false; //auto scroll timeout + this.touchMove = false; + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); + }; + + MoveColumns.prototype.createPlaceholderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + el.classList.add("tabulator-col-placeholder"); + + return el; + }; + + MoveColumns.prototype.initializeColumn = function (column) { + var self = this, + config = {}, + colEl; + + if (!column.modules.frozen) { + + colEl = column.getElement(); + + config.mousemove = function (e) { + if (column.parent === self.moving.parent) { + if ((self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { + if (self.toCol !== column || !self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); + self.moveColumn(column, true); + } + } else { + if (self.toCol !== column || self.toColAfter) { + colEl.parentNode.insertBefore(self.placeholderElement, colEl); + self.moveColumn(column, false); + } + } + } + }.bind(self); + + colEl.addEventListener("mousedown", function (e) { + self.touchMove = false; + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, column); + }, self.checkPeriod); + } + }); + + colEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + self.bindTouchEvents(column); + } + + column.modules.moveColumn = config; + }; + + MoveColumns.prototype.bindTouchEvents = function (column) { + var self = this, + colEl = column.getElement(), + startXMove = false, + //shifting center position of the cell + dir = false, + currentCol, + nextCol, + prevCol, + nextColWidth, + prevColWidth, + nextColWidthLast, + prevColWidthLast; + + colEl.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentCol = column; + nextCol = column.nextColumn(); + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = column.prevColumn(); + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + nextColWidthLast = 0; + prevColWidthLast = 0; + startXMove = false; + + self.startMove(e, column); + }, self.checkPeriod); + }, { passive: true }); + + colEl.addEventListener("touchmove", function (e) { + var halfCol, diff, moveToCol; + + if (self.moving) { + self.moveHover(e); + + if (!startXMove) { + startXMove = e.touches[0].pageX; + } + + diff = e.touches[0].pageX - startXMove; + + if (diff > 0) { + if (nextCol && diff - nextColWidthLast > nextColWidth) { + moveToCol = nextCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement().nextSibling); + self.moveColumn(moveToCol, true); + } + } + } else { + if (prevCol && -diff - prevColWidthLast > prevColWidth) { + moveToCol = prevCol; + + if (moveToCol !== column) { + startXMove = e.touches[0].pageX; + moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement()); + self.moveColumn(moveToCol, false); + } + } + } + + if (moveToCol) { + currentCol = moveToCol; + nextCol = moveToCol.nextColumn(); + nextColWidthLast = nextColWidth; + nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; + prevCol = moveToCol.prevColumn(); + prevColWidthLast = prevColWidth; + prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; + } + } + }, { passive: true }); + + colEl.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + } + }); + }; + + MoveColumns.prototype.startMove = function (e, column) { + var element = column.getElement(); + + this.moving = column; + this.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(element).left; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = column.getWidth() + "px"; + this.placeholderElement.style.height = column.getHeight() + "px"; + + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + this.table.columnManager.getElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.bottom = "0"; + + if (!this.touchMove) { + this._bindMouseMove(); + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + } + + this.moveHover(e); + }; + + MoveColumns.prototype._bindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); + }; + + MoveColumns.prototype._unbindMouseMove = function () { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.modules.moveColumn.mousemove) { + column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); + } + }); + }; + + MoveColumns.prototype.moveColumn = function (column, after) { + var movingCells = this.moving.getCells(); + + this.toCol = column; + this.toColAfter = after; + + if (after) { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + } else { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(true); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); + }); + } + }; + + MoveColumns.prototype.endMove = function (e) { + if (e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toCol) { + this.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter); + } + + this.moving = false; + this.toCol = false; + this.toColAfter = false; + + if (!this.touchMove) { + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + } + } + }; + + MoveColumns.prototype.moveHover = function (e) { + var self = this, + columnHolder = self.table.columnManager.getElement(), + scrollLeft = columnHolder.scrollLeft, + xPos = (self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, + scrollPos; + + self.hoverElement.style.left = xPos - self.startX + "px"; + + if (xPos - scrollLeft < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.max(0, scrollLeft - 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } + + if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { + if (!self.autoScrollTimeout) { + self.autoScrollTimeout = setTimeout(function () { + scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); + self.table.rowManager.getElement().scrollLeft = scrollPos; + self.autoScrollTimeout = false; + }, 1); + } + } + }; + + Tabulator.prototype.registerModule("moveColumn", MoveColumns); + + var MoveRows = function MoveRows(table) { + + this.table = table; //hold Tabulator object + this.placeholderElement = this.createPlaceholderElement(); + this.hoverElement = false; //floating row header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving row + this.toRow = false; //destination row + this.toRowAfter = false; //position of moving row relative to the desitnation row + this.hasHandle = false; //row has handle instead of fully movable row + this.startY = 0; //starting Y position within header element + this.startX = 0; //starting X position within header element + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); + this.tableRowDropEvent = false; + + this.touchMove = false; + + this.connection = false; + this.connectionSelectorsTables = false; + this.connectionSelectorsElements = false; + this.connectionElements = []; + this.connections = []; + + this.connectedTable = false; + this.connectedRow = false; + }; + + MoveRows.prototype.createPlaceholderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + el.classList.add("tabulator-row-placeholder"); + + return el; + }; + + MoveRows.prototype.initialize = function (handle) { + this.connectionSelectorsTables = this.table.options.movableRowsConnectedTables; + this.connectionSelectorsElements = this.table.options.movableRowsConnectedElements; + + this.connection = this.connectionSelectorsTables || this.connectionSelectorsElements; + }; + + MoveRows.prototype.setHandle = function (handle) { + this.hasHandle = handle; + }; + + MoveRows.prototype.initializeGroupHeader = function (group) { + var self = this, + config = {}, + rowEl; + + //inter table drag drop + config.mouseup = function (e) { + self.tableRowDrop(e, row); + }.bind(self); + + //same table drag drop + config.mousemove = function (e) { + if (e.pageY - Tabulator.prototype.helpers.elOffset(group.element).top + self.table.rowManager.element.scrollTop > group.getHeight() / 2) { + if (self.toRow !== group || !self.toRowAfter) { + var rowEl = group.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(group, true); + } + } else { + if (self.toRow !== group || self.toRowAfter) { + var rowEl = group.getElement(); + if (rowEl.previousSibling) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(group, false); + } + } + } + }.bind(self); + + group.modules.moveRow = config; + }; + + MoveRows.prototype.initializeRow = function (row) { + var self = this, + config = {}, + rowEl; + + //inter table drag drop + config.mouseup = function (e) { + self.tableRowDrop(e, row); + }.bind(self); + + //same table drag drop + config.mousemove = function (e) { + var rowEl = row.getElement(); + + if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { + if (self.toRow !== row || !self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + } else { + if (self.toRow !== row || self.toRowAfter) { + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); + self.moveRow(row, false); + } + } + }.bind(self); + + if (!this.hasHandle) { + + rowEl = row.getElement(); + + rowEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, row); + }, self.checkPeriod); + } + }); + + rowEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(row, row.getElement()); + } + + row.modules.moveRow = config; + }; + + MoveRows.prototype.initializeCell = function (cell) { + var self = this, + cellEl = cell.getElement(true); + + cellEl.addEventListener("mousedown", function (e) { + if (e.which === 1) { + self.checkTimeout = setTimeout(function () { + self.startMove(e, cell.row); + }, self.checkPeriod); + } + }); + + cellEl.addEventListener("mouseup", function (e) { + if (e.which === 1) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + } + }); + + this.bindTouchEvents(cell.row, cellEl); + }; + + MoveRows.prototype.bindTouchEvents = function (row, element) { + var self = this, + startYMove = false, + //shifting center position of the cell + dir = false, + currentRow, + nextRow, + prevRow, + nextRowHeight, + prevRowHeight, + nextRowHeightLast, + prevRowHeightLast; + + element.addEventListener("touchstart", function (e) { + self.checkTimeout = setTimeout(function () { + self.touchMove = true; + currentRow = row; + nextRow = row.nextRow(); + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = row.prevRow(); + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + nextRowHeightLast = 0; + prevRowHeightLast = 0; + startYMove = false; + + self.startMove(e, row); + }, self.checkPeriod); + }, { passive: true }); + this.moving, this.toRow, this.toRowAfter; + element.addEventListener("touchmove", function (e) { + + var halfCol, diff, moveToRow; + + if (self.moving) { + e.preventDefault(); + + self.moveHover(e); + + if (!startYMove) { + startYMove = e.touches[0].pageY; + } + + diff = e.touches[0].pageY - startYMove; + + if (diff > 0) { + if (nextRow && diff - nextRowHeightLast > nextRowHeight) { + moveToRow = nextRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement().nextSibling); + self.moveRow(moveToRow, true); + } + } + } else { + if (prevRow && -diff - prevRowHeightLast > prevRowHeight) { + moveToRow = prevRow; + + if (moveToRow !== row) { + startYMove = e.touches[0].pageY; + moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement()); + self.moveRow(moveToRow, false); + } + } + } + + if (moveToRow) { + currentRow = moveToRow; + nextRow = moveToRow.nextRow(); + nextRowHeightLast = nextRowHeight; + nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; + prevRow = moveToRow.prevRow(); + prevRowHeightLast = prevRowHeight; + prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; + } + } + }); + + element.addEventListener("touchend", function (e) { + if (self.checkTimeout) { + clearTimeout(self.checkTimeout); + } + if (self.moving) { + self.endMove(e); + self.touchMove = false; + } + }); + }; + + MoveRows.prototype._bindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); + }; + + MoveRows.prototype._unbindMouseMove = function () { + var self = this; + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { + row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); + } + }); + }; + + MoveRows.prototype.startMove = function (e, row) { + var element = row.getElement(); + + this.setStartPosition(e, row); + + this.moving = row; + + this.table.element.classList.add("tabulator-block-select"); + + //create placeholder + this.placeholderElement.style.width = row.getWidth() + "px"; + this.placeholderElement.style.height = row.getHeight() + "px"; + + if (!this.connection) { + element.parentNode.insertBefore(this.placeholderElement, element); + element.parentNode.removeChild(element); + } else { + this.table.element.classList.add("tabulator-movingrow-sending"); + this.connectToTables(row); + } + + //create hover element + this.hoverElement = element.cloneNode(true); + this.hoverElement.classList.add("tabulator-moving"); + + if (this.connection) { + document.body.appendChild(this.hoverElement); + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + this.hoverElement.style.width = this.table.element.clientWidth + "px"; + this.hoverElement.style.whiteSpace = "nowrap"; + this.hoverElement.style.overflow = "hidden"; + this.hoverElement.style.pointerEvents = "none"; + } else { + this.table.rowManager.getTableElement().appendChild(this.hoverElement); + + this.hoverElement.style.left = "0"; + this.hoverElement.style.top = "0"; + + this._bindMouseMove(); + } + + document.body.addEventListener("mousemove", this.moveHover); + document.body.addEventListener("mouseup", this.endMove); + + this.moveHover(e); + }; + + MoveRows.prototype.setStartPosition = function (e, row) { + var pageX = this.touchMove ? e.touches[0].pageX : e.pageX, + pageY = this.touchMove ? e.touches[0].pageY : e.pageY, + element, + position; + + element = row.getElement(); + if (this.connection) { + position = element.getBoundingClientRect(); + + this.startX = position.left - pageX + window.pageXOffset; + this.startY = position.top - pageY + window.pageYOffset; + } else { + this.startY = pageY - element.getBoundingClientRect().top; + } + }; + + MoveRows.prototype.endMove = function (e) { + if (!e || e.which === 1 || this.touchMove) { + this._unbindMouseMove(); + + if (!this.connection) { + this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); + this.placeholderElement.parentNode.removeChild(this.placeholderElement); + } + + this.hoverElement.parentNode.removeChild(this.hoverElement); + + this.table.element.classList.remove("tabulator-block-select"); + + if (this.toRow) { + this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); + } + + this.moving = false; + this.toRow = false; + this.toRowAfter = false; + + document.body.removeEventListener("mousemove", this.moveHover); + document.body.removeEventListener("mouseup", this.endMove); + + if (this.connection) { + this.table.element.classList.remove("tabulator-movingrow-sending"); + this.disconnectFromTables(); + } + } + }; + + MoveRows.prototype.moveRow = function (row, after) { + this.toRow = row; + this.toRowAfter = after; + }; + + MoveRows.prototype.moveHover = function (e) { + if (this.connection) { + this.moveHoverConnections.call(this, e); + } else { + this.moveHoverTable.call(this, e); + } + }; + + MoveRows.prototype.moveHoverTable = function (e) { + var rowHolder = this.table.rowManager.getElement(), + scrollTop = rowHolder.scrollTop, + yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop, + scrollPos; + + this.hoverElement.style.top = yPos - this.startY + "px"; + }; + + MoveRows.prototype.moveHoverConnections = function (e) { + this.hoverElement.style.left = this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX) + "px"; + this.hoverElement.style.top = this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY) + "px"; + }; + + MoveRows.prototype.elementRowDrop = function (e, element, row) { + if (this.table.options.movableRowsElementDrop) { + this.table.options.movableRowsElementDrop(e, element, row ? row.getComponent() : false); + } + }; + + //establish connection with other tables + MoveRows.prototype.connectToTables = function (row) { + var _this75 = this; + + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStart.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "connect", { + row: row + }); + } + + if (this.connectionSelectorsElements) { + + this.connectionElements = []; + + if (!Array.isArray(this.connectionSelectorsElements)) { + this.connectionSelectorsElements = [this.connectionSelectorsElements]; + } + + this.connectionSelectorsElements.forEach(function (query) { + if (typeof query === "string") { + _this75.connectionElements = _this75.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); + } else { + _this75.connectionElements.push(query); + } + }); + + this.connectionElements.forEach(function (element) { + var dropEvent = function dropEvent(e) { + _this75.elementRowDrop(e, element, _this75.moving); + }; + + element.addEventListener("mouseup", dropEvent); + element.tabulatorElementDropEvent = dropEvent; + + element.classList.add("tabulator-movingrow-receiving"); + }); + } + }; + + //disconnect from other tables + MoveRows.prototype.disconnectFromTables = function () { + var connectionTables; + + if (this.connectionSelectorsTables) { + connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); + + this.table.options.movableRowsSendingStop.call(this.table, connectionTables); + + this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "disconnect"); + } + + this.connectionElements.forEach(function (element) { + element.classList.remove("tabulator-movingrow-receiving"); + element.removeEventListener("mouseup", element.tabulatorElementDropEvent); + delete element.tabulatorElementDropEvent; + }); + }; + + //accept incomming connection + MoveRows.prototype.connect = function (table, row) { + var self = this; + if (!this.connectedTable) { + this.connectedTable = table; + this.connectedRow = row; + + this.table.element.classList.add("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.tableRowDropEvent = self.tableRowDrop.bind(self); + + self.table.element.addEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStart.call(this.table, row, table); + + return true; + } else { + console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); + return false; + } + }; + + //close incomming connection + MoveRows.prototype.disconnect = function (table) { + var self = this; + if (table === this.connectedTable) { + this.connectedTable = false; + this.connectedRow = false; + + this.table.element.classList.remove("tabulator-movingrow-receiving"); + + self.table.rowManager.getDisplayRows().forEach(function (row) { + if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { + row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); + } + }); + + self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); + + this.table.options.movableRowsReceivingStop.call(this.table, table); + } else { + console.warn("Move Row Error - trying to disconnect from non connected table"); + } + }; + + MoveRows.prototype.dropComplete = function (table, row, success) { + var sender = false; + + if (success) { + + switch (_typeof(this.table.options.movableRowsSender)) { + case "string": + sender = this.senders[this.table.options.movableRowsSender]; + break; + + case "function": + sender = this.table.options.movableRowsSender; + break; + } + + if (sender) { + sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + if (this.table.options.movableRowsSender) { + console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); + } + } + + this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } else { + this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); + } + + this.endMove(); + }; + + MoveRows.prototype.tableRowDrop = function (e, row) { + var receiver = false, + success = false; + + console.trace("drop"); + + e.stopImmediatePropagation(); + + switch (_typeof(this.table.options.movableRowsReceiver)) { + case "string": + receiver = this.receivers[this.table.options.movableRowsReceiver]; + break; + + case "function": + receiver = this.table.options.movableRowsReceiver; + break; + } + + if (receiver) { + success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); + } + + if (success) { + this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } else { + this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); + } + + this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { + row: row, + success: success + }); + }; + + MoveRows.prototype.receivers = { + insert: function insert(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData(), undefined, toRow); + return true; + }, + + add: function add(fromRow, toRow, fromTable) { + this.table.addRow(fromRow.getData()); + return true; + }, + + update: function update(fromRow, toRow, fromTable) { + if (toRow) { + toRow.update(fromRow.getData()); + return true; + } + + return false; + }, + + replace: function replace(fromRow, toRow, fromTable) { + if (toRow) { + this.table.addRow(fromRow.getData(), undefined, toRow); + toRow.delete(); + return true; + } + + return false; + } + }; + + MoveRows.prototype.senders = { + delete: function _delete(fromRow, toRow, toTable) { + fromRow.delete(); + } + }; + + MoveRows.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "connect": + return this.connect(table, data.row); + break; + + case "disconnect": + return this.disconnect(table); + break; + + case "dropcomplete": + return this.dropComplete(table, data.row, data.success); + break; + } + }; + + Tabulator.prototype.registerModule("moveRow", MoveRows); + var Mutator = function Mutator(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types + this.enabled = true; + }; + + //initialize column mutator + Mutator.prototype.initializeColumn = function (column) { + var self = this, + match = false, + config = {}; + + this.allowedTypes.forEach(function (type) { + var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + mutator; + + if (column.definition[key]) { + mutator = self.lookupMutator(column.definition[key]); + + if (mutator) { + match = true; + + config[key] = { + mutator: mutator, + params: column.definition[key + "Params"] || {} + }; + } + } + }); + + if (match) { + column.modules.mutate = config; + } + }; + + Mutator.prototype.lookupMutator = function (value) { + var mutator = false; + + //set column mutator + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + if (this.mutators[value]) { + mutator = this.mutators[value]; + } else { + console.warn("Mutator Error - No such mutator found, ignoring: ", value); + } + break; + + case "function": + mutator = value; + break; + } + + return mutator; + }; + + //apply mutator to row + Mutator.prototype.transformRow = function (data, type, updatedData) { + var self = this, + key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), + value; + + if (this.enabled) { + + self.table.columnManager.traverse(function (column) { + var mutator, params, component; + + if (column.modules.mutate) { + mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; + + if (mutator) { + value = column.getFieldValue(typeof updatedData !== "undefined" ? updatedData : data); + + if (type == "data" || typeof value !== "undefined") { + component = column.getComponent(); + params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; + column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); + } + } + } + }); + } + + return data; + }; + + //apply mutator to new cell value + Mutator.prototype.transformCell = function (cell, value) { + var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false, + tempData = {}; + + if (mutator) { + tempData = Object.assign(tempData, cell.row.getData()); + cell.column.setFieldValue(tempData, value); + return mutator.mutator(value, tempData, "edit", mutator.params, cell.getComponent()); + } else { + return value; + } + }; + + Mutator.prototype.enable = function () { + this.enabled = true; + }; + + Mutator.prototype.disable = function () { + this.enabled = false; + }; + + //default mutators + Mutator.prototype.mutators = {}; + + Tabulator.prototype.registerModule("mutator", Mutator); + var Page = function Page(table) { + + this.table = table; //hold Tabulator object + + this.mode = "local"; + this.progressiveLoad = false; + + this.size = 0; + this.page = 1; + this.count = 5; + this.max = 1; + + this.displayIndex = 0; //index in display pipeline + + this.initialLoad = true; + + this.pageSizes = []; + + this.dataReceivedNames = {}; + this.dataSentNames = {}; + + this.createElements(); + }; + + Page.prototype.createElements = function () { + + var button; + + this.element = document.createElement("span"); + this.element.classList.add("tabulator-paginator"); + + this.pagesElement = document.createElement("span"); + this.pagesElement.classList.add("tabulator-pages"); + + button = document.createElement("button"); + button.classList.add("tabulator-page"); + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + button.setAttribute("aria-label", ""); + button.setAttribute("title", ""); + + this.firstBut = button.cloneNode(true); + this.firstBut.setAttribute("data-page", "first"); + + this.prevBut = button.cloneNode(true); + this.prevBut.setAttribute("data-page", "prev"); + + this.nextBut = button.cloneNode(true); + this.nextBut.setAttribute("data-page", "next"); + + this.lastBut = button.cloneNode(true); + this.lastBut.setAttribute("data-page", "last"); + + if (this.table.options.paginationSizeSelector) { + this.pageSizeSelect = document.createElement("select"); + this.pageSizeSelect.classList.add("tabulator-page-size"); + } + }; + + Page.prototype.generatePageSizeSelectList = function () { + var _this76 = this; + + var pageSizes = []; + + if (this.pageSizeSelect) { + + if (Array.isArray(this.table.options.paginationSizeSelector)) { + pageSizes = this.table.options.paginationSizeSelector; + this.pageSizes = pageSizes; + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes.unshift(this.size); + } + } else { + + if (this.pageSizes.indexOf(this.size) == -1) { + pageSizes = []; + + for (var _i14 = 1; _i14 < 5; _i14++) { + pageSizes.push(this.size * _i14); + } + + this.pageSizes = pageSizes; + } else { + pageSizes = this.pageSizes; + } + } + + while (this.pageSizeSelect.firstChild) { + this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild); + }pageSizes.forEach(function (item) { + var itemEl = document.createElement("option"); + itemEl.value = item; + + if (item === true) { + _this76.table.modules.localize.bind("pagination|all", function (value) { + itemEl.innerHTML = value; + }); + } else { + itemEl.innerHTML = item; + } + + _this76.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } + }; + + //setup pageination + Page.prototype.initialize = function (hidden) { + var self = this, + pageSelectLabel, + testElRow, + testElCell; + + //update param names + this.dataSentNames = Object.assign({}, this.paginationDataSentNames); + this.dataSentNames = Object.assign(this.dataSentNames, this.table.options.paginationDataSent); + + this.dataReceivedNames = Object.assign({}, this.paginationDataReceivedNames); + this.dataReceivedNames = Object.assign(this.dataReceivedNames, this.table.options.paginationDataReceived); + + //build pagination element + + //bind localizations + self.table.modules.localize.bind("pagination|first", function (value) { + self.firstBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|first_title", function (value) { + self.firstBut.setAttribute("aria-label", value); + self.firstBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|prev", function (value) { + self.prevBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|prev_title", function (value) { + self.prevBut.setAttribute("aria-label", value); + self.prevBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|next", function (value) { + self.nextBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|next_title", function (value) { + self.nextBut.setAttribute("aria-label", value); + self.nextBut.setAttribute("title", value); + }); + + self.table.modules.localize.bind("pagination|last", function (value) { + self.lastBut.innerHTML = value; + }); + + self.table.modules.localize.bind("pagination|last_title", function (value) { + self.lastBut.setAttribute("aria-label", value); + self.lastBut.setAttribute("title", value); + }); + + //click bindings + self.firstBut.addEventListener("click", function () { + self.setPage(1).then(function () {}).catch(function () {}); + }); + + self.prevBut.addEventListener("click", function () { + self.previousPage().then(function () {}).catch(function () {}); + }); + + self.nextBut.addEventListener("click", function () { + self.nextPage().then(function () {}).catch(function () {}); + }); + + self.lastBut.addEventListener("click", function () { + self.setPage(self.max).then(function () {}).catch(function () {}); + }); + + if (self.table.options.paginationElement) { + self.element = self.table.options.paginationElement; + } + + if (this.pageSizeSelect) { + pageSelectLabel = document.createElement("label"); + + self.table.modules.localize.bind("pagination|page_size", function (value) { + self.pageSizeSelect.setAttribute("aria-label", value); + self.pageSizeSelect.setAttribute("title", value); + pageSelectLabel.innerHTML = value; + }); + + self.element.appendChild(pageSelectLabel); + self.element.appendChild(self.pageSizeSelect); + + self.pageSizeSelect.addEventListener("change", function (e) { + self.setPageSize(self.pageSizeSelect.value == "true" ? true : self.pageSizeSelect.value); + self.setPage(1).then(function () {}).catch(function () {}); + }); + } + + //append to DOM + self.element.appendChild(self.firstBut); + self.element.appendChild(self.prevBut); + self.element.appendChild(self.pagesElement); + self.element.appendChild(self.nextBut); + self.element.appendChild(self.lastBut); + + if (!self.table.options.paginationElement && !hidden) { + self.table.footerManager.append(self.element, self); + } + + //set default values + self.mode = self.table.options.pagination; + + if (self.table.options.paginationSize) { + self.size = self.table.options.paginationSize; + } else { + testElRow = document.createElement("div"); + testElRow.classList.add("tabulator-row"); + testElRow.style.visibility = hidden; + + testElCell = document.createElement("div"); + testElCell.classList.add("tabulator-cell"); + testElCell.innerHTML = "Page Row Test"; + + testElRow.appendChild(testElCell); + + self.table.rowManager.getTableElement().appendChild(testElRow); + + self.size = Math.floor(self.table.rowManager.getElement().clientHeight / testElRow.offsetHeight); + + self.table.rowManager.getTableElement().removeChild(testElRow); + } + + // self.page = self.table.options.paginationInitialPage || 1; + self.count = self.table.options.paginationButtonCount; + + self.generatePageSizeSelectList(); + }; + + Page.prototype.initializeProgressive = function (mode) { + this.initialize(true); + this.mode = "progressive_" + mode; + this.progressiveLoad = true; + }; + + Page.prototype.setDisplayIndex = function (index) { + this.displayIndex = index; + }; + + Page.prototype.getDisplayIndex = function () { + return this.displayIndex; + }; + + //calculate maximum page from number of rows + Page.prototype.setMaxRows = function (rowCount) { + if (!rowCount) { + this.max = 1; + } else { + this.max = this.size === true ? 1 : Math.ceil(rowCount / this.size); + } + + if (this.page > this.max) { + this.page = this.max; + } + }; + + //reset to first page without triggering action + Page.prototype.reset = function (force, columnsChanged) { + if (this.mode == "local" || force) { + this.page = 1; + } + + if (columnsChanged) { + this.initialLoad = true; + } + + return true; + }; + + //set the maxmum page + Page.prototype.setMaxPage = function (max) { + + max = parseInt(max); + + this.max = max || 1; + + if (this.page > this.max) { + this.page = this.max; + this.trigger(); + } + }; + + //set current page number + Page.prototype.setPage = function (page) { + var _this77 = this; + + var self = this; + + switch (page) { + case "first": + return this.setPage(1); + break; + + case "prev": + return this.previousPage(); + break; + + case "next": + return this.nextPage(); + break; + + case "last": + return this.setPage(this.max); + break; + } + + return new Promise(function (resolve, reject) { + + page = parseInt(page); + + if (page > 0 && page <= _this77.max) { + _this77.page = page; + _this77.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.page) { + self.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Requested page is out of range of 1 - " + _this77.max + ":", page); + reject(); + } + }); + }; + + Page.prototype.setPageToRow = function (row) { + var _this78 = this; + + return new Promise(function (resolve, reject) { + + var rows = _this78.table.rowManager.getDisplayRows(_this78.displayIndex - 1); + var index = rows.indexOf(row); + + if (index > -1) { + var page = _this78.size === true ? 1 : Math.ceil((index + 1) / _this78.size); + + _this78.setPage(page).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Requested row is not visible"); + reject(); + } + }); + }; + + Page.prototype.setPageSize = function (size) { + if (size !== true) { + size = parseInt(size); + } + + if (size > 0) { + this.size = size; + } + + if (this.pageSizeSelect) { + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.page) { + this.table.modules.persistence.save("page"); + } + }; + + //setup the pagination buttons + Page.prototype._setPageButtons = function () { + var self = this; + + var leftSize = Math.floor((this.count - 1) / 2); + var rightSize = Math.ceil((this.count - 1) / 2); + var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); + var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); + + while (self.pagesElement.firstChild) { + self.pagesElement.removeChild(self.pagesElement.firstChild); + }if (self.page == 1) { + self.firstBut.disabled = true; + self.prevBut.disabled = true; + } else { + self.firstBut.disabled = false; + self.prevBut.disabled = false; + } + + if (self.page == self.max) { + self.lastBut.disabled = true; + self.nextBut.disabled = true; + } else { + self.lastBut.disabled = false; + self.nextBut.disabled = false; + } + + for (var _i15 = min; _i15 <= max; _i15++) { + if (_i15 > 0 && _i15 <= self.max) { + self.pagesElement.appendChild(self._generatePageButton(_i15)); + } + } + + this.footerRedraw(); + }; + + Page.prototype._generatePageButton = function (page) { + var self = this, + button = document.createElement("button"); + + button.classList.add("tabulator-page"); + if (page == self.page) { + button.classList.add("active"); + } + + button.setAttribute("type", "button"); + button.setAttribute("role", "button"); + + self.table.modules.localize.bind("pagination|page_title", function (value) { + button.setAttribute("aria-label", value + " " + page); + button.setAttribute("title", value + " " + page); + }); + + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function (e) { + self.setPage(page).then(function () {}).catch(function () {}); + }); + + return button; + }; + + //previous page + Page.prototype.previousPage = function () { + var _this79 = this; + + return new Promise(function (resolve, reject) { + if (_this79.page > 1) { + _this79.page--; + _this79.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) { + _this79.table.modules.persistence.save("page"); + } + } else { + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + reject(); + } + }); + }; + + //next page + Page.prototype.nextPage = function () { + var _this80 = this; + + return new Promise(function (resolve, reject) { + if (_this80.page < _this80.max) { + _this80.page++; + _this80.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + + if (_this80.table.options.persistence && _this80.table.modExists("persistence", true) && _this80.table.modules.persistence.config.page) { + _this80.table.modules.persistence.save("page"); + } + } else { + if (!_this80.progressiveLoad) { + console.warn("Pagination Error - Next page would be greater than maximum page of " + _this80.max + ":", _this80.max + 1); + } + reject(); + } + }); + }; + + //return current page number + Page.prototype.getPage = function () { + return this.page; + }; + + //return max page number + Page.prototype.getPageMax = function () { + return this.max; + }; + + Page.prototype.getPageSize = function (size) { + return this.size; + }; + + Page.prototype.getMode = function () { + return this.mode; + }; + + //return appropriate rows for current page + Page.prototype.getRows = function (data) { + var output, start, end; + + if (this.mode == "local") { + output = []; + + if (this.size === true) { + start = 0; + end = data.length; + } else { + start = this.size * (this.page - 1); + end = start + parseInt(this.size); + } + + this._setPageButtons(); + + for (var _i16 = start; _i16 < end; _i16++) { + if (data[_i16]) { + output.push(data[_i16]); + } + } + + return output; + } else { + + this._setPageButtons(); + + return data.slice(0); + } + }; + + Page.prototype.trigger = function () { + var _this81 = this; + + var left; + + return new Promise(function (resolve, reject) { + + switch (_this81.mode) { + case "local": + left = _this81.table.rowManager.scrollLeft; + + _this81.table.rowManager.refreshActiveData("page"); + _this81.table.rowManager.scrollHorizontal(left); + + _this81.table.options.pageLoaded.call(_this81.table, _this81.getPage()); + resolve(); + break; + + case "remote": + case "progressive_load": + case "progressive_scroll": + _this81.table.modules.ajax.blockActiveRequest(); + _this81._getRemotePage().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", _this81.mode); + reject(); + } + }); + }; + + Page.prototype._getRemotePage = function () { + var _this82 = this; + + var self = this, + oldParams, + pageParams; + + return new Promise(function (resolve, reject) { + + if (!self.table.modExists("ajax", true)) { + reject(); + } + + //record old params and restore after request has been made + oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); + pageParams = self.table.modules.ajax.getParams(); + + //configure request params + pageParams[_this82.dataSentNames.page] = self.page; + + //set page size if defined + if (_this82.size) { + pageParams[_this82.dataSentNames.size] = _this82.size; + } + + //set sort data if defined + if (_this82.table.options.ajaxSorting && _this82.table.modExists("sort")) { + var sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + pageParams[_this82.dataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (_this82.table.options.ajaxFiltering && _this82.table.modExists("filter")) { + var filters = self.table.modules.filter.getFilters(true, true); + pageParams[_this82.dataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(pageParams); + + self.table.modules.ajax.sendRequest(_this82.progressiveLoad).then(function (data) { + self._parseRemoteData(data); + resolve(); + }).catch(function (e) { + reject(); + }); + + self.table.modules.ajax.setParams(oldParams); + }); + }; + + Page.prototype._parseRemoteData = function (data) { + var self = this, + left, + data, + margin; + + if (typeof data[this.dataReceivedNames.last_page] === "undefined") { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property"); + } + + if (data[this.dataReceivedNames.data]) { + this.max = parseInt(data[this.dataReceivedNames.last_page]) || 1; + + if (this.progressiveLoad) { + switch (this.mode) { + case "progressive_load": + + if (this.page == 1) { + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + } else { + this.table.rowManager.addRows(data[this.dataReceivedNames.data]); + } + + if (this.page < this.max) { + setTimeout(function () { + self.nextPage().then(function () {}).catch(function () {}); + }, self.table.options.ajaxProgressiveLoadDelay); + } + break; + + case "progressive_scroll": + data = this.table.rowManager.getData().concat(data[this.dataReceivedNames.data]); + + this.table.rowManager.setData(data, true, this.initialLoad && this.page == 1); + + margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; + + if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { + self.nextPage().then(function () {}).catch(function () {}); + } + break; + } + } else { + left = this.table.rowManager.scrollLeft; + + this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + + this.initialLoad = false; + } else { + console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property"); + } + }; + + //handle the footer element being redrawn + Page.prototype.footerRedraw = function () { + var footer = this.table.footerManager.element; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } else { + this.pagesElement.style.display = ''; + + if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { + this.pagesElement.style.display = 'none'; + } + } + }; + + //set the paramter names for pagination requests + Page.prototype.paginationDataSentNames = { + "page": "page", + "size": "size", + "sorters": "sorters", + // "sort_dir":"sort_dir", + "filters": "filters" + // "filter_value":"filter_value", + // "filter_type":"filter_type", + }; + + //set the property names for pagination responses + Page.prototype.paginationDataReceivedNames = { + "current_page": "current_page", + "last_page": "last_page", + "data": "data" + }; + + Tabulator.prototype.registerModule("page", Page); + + var Persistence = function Persistence(table) { + this.table = table; //hold Tabulator object + this.mode = ""; + this.id = ""; + // this.persistProps = ["field", "width", "visible"]; + this.defWatcherBlock = false; + this.config = {}; + this.readFunc = false; + this.writeFunc = false; + }; + + // Test for whether localStorage is available for use. + Persistence.prototype.localStorageTest = function () { + var testKey = "_tabulator_test"; + + try { + window.localStorage.setItem(testKey, testKey); + window.localStorage.removeItem(testKey); + return true; + } catch (e) { + return false; + } + }; + + //setup parameters + Persistence.prototype.initialize = function () { + //determine persistent layout storage type + + var mode = this.table.options.persistenceMode, + id = this.table.options.persistenceID, + retreivedData; + + this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie"; + + if (this.table.options.persistenceReaderFunc) { + if (typeof this.table.options.persistenceReaderFunc === "function") { + this.readFunc = this.table.options.persistenceReaderFunc; + } else { + if (this.readers[this.table.options.persistenceReaderFunc]) { + this.readFunc = this.readers[this.table.options.persistenceReaderFunc]; + } else { + console.warn("Persistence Read Error - invalid reader set", this.table.options.persistenceReaderFunc); + } + } + } else { + if (this.readers[this.mode]) { + this.readFunc = this.readers[this.mode]; + } else { + console.warn("Persistence Read Error - invalid reader set", this.mode); + } + } + + if (this.table.options.persistenceWriterFunc) { + if (typeof this.table.options.persistenceWriterFunc === "function") { + this.writeFunc = this.table.options.persistenceWriterFunc; + } else { + if (this.readers[this.table.options.persistenceWriterFunc]) { + this.writeFunc = this.readers[this.table.options.persistenceWriterFunc]; + } else { + console.warn("Persistence Write Error - invalid reader set", this.table.options.persistenceWriterFunc); + } + } + } else { + if (this.writers[this.mode]) { + this.writeFunc = this.writers[this.mode]; + } else { + console.warn("Persistence Write Error - invalid writer set", this.mode); + } + } + + //set storage tag + this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); + + this.config = { + sort: this.table.options.persistence === true || this.table.options.persistence.sort, + filter: this.table.options.persistence === true || this.table.options.persistence.filter, + group: this.table.options.persistence === true || this.table.options.persistence.group, + page: this.table.options.persistence === true || this.table.options.persistence.page, + columns: this.table.options.persistence === true ? ["title", "width", "visible"] : this.table.options.persistence.columns + }; + + //load pagination data if needed + if (this.config.page) { + retreivedData = this.retreiveData("page"); + + if (retreivedData) { + if (typeof retreivedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) { + this.table.options.paginationSize = retreivedData.paginationSize; + } + + if (typeof retreivedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) { + this.table.options.paginationInitialPage = retreivedData.paginationInitialPage; + } + } + } + + //load group data if needed + if (this.config.group) { + retreivedData = this.retreiveData("group"); + + if (retreivedData) { + if (typeof retreivedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) { + this.table.options.groupBy = retreivedData.groupBy; + } + if (typeof retreivedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) { + this.table.options.groupStartOpen = retreivedData.groupStartOpen; + } + if (typeof retreivedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) { + this.table.options.groupHeader = retreivedData.groupHeader; + } + } + } + + if (this.config.columns) { + this.load("columns", this.table.options.columns); + } + }; + + Persistence.prototype.initializeColumn = function (column) { + var self = this, + def, + keys; + + if (this.config.columns) { + this.defWatcherBlock = true; + + def = column.getDefinition(); + + keys = this.config.columns === true ? Object.keys(def) : this.config.columns; + + keys.forEach(function (key) { + var props = Object.getOwnPropertyDescriptor(def, key); + var value = def[key]; + if (props) { + Object.defineProperty(def, key, { + set: function set(newValue) { + value = newValue; + + if (!self.defWatcherBlock) { + self.save("columns"); + } + + if (props.set) { + props.set(newValue); + } + }, + get: function get() { + if (props.get) { + props.get(); + } + return value; + } + }); + } + }); + + this.defWatcherBlock = false; + } + }; + + //load saved definitions + Persistence.prototype.load = function (type, current) { + var data = this.retreiveData(type); + + if (current) { + data = data ? this.mergeDefinition(current, data) : current; + } + + return data; + }; + + //retreive data from memory + Persistence.prototype.retreiveData = function (type) { + return this.readFunc ? this.readFunc(this.id, type) : false; + }; + + //merge old and new column definitions + Persistence.prototype.mergeDefinition = function (oldCols, newCols) { + var self = this, + output = []; + + // oldCols = oldCols || []; + newCols = newCols || []; + + newCols.forEach(function (column, to) { + + var from = self._findColumn(oldCols, column), + keys; + + if (from) { + + if (self.config.columns === true || self.config.columns == undefined) { + keys = Object.keys(from); + keys.push("width"); + } else { + keys = self.config.columns; + } + + keys.forEach(function (key) { + if (key !== "columns" && typeof column[key] !== "undefined") { + from[key] = column[key]; + } + }); + + if (from.columns) { + from.columns = self.mergeDefinition(from.columns, column.columns); + } + + output.push(from); + } + }); + + oldCols.forEach(function (column, i) { + var from = self._findColumn(newCols, column); + if (!from) { + if (output.length > i) { + output.splice(i, 0, column); + } else { + output.push(column); + } + } + }); + + return output; + }; + + //find matching columns + Persistence.prototype._findColumn = function (columns, subject) { + var type = subject.columns ? "group" : subject.field ? "field" : "object"; + + return columns.find(function (col) { + switch (type) { + case "group": + return col.title === subject.title && col.columns.length === subject.columns.length; + break; + + case "field": + return col.field === subject.field; + break; + + case "object": + return col === subject; + break; + } + }); + }; + + //save data + Persistence.prototype.save = function (type) { + var data = {}; + + switch (type) { + case "columns": + data = this.parseColumns(this.table.columnManager.getColumns()); + break; + + case "filter": + data = this.table.modules.filter.getFilters(); + break; + + case "sort": + data = this.validateSorters(this.table.modules.sort.getSort()); + break; + + case "group": + data = this.getGroupConfig(); + break; + + case "page": + data = this.getPageConfig(); + break; + } + + if (this.writeFunc) { + this.writeFunc(this.id, type, data); + } + }; + + //ensure sorters contain no function data + Persistence.prototype.validateSorters = function (data) { + data.forEach(function (item) { + item.column = item.field; + delete item.field; + }); + + return data; + }; + + Persistence.prototype.getGroupConfig = function () { + var data = {}; + + if (this.config.group) { + if (this.config.group === true || this.config.group.groupBy) { + data.groupBy = this.table.options.groupBy; + } + + if (this.config.group === true || this.config.group.groupStartOpen) { + data.groupStartOpen = this.table.options.groupStartOpen; + } + + if (this.config.group === true || this.config.group.groupHeader) { + data.groupHeader = this.table.options.groupHeader; + } + } + + return data; + }; + + Persistence.prototype.getPageConfig = function () { + var data = {}; + + if (this.config.page) { + if (this.config.page === true || this.config.page.size) { + data.paginationSize = this.table.modules.page.getPageSize(); + } + + if (this.config.page === true || this.config.page.page) { + data.paginationInitialPage = this.table.modules.page.getPage(); + } + } + + return data; + }; + + //parse columns for data to store + Persistence.prototype.parseColumns = function (columns) { + var self = this, + definitions = [], + excludedKeys = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; + + columns.forEach(function (column) { + var defStore = {}, + colDef = column.getDefinition(), + keys; + + if (column.isGroup) { + defStore.title = colDef.title; + defStore.columns = self.parseColumns(column.getColumns()); + } else { + defStore.field = column.getField(); + + if (self.config.columns === true || self.config.columns == undefined) { + keys = Object.keys(colDef); + keys.push("width"); + } else { + keys = self.config.columns; + } + + keys.forEach(function (key) { + + switch (key) { + case "width": + defStore.width = column.getWidth(); + break; + case "visible": + defStore.visible = column.visible; + break; + + default: + if (typeof colDef[key] !== "function" && excludedKeys.indexOf(key) === -1) { + defStore[key] = colDef[key]; + } + } + }); + } + + definitions.push(defStore); + }); + + return definitions; + }; + + // read peristence information from storage + Persistence.prototype.readers = { + local: function local(id, type) { + var data = localStorage.getItem(id + "-" + type); + + return data ? JSON.parse(data) : false; + }, + cookie: function cookie(id, type) { + var cookie = document.cookie, + key = id + "-" + type, + cookiePos = cookie.indexOf(key + "="), + end, + data; + + //if cookie exists, decode and load column data into tabulator + if (cookiePos > -1) { + cookie = cookie.substr(cookiePos); + + end = cookie.indexOf(";"); + + if (end > -1) { + cookie = cookie.substr(0, end); + } + + data = cookie.replace(key + "=", ""); + } + + return data ? JSON.parse(data) : false; + } + }; + + //write persistence information to storage + Persistence.prototype.writers = { + local: function local(id, type, data) { + localStorage.setItem(id + "-" + type, JSON.stringify(data)); + }, + cookie: function cookie(id, type, data) { + var expireDate = new Date(); + + expireDate.setDate(expireDate.getDate() + 10000); + + document.cookie = id + "-" + type + "=" + JSON.stringify(data) + "; expires=" + expireDate.toUTCString(); + } + }; + + Tabulator.prototype.registerModule("persistence", Persistence); + + var Print = function Print(table) { + this.table = table; //hold Tabulator object + this.element = false; + this.manualBlock = false; + }; + + Print.prototype.initialize = function () { + window.addEventListener("beforeprint", this.replaceTable.bind(this)); + window.addEventListener("afterprint", this.cleanup.bind(this)); + }; + + Print.prototype.replaceTable = function () { + if (!this.manualBlock) { + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-table"); + + this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print")); + + this.table.element.style.display = "none"; + + this.table.element.parentNode.insertBefore(this.element, this.table.element); + } + }; + + Print.prototype.cleanup = function () { + document.body.classList.remove("tabulator-print-fullscreen-hide"); + + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + this.table.element.style.display = ""; + } + }; + + Print.prototype.printFullscreen = function (visible, style, config) { + var scrollX = window.scrollX, + scrollY = window.scrollY, + headerEl = document.createElement("div"), + footerEl = document.createElement("div"), + tableEl = this.table.modules.export.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printStyled, visible, "print"), + headerContent, + footerContent; + + this.manualBlock = true; + + this.element = document.createElement("div"); + this.element.classList.add("tabulator-print-fullscreen"); + + if (this.table.options.printHeader) { + headerEl.classList.add("tabulator-print-header"); + + headerContent = typeof this.table.options.printHeader == "function" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader; + + if (typeof headerContent == "string") { + headerEl.innerHTML = headerContent; + } else { + headerEl.appendChild(headerContent); + } + + this.element.appendChild(headerEl); + } + + this.element.appendChild(tableEl); + + if (this.table.options.printFooter) { + footerEl.classList.add("tabulator-print-footer"); + + footerContent = typeof this.table.options.printFooter == "function" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter; + + if (typeof footerContent == "string") { + footerEl.innerHTML = footerContent; + } else { + footerEl.appendChild(footerContent); + } + + this.element.appendChild(footerEl); + } + + document.body.classList.add("tabulator-print-fullscreen-hide"); + document.body.appendChild(this.element); + + if (this.table.options.printFormatter) { + this.table.options.printFormatter(this.element, tableEl); + } + + window.print(); + + this.cleanup(); + + window.scrollTo(scrollX, scrollY); + + this.manualBlock = false; + }; + + Tabulator.prototype.registerModule("print", Print); + var ReactiveData = function ReactiveData(table) { + this.table = table; //hold Tabulator object + this.data = false; + this.blocked = false; //block reactivity while performing update + this.origFuncs = {}; // hold original data array functions to allow replacement after data is done with + this.currentVersion = 0; + }; + + ReactiveData.prototype.watchData = function (data) { + var self = this, + pushFunc, + version; + + this.currentVersion++; + + version = this.currentVersion; + + self.unwatchData(); + + self.data = data; + + //override array push function + self.origFuncs.push = data.push; + + Object.defineProperty(self.data, "push", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, false); + }); + } + + return self.origFuncs.push.apply(data, arguments); + } + }); + + //override array unshift function + self.origFuncs.unshift = data.unshift; + + Object.defineProperty(self.data, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments); + + if (!self.blocked && version === self.currentVersion) { + args.forEach(function (arg) { + self.table.rowManager.addRowActual(arg, true); + }); + } + + return self.origFuncs.unshift.apply(data, arguments); + } + }); + + //override array shift function + self.origFuncs.shift = data.shift; + + Object.defineProperty(self.data, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var row; + + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[0]); + + if (row) { + row.deleteActual(); + } + } + } + + return self.origFuncs.shift.call(data); + } + }); + + //override array pop function + self.origFuncs.pop = data.pop; + + Object.defineProperty(self.data, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var row; + if (!self.blocked && version === self.currentVersion) { + if (self.data.length) { + row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]); + + if (row) { + row.deleteActual(); + } + } + } + return self.origFuncs.pop.call(data); + } + }); + + //override array splice function + self.origFuncs.splice = data.splice; + + Object.defineProperty(self.data, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var args = Array.from(arguments), + start = args[0] < 0 ? data.length + args[0] : args[0], + end = args[1], + newRows = args[2] ? args.slice(2) : false, + startRow; + + if (!self.blocked && version === self.currentVersion) { + + //add new rows + if (newRows) { + startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false; + + if (startRow) { + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, startRow, true); + }); + } else { + newRows = newRows.slice().reverse(); + + newRows.forEach(function (rowData) { + self.table.rowManager.addRowActual(rowData, true, false, true); + }); + } + } + + //delete removed rows + if (end !== 0) { + var oldRows = data.slice(start, typeof args[1] === "undefined" ? args[1] : start + end); + + oldRows.forEach(function (rowData, i) { + var row = self.table.rowManager.getRowFromDataObject(rowData); + + if (row) { + row.deleteActual(i !== oldRows.length - 1); + } + }); + } + + if (newRows || end !== 0) { + self.table.rowManager.reRenderInPosition(); + } + } + + return self.origFuncs.splice.apply(data, arguments); + } + }); + }; + + ReactiveData.prototype.unwatchData = function () { + if (this.data !== false) { + for (var key in this.origFuncs) { + Object.defineProperty(this.data, key, { + enumerable: true, + configurable: true, + writable: true, + value: this.origFuncs.key + }); + } + } + }; + + ReactiveData.prototype.watchRow = function (row) { + var data = row.getData(); + + this.blocked = true; + + for (var key in data) { + this.watchKey(row, data, key); + } + + if (this.table.options.dataTree) { + this.watchTreeChildren(row); + } + + this.blocked = false; + }; + + ReactiveData.prototype.watchTreeChildren = function (row) { + var self = this, + childField = row.getData()[this.table.options.dataTreeChildField], + origFuncs = {}; + + function rebuildTree() { + self.table.modules.dataTree.initializeRow(row); + self.table.modules.dataTree.layoutRow(row); + self.table.rowManager.refreshActiveData("tree", false, true); + } + + if (childField) { + + origFuncs.push = childField.push; + + Object.defineProperty(childField, "push", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.push.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.unshift = childField.unshift; + + Object.defineProperty(childField, "unshift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.unshift.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + + origFuncs.shift = childField.shift; + + Object.defineProperty(childField, "shift", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.shift.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.pop = childField.pop; + + Object.defineProperty(childField, "pop", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.pop.call(childField); + + rebuildTree(); + + return result; + } + }); + + origFuncs.splice = childField.splice; + + Object.defineProperty(childField, "splice", { + enumerable: false, + configurable: true, + value: function value() { + var result = origFuncs.splice.apply(childField, arguments); + + rebuildTree(); + + return result; + } + }); + } + }; + + ReactiveData.prototype.watchKey = function (row, data, key) { + var self = this, + props = Object.getOwnPropertyDescriptor(data, key), + value = data[key], + version = this.currentVersion; + + Object.defineProperty(data, key, { + set: function set(newValue) { + value = newValue; + if (!self.blocked && version === self.currentVersion) { + var update = {}; + update[key] = newValue; + row.updateData(update); + } + + if (props.set) { + props.set(newValue); + } + }, + get: function get() { + + if (props.get) { + props.get(); + } + + return value; + } + }); + }; + + ReactiveData.prototype.unwatchRow = function (row) { + var data = row.getData(); + + for (var key in data) { + Object.defineProperty(data, key, { + value: data[key] + }); + } + }; + + ReactiveData.prototype.block = function () { + this.blocked = true; + }; + + ReactiveData.prototype.unblock = function () { + this.blocked = false; + }; + + Tabulator.prototype.registerModule("reactiveData", ReactiveData); + + var ResizeColumns = function ResizeColumns(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startX = false; + this.startWidth = false; + this.handle = null; + this.prevHandle = null; + }; + + ResizeColumns.prototype.initializeColumn = function (type, column, element) { + var self = this, + variableHeight = false, + mode = this.table.options.resizableColumns; + + //set column resize mode + if (type === "header") { + variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; + column.modules.resize = { variableHeight: variableHeight }; + } + + if (mode === true || mode == type) { + + var handle = document.createElement('div'); + handle.className = "tabulator-col-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-col-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + var nearestColumn = column.getLastColumn(); + + if (nearestColumn && self._checkResizability(nearestColumn)) { + self.startColumn = column; + self._mouseDown(e, nearestColumn, handle); + } + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + //reszie column on double click + handle.addEventListener("dblclick", function (e) { + var col = column.getLastColumn(); + + if (col && self._checkResizability(col)) { + e.stopPropagation(); + col.reinitializeWidth(true); + } + }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + self.startColumn = column; + self._mouseDown(e, prevColumn, prevHandle); + } + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + //resize column on double click + prevHandle.addEventListener("dblclick", function (e) { + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn && self._checkResizability(prevColumn)) { + e.stopPropagation(); + prevColumn.reinitializeWidth(true); + } + } + }); + + element.appendChild(handle); + element.appendChild(prevHandle); + } + }; + + ResizeColumns.prototype._checkResizability = function (column) { + return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; + }; + + ResizeColumns.prototype._mouseDown = function (e, column, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + // self.table.columnManager.tempScrollBlock(); + + if (self.table.rtl) { + column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } else { + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + } + + if (self.table.options.virtualDomHoz) { + self.table.vdomHoz.reinitialize(true); + } + + if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + } + + function mouseUp(e) { + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = false; + } + + if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { + column.checkCellHeights(); + } + + document.body.removeEventListener("mouseup", mouseUp); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.columns) { + self.table.modules.persistence.save("columns"); + } + + self.table.options.columnResized.call(self.table, column.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + if (self.startColumn.modules.edit) { + self.startColumn.modules.edit.blocked = true; + } + + self.startX = typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX; + self.startWidth = column.getWidth(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); + }; + + Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); + var ResizeRows = function ResizeRows(table) { + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startY = false; + this.startHeight = false; + this.handle = null; + this.prevHandle = null; + }; + + ResizeRows.prototype.initializeRow = function (row) { + var self = this, + rowEl = row.getElement(); + + var handle = document.createElement('div'); + handle.className = "tabulator-row-resize-handle"; + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-row-resize-handle prev"; + + handle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var handleDown = function handleDown(e) { + self.startRow = row; + self._mouseDown(e, row, handle); + }; + + handle.addEventListener("mousedown", handleDown); + handle.addEventListener("touchstart", handleDown, { passive: true }); + + prevHandle.addEventListener("click", function (e) { + e.stopPropagation(); + }); + + var prevHandleDown = function prevHandleDown(e) { + var prevRow = self.table.rowManager.prevDisplayRow(row); + + if (prevRow) { + self.startRow = prevRow; + self._mouseDown(e, prevRow, prevHandle); + } + }; + + prevHandle.addEventListener("mousedown", prevHandleDown); + prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); + + rowEl.appendChild(handle); + rowEl.appendChild(prevHandle); + }; + + ResizeRows.prototype._mouseDown = function (e, row, handle) { + var self = this; + + self.table.element.classList.add("tabulator-block-select"); + + function mouseMove(e) { + row.setHeight(self.startHeight + ((typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY) - self.startY)); + } + + function mouseUp(e) { + + // //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = false; + // } + + document.body.removeEventListener("mouseup", mouseMove); + document.body.removeEventListener("mousemove", mouseMove); + + handle.removeEventListener("touchmove", mouseMove); + handle.removeEventListener("touchend", mouseUp); + + self.table.element.classList.remove("tabulator-block-select"); + + self.table.options.rowResized.call(this.table, row.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + // if(self.startColumn.modules.edit){ + // self.startColumn.modules.edit.blocked = true; + // } + + self.startY = typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY; + self.startHeight = row.getHeight(); + + document.body.addEventListener("mousemove", mouseMove); + document.body.addEventListener("mouseup", mouseUp); + + handle.addEventListener("touchmove", mouseMove, { passive: true }); + handle.addEventListener("touchend", mouseUp); + }; + + Tabulator.prototype.registerModule("resizeRows", ResizeRows); + var ResizeTable = function ResizeTable(table) { + this.table = table; //hold Tabulator object + this.binding = false; + this.observer = false; + this.containerObserver = false; + + this.tableHeight = 0; + this.tableWidth = 0; + this.containerHeight = 0; + this.containerWidth = 0; + + this.autoResize = false; + }; + + ResizeTable.prototype.initialize = function (row) { + var _this83 = this; + + var table = this.table, + tableStyle; + + this.tableHeight = table.element.clientHeight; + this.tableWidth = table.element.clientWidth; + + if (table.element.parentNode) { + this.containerHeight = table.element.parentNode.clientHeight; + this.containerWidth = table.element.parentNode.clientWidth; + } + + if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { + + this.autoResize = true; + + this.observer = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this83.tableHeight != nodeHeight || _this83.tableWidth != nodeWidth) { + _this83.tableHeight = nodeHeight; + _this83.tableWidth = nodeWidth; + + if (table.element.parentNode) { + _this83.containerHeight = table.element.parentNode.clientHeight; + _this83.containerWidth = table.element.parentNode.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + } + }); + + this.observer.observe(table.element); + + tableStyle = window.getComputedStyle(table.element); + + if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) { + + this.containerObserver = new ResizeObserver(function (entry) { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + + var nodeHeight = Math.floor(entry[0].contentRect.height); + var nodeWidth = Math.floor(entry[0].contentRect.width); + + if (_this83.containerHeight != nodeHeight || _this83.containerWidth != nodeWidth) { + _this83.containerHeight = nodeHeight; + _this83.containerWidth = nodeWidth; + _this83.tableHeight = table.element.clientHeight; + _this83.tableWidth = table.element.clientWidth; + } + + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }); + + this.containerObserver.observe(this.table.element.parentNode); + } + } else { + this.binding = function () { + if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { + if (table.options.virtualDomHoz) { + table.vdomHoz.reinitialize(true); + } + + table.redraw(); + } + }; + + window.addEventListener("resize", this.binding); + } + }; + + ResizeTable.prototype.clearBindings = function (row) { + if (this.binding) { + window.removeEventListener("resize", this.binding); + } + + if (this.observer) { + this.observer.unobserve(this.table.element); + } + + if (this.containerObserver) { + this.containerObserver.unobserve(this.table.element.parentNode); + } + }; + + Tabulator.prototype.registerModule("resizeTable", ResizeTable); + var ResponsiveLayout = function ResponsiveLayout(table) { + this.table = table; //hold Tabulator object + this.columns = []; + this.hiddenColumns = []; + this.mode = ""; + this.index = 0; + this.collapseFormatter = []; + this.collapseStartOpen = true; + this.collapseHandleColumn = false; + }; + + //generate resposive columns list + ResponsiveLayout.prototype.initialize = function () { + var self = this, + columns = []; + + this.mode = this.table.options.responsiveLayout; + this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; + this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; + this.hiddenColumns = []; + + //detemine level of responsivity for each column + this.table.columnManager.columnsByIndex.forEach(function (column, i) { + if (column.modules.responsive) { + if (column.modules.responsive.order && column.modules.responsive.visible) { + column.modules.responsive.index = i; + columns.push(column); + + if (!column.visible && self.mode === "collapse") { + self.hiddenColumns.push(column); + } + } + } + }); + + //sort list by responsivity + columns = columns.reverse(); + columns = columns.sort(function (a, b) { + var diff = b.modules.responsive.order - a.modules.responsive.order; + return diff || b.modules.responsive.index - a.modules.responsive.index; + }); + + this.columns = columns; + + if (this.mode === "collapse") { + this.generateCollapsedContent(); + } + + //assign collapse column + for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i17 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i17 >= _iterator.length) break; + _ref = _iterator[_i17++]; + } else { + _i17 = _iterator.next(); + if (_i17.done) break; + _ref = _i17.value; + } + + var col = _ref; + + if (col.definition.formatter == "responsiveCollapse") { + this.collapseHandleColumn = col; + break; + } + } + + if (this.collapseHandleColumn) { + if (this.hiddenColumns.length) { + this.collapseHandleColumn.show(); + } else { + this.collapseHandleColumn.hide(); + } + } + }; + + //define layout information + ResponsiveLayout.prototype.initializeColumn = function (column) { + var def = column.getDefinition(); + + column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; + }; + + ResponsiveLayout.prototype.initializeRow = function (row) { + var el; + + if (row.type !== "calc") { + el = document.createElement("div"); + el.classList.add("tabulator-responsive-collapse"); + + row.modules.responsiveLayout = { + element: el, + open: this.collapseStartOpen + }; + + if (!this.collapseStartOpen) { + el.style.display = 'none'; + } + } + }; + + ResponsiveLayout.prototype.layoutRow = function (row) { + var rowEl = row.getElement(); + + if (row.modules.responsiveLayout) { + rowEl.appendChild(row.modules.responsiveLayout.element); + this.generateCollapsedRowContent(row); + } + }; + + //update column visibility + ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { + var index; + if (column.modules.responsive) { + column.modules.responsive.visible = visible; + this.initialize(); + } + }; + + ResponsiveLayout.prototype.hideColumn = function (column) { + var colCount = this.hiddenColumns.length; + + column.hide(false, true); + + if (this.mode === "collapse") { + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !colCount) { + this.collapseHandleColumn.show(); + } + } + }; + + ResponsiveLayout.prototype.showColumn = function (column) { + var index; + + column.show(false, true); + //set column width to prevent calculation loops on uninitialized columns + column.setWidth(column.getWidth()); + + if (this.mode === "collapse") { + index = this.hiddenColumns.indexOf(column); + + if (index > -1) { + this.hiddenColumns.splice(index, 1); + } + + this.generateCollapsedContent(); + + if (this.collapseHandleColumn && !this.hiddenColumns.length) { + this.collapseHandleColumn.hide(); + } + } + }; + + //redraw columns to fit space + ResponsiveLayout.prototype.update = function () { + var self = this, + working = true; + + while (working) { + + var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + var diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width; + + if (diff < 0) { + //table is too wide + var column = self.columns[self.index]; + + if (column) { + self.hideColumn(column); + self.index++; + } else { + working = false; + } + } else { + + //table has spare space + var _column = self.columns[self.index - 1]; + + if (_column) { + if (diff > 0) { + if (diff >= _column.getWidth()) { + self.showColumn(_column); + self.index--; + } else { + working = false; + } + } else { + working = false; + } + } else { + working = false; + } + } + + if (!self.table.rowManager.activeRowsCount) { + self.table.rowManager.renderEmptyScroll(); + } + } + }; + + ResponsiveLayout.prototype.generateCollapsedContent = function () { + var self = this, + rows = this.table.rowManager.getDisplayRows(); + + rows.forEach(function (row) { + self.generateCollapsedRowContent(row); + }); + }; + + ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { + var el, contents; + + if (row.modules.responsiveLayout) { + el = row.modules.responsiveLayout.element; + + while (el.firstChild) { + el.removeChild(el.firstChild); + }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); + if (contents) { + el.appendChild(contents); + } + } + }; + + ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { + var self = this, + data = row.getData(), + output = [], + mockCellComponent; + + this.hiddenColumns.forEach(function (column) { + var value = column.getFieldValue(data); + + if (column.definition.title && column.field) { + if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { + + mockCellComponent = { + value: false, + data: {}, + getValue: function getValue() { + return value; + }, + getData: function getData() { + return data; + }, + getElement: function getElement() { + return document.createElement("div"); + }, + getRow: function getRow() { + return row.getComponent(); + }, + getColumn: function getColumn() { + return column.getComponent(); + } + }; + + output.push({ + field: column.field, + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + } else { + output.push({ + field: column.field, + title: column.definition.title, + value: value + }); + } + } + }); + + return output; + }; + + ResponsiveLayout.prototype.formatCollapsedData = function (data) { + var list = document.createElement("table"); + + data.forEach(function (item) { + var row = document.createElement("tr"); + var titleData = document.createElement("td"); + var valueData = document.createElement("td"); + var node_content; + + var titleHighlight = document.createElement("strong"); + titleData.appendChild(titleHighlight); + this.table.modules.localize.bind("columns|" + item.field, function (text) { + titleHighlight.innerText = text || item.title; + }); + + if (item.value instanceof Node) { + node_content = document.createElement("div"); + node_content.appendChild(item.value); + valueData.appendChild(node_content); + } else { + valueData.innerHTML = item.value; + } + + row.appendChild(titleData); + row.appendChild(valueData); + list.appendChild(row); + }, this); + + return Object.keys(data).length ? list : ""; + }; + + Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); + + var SelectRow = function SelectRow(table) { + this.table = table; //hold Tabulator object + this.selecting = false; //flag selecting in progress + this.lastClickedRow = false; //last clicked row + this.selectPrev = []; //hold previously selected element for drag drop selection + this.selectedRows = []; //hold selected rows + this.headerCheckboxElement = null; // hold header select element + }; + + SelectRow.prototype.clearSelectionData = function (silent) { + this.selecting = false; + this.lastClickedRow = false; + this.selectPrev = []; + this.selectedRows = []; + + if (!silent) { + this._rowSelectionChanged(); + } + }; + + SelectRow.prototype.initializeRow = function (row) { + var self = this, + element = row.getElement(); + + // trigger end of row selection + var endSelect = function endSelect() { + + setTimeout(function () { + self.selecting = false; + }, 50); + + document.body.removeEventListener("mouseup", endSelect); + }; + + row.modules.select = { selected: false }; + + //set row selection class + if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { + element.classList.add("tabulator-selectable"); + element.classList.remove("tabulator-unselectable"); + + if (self.table.options.selectable && self.table.options.selectable != "highlight") { + if (self.table.options.selectableRangeMode === "click") { + element.addEventListener("click", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + self.lastClickedRow = self.lastClickedRow || row; + + var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); + var rowIdx = self.table.rowManager.getDisplayRowIndex(row); + + var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; + var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; + + var rows = self.table.rowManager.getDisplayRows().slice(0); + var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); + + if (e.ctrlKey || e.metaKey) { + toggledRows.forEach(function (toggledRow) { + if (toggledRow !== self.lastClickedRow) { + + if (self.table.options.selectable !== true && !self.isRowSelected(row)) { + if (self.selectedRows.length < self.table.options.selectable) { + self.toggleRow(toggledRow); + } + } else { + self.toggleRow(toggledRow); + } + } + }); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + + if (self.table.options.selectable !== true) { + if (toggledRows.length > self.table.options.selectable) { + toggledRows = toggledRows.slice(0, self.table.options.selectable); + } + } + + self.selectRows(toggledRows); + } + self.table._clearSelection(); + } else if (e.ctrlKey || e.metaKey) { + self.toggleRow(row); + self.lastClickedRow = row; + } else { + self.deselectRows(undefined, true); + self.selectRows(row); + self.lastClickedRow = row; + } + }); + } else { + element.addEventListener("click", function (e) { + if (!self.table.modExists("edit") || !self.table.modules.edit.getCurrentCell()) { + self.table._clearSelection(); + } + + if (!self.selecting) { + self.toggleRow(row); + } + }); + + element.addEventListener("mousedown", function (e) { + if (e.shiftKey) { + self.table._clearSelection(); + + self.selecting = true; + + self.selectPrev = []; + + document.body.addEventListener("mouseup", endSelect); + document.body.addEventListener("keyup", endSelect); + + self.toggleRow(row); + + return false; + } + }); + + element.addEventListener("mouseenter", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.toggleRow(row); + + if (self.selectPrev[1] == row) { + self.toggleRow(self.selectPrev[0]); + } + } + }); + + element.addEventListener("mouseout", function (e) { + if (self.selecting) { + self.table._clearSelection(); + self.selectPrev.unshift(row); + } + }); + } + } + } else { + element.classList.add("tabulator-unselectable"); + element.classList.remove("tabulator-selectable"); + } + }; + + //toggle row selection + SelectRow.prototype.toggleRow = function (row) { + if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { + if (row.modules.select && row.modules.select.selected) { + this._deselectRow(row); + } else { + this._selectRow(row); + } + } + }; + + //select a number of rows + SelectRow.prototype.selectRows = function (rows) { + var _this84 = this; + + var rowMatch; + + switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { + case "undefined": + this.table.rowManager.rows.forEach(function (row) { + _this84._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + break; + + case "string": + + rowMatch = this.table.rowManager.findRow(rows); + + if (rowMatch) { + this._selectRow(rowMatch, true, true); + } else { + this.table.rowManager.getRows(rows).forEach(function (row) { + _this84._selectRow(row, true, true); + }); + } + + this._rowSelectionChanged(); + break; + + default: + if (Array.isArray(rows)) { + rows.forEach(function (row) { + _this84._selectRow(row, true, true); + }); + + this._rowSelectionChanged(); + } else { + this._selectRow(rows, false, true); + } + break; + } + }; + + //select an individual row + SelectRow.prototype._selectRow = function (rowInfo, silent, force) { + var index; + + //handle max row count + if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { + if (this.selectedRows.length >= this.table.options.selectable) { + if (this.table.options.selectableRollingSelection) { + this._deselectRow(this.selectedRows[0]); + } else { + return false; + } + } + } + + var row = this.table.rowManager.findRow(rowInfo); + + if (row) { + if (this.selectedRows.indexOf(row) == -1) { + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = true; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = true; + } + row.getElement().classList.add("tabulator-selected"); + + this.selectedRows.push(row); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, true); + } + + if (!silent) { + this.table.options.rowSelected.call(this.table, row.getComponent()); + } + + this._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); + } + } + }; + + SelectRow.prototype.isRowSelected = function (row) { + return this.selectedRows.indexOf(row) !== -1; + }; + + //deselect a number of rows + SelectRow.prototype.deselectRows = function (rows, silent) { + var self = this, + rowCount; + + if (typeof rows == "undefined") { + + rowCount = self.selectedRows.length; + + for (var _i18 = 0; _i18 < rowCount; _i18++) { + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(silent); + } else { + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(silent); + } else { + self._deselectRow(rows, silent); + } + } + }; + + //deselect an individual row + SelectRow.prototype._deselectRow = function (rowInfo, silent) { + var self = this, + row = self.table.rowManager.findRow(rowInfo), + index; + + if (row) { + index = self.selectedRows.findIndex(function (selectedRow) { + return selectedRow == row; + }); + + if (index > -1) { + + if (!row.modules.select) { + row.modules.select = {}; + } + + row.modules.select.selected = false; + if (row.modules.select.checkboxEl) { + row.modules.select.checkboxEl.checked = false; + } + row.getElement().classList.remove("tabulator-selected"); + self.selectedRows.splice(index, 1); + + if (this.table.options.dataTreeSelectPropagate) { + this.childRowSelection(row, false); + } + + if (!silent) { + self.table.options.rowDeselected.call(this.table, row.getComponent()); + } + + self._rowSelectionChanged(silent); + } + } else { + if (!silent) { + console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); + } + } + }; + + SelectRow.prototype.getSelectedData = function () { + var data = []; + + this.selectedRows.forEach(function (row) { + data.push(row.getData()); + }); + + return data; + }; + + SelectRow.prototype.getSelectedRows = function () { + + var rows = []; + + this.selectedRows.forEach(function (row) { + rows.push(row.getComponent()); + }); + + return rows; + }; + + SelectRow.prototype._rowSelectionChanged = function (silent) { + if (this.headerCheckboxElement) { + if (this.selectedRows.length === 0) { + this.headerCheckboxElement.checked = false; + this.headerCheckboxElement.indeterminate = false; + } else if (this.table.rowManager.rows.length === this.selectedRows.length) { + this.headerCheckboxElement.checked = true; + this.headerCheckboxElement.indeterminate = false; + } else { + this.headerCheckboxElement.indeterminate = true; + this.headerCheckboxElement.checked = false; + } + } + + if (!silent) { + this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); + } + }; + + SelectRow.prototype.registerRowSelectCheckbox = function (row, element) { + if (!row._row.modules.select) { + row._row.modules.select = {}; + } + + row._row.modules.select.checkboxEl = element; + }; + + SelectRow.prototype.registerHeaderSelectCheckbox = function (element) { + this.headerCheckboxElement = element; + }; + + SelectRow.prototype.childRowSelection = function (row, select) { + var children = this.table.modules.dataTree.getChildren(row); + + if (select) { + for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i19 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i19 >= _iterator2.length) break; + _ref2 = _iterator2[_i19++]; + } else { + _i19 = _iterator2.next(); + if (_i19.done) break; + _ref2 = _i19.value; + } + + var child = _ref2; + + this._selectRow(child, true); + } + } else { + for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i20 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i20 >= _iterator3.length) break; + _ref3 = _iterator3[_i20++]; + } else { + _i20 = _iterator3.next(); + if (_i20.done) break; + _ref3 = _i20.value; + } + + var _child = _ref3; + + this._deselectRow(_child, true); + } + } + }; + + Tabulator.prototype.registerModule("selectRow", SelectRow); + + var Sort = function Sort(table) { + this.table = table; //hold Tabulator object + this.sortList = []; //holder current sort + this.changed = false; //has the sort changed since last render + }; + + //initialize column header for sorting + Sort.prototype.initializeColumn = function (column, content) { + var self = this, + sorter = false, + colEl, + arrowEl; + + switch (_typeof(column.definition.sorter)) { + case "string": + if (self.sorters[column.definition.sorter]) { + sorter = self.sorters[column.definition.sorter]; + } else { + console.warn("Sort Error - No such sorter found: ", column.definition.sorter); + } + break; + + case "function": + sorter = column.definition.sorter; + break; + } + + column.modules.sort = { + sorter: sorter, dir: "none", + params: column.definition.sorterParams || {}, + startingDir: column.definition.headerSortStartingDir || "asc", + tristate: typeof column.definition.headerSortTristate !== "undefined" ? column.definition.headerSortTristate : this.table.options.headerSortTristate + }; + + if (typeof column.definition.headerSort === "undefined" ? this.table.options.headerSort !== false : column.definition.headerSort !== false) { + + colEl = column.getElement(); + + colEl.classList.add("tabulator-sortable"); + + arrowEl = document.createElement("div"); + arrowEl.classList.add("tabulator-col-sorter"); + + if (_typeof(this.table.options.headerSortElement) == "object") { + arrowEl.appendChild(this.table.options.headerSortElement); + } else { + arrowEl.innerHTML = this.table.options.headerSortElement; + } + + //create sorter arrow + content.appendChild(arrowEl); + + column.modules.sort.element = arrowEl; + + //sort on click + colEl.addEventListener("click", function (e) { + var dir = "", + sorters = [], + match = false; + + if (column.modules.sort) { + if (column.modules.sort.tristate) { + if (column.modules.sort.dir == "none") { + dir = column.modules.sort.startingDir; + } else { + if (column.modules.sort.dir == column.modules.sort.startingDir) { + dir = column.modules.sort.dir == "asc" ? "desc" : "asc"; + } else { + dir = "none"; + } + } + } else { + switch (column.modules.sort.dir) { + case "asc": + dir = "desc"; + break; + + case "desc": + dir = "asc"; + break; + + default: + dir = column.modules.sort.startingDir; + } + } + + if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { + sorters = self.getSort(); + + match = sorters.findIndex(function (sorter) { + return sorter.field === column.getField(); + }); + + if (match > -1) { + sorters[match].dir = dir; + + if (match != sorters.length - 1) { + match = sorters.splice(match, 1)[0]; + if (dir != "none") { + sorters.push(match); + } + } + } else { + if (dir != "none") { + sorters.push({ column: column, dir: dir }); + } + } + + //add to existing sort + self.setSort(sorters); + } else { + if (dir == "none") { + self.clear(); + } else { + //sort by column only + self.setSort(column, dir); + } + } + + self.table.rowManager.sorterRefresh(!self.sortList.length); + } + }); + } + }; + + //check if the sorters have changed since last use + Sort.prototype.hasChanged = function () { + var changed = this.changed; + this.changed = false; + return changed; + }; + + //return current sorters + Sort.prototype.getSort = function () { + var self = this, + sorters = []; + + self.sortList.forEach(function (item) { + if (item.column) { + sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); + } + }); + + return sorters; + }; + + //change sort list and trigger sort + Sort.prototype.setSort = function (sortList, dir) { + var self = this, + newSortList = []; + + if (!Array.isArray(sortList)) { + sortList = [{ column: sortList, dir: dir }]; + } + + sortList.forEach(function (item) { + var column; + + column = self.table.columnManager.findColumn(item.column); + + if (column) { + item.column = column; + newSortList.push(item); + self.changed = true; + } else { + console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); + } + }); + + self.sortList = newSortList; + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.sort) { + this.table.modules.persistence.save("sort"); + } + }; + + //clear sorters + Sort.prototype.clear = function () { + this.setSort([]); + }; + + //find appropriate sorter for column + Sort.prototype.findSorter = function (column) { + var row = this.table.rowManager.activeRows[0], + sorter = "string", + field, + value; + + if (row) { + row = row.getData(); + field = column.getField(); + + if (field) { + + value = column.getFieldValue(row); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "undefined": + sorter = "string"; + break; + + case "boolean": + sorter = "boolean"; + break; + + default: + if (!isNaN(value) && value !== "") { + sorter = "number"; + } else { + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + sorter = "alphanum"; + } + } + break; + } + } + } + + return this.sorters[sorter]; + }; + + //work through sort list sorting data + Sort.prototype.sort = function (data) { + var self = this, + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList, + sortListActual = [], + rowComponents = [], + lastSort; + + if (self.table.options.dataSorting) { + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + //build list of valid sorters and trigger column specific callbacks before sort begins + sortList.forEach(function (item, i) { + var sortObj = item.column.modules.sort; + + if (item.column && sortObj) { + + //if no sorter has been defined, take a guess + if (!sortObj.sorter) { + sortObj.sorter = self.findSorter(item.column); + } + + item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params; + + sortListActual.push(item); + } + + self.setColumnHeader(item.column, item.dir); + }); + + //sort data + if (sortListActual.length) { + self._sortItems(data, sortListActual); + } + } else { + sortList.forEach(function (item, i) { + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + data.forEach(function (row) { + rowComponents.push(row.getComponent()); + }); + + self.table.options.dataSorted.call(self.table, self.getSort(), rowComponents); + } + }; + + //clear sort arrows on columns + Sort.prototype.clearColumnHeaders = function () { + this.table.columnManager.getRealColumns().forEach(function (column) { + if (column.modules.sort) { + column.modules.sort.dir = "none"; + column.getElement().setAttribute("aria-sort", "none"); + } + }); + }; + + //set the column header sort direction + Sort.prototype.setColumnHeader = function (column, dir) { + column.modules.sort.dir = dir; + column.getElement().setAttribute("aria-sort", dir); + }; + + //sort each item in sort list + Sort.prototype._sortItems = function (data, sortList) { + var _this85 = this; + + var sorterCount = sortList.length - 1; + + data.sort(function (a, b) { + var result; + + for (var i = sorterCount; i >= 0; i--) { + var sortItem = sortList[i]; + + result = _this85._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); + + if (result !== 0) { + break; + } + } + + return result; + }); + }; + + //process individual rows for a sort function on active data + Sort.prototype._sortRow = function (a, b, column, dir, params) { + var el1Comp, el2Comp, colComp; + + //switch elements depending on search direction + var el1 = dir == "asc" ? a : b; + var el2 = dir == "asc" ? b : a; + + a = column.getFieldValue(el1.getData()); + b = column.getFieldValue(el2.getData()); + + a = typeof a !== "undefined" ? a : ""; + b = typeof b !== "undefined" ? b : ""; + + // el1Comp = el1.getComponent(); + // el2Comp = el2.getComponent(); + + return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); + }; + + //default data sorters + Sort.prototype.sorters = { + + //sort numbers + number: function number(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var decimal = params.decimalSeparator; + var thousand = params.thousandSeparator; + var emptyAlign = 0; + + a = String(a); + b = String(b); + + if (thousand) { + a = a.split(thousand).join(""); + b = b.split(thousand).join(""); + } + + if (decimal) { + a = a.split(decimal).join("."); + b = b.split(decimal).join("."); + } + + a = parseFloat(a); + b = parseFloat(b); + + //handle non numeric values + if (isNaN(a)) { + emptyAlign = isNaN(b) ? 0 : -1; + } else if (isNaN(b)) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort strings + string: function string(a, b, aRow, bRow, column, dir, params) { + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + var locale; + + //handle empty values + if (!a) { + emptyAlign = !b ? 0 : -1; + } else if (!b) { + emptyAlign = 1; + } else { + //compare valid values + switch (_typeof(params.locale)) { + case "boolean": + if (params.locale) { + locale = this.table.modules.localize.getLocale(); + } + break; + case "string": + locale = params.locale; + break; + } + + return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort date + date: function date(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "DD/MM/YYYY"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort HH:mm formatted times + time: function time(a, b, aRow, bRow, column, dir, params) { + if (!params.format) { + params.format = "HH:mm"; + } + + return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); + }, + + //sort datetime + datetime: function datetime(a, b, aRow, bRow, column, dir, params) { + var format = params.format || "DD/MM/YYYY HH:mm:ss", + alignEmptyValues = params.alignEmptyValues, + emptyAlign = 0; + + if (typeof moment != "undefined") { + a = moment(a, format); + b = moment(b, format); + + if (!a.isValid()) { + emptyAlign = !b.isValid() ? 0 : -1; + } else if (!b.isValid()) { + emptyAlign = 1; + } else { + //compare valid values + return a - b; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } else { + console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); + } + }, + + //sort booleans + boolean: function boolean(a, b, aRow, bRow, column, dir, params) { + var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; + var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; + + return el1 - el2; + }, + + //sort if element contains any data + array: function array(a, b, aRow, bRow, column, dir, params) { + var el1 = 0; + var el2 = 0; + var type = params.type || "length"; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + function calc(value) { + + switch (type) { + case "length": + return value.length; + break; + + case "sum": + return value.reduce(function (c, d) { + return c + d; + }); + break; + + case "max": + return Math.max.apply(null, value); + break; + + case "min": + return Math.min.apply(null, value); + break; + + case "avg": + return value.reduce(function (c, d) { + return c + d; + }) / value.length; + break; + } + } + + //handle non array values + if (!Array.isArray(a)) { + alignEmptyValues = !Array.isArray(b) ? 0 : -1; + } else if (!Array.isArray(b)) { + alignEmptyValues = 1; + } else { + + //compare valid values + el1 = a ? calc(a) : 0; + el2 = b ? calc(b) : 0; + + return el1 - el2; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + }, + + //sort if element contains any data + exists: function exists(a, b, aRow, bRow, column, dir, params) { + var el1 = typeof a == "undefined" ? 0 : 1; + var el2 = typeof b == "undefined" ? 0 : 1; + + return el1 - el2; + }, + + //sort alpha numeric strings + alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { + var a, + b, + a1, + b1, + i = 0, + L, + rx = /(\d+)|(\D+)/g, + rd = /\d/; + var alignEmptyValues = params.alignEmptyValues; + var emptyAlign = 0; + + //handle empty values + if (!as && as !== 0) { + emptyAlign = !bs && bs !== 0 ? 0 : -1; + } else if (!bs && bs !== 0) { + emptyAlign = 1; + } else { + + if (isFinite(as) && isFinite(bs)) return as - bs; + a = String(as).toLowerCase(); + b = String(bs).toLowerCase(); + if (a === b) return 0; + if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; + a = a.match(rx); + b = b.match(rx); + L = a.length > b.length ? b.length : a.length; + while (i < L) { + a1 = a[i]; + b1 = b[i++]; + if (a1 !== b1) { + if (isFinite(a1) && isFinite(b1)) { + if (a1.charAt(0) === "0") a1 = "." + a1; + if (b1.charAt(0) === "0") b1 = "." + b1; + return a1 - b1; + } else return a1 > b1 ? 1 : -1; + } + } + + return a.length > b.length; + } + + //fix empty values in position + if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { + emptyAlign *= -1; + } + + return emptyAlign; + } + }; + + Tabulator.prototype.registerModule("sort", Sort); + + var Validate = function Validate(table) { + this.table = table; + this.invalidCells = []; + }; + + //validate + Validate.prototype.initializeColumn = function (column) { + var self = this, + config = [], + validator; + + if (column.definition.validator) { + + if (Array.isArray(column.definition.validator)) { + column.definition.validator.forEach(function (item) { + validator = self._extractValidator(item); + + if (validator) { + config.push(validator); + } + }); + } else { + validator = this._extractValidator(column.definition.validator); + + if (validator) { + config.push(validator); + } + } + + column.modules.validate = config.length ? config : false; + } + }; + + Validate.prototype._extractValidator = function (value) { + var type, params, pos; + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "string": + pos = value.indexOf(':'); + + if (pos > -1) { + type = value.substring(0, pos); + params = value.substring(pos + 1); + } else { + type = value; + } + + return this._buildValidator(type, params); + break; + + case "function": + return this._buildValidator(value); + break; + + case "object": + return this._buildValidator(value.type, value.parameters); + break; + } + }; + + Validate.prototype._buildValidator = function (type, params) { + + var func = typeof type == "function" ? type : this.validators[type]; + + if (!func) { + console.warn("Validator Setup Error - No matching validator found:", type); + return false; + } else { + return { + type: typeof type == "function" ? "function" : type, + func: func, + params: params + }; + } + }; + + Validate.prototype.validate = function (validators, cell, value) { + var self = this, + valid = [], + invalidIndex = this.invalidCells.indexOf(cell); + + if (validators) { + validators.forEach(function (item) { + if (!item.func.call(self, cell.getComponent(), value, item.params)) { + valid.push({ + type: item.type, + parameters: item.params + }); + } + }); + } + + valid = valid.length ? valid : true; + + if (!cell.modules.validate) { + cell.modules.validate = {}; + } + + if (valid === true) { + cell.modules.validate.invalid = false; + cell.getElement().classList.remove("tabulator-validation-fail"); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } else { + cell.modules.validate.invalid = true; + + if (this.table.options.validationMode !== "manual") { + cell.getElement().classList.add("tabulator-validation-fail"); + } + + if (invalidIndex == -1) { + this.invalidCells.push(cell); + } + } + + return valid; + }; + + Validate.prototype.getInvalidCells = function () { + var output = []; + + this.invalidCells.forEach(function (cell) { + output.push(cell.getComponent()); + }); + + return output; + }; + + Validate.prototype.clearValidation = function (cell) { + var invalidIndex; + + if (cell.modules.validate && cell.modules.validate.invalid) { + + cell.getElement().classList.remove("tabulator-validation-fail"); + cell.modules.validate.invalid = false; + + invalidIndex = this.invalidCells.indexOf(cell); + + if (invalidIndex > -1) { + this.invalidCells.splice(invalidIndex, 1); + } + } + }; + + Validate.prototype.validators = { + + //is integer + integer: function integer(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }, + + //is float + float: function float(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + value = Number(value); + return typeof value === 'number' && isFinite(value) && value % 1 !== 0; + }, + + //must be a number + numeric: function numeric(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return !isNaN(value); + }, + + //must be a string + string: function string(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return isNaN(value); + }, + + //maximum value + max: function max(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) <= parameters; + }, + + //minimum value + min: function min(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return parseFloat(value) >= parameters; + }, + + //starts with value + starts: function starts(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().startsWith(String(parameters).toLowerCase()); + }, + + //ends with value + ends: function ends(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).toLowerCase().endsWith(String(parameters).toLowerCase()); + }, + + //minimum string length + minLength: function minLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length >= parameters; + }, + + //maximum string length + maxLength: function maxLength(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + return String(value).length <= parameters; + }, + + //in provided value list + in: function _in(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + if (typeof parameters == "string") { + parameters = parameters.split("|"); + } + + return value === "" || parameters.indexOf(value) > -1; + }, + + //must match provided regex + regex: function regex(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var reg = new RegExp(parameters); + + return reg.test(value); + }, + + //value must be unique in this column + unique: function unique(cell, value, parameters) { + if (value === "" || value === null || typeof value === "undefined") { + return true; + } + var unique = true; + + var cellData = cell.getData(); + var column = cell.getColumn()._getSelf(); + + this.table.rowManager.rows.forEach(function (row) { + var data = row.getData(); + + if (data !== cellData) { + if (value == column.getFieldValue(data)) { + unique = false; + } + } + }); + + return unique; + }, + + //must have a value + required: function required(cell, value, parameters) { + return value !== "" && value !== null && typeof value !== "undefined"; + } + }; + + Tabulator.prototype.registerModule("validate", Validate); + + return Tabulator; +}); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator.min.js b/Sources/CustomControls/Table/control/dist/js/tabulator.min.js new file mode 100644 index 0000000..52636ea --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator.min.js @@ -0,0 +1,13 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tabulator=t()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|t,s=Math.max(n>=0?n:i-Math.abs(n),0);so?(t=e-o,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(e){var t,o,i=[],n=this.table.options.autoColumnsDefinitions;if(e&&e.length){t=e[0];for(var s in t){var a={field:s,title:s},r=t[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(e){var t=n.find(function(t){return t.field===e.field});t&&Object.assign(e,t)}):i.forEach(function(e){n[e.field]&&Object.assign(e,n[e.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(e,t){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),e.forEach(function(e,t){o._addColumn(e)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},t.prototype._addColumn=function(e,t,o){var i=new n(e,this),s=i.getElement(),a=o?this.findColumnIndex(o):o;if(o&&a>-1){var r=this.columns.indexOf(o.getTopColumn()),l=o.getElement();t?(this.columns.splice(r,0,i),l.parentNode.insertBefore(s,l)):(this.columns.splice(r+1,0,i),l.parentNode.insertBefore(s,l.nextSibling))}else t?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},t.prototype.registerColumnField=function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)},t.prototype.registerColumnPosition=function(e){this.columnsByIndex.push(e)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var e=this,t=0;e.columns.forEach(function(e){var o;e.clearVerticalAlign(),(o=e.getHeight())>t&&(t=o)}),e.columns.forEach(function(o){o.verticalAlign(e.table.options.columnHeaderVertAlign,t)}),e.rowManager.adjustTableSize()},t.prototype.findColumn=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e)))return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof o)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.columns.find(function(t){return t.element===e})||!1}return!1},t.prototype.getColumnByField=function(e){return this.columnsByField[e]},t.prototype.getColumnsByFieldRoot=function(e){var t=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===e&&o.push(t.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(e){return this.columnsByIndex[e]},t.prototype.getFirstVisibileColumn=function(e){var e=this.columnsByIndex.findIndex(function(e){return e.visible});return e>-1&&this.columnsByIndex[e]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(e){return this.columnsByIndex.findIndex(function(t){return e===t})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(e){this.columnsByIndex.forEach(function(t,o){e(t,o)})},t.prototype.getDefinitions=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){(!e||e&&t.visible)&&o.push(t.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var e=this,t=[];return e.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(e){var t=this,o=[];return(e?t.columns:t.columnsByIndex).forEach(function(e){o.push(e.getComponent())}),o},t.prototype.getWidth=function(){var e=0;return this.columnsByIndex.forEach(function(t){t.visible&&(e+=t.getWidth())}),e},t.prototype.moveColumn=function(e,t,o){this.moveColumnActual(e,t,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t.element.parentNode.insertBefore(e.element,t.element),o&&t.element.parentNode.insertBefore(t.element,e.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(e,t,o){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,o):this._moveColumnInArray(this.columns,e,t,o),this._moveColumnInArray(this.columnsByIndex,e,t,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,e.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(e,t,o,i,n){var s,a=this,r=e.indexOf(t),l=[];r>-1&&(e.splice(r,1),s=e.indexOf(o),s>-1?i&&(s+=1):s=r,e.splice(s,0,t),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(e){l=l.concat(a.table.modules.dataTree.getTreeChildren(e,!1,!0))}),l=l.concat(this.table.rowManager.rows),l.forEach(function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(s,0,t)}})))},t.prototype.scrollToColumn=function(e,t,o){var i=this,n=0,s=0,a=0,r=e.getElement();return new Promise(function(l,c){if(void 0===t&&(t=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidthe.rowManager.element.clientHeight&&(t-=e.rowManager.element.offsetWidth-e.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?e.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)}),o},t.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i._addColumn(e,t,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)})},t.prototype.deregisterColumn=function(e){var t,o=e.getField();o&&delete this.columnsByField[o],t=this.columnsByIndex.indexOf(e),t>-1&&this.columnsByIndex.splice(t,1),t=this.columns.indexOf(e),t>-1&&this.columns.splice(t,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},t.prototype.redraw=function(e){e&&(h.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():e?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(e){this._column=e,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},o.prototype.isVisible=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getParentColumn=function(){return this._column.parent instanceof n&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},o.prototype.setHeaderFilterValue=function(e){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,e)},o.prototype.move=function(e,t){var o=this._column.table.columnManager.findColumn(e);o?this._column.table.columnManager.moveColumn(this._column,o,t):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var e=this._column.nextColumn();return!!e&&e.getComponent()},o.prototype.getPrevColumn=function(){var e=this._column.prevColumn();return!!e&&e.getComponent()},o.prototype.updateDefinition=function(e){return this._column.updateDefinition(e)},o.prototype.getWidth=function(){return this._column.getWidth()},o.prototype.setWidth=function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),t},o.prototype.validate=function(){return this._column.validate()};var n=function e(t,o){var i=this;this.table=o.table,this.definition=t,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),t.columns?(this.isGroup=!0,t.columns.forEach(function(t,o){var n=new e(t,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),t.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};n.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e},n.prototype.createGroupElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e},n.prototype.checkDefinition=function(){var e=this;Object.keys(this.definition).forEach(function(t){-1===e.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)})},n.prototype.setField=function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},n.prototype.registerColumnPosition=function(e){this.parent.registerColumnPosition(e)},n.prototype.registerColumnField=function(e){this.parent.registerColumnField(e)},n.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)},n.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},n.prototype.setTooltip=function(){var e=this,t=e.definition,o=t.headerTooltip||!1===t.tooltip?t.headerTooltip:e.table.options.tooltipsHeader;o?!0===o?t.field?e.table.modules.localize.bind("columns|"+t.field,function(o){e.element.setAttribute("title",o||t.title)}):e.element.setAttribute("title",t.title):("function"==typeof o&&!1===(o=o(e.getComponent()))&&(o=""),e.element.setAttribute("title",o)):e.element.setAttribute("title","")},n.prototype._buildHeader=function(){for(var e=this,t=e.definition;e.element.firstChild;)e.element.removeChild(e.element.firstChild);t.headerVertical&&(e.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&e.element.classList.add("tabulator-col-vertical-flip")),e.contentElement=e._bindEvents(),e.contentElement=e._buildColumnHeaderContent(),e.element.appendChild(e.contentElement),e.isGroup?e._buildGroupHeader():e._buildColumnHeader(),e.setTooltip(),e.table.options.resizableColumns&&e.table.modExists("resizeColumns")&&e.table.modules.resizeColumns.initializeColumn("header",e,e.element),t.headerFilter&&e.table.modExists("filter")&&e.table.modExists("edit")&&(void 0!==t.headerFilterPlaceholder&&t.field&&e.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),e.table.modules.filter.initializeColumn(e)),e.table.modExists("frozenColumns")&&e.table.modules.frozenColumns.initializeColumn(e),e.table.options.movableColumns&&!e.isGroup&&e.table.modExists("moveColumn")&&e.table.modules.moveColumn.initializeColumn(e),(t.topCalc||t.bottomCalc)&&e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.initializeColumn(e),e.table.modExists("persistence")&&e.table.modules.persistence.config.columns&&e.table.modules.persistence.initializeColumn(e),e.element.addEventListener("mouseenter",function(t){e.setTooltip()})},n.prototype._bindEvents=function(){var e,t,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(e){n.headerClick(e,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(e){n.headerDblClick(e,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(e){n.headerContext(e,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&n.headerTap(e,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.headerDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),"function"==typeof n.headerTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.headerTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},n.prototype._buildColumnHeader=function(){var e=this,t=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(t.headerContextMenu||t.headerClickMenu||t.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==t.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==t.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass){t.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(void 0===t.minWidth?this.table.options.columnMinWidth:parseInt(t.minWidth)),(t.maxWidth||this.table.options.columnMaxWidth)&&!1!==t.maxWidth&&this.setMaxWidth(void 0===t.maxWidth?this.table.options.columnMaxWidth:parseInt(t.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},n.prototype._buildColumnHeaderContent=function(){var e=(this.definition,this.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e},n.prototype._buildColumnHeaderTitle=function(){var e=this,t=e.definition,o=e.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(e){e.stopPropagation(),n.focus()}),n.addEventListener("change",function(){t.title=n.value,o.options.columnTitleChanged.call(e.table,e.getComponent())}),i.appendChild(n),t.field?o.modules.localize.bind("columns|"+t.field,function(e){n.value=e||t.title||" "}):n.value=t.title||" "}else t.field?o.modules.localize.bind("columns|"+t.field,function(o){e._formatColumnHeaderTitle(i,o||t.title||" ")}):e._formatColumnHeaderTitle(i,t.title||" ");return i},n.prototype._formatColumnHeaderTitle=function(e,t){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(e){r.titleFormatterRendered=e},s={getValue:function(){return t},getElement:function(){return e}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,a),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}else e.innerHTML=t},n.prototype._buildGroupHeader=function(){var e=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},n.prototype._getFlatData=function(e){return e[this.field]},n.prototype._getNestedData=function(e){for(var t,o=e,i=this.fieldStructure,n=i.length,s=0;s-1&&this.columns.splice(t,1),this.columns.length||this.delete()},n.prototype.setWidth=function(e){this.widthFixed=!0,this.setWidthActual(e)},n.prototype.setWidthActual=function(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(e){e.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},n.prototype.checkCellHeights=function(){var e=[] +;this.cells.forEach(function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()})},n.prototype.getWidth=function(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e},n.prototype.getHeight=function(){return this.element.offsetHeight},n.prototype.setMinWidth=function(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(e){e.setMinWidth()})},n.prototype.setMaxWidth=function(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(e){e.setMaxWidth()})},n.prototype.delete=function(){var e=this;return new Promise(function(t,o){e.isGroup&&e.columns.forEach(function(e){e.delete()}),e.table.modExists("edit")&&e.table.modules.edit.currentCell.column===e&&e.table.modules.edit.cancelEdit();for(var i=e.cells.length,n=0;n-1&&this._nextVisibleColumn(e+1)},n.prototype._nextVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)},n.prototype.prevColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)},n.prototype._prevVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)},n.prototype.reinitializeWidth=function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},n.prototype.fitToData=function(){var e=this;this.widthFixed||(this.element.style.width="",e.cells.forEach(function(e){e.clearWidth()}));var t=this.element.offsetWidth;e.width&&this.widthFixed||(e.cells.forEach(function(e){var o=e.getWidth();o>t&&(t=o)}),t&&e.setWidthActual(t+1))},n.prototype.updateDefinition=function(e){var t=this;return new Promise(function(o,i){var n;t.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},t.getDefinition()),n=Object.assign(n,e),t.table.columnManager.addColumn(n,!1,t).then(function(e){n.field==t.field&&(t.field=!1),t.delete().then(function(){o(e.getComponent())}).catch(function(e){i(e)})}).catch(function(e){i(e)}))})},n.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},n.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],n.prototype.getComponent=function(){return this.component||(this.component=new o(this)),this.component};var s=function(e){this.table=e,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};s.prototype.createHolderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-tableHolder"),e.setAttribute("tabindex",0),e},s.prototype.createTableElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e},s.prototype.getElement=function(){return this.element},s.prototype.getTableElement=function(){return this.tableElement},s.prototype.getRowPosition=function(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)},s.prototype.setColumnManager=function(e){this.columnManager=e},s.prototype.initialize=function(){var e=this;e.setRenderMode(),e.element.appendChild(e.tableElement),e.firstRender=!0,e.element.addEventListener("scroll",function(){var t=e.element.scrollLeft;e.scrollLeft!=t&&(e.columnManager.scrollHorizontal(t),e.table.options.groupBy&&e.table.modules.groupRows.scrollHeaders(t),e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.scrollHorizontal(t),e.table.options.scrollHorizontal(t)),e.scrollLeft=t}),"virtual"===this.renderMode&&e.element.addEventListener("scroll",function(){var t=e.element.scrollTop,o=e.scrollTop>t;e.scrollTop!=t?(e.scrollTop=t,e.scrollVertical(o),"scroll"==e.table.options.ajaxProgressiveLoad&&e.table.modules.ajax.nextPage(e.element.scrollHeight-e.element.clientHeight-t),e.table.options.scrollVertical(t)):e.scrollTop=t})},s.prototype.findRow=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e))){if(void 0===e||null===e)return!1;return t.rows.find(function(o){return o.data[t.table.options.index]==e})||!1}if(e instanceof l)return e;if(e instanceof r)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.rows.find(function(t){return t.getElement()===e})||!1}return!1},s.prototype.getRowFromDataObject=function(e){return this.rows.find(function(t){return t.data===e})||!1},s.prototype.getRowFromPosition=function(e,t){return t?this.activeRows[e]:this.rows[e]},s.prototype.scrollToRow=function(e,t,o){var i,n=this,s=this.getDisplayRows().indexOf(e),a=e.getElement(),r=0;return new Promise(function(e,l){if(s>-1){if(void 0===t&&(t=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===t)switch(n.renderMode){case"classic":i=h.prototype.helpers.elOffset(a).top,t=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":t=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&h.prototype.helpers.elVisible(a)&&(r=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top)>0&&r-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(t){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,e.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},s.prototype.addRow=function(e,t,o,i){var n=this.addRowActual(e,t,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:e,pos:t,index:o}),n},s.prototype.addRows=function(e,t,o){var i=this,n=this,s=0,a=[];return new Promise(function(r,l){t=i.findAddRowPos(t),Array.isArray(e)||(e=[e]),s=e.length-1,(void 0===o&&t||void 0!==o&&!t)&&e.reverse(),e.forEach(function(e,i){var s=n.addRow(e,t,o,!0);a.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),r(a)})},s.prototype.findAddRowPos=function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e},s.prototype.addRowActual=function(e,t,o,i){var n,s,a=e instanceof l?e:new l(e||{},this),r=this.findAddRowPos(t),c=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(c=this.rows.indexOf(o)),o&&c>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(e){var t=e.indexOf(o);t>-1&&e.splice(r?t:t+1,0,a)}),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?c:c+1,0,a)):r?(this.displayRowIterator(function(e){e.unshift(a)}),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator(function(e){e.push(a)}),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},s.prototype.moveRow=function(e,t,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",e,{posFrom:this.getRowPosition(e),posTo:this.getRowPosition(t),to:t,after:o}),this.moveRowActual(e,t,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,e.getComponent())},s.prototype.moveRowActual=function(e,t,o){var i=this;if(this._moveRowInArray(this.rows,e,t,o),this._moveRowInArray(this.activeRows,e,t,o),this.displayRowIterator(function(n){i._moveRowInArray(n,e,t,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&t instanceof H&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t.getGroup(),s=e.getGroup();n===s?this._moveRowInArray(n.rows,e,t,o):(s&&s.removeRow(e),n.insertRow(e,t,o))}},s.prototype._moveRowInArray=function(e,t,o,i){var n,s,a,r;if(t!==o&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),s=e.indexOf(o),s>-1?i?e.splice(s+1,0,t):e.splice(s,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){a=nn?s:n+1;for(var l=a;l<=r;l++)e[l]&&this.styleRow(e[l],l)}},s.prototype.clearData=function(){this.setData([])},s.prototype.getRowIndex=function(e){return this.findRowIndex(e,this.rows)},s.prototype.getDisplayRowIndex=function(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t},s.prototype.nextDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return!1!==o&&o-1)&&o},s.prototype.getData=function(e,t){var o=[];return this.getRows(e).forEach(function(e){"row"==e.type&&o.push(e.getData(t||"data"))}),o},s.prototype.getComponents=function(e){var t=[];return this.getRows(e).forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getDataCount=function(e){return this.getRows(e).length},s.prototype._genRemoteRequest=function(){var e=this,t=this.table,o=t.options,i={};if(t.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(e){delete e.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}t.modules.ajax.sendRequest().then(function(t){e._setDataActual(t,!0)}).catch(function(e){})},s.prototype.filterRefresh=function(){var e=this.table,t=e.options,o=this.scrollLeft;t.ajaxFiltering?"remote"==t.pagination&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):t.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},s.prototype.sorterRefresh=function(e){var t=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(e?"filter":"sort"),this.scrollHorizontal(i)},s.prototype.scrollHorizontal=function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(e),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(e)},s.prototype.refreshActiveData=function(e,t,o){var i,n=this,s=this.table,a=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||a.indexOf(e)=0))break;s=r}else if(t-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},s.prototype.displayRowIterator=function(e){this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},s.prototype.getRows=function(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!0);break;case"selected":t=this.table.modules.selectRow.selectedRows;break;default:t=this.rows}return t},s.prototype.reRenderInPosition=function(e){if("virtual"==this.getRenderMode())if(this.redrawBlock)e?e():this.redrawBlockRederInPosition=!0;else{for(var t=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=t-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(u=!1),i.vDomBottom++,c++}e?(i.vDomTopPad=t?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-r-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((r+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+r+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",t&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&t&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=u?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},s.prototype.scrollVertical=function(e){var t=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-t>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else e?(t<0&&this._addTopRow(-t),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(t>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(t):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},s.prototype._addTopRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),e=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(e,t+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},s.prototype._removeTopRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,t.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,e=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(e)}},s.prototype._addBottomRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),e=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(e,t+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},s.prototype._removeBottomRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),t.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,e=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(e)}},s.prototype._quickNormalizeRowHeight=function(e){e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()}),e.length=0},s.prototype.normalizeHeight=function(){this.activeRows.forEach(function(e){e.normalizeHeight()})},s.prototype.adjustTableSize=function(){var e,t=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)", +this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||t==this.element.clientHeight||((e=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!e)&&this.redraw()}},s.prototype.reinitialize=function(){this.rows.forEach(function(e){e.reinitialize(!0)})},s.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},s.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},s.prototype.redraw=function(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(t)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},s.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))};var a=function(e){this.table=e,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};a.prototype.compatabilityCheck=function(){var e=this.table.options,t=!0;return"fitDataTable"==e.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),t=!1),e.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),t=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),t=!1),e.columns&&e.columns.find(function(e){return e.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),t=!1),t||(e.virtualDomHoz=!1),t},a.prototype.initialize=function(){var e=this;this.holderEl.addEventListener("scroll",function(){var t=e.holderEl.scrollLeft;e.scrollLeft!=t&&(e.scrollLeft=t,e.scroll(t-(e.vDomScrollPosLeft+e.window)))})},a.prototype.deinitialize=function(){this.initialized=!1},a.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},a.prototype.dataChange=function(){var e,t,o,i=!1,n=0,s=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(e){!e.definition.width&&e.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(e=this.table.modules.groupRows.getGroups(!1)[0],t=e.getRows(!1)[0]):t=this.table.rowManager.getDisplayRows()[0],t)){o=t.getElement(),t.generateCells(),this.element.appendChild(o);for(var s=0;sthis.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(s+1)),s;so.vDomScrollPosLeft&&n.8*this.holderEl.clientWidth?this.reinitialize():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},a.prototype.colPositionAdjust=function(e,t,o){for(var i=e;i=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},a.prototype.addColLeft=function(){var e=this.columns[this.leftCol-1];if(e&&e.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=e.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},a.prototype.removeColRight=function(e){var t,e=this.columns[this.rightCol];e&&e.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),e.modules.vdomHoz.visible=!1,t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=e.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},a.prototype.removeColLeft=function(){var e,t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos-1}return!1},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},r.prototype.addTreeChild=function(e,t,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,e,t,o)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var e=this._row.nextRow();return e?e.getComponent():e},r.prototype.getPrevRow=function(){var e=this._row.prevRow();return e?e.getComponent():e};var l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=t.table,this.parent=t,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(e)};l.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},l.prototype.createElement=function(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e},l.prototype.getElement=function(){return this.create(),this.element},l.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},l.prototype.generateElement=function(){var e,t,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(e){i.table.options.rowClick(e,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(e){i.table.options.rowDblClick(e,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(e){i.table.options.rowContext(e,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(e){i.table.options.rowMouseEnter(e,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(e){i.table.options.rowMouseLeave(e,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(e){i.table.options.rowMouseOver(e,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(e){i.table.options.rowMouseOut(e,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(e){i.table.options.rowMouseMove(e,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&i.table.options.rowTap(e,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,i.table.options.rowDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),i.table.options.rowTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,i.table.options.rowTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(e){var t=this;if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(e){t.element.appendChild(e.getElement()),e.cellRendered()}),e&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(e){e.reinitialize(!0)})},l.prototype.calcHeight=function(e){var t=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=e?Math.max(t,o):this.manualHeight?this.height:Math.max(t,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},l.prototype.setCellHeight=function(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(e){e.clearHeight()})},l.prototype.normalizeHeight=function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()},l.prototype.setHeight=function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.offsetWidth},l.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},l.prototype.setData=function(e){this.table.modExists("mutator")&&(e=this.table.modules.mutator.transformRow(e,"data")),this.data=e,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},l.prototype.updateData=function(e){var t,o=this,i=this.element&&h.prototype.helpers.elVisible(this.element),n={};return new Promise(function(s,a){"string"==typeof e&&(e=JSON.parse(e)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,e),t=o.table.modules.mutator.transformRow(n,"data",e)):t=e;for(var r in t)o.data[r]=t[r];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var r in e){o.table.columnManager.getColumnsByFieldRoot(r).forEach(function(e){var n=o.getCell(e.getField());if(n){var s=e.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(e)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()})},l.prototype.getData=function(e){return e&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,e):this.data},l.prototype.getCell=function(e){return e=this.table.columnManager.findColumn(e),this.cells.find(function(t){return t.column===e})},l.prototype.getCellIndex=function(e){return this.cells.findIndex(function(t){return t===e})},l.prototype.findNextEditableCell=function(e){var t=!1;if(e0)for(var o=e-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){t=i;break}}return t},l.prototype.getCells=function(){return this.cells},l.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},l.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},l.prototype.moveToRow=function(e,t){var o=this.table.rowManager.findRow(e);o?(this.table.rowManager.moveRowActual(this,o,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)},l.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},l.prototype.delete=function(){var e=this;return new Promise(function(t,o){var i,n;e.table.options.history&&e.table.modExists("history")&&(e.table.options.groupBy&&e.table.modExists("groupRows")?(n=e.getGroup().rows,(i=n.indexOf(e))&&(i=n[i-1])):(i=e.table.rowManager.getRowIndex(e))&&(i=e.table.rowManager.rows[i-1]),e.table.modules.history.action("rowDelete",e,{data:e.getData(),pos:!i,index:i})),e.deleteActual(),t()})},l.prototype.deleteActual=function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},l.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},l.prototype.deleteCells=function(){for(var e=this.cells.length,t=0;t",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(e,t){return t},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(e,t){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},h.prototype.initializeOptions=function(e){if(!1!==e.invalidOptionWarnings)for(var t in e)void 0===this.defaultOptions[t]&&console.warn("Invalid table constructor option:",t);for(var t in this.defaultOptions)t in e?this.options[t]=e[t]:Array.isArray(this.defaultOptions[t])?this.options[t]=Object.assign([],this.defaultOptions[t]):"object"===_typeof(this.defaultOptions[t])&&null!==this.defaultOptions[t]?this.options[t]=Object.assign({},this.defaultOptions[t]):this.options[t]=this.defaultOptions[t]},h.prototype.initializeElement=function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)},h.prototype.rtlCheck=function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},h.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},h.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},h.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new t(this),this.rowManager=new s(this),this.footerManager=new d(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new a(this)),this._buildElement(),this._loadInitialData()},h.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},h.prototype._buildElement=function(){var e=this,t=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(t.appendChild(this.columnManager.getElement()),t.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(t){var i=e.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;o.filter.setHeaderFilterValue(i,t.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},h.prototype._loadInitialData=function(){var e=this;if(e.options.pagination&&e.modExists("page"))if(e.modules.page.reset(!0,!0),"local"==e.options.pagination){if(e.options.data.length)e.rowManager.setData(e.options.data,!1,!0);else{if((e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax"))return void e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)});e.rowManager.setData(e.options.data,!1,!0)}e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)}else e.options.ajaxURL?e.modules.page.setPage(e.options.paginationInitialPage).then(function(){}).catch(function(){}):e.rowManager.setData([],!1,!0);else e.options.data.length?e.rowManager.setData(e.options.data):(e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax")?e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):e.rowManager.setData(e.options.data,!1,!0)},h.prototype.destroy=function(){var e=this.element;for(h.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(e){e.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")},h.prototype._detectBrowser=function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},h.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},h.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},h.prototype.setDataFromLocalFile=function(e){var t=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=e||".json,application/json",n.addEventListener("change",function(e){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(e){try{s=JSON.parse(r.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void i(e)}t.setData(s).then(function(e){o(e)}).catch(function(e){o(e)})},r.onerror=function(e){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},h.prototype.setData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!1,!0)},h.prototype._setData=function(e,t,o,i,n){var s=this;return"string"!=typeof e?e?s.rowManager.setData(e,i,n):s.modExists("ajax")&&(s.modules.ajax.getUrl||s.options.ajaxURLGenerator)?"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n):s.rowManager.setData([],i,n):0==e.indexOf("{")||0==e.indexOf("[")?s.rowManager.setData(JSON.parse(e),i,n):s.modExists("ajax",!0)?(t&&s.modules.ajax.setParams(t),o&&s.modules.ajax.setConfig(o),s.modules.ajax.setUrl(e),"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n)):void 0},h.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},h.prototype.getData=function(e){return!0===e&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getData(e)},h.prototype.getDataCount=function(e){return!0===e&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getDataCount(e)},h.prototype.searchRows=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",e,t,o)},h.prototype.searchData=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",e,t,o)},h.prototype.getHtml=function(e,t,o){if(this.modExists("export",!0))return this.modules.export.getHtml(e,t,o)},h.prototype.print=function(e,t,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(e,t,o)},h.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},h.prototype.replaceData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!0)},h.prototype.updateData=function(e){var t=this,o=this,i=0;return new Promise(function(n,s){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);t&&(i++,t.updateData(e).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.addData=function(e,t,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?i.rowManager.addRows(e,t,o).then(function(e){var t=[];e.forEach(function(e){t.push(e.getComponent())}),n(t)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.updateOrAddData=function(e){var t=this,o=this,i=[],n=0;return new Promise(function(s,a){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);n++,t?t.updateData(e).then(function(){n--,i.push(t.getComponent()),n||s(i)}):o.rowManager.addRows(e).then(function(e){n--,i.push(e[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))})},h.prototype.getRow=function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.getRowFromPosition=function(e,t){var o=this.rowManager.getRowFromPosition(e,t);return o?o.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.deleteRow=function(e){var t=this;return new Promise(function(o,i){function n(){++a==e.length&&r&&(s.rowManager.reRenderInPosition(),o())}var s=t,a=0,r=0,l=[];Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.rowManager.findRow(e,!0);o?l.push(o):(console.warn("Delete Error - No matching row found:",e),i("Delete Error - No matching row found"),n())}),l.sort(function(e,o){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(o)?1:-1}),l.forEach(function(e){e.delete().then(function(){r++,n()}).catch(function(e){n(),i(e)})})})},h.prototype.addRow=function(e,t,o){var i=this;return new Promise(function(n,s){"string"==typeof e&&(e=JSON.parse(e)),i.rowManager.addRows(e,t,o).then(function(e){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(e[0].getComponent())})})},h.prototype.updateOrAddRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(e){n(e)}):s=o.rowManager.addRows(t).then(function(e){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(e[0].getComponent())}).catch(function(e){n(e)})})},h.prototype.updateRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){i(s.getComponent())}).catch(function(e){n(e)}):(console.warn("Update Error - No matching row found:",e),n("Update Error - No matching row found"))})},h.prototype.scrollToRow=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.rowManager.findRow(e);a?i.rowManager.scrollToRow(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching row found:",e),s("Scroll Error - No matching row found"))})},h.prototype.moveRow=function(e,t,o){var i=this.rowManager.findRow(e);i?i.moveToRow(t,o):console.warn("Move Error - No matching row found:",e)},h.prototype.getRows=function(e){return!0===e&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getComponents(e)},h.prototype.getRowPosition=function(e,t){var o=this.rowManager.findRow(e);return o?this.rowManager.getRowPosition(o,t):(console.warn("Position Error - No matching row found:",e),!1)},h.prototype.copyToClipboard=function(e){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(e)},h.prototype.setColumns=function(e){this.columnManager.setColumns(e)},h.prototype.getColumns=function(e){return this.columnManager.getComponents(e)},h.prototype.getColumn=function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)},h.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},h.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},h.prototype.setColumnLayout=function(e){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,e)),!0)},h.prototype.showColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.hideColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.toggleColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()},h.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(e,t,a).then(function(e){n(e.getComponent())}).catch(function(e){s(e)})})},h.prototype.deleteColumn=function(e){var t=this;return new Promise(function(o,i){var n=t.columnManager.findColumn(e);n?n.delete().then(function(){o()}).catch(function(e){i(e)}):(console.warn("Column Delete Error - No matching column found:",e),i())})},h.prototype.updateColumnDefinition=function(e,t){var o=this;return new Promise(function(i,n){var s=o.columnManager.findColumn(e);s?s.updateDefinition(t).then(function(e){i(e)}).catch(function(e){n(e)}):(console.warn("Column Update Error - No matching column found:",e),n())})}, +h.prototype.moveColumn=function(e,t,o){var i=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)},h.prototype.scrollToColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(e);a?i.columnManager.scrollToColumn(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching column found:",e),s("Scroll Error - No matching column found"))})},h.prototype.setLocale=function(e){this.modules.localize.setLocale(e)},h.prototype.getLocale=function(){return this.modules.localize.getLocale()},h.prototype.getLang=function(e){return this.modules.localize.getLang(e)},h.prototype.redraw=function(e){this.columnManager.redraw(e),this.rowManager.redraw(e)},h.prototype.setHeight=function(e){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},h.prototype.setSort=function(e,t){this.modExists("sort",!0)&&(this.modules.sort.setSort(e,t),this.rowManager.sorterRefresh())},h.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},h.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},h.prototype.setFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},h.prototype.addFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.getFilters=function(e){if(this.modExists("filter",!0))return this.modules.filter.getFilters(e)},h.prototype.setHeaderFilterFocus=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterFocus(t)}},h.prototype.getHeaderFilterValue=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(t)return this.modules.filter.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},h.prototype.setHeaderFilterValue=function(e,t){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(e);if(!o)return console.warn("Column Filter Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterValue(o,t)}},h.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},h.prototype.removeFilter=function(e,t,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(e,t,o),this.rowManager.filterRefresh())},h.prototype.clearFilter=function(e){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(e),this.rowManager.filterRefresh())},h.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},h.prototype.selectRow=function(e){this.modExists("selectRow",!0)&&(!0===e&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),e="active"),this.modules.selectRow.selectRows(e))},h.prototype.deselectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(e)},h.prototype.toggleSelectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(e)},h.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},h.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},h.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},h.prototype.clearCellValidation=function(e){var t=this;this.modExists("validate",!0)&&(e||(e=this.modules.validate.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.validate.clearValidation(e._getSelf())}))},h.prototype.validate=function(e){var t=[];return this.rowManager.rows.forEach(function(e){var o=e.validate();!0!==o&&(t=t.concat(o))}),!t.length||t},h.prototype.setMaxPage=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(e)},h.prototype.setPage=function(e){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(e):new Promise(function(e,t){t()})},h.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){t.options.pagination&&t.modExists("page")?(e=t.rowManager.findRow(e),e?t.modules.page.setPageToRow(e).then(function(){o()}).catch(function(){i()}):i()):i()})},h.prototype.setPageSize=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(e),this.modules.page.setPage(1).then(function(){}).catch(function(){})},h.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},h.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},h.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},h.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},h.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},h.prototype.setGroupBy=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupValues=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupStartOpen=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.setGroupHeader=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.getGroups=function(e){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},h.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},h.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},h.prototype.clearCellEdited=function(e){var t=this;this.modExists("edit",!0)&&(e||(e=this.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.edit.clearEdited(e._getSelf())}))},h.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},h.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},h.prototype.navigatePrev=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().prev()},h.prototype.navigateNext=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().next()},h.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},h.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},h.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},h.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},h.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},h.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},h.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},h.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},h.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},h.prototype.download=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i)},h.prototype.downloadToTab=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i,!0)},h.prototype.tableComms=function(e,t,o,i){this.modules.comms.receive(e,t,o,i)},h.prototype.moduleBindings={},h.prototype.extendModule=function(e,t,o){if(h.prototype.moduleBindings[e]){var i=h.prototype.moduleBindings[e].prototype[t];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)},h.prototype.registerModule=function(e,t){h.prototype.moduleBindings[e]=t},h.prototype.bindModules=function(){this.modules={};for(var e in h.prototype.moduleBindings)this.modules[e]=new h.prototype.moduleBindings[e](this)},h.prototype.modExists=function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)},h.prototype.helpers={elVisible:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)},elOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(e){var t=Object.assign(Array.isArray(e)?[]:{},e);for(var o in e)null!=e[o]&&"object"===_typeof(e[o])&&(e[o]instanceof Date?t[o]=new Date(e[o]):t[o]=this.deepClone(e[o]));return t}},h.prototype.comms={tables:[],register:function(e){h.prototype.comms.tables.push(e)},deregister:function(e){var t=h.prototype.comms.tables.indexOf(e);t>-1&&h.prototype.comms.tables.splice(t,1)},lookupTable:function(e,t){var o,i,n=[];if("string"==typeof e){if(o=document.querySelectorAll(e),o.length)for(var s=0;s0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){function t(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function o(e,i,n,s){function a(e){return n*(e.column.definition.widthGrow||1)}function l(e){return t(e.width)-n*(e.column.definition.widthShrink||0)}var c=[],u=0,d=0,h=0,p=r,m=0,f=0,g=[];return e.forEach(function(e,t){var o=s?l(e):a(e);e.column.minWidth>=o?c.push(e):e.column.maxWidth&&e.column.maxWidththis.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach(function(e){var o,i,n;e.visible&&(o=e.definition.width,i=parseInt(e.minWidth),o?(n=t(o),s+=n>i?n:i,e.definition.widthShrink&&(u.push({column:e,width:n>i?n:i}),d+=e.definition.widthShrink)):(c.push({column:e,width:0}),r+=e.definition.widthGrow||1))}),a=n-s,l=Math.floor(a/r);var p=o(c,a,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(e){a-=e.width}),h=Math.abs(p)+a,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(e){e.column.setWidth(e.width)}),u.forEach(function(e){e.column.setWidth(e.width)})}},h.prototype.registerModule("layout",p);var m=function(e){this.table=e,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};m.prototype.initialize=function(){this.langList=h.prototype.helpers.deepClone(this.langs)},m.prototype.setHeaderFilterPlaceholder=function(e){this.langList.default.headerFilters.default=e},m.prototype.setHeaderFilterColumnPlaceholder=function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)},m.prototype.installLang=function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t},m.prototype._setLangProp=function(e,t){for(var o in t)e[o]&&"object"==_typeof(e[o])?this._setLangProp(e[o],t[o]):e[o]=t[o]},m.prototype.setLocale=function(e){function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}var o=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!o.langList[e]){var i=e.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}o.locale=e,o.lang=h.prototype.helpers.deepClone(o.langList.default||{}),"default"!=e&&t(o.langList[e],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},m.prototype.getLocale=function(e){return self.locale},m.prototype.getLang=function(e){return e?this.langList[e]:this.lang},m.prototype.getText=function(e,t){var e=t?e+"|"+t:e,o=e.split("|");return this._getLangElement(o,this.locale)||""},m.prototype._getLangElement=function(e,t){var o=this,i=o.lang;return e.forEach(function(e){var t;i&&(t=i[e],i=void 0!==t&&t)}),i},m.prototype.bind=function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)},m.prototype._executeBindings=function(){var e=this;for(var t in e.bindings)!function(t){e.bindings[t].forEach(function(o){o(e.getText(t),e.lang)})}(t)},m.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},h.prototype.registerModule("localize",m);var f=function(e){this.table=e};f.prototype.getConnections=function(e){var t,o=this,i=[];return t=h.prototype.comms.lookupTable(e),t.forEach(function(e){o.table!==e&&i.push(e)}),i},f.prototype.send=function(e,t,o,i){var n=this,s=this.getConnections(e);s.forEach(function(e){e.tableComms(n.table.element,t,o,i)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)},f.prototype.receive=function(e,t,o,i){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,o,i);console.warn("Inter-table Comms Error - no such module:",t)},h.prototype.registerModule("comms",f);var g=function(e){this.table=e,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};g.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupAccessor(e.definition[a]))&&(o=!0,i[a]={accessor:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.accessor=i)},g.prototype.lookupAccessor=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.accessors[e]?t=this.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t},g.prototype.transformRow=function(e,t){var o="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),i=e.getComponent(),n=h.prototype.helpers.deepClone(e.data||{});return this.table.columnManager.traverse(function(e){var s,a,r,l;e.modules.accessor&&(a=e.modules.accessor[o]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),r="function"==typeof a.params?a.params(s,n,t,l,i):a.params,e.setFieldValue(n,a.accessor(s,n,t,r,l,i)))}),n},g.prototype.accessors={},h.prototype.registerModule("accessor",g);var b=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};b.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},b.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},b.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},b.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},b.prototype.getParams=function(){return this.params||{}},b.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},b.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},b.prototype.setUrl=function(e){this.url=e},b.prototype.getUrl=function(){return this.url},b.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},b.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ei||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return o.dataTreeStartExpanded[t]}}},E.prototype.initializeRow=function(e){var t=e.getData()[this.field],o=Array.isArray(t),i=o||!o&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!i&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!i&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!i&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:i}},E.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],o=t.getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,o),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?o.style.paddingRight=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},E.prototype.generateControlElement=function(e,t){var o=this,i=e.modules.dataTree,t=t||e.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.expandRow(e)})),i.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))},E.prototype.setDisplayIndex=function(e){this.displayIndex=e},E.prototype.getDisplayIndex=function(){return this.displayIndex},E.prototype.getRows=function(e){var t=this,o=[];return e.forEach(function(e,i){var n,s;o.push(e),e instanceof l&&(e.create(),n=e.modules.dataTree.children,n.index||!1===n.children||(s=t.getChildren(e),s.forEach(function(e){e.create(),o.push(e)})))}),o},E.prototype.getChildren=function(e){var t=this,o=e.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),i=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(i),i.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n},E.prototype.generateChildren=function(e){var t=this,o=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new l(i||{},t.table.rowManager);n.create(),n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=t.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},E.prototype.expandRow=function(e,t){var o=e.modules.dataTree;!1!==o.children&&(o.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},E.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},E.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},E.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},E.prototype.getFilteredTreeChildren=function(e){var t,o=e.modules.dataTree,i=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,t.forEach(function(e){e instanceof l&&i.push(e)})),i},E.prototype.rowDelete=function(e){var t,o=e.modules.dataTree.parent;o&&(t=this.findChildIndex(e,o),!1!==t&&o.data[this.field].splice(t,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.addTreeChildRow=function(e,t,o,i){var n=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,e))&&e.data[this.field].splice(o?n:n+1,0,t),!1===n&&(o?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.findChildIndex=function(e,t){var o=this,i=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof l?i=e.data:e instanceof r?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find(function(t){return t instanceof l&&t.element===e}))&&(i=i.data):i=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[o.table.options.index]==e}),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},E.prototype.getTreeChildren=function(e,t,o){var i=this,n=e.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(function(e){e instanceof l&&(s.push(t?e.getComponent():e),o&&(s=s.concat(i.getTreeChildren(e,t,o))))})),s},E.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},E.prototype.getChildField=function(){return this.field},E.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},h.prototype.registerModule("dataTree",E);var C=function(e){this.table=e};C.prototype.download=function(e,t,o,i,n){function s(o,i){n?!0===n?a.triggerDownload(o,i,e,t,!0):n(o):a.triggerDownload(o,i,e,t)}var a=this,r=!1;if("function"==typeof e?r=e:a.downloaders[e]?r=a.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var l=this.generateExportList(i);r.call(this.table,l,o||{},s)}},C.prototype.generateExportList=function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),t.forEach(function(e){var t;"group"===e.type&&(t=e.columns[0],o&&o[e.indent]&&(t.value=o[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),t},C.prototype.triggerDownload=function(e,t,o,i,n){var s=document.createElement("a"),a=new Blob([e],{type:t}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,e,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},C.prototype.commsReceived=function(e,t,o){switch(t){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},C.prototype.downloaders={csv:function(e,t,o){var i=t&&t.delimiter?t.delimiter:",",n=[],s=[];e.forEach(function(e){var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,t){e&&1===e.depth&&(s[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}}),n.push(t.join(i))}}),s.length&&n.unshift(s.join(i)),n=n.join("\n"),t.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(e,t,o){var i=[];e.forEach(function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(t[e.component.getField()]=e.value)}),i.push(t)}}),i=JSON.stringify(i,null,"\t"),o(i,"application/json")},pdf:function(e,t,o){function i(e,t){var o=[];return e.columns.forEach(function(e){var i;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}i={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(i.styles=t),o.push(i)}else o.push("")}),o}var n=[],s=[],a={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=t.jsPDF||{},u=t&&t.title?t.title:"";c.orientation||(c.orientation=t.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":n.push(i(e));break;case"group":s.push(i(e,r));break;case"calc":s.push(i(e,l));break;case"row":s.push(i(e))}});var d=new jsPDF(c);t&&t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(d)||{}:t.autoTable),u&&(a.addPageContent=function(e){d.text(u,40,30)}),a.head=n,a.body=s,d.autoTable(a),t&&t.documentProcessing&&t.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,o){function i(){var t=[],o=[],i={},n={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,t){return e+(t&&t.width?t.width:1)},0):0,r:e.length}};return e.forEach(function(e,i){var n=[];e.columns.forEach(function(e,t){e?(n.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&o.push({s:{r:i,c:t},e:{r:i+e.height-1,c:t+e.width-1}})):n.push("")}),t.push(n)}),XLSX.utils.sheet_add_aoa(i,t),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}var n,s=this,a=t.sheetName||"Sheet1",r=XLSX.utils.book_new();if(r.SheetNames=[],r.Sheets={},t.sheetOnly)return void o(i());if(t.sheets)for(var l in t.sheets)!0===t.sheets[l]?(r.SheetNames.push(l),r.Sheets[l]=i()):(r.SheetNames.push(l),this.modules.comms.send(t.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:s.active,intercept:function(e){r.Sheets[l]=e}}));else r.SheetNames.push(a),r.Sheets[a]=i();t.documentProcessing&&(r=t.documentProcessing(r)),n=XLSX.write(r,{bookType:"xlsx",bookSST:!0,type:"binary"}),o(function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),i=0;i!=e.length;++i)o[i]=255&e.charCodeAt(i);return t}(n),"application/octet-stream")},html:function(e,t,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(e),"text/html")}},h.prototype.registerModule("download",C);var x=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};x.prototype.initializeColumn=function(e){var t=this,o={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?o.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":o.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?o.editor=t.editors[e.definition.formatter]:o.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}o.editor&&(e.modules.edit=o)},x.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},x.prototype.clearEditor=function(e){var t,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,t=o.getElement(),e?o.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},x.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},x.prototype.bindEditor=function(e){var t=this,o=e.getElement(!0);o.setAttribute("tabindex",0),o.addEventListener("click",function(e){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})}),o.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),o.addEventListener("focus",function(o){t.recursionBlock||t.edit(e,o,!1)})},x.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},x.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},x.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=e.row.getElement();i.offsetTop;i.offsetTopo&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=e.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),a.offsetLefts&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},x.prototype.edit=function(e,t,o){function i(t){if(c.currentCell===e){var o=!0;return e.column.modules.validate&&c.table.modExists("validate")&&"manual"!=c.table.options.validationMode&&(o=c.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===o||"highlight"===c.table.options.validationMode?(c.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==c.editedCells.indexOf(e)&&c.editedCells.push(e),e.setValue(t,!0),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e),!0===o||(h.classList.add("tabulator-validation-fail"),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)):(c.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),c.focusCellNoEvent(e,!0),d(),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)}}function n(){c.currentCell===e&&(c.cancelEdit(),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e))}function s(e){d=e}var a,r,l,c=this,u=!0,d=function(){},h=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":u=e.column.modules.edit.check(e.getComponent());break;case"boolean":u=e.column.modules.edit.check}if(u||o){if(c.cancelEdit(),c.currentCell=e,this.focusScrollAdjust(e),r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),c.table.options.cellEditing.call(this.table,r),l="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(a=e.column.modules.edit.editor.call(c,r,s,i,n,l)))return h.blur(),!1;if(!(a instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(a),d();for(var p=h.children,m=0;m46){if(o>=i.length)return t.preventDefault(),t.stopPropagation(),r=!1,!1;switch(i[o]){case n:if(l.toUpperCase()==l.toLowerCase())return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case s:if(isNaN(l))return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case a:break;default:if(l!==i[o])return t.preventDefault(),t.stopPropagation(),r=!1,!1}r=!0}}),e.addEventListener("keyup",function(i){i.keyCode>46&&t.maskAutoFill&&o(e.value.length)}),e.placeholder||(e.placeholder=i),t.maskAutoFill&&o(e.value.length)},x.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},x.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},x.prototype.editors={input:function(e,t,o,i,n){function s(e){(null===a||void 0===a)&&""!==r.value||r.value!==a?o(r.value)&&(a=r.value):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",n.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=void 0!==a?a:"",t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("change",s),r.addEventListener("blur",s),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s(e);break;case 27:i();break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(r,n),r},textarea:function(e,t,o,i,n){function s(t){(null===a||void 0===a)&&""!==c.value||c.value!==a?(o(c.value)&&(a=c.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):i()}var a=e.getValue(),r=n.verticalNavigation||"hybrid",l=String(null!==a&&void 0!==a?a:""),c=(l.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),u=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),c.setAttribute(d,c.getAttribute(d)+n.elementAttributes["+"+d])):c.setAttribute(d,n.elementAttributes[d]);return c.value=l,t(function(){c.focus({preventScroll:!0}),c.style.height="100%",c.scrollHeight,c.style.height=c.scrollHeight+"px",e.getRow().normalizeHeight()}),c.addEventListener("change",s),c.addEventListener("blur",s),c.addEventListener("keyup",function(){c.style.height="" +;var t=c.scrollHeight;c.style.height=t+"px",t!=u&&(u=t,e.getRow().normalizeHeight())}),c.addEventListener("keydown",function(e){switch(e.keyCode){case 27:i();break;case 38:("editor"==r||"hybrid"==r&&c.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&c.selectionStart!==c.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(c,n),c},number:function(e,t,o,i,n){function s(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==a?o(e)&&(a=e):i()}var a=e.getValue(),r=n.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==n.max&&l.setAttribute("max",n.max),void 0!==n.min&&l.setAttribute("min",n.min),void 0!==n.step&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=a;var u=function(e){s()};return t(function(){l.removeEventListener("blur",u),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",u)}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(l,n),l},range:function(e,t,o,i,n){function s(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=a?o(e)&&(a=e):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==n.max&&r.setAttribute("max",n.max),void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=a,t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("blur",function(e){s()}),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i()}}),r},select:function(e,t,o,i,n){function s(t){var o,i={},n=x.table.getData();return o=t?x.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?n.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(i)}function a(t,o){function i(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return o.indexOf(e.value)>-1&&c(e),s.push(e),a.push(e),e}var s=[],a=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},a.push(t),e.options.forEach(function(e){i(e)})):i(e):(t={label:e,value:e,element:!1},o.indexOf(t.value)>-1&&c(t),s.push(t),a.push(t))});else for(var l in t){var u={label:t[l],value:l,element:!1};o.indexOf(u.value)>-1&&c(u),s.push(u),a.push(u)}n.sortValuesList&&(s.sort(function(e,t){return e.labelt.label?1:0}),a.sort(function(e,t){return e.labelt.label?1:0}),"asc"!==n.sortValuesList&&(s.reverse(),a.reverse())),S=s,P=a,r()}function r(){for(;k.firstChild;)k.removeChild(k.firstChild);P.forEach(function(t){var o=t.element;if(!o){if(o=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,o,t.itemParams):t.label,t.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label,o.addEventListener("click",function(){F=!0,setTimeout(function(){F=!1},10),z?(d(t),D.focus()):p(t)}),A.indexOf(t)>-1&&o.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var i in t.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,D.getAttribute(i)+t.elementAttributes["+"+i])):o.setAttribute(i,t.elementAttributes[i]);o.addEventListener("mousedown",function(){_=!1,setTimeout(function(){_=!0},10)}),t.element=o}k.appendChild(o)})}function l(e,t){!z&&H&&H.element&&H.element.classList.remove("active"),H&&H.element&&H.element.classList.remove("focused"),H=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function c(e){-1==A.indexOf(e)&&(A.push(e),l(e,!0)),f()}function u(e){var t=A[e];e>-1&&(A.splice(e,1),t.element&&t.element.classList.remove("active"))}function d(e){e||(e=H);var t=A.indexOf(e);t>-1?u(t):(!0!==z&&A.length>=z&&u(0),c(e)),f()}function p(e){y(),e||(e=H),e&&(D.value=e.label,o(e.value)),T=D.value}function m(e){e||y();var t=[];A.forEach(function(e){t.push(e.value)}),T=D.value,o(t)}function f(){var e=[];A.forEach(function(t){e.push(t.label)}),D.value=e.join(", "),!1===x.currentCell&&m(!0)}function g(){for(var e=A.length,t=0;t0&&l(S[t-1],!z));break;case 40:t=S.indexOf(H),("editor"==L||"hybrid"==L&&t=38&&e.keyCode<=90&&E(e.keyCode)}}),D.addEventListener("blur",function(e){_&&(z?m():b())}),D.addEventListener("focus",function(e){F||v()}),k=document.createElement("div"),k.classList.add("tabulator-edit-select-list"),t(function(){D.style.height="100%",D.focus({preventScroll:!0})}),setTimeout(function(){C.table.rowManager.element.addEventListener("scroll",b)},10),D},autocomplete:function(e,t,o,i,n){function s(){!0===n.values?S=a():"string"==typeof n.values&&(S=a(n.values))}function a(t){var o,i={},s=E.table.getData();return o=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",t),i}function r(e,t){var o,i,s=[];o=S||(n.values||[]),n.searchFunc?(s=n.searchFunc(e,o),s instanceof Promise?(l(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then(function(e){d(c(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):d(c(s),t)):(i=c(o),""===e?n.showListOnEmpty&&(s=i):i.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&s.push(t)}),d(s,t))}function l(e){var t=document.createElement("div");u(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,T.appendChild(t))}function c(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var o={};"object"===(void 0===e?"undefined":_typeof(e))?(o.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,o.value=e.value):(o.title=n.listItemFormatter?n.listItemFormatter(e,e):e,o.value=e),t.push(o)});else for(var o in e){var i={title:n.listItemFormatter?n.listItemFormatter(o,e[o]):e[o],value:o};t.push(i)}return t}function u(){for(;T.firstChild;)T.removeChild(T.firstChild)}function d(e,t){e.length?p(e,t):n.emptyPlaceholder&&l(n.emptyPlaceholder)}function p(e,t){var o=!1;u(),D=e,D.forEach(function(e){var i=e.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=e.title,i.addEventListener("click",function(t){g(e),m()}),i.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),e.element=i,t&&e.value==x&&(L.value=e.title,e.element.classList.add("active"),o=!0),e===k&&(e.element.classList.add("active"),o=!0)),T.appendChild(i)}),o||g(!1)}function m(){b(),k?x!==k.value?(x=k.value,L.value=k.title,o(k.value)):i():n.freetext?(x=L.value,o(L.value)):n.allowEmpty&&""===L.value?(x=L.value,o(L.value)):i()}function f(){if(!T.parentNode){for(;T.firstChild;)T.removeChild(T.firstChild);var e=h.prototype.helpers.elOffset(C);T.style.minWidth=C.offsetWidth+"px",T.style.top=e.top+C.offsetHeight+"px",T.style.left=e.left+"px",document.body.appendChild(T)}}function g(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function b(){T.parentNode&&T.parentNode.removeChild(T),y()}function v(){b(),i()}function y(){E.table.rowManager.element.removeEventListener("scroll",v)}var w=this,E=this,C=e.getElement(),x=e.getValue(),R=n.verticalNavigation||"editor",M=void 0!==x||null===x?x:void 0!==n.defaultValue?n.defaultValue:"",L=document.createElement("input"),T=document.createElement("div"),D=[],k=!1,z=!0,S=!1;if(L.setAttribute("type","search"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var H in n.elementAttributes)"+"==H.charAt(0)?(H=H.slice(1),L.setAttribute(H,L.getAttribute(H)+n.elementAttributes["+"+H])):L.setAttribute(H,n.elementAttributes[H]);return T.classList.add("tabulator-edit-select-list"),T.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=D.indexOf(k),("editor"==R||"hybrid"==R&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),g(t>0?D[t-1]:!1));break;case 40:t=D.indexOf(k),("editor"==R||"hybrid"==R&&t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function a(e){c=e,s(e)}var r=this,l=e.getElement(),c=e.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),s(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e),l.blur()}),t.appendChild(i),p.appendChild(t)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(e){s(0)}),p.addEventListener("click",function(e){o(0)}),l.addEventListener("blur",function(e){i()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:a(c+1);break;case 37:a(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(e,t,o,i,n){function s(){var e=window.getComputedStyle(l,null),t=d*Math.round(m.offsetWidth/((l.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+u;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var a,r,l=e.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=e.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(e){a=e.screenX,r=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(e){a&&(m.style.width=r+e.screenX-a+"px")}),l.addEventListener("mouseup",function(e){a&&(e.stopPropagation(),e.stopImmediatePropagation(),a=!1,r=!1,s())}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(e,t,o,i,n){function s(e){return l?e?u?c:r.checked:r.checked&&!u?(r.checked=!1,r.indeterminate=!0,u=!0,c):(u=!1,r.checked):r.checked}var a=e.getValue(),r=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),r.setAttribute(d,r.getAttribute(d)+n.elementAttributes["+"+d])):r.setAttribute(d,n.elementAttributes[d]);return r.value=a,!l||void 0!==a&&a!==c&&""!==a||(u=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus({preventScroll:!0})}),r.checked=!0===a||"true"===a||"True"===a||1===a,t(function(){r.focus()}),r.addEventListener("change",function(e){o(s())}),r.addEventListener("blur",function(e){o(s(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&o(s()),27==e.keyCode&&i()}),r}},h.prototype.registerModule("edit",x);var R=function(e,t,o,i){this.type=e,this.columns=t,this.component=o||!1,this.indent=i||0},M=function(e,t,o,i,n){this.value=e,this.component=t||!1,this.width=o,this.height=i,this.depth=n},L=function(e){this.table=e,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};L.prototype.generateExportList=function(e,t,o,i){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},L.prototype.genereateTable=function(e,t,o,i){var n=this.generateExportList(e,t,o,i);return this.genereateTableElement(n)},L.prototype.rowLookup=function(e){var t=this,o=[];if("function"==typeof e)e.call(this.table).forEach(function(e){(e=t.table.rowManager.findRow(e))&&o.push(e)});else switch(e){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},L.prototype.generateColumnGroupHeaders=function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var i=e.processColumnGroup(o);i&&t.push(i)}),t},L.prototype.processColumnGroup=function(e){var t=this,o=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,s={title:n,column:e,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(e){var o=t.processColumnGroup(e);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s},L.prototype.columnVisCheck=function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])},L.prototype.headersToExportRows=function(e){function t(e,n){var s=i-n;if(void 0===o[n]&&(o[n]=[]),e.height=e.subGroups?1:s-e.depth+1,o[n].push(e),e.height>1)for(var a=1;a1)for(var r=1;ri&&(i=e.depth)}),e.forEach(function(e){t(e,0)}),o.forEach(function(e){var t=[];e.forEach(function(e){e?t.push(new M(e.title,e.column.getComponent(),e.width,e.height,e.depth)):t.push(null)}),n.push(new R("header",t))}),n},L.prototype.bodyToExportRows=function(e){var t=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach(function(e){t.columnVisCheck(e)&&o.push(e.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}),e.forEach(function(e,n){var s=e.getData(t.colVisProp),a=[],r=0;switch(e.type){case"group":r=e.level,a.push(new M(e.key,e.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(e){a.push(new M(e._column.getFieldValue(s),e,1,1))}),t.table.options.dataTree&&!1!==t.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new R(e.type,a,e.getComponent(),r))}),i},L.prototype.genereateTableElement=function(e){var t=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(function(e,o){switch(e.type){case"header":i.appendChild(t.genereateHeaderElement(e,r,s));break;case"group":n.appendChild(t.genereateGroupElement(e,r,s));break;case"calc":n.appendChild(t.genereateCalcElement(e,r,s));break;case"row":var a=t.genereateRowElement(e,r,s);t.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}}),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},L.prototype.lookupTableStyles=function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e},L.prototype.genereateHeaderElement=function(e,t,o){var i=this,n=document.createElement("tr");return e.columns.forEach(function(e){if(e){var t=document.createElement("th"),o=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,i.cloneTableStyle&&(t.style.boxSizing="border-box"),o.forEach(function(e){t.classList.add(e)}),i.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?i.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&i.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),n.appendChild(t)}}),n},L.prototype.genereateGroupElement=function(e,t,o){var i=document.createElement("tr"),n=document.createElement("td"),s=e.columns[0];return i.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?s.value=t.groupHeader[e.indent](s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?s.value=s.value:s.value=e.component._group.generator(s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+e.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},L.prototype.genereateCalcElement=function(e,t,o){var i=this.genereateRowElement(e,t,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},L.prototype.genereateRowElement=function(e,t,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(function(a){if(a){var r=document.createElement("td"),l=a.component._column,c=a.value,u={modules:{},getValue:function(){return c},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return u},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach(function(e){r.classList.add(e)}),n.table.modExists("format")&&!1!==n.config.formatCells)c=n.table.modules.format.formatExportValue(u,n.colVisProp);else switch(void 0===c?"undefined":_typeof(c)){case"object":c=JSON.stringify(c);break;case"undefined":case"null":c="";break;default:c=c}c instanceof Node?r.appendChild(c):r.innerHTML=c,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),u.modules.format&&u.modules.format.renderedCallback&&u.modules.format.renderedCallback(),t.rowFormatter&&!1!==n.config.formatCells&&t.rowFormatter(e.component)}}),s},L.prototype.genereateHTMLTable=function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML},L.prototype.getHtml=function(e,t,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,t,e,i||"htmlOutput");return this.genereateHTMLTable(n)},L.prototype.mapElementStyles=function(e,t,o){if(this.cloneTableStyle&&e&&t){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);o.forEach(function(e){t.style[i[e]]=n.getPropertyValue(e)})}}},h.prototype.registerModule("export",L);var T=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};T.prototype.initializeColumn=function(e,t){function o(t){var o,a="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",l="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[s];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(o){var i=e.definition.headerFilterFuncParams||{},s=e.getFieldValue(o);return i="function"==typeof i?i(t,s,o):i,n.filters[e.definition.headerFilterFunc](t,s,o,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(o);return i="function"==typeof i?i(t,n,o):i,e.definition.headerFilterFunc(t,n,o,i)},r=o}if(!o)switch(a){case"partial":o=function(o){var i=e.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(o){return e.getFieldValue(o)==t},r="="}n.headerFilters[s]={value:t,func:o,type:r,params:i||{}}}l=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==l&&(n.prevHeaderFilterChangeCheck=l,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,s=e.getField();e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},T.prototype.generateHeaderFilterElement=function(e,t,o){function i(){}var n,s,a,r,l,c,u,d=this,h=this,p=e.modules.filter.success,m=e.getField() +;if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),m){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":h.table.modules.edit.editors[e.definition.headerFilter]?(s=h.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?s=e.modules.edit.editor:e.definition.formatter&&h.table.modules.edit.editors[e.definition.formatter]?(s=h.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):s=h.table.modules.edit.editors.input}if(s){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(a=s.call(this.table.modules.edit,r,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(a instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",a);m?h.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){a.setAttribute("placeholder",void 0!==e&&e?e:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(e){a.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:e)}),a.addEventListener("click",function(e){e.stopPropagation(),a.focus()}),a.addEventListener("focus",function(e){var t=d.table.columnManager.element.scrollLeft;t!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(t),d.table.columnManager.scrollHorizontal(t))}),l=!1,c=function(e){l&&clearTimeout(l),l=setTimeout(function(){p(a.value)},h.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=a,e.modules.filter.attrType=a.hasAttribute("type")?a.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=a.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(a.addEventListener("keyup",c),a.addEventListener("search",c),"number"==e.modules.filter.attrType&&a.addEventListener("change",function(e){p(a.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&a.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||a.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(a),e.contentElement.appendChild(n),o||h.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},T.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},T.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},T.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},T.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},T.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},T.prototype.setFilter=function(e,t,o,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),n.addFilter(e)},T.prototype.addFilter=function(e,t,o,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.findFilter=function(e){var t,o=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:o.filters[e.type]?(t=o.table.columnManager.getColumnByField(e.field),i=t?function(i){return o.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return o.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},T.prototype.findSubFilters=function(e){var t=this,o=[];return e.forEach(function(e){(e=t.findFilter(e))&&o.push(e)}),!!o.length&&o},T.prototype.getFilters=function(e,t){var o=[];return e&&(o=this.getHeaderFilters()),t&&o.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),o=o.concat(this.filtersToArray(this.filterList,t))},T.prototype.filtersToArray=function(e,t){var o=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(o.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},T.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},T.prototype.removeFilter=function(e,t,o){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:o}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},T.prototype.search=function(e,t,o,i){var n=this,s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:o,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&a.push(e)}),this.table.rowManager.rows.forEach(function(t){var o=!0;a.forEach(function(e){n.filterRecurse(e,t.getData())||(o=!1)}),o&&s.push("data"===e?t.getData("data"):t.getComponent())}),s},T.prototype.filter=function(e,t){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=e.slice(0):e.forEach(function(e){o.filterRow(e)&&i.push(e)}),o.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},T.prototype.filterRow=function(e,t){var o=this,i=!0,n=e.getData();o.filterList.forEach(function(e){o.filterRecurse(e,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},T.prototype.filterRecurse=function(e,t){var o=this,i=!1;return Array.isArray(e)?e.forEach(function(e){o.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},T.prototype.filters={"=":function(e,t,o,i){return t==e},"<":function(e,t,o,i){return t":function(e,t,o,i){return t>e},">=":function(e,t,o,i){return t>=e},"!=":function(e,t,o,i){return t!=e},regex:function(e,t,o,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,o,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null===t||void 0===t?"":t).toLowerCase(),a=[];return n.forEach(function(e){s.includes(e)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,o,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},h.prototype.registerModule("filter",T);var D=function(e){this.table=e};D.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},D.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},i=e.definition["formatter"+t];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},D.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},D.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,i,t)},D.prototype.formatExportValue=function(e,t){var o,i=e.column.modules.format[t];if(i){var n=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,e.getComponent(),o,n)}return this.formatValue(e)},D.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},D.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},D.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},D.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var i,n,s,a,r=parseFloat(e.getValue()),l=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,h=void 0!==t.precision?t.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(i=!1!==h?r.toFixed(h):r,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(e,t,o){var i,n=e.getValue(),s=t.urlPrefix||"",a=t.download,r=n,l=document.createElement("a");if(t.labelField&&(i=e.getData(),r=i[t.labelField]),t.label)switch(_typeof(t.label)){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(i=e.getData(),n=i[t.urlField]),t.url)switch(_typeof(t.url)){case"string":n=t.url;break;case"function":n=t.url(e)}return l.setAttribute("href",s+n),t.target&&l.setAttribute("target",t.target),t.download&&(a="function"==typeof a?a(e):!0===a?"":a,l.setAttribute("download",a)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),l}return" "},image:function(e,t,o){var i=document.createElement("img"),n=e.getValue();switch(t.urlPrefix&&(n=t.urlPrefix+e.getValue()),t.urlSuffix&&(n+=t.urlSuffix),i.setAttribute("src",n),_typeof(t.height)){case"number":i.style.height=t.height+"px";break;case"string":i.style.height=t.height}switch(_typeof(t.width)){case"number":i.style.width=t.width+"px";break;case"string":i.style.width=t.width}return i.addEventListener("load",function(){e.getRow().normalizeHeight()}),i},tickCross:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t.allowEmpty,a=t.allowTruthy,r=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=t.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue(),r=moment(a,i);return r.isValid()?t.timezone?r.tz(t.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:void 0,r=void 0!==t.humanize&&t.humanize,l=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,i);return u.isValid()?r?moment.duration(u.diff(l)).humanize(s):u.diff(l,a)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(e,t,o){var i=e.getValue();return void 0===t[i]?(console.warn("Missing display value for "+i),i):t[i]},star:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t&&t.stars?t.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=r.cloneNode(!0);c.innerHTML=l<=i?'':'',a.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(e,t,o){var i,n,s=this.sanitizeHTML(e.getValue())||0,a=document.createElement("span"),r=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==e.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return a.style.backgroundColor=u,a}},progress:function(e,t,o){var i,n,s,a,r,l=this.sanitizeHTML(e.getValue())||0,u=e.getElement(),d=t&&t.max?t.max:100,h=t&&t.min?t.min:0,p=t&&t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(l)<=d?parseFloat(l):d,n=parseFloat(n)>=h?parseFloat(n):h,i=(d-h)/100,n=Math.round((n-h)/i),_typeof(t.color)){case"string":s=t.color;break;case"function":s=t.color(l);break;case"object":if(Array.isArray(t.color)){var m=100/t.color.length,f=Math.floor(n/m);f=Math.min(f,t.color.length-1),f=Math.max(f,0),s=t.color[f];break}default:s="#2DC214"}switch(_typeof(t.legend)){case"string":a=t.legend;break;case"function":a=t.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(t.legendColor)){case"string":r=t.legendColor;break;case"function":r=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){var m=100/t.legendColor.length,f=Math.floor(n/m);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),r=t.legendColor[f]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var g=document.createElement("div");if(g.style.display="inline-block",g.style.position="relative",g.style.width=n+"%",g.style.backgroundColor=s,g.style.height="100%",g.setAttribute("data-max",d),g.setAttribute("data-min",h),a){var b=document.createElement("div");b.style.position="absolute",b.style.top="4px",b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=r,b.innerHTML=a}return o(function(){if(!(e instanceof c)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",u.appendChild(t),u=t}u.appendChild(g),a&&u.appendChild(b)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function i(e){var t=s.element;s.open=e,t&&(s.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}var n=document.createElement("div"),s=e.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(e){e.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(e,t,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var s=e.getRow();s instanceof r?(n.addEventListener("change",function(e){s.toggleSelect()}),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",function(e){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},h.prototype.registerModule("format",D);var k=function(e){this.table=e,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};k.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},k.prototype.initializeColumn=function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")},k.prototype.frozenCheck=function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen},k.prototype.scrollHorizontal=function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){t.layout()},100),e=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},k.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},k.prototype.layoutColumnPosition=function(e){var t=this,o=[];this.leftColumns.forEach(function(i,n){if(i.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft+"px",n==t.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=t.getColGroupParentElement(i);o.includes(s)||(t.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else t.layoutElement(i.getElement(),i);e&&i.cells.forEach(function(e){t.layoutElement(e.getElement(!0),i)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=t.rightPadding-t._calcSpace(t.rightColumns,i+1)+"px",i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?t.layoutElement(t.getColGroupParentElement(o),o):t.layoutElement(o.getElement(),o),e&&o.cells.forEach(function(e){t.layoutElement(e.getElement(!0),o)})})},k.prototype.getColGroupParentElement=function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()},k.prototype.layout=function(){var e=this;e.active&&(this.calcMargins(),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.layoutRow=function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(!0),o)}),this.rightColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(!0),o)})},k.prototype.layoutElement=function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))},k.prototype._calcSpace=function(e,t){for(var o=0,i=0;i-1&&t.splice(o,1)}),t},z.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},z.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},z.prototype.detachRow=function(e){var t=this.rows.indexOf(e);if(t>-1){var o=e.getElement();o.parentNode.removeChild(o),this.rows.splice(t,1)}},z.prototype.styleRows=function(e){var t=this;this.rows.forEach(function(e,o){t.table.rowManager.styleRow(e,o)})},h.prototype.registerModule("frozenRows",z);var S=function(e){this._group=e,this.type="GroupComponent"};S.prototype.getKey=function(){return this._group.key},S.prototype.getField=function(){return this._group.field},S.prototype.getElement=function(){return this._group.element},S.prototype.getRows=function(){return this._group.getRows(!0)},S.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},S.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},S.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},S.prototype.isVisible=function(){return this._group.visible},S.prototype.show=function(){this._group.show()},S.prototype.hide=function(){this._group.hide()},S.prototype.toggle=function(){this._group.toggleVisibility()},S.prototype._getSelf=function(){return this._group},S.prototype.getTable=function(){return this._group.groupManager.table};var H=function(e,t,o,i,n,s,a){this.groupManager=e,this.parent=t,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):o?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},H.prototype.scrollHeader=function(e){this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)})},H.prototype.getRowIndex=function(e){},H.prototype.conformRowData=function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e},H.prototype.removeRow=function(e){var t=this.rows.indexOf(e),o=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},H.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],t=this.groupList.indexOf(e),t>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},H.prototype.getHeadersAndRows=function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows(e))}):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t},H.prototype.getData=function(e,t){var o=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(function(e){o.push(e.getData(t||"data"))}),o},H.prototype.getRowCount=function(){var e=0;return this.groupList.length?this.groupList.forEach(function(t){e+=t.getRowCount()}):e=this.rows.length,e},H.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},H.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){e.detachElement()})}):this.rows.forEach(function(e){var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},H.prototype.show=function(){var e=this;if(e.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=e.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})}):e.rows.forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},H.prototype._visSet=function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))},H.prototype.getRowGroup=function(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}):this.rows.find(function(t){return t===e})&&(t=this),t},H.prototype.getSubGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.getRows=function(e){var t=[];return this.rows.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.generateGroupHeaderContents=function(){var e=[];for(this.rows.forEach(function(t){e.push(t.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},H.prototype.getPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e},H.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),e.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],e.table.modules.localize.bind("groups|item",function(t,o){e.headerGenerator[0]=function(e,i,n){return(void 0===e?"":e)+"("+i+" "+(1===i?t:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(t)||(t=[t]),t.forEach(function(t,o){var i,n;"function"==typeof t?i=t:(n=e.table.columnManager.getColumnByField(t),i=n?function(e){return n.getFieldValue(e)}:function(e){return e[t]}),e.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!e.allowedValues&&e.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(e){e="function"==typeof e?e:function(){return!0}}),e.startOpen=o),i&&(e.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},P.prototype.setDisplayIndex=function(e){this.displayIndex=e},P.prototype.getDisplayIndex=function(){return this.displayIndex},P.prototype.getRows=function(e){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(e),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):e.slice(0)},P.prototype.getGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},P.prototype.getChildGroups=function(e){var t=this,o=[];return e||(e=this),e.groupList.forEach(function(e){e.groupList.length?o=o.concat(t.getChildGroups(e)):o.push(e)}),o},P.prototype.wipe=function(){this.groupList.forEach(function(e){e.wipe()})},P.prototype.pullGroupListData=function(e){var t=this,o=[];return e.forEach(function(e){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];e.hasSubGroups?(n=t.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=n.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),o.push(i),o=o.concat(n)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,o.push(i),e.getRows().forEach(function(e){o.push(e.getData("data"))}))}),o},P.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},P.prototype.getRowGroup=function(e){var t=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}),t},P.prototype.countGroups=function(){return this.groupList.length},P.prototype.generateGroups=function(e){var t=this,o=t.groups;t.groups={},t.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(e){t.createGroup(e,0,o)}),e.forEach(function(e){t.assignRowToExistingGroup(e,o)})):e.forEach(function(e){t.assignRowToGroup(e,o)})},P.prototype.createGroup=function(e,t,o){var i,n=t+"_"+e;o=o||[],i=new H(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},P.prototype.assignRowToExistingGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(e)},P.prototype.assignRowToGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,t),this.groups["0_"+o].addRow(e),!i},P.prototype.reassignRowToGroup=function(e){var t=e.getGroup(),o=t.getPath(),i=this.getExpectedPath(e);o.length==i.length&&o.every(function(e,t){return e===i[t]})||(t.removeRow(e),this.assignRowToGroup(e,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},P.prototype.getExpectedPath=function(e){var t=[],o=e.getData();return this.groupIDLookups.forEach(function(e){t.push(e.func(o))}),t},P.prototype.updateGroupRows=function(e){var t=this,o=[];if(t.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows())}),e){var i=t.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),t.table.rowManager.refreshActiveData("group",!0,!0)}return o},P.prototype.scrollHeaders=function(e){this.table.options.virtualDomHoz&&(e-=this.table.vdomHoz.vDomPadLeft),e+="px",this.groupList.forEach(function(t){t.scrollHeader(e)})},P.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))},h.prototype.registerModule("groupRows",P);var A=function(e){this.table=e,this.history=[],this.index=-1};A.prototype.clear=function(){this.history=[],this.index=-1},A.prototype.action=function(e,t,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:o}),this.index++},A.prototype.getHistoryUndoSize=function(){return this.index+1},A.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},A.prototype.clearComponentHistory=function(e){var t=this.history.findIndex(function(t){return t.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))},A.prototype.undo=function(){if(this.index>-1){var e=this.history[this.index];return this.undoers[e.type].call(this,e),this.index--,this.table.options.historyUndo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},A.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return this.redoers[e.type].call(this,e),this.table.options.historyRedo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},A.prototype.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue)},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},A.prototype.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue)},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}},A.prototype._rebindRow=function(e,t){this.history.forEach(function(o){if(o.component instanceof l)o.component===e&&(o.component=t);else if(o.component instanceof u&&o.component.row===e){var i=o.component.column.getField();i&&(o.component=t.getCell(i))}})},h.prototype.registerModule("history",A);var _=function(e){this.table=e,this.fieldIndex=[],this.hasIndex=!1};_.prototype.parseTable=function(){var e=this,t=e.table.element,o=e.table.options,i=(o.columns,t.getElementsByTagName("th")),n=t.getElementsByTagName("tbody")[0],s=[];e.hasIndex=!1,e.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],e._extractOptions(t,o),i.length?e._extractHeaders(i,n):e._generateBlankHeaders(i,n);for(var a=0;a-1&&e.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},F.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},F.prototype.checkBinding=function(e,t){var o=this,i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach(function(e){-1==o.pressedKeys.indexOf(e)&&(i=!1)}),i&&t.action.call(o,e),!0)},F.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},F.prototype.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,o=t.scrollTop-t.height;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o>=0?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,o=t.scrollTop+t.height,i=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o<=i?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().prev())},navNext:function(e){var t,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(e.preventDefault(),t=o.nav(),t.next()||i&&(o.getElement().firstChild.blur(),i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i)),i.then(function(){setTimeout(function(){t.next()})})))},navLeft:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().left())},navRight:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().right())},navUp:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().up())},navDown:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().down())},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},h.prototype.registerModule("keybindings",F);var N=function(e){this.table=e,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};N.prototype.initializeColumnHeader=function(e){var t,o=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){t.stopPropagation(),t.preventDefault(),o.LoadMenuEvent(e,e.definition.headerMenu,t)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},N.prototype.LoadMenuEvent=function(e,t,o){t="function"==typeof t?t.call(this.table,e.getComponent(),o):t,this.loadMenu(o,e,t)},N.prototype.tapHold=function(e,t){var o=this,i=e.getElement(),n=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(n),s=!1,n=setTimeout(function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(n),n=null,s&&e.preventDefault()})},N.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},N.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},N.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},N.prototype.loadMenu=function(e,t,o,i){var n=this,s=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||e.preventDefault(),o&&o.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){n.nestedMenuBlock=!1},100);this.hideMenu(),this.menuElements=[]}o.forEach(function(e){var o=document.createElement("div"),i=e.label,s=e.disabled;e.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(n.table,t.getComponent())),i instanceof Node?o.appendChild(i):o.innerHTML=i,"function"==typeof s&&(s=s.call(n.table,t.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",function(e){e.stopPropagation()})):e.menu&&e.menu.length?o.addEventListener("click",function(i){i.stopPropagation(),n.hideOldSubMenus(a),n.loadMenu(i,t,e.menu,o)}):e.action&&o.addEventListener("click",function(o){e.action(o,t.getComponent())}),e.menu&&e.menu.length&&o.classList.add("tabulator-menu-item-submenu")),a.appendChild(o)}),a.addEventListener("click",function(e){n.hideMenu()}),this.menuElements.push(a),this.positionMenu(a,i,s,e)}},N.prototype.hideOldSubMenus=function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var o=this.menuElements.length-1;o>t;o--){var i=this.menuElements[o];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},N.prototype.positionMenu=function(e,t,o,i){var n,s,a,r=this,l=Math.max(document.body.offsetHeight,window.innerHeight);t?(a=h.prototype.helpers.elOffset(t),n=a.left+t.offsetWidth,s=a.top-1):(n=o?i.touches[0].pageX:i.pageX,s=o?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),e.style.top=s+"px",e.style.left=n+"px",setTimeout(function(){r.table.rowManager.element.addEventListener("scroll",r.blurEvent),document.body.addEventListener("click",r.blurEvent),document.body.addEventListener("contextmenu",r.blurEvent),window.addEventListener("resize",r.blurEvent),document.body.addEventListener("keydown",r.escEvent)},100),document.body.appendChild(e),s+e.offsetHeight>=l&&(e.style.top="",e.style.bottom=t?l-a.top-t.offsetHeight-1+"px":l-s+"px"),(n+e.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?document.documentElement.offsetWidth-a.left+"px":document.documentElement.offsetWidth-n+"px",this.positionReversedX=!0)},N.prototype.isOpen=function(){return!!this.menuElements.length},N.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},N.prototype.hideMenu=function(){this.menuElements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},N.prototype.menus={},h.prototype.registerModule("menu",N);var B=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};B.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},B.prototype.initializeColumn=function(e){var t,o=this,i={};e.modules.frozen||(t=e.getElement(),i.mousemove=function(i){e.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-h.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o), +t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=i},B.prototype.bindTouchEvents=function(e){var t,o,i,n,s,a,r,l=this,c=e.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t=e,o=e.nextColumn(),n=o?o.getWidth()/2:0,i=e.prevColumn(),s=i?i.getWidth()/2:0,a=0,r=0,u=!1,l.startMove(c,e)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-a>n&&(h=o)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-r>s&&(h=i)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(t=h,o=h.nextColumn(),a=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),r=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(e)})},B.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},B.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var i=e.getElement(!0);i.parentNode.insertBefore(o[t].getElement(),i.nextSibling)}):e.getCells().forEach(function(e,t){var i=e.getElement(!0);i.parentNode.insertBefore(o[t].getElement(),i)})},B.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},B.prototype.moveHover=function(e){var t,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-ne.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(t.placeholderElement,i.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var i=e.getElement();i.previousSibling&&(i.parentNode.insertBefore(t.placeholderElement,i),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},O.prototype.initializeRow=function(e){var t,o=this,i={};i.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),i.mousemove=function(t){var i=e.getElement();t.pageY-h.prototype.helpers.elOffset(i).top+o.table.rowManager.element.scrollTop>e.getHeight()/2?o.toRow===e&&o.toRowAfter||(i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(e,!0)):(o.toRow!==e||o.toRowAfter)&&(i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(e,!1))}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i},O.prototype.initializeCell=function(e){var t=this,o=e.getElement(!0);o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,o)},O.prototype.bindTouchEvents=function(e,t){var o,i,n,s,a,r,l,c=this,u=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,i=e.nextRow(),s=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,l=0,u=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var d,h;c.moving&&(t.preventDefault(),c.moveHover(t),u||(u=t.touches[0].pageY),d=t.touches[0].pageY-u,d>0?i&&d-r>s&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),r=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=a,a=n?n.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.touchMove=!1)})},O.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},O.prototype.setStartPosition=function(e,t){var o,i,n=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},O.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},O.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},O.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},O.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,i=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},O.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},O.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},O.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},O.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},O.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},O.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},O.prototype.dropComplete=function(e,t,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},O.prototype.tableRowDrop=function(e,t){var o=!1,i=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:i})},O.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},O.prototype.senders={delete:function(e,t,o){e.delete()}},O.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},h.prototype.registerModule("moveRow",O);var I=function(e){this.table=e,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};I.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupMutator(e.definition[a]))&&(o=!0,i[a]={mutator:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.mutate=i)},I.prototype.lookupMutator=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.mutators[e]?t=this.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t},I.prototype.transformRow=function(e,t,o){var i,n=this,s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var a,r,l;n.modules.mutate&&(a=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(void 0!==o?o:e),"data"!=t&&void 0===i||(l=n.getComponent(),r="function"==typeof a.params?a.params(i,e,t,l):a.params,n.setFieldValue(e,a.mutator(i,e,t,r,l))))}),e},I.prototype.transformCell=function(e,t){var o=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,e.row.getData()),e.column.setFieldValue(i,t),o.mutator(t,i,"edit",o.params,e.getComponent())):t},I.prototype.enable=function(){this.enabled=!0},I.prototype.disable=function(){this.enabled=!1},I.prototype.mutators={},h.prototype.registerModule("mutator",I);var V=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};V.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},V.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var o=1;o<5;o++)t.push(this.size*o);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var o=document.createElement("option");o.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){o.innerHTML=e}):o.innerHTML=t,e.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},V.prototype.initialize=function(e){var t,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",function(e){n.firstBut.innerHTML=e}),n.table.modules.localize.bind("pagination|first_title",function(e){n.firstBut.setAttribute("aria-label",e),n.firstBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|prev",function(e){n.prevBut.innerHTML=e}),n.table.modules.localize.bind("pagination|prev_title",function(e){n.prevBut.setAttribute("aria-label",e),n.prevBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|next",function(e){n.nextBut.innerHTML=e}),n.table.modules.localize.bind("pagination|next_title",function(e){n.nextBut.setAttribute("aria-label",e),n.nextBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|last",function(e){n.lastBut.innerHTML=e}),n.table.modules.localize.bind("pagination|last_title",function(e){n.lastBut.setAttribute("aria-label",e),n.lastBut.setAttribute("title",e)}),n.firstBut.addEventListener("click",function(){n.setPage(1).then(function(){}).catch(function(){})}),n.prevBut.addEventListener("click",function(){n.previousPage().then(function(){}).catch(function(){})}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max).then(function(){}).catch(function(){})}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(e){n.pageSizeSelect.setAttribute("aria-label",e),n.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),n.element.appendChild(t),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(e){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||e||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:(o=document.createElement("div"),o.classList.add("tabulator-row"),o.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},V.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},V.prototype.setDisplayIndex=function(e){this.displayIndex=e},V.prototype.getDisplayIndex=function(){return this.displayIndex},V.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},V.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},V.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},V.prototype.setPage=function(e){var t=this,o=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,n){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),n())})},V.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var a=!0===t.size?1:Math.ceil((s+1)/t.size);t.setPage(a).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},V.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},V.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));this.footerRedraw()},V.prototype._generatePageButton=function(e){var t=this,o=document.createElement("button");return o.classList.add("tabulator-page"),e==t.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){o.setAttribute("aria-label",t+" "+e),o.setAttribute("title",t+" "+e)}),o.setAttribute("data-page",e),o.textContent=e,o.addEventListener("click",function(o){t.setPage(e).then(function(){}).catch(function(){})}),o},V.prototype.previousPage=function(){var e=this;return new Promise(function(t,o){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},V.prototype.nextPage=function(){var e=this;return new Promise(function(t,o){e.pagen?i.splice(n,0,e):i.push(e))}),i},j.prototype._findColumn=function(e,t){var o=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(o){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},j.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},j.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},j.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},j.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},j.prototype.parseColumns=function(e){var t=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var n,s={},a=e.getDefinition();e.isGroup?(s.title=a.title,s.columns=t.parseColumns(e.getColumns())):(s.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(n=Object.keys(a),n.push("width")):n=t.config.columns,n.forEach(function(t){switch(t){case"width":s.width=e.getWidth();break;case"visible":s.visible=e.visible;break;default:"function"!=typeof a[t]&&-1===i.indexOf(t)&&(s[t]=a[t])}})),o.push(s)}),o},j.prototype.readers={local:function(e,t){var o=localStorage.getItem(e+"-"+t);return!!o&&JSON.parse(o)},cookie:function(e,t){var o,i,n=document.cookie,s=e+"-"+t,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),o=n.indexOf(";"),o>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},j.prototype.writers={local:function(e,t,o){localStorage.setItem(e+"-"+t,JSON.stringify(o))},cookie:function(e,t,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},h.prototype.registerModule("persistence",j);var W=function(e){this.table=e,this.element=!1,this.manualBlock=!1};W.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},W.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},W.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},W.prototype.printFullscreen=function(e,t,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},h.prototype.registerModule("print",W);var G=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};G.prototype.watchData=function(e){var t,o=this;this.currentVersion++,t=this.currentVersion,o.unwatchData(),o.data=e,o.origFuncs.push=e.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!1)}),o.origFuncs.push.apply(e,arguments)}}),o.origFuncs.unshift=e.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!0)}),o.origFuncs.unshift.apply(e,arguments)}}),o.origFuncs.shift=e.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(e)}}),o.origFuncs.pop=e.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(e)}}),o.origFuncs.splice=e.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?e.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&t===o.currentVersion){if(r&&(i=!!e[s]&&o.table.rowManager.getRowFromDataObject(e[s]),i?r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,i,!0)}):(r=r.slice().reverse(),r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var l=e.slice(s,void 0===n[1]?n[1]:s+a);l.forEach(function(e,t){var i=o.table.rowManager.getRowFromDataObject(e);i&&i.deleteActual(t!==l.length-1)})}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(e,arguments)}})},G.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},G.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var o in t)this.watchKey(e,t,o);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},G.prototype.watchTreeChildren=function(e){function t(){o.table.modules.dataTree.initializeRow(e),o.table.modules.dataTree.layoutRow(e),o.table.rowManager.refreshActiveData("tree",!1,!0)}var o=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,arguments);return t(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,arguments);return t(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return t(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return t(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,arguments);return t(),e}}))},G.prototype.watchKey=function(e,t,o){var i=this,n=Object.getOwnPropertyDescriptor(t,o),s=t[o],a=this.currentVersion;Object.defineProperty(t,o,{set:function(t){if(s=t,!i.blocked&&a===i.currentVersion){var r={};r[o]=t,e.updateData(r)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),s}})},G.prototype.unwatchRow=function(e){var t=e.getData();for(var o in t)Object.defineProperty(t,o,{value:t[o]})},G.prototype.block=function(){this.blocked=!0},G.prototype.unblock=function(){this.blocked=!1},h.prototype.registerModule("reactiveData",G);var U=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};U.prototype.initializeColumn=function(e,t,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var l=function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=t,i._mouseDown(e,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(e.stopPropagation(),o.reinitializeWidth(!0))}),r.addEventListener("click",function(e){e.stopPropagation()});var c=function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,r)))};r.addEventListener("mousedown",c),r.addEventListener("touchstart",c,{passive:!0}),r.addEventListener("dblclick",function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(a),o.appendChild(r)}},U.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},U.prototype._mouseDown=function(e,t,o){function i(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeColumns",U);var X=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};X.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(e){e.stopPropagation()});var s=function(o){t.startRow=e,t._mouseDown(o,e,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){var i=t.table.rowManager.prevDisplayRow(e);i&&(t.startRow=i,t._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},X.prototype._mouseDown=function(e,t,o){function i(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeRows",X);var q=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};q.prototype.initialize=function(e){var t,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.tableHeight==t&&o.tableWidth==n||(o.tableHeight=t,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}}),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.containerHeight==t&&o.containerWidth==n||(o.containerHeight=t,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},q.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},h.prototype.registerModule("resizeTable",q);var Y=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};Y.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},Y.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},Y.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},Y.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},Y.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},Y.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},Y.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},Y.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),i=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(i<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var s=e.columns[e.index-1];s&&i>0&&i>=s.getWidth()?(e.showColumn(s),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},Y.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},Y.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},Y.prototype.generateCollapsedRowData=function(e){var t,o=this,i=e.getData(),n=[];return this.hiddenColumns.forEach(function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()}},n.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,t,s.modules.format.params)})):n.push({field:s.field,title:s.definition.title,value:a}))}),n},Y.prototype.formatCollapsedData=function(e){var t=document.createElement("table");return e.forEach(function(e){var o,i=document.createElement("tr"),n=document.createElement("td"),s=document.createElement("td"),a=document.createElement("strong");n.appendChild(a),this.table.modules.localize.bind("columns|"+e.field,function(t){a.innerText=t||e.title}),e.value instanceof Node?(o=document.createElement("div"),o.appendChild(e.value),s.appendChild(o)):s.innerHTML=e.value,i.appendChild(n),i.appendChild(s),t.appendChild(i)},this),Object.keys(e).length?t:""},h.prototype.registerModule("responsiveLayout",Y);var K=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};K.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},K.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var i=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),n=t.table.rowManager.getDisplayRowIndex(e),s=i<=n?i:n,a=i>=n?i:n,r=t.table.rowManager.getDisplayRows().slice(0),l=r.splice(s,a-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.lengtht.table.options.selectable&&(l=l.slice(0,t.table.options.selectable)),t.selectRows(l)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},K.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},K.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},K.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(e);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),t||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},K.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},K.prototype.deselectRows=function(e,t){var o,i=this;if(void 0===e){o=i.selectedRows.length;for(var n=0;n-1&&(n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),t||i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},K.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},K.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},K.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},K.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},K.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},K.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var i=o,n=Array.isArray(i),s=0,i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var r=a;this._selectRow(r,!0)}else for(var l=o,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var d;if(c){if(u>=l.length)break;d=l[u++]}else{if(u=l.next(),u.done)break;d=u.value}var h=d;this._deselectRow(h,!0)}},h.prototype.registerModule("selectRow",K);var J=function(e){this.table=e,this.sortList=[],this.changed=!1};J.prototype.initializeColumn=function(e,t){var o,i,n=this,s=!1;switch(_typeof(e.definition.sorter)){case"string":n.sorters[e.definition.sorter]?s=n.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:void 0!==e.definition.headerSortTristate?e.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===e.definition.headerSort?!1!==this.table.options.headerSort:!1!==e.definition.headerSort)&&(o=e.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,t.appendChild(i),e.modules.sort.element=i,o.addEventListener("click",function(t){var o="",i=[],s=!1;if(e.modules.sort){if(e.modules.sort.tristate)o="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=e.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(t){return t.field===e.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:e,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(e,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},J.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},J.prototype.getSort=function(){var e=this,t=[];return e.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},J.prototype.setSort=function(e,t){var o=this,i=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(e){var t;t=o.table.columnManager.findColumn(e.column),t?(e.column=t,i.push(e),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},J.prototype.clear=function(){this.setSort([])},J.prototype.findSorter=function(e){var t,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),e.getField()))switch(t=e.getFieldValue(o),void 0===t?"undefined":_typeof(t)){case"undefined":i="string";break;case"boolean":i="boolean";break;default: +isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},J.prototype.sort=function(e){var t=this,o=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,i=[],n=[];t.table.options.dataSorting&&t.table.options.dataSorting.call(t.table,t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting?o.forEach(function(e,o){t.setColumnHeader(e.column,e.dir)}):(o.forEach(function(e,o){var n=e.column.modules.sort;e.column&&n&&(n.sorter||(n.sorter=t.findSorter(e.column)),e.params="function"==typeof n.params?n.params(e.column.getComponent(),e.dir):n.params,i.push(e)),t.setColumnHeader(e.column,e.dir)}),i.length&&t._sortItems(e,i)),t.table.options.dataSorted&&(e.forEach(function(e){n.push(e.getComponent())}),t.table.options.dataSorted.call(t.table,t.getSort(),n))},J.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))})},J.prototype.setColumnHeader=function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)},J.prototype._sortItems=function(e,t){var o=this,i=t.length-1;e.sort(function(e,n){for(var s,a=i;a>=0;a--){var r=t[a];if(0!==(s=o._sortRow(e,n,r.column,r.dir,r.params)))break}return s})},J.prototype._sortRow=function(e,t,o,i,n){var s="asc"==i?e:t,a="asc"==i?t:e;return e=o.getFieldValue(s.getData()),t=o.getFieldValue(a.getData()),e=void 0!==e?e:"",t=void 0!==t?t:"",o.modules.sort.sorter.call(this,e,t,void 0,void 0,o.getComponent(),i,n)},J.prototype.sorters={number:function(e,t,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator,c=a.thousandSeparator,u=0;if(e=String(e),t=String(t),c&&(e=e.split(c).join(""),t=t.split(c).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(u*=-1),u},string:function(e,t,o,i,n,s,a){var r,l=a.alignEmptyValues,c=0;if(e){if(t){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),r)}c=1}else c=t?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(e,t,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},time:function(e,t,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},datetime:function(e,t,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(e=moment(e,r),t=moment(t,r),e.isValid()){if(t.isValid())return e-t;c=1}else c=t.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(e,t,o,i,n,s,a){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,o,i,n,s,a){function r(e){switch(u){case"length":return e.length;case"sum":return e.reduce(function(e,t){return e+t});case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce(function(e,t){return e+t})/e.length}}var l=0,c=0,u=a.type||"length",d=a.alignEmptyValues,h=0;if(Array.isArray(e)){if(Array.isArray(t))return l=e?r(e):0,c=t?r(t):0,l-c;d=1}else d=Array.isArray(t)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(e,t,o,i,n,s,a){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,o,i,n,s,a){var r,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if(r=String(e).toLowerCase(),l=String(t).toLowerCase(),r===l)return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;hu?1:-1;return r.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},h.prototype.registerModule("sort",J);var $=function(e){this.table=e,this.invalidCells=[]};return $.prototype.initializeColumn=function(e){var t,o=this,i=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(function(e){(t=o._extractValidator(e))&&i.push(t)}):(t=this._extractValidator(e.definition.validator))&&i.push(t),e.modules.validate=!!i.length&&i)},$.prototype._extractValidator=function(e){var t,o,i;switch(void 0===e?"undefined":_typeof(e)){case"string":return i=e.indexOf(":"),i>-1?(t=e.substring(0,i),o=e.substring(i+1)):t=e,this._buildValidator(t,o);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}},$.prototype._buildValidator=function(e,t){var o="function"==typeof e?e:this.validators[e];return o?{type:"function"==typeof e?"function":e,func:o,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)},$.prototype.validate=function(e,t,o){var i=this,n=[],s=this.invalidCells.indexOf(t);return e&&e.forEach(function(e){e.func.call(i,t.getComponent(),o,e.params)||n.push({type:e.type,parameters:e.params})}),n=!n.length||n,t.modules.validate||(t.modules.validate={}),!0===n?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(t)),n},$.prototype.getInvalidCells=function(){var e=[];return this.invalidCells.forEach(function(t){e.push(t.getComponent())}),e},$.prototype.clearValidation=function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))},$.prototype.validators={integer:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,o){return""===t||null===t||void 0===t||!isNaN(t)},string:function(e,t,o){return""===t||null===t||void 0===t||isNaN(t)},max:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)<=o},min:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)>=o},starts:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length>=o},maxLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length<=o},in:function(e,t,o){return""===t||null===t||void 0===t||("string"==typeof o&&(o=o.split("|")),""===t||o.indexOf(t)>-1)},regex:function(e,t,o){return""===t||null===t||void 0===t||new RegExp(o).test(t)},unique:function(e,t,o){if(""===t||null===t||void 0===t)return!0;var i=!0,n=e.getData(),s=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(e){var o=e.getData();o!==n&&t==s.getFieldValue(o)&&(i=!1)}),i},required:function(e,t,o){return""!==t&&null!==t&&void 0!==t}},h.prototype.registerModule("validate",$),h}); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator_core.js b/Sources/CustomControls/Table/control/dist/js/tabulator_core.js new file mode 100644 index 0000000..5ac981a --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator_core.js @@ -0,0 +1,9742 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ + +'use strict'; + +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +if (!Array.prototype.findIndex) { + + Object.defineProperty(Array.prototype, 'findIndex', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + var k = 0; + + // 6. Repeat, while k < len + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + // b. Let kValue be ? Get(O, Pk). + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + // d. If testResult is true, return k. + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return k; + } + + // e. Increase k by 1. + + k++; + } + + // 7. Return -1. + + return -1; + } + + }); +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.find + +if (!Array.prototype.find) { + + Object.defineProperty(Array.prototype, 'find', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + var k = 0; + + // 6. Repeat, while k < len + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + // b. Let kValue be ? Get(O, Pk). + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + // d. If testResult is true, return kValue. + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return kValue; + } + + // e. Increase k by 1. + + k++; + } + + // 7. Return undefined. + + return undefined; + } + + }); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill + +if (!String.prototype.includes) { + + String.prototype.includes = function (search, start) { + + 'use strict'; + + if (search instanceof RegExp) { + + throw TypeError('first argument must not be a RegExp'); + } + + if (start === undefined) { + start = 0; + } + + return this.indexOf(search, start) !== -1; + }; +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.includes + +if (!Array.prototype.includes) { + + Object.defineProperty(Array.prototype, 'includes', { + + value: function value(searchElement, fromIndex) { + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + // 1. Let O be ? ToObject(this value). + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + var len = o.length >>> 0; + + // 3. If len is 0, return false. + + if (len === 0) { + + return false; + } + + // 4. Let n be ? ToInteger(fromIndex). + + // (If fromIndex is undefined, this step produces the value 0.) + + var n = fromIndex | 0; + + // 5. If n ≥ 0, then + + // a. Let k be n. + + // 6. Else n < 0, + + // a. Let k be len + n. + + // b. If k < 0, let k be 0. + + var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + + function sameValueZero(x, y) { + + return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); + } + + // 7. Repeat, while k < len + + while (k < len) { + + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + + // b. If SameValueZero(searchElement, elementK) is true, return true. + + if (sameValueZero(o[k], searchElement)) { + + return true; + } + + // c. Increase k by 1. + + k++; + } + + // 8. Return false + + return false; + } + + }); +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill + +if (typeof Object.assign !== 'function') { + + // Must be writable: true, enumerable: false, configurable: true + + Object.defineProperty(Object, "assign", { + + value: function assign(target, varArgs) { + // .length of function is 2 + + 'use strict'; + + if (target === null || target === undefined) { + + throw new TypeError('Cannot convert undefined or null to object'); + } + + var to = Object(target); + + for (var index = 1; index < arguments.length; index++) { + + var nextSource = arguments[index]; + + if (nextSource !== null && nextSource !== undefined) { + + for (var nextKey in nextSource) { + + // Avoid bugs when hasOwnProperty is shadowed + + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + + to[nextKey] = nextSource[nextKey]; + } + } + } + } + + return to; + }, + + writable: true, + + configurable: true + + }); +} + +var ColumnManager = function ColumnManager(table) { + + this.table = table; //hold parent table + + this.blockHozScrollEvent = false; + + this.headersElement = this.createHeadersElement(); + + this.element = this.createHeaderElement(); //containing element + + this.rowManager = null; //hold row manager object + + this.columns = []; // column definition object + + this.columnsByIndex = []; //columns by index + + this.columnsByField = {}; //columns by field + + this.scrollLeft = 0; + + this.element.insertBefore(this.headersElement, this.element.firstChild); +}; + +////////////// Setup Functions ///////////////// + + +ColumnManager.prototype.createHeadersElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-headers"); + + return el; +}; + +ColumnManager.prototype.createHeaderElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-header"); + + if (!this.table.options.headerVisible) { + + el.classList.add("tabulator-header-hidden"); + } + + return el; +}; + +ColumnManager.prototype.initialize = function () { + + var self = this; + + //scroll body along with header + + // self.element.addEventListener("scroll", function(e){ + + // if(!self.blockHozScrollEvent){ + + // self.table.rowManager.scrollHorizontal(self.element.scrollLeft); + + // } + + // }); +}; + +//link to row manager + +ColumnManager.prototype.setRowManager = function (manager) { + + this.rowManager = manager; +}; + +//return containing element + +ColumnManager.prototype.getElement = function () { + + return this.element; +}; + +//return header containing element + +ColumnManager.prototype.getHeadersElement = function () { + + return this.headersElement; +}; + +// ColumnManager.prototype.tempScrollBlock = function(){ + +// clearTimeout(this.blockHozScrollEvent); + +// this.blockHozScrollEvent = setTimeout(() => {this.blockHozScrollEvent = false;}, 50); + +// } + + +//scroll horizontally to match table body + +ColumnManager.prototype.scrollHorizontal = function (left) { + + var hozAdjust = 0, + scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; + + // this.tempScrollBlock(); + + this.element.scrollLeft = left; + + //adjust for vertical scrollbar moving table when present + + if (left > scrollWidth) { + + hozAdjust = left - scrollWidth; + + this.element.style.marginLeft = -hozAdjust + "px"; + } else { + + this.element.style.marginLeft = 0; + } + + //keep frozen columns fixed in position + + //this._calcFrozenColumnsPos(hozAdjust + 3); + + + this.scrollLeft = left; + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.scrollHorizontal(); + } +}; + +///////////// Column Setup Functions ///////////// + + +ColumnManager.prototype.generateColumnsFromRowData = function (data) { + + var cols = [], + definitions = this.table.options.autoColumnsDefinitions, + row, + sorter; + + if (data && data.length) { + + row = data[0]; + + for (var key in row) { + + var col = { + + field: key, + + title: key + + }; + + var value = row[key]; + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "undefined": + + sorter = "string"; + + break; + + case "boolean": + + sorter = "boolean"; + + break; + + case "object": + + if (Array.isArray(value)) { + + sorter = "array"; + } else { + + sorter = "string"; + } + + break; + + default: + + if (!isNaN(value) && value !== "") { + + sorter = "number"; + } else { + + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + + sorter = "alphanum"; + } else { + + sorter = "string"; + } + } + + break; + + } + + col.sorter = sorter; + + cols.push(col); + } + + if (definitions) { + + switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { + + case "function": + + this.table.options.columns = definitions.call(this.table, cols); + + break; + + case "object": + + if (Array.isArray(definitions)) { + + cols.forEach(function (col) { + + var match = definitions.find(function (def) { + + return def.field === col.field; + }); + + if (match) { + + Object.assign(col, match); + } + }); + } else { + + cols.forEach(function (col) { + + if (definitions[col.field]) { + + Object.assign(col, definitions[col.field]); + } + }); + } + + this.table.options.columns = cols; + + break; + + } + } else { + + this.table.options.columns = cols; + } + + this.setColumns(this.table.options.columns); + } +}; + +ColumnManager.prototype.setColumns = function (cols, row) { + + var self = this; + + while (self.headersElement.firstChild) { + self.headersElement.removeChild(self.headersElement.firstChild); + }self.columns = []; + + self.columnsByIndex = []; + + self.columnsByField = {}; + + //reset frozen columns + + if (self.table.modExists("frozenColumns")) { + + self.table.modules.frozenColumns.reset(); + } + + cols.forEach(function (def, i) { + + self._addColumn(def); + }); + + self._reIndexColumns(); + + if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { + + self.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(false, true); + } + + self.redraw(true); +}; + +ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { + + var column = new Column(definition, this), + colEl = column.getElement(), + index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; + + if (nextToColumn && index > -1) { + + var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); + + var nextEl = nextToColumn.getElement(); + + if (before) { + + this.columns.splice(parentIndex, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl); + } else { + + this.columns.splice(parentIndex + 1, 0, column); + + nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); + } + } else { + + if (before) { + + this.columns.unshift(column); + + this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); + } else { + + this.columns.push(column); + + this.headersElement.appendChild(column.getElement()); + } + + column.columnRendered(); + } + + return column; +}; + +ColumnManager.prototype.registerColumnField = function (col) { + + if (col.definition.field) { + + this.columnsByField[col.definition.field] = col; + } +}; + +ColumnManager.prototype.registerColumnPosition = function (col) { + + this.columnsByIndex.push(col); +}; + +ColumnManager.prototype._reIndexColumns = function () { + + this.columnsByIndex = []; + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); +}; + +//ensure column headers take up the correct amount of space in column groups + +ColumnManager.prototype._verticalAlignHeaders = function () { + + var self = this, + minHeight = 0; + + self.columns.forEach(function (column) { + + var height; + + column.clearVerticalAlign(); + + height = column.getHeight(); + + if (height > minHeight) { + + minHeight = height; + } + }); + + self.columns.forEach(function (column) { + + column.verticalAlign(self.table.options.columnHeaderVertAlign, minHeight); + }); + + self.rowManager.adjustTableSize(); +}; + +//////////////// Column Details ///////////////// + + +ColumnManager.prototype.findColumn = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Column) { + + //subject is column element + + return subject; + } else if (subject instanceof ColumnComponent) { + + //subject is public column component + + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + + //subject is a HTML element of the column header + + var match = self.columns.find(function (column) { + + return column.element === subject; + }); + + return match || false; + } + } else { + + //subject should be treated as the field name of the column + + return this.columnsByField[subject] || false; + } + + //catch all for any other type of input + + + return false; +}; + +ColumnManager.prototype.getColumnByField = function (field) { + + return this.columnsByField[field]; +}; + +ColumnManager.prototype.getColumnsByFieldRoot = function (root) { + var _this = this; + + var matches = []; + + Object.keys(this.columnsByField).forEach(function (field) { + + var fieldRoot = field.split(".")[0]; + + if (fieldRoot === root) { + + matches.push(_this.columnsByField[field]); + } + }); + + return matches; +}; + +ColumnManager.prototype.getColumnByIndex = function (index) { + + return this.columnsByIndex[index]; +}; + +ColumnManager.prototype.getFirstVisibileColumn = function (index) { + + var index = this.columnsByIndex.findIndex(function (col) { + + return col.visible; + }); + + return index > -1 ? this.columnsByIndex[index] : false; +}; + +ColumnManager.prototype.getColumns = function () { + + return this.columns; +}; + +ColumnManager.prototype.findColumnIndex = function (column) { + + return this.columnsByIndex.findIndex(function (col) { + + return column === col; + }); +}; + +//return all columns that are not groups + +ColumnManager.prototype.getRealColumns = function () { + + return this.columnsByIndex; +}; + +//travers across columns and call action + +ColumnManager.prototype.traverse = function (callback) { + + var self = this; + + self.columnsByIndex.forEach(function (column, i) { + + callback(column, i); + }); +}; + +//get defintions of actual columns + +ColumnManager.prototype.getDefinitions = function (active) { + + var self = this, + output = []; + + self.columnsByIndex.forEach(function (column) { + + if (!active || active && column.visible) { + + output.push(column.getDefinition()); + } + }); + + return output; +}; + +//get full nested definition tree + +ColumnManager.prototype.getDefinitionTree = function () { + + var self = this, + output = []; + + self.columns.forEach(function (column) { + + output.push(column.getDefinition(true)); + }); + + return output; +}; + +ColumnManager.prototype.getComponents = function (structured) { + + var self = this, + output = [], + columns = structured ? self.columns : self.columnsByIndex; + + columns.forEach(function (column) { + + output.push(column.getComponent()); + }); + + return output; +}; + +ColumnManager.prototype.getWidth = function () { + + var width = 0; + + this.columnsByIndex.forEach(function (column) { + + if (column.visible) { + + width += column.getWidth(); + } + }); + + return width; +}; + +ColumnManager.prototype.moveColumn = function (from, to, after) { + + this.moveColumnActual(from, to, after); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + to.element.parentNode.insertBefore(from.element, to.element); + + if (after) { + + to.element.parentNode.insertBefore(to.element, from.element); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); +}; + +ColumnManager.prototype.moveColumnActual = function (from, to, after) { + + if (from.parent.isGroup) { + + this._moveColumnInArray(from.parent.columns, from, to, after); + } else { + + this._moveColumnInArray(this.columns, from, to, after); + } + + this._moveColumnInArray(this.columnsByIndex, from, to, after, true); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.reinitialize(true); + } + + if (this.table.options.columnMoved) { + + this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); + } + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } +}; + +ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { + var _this2 = this; + + var fromIndex = columns.indexOf(from), + toIndex, + rows = []; + + if (fromIndex > -1) { + + columns.splice(fromIndex, 1); + + toIndex = columns.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + toIndex = toIndex + 1; + } + } else { + + toIndex = fromIndex; + } + + columns.splice(toIndex, 0, from); + + if (updateRows) { + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + + this.table.rowManager.rows.forEach(function (row) { + + rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); + }); + } + + rows = rows.concat(this.table.rowManager.rows); + + rows.forEach(function (row) { + + if (row.cells.length) { + + var cell = row.cells.splice(fromIndex, 1)[0]; + + row.cells.splice(toIndex, 0, cell); + } + }); + } + } +}; + +ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { + var _this3 = this; + + var left = 0, + offset = 0, + adjust = 0, + colEl = column.getElement(); + + return new Promise(function (resolve, reject) { + + if (typeof position === "undefined") { + + position = _this3.table.options.scrollToColumnPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this3.table.options.scrollToColumnIfVisible; + } + + if (column.visible) { + + //align to correct position + + switch (position) { + + case "middle": + + case "center": + + adjust = -_this3.element.clientWidth / 2; + + break; + + case "right": + + adjust = colEl.clientWidth - _this3.headersElement.clientWidth; + + break; + + } + + //check column visibility + + if (!ifVisible) { + + offset = colEl.offsetLeft; + + if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { + + return false; + } + } + + //calculate scroll position + + left = colEl.offsetLeft + adjust; + + left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); + + _this3.table.rowManager.scrollHorizontal(left); + + _this3.scrollHorizontal(left); + + resolve(); + } else { + + console.warn("Scroll Error - Column not visible"); + + reject("Scroll Error - Column not visible"); + } + }); +}; + +//////////////// Cell Management ///////////////// + + +ColumnManager.prototype.generateCells = function (row) { + + var self = this; + + var cells = []; + + self.columnsByIndex.forEach(function (column) { + + cells.push(column.generateCell(row)); + }); + + return cells; +}; + +//////////////// Column Management ///////////////// + + +ColumnManager.prototype.getFlexBaseWidth = function () { + + var self = this, + totalWidth = self.table.element.clientWidth, + //table element width + + fixedWidth = 0; + + //adjust for vertical scrollbar if present + + if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { + + totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; + } + + this.columnsByIndex.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width || 0; + + minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + } + }); + + return fixedWidth; +}; + +ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { + var _this4 = this; + + return new Promise(function (resolve, reject) { + + var column = _this4._addColumn(definition, before, nextToColumn); + + _this4._reIndexColumns(); + + if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { + + _this4.table.modules.responsiveLayout.initialize(); + } + + if (_this4.table.modExists("columnCalcs")) { + + _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); + } + + _this4.redraw(true); + + if (_this4.table.modules.layout.getMode() != "fitColumns") { + + column.reinitializeWidth(); + } + + _this4._verticalAlignHeaders(); + + _this4.table.rowManager.reinitialize(); + + if (_this4.table.options.virtualDomHoz) { + + _this4.table.vdomHoz.reinitialize(); + } + + resolve(column); + }); +}; + +//remove column from system + +ColumnManager.prototype.deregisterColumn = function (column) { + + var field = column.getField(), + index; + + //remove from field list + + if (field) { + + delete this.columnsByField[field]; + } + + //remove from index list + + index = this.columnsByIndex.indexOf(column); + + if (index > -1) { + + this.columnsByIndex.splice(index, 1); + } + + //remove from column list + + index = this.columns.indexOf(column); + + if (index > -1) { + + this.columns.splice(index, 1); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.initialize(); + } + + this._verticalAlignHeaders(); + + this.redraw(); +}; + +//redraw columns + +ColumnManager.prototype.redraw = function (force) { + + if (force) { + + if (Tabulator.prototype.helpers.elVisible(this.element)) { + + this._verticalAlignHeaders(); + } + + this.table.rowManager.resetScroll(); + + this.table.rowManager.reinitialize(); + } + + if (["fitColumns", "fitDataStretch"].indexOf(this.table.modules.layout.getMode()) > -1) { + + this.table.modules.layout.layout(); + } else { + + if (force) { + + this.table.modules.layout.layout(); + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + } + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layout(); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (force) { + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } + + if (this.table.modExists("columnCalcs")) { + + this.table.modules.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); +}; + +//public column object +var ColumnComponent = function ColumnComponent(column) { + this._column = column; + this.type = "ColumnComponent"; +}; + +ColumnComponent.prototype.getElement = function () { + return this._column.getElement(); +}; + +ColumnComponent.prototype.getDefinition = function () { + return this._column.getDefinition(); +}; + +ColumnComponent.prototype.getField = function () { + return this._column.getField(); +}; + +ColumnComponent.prototype.getCells = function () { + var cells = []; + + this._column.cells.forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; +}; + +ColumnComponent.prototype.getVisibility = function () { + console.warn("getVisibility function is deprecated, you should now use the isVisible function"); + return this._column.visible; +}; + +ColumnComponent.prototype.isVisible = function () { + return this._column.visible; +}; + +ColumnComponent.prototype.show = function () { + if (this._column.isGroup) { + this._column.columns.forEach(function (column) { + column.show(); + }); + } else { + this._column.show(); + } +}; + +ColumnComponent.prototype.hide = function () { + if (this._column.isGroup) { + this._column.columns.forEach(function (column) { + column.hide(); + }); + } else { + this._column.hide(); + } +}; + +ColumnComponent.prototype.toggle = function () { + if (this._column.visible) { + this.hide(); + } else { + this.show(); + } +}; + +ColumnComponent.prototype.delete = function () { + return this._column.delete(); +}; + +ColumnComponent.prototype.getSubColumns = function () { + var output = []; + + if (this._column.columns.length) { + this._column.columns.forEach(function (column) { + output.push(column.getComponent()); + }); + } + + return output; +}; + +ColumnComponent.prototype.getParentColumn = function () { + return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; +}; + +ColumnComponent.prototype._getSelf = function () { + return this._column; +}; + +ColumnComponent.prototype.scrollTo = function () { + return this._column.table.columnManager.scrollToColumn(this._column); +}; + +ColumnComponent.prototype.getTable = function () { + return this._column.table; +}; + +ColumnComponent.prototype.headerFilterFocus = function () { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.setHeaderFilterFocus(this._column); + } +}; + +ColumnComponent.prototype.reloadHeaderFilter = function () { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.reloadHeaderFilter(this._column); + } +}; + +ColumnComponent.prototype.getHeaderFilterValue = function () { + if (this._column.table.modExists("filter", true)) { + return this._column.table.modules.filter.getHeaderFilterValue(this._column); + } +}; + +ColumnComponent.prototype.setHeaderFilterValue = function (value) { + if (this._column.table.modExists("filter", true)) { + this._column.table.modules.filter.setHeaderFilterValue(this._column, value); + } +}; + +ColumnComponent.prototype.move = function (to, after) { + var toColumn = this._column.table.columnManager.findColumn(to); + + if (toColumn) { + this._column.table.columnManager.moveColumn(this._column, toColumn, after); + } else { + console.warn("Move Error - No matching column found:", toColumn); + } +}; + +ColumnComponent.prototype.getNextColumn = function () { + var nextCol = this._column.nextColumn(); + + return nextCol ? nextCol.getComponent() : false; +}; + +ColumnComponent.prototype.getPrevColumn = function () { + var prevCol = this._column.prevColumn(); + + return prevCol ? prevCol.getComponent() : false; +}; + +ColumnComponent.prototype.updateDefinition = function (updates) { + return this._column.updateDefinition(updates); +}; + +ColumnComponent.prototype.getWidth = function () { + return this._column.getWidth(); +}; + +ColumnComponent.prototype.setWidth = function (width) { + var result; + + if (width === true) { + result = this._column.reinitializeWidth(true); + } else { + result = this._column.setWidth(width); + } + + if (this._column.table.options.virtualDomHoz) { + this._column.table.vdomHoz.reinitialize(true); + } + + return result; +}; + +ColumnComponent.prototype.validate = function () { + return this._column.validate(); +}; + +var Column = function Column(def, parent) { + var self = this; + + this.table = parent.table; + this.definition = def; //column definition + this.parent = parent; //hold parent object + this.type = "column"; //type of element + this.columns = []; //child columns + this.cells = []; //cells bound to this column + this.element = this.createElement(); //column header element + this.contentElement = false; + this.titleHolderElement = false; + this.titleElement = false; + this.groupElement = this.createGroupElement(); //column group holder element + this.isGroup = false; + this.tooltip = false; //hold column tooltip + this.hozAlign = ""; //horizontal text alignment + this.vertAlign = ""; //vert text alignment + + //multi dimensional filed handling + this.field = ""; + this.fieldStructure = ""; + this.getFieldValue = ""; + this.setFieldValue = ""; + + this.titleFormatterRendered = false; + + this.setField(this.definition.field); + + if (this.table.options.invalidOptionWarnings) { + this.checkDefinition(); + } + + this.modules = {}; //hold module variables; + + this.cellEvents = { + cellClick: false, + cellDblClick: false, + cellContext: false, + cellTap: false, + cellDblTap: false, + cellTapHold: false, + cellMouseEnter: false, + cellMouseLeave: false, + cellMouseOver: false, + cellMouseOut: false, + cellMouseMove: false + }; + + this.width = null; //column width + this.widthStyled = ""; //column width prestyled to improve render efficiency + this.maxWidth = null; //column maximum width + this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency + this.minWidth = null; //column minimum width + this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency + this.widthFixed = false; //user has specified a width for this column + + this.visible = true; //default visible state + + this.component = null; + + this._mapDepricatedFunctionality(); + + //initialize column + if (def.columns) { + + this.isGroup = true; + + def.columns.forEach(function (def, i) { + var newCol = new Column(def, self); + self.attachColumn(newCol); + }); + + self.checkColumnVisibility(); + } else { + parent.registerColumnField(this); + } + + if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { + this.table.modules.moveRow.setHandle(true); + } + + this._buildHeader(); + + this.bindModuleColumns(); +}; + +Column.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col"); + el.setAttribute("role", "columnheader"); + el.setAttribute("aria-sort", "none"); + + return el; +}; + +Column.prototype.createGroupElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-col-group-cols"); + + return el; +}; + +Column.prototype.checkDefinition = function () { + var _this5 = this; + + Object.keys(this.definition).forEach(function (key) { + if (_this5.defaultOptionList.indexOf(key) === -1) { + console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); + } + }); +}; + +Column.prototype.setField = function (field) { + this.field = field; + this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; + this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; + this.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData; +}; + +//register column position with column manager +Column.prototype.registerColumnPosition = function (column) { + this.parent.registerColumnPosition(column); +}; + +//register column position with column manager +Column.prototype.registerColumnField = function (column) { + this.parent.registerColumnField(column); +}; + +//trigger position registration +Column.prototype.reRegisterPosition = function () { + if (this.isGroup) { + this.columns.forEach(function (column) { + column.reRegisterPosition(); + }); + } else { + this.registerColumnPosition(this); + } +}; + +Column.prototype._mapDepricatedFunctionality = function () { + if (typeof this.definition.hideInHtml !== "undefined") { + this.definition.htmlOutput = !this.definition.hideInHtml; + console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput"); + } + + if (typeof this.definition.align !== "undefined") { + this.definition.hozAlign = this.definition.align; + console.warn("align column definition property is deprecated, you should now use hozAlign"); + } + + if (typeof this.definition.downloadTitle !== "undefined") { + this.definition.titleDownload = this.definition.downloadTitle; + console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"); + } +}; + +Column.prototype.setTooltip = function () { + var self = this, + def = self.definition; + + //set header tooltips + var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; + + if (tooltip) { + if (tooltip === true) { + if (def.field) { + self.table.modules.localize.bind("columns|" + def.field, function (value) { + self.element.setAttribute("title", value || def.title); + }); + } else { + self.element.setAttribute("title", def.title); + } + } else { + if (typeof tooltip == "function") { + tooltip = tooltip(self.getComponent()); + + if (tooltip === false) { + tooltip = ""; + } + } + + self.element.setAttribute("title", tooltip); + } + } else { + self.element.setAttribute("title", ""); + } +}; + +//build header element +Column.prototype._buildHeader = function () { + var self = this, + def = self.definition; + + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); + }if (def.headerVertical) { + self.element.classList.add("tabulator-col-vertical"); + + if (def.headerVertical === "flip") { + self.element.classList.add("tabulator-col-vertical-flip"); + } + } + + self.contentElement = self._bindEvents(); + + self.contentElement = self._buildColumnHeaderContent(); + + self.element.appendChild(self.contentElement); + + if (self.isGroup) { + self._buildGroupHeader(); + } else { + self._buildColumnHeader(); + } + + self.setTooltip(); + + //set resizable handles + if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { + self.table.modules.resizeColumns.initializeColumn("header", self, self.element); + } + + //set resizable handles + if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { + if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { + self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); + } + + self.table.modules.filter.initializeColumn(self); + } + + //set resizable handles + if (self.table.modExists("frozenColumns")) { + self.table.modules.frozenColumns.initializeColumn(self); + } + + //set movable column + if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { + self.table.modules.moveColumn.initializeColumn(self); + } + + //set calcs column + if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { + self.table.modules.columnCalcs.initializeColumn(self); + } + + //handle persistence + if (self.table.modExists("persistence") && self.table.modules.persistence.config.columns) { + self.table.modules.persistence.initializeColumn(self); + } + + //update header tooltip on mouse enter + self.element.addEventListener("mouseenter", function (e) { + self.setTooltip(); + }); +}; + +Column.prototype._bindEvents = function () { + + var self = this, + def = self.definition, + dblTap, + tapHold, + tap; + + //setup header click event bindings + if (typeof def.headerClick == "function") { + self.element.addEventListener("click", function (e) { + def.headerClick(e, self.getComponent()); + }); + } + + if (typeof def.headerDblClick == "function") { + self.element.addEventListener("dblclick", function (e) { + def.headerDblClick(e, self.getComponent()); + }); + } + + if (typeof def.headerContext == "function") { + self.element.addEventListener("contextmenu", function (e) { + def.headerContext(e, self.getComponent()); + }); + } + + //setup header tap event bindings + if (typeof def.headerTap == "function") { + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + def.headerTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (typeof def.headerDblTap == "function") { + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + def.headerDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (typeof def.headerTapHold == "function") { + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + def.headerTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } + + //store column cell click event bindings + if (typeof def.cellClick == "function") { + self.cellEvents.cellClick = def.cellClick; + } + + if (typeof def.cellDblClick == "function") { + self.cellEvents.cellDblClick = def.cellDblClick; + } + + if (typeof def.cellContext == "function") { + self.cellEvents.cellContext = def.cellContext; + } + + //store column mouse event bindings + if (typeof def.cellMouseEnter == "function") { + self.cellEvents.cellMouseEnter = def.cellMouseEnter; + } + + if (typeof def.cellMouseLeave == "function") { + self.cellEvents.cellMouseLeave = def.cellMouseLeave; + } + + if (typeof def.cellMouseOver == "function") { + self.cellEvents.cellMouseOver = def.cellMouseOver; + } + + if (typeof def.cellMouseOut == "function") { + self.cellEvents.cellMouseOut = def.cellMouseOut; + } + + if (typeof def.cellMouseMove == "function") { + self.cellEvents.cellMouseMove = def.cellMouseMove; + } + + //setup column cell tap event bindings + if (typeof def.cellTap == "function") { + self.cellEvents.cellTap = def.cellTap; + } + + if (typeof def.cellDblTap == "function") { + self.cellEvents.cellDblTap = def.cellDblTap; + } + + if (typeof def.cellTapHold == "function") { + self.cellEvents.cellTapHold = def.cellTapHold; + } + + //setup column cell edit callbacks + if (typeof def.cellEdited == "function") { + self.cellEvents.cellEdited = def.cellEdited; + } + + if (typeof def.cellEditing == "function") { + self.cellEvents.cellEditing = def.cellEditing; + } + + if (typeof def.cellEditCancelled == "function") { + self.cellEvents.cellEditCancelled = def.cellEditCancelled; + } +}; + +//build header element for header +Column.prototype._buildColumnHeader = function () { + var _this6 = this; + + var def = this.definition, + table = this.table, + sortable; + + //set column sorter + if (table.modExists("sort")) { + table.modules.sort.initializeColumn(this, this.titleHolderElement); + } + + //set column header context menu + if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { + table.modules.menu.initializeColumnHeader(this); + } + + //set column formatter + if (table.modExists("format")) { + table.modules.format.initializeColumn(this); + } + + //set column editor + if (typeof def.editor != "undefined" && table.modExists("edit")) { + table.modules.edit.initializeColumn(this); + } + + //set colum validator + if (typeof def.validator != "undefined" && table.modExists("validate")) { + table.modules.validate.initializeColumn(this); + } + + //set column mutator + if (table.modExists("mutator")) { + table.modules.mutator.initializeColumn(this); + } + + //set column accessor + if (table.modExists("accessor")) { + table.modules.accessor.initializeColumn(this); + } + + //set respoviveLayout + if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { + table.modules.responsiveLayout.initializeColumn(this); + } + + //set column visibility + if (typeof def.visible != "undefined") { + if (def.visible) { + this.show(true); + } else { + this.hide(true); + } + } + + //asign additional css classes to column header + if (def.cssClass) { + var classeNames = def.cssClass.split(" "); + classeNames.forEach(function (className) { + _this6.element.classList.add(className); + }); + } + + if (def.field) { + this.element.setAttribute("tabulator-field", def.field); + } + + //set min width if present + this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); + + if (def.maxWidth || this.table.options.columnMaxWidth) { + if (def.maxWidth !== false) { + this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth)); + } + } + + this.reinitializeWidth(); + + //set tooltip if present + this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; + + //set orizontal text alignment + this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; + this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; +}; + +Column.prototype._buildColumnHeaderContent = function () { + var def = this.definition, + table = this.table; + + var contentElement = document.createElement("div"); + contentElement.classList.add("tabulator-col-content"); + + this.titleHolderElement = document.createElement("div"); + this.titleHolderElement.classList.add("tabulator-col-title-holder"); + + contentElement.appendChild(this.titleHolderElement); + + this.titleElement = this._buildColumnHeaderTitle(); + + this.titleHolderElement.appendChild(this.titleElement); + + return contentElement; +}; + +//build title element of column +Column.prototype._buildColumnHeaderTitle = function () { + var self = this, + def = self.definition, + table = self.table, + title; + + var titleHolderElement = document.createElement("div"); + titleHolderElement.classList.add("tabulator-col-title"); + + if (def.editableTitle) { + var titleElement = document.createElement("input"); + titleElement.classList.add("tabulator-title-editor"); + + titleElement.addEventListener("click", function (e) { + e.stopPropagation(); + titleElement.focus(); + }); + + titleElement.addEventListener("change", function () { + def.title = titleElement.value; + table.options.columnTitleChanged.call(self.table, self.getComponent()); + }); + + titleHolderElement.appendChild(titleElement); + + if (def.field) { + table.modules.localize.bind("columns|" + def.field, function (text) { + titleElement.value = text || def.title || " "; + }); + } else { + titleElement.value = def.title || " "; + } + } else { + if (def.field) { + table.modules.localize.bind("columns|" + def.field, function (text) { + self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); + }); + } else { + self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); + } + } + + return titleHolderElement; +}; + +Column.prototype._formatColumnHeaderTitle = function (el, title) { + var _this7 = this; + + var formatter, contents, params, mockCell, onRendered; + + if (this.definition.titleFormatter && this.table.modExists("format")) { + + formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); + + onRendered = function onRendered(callback) { + _this7.titleFormatterRendered = callback; + }; + + mockCell = { + getValue: function getValue() { + return title; + }, + getElement: function getElement() { + return el; + } + }; + + params = this.definition.titleFormatterParams || {}; + + params = typeof params === "function" ? params() : params; + + contents = formatter.call(this.table.modules.format, mockCell, params, onRendered); + + switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { + case "object": + if (contents instanceof Node) { + el.appendChild(contents); + } else { + el.innerHTML = ""; + console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); + } + break; + case "undefined": + case "null": + el.innerHTML = ""; + break; + default: + el.innerHTML = contents; + } + } else { + el.innerHTML = title; + } +}; + +//build header element for column group +Column.prototype._buildGroupHeader = function () { + var _this8 = this; + + this.element.classList.add("tabulator-col-group"); + this.element.setAttribute("role", "columngroup"); + this.element.setAttribute("aria-title", this.definition.title); + + //asign additional css classes to column header + if (this.definition.cssClass) { + var classeNames = this.definition.cssClass.split(" "); + classeNames.forEach(function (className) { + _this8.element.classList.add(className); + }); + } + + //set column header context menu + if ((this.definition.headerContextMenu || this.definition.headerMenu) && this.table.modExists("menu")) { + this.table.modules.menu.initializeColumnHeader(this); + } + + this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + + this.element.appendChild(this.groupElement); +}; + +//flat field lookup +Column.prototype._getFlatData = function (data) { + return data[this.field]; +}; + +//nested field lookup +Column.prototype._getNestedData = function (data) { + var dataObj = data, + structure = this.fieldStructure, + length = structure.length, + output; + + for (var i = 0; i < length; i++) { + + dataObj = dataObj[structure[i]]; + + output = dataObj; + + if (!dataObj) { + break; + } + } + + return output; +}; + +//flat field set +Column.prototype._setFlatData = function (data, value) { + if (this.field) { + data[this.field] = value; + } +}; + +//nested field set +Column.prototype._setNestedData = function (data, value) { + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for (var i = 0; i < length; i++) { + + if (i == length - 1) { + dataObj[structure[i]] = value; + } else { + if (!dataObj[structure[i]]) { + if (typeof value !== "undefined") { + dataObj[structure[i]] = {}; + } else { + break; + } + } + + dataObj = dataObj[structure[i]]; + } + } +}; + +//attach column to this group +Column.prototype.attachColumn = function (column) { + var self = this; + + if (self.groupElement) { + self.columns.push(column); + self.groupElement.appendChild(column.getElement()); + } else { + console.warn("Column Warning - Column being attached to another column instead of column group"); + } +}; + +//vertically align header in column +Column.prototype.verticalAlign = function (alignment, height) { + + //calculate height of column header and group holder element + var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; + // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; + + this.element.style.height = parentHeight + "px"; + + if (this.isGroup) { + this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; + } + + //vertically align cell contents + if (!this.isGroup && alignment !== "top") { + if (alignment === "bottom") { + this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; + } else { + this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; + } + } + + this.columns.forEach(function (column) { + column.verticalAlign(alignment); + }); +}; + +//clear vertical alignmenet +Column.prototype.clearVerticalAlign = function () { + this.element.style.paddingTop = ""; + this.element.style.height = ""; + this.element.style.minHeight = ""; + this.groupElement.style.minHeight = ""; + + this.columns.forEach(function (column) { + column.clearVerticalAlign(); + }); +}; + +Column.prototype.bindModuleColumns = function () { + //check if rownum formatter is being used on a column + if (this.definition.formatter == "rownum") { + this.table.rowManager.rowNumColumn = this; + } +}; + +//// Retreive Column Information //// + +//return column header element +Column.prototype.getElement = function () { + return this.element; +}; + +//return colunm group element +Column.prototype.getGroupElement = function () { + return this.groupElement; +}; + +//return field name +Column.prototype.getField = function () { + return this.field; +}; + +//return the first column in a group +Column.prototype.getFirstColumn = function () { + if (!this.isGroup) { + return this; + } else { + if (this.columns.length) { + return this.columns[0].getFirstColumn(); + } else { + return false; + } + } +}; + +//return the last column in a group +Column.prototype.getLastColumn = function () { + if (!this.isGroup) { + return this; + } else { + if (this.columns.length) { + return this.columns[this.columns.length - 1].getLastColumn(); + } else { + return false; + } + } +}; + +//return all columns in a group +Column.prototype.getColumns = function () { + return this.columns; +}; + +//return all columns in a group +Column.prototype.getCells = function () { + return this.cells; +}; + +//retreive the top column in a group of columns +Column.prototype.getTopColumn = function () { + if (this.parent.isGroup) { + return this.parent.getTopColumn(); + } else { + return this; + } +}; + +//return column definition object +Column.prototype.getDefinition = function (updateBranches) { + var colDefs = []; + + if (this.isGroup && updateBranches) { + this.columns.forEach(function (column) { + colDefs.push(column.getDefinition(true)); + }); + + this.definition.columns = colDefs; + } + + return this.definition; +}; + +//////////////////// Actions //////////////////// + +Column.prototype.checkColumnVisibility = function () { + var visible = false; + + this.columns.forEach(function (column) { + if (column.visible) { + visible = true; + } + }); + + if (visible) { + this.show(); + this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } else { + this.hide(); + } +}; + +//show column +Column.prototype.show = function (silent, responsiveToggle) { + if (!this.visible) { + this.visible = true; + + this.element.style.display = ""; + + if (this.parent.isGroup) { + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + cell.show(); + }); + + if (!this.isGroup && this.width === null) { + this.reinitializeWidth(); + } + + this.table.columnManager._verticalAlignHeaders(); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitialize(); + } + } +}; + +//hide column +Column.prototype.hide = function (silent, responsiveToggle) { + if (this.visible) { + this.visible = false; + + this.element.style.display = "none"; + + this.table.columnManager._verticalAlignHeaders(); + + if (this.parent.isGroup) { + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + cell.hide(); + }); + + if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + this.table.modules.persistence.save("columns"); + } + + if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); + } + + if (!silent) { + this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + if (!this.silent && this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitialize(); + } + } +}; + +Column.prototype.matchChildWidths = function () { + var childWidth = 0; + + if (this.contentElement && this.columns.length) { + this.columns.forEach(function (column) { + if (column.visible) { + childWidth += column.getWidth(); + } + }); + + this.contentElement.style.maxWidth = childWidth - 1 + "px"; + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + } +}; + +Column.prototype.removeChild = function (child) { + var index = this.columns.indexOf(child); + + if (index > -1) { + this.columns.splice(index, 1); + } + + if (!this.columns.length) { + this.delete(); + } +}; + +Column.prototype.setWidth = function (width) { + this.widthFixed = true; + this.setWidthActual(width); +}; + +Column.prototype.setWidthActual = function (width) { + if (isNaN(width)) { + width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); + } + + width = Math.max(this.minWidth, width); + + if (this.maxWidth) { + width = Math.min(this.maxWidth, width); + } + + this.width = width; + this.widthStyled = width ? width + "px" : ""; + + this.element.style.width = this.widthStyled; + + if (!this.isGroup) { + this.cells.forEach(function (cell) { + cell.setWidth(); + }); + } + + if (this.parent.isGroup) { + this.parent.matchChildWidths(); + } + + //set resizable handles + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } +}; + +Column.prototype.checkCellHeights = function () { + var rows = []; + + this.cells.forEach(function (cell) { + if (cell.row.heightInitialized) { + if (cell.row.getElement().offsetParent !== null) { + rows.push(cell.row); + cell.row.clearCellHeight(); + } else { + cell.row.heightInitialized = false; + } + } + }); + + rows.forEach(function (row) { + row.calcHeight(); + }); + + rows.forEach(function (row) { + row.setCellHeight(); + }); +}; + +Column.prototype.getWidth = function () { + var width = 0; + + if (this.isGroup) { + this.columns.forEach(function (column) { + if (column.visible) { + width += column.getWidth(); + } + }); + } else { + width = this.width; + } + + return width; +}; + +Column.prototype.getHeight = function () { + return this.element.offsetHeight; +}; + +Column.prototype.setMinWidth = function (minWidth) { + this.minWidth = minWidth; + this.minWidthStyled = minWidth ? minWidth + "px" : ""; + + this.element.style.minWidth = this.minWidthStyled; + + this.cells.forEach(function (cell) { + cell.setMinWidth(); + }); +}; + +Column.prototype.setMaxWidth = function (maxWidth) { + this.maxWidth = maxWidth; + this.maxWidthStyled = maxWidth ? maxWidth + "px" : ""; + + this.element.style.maxWidth = this.maxWidthStyled; + + this.cells.forEach(function (cell) { + cell.setMaxWidth(); + }); +}; + +Column.prototype.delete = function () { + var _this9 = this; + + return new Promise(function (resolve, reject) { + var index; + + if (_this9.isGroup) { + _this9.columns.forEach(function (column) { + column.delete(); + }); + } + + //cancel edit if column is currently being edited + if (_this9.table.modExists("edit")) { + if (_this9.table.modules.edit.currentCell.column === _this9) { + _this9.table.modules.edit.cancelEdit(); + } + } + + var cellCount = _this9.cells.length; + + for (var i = 0; i < cellCount; i++) { + _this9.cells[0].delete(); + } + + if (_this9.element.parentNode) { + _this9.element.parentNode.removeChild(_this9.element); + } + + _this9.element = false; + _this9.contentElement = false; + _this9.titleElement = false; + _this9.groupElement = false; + + if (_this9.parent.isGroup) { + _this9.parent.removeChild(_this9); + } + + _this9.table.columnManager.deregisterColumn(_this9); + + if (_this9.table.options.virtualDomHoz) { + _this9.table.vdomHoz.reinitialize(true); + } + + resolve(); + }); +}; + +Column.prototype.columnRendered = function () { + if (this.titleFormatterRendered) { + this.titleFormatterRendered(); + } +}; + +Column.prototype.validate = function () { + var invalid = []; + + this.cells.forEach(function (cell) { + if (!cell.validate()) { + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; +}; + +//////////////// Cell Management ///////////////// + +//generate cell for this column +Column.prototype.generateCell = function (row) { + var self = this; + + var cell = new Cell(self, row); + + this.cells.push(cell); + + return cell; +}; + +Column.prototype.nextColumn = function () { + var index = this.table.columnManager.findColumnIndex(this); + return index > -1 ? this._nextVisibleColumn(index + 1) : false; +}; + +Column.prototype._nextVisibleColumn = function (index) { + var column = this.table.columnManager.getColumnByIndex(index); + return !column || column.visible ? column : this._nextVisibleColumn(index + 1); +}; + +Column.prototype.prevColumn = function () { + var index = this.table.columnManager.findColumnIndex(this); + return index > -1 ? this._prevVisibleColumn(index - 1) : false; +}; + +Column.prototype._prevVisibleColumn = function (index) { + var column = this.table.columnManager.getColumnByIndex(index); + return !column || column.visible ? column : this._prevVisibleColumn(index - 1); +}; + +Column.prototype.reinitializeWidth = function (force) { + this.widthFixed = false; + + //set width if present + if (typeof this.definition.width !== "undefined" && !force) { + this.setWidth(this.definition.width); + } + + //hide header filters to prevent them altering column width + if (this.table.modExists("filter")) { + this.table.modules.filter.hideHeaderFilterElements(); + } + + this.fitToData(); + + //show header filters again after layout is complete + if (this.table.modExists("filter")) { + this.table.modules.filter.showHeaderFilterElements(); + } +}; + +//set column width to maximum cell width +Column.prototype.fitToData = function () { + var self = this; + + if (!this.widthFixed) { + this.element.style.width = ""; + + self.cells.forEach(function (cell) { + cell.clearWidth(); + }); + } + + var maxWidth = this.element.offsetWidth; + + if (!self.width || !this.widthFixed) { + self.cells.forEach(function (cell) { + var width = cell.getWidth(); + + if (width > maxWidth) { + maxWidth = width; + } + }); + + if (maxWidth) { + self.setWidthActual(maxWidth + 1); + } + } +}; + +Column.prototype.updateDefinition = function (updates) { + var _this10 = this; + + return new Promise(function (resolve, reject) { + var definition; + + if (!_this10.isGroup) { + definition = Object.assign({}, _this10.getDefinition()); + definition = Object.assign(definition, updates); + + _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { + + if (definition.field == _this10.field) { + _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays + } + + _this10.delete().then(function () { + resolve(column.getComponent()); + }).catch(function (err) { + reject(err); + }); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + } + }); +}; + +Column.prototype.deleteCell = function (cell) { + var index = this.cells.indexOf(cell); + + if (index > -1) { + this.cells.splice(index, 1); + } +}; + +Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", +// "headerClickMenu", +"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; + +//////////////// Event Bindings ///////////////// + +//////////////// Object Generation ///////////////// +Column.prototype.getComponent = function () { + if (!this.component) { + this.component = new ColumnComponent(this); + } + + return this.component; +}; + +var RowManager = function RowManager(table) { + + this.table = table; + this.element = this.createHolderElement(); //containing element + this.tableElement = this.createTableElement(); //table element + this.heightFixer = this.createTableElement(); //table element + this.columnManager = null; //hold column manager object + this.height = 0; //hold height of table element + + this.firstRender = false; //handle first render + this.renderMode = "virtual"; //current rendering mode + this.fixedHeight = false; //current rendering mode + + this.rows = []; //hold row data objects + this.activeRows = []; //rows currently available to on display in the table + this.activeRowsCount = 0; //count of active rows + + this.displayRows = []; //rows currently on display in the table + this.displayRowsCount = 0; //count of display rows + + this.scrollTop = 0; + this.scrollLeft = 0; + + this.vDomRowHeight = 20; //approximation of row heights for padding + + this.vDomTop = 0; //hold position for first rendered row in the virtual DOM + this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM + + this.vDomScrollPosTop = 0; //last scroll position of the vDom top; + this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; + + this.vDomTopPad = 0; //hold value of padding for top of virtual DOM + this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM + + this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go + + this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling + + this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) + this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin + + this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed + this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed + + this.rowNumColumn = false; //hold column component for row number column + + this.redrawBlock = false; //prevent redraws to allow multiple data manipulations becore continuing + this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed + this.redrawBlockRederInPosition = false; //store latest redraw function calls for when redraw is needed +}; + +//////////////// Setup Functions ///////////////// + +RowManager.prototype.createHolderElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-tableHolder"); + el.setAttribute("tabindex", 0); + + return el; +}; + +RowManager.prototype.createTableElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-table"); + + return el; +}; + +//return containing element +RowManager.prototype.getElement = function () { + return this.element; +}; + +//return table element +RowManager.prototype.getTableElement = function () { + return this.tableElement; +}; + +//return position of row in table +RowManager.prototype.getRowPosition = function (row, active) { + if (active) { + return this.activeRows.indexOf(row); + } else { + return this.rows.indexOf(row); + } +}; + +//link to column manager +RowManager.prototype.setColumnManager = function (manager) { + this.columnManager = manager; +}; + +RowManager.prototype.initialize = function () { + var self = this; + + self.setRenderMode(); + + //initialize manager + self.element.appendChild(self.tableElement); + + self.firstRender = true; + + //scroll header along with table body + self.element.addEventListener("scroll", function () { + var left = self.element.scrollLeft; + + //handle horizontal scrolling + if (self.scrollLeft != left) { + self.columnManager.scrollHorizontal(left); + + if (self.table.options.groupBy) { + self.table.modules.groupRows.scrollHeaders(left); + } + + if (self.table.modExists("columnCalcs")) { + self.table.modules.columnCalcs.scrollHorizontal(left); + } + + self.table.options.scrollHorizontal(left); + } + + self.scrollLeft = left; + }); + + //handle virtual dom scrolling + if (this.renderMode === "virtual") { + + self.element.addEventListener("scroll", function () { + var top = self.element.scrollTop; + var dir = self.scrollTop > top; + + //handle verical scrolling + if (self.scrollTop != top) { + self.scrollTop = top; + self.scrollVertical(dir); + + if (self.table.options.ajaxProgressiveLoad == "scroll") { + self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); + } + + self.table.options.scrollVertical(top); + } else { + self.scrollTop = top; + } + }); + } +}; + +////////////////// Row Manipulation ////////////////// + +RowManager.prototype.findRow = function (subject) { + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + //subject is row element + return subject; + } else if (subject instanceof RowComponent) { + //subject is public row component + return subject._getSelf() || false; + } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { + //subject is a HTML element of the row + var match = self.rows.find(function (row) { + return row.getElement() === subject; + }); + + return match || false; + } + } else if (typeof subject == "undefined" || subject === null) { + return false; + } else { + //subject should be treated as the index of the row + var _match = self.rows.find(function (row) { + return row.data[self.table.options.index] == subject; + }); + + return _match || false; + } + + //catch all for any other type of input + + return false; +}; + +RowManager.prototype.getRowFromDataObject = function (data) { + var match = this.rows.find(function (row) { + return row.data === data; + }); + + return match || false; +}; + +RowManager.prototype.getRowFromPosition = function (position, active) { + if (active) { + return this.activeRows[position]; + } else { + return this.rows[position]; + } +}; + +RowManager.prototype.scrollToRow = function (row, position, ifVisible) { + var _this11 = this; + + var rowIndex = this.getDisplayRows().indexOf(row), + rowEl = row.getElement(), + rowTop, + offset = 0; + + return new Promise(function (resolve, reject) { + if (rowIndex > -1) { + + if (typeof position === "undefined") { + position = _this11.table.options.scrollToRowPosition; + } + + if (typeof ifVisible === "undefined") { + ifVisible = _this11.table.options.scrollToRowIfVisible; + } + + if (position === "nearest") { + switch (_this11.renderMode) { + case "classic": + rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; + position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; + break; + case "virtual": + position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; + break; + } + } + + //check row visibility + if (!ifVisible) { + if (Tabulator.prototype.helpers.elVisible(rowEl)) { + offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; + + if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { + return false; + } + } + } + + //scroll to row + switch (_this11.renderMode) { + case "classic": + _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; + break; + case "virtual": + _this11._virtualRenderFill(rowIndex, true); + break; + } + + //align to correct position + switch (position) { + case "middle": + case "center": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; + } else { + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; + } + + break; + + case "bottom": + + if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + } else { + _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; + } + + break; + } + + resolve(); + } else { + console.warn("Scroll Error - Row not visible"); + reject("Scroll Error - Row not visible"); + } + }); +}; + +////////////////// Data Handling ////////////////// + +RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { + var _this12 = this; + + var self = this; + + return new Promise(function (resolve, reject) { + if (renderInPosition && _this12.getDisplayRows().length) { + if (self.table.options.pagination) { + self._setDataActual(data, true); + } else { + _this12.reRenderInPosition(function () { + self._setDataActual(data); + }); + } + } else { + if (_this12.table.options.autoColumns && columnsChanged) { + _this12.table.columnManager.generateColumnsFromRowData(data); + } + _this12.resetScroll(); + + _this12._setDataActual(data); + } + + resolve(); + }); +}; + +RowManager.prototype._setDataActual = function (data, renderInPosition) { + var self = this; + + self.table.options.dataLoading.call(this.table, data); + + this._wipeElements(); + + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.clear(); + } + + if (Array.isArray(data)) { + + if (this.table.modExists("selectRow")) { + this.table.modules.selectRow.clearSelectionData(); + } + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + this.table.modules.reactiveData.watchData(data); + } + + data.forEach(function (def, i) { + if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { + var row = new Row(def, self); + self.rows.push(row); + } else { + console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); + } + }); + + self.refreshActiveData(false, false, renderInPosition); + + self.table.options.dataLoaded.call(this.table, data); + } else { + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); + } +}; + +RowManager.prototype._wipeElements = function () { + this.rows.forEach(function (row) { + row.wipe(); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.wipe(); + } + + this.rows = []; + this.activeRows = []; + this.activeRowsCount = 0; + this.displayRows = []; + this.displayRowsCount = 0; + + this.adjustTableSize(); +}; + +RowManager.prototype.deleteRow = function (row, blockRedraw) { + var allIndex = this.rows.indexOf(row), + activeIndex = this.activeRows.indexOf(row); + + if (activeIndex > -1) { + this.activeRows.splice(activeIndex, 1); + } + + if (allIndex > -1) { + this.rows.splice(allIndex, 1); + } + + this.setActiveRows(this.activeRows); + + this.displayRowIterator(function (rows) { + var displayIndex = rows.indexOf(row); + + if (displayIndex > -1) { + rows.splice(displayIndex, 1); + } + }); + + if (!blockRedraw) { + this.reRenderInPosition(); + } + + this.regenerateRowNumbers(); + + this.table.options.rowDeleted.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.updateGroupRows(true); + } else if (this.table.options.pagination && this.table.modExists("page")) { + this.refreshActiveData(false, false, true); + } else { + if (this.table.options.pagination && this.table.modExists("page")) { + this.refreshActiveData("page"); + } + } +}; + +RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { + + var row = this.addRowActual(data, pos, index, blockRedraw); + + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); + } + + return row; +}; + +//add multiple rows +RowManager.prototype.addRows = function (data, pos, index) { + var _this13 = this; + + var self = this, + length = 0, + rows = []; + + return new Promise(function (resolve, reject) { + pos = _this13.findAddRowPos(pos); + + if (!Array.isArray(data)) { + data = [data]; + } + + length = data.length - 1; + + if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { + data.reverse(); + } + + data.forEach(function (item, i) { + var row = self.addRow(item, pos, index, true); + rows.push(row); + }); + + if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { + _this13.table.modules.groupRows.updateGroupRows(true); + } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { + _this13.refreshActiveData(false, false, true); + } else { + _this13.reRenderInPosition(); + } + + //recalc column calculations if present + if (_this13.table.modExists("columnCalcs")) { + _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); + } + + _this13.regenerateRowNumbers(); + resolve(rows); + }); +}; + +RowManager.prototype.findAddRowPos = function (pos) { + if (typeof pos === "undefined") { + pos = this.table.options.addRowPos; + } + + if (pos === "pos") { + pos = true; + } + + if (pos === "bottom") { + pos = false; + } + + return pos; +}; + +RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { + var row = data instanceof Row ? data : new Row(data || {}, this), + top = this.findAddRowPos(pos), + allIndex = -1, + activeIndex, + dispRows; + + if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { + dispRows = this.getDisplayRows(); + + if (top) { + if (dispRows.length) { + index = dispRows[0]; + } else { + if (this.activeRows.length) { + index = this.activeRows[this.activeRows.length - 1]; + top = false; + } + } + } else { + if (dispRows.length) { + index = dispRows[dispRows.length - 1]; + top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; + } + } + } + + if (typeof index !== "undefined") { + index = this.findRow(index); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.assignRowToGroup(row); + + var groupRows = row.getGroup().rows; + + if (groupRows.length > 1) { + + if (!index || index && groupRows.indexOf(index) == -1) { + if (top) { + if (groupRows[0] !== row) { + index = groupRows[0]; + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } else { + if (groupRows[groupRows.length - 1] !== row) { + index = groupRows[groupRows.length - 1]; + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } else { + this._moveRowInArray(row.getGroup().rows, row, index, !top); + } + } + } + + if (index) { + allIndex = this.rows.indexOf(index); + } + + if (index && allIndex > -1) { + activeIndex = this.activeRows.indexOf(index); + + this.displayRowIterator(function (rows) { + var displayIndex = rows.indexOf(index); + + if (displayIndex > -1) { + rows.splice(top ? displayIndex : displayIndex + 1, 0, row); + } + }); + + if (activeIndex > -1) { + this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); + } + + this.rows.splice(top ? allIndex : allIndex + 1, 0, row); + } else { + + if (top) { + + this.displayRowIterator(function (rows) { + rows.unshift(row); + }); + + this.activeRows.unshift(row); + this.rows.unshift(row); + } else { + this.displayRowIterator(function (rows) { + rows.push(row); + }); + + this.activeRows.push(row); + this.rows.push(row); + } + } + + this.setActiveRows(this.activeRows); + + this.table.options.rowAdded.call(this.table, row.getComponent()); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.getData()); + } + + if (!blockRedraw) { + this.reRenderInPosition(); + } + + return row; +}; + +RowManager.prototype.moveRow = function (from, to, after) { + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("rowMove", from, { posFrom: this.getRowPosition(from), posTo: this.getRowPosition(to), to: to, after: after }); + } + + this.moveRowActual(from, to, after); + + this.regenerateRowNumbers(); + + this.table.options.rowMoved.call(this.table, from.getComponent()); +}; + +RowManager.prototype.moveRowActual = function (from, to, after) { + var _this14 = this; + + this._moveRowInArray(this.rows, from, to, after); + this._moveRowInArray(this.activeRows, from, to, after); + + this.displayRowIterator(function (rows) { + _this14._moveRowInArray(rows, from, to, after); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (!after && to instanceof Group) { + to = this.table.rowManager.prevDisplayRow(from) || to; + } + + var toGroup = to.getGroup(); + var fromGroup = from.getGroup(); + + if (toGroup === fromGroup) { + this._moveRowInArray(toGroup.rows, from, to, after); + } else { + if (fromGroup) { + fromGroup.removeRow(from); + } + + toGroup.insertRow(from, to, after); + } + } +}; + +RowManager.prototype._moveRowInArray = function (rows, from, to, after) { + var fromIndex, toIndex, start, end; + + if (from !== to) { + + fromIndex = rows.indexOf(from); + + if (fromIndex > -1) { + + rows.splice(fromIndex, 1); + + toIndex = rows.indexOf(to); + + if (toIndex > -1) { + + if (after) { + rows.splice(toIndex + 1, 0, from); + } else { + rows.splice(toIndex, 0, from); + } + } else { + rows.splice(fromIndex, 0, from); + } + } + + //restyle rows + if (rows === this.getDisplayRows()) { + + start = fromIndex < toIndex ? fromIndex : toIndex; + end = toIndex > fromIndex ? toIndex : fromIndex + 1; + + for (var i = start; i <= end; i++) { + if (rows[i]) { + this.styleRow(rows[i], i); + } + } + } + } +}; + +RowManager.prototype.clearData = function () { + this.setData([]); +}; + +RowManager.prototype.getRowIndex = function (row) { + return this.findRowIndex(row, this.rows); +}; + +RowManager.prototype.getDisplayRowIndex = function (row) { + var index = this.getDisplayRows().indexOf(row); + return index > -1 ? index : false; +}; + +RowManager.prototype.nextDisplayRow = function (row, rowOnly) { + var index = this.getDisplayRowIndex(row), + nextRow = false; + + if (index !== false && index < this.displayRowsCount - 1) { + nextRow = this.getDisplayRows()[index + 1]; + } + + if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { + return this.nextDisplayRow(nextRow, rowOnly); + } + + return nextRow; +}; + +RowManager.prototype.prevDisplayRow = function (row, rowOnly) { + var index = this.getDisplayRowIndex(row), + prevRow = false; + + if (index) { + prevRow = this.getDisplayRows()[index - 1]; + } + + if (rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { + return this.prevDisplayRow(prevRow, rowOnly); + } + + return prevRow; +}; + +RowManager.prototype.findRowIndex = function (row, list) { + var rowIndex; + + row = this.findRow(row); + + if (row) { + rowIndex = list.indexOf(row); + + if (rowIndex > -1) { + return rowIndex; + } + } + + return false; +}; + +RowManager.prototype.getData = function (active, transform) { + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + if (row.type == "row") { + output.push(row.getData(transform || "data")); + } + }); + + return output; +}; + +RowManager.prototype.getComponents = function (active) { + var output = [], + rows = this.getRows(active); + + rows.forEach(function (row) { + output.push(row.getComponent()); + }); + + return output; +}; + +RowManager.prototype.getDataCount = function (active) { + var rows = this.getRows(active); + + return rows.length; +}; + +RowManager.prototype._genRemoteRequest = function () { + var _this15 = this; + + var table = this.table, + options = table.options, + params = {}; + + if (table.modExists("page")) { + //set sort data if defined + if (options.ajaxSorting) { + var sorters = this.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + params[this.table.modules.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (options.ajaxFiltering) { + var filters = this.table.modules.filter.getFilters(true, true); + + params[this.table.modules.page.paginationDataSentNames.filters] = filters; + } + + this.table.modules.ajax.setParams(params, true); + } + + table.modules.ajax.sendRequest().then(function (data) { + _this15._setDataActual(data, true); + }).catch(function (e) {}); +}; + +//choose the path to refresh data after a filter update +RowManager.prototype.filterRefresh = function () { + var table = this.table, + options = table.options, + left = this.scrollLeft; + + if (options.ajaxFiltering) { + if (options.pagination == "remote" && table.modExists("page")) { + table.modules.page.reset(true); + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + } else { + this.refreshActiveData("filter"); + } + + this.scrollHorizontal(left); +}; + +//choose the path to refresh data after a sorter update +RowManager.prototype.sorterRefresh = function (loadOrignalData) { + var table = this.table, + options = this.table.options, + left = this.scrollLeft; + + if (options.ajaxSorting) { + if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { + table.modules.page.reset(true); + table.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else if (options.ajaxProgressiveLoad) { + table.modules.ajax.loadData().then(function () {}).catch(function () {}); + } else { + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + } else { + this.refreshActiveData(loadOrignalData ? "filter" : "sort"); + } + + this.scrollHorizontal(left); +}; + +RowManager.prototype.scrollHorizontal = function (left) { + this.scrollLeft = left; + this.element.scrollLeft = left; + + if (this.table.options.groupBy) { + this.table.modules.groupRows.scrollHeaders(left); + } + + if (this.table.modExists("columnCalcs")) { + this.table.modules.columnCalcs.scrollHorizontal(left); + } +}; + +//set active data set +RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { + var self = this, + table = this.table, + cascadeOrder = ["all", "filter", "sort", "display", "freeze", "group", "tree", "page"], + displayIndex; + + if (this.redrawBlock) { + + if (!this.redrawBlockRestoreConfig || cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage)) { + this.redrawBlockRestoreConfig = { + stage: stage, + skipStage: skipStage, + renderInPosition: renderInPosition + }; + } + + return; + } else { + + if (self.table.modExists("edit")) { + self.table.modules.edit.cancelEdit(); + } + + if (!stage) { + stage = "all"; + } + + if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { + table.modules.selectRow.deselectRows(); + } + + //cascade through data refresh stages + switch (stage) { + case "all": + + case "filter": + if (!skipStage) { + if (table.modExists("filter")) { + self.setActiveRows(table.modules.filter.filter(self.rows)); + } else { + self.setActiveRows(self.rows.slice(0)); + } + } else { + skipStage = false; + } + + case "sort": + if (!skipStage) { + if (table.modExists("sort")) { + table.modules.sort.sort(this.activeRows); + } + } else { + skipStage = false; + } + + //regenerate row numbers for row number formatter if in use + this.regenerateRowNumbers(); + + //generic stage to allow for pipeline trigger after the data manipulation stage + case "display": + this.resetDisplayRows(); + + case "freeze": + if (!skipStage) { + if (this.table.modExists("frozenRows")) { + if (table.modules.frozenRows.isFrozen()) { + if (!table.modules.frozenRows.getDisplayIndex()) { + table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.frozenRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.frozenRows.setDisplayIndex(displayIndex); + } + } + } + } else { + skipStage = false; + } + + case "group": + if (!skipStage) { + if (table.options.groupBy && table.modExists("groupRows")) { + + if (!table.modules.groupRows.getDisplayIndex()) { + table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.groupRows.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.groupRows.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + + case "tree": + + if (!skipStage) { + if (table.options.dataTree && table.modExists("dataTree")) { + if (!table.modules.dataTree.getDisplayIndex()) { + table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.dataTree.getDisplayIndex(); + + displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.dataTree.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + + if (table.options.pagination && table.modExists("page") && !renderInPosition) { + if (table.modules.page.getMode() == "local") { + table.modules.page.reset(); + } + } + + case "page": + if (!skipStage) { + if (table.options.pagination && table.modExists("page")) { + + if (!table.modules.page.getDisplayIndex()) { + table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); + } + + displayIndex = table.modules.page.getDisplayIndex(); + + if (table.modules.page.getMode() == "local") { + table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); + } + + displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); + + if (displayIndex !== true) { + table.modules.page.setDisplayIndex(displayIndex); + } + } + } else { + skipStage = false; + } + } + + if (Tabulator.prototype.helpers.elVisible(self.element)) { + if (renderInPosition) { + self.reRenderInPosition(); + } else { + + if (stage === "all" && this.table.options.virtualDomHoz) { + this.table.vdomHoz.dataChange(); + } + + self.renderTable(); + + if (table.options.layoutColumnsOnNewData) { + self.table.columnManager.redraw(true); + } + } + } + + if (table.modExists("columnCalcs")) { + table.modules.columnCalcs.recalc(this.activeRows); + } + } +}; + +//regenerate row numbers for row number formatter if in use +RowManager.prototype.regenerateRowNumbers = function () { + var _this16 = this; + + if (this.rowNumColumn) { + this.activeRows.forEach(function (row) { + var cell = row.getCell(_this16.rowNumColumn); + + if (cell) { + cell._generateContents(); + } + }); + } +}; + +RowManager.prototype.setActiveRows = function (activeRows) { + this.activeRows = activeRows; + this.activeRowsCount = this.activeRows.length; +}; + +//reset display rows array +RowManager.prototype.resetDisplayRows = function () { + this.displayRows = []; + + this.displayRows.push(this.activeRows.slice(0)); + + this.displayRowsCount = this.displayRows[0].length; + + if (this.table.modExists("frozenRows")) { + this.table.modules.frozenRows.setDisplayIndex(0); + } + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.setDisplayIndex(0); + } + + if (this.table.options.pagination && this.table.modExists("page")) { + this.table.modules.page.setDisplayIndex(0); + } +}; + +RowManager.prototype.getNextDisplayIndex = function () { + return this.displayRows.length; +}; + +//set display row pipeline data +RowManager.prototype.setDisplayRows = function (displayRows, index) { + + var output = true; + + if (index && typeof this.displayRows[index] != "undefined") { + this.displayRows[index] = displayRows; + output = true; + } else { + this.displayRows.push(displayRows); + output = index = this.displayRows.length - 1; + } + + if (index == this.displayRows.length - 1) { + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; + } + + return output; +}; + +RowManager.prototype.getDisplayRows = function (index) { + if (typeof index == "undefined") { + return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; + } else { + return this.displayRows[index] || []; + } +}; + +RowManager.prototype.getVisibleRows = function (viewable) { + var topEdge = this.element.scrollTop, + bottomEdge = this.element.clientHeight + topEdge, + topFound = false, + topRow = 0, + bottomRow = 0, + rows = this.getDisplayRows(); + + if (viewable) { + + this.getDisplayRows(); + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + if (rows[i]) { + if (!topFound) { + if (topEdge - rows[i].getElement().offsetTop >= 0) { + topRow = i; + } else { + topFound = true; + + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + bottomRow = i; + } else { + break; + } + } + } else { + if (bottomEdge - rows[i].getElement().offsetTop >= 0) { + bottomRow = i; + } else { + break; + } + } + } + } + } else { + topRow = this.vDomTop; + bottomRow = this.vDomBottom; + } + + return rows.slice(topRow, bottomRow + 1); +}; + +//repeat action accross display rows +RowManager.prototype.displayRowIterator = function (callback) { + this.displayRows.forEach(callback); + + this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; +}; + +//return only actual rows (not group headers etc) +RowManager.prototype.getRows = function (active) { + var rows; + + switch (active) { + case "active": + rows = this.activeRows; + break; + + case "display": + rows = this.table.rowManager.getDisplayRows(); + break; + + case "visible": + rows = this.getVisibleRows(true); + break; + + case "selected": + rows = this.table.modules.selectRow.selectedRows; + break; + + default: + rows = this.rows; + } + + return rows; +}; + +///////////////// Table Rendering ///////////////// + +//trigger rerender of table in current position +RowManager.prototype.reRenderInPosition = function (callback) { + if (this.getRenderMode() == "virtual") { + + if (this.redrawBlock) { + if (callback) { + callback(); + } else { + this.redrawBlockRederInPosition = true; + } + } else { + var scrollTop = this.element.scrollTop; + var topRow = false; + var topOffset = false; + + var left = this.scrollLeft; + + var rows = this.getDisplayRows(); + + for (var i = this.vDomTop; i <= this.vDomBottom; i++) { + + if (rows[i]) { + var diff = scrollTop - rows[i].getElement().offsetTop; + + if (topOffset === false || Math.abs(diff) < topOffset) { + topOffset = diff; + topRow = i; + } else { + break; + } + } + } + + if (callback) { + callback(); + } + + this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); + + this.scrollHorizontal(left); + } + } else { + this.renderTable(); + + if (callback) { + callback(); + } + } +}; + +RowManager.prototype.setRenderMode = function () { + + if (this.table.options.virtualDom) { + + this.renderMode = "virtual"; + + if (this.table.element.clientHeight || this.table.options.height) { + this.fixedHeight = true; + } else { + this.fixedHeight = false; + } + } else { + this.renderMode = "classic"; + } +}; + +RowManager.prototype.getRenderMode = function () { + return this.renderMode; +}; + +RowManager.prototype.renderTable = function () { + + this.table.options.renderStarted.call(this.table); + + this.element.scrollTop = 0; + + switch (this.renderMode) { + case "classic": + this._simpleRender(); + break; + + case "virtual": + this._virtualRenderFill(); + break; + } + + if (this.firstRender) { + if (this.displayRowsCount) { + this.firstRender = false; + this.table.modules.layout.layout(); + } else { + this.renderEmptyScroll(); + } + } + + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layout(); + } + + if (!this.displayRowsCount) { + if (this.table.options.placeholder) { + + this.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); + + this.getElement().appendChild(this.table.options.placeholder); + this.table.options.placeholder.style.width = this.table.columnManager.getWidth() + "px"; + } + } + + this.table.options.renderComplete.call(this.table); +}; + +//simple render on heightless table +RowManager.prototype._simpleRender = function () { + this._clearVirtualDom(); + + if (this.displayRowsCount) { + this.checkClassicModeGroupHeaderWidth(); + } else { + this.renderEmptyScroll(); + } +}; + +RowManager.prototype.checkClassicModeGroupHeaderWidth = function () { + var self = this, + element = this.tableElement, + onlyGroupHeaders = true; + + self.getDisplayRows().forEach(function (row, index) { + self.styleRow(row, index); + element.appendChild(row.getElement()); + row.initialize(true); + + if (row.type !== "group") { + onlyGroupHeaders = false; + } + }); + + if (onlyGroupHeaders) { + element.style.minWidth = self.table.columnManager.getWidth() + "px"; + } else { + element.style.minWidth = ""; + } +}; + +//show scrollbars on empty table div +RowManager.prototype.renderEmptyScroll = function () { + if (this.table.options.placeholder) { + this.tableElement.style.display = "none"; + } else { + this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; + // this.tableElement.style.minHeight = "1px"; + // this.tableElement.style.visibility = "hidden"; + } +}; + +RowManager.prototype._clearVirtualDom = function () { + var element = this.tableElement; + + if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { + this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); + } + + // element.children.detach(); + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.style.paddingTop = ""; + element.style.paddingBottom = ""; + element.style.minWidth = ""; + element.style.minHeight = ""; + element.style.display = ""; + element.style.visibility = ""; + + this.scrollTop = 0; + this.scrollLeft = 0; + this.vDomTop = 0; + this.vDomBottom = 0; + this.vDomTopPad = 0; + this.vDomBottomPad = 0; +}; + +RowManager.prototype.styleRow = function (row, index) { + var rowEl = row.getElement(); + + if (index % 2) { + rowEl.classList.add("tabulator-row-even"); + rowEl.classList.remove("tabulator-row-odd"); + } else { + rowEl.classList.add("tabulator-row-odd"); + rowEl.classList.remove("tabulator-row-even"); + } +}; + +//full virtual render +RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { + var self = this, + element = self.tableElement, + holder = self.element, + topPad = 0, + rowsHeight = 0, + topPadHeight = 0, + i = 0, + onlyGroupHeaders = true, + rows = self.getDisplayRows(); + + position = position || 0; + + offset = offset || 0; + + if (!position) { + self._clearVirtualDom(); + } else { + while (element.firstChild) { + element.removeChild(element.firstChild); + } //check if position is too close to bottom of table + var heightOccupied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; + + if (heightOccupied < self.height) { + position -= Math.ceil((self.height - heightOccupied) / self.vDomRowHeight); + + if (position < 0) { + position = 0; + } + } + + //calculate initial pad + topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); + position -= topPad; + } + + if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { + + self.vDomTop = position; + + self.vDomBottom = position - 1; + + while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { + var index = self.vDomBottom + 1, + row = rows[index], + rowHeight = 0; + + self.styleRow(row, index); + + element.appendChild(row.getElement()); + + row.initialize(); + + if (!row.heightInitialized) { + row.normalizeHeight(true); + } + + // if(!row.initialized){ + // row.initialize(true); + // }else{ + // if(!row.heightInitialized){ + // row.normalizeHeight(true); + // } + // } + + rowHeight = row.getHeight(); + + if (i < topPad) { + topPadHeight += rowHeight; + } else { + rowsHeight += rowHeight; + } + + if (rowHeight > this.vDomWindowBuffer) { + this.vDomWindowBuffer = rowHeight * 2; + } + + if (row.type !== "group") { + onlyGroupHeaders = false; + } + + self.vDomBottom++; + i++; + } + + if (!position) { + this.vDomTopPad = 0; + //adjust rowheight to match average of rendered elements + self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); + self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); + + self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; + } else { + self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; + self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); + } + + element.style.paddingTop = self.vDomTopPad + "px"; + element.style.paddingBottom = self.vDomBottomPad + "px"; + + if (forceMove) { + this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); + } + + this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); + + //adjust for horizontal scrollbar if present (and not at top of table) + if (this.element.scrollWidth > this.element.offsetWidth && forceMove) { + this.scrollTop += this.element.offsetHeight - this.element.clientHeight; + } + + this.vDomScrollPosTop = this.scrollTop; + this.vDomScrollPosBottom = this.scrollTop; + + holder.scrollTop = this.scrollTop; + + element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; + + if (self.table.options.groupBy) { + if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { + self.tableElement.style.minWidth = self.table.columnManager.getWidth(); + } + } + } else { + this.renderEmptyScroll(); + } + + if (!this.fixedHeight) { + this.adjustTableSize(); + } +}; + +//handle vertical scrolling +RowManager.prototype.scrollVertical = function (dir) { + var topDiff = this.scrollTop - this.vDomScrollPosTop; + var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + var margin = this.vDomWindowBuffer * 2; + + if (-topDiff > margin || bottomDiff > margin) { + //if big scroll redraw table; + var left = this.scrollLeft; + this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); + this.scrollHorizontal(left); + } else { + + if (dir) { + //scrolling up + if (topDiff < 0) { + + this._addTopRow(-topDiff); + } + + if (bottomDiff < 0) { + + //hide bottom row if needed + if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { + this._removeBottomRow(-bottomDiff); + } else { + this.vDomScrollPosBottom = this.scrollTop; + } + } + } else { + //scrolling down + if (topDiff >= 0) { + + //hide top row if needed + if (this.scrollTop > this.vDomWindowBuffer) { + + this._removeTopRow(topDiff); + } else { + this.vDomScrollPosTop = this.scrollTop; + } + } + + if (bottomDiff >= 0) { + + this._addBottomRow(bottomDiff); + } + } + } +}; + +RowManager.prototype._addTopRow = function (topDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomTop) { + var index = this.vDomTop - 1, + topRow = rows[index], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + //hide top row if needed + if (topDiff >= topRowHeight) { + this.styleRow(topRow, index); + table.insertBefore(topRow.getElement(), table.firstChild); + if (!topRow.initialized || !topRow.heightInitialized) { + this.vDomTopNewRows.push(topRow); + + if (!topRow.heightInitialized) { + topRow.clearCellHeight(); + } + } + topRow.initialize(); + + this.vDomTopPad -= topRowHeight; + + if (this.vDomTopPad < 0) { + this.vDomTopPad = index * this.vDomRowHeight; + } + + if (!index) { + this.vDomTopPad = 0; + } + + table.style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop -= topRowHeight; + this.vDomTop--; + } + + topDiff = -(this.scrollTop - this.vDomScrollPosTop); + + if (topRow.getHeight() > this.vDomWindowBuffer) { + this.vDomWindowBuffer = topRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { + this._addTopRow(topDiff, i + 1); + } else { + this._quickNormalizeRowHeight(this.vDomTopNewRows); + } + } +}; + +RowManager.prototype._removeTopRow = function (topDiff) { + var table = this.tableElement, + topRow = this.getDisplayRows()[this.vDomTop], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + if (topDiff >= topRowHeight) { + + var rowEl = topRow.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.vDomTopPad += topRowHeight; + table.style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; + this.vDomTop++; + + topDiff = this.scrollTop - this.vDomScrollPosTop; + + this._removeTopRow(topDiff); + } +}; + +RowManager.prototype._addBottomRow = function (bottomDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + var table = this.tableElement, + rows = this.getDisplayRows(); + + if (this.vDomBottom < this.displayRowsCount - 1) { + var index = this.vDomBottom + 1, + bottomRow = rows[index], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + //hide bottom row if needed + if (bottomDiff >= bottomRowHeight) { + this.styleRow(bottomRow, index); + table.appendChild(bottomRow.getElement()); + + if (!bottomRow.initialized || !bottomRow.heightInitialized) { + this.vDomBottomNewRows.push(bottomRow); + + if (!bottomRow.heightInitialized) { + bottomRow.clearCellHeight(); + } + } + + bottomRow.initialize(); + + this.vDomBottomPad -= bottomRowHeight; + + if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom += bottomRowHeight; + this.vDomBottom++; + } + + bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + if (bottomRow.getHeight() > this.vDomWindowBuffer) { + this.vDomWindowBuffer = bottomRow.getHeight() * 2; + } + + if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { + this._addBottomRow(bottomDiff, i + 1); + } else { + this._quickNormalizeRowHeight(this.vDomBottomNewRows); + } + } +}; + +RowManager.prototype._removeBottomRow = function (bottomDiff) { + var table = this.tableElement, + bottomRow = this.getDisplayRows()[this.vDomBottom], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + if (bottomDiff >= bottomRowHeight) { + + var rowEl = bottomRow.getElement(); + + if (rowEl.parentNode) { + rowEl.parentNode.removeChild(rowEl); + } + + this.vDomBottomPad += bottomRowHeight; + + if (this.vDomBottomPad < 0) { + this.vDomBottomPad = 0; + } + + table.style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom -= bottomRowHeight; + this.vDomBottom--; + + bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); + + this._removeBottomRow(bottomDiff); + } +}; + +RowManager.prototype._quickNormalizeRowHeight = function (rows) { + rows.forEach(function (row) { + row.calcHeight(); + }); + + rows.forEach(function (row) { + row.setCellHeight(); + }); + + rows.length = 0; +}; + +//normalize height of active rows +RowManager.prototype.normalizeHeight = function () { + this.activeRows.forEach(function (row) { + row.normalizeHeight(); + }); +}; + +//adjust the height of the table holder to fit in the Tabulator element +RowManager.prototype.adjustTableSize = function () { + var initialHeight = this.element.clientHeight, + modExists; + + if (this.renderMode === "virtual") { + var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0)); + + if (this.fixedHeight) { + this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; + this.element.style.height = "calc(100% - " + otherHeight + "px)"; + this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; + } else { + this.element.style.height = ""; + this.element.style.height = this.table.element.clientHeight - otherHeight + "px"; + this.element.scrollTop = this.scrollTop; + } + + this.height = this.element.clientHeight; + this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; + + //check if the table has changed size when dealing with variable height tables + if (!this.fixedHeight && initialHeight != this.element.clientHeight) { + modExists = this.table.modExists("resizeTable"); + + if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) { + this.redraw(); + } + } + } +}; + +//renitialize all rows +RowManager.prototype.reinitialize = function () { + this.rows.forEach(function (row) { + row.reinitialize(true); + }); +}; + +//prevent table from being redrawn +RowManager.prototype.blockRedraw = function () { + this.redrawBlock = true; + this.redrawBlockRestoreConfig = false; +}; + +//restore table redrawing +RowManager.prototype.restoreRedraw = function () { + this.redrawBlock = false; + + if (this.redrawBlockRestoreConfig) { + this.refreshActiveData(this.redrawBlockRestoreConfig.stage, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition); + + this.redrawBlockRestoreConfig = false; + } else { + if (this.redrawBlockRederInPosition) { + this.reRenderInPosition(); + } + } + + this.redrawBlockRederInPosition = false; +}; + +//redraw table +RowManager.prototype.redraw = function (force) { + var pos = 0, + left = this.scrollLeft; + + this.adjustTableSize(); + + this.table.tableWidth = this.table.element.clientWidth; + + if (!force) { + if (this.renderMode == "classic") { + + if (this.table.options.groupBy) { + this.refreshActiveData("group", false, false); + } else { + this._simpleRender(); + } + } else { + this.reRenderInPosition(); + this.scrollHorizontal(left); + } + + if (!this.displayRowsCount) { + if (this.table.options.placeholder) { + this.getElement().appendChild(this.table.options.placeholder); + } + } + } else { + this.renderTable(); + } +}; + +RowManager.prototype.resetScroll = function () { + this.element.scrollLeft = 0; + this.element.scrollTop = 0; + + if (this.table.browser === "ie") { + var event = document.createEvent("Event"); + event.initEvent("scroll", false, true); + this.element.dispatchEvent(event); + } else { + this.element.dispatchEvent(new Event('scroll')); + } +}; + +var VDomHoz = function VDomHoz(table) { + this.table = table; + + this.element = this.table.rowManager.tableElement; + this.holderEl = this.table.rowManager.element; + + this.leftCol = 0; + this.rightCol = 0; + this.scrollLeft = 0; + + this.vDomScrollPosLeft = 0; + this.vDomScrollPosRight = 0; + + this.vDomPadLeft = 0; + this.vDomPadRight = 0; + + this.fitDataColAvg = 0; + + this.window = 200; //pixel margin to make column visible before it is shown on screen + + this.initialized = false; + + this.columns = []; + + if (this.compatabilityCheck()) { + this.initialize(); + } +}; + +VDomHoz.prototype.compatabilityCheck = function () { + var options = this.table.options, + frozen = false, + ok = true; + + if (options.layout == "fitDataTable") { + console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); + ok = false; + } + + if (options.responsiveLayout) { + console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); + ok = false; + } + + if (this.table.rtl) { + console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); + ok = false; + } + + // if(options.rowFormatter){ + // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); + // ok = false; + // } + + if (options.columns) { + frozen = options.columns.find(function (col) { + return col.frozen; + }); + + if (frozen) { + console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); + ok = false; + } + } + + if (!ok) { + options.virtualDomHoz = false; + } + + return ok; +}; + +VDomHoz.prototype.initialize = function () { + var _this17 = this; + + this.holderEl.addEventListener("scroll", function () { + var left = _this17.holderEl.scrollLeft; + + if (_this17.scrollLeft != left) { + _this17.scrollLeft = left; + _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); + } + }); +}; + +VDomHoz.prototype.deinitialize = function () { + this.initialized = false; +}; + +VDomHoz.prototype.clear = function () { + this.columns = []; + + this.leftCol = -1; + this.rightCol = 0; + + this.vDomScrollPosLeft = 0; + this.vDomScrollPosRight = 0; + this.vDomPadLeft = 0; + this.vDomPadRight = 0; +}; + +VDomHoz.prototype.dataChange = function () { + var change = false, + collsWidth = 0, + colEnd = 0, + group, + row, + rowEl; + + if (this.table.options.layout === "fitData") { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (!column.definition.width && column.visible) { + change = true; + } + }); + + if (change) { + if (change && this.table.rowManager.getDisplayRows().length) { + // this.table.vdomHoz.deinitialize(); + + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + if (this.table.options.groupBy) { + group = this.table.modules.groupRows.getGroups(false)[0]; + + row = group.getRows(false)[0]; + } else { + row = this.table.rowManager.getDisplayRows()[0]; + } + + if (row) { + + rowEl = row.getElement(); + + row.generateCells(); + + this.element.appendChild(rowEl); + + for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { + var cell = row.cells[colEnd]; + rowEl.appendChild(cell.getElement()); + + cell.column.reinitializeWidth(); + + collsWidth += cell.column.getWidth(); + + if (collsWidth > this.vDomScrollPosRight) { + break; + } + } + + rowEl.parentNode.removeChild(rowEl); + + this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); + + for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { + this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); + } + + this.reinitialize(false, true); + } + } + } + } else { + if (this.table.options.layout === "fitColumns") { + this.table.modules.layout.layout(); + this.table.vdomHoz.reinitialize(false, true); + } + } +}; + +VDomHoz.prototype.fitDataLayoutOverride = function () { + for (var i = this.leftCol; i <= this.rightCol; i++) { + this.columns[i].reinitializeWidth(); + } +}; + +VDomHoz.prototype.reinitialize = function (update, blockRedraw) { + var _this18 = this; + + var old = { + cols: this.columns, + leftCol: this.leftCol, + rightCol: this.rightCol + }; + + if (update && !this.initialized) { + return; + } + + this.clear(); + + this.scrollLeft = this.holderEl.scrollLeft; + + this.vDomScrollPosLeft = this.scrollLeft - this.window; + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; + + var colPos = 0; + + this.table.columnManager.columnsByIndex.forEach(function (column) { + var config = {}; + + if (column.visible) { + var width = column.getWidth(); + + config.leftPos = colPos; + config.rightPos = colPos + width; + + if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { + //column is visible + + if (_this18.leftCol == -1) { + _this18.leftCol = _this18.columns.length; + _this18.vDomPadLeft = colPos; + } + + _this18.rightCol = _this18.columns.length; + } else { + // column is hidden + if (_this18.leftCol !== -1) { + _this18.vDomPadRight += width; + } + } + + _this18.columns.push(column); + + column.modules.vdomHoz = config; + + colPos += width; + } + }); + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.initialized = true; + + if (!blockRedraw) { + if (!update || this.reinitChanged(old)) { + this.renitializeRows(); + } + } + + this.holderEl.scrollLeft = this.scrollLeft; +}; + +VDomHoz.prototype.reinitChanged = function (old) { + var _this19 = this; + + var match = true; + + if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { + return true; + } + + old.cols.forEach(function (col, i) { + if (col !== _this19.columns[i]) { + match = false; + } + }); + + return !match; +}; + +VDomHoz.prototype.renitializeRows = function () { + var _this20 = this; + + var rows = this.table.rowManager.getVisibleRows(); + rows.forEach(function (row) { + _this20.reinitializeRow(row, true); + }); +}; + +VDomHoz.prototype.scroll = function (diff) { + this.vDomScrollPosLeft += diff; + this.vDomScrollPosRight += diff; + + if (diff > this.holderEl.clientWidth * .8) { + this.reinitialize(); + } else { + if (diff > 0) { + //scroll right + this.addColRight(); + this.removeColLeft(); + } else { + //scroll left + this.addColLeft(); + this.removeColRight(); + } + } +}; + +VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { + for (var i = start; i < end; i++) { + var column = this.columns[i]; + + column.modules.vdomHoz.leftPos -= diff; + column.modules.vdomHoz.rightPos -= diff; + } +}; + +VDomHoz.prototype.addColRight = function () { + var column = this.columns[this.rightCol + 1], + rows, + oldWidth, + widthDiff; + + if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().appendChild(cell.getElement()); + cell.cellRendered(); + } + }); + + if (this.fitDataColAvg) { + + oldWidth = column.getWidth(); + + if (oldWidth === this.fitDataColAvg) { + column.reinitializeWidth(); + + widthDiff = oldWidth - column.getWidth(); + + if (widthDiff) { + column.modules.vdomHoz.rightPos -= widthDiff; + this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); + } + } + } + + this.rightCol++; + + if (this.rightCol >= this.columns.length - 1) { + this.vDomPadRight = 0; + } else { + this.vDomPadRight -= column.getWidth(); + } + + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.addColRight(); + } +}; + +VDomHoz.prototype.addColLeft = function () { + var column = this.columns[this.leftCol - 1], + rows; + + if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { + var rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().prepend(cell.getElement()); + cell.cellRendered(); + } + }); + + if (!this.leftCol) { + this.vDomPadLeft = 0; + } else { + this.vDomPadLeft -= column.getWidth(); + } + + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol--; + + this.addColLeft(); + } +}; + +VDomHoz.prototype.removeColRight = function (column) { + var column = this.columns[this.rightCol], + rows; + + if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { + rows = this.table.rowManager.getVisibleRows(); + + column.modules.vdomHoz.visible = false; + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadRight += column.getWidth(); + this.element.style.paddingRight = this.vDomPadRight + "px"; + + this.rightCol--; + + this.removeColRight(); + } +}; + +VDomHoz.prototype.removeColLeft = function () { + var column = this.columns[this.leftCol], + rows; + + if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { + + rows = this.table.rowManager.getVisibleRows(); + + rows.forEach(function (row) { + if (row.type !== "group") { + var cell = row.getCell(column); + row.getElement().removeChild(cell.getElement()); + } + }); + + this.vDomPadLeft += column.getWidth(); + this.element.style.paddingLeft = this.vDomPadLeft + "px"; + + this.leftCol++; + + this.removeColLeft(); + } +}; + +VDomHoz.prototype.initializeRow = function (row) { + if (row.type !== "group") { + row.modules.vdomHoz = { + leftCol: this.leftCol, + rightCol: this.rightCol + }; + + for (var i = this.leftCol; i <= this.rightCol; i++) { + var column = this.columns[i]; + + if (column.visible) { + var cell = row.getCell(column); + + row.getElement().appendChild(cell.getElement()); + cell.cellRendered(); + } + } + } +}; + +VDomHoz.prototype.reinitializeRow = function (row, force) { + if (row.type !== "group") { + if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { + var rowEl = row.getElement(); + while (rowEl.firstChild) { + rowEl.removeChild(rowEl.firstChild); + }this.initializeRow(row); + } + } +}; +//public row object +var RowComponent = function RowComponent(row) { + this._row = row; +}; + +RowComponent.prototype.getData = function (transform) { + return this._row.getData(transform); +}; + +RowComponent.prototype.getElement = function () { + return this._row.getElement(); +}; + +RowComponent.prototype.getCells = function () { + var cells = []; + + this._row.getCells().forEach(function (cell) { + cells.push(cell.getComponent()); + }); + + return cells; +}; + +RowComponent.prototype.getCell = function (column) { + var cell = this._row.getCell(column); + return cell ? cell.getComponent() : false; +}; + +RowComponent.prototype.getIndex = function () { + return this._row.getData("data")[this._row.table.options.index]; +}; + +RowComponent.prototype.getPosition = function (active) { + return this._row.table.rowManager.getRowPosition(this._row, active); +}; + +RowComponent.prototype.delete = function () { + return this._row.delete(); +}; + +RowComponent.prototype.scrollTo = function () { + return this._row.table.rowManager.scrollToRow(this._row); +}; + +RowComponent.prototype.pageTo = function () { + if (this._row.table.modExists("page", true)) { + return this._row.table.modules.page.setPageToRow(this._row); + } +}; + +RowComponent.prototype.move = function (to, after) { + this._row.moveToRow(to, after); +}; + +RowComponent.prototype.update = function (data) { + return this._row.updateData(data); +}; + +RowComponent.prototype.normalizeHeight = function () { + this._row.normalizeHeight(true); +}; + +RowComponent.prototype.select = function () { + this._row.table.modules.selectRow.selectRows(this._row); +}; + +RowComponent.prototype.deselect = function () { + this._row.table.modules.selectRow.deselectRows(this._row); +}; + +RowComponent.prototype.toggleSelect = function () { + this._row.table.modules.selectRow.toggleRow(this._row); +}; + +RowComponent.prototype.isSelected = function () { + return this._row.table.modules.selectRow.isRowSelected(this._row); +}; + +RowComponent.prototype._getSelf = function () { + return this._row; +}; + +RowComponent.prototype.validate = function () { + return this._row.validate(); +}; + +RowComponent.prototype.freeze = function () { + if (this._row.table.modExists("frozenRows", true)) { + this._row.table.modules.frozenRows.freezeRow(this._row); + } +}; + +RowComponent.prototype.unfreeze = function () { + if (this._row.table.modExists("frozenRows", true)) { + this._row.table.modules.frozenRows.unfreezeRow(this._row); + } +}; + +RowComponent.prototype.isFrozen = function () { + if (this._row.table.modExists("frozenRows", true)) { + var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); + return index > -1; + } + + return false; +}; + +RowComponent.prototype.treeCollapse = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.collapseRow(this._row); + } +}; + +RowComponent.prototype.treeExpand = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.expandRow(this._row); + } +}; + +RowComponent.prototype.treeToggle = function () { + if (this._row.table.modExists("dataTree", true)) { + this._row.table.modules.dataTree.toggleRow(this._row); + } +}; + +RowComponent.prototype.getTreeParent = function () { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.getTreeParent(this._row); + } + + return false; +}; + +RowComponent.prototype.getTreeChildren = function () { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.getTreeChildren(this._row, true); + } + + return false; +}; + +RowComponent.prototype.addTreeChild = function (data, pos, index) { + if (this._row.table.modExists("dataTree", true)) { + return this._row.table.modules.dataTree.addTreeChildRow(this._row, data, pos, index); + } + + return false; +}; + +RowComponent.prototype.reformat = function () { + return this._row.reinitialize(); +}; + +RowComponent.prototype.getGroup = function () { + return this._row.getGroup().getComponent(); +}; + +RowComponent.prototype.getTable = function () { + return this._row.table; +}; + +RowComponent.prototype.getNextRow = function () { + var row = this._row.nextRow(); + return row ? row.getComponent() : row; +}; + +RowComponent.prototype.getPrevRow = function () { + var row = this._row.prevRow(); + return row ? row.getComponent() : row; +}; + +var Row = function Row(data, parent) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "row"; + + this.table = parent.table; + this.parent = parent; + this.data = {}; + this.type = type; //type of element + this.element = false; + this.modules = {}; //hold module variables; + this.cells = []; + this.height = 0; //hold element height + this.heightStyled = ""; //hold element height prestyled to improve render efficiency + this.manualHeight = false; //user has manually set row height + this.outerHeight = 0; //holde lements outer height + this.initialized = false; //element has been rendered + this.heightInitialized = false; //element has resized cells to fit + + this.component = null; + + this.created = false; + + this.setData(data); +}; + +Row.prototype.create = function () { + if (!this.created) { + this.created = true; + this.generateElement(); + } +}; + +Row.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + el.setAttribute("role", "row"); + + this.element = el; +}; + +Row.prototype.getElement = function () { + this.create(); + return this.element; +}; + +Row.prototype.detachElement = function () { + if (this.element && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } +}; + +Row.prototype.generateElement = function () { + var self = this, + dblTap, + tapHold, + tap; + + this.createElement(); + + //set row selection characteristics + if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { + self.table.modules.selectRow.initializeRow(this); + } + + //setup movable rows + if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + self.table.modules.moveRow.initializeRow(this); + } + + //setup data tree + if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { + self.table.modules.dataTree.initializeRow(this); + } + + //setup column colapse container + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { + self.table.modules.responsiveLayout.initializeRow(this); + } + + //set column menu + if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { + self.table.modules.menu.initializeRow(this); + } + + //handle row click events + if (self.table.options.rowClick) { + self.element.addEventListener("click", function (e) { + self.table.options.rowClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.table.options.rowDblClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowContext) { + self.element.addEventListener("contextmenu", function (e) { + self.table.options.rowContext(e, self.getComponent()); + }); + } + + //handle mouse events + if (self.table.options.rowMouseEnter) { + self.element.addEventListener("mouseenter", function (e) { + self.table.options.rowMouseEnter(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseLeave) { + self.element.addEventListener("mouseleave", function (e) { + self.table.options.rowMouseLeave(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOver) { + self.element.addEventListener("mouseover", function (e) { + self.table.options.rowMouseOver(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseOut) { + self.element.addEventListener("mouseout", function (e) { + self.table.options.rowMouseOut(e, self.getComponent()); + }); + } + + if (self.table.options.rowMouseMove) { + self.element.addEventListener("mousemove", function (e) { + self.table.options.rowMouseMove(e, self.getComponent()); + }); + } + + if (self.table.options.rowTap) { + + tap = false; + + self.element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + if (tap) { + self.table.options.rowTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.table.options.rowDblTap) { + + dblTap = null; + + self.element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + self.table.options.rowDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (self.table.options.rowTapHold) { + + tapHold = null; + + self.element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.table.options.rowTapHold(e, self.getComponent()); + }, 1000); + }, { passive: true }); + + self.element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } +}; + +Row.prototype.generateCells = function () { + this.cells = this.table.columnManager.generateCells(this); +}; + +//functions to setup on first render +Row.prototype.initialize = function (force) { + var _this21 = this; + + this.create(); + + if (!this.initialized || force) { + + this.deleteCells(); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + } //handle frozen cells + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { + this.table.vdomHoz.initializeRow(this); + } else { + this.cells.forEach(function (cell) { + _this21.element.appendChild(cell.getElement()); + cell.cellRendered(); + }); + } + + if (force) { + this.normalizeHeight(); + } + + //setup movable rows + if (this.table.options.dataTree && this.table.modExists("dataTree")) { + this.table.modules.dataTree.layoutRow(this); + } + + //setup column colapse container + if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { + this.table.modules.responsiveLayout.layoutRow(this); + } + + if (this.table.options.rowFormatter) { + this.table.options.rowFormatter(this.getComponent()); + } + + //set resizable handles + if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { + this.table.modules.resizeRows.initializeRow(this); + } + + this.initialized = true; + } else { + if (this.table.options.virtualDomHoz) { + this.table.vdomHoz.reinitializeRow(this); + } + } +}; + +Row.prototype.reinitializeHeight = function () { + this.heightInitialized = false; + + if (this.element && this.element.offsetParent !== null) { + this.normalizeHeight(true); + } +}; + +Row.prototype.reinitialize = function (children) { + this.initialized = false; + this.heightInitialized = false; + + if (!this.manualHeight) { + this.height = 0; + this.heightStyled = ""; + } + + if (this.element && this.element.offsetParent !== null) { + this.initialize(true); + } + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { + child.reinitialize(true); + }); + } +}; + +//get heights when doing bulk row style calcs in virtual DOM +Row.prototype.calcHeight = function (force) { + + var maxHeight = 0, + minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; + + this.cells.forEach(function (cell) { + var height = cell.getHeight(); + if (height > maxHeight) { + maxHeight = height; + } + }); + + if (force) { + this.height = Math.max(maxHeight, minHeight); + } else { + this.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight); + } + + this.heightStyled = this.height ? this.height + "px" : ""; + this.outerHeight = this.element.offsetHeight; +}; + +//set of cells +Row.prototype.setCellHeight = function () { + this.cells.forEach(function (cell) { + cell.setHeight(); + }); + + this.heightInitialized = true; +}; + +Row.prototype.clearCellHeight = function () { + this.cells.forEach(function (cell) { + cell.clearHeight(); + }); +}; + +//normalize the height of elements in the row +Row.prototype.normalizeHeight = function (force) { + + if (force) { + this.clearCellHeight(); + } + + this.calcHeight(force); + + this.setCellHeight(); +}; + +// Row.prototype.setHeight = function(height){ +// this.height = height; + +// this.setCellHeight(); +// }; + +//set height of rows +Row.prototype.setHeight = function (height, force) { + if (this.height != height || force) { + + this.manualHeight = true; + + this.height = height; + this.heightStyled = height ? height + "px" : ""; + + this.setCellHeight(); + + // this.outerHeight = this.element.outerHeight(); + this.outerHeight = this.element.offsetHeight; + } +}; + +//return rows outer height +Row.prototype.getHeight = function () { + return this.outerHeight; +}; + +//return rows outer Width +Row.prototype.getWidth = function () { + return this.element.offsetWidth; +}; + +//////////////// Cell Management ///////////////// + +Row.prototype.deleteCell = function (cell) { + var index = this.cells.indexOf(cell); + + if (index > -1) { + this.cells.splice(index, 1); + } +}; + +//////////////// Data Management ///////////////// + +Row.prototype.setData = function (data) { + if (this.table.modExists("mutator")) { + data = this.table.modules.mutator.transformRow(data, "data"); + } + + this.data = data; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { + this.table.modules.reactiveData.watchRow(this); + } +}; + +//update the rows data +Row.prototype.updateData = function (updatedData) { + var _this22 = this; + + var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element), + tempData = {}, + newRowData; + + return new Promise(function (resolve, reject) { + + if (typeof updatedData === "string") { + updatedData = JSON.parse(updatedData); + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + _this22.table.modules.reactiveData.block(); + } + + //mutate incomming data if needed + if (_this22.table.modExists("mutator")) { + + tempData = Object.assign(tempData, _this22.data); + tempData = Object.assign(tempData, updatedData); + + newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); + } else { + newRowData = updatedData; + } + + //set data + for (var attrname in newRowData) { + _this22.data[attrname] = newRowData[attrname]; + } + + if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + _this22.table.modules.reactiveData.unblock(); + } + + //update affected cells only + for (var attrname in updatedData) { + + var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); + + columns.forEach(function (column) { + var cell = _this22.getCell(column.getField()); + + if (cell) { + var value = column.getFieldValue(newRowData); + if (cell.getValue() != value) { + cell.setValueProcessData(value); + + if (visible) { + cell.cellRendered(); + } + } + } + }); + } + + if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { + _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); + } + + //Partial reinitialization if visible + if (visible) { + _this22.normalizeHeight(true); + + if (_this22.table.options.rowFormatter) { + _this22.table.options.rowFormatter(_this22.getComponent()); + } + } else { + _this22.initialized = false; + _this22.height = 0; + _this22.heightStyled = ""; + } + + if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { + _this22.table.modules.dataTree.initializeRow(_this22); + + if (visible) { + _this22.table.modules.dataTree.layoutRow(_this22); + _this22.table.rowManager.refreshActiveData("tree", false, true); + } + } + + //this.reinitialize(); + + _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); + + if (_this22.table.options.dataChanged) { + _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); + } + + resolve(); + }); +}; + +Row.prototype.getData = function (transform) { + if (transform) { + if (this.table.modExists("accessor")) { + return this.table.modules.accessor.transformRow(this, transform); + } + } + + return this.data; +}; + +Row.prototype.getCell = function (column) { + var match = false; + + column = this.table.columnManager.findColumn(column); + + match = this.cells.find(function (cell) { + return cell.column === column; + }); + + return match; +}; + +Row.prototype.getCellIndex = function (findCell) { + return this.cells.findIndex(function (cell) { + return cell === findCell; + }); +}; + +Row.prototype.findNextEditableCell = function (index) { + var nextCell = false; + + if (index < this.cells.length - 1) { + for (var i = index + 1; i < this.cells.length; i++) { + var cell = this.cells[i]; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + var allowEdit = true; + + if (typeof cell.column.modules.edit.check == "function") { + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + nextCell = cell; + break; + } + } + } + } + + return nextCell; +}; + +Row.prototype.findPrevEditableCell = function (index) { + var prevCell = false; + + if (index > 0) { + for (var i = index - 1; i >= 0; i--) { + var cell = this.cells[i], + allowEdit = true; + + if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { + if (typeof cell.column.modules.edit.check == "function") { + allowEdit = cell.column.modules.edit.check(cell.getComponent()); + } + + if (allowEdit) { + prevCell = cell; + break; + } + } + } + } + + return prevCell; +}; + +Row.prototype.getCells = function () { + return this.cells; +}; + +Row.prototype.nextRow = function () { + var row = this.table.rowManager.nextDisplayRow(this, true); + return row || false; +}; + +Row.prototype.prevRow = function () { + var row = this.table.rowManager.prevDisplayRow(this, true); + return row || false; +}; + +Row.prototype.moveToRow = function (to, before) { + var toRow = this.table.rowManager.findRow(to); + + if (toRow) { + this.table.rowManager.moveRowActual(this, toRow, !before); + this.table.rowManager.refreshActiveData("display", false, true); + } else { + console.warn("Move Error - No matching row found:", to); + } +}; + +Row.prototype.validate = function () { + var invalid = []; + + this.cells.forEach(function (cell) { + if (!cell.validate()) { + invalid.push(cell.getComponent()); + } + }); + + return invalid.length ? invalid : true; +}; + +///////////////////// Actions ///////////////////// + +Row.prototype.delete = function () { + var _this23 = this; + + return new Promise(function (resolve, reject) { + var index, rows; + + if (_this23.table.options.history && _this23.table.modExists("history")) { + + if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { + rows = _this23.getGroup().rows; + index = rows.indexOf(_this23); + + if (index) { + index = rows[index - 1]; + } + } else { + index = _this23.table.rowManager.getRowIndex(_this23); + + if (index) { + index = _this23.table.rowManager.rows[index - 1]; + } + } + + _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); + } + + _this23.deleteActual(); + + resolve(); + }); +}; + +Row.prototype.deleteActual = function (blockRedraw) { + var index = this.table.rowManager.getRowIndex(this); + + this.detatchModules(); + + // if(this.table.options.dataTree && this.table.modExists("dataTree")){ + // this.table.modules.dataTree.collapseRow(this, true); + // } + + //remove any reactive data watchers from row object + if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) {} + // this.table.modules.reactiveData.unwatchRow(this); + + + //remove from group + if (this.modules.group) { + this.modules.group.removeRow(this); + } + + this.table.rowManager.deleteRow(this, blockRedraw); + + this.deleteCells(); + + this.initialized = false; + this.heightInitialized = false; + this.element = false; + + if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { + this.table.modules.dataTree.rowDelete(this); + } + + //recalc column calculations if present + if (this.table.modExists("columnCalcs")) { + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.columnCalcs.recalcRowGroup(this); + } else { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } +}; + +Row.prototype.detatchModules = function () { + //deselect row if it is selected + if (this.table.modExists("selectRow")) { + this.table.modules.selectRow._deselectRow(this, true); + } + + //cancel edit if row is currently being edited + if (this.table.modExists("edit")) { + if (this.table.modules.edit.currentCell.row === this) { + this.table.modules.edit.cancelEdit(); + } + } + + if (this.table.modExists("frozenRows")) { + this.table.modules.frozenRows.detachRow(this); + } +}; + +Row.prototype.deleteCells = function () { + var cellCount = this.cells.length; + + for (var i = 0; i < cellCount; i++) { + this.cells[0].delete(); + } +}; + +Row.prototype.wipe = function () { + this.detatchModules(); + this.deleteCells(); + + if (this.element) { + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }if (this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } + } + + this.element = false; + this.modules = {}; +}; + +Row.prototype.getGroup = function () { + return this.modules.group || false; +}; + +//////////////// Object Generation ///////////////// +Row.prototype.getComponent = function () { + if (!this.component) { + this.component = new RowComponent(this); + } + + return this.component; +}; + +//public row object +var CellComponent = function CellComponent(cell) { + this._cell = cell; +}; + +CellComponent.prototype.getValue = function () { + return this._cell.getValue(); +}; + +CellComponent.prototype.getOldValue = function () { + return this._cell.getOldValue(); +}; + +CellComponent.prototype.getInitialValue = function () { + return this._cell.initialValue; +}; + +CellComponent.prototype.getElement = function () { + return this._cell.getElement(); +}; + +CellComponent.prototype.getRow = function () { + return this._cell.row.getComponent(); +}; + +CellComponent.prototype.getData = function () { + return this._cell.row.getData(); +}; + +CellComponent.prototype.getField = function () { + return this._cell.column.getField(); +}; + +CellComponent.prototype.getColumn = function () { + return this._cell.column.getComponent(); +}; + +CellComponent.prototype.setValue = function (value, mutate) { + if (typeof mutate == "undefined") { + mutate = true; + } + + this._cell.setValue(value, mutate); +}; + +CellComponent.prototype.restoreOldValue = function () { + this._cell.setValueActual(this._cell.getOldValue()); +}; + +CellComponent.prototype.restoreInitialValue = function () { + this._cell.setValueActual(this._cell.initialValue); +}; + +CellComponent.prototype.edit = function (force) { + return this._cell.edit(force); +}; + +CellComponent.prototype.cancelEdit = function () { + this._cell.cancelEdit(); +}; + +CellComponent.prototype.isEdited = function () { + return !!this._cell.modules.edit && this._cell.modules.edit.edited; +}; + +CellComponent.prototype.clearEdited = function () { + if (self.table.modExists("edit", true)) { + this._cell.table.modules.edit.clearEdited(this._cell); + } +}; + +CellComponent.prototype.isValid = function () { + return this._cell.modules.validate ? !this._cell.modules.validate.invalid : true; +}; + +CellComponent.prototype.validate = function () { + return this._cell.validate(); +}; + +CellComponent.prototype.clearValidation = function () { + if (this._cell.table.modExists("validate", true)) { + this._cell.table.modules.validate.clearValidation(this._cell); + } +}; + +CellComponent.prototype.nav = function () { + return this._cell.nav(); +}; + +CellComponent.prototype.checkHeight = function () { + this._cell.checkHeight(); +}; + +CellComponent.prototype.getTable = function () { + return this._cell.table; +}; + +CellComponent.prototype._getSelf = function () { + return this._cell; +}; + +var Cell = function Cell(column, row) { + + this.table = column.table; + this.column = column; + this.row = row; + this.element = null; + this.value = null; + this.initialValue; + this.oldValue = null; + this.modules = {}; + + this.height = null; + this.width = null; + this.minWidth = null; + + this.component = null; + + this.loaded = false; //track if the cell has been added to the DOM yet + + this.build(); +}; + +//////////////// Setup Functions ///////////////// + +//generate element +Cell.prototype.build = function () { + this.generateElement(); + + this.setWidth(); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); + + this.initialValue = this.value; +}; + +Cell.prototype.generateElement = function () { + this.element = document.createElement('div'); + this.element.className = "tabulator-cell"; + this.element.setAttribute("role", "gridcell"); + this.element = this.element; +}; + +Cell.prototype._configureCell = function () { + var self = this, + cellEvents = self.column.cellEvents, + element = self.element, + field = this.column.getField(), + vertAligns = { + top: "flex-start", + bottom: "flex-end", + middle: "center" + }, + hozAligns = { + left: "flex-start", + right: "flex-end", + center: "center" + }; + + //set text alignment + element.style.textAlign = self.column.hozAlign; + + if (self.column.vertAlign) { + element.style.display = "inline-flex"; + + element.style.alignItems = vertAligns[self.column.vertAlign] || ""; + + if (self.column.hozAlign) { + element.style.justifyContent = hozAligns[self.column.hozAlign] || ""; + } + } + + if (field) { + element.setAttribute("tabulator-field", field); + } + + //add class to cell if needed + if (self.column.definition.cssClass) { + var classNames = self.column.definition.cssClass.split(" "); + classNames.forEach(function (className) { + element.classList.add(className); + }); + } + + //update tooltip on mouse enter + if (this.table.options.tooltipGenerationMode === "hover") { + element.addEventListener("mouseenter", function (e) { + self._generateTooltip(); + }); + } + + self._bindClickEvents(cellEvents); + + self._bindTouchEvents(cellEvents); + + self._bindMouseEvents(cellEvents); + + if (self.column.modules.edit) { + self.table.modules.edit.bindEditor(self); + } + + if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { + self.table.modules.moveRow.initializeCell(self); + } + + //hide cell if not visible + if (!self.column.visible) { + self.hide(); + } +}; + +Cell.prototype._bindClickEvents = function (cellEvents) { + var self = this, + element = self.element; + + //set event bindings + if (cellEvents.cellClick || self.table.options.cellClick) { + element.addEventListener("click", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellClick) { + cellEvents.cellClick.call(self.table, e, component); + } + + if (self.table.options.cellClick) { + self.table.options.cellClick.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellDblClick || this.table.options.cellDblClick) { + element.addEventListener("dblclick", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellDblClick) { + cellEvents.cellDblClick.call(self.table, e, component); + } + + if (self.table.options.cellDblClick) { + self.table.options.cellDblClick.call(self.table, e, component); + } + }); + } else { + element.addEventListener("dblclick", function (e) { + + if (self.table.modExists("edit")) { + if (self.table.modules.edit.currentCell === self) { + return; //prevent instant selection of editor content + } + } + + e.preventDefault(); + + try { + if (document.selection) { + // IE + var range = document.body.createTextRange(); + range.moveToElementText(self.element); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNode(self.element); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + } catch (e) {} + }); + } + + if (cellEvents.cellContext || this.table.options.cellContext) { + element.addEventListener("contextmenu", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellContext) { + cellEvents.cellContext.call(self.table, e, component); + } + + if (self.table.options.cellContext) { + self.table.options.cellContext.call(self.table, e, component); + } + }); + } +}; + +Cell.prototype._bindMouseEvents = function (cellEvents) { + var self = this, + element = self.element; + + if (cellEvents.cellMouseEnter || self.table.options.cellMouseEnter) { + element.addEventListener("mouseenter", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseEnter) { + cellEvents.cellMouseEnter.call(self.table, e, component); + } + + if (self.table.options.cellMouseEnter) { + self.table.options.cellMouseEnter.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseLeave || self.table.options.cellMouseLeave) { + element.addEventListener("mouseleave", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseLeave) { + cellEvents.cellMouseLeave.call(self.table, e, component); + } + + if (self.table.options.cellMouseLeave) { + self.table.options.cellMouseLeave.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOver || self.table.options.cellMouseOver) { + element.addEventListener("mouseover", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseOver) { + cellEvents.cellMouseOver.call(self.table, e, component); + } + + if (self.table.options.cellMouseOver) { + self.table.options.cellMouseOver.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseOut || self.table.options.cellMouseOut) { + element.addEventListener("mouseout", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseOut) { + cellEvents.cellMouseOut.call(self.table, e, component); + } + + if (self.table.options.cellMouseOut) { + self.table.options.cellMouseOut.call(self.table, e, component); + } + }); + } + + if (cellEvents.cellMouseMove || self.table.options.cellMouseMove) { + element.addEventListener("mousemove", function (e) { + var component = self.getComponent(); + + if (cellEvents.cellMouseMove) { + cellEvents.cellMouseMove.call(self.table, e, component); + } + + if (self.table.options.cellMouseMove) { + self.table.options.cellMouseMove.call(self.table, e, component); + } + }); + } +}; + +Cell.prototype._bindTouchEvents = function (cellEvents) { + var self = this, + element = self.element, + dblTap, + tapHold, + tap; + + if (cellEvents.cellTap || this.table.options.cellTap) { + tap = false; + + element.addEventListener("touchstart", function (e) { + tap = true; + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + if (tap) { + var component = self.getComponent(); + + if (cellEvents.cellTap) { + cellEvents.cellTap.call(self.table, e, component); + } + + if (self.table.options.cellTap) { + self.table.options.cellTap.call(self.table, e, component); + } + } + + tap = false; + }); + } + + if (cellEvents.cellDblTap || this.table.options.cellDblTap) { + dblTap = null; + + element.addEventListener("touchend", function (e) { + + if (dblTap) { + clearTimeout(dblTap); + dblTap = null; + + var component = self.getComponent(); + + if (cellEvents.cellDblTap) { + cellEvents.cellDblTap.call(self.table, e, component); + } + + if (self.table.options.cellDblTap) { + self.table.options.cellDblTap.call(self.table, e, component); + } + } else { + + dblTap = setTimeout(function () { + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + }); + } + + if (cellEvents.cellTapHold || this.table.options.cellTapHold) { + tapHold = null; + + element.addEventListener("touchstart", function (e) { + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + clearTimeout(tapHold); + tapHold = null; + tap = false; + var component = self.getComponent(); + + if (cellEvents.cellTapHold) { + cellEvents.cellTapHold.call(self.table, e, component); + } + + if (self.table.options.cellTapHold) { + self.table.options.cellTapHold.call(self.table, e, component); + } + }, 1000); + }, { passive: true }); + + element.addEventListener("touchend", function (e) { + clearTimeout(tapHold); + tapHold = null; + }); + } +}; + +//generate cell contents +Cell.prototype._generateContents = function () { + var val; + + if (this.table.modExists("format")) { + val = this.table.modules.format.formatValue(this); + } else { + val = this.element.innerHTML = this.value; + } + + switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { + case "object": + if (val instanceof Node) { + + //clear previous cell contents + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }this.element.appendChild(val); + } else { + this.element.innerHTML = ""; + + if (val != null) { + console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); + } + } + break; + case "undefined": + case "null": + this.element.innerHTML = ""; + break; + default: + this.element.innerHTML = val; + } +}; + +Cell.prototype.cellRendered = function () { + if (this.table.modExists("format") && this.table.modules.format.cellRendered) { + this.table.modules.format.cellRendered(this); + } +}; + +//generate tooltip text +Cell.prototype._generateTooltip = function () { + var tooltip = this.column.tooltip; + + if (tooltip) { + if (tooltip === true) { + tooltip = this.value; + } else if (typeof tooltip == "function") { + tooltip = tooltip(this.getComponent()); + + if (tooltip === false) { + tooltip = ""; + } + } + + if (typeof tooltip === "undefined") { + tooltip = ""; + } + + this.element.setAttribute("title", tooltip); + } else { + this.element.setAttribute("title", ""); + } +}; + +//////////////////// Getters //////////////////// +Cell.prototype.getElement = function (containerOnly) { + if (!this.loaded) { + this.loaded = true; + if (!containerOnly) { + this.layoutElement(); + } + } + + return this.element; +}; + +Cell.prototype.getValue = function () { + return this.value; +}; + +Cell.prototype.getOldValue = function () { + return this.oldValue; +}; + +//////////////////// Actions //////////////////// + +Cell.prototype.setValue = function (value, mutate) { + + var changed = this.setValueProcessData(value, mutate), + component; + + if (changed) { + if (this.table.options.history && this.table.modExists("history")) { + this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); + } + + component = this.getComponent(); + + if (this.column.cellEvents.cellEdited) { + this.column.cellEvents.cellEdited.call(this.table, component); + } + + if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { + this.table.modules.groupRows.reassignRowToGroup(this.row); + } + + this.cellRendered(); + + this.table.options.cellEdited.call(this.table, component); + + if (this.table.options.dataChanged) { + this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); + } + } +}; + +Cell.prototype.setValueProcessData = function (value, mutate) { + var changed = false; + + if (this.value != value) { + + changed = true; + + if (mutate) { + if (this.column.modules.mutate) { + value = this.table.modules.mutator.transformCell(this, value); + } + } + } + + this.setValueActual(value); + + if (changed && this.table.modExists("columnCalcs")) { + if (this.column.definition.topCalc || this.column.definition.bottomCalc) { + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + if (this.table.options.columnCalcs == "table" || this.table.options.columnCalcs == "both") { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + if (this.table.options.columnCalcs != "table") { + this.table.modules.columnCalcs.recalcRowGroup(this.row); + } + } else { + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + } + } + + return changed; +}; + +Cell.prototype.setValueActual = function (value) { + this.oldValue = this.value; + + this.value = value; + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + this.table.modules.reactiveData.block(); + } + + this.column.setFieldValue(this.row.data, value); + + if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { + this.table.modules.reactiveData.unblock(); + } + + if (this.loaded) { + this.layoutElement(); + } +}; + +Cell.prototype.layoutElement = function () { + this._generateContents(); + this._generateTooltip(); + + //set resizable handles + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { + this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { + this.table.modules.menu.initializeCell(this); + } + + //handle frozen cells + if (this.table.modExists("frozenColumns")) { + this.table.modules.frozenColumns.layoutElement(this.element, this.column); + } +}; + +Cell.prototype.setWidth = function () { + this.width = this.column.width; + this.element.style.width = this.column.widthStyled; +}; + +Cell.prototype.clearWidth = function () { + this.width = ""; + this.element.style.width = ""; +}; + +Cell.prototype.getWidth = function () { + return this.width || this.element.offsetWidth; +}; + +Cell.prototype.setMinWidth = function () { + this.minWidth = this.column.minWidth; + this.element.style.minWidth = this.column.minWidthStyled; +}; + +Cell.prototype.setMaxWidth = function () { + this.maxWidth = this.column.maxWidth; + this.element.style.maxWidth = this.column.maxWidthStyled; +}; + +Cell.prototype.checkHeight = function () { + // var height = this.element.css("height"); + this.row.reinitializeHeight(); +}; + +Cell.prototype.clearHeight = function () { + this.element.style.height = ""; + this.height = null; +}; + +Cell.prototype.setHeight = function () { + this.height = this.row.height; + this.element.style.height = this.row.heightStyled; +}; + +Cell.prototype.getHeight = function () { + return this.height || this.element.offsetHeight; +}; + +Cell.prototype.show = function () { + this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; +}; + +Cell.prototype.hide = function () { + this.element.style.display = "none"; +}; + +Cell.prototype.edit = function (force) { + if (this.table.modExists("edit", true)) { + return this.table.modules.edit.editCell(this, force); + } +}; + +Cell.prototype.cancelEdit = function () { + if (this.table.modExists("edit", true)) { + var editing = this.table.modules.edit.getCurrentCell(); + + if (editing && editing._getSelf() === this) { + this.table.modules.edit.cancelEdit(); + } else { + console.warn("Cancel Editor Error - This cell is not currently being edited "); + } + } +}; + +Cell.prototype.validate = function () { + if (this.column.modules.validate && this.table.modExists("validate", true)) { + var valid = this.table.modules.validate.validate(this.column.modules.validate, this, this.getValue()); + + return valid === true; + } else { + return true; + } +}; + +Cell.prototype.delete = function () { + if (!this.table.rowManager.redrawBlock && this.element.parentNode) { + this.element.parentNode.removeChild(this.element); + } + + if (this.modules.validate && this.modules.validate.invalid) { + this.table.modules.validate.clearValidation(this); + } + + if (this.modules.edit && this.modules.edit.edited) { + this.table.modules.edit.clearEdited(this); + } + + if (this.table.options.history) { + this.table.modules.history.clearComponentHistory(this); + } + + this.element = false; + this.column.deleteCell(this); + this.row.deleteCell(this); + this.calcs = {}; +}; + +//////////////// Navigation ///////////////// + +Cell.prototype.nav = function () { + + var self = this, + nextCell = false, + index = this.row.getCellIndex(this); + + return { + next: function next() { + var nextCell = this.right(), + nextRow; + + if (!nextCell) { + nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + nextCell = nextRow.findNextEditableCell(-1); + + if (nextCell) { + nextCell.edit(); + return true; + } + } + } else { + return true; + } + + return false; + }, + prev: function prev() { + var nextCell = this.left(), + prevRow; + + if (!nextCell) { + prevRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (prevRow) { + nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); + + if (nextCell) { + nextCell.edit(); + return true; + } + } + } else { + return true; + } + + return false; + }, + left: function left() { + + nextCell = self.row.findPrevEditableCell(index); + + if (nextCell) { + nextCell.edit(); + return true; + } else { + return false; + } + }, + right: function right() { + nextCell = self.row.findNextEditableCell(index); + + if (nextCell) { + nextCell.edit(); + return true; + } else { + return false; + } + }, + up: function up() { + var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if (nextRow) { + nextRow.cells[index].edit(); + } + }, + down: function down() { + var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); + + if (nextRow) { + nextRow.cells[index].edit(); + } + } + + }; +}; + +Cell.prototype.getIndex = function () { + this.row.getCellIndex(this); +}; + +//////////////// Object Generation ///////////////// +Cell.prototype.getComponent = function () { + + if (!this.component) { + this.component = new CellComponent(this); + } + + return this.component; +}; +var FooterManager = function FooterManager(table) { + this.table = table; + this.active = false; + this.element = this.createElement(); //containing element + this.external = false; + this.links = []; + + this._initialize(); +}; + +FooterManager.prototype.createElement = function () { + var el = document.createElement("div"); + + el.classList.add("tabulator-footer"); + + return el; +}; + +FooterManager.prototype._initialize = function (element) { + if (this.table.options.footerElement) { + + switch (_typeof(this.table.options.footerElement)) { + case "string": + + if (this.table.options.footerElement[0] === "<") { + this.element.innerHTML = this.table.options.footerElement; + } else { + this.external = true; + this.element = document.querySelector(this.table.options.footerElement); + } + break; + default: + this.element = this.table.options.footerElement; + break; + } + } +}; + +FooterManager.prototype.getElement = function () { + return this.element; +}; + +FooterManager.prototype.append = function (element, parent) { + this.activate(parent); + + this.element.appendChild(element); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.prepend = function (element, parent) { + this.activate(parent); + + this.element.insertBefore(element, this.element.firstChild); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.remove = function (element) { + element.parentNode.removeChild(element); + this.deactivate(); +}; + +FooterManager.prototype.deactivate = function (force) { + if (!this.element.firstChild || force) { + if (!this.external) { + this.element.parentNode.removeChild(this.element); + } + this.active = false; + } + + // this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.activate = function (parent) { + if (!this.active) { + this.active = true; + if (!this.external) { + this.table.element.appendChild(this.getElement()); + this.table.element.style.display = ''; + } + } + + if (parent) { + this.links.push(parent); + } +}; + +FooterManager.prototype.redraw = function () { + this.links.forEach(function (link) { + link.footerRedraw(); + }); +}; + +var Tabulator = function Tabulator(element, options) { + + this.options = {}; + + this.columnManager = null; // hold Column Manager + this.rowManager = null; //hold Row Manager + this.footerManager = null; //holder Footer Manager + this.vdomHoz = null; //holder horizontal virtual dom + + + this.browser = ""; //hold current browser type + this.browserSlow = false; //handle reduced functionality for slower browsers + this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence + this.rtl = false; //check if the table is in RTL mode + + this.modules = {}; //hold all modules bound to this table + + if (this.initializeElement(element)) { + this.initializeOptions(options || {}); + this._create(); + } + + Tabulator.prototype.comms.register(this); //register table for inderdevice communication +}; + +//default setup options +Tabulator.prototype.defaultOptions = { + + height: false, //height of tabulator + minHeight: false, //minimum height of tabulator + maxHeight: false, //maximum height of tabulator + + layout: "fitData", ///layout type "fitColumns" | "fitData" + layoutColumnsOnNewData: false, //update column widths on setData + + columnMinWidth: 40, //minimum global width for a column + columnMaxWidth: false, //minimum global width for a column + columnHeaderVertAlign: "top", //vertical alignment of column headers + columnVertAlign: false, // DEPRECATED - Left to allow warning + + resizableColumns: true, //resizable columns + resizableRows: false, //resizable rows + autoResize: true, //auto resize table + + columns: [], //store for colum header info + + cellHozAlign: "", //horizontal align columns + cellVertAlign: "", //vertical align columns + headerHozAlign: "", //horizontal header alignment + + + data: [], //default starting data + + autoColumns: false, //build columns from data row structure + autoColumnsDefinitions: false, + + reactiveData: false, //enable data reactivity + + nestedFieldSeparator: ".", //seperatpr for nested data + + tooltips: false, //Tool tip value + tooltipsHeader: false, //Tool tip for headers + tooltipGenerationMode: "load", //when to generate tooltips + + initialSort: false, //initial sorting criteria + initialFilter: false, //initial filtering criteria + initialHeaderFilter: false, //initial header filtering criteria + + columnHeaderSortMulti: true, //multiple or single column sorting + + sortOrderReverse: false, //reverse internal sort ordering + + headerSort: true, //set default global header sort + headerSortTristate: false, //set default tristate header sorting + headerSortElement: "
", //header sort element + + footerElement: false, //hold footer element + + index: "id", //filed for row index + + textDirection: "auto", + + keybindings: [], //array for keybindings + + tabEndNewRow: false, //create new row when tab to end of table + + invalidOptionWarnings: true, //allow toggling of invalid option warnings + + clipboard: false, //enable clipboard + clipboardCopyStyled: true, //formatted table data + clipboardCopyConfig: false, //clipboard config + clipboardCopyFormatter: false, //DEPRICATED - REMOVE in 5.0 + clipboardCopyRowRange: "active", //restrict clipboard to visible rows only + clipboardPasteParser: "table", //convert pasted clipboard data to rows + clipboardPasteAction: "insert", //how to insert pasted data into the table + + clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard + clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table + clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table + + downloadDataFormatter: false, //function to manipulate table data before it is downloaded + downloadReady: function downloadReady(data, blob) { + return blob; + }, //function to manipulate download data + downloadComplete: false, //function to manipulate download data + downloadConfig: {}, //download config + downloadRowRange: "active", //restrict download to active rows only + + dataTree: false, //enable data tree + dataTreeFilter: true, //filter child rows + dataTreeSort: true, //sort child rows + dataTreeElementColumn: false, + dataTreeBranchElement: true, //show data tree branch element + dataTreeChildIndent: 9, //data tree child indent in px + dataTreeChildField: "_children", //data tre column field to look for child rows + dataTreeCollapseElement: false, //data tree row collapse element + dataTreeExpandElement: false, //data tree row expand element + dataTreeStartExpanded: false, + dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded + dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed + dataTreeChildColumnCalcs: false, //include visible data tree rows in column calculations + dataTreeSelectPropagate: false, //seleccting a parent row selects its children + + printAsHtml: false, //enable print as html + printFormatter: false, //printing page formatter + printHeader: false, //page header contents + printFooter: false, //page footer contents + printCopyStyle: true, //DEPRICATED - REMOVE in 5.0 + printStyled: true, //enable print as html styling + printVisibleRows: true, //DEPRICATED - REMOVE in 5.0 + printRowRange: "visible", //restrict print to visible rows only + printConfig: {}, //print config options + + addRowPos: "bottom", //position to insert blank rows, top|bottom + + selectable: "highlight", //highlight rows on hover + selectableRangeMode: "drag", //highlight rows on hover + selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached + selectablePersistence: true, // maintain selection when table view is updated + selectableCheck: function selectableCheck(data, row) { + return true; + }, //check wheather row is selectable + + headerFilterLiveFilterDelay: 300, //delay before updating column after user types in header filter + headerFilterPlaceholder: false, //placeholder text to display in header filters + + headerVisible: true, //hide header + + history: false, //enable edit history + + locale: false, //current system language + langs: {}, + + virtualDom: true, //enable DOM virtualization + virtualDomBuffer: 0, // set virtual DOM buffer size + virtualDomHoz: false, //enable horizontal DOM virtualization + + persistentLayout: false, //DEPRICATED - REMOVE in 5.0 + persistentSort: false, //DEPRICATED - REMOVE in 5.0 + persistentFilter: false, //DEPRICATED - REMOVE in 5.0 + persistenceID: "", //key for persistent storage + persistenceMode: true, //mode for storing persistence information + persistenceReaderFunc: false, //function for handling persistence data reading + persistenceWriterFunc: false, //function for handling persistence data writing + + persistence: false, + + responsiveLayout: false, //responsive layout flags + responsiveLayoutCollapseStartOpen: true, //start showing collapsed data + responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter + responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter + + pagination: false, //set pagination type + paginationSize: false, //set number of rows to a page + paginationInitialPage: 1, //initail page to show on load + paginationButtonCount: 5, // set count of page button + paginationSizeSelector: false, //add pagination size selector element + paginationElement: false, //element to hold pagination numbers + paginationDataSent: {}, //pagination data sent to the server + paginationDataReceived: {}, //pagination data received from the server + paginationAddRow: "page", //add rows on table or page + + ajaxURL: false, //url for ajax loading + ajaxURLGenerator: false, + ajaxParams: {}, //params for ajax loading + ajaxConfig: "get", //ajax request type + ajaxContentType: "form", //ajax request type + ajaxRequestFunc: false, //promise function + ajaxLoader: true, //show loader + ajaxLoaderLoading: false, //loader element + ajaxLoaderError: false, //loader element + ajaxFiltering: false, + ajaxSorting: false, + ajaxProgressiveLoad: false, //progressive loading + ajaxProgressiveLoadDelay: 0, //delay between requests + ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins + + groupBy: false, //enable table grouping and set field to group by + groupStartOpen: true, //starting state of group + groupValues: false, + groupUpdateOnCellEdit: false, + + groupHeader: false, //header generation function + groupHeaderPrint: null, + groupHeaderClipboard: null, + groupHeaderHtmlOutput: null, + groupHeaderDownload: null, + + htmlOutputConfig: false, //html outypu config + + movableColumns: false, //enable movable columns + + movableRows: false, //enable movable rows + movableRowsConnectedTables: false, //tables for movable rows to be connected to + movableRowsConnectedElements: false, //other elements for movable rows to be connected to + movableRowsSender: false, + movableRowsReceiver: "insert", + movableRowsSendingStart: function movableRowsSendingStart() {}, + movableRowsSent: function movableRowsSent() {}, + movableRowsSentFailed: function movableRowsSentFailed() {}, + movableRowsSendingStop: function movableRowsSendingStop() {}, + movableRowsReceivingStart: function movableRowsReceivingStart() {}, + movableRowsReceived: function movableRowsReceived() {}, + movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, + movableRowsReceivingStop: function movableRowsReceivingStop() {}, + movableRowsElementDrop: function movableRowsElementDrop() {}, + + scrollToRowPosition: "top", + scrollToRowIfVisible: true, + + scrollToColumnPosition: "left", + scrollToColumnIfVisible: true, + + rowFormatter: false, + rowFormatterPrint: null, + rowFormatterClipboard: null, + rowFormatterHtmlOutput: null, + + placeholder: false, + + //table building callbacks + tableBuilding: function tableBuilding() {}, + tableBuilt: function tableBuilt() {}, + + //render callbacks + renderStarted: function renderStarted() {}, + renderComplete: function renderComplete() {}, + + //row callbacks + rowClick: false, + rowDblClick: false, + rowContext: false, + rowTap: false, + rowDblTap: false, + rowTapHold: false, + rowMouseEnter: false, + rowMouseLeave: false, + rowMouseOver: false, + rowMouseOut: false, + rowMouseMove: false, + rowContextMenu: false, + rowClickMenu: false, + rowAdded: function rowAdded() {}, + rowDeleted: function rowDeleted() {}, + rowMoved: function rowMoved() {}, + rowUpdated: function rowUpdated() {}, + rowSelectionChanged: function rowSelectionChanged() {}, + rowSelected: function rowSelected() {}, + rowDeselected: function rowDeselected() {}, + rowResized: function rowResized() {}, + + //cell callbacks + //row callbacks + cellClick: false, + cellDblClick: false, + cellContext: false, + cellTap: false, + cellDblTap: false, + cellTapHold: false, + cellMouseEnter: false, + cellMouseLeave: false, + cellMouseOver: false, + cellMouseOut: false, + cellMouseMove: false, + cellEditing: function cellEditing() {}, + cellEdited: function cellEdited() {}, + cellEditCancelled: function cellEditCancelled() {}, + + //column callbacks + columnMoved: false, + columnResized: function columnResized() {}, + columnTitleChanged: function columnTitleChanged() {}, + columnVisibilityChanged: function columnVisibilityChanged() {}, + + //HTML iport callbacks + htmlImporting: function htmlImporting() {}, + htmlImported: function htmlImported() {}, + + //data callbacks + dataLoading: function dataLoading() {}, + dataLoaded: function dataLoaded() {}, + dataEdited: false, //DEPRECATED + dataChanged: false, + + //ajax callbacks + ajaxRequesting: function ajaxRequesting() {}, + ajaxResponse: false, + ajaxError: function ajaxError() {}, + + //filtering callbacks + dataFiltering: false, + dataFiltered: false, + + //sorting callbacks + dataSorting: function dataSorting() {}, + dataSorted: function dataSorted() {}, + + //grouping callbacks + groupToggleElement: "arrow", + groupClosedShowCalcs: false, + dataGrouping: function dataGrouping() {}, + dataGrouped: false, + groupVisibilityChanged: function groupVisibilityChanged() {}, + groupClick: false, + groupDblClick: false, + groupContext: false, + groupContextMenu: false, + groupClickMenu: false, + groupTap: false, + groupDblTap: false, + groupTapHold: false, + + columnCalcs: true, + + //pagination callbacks + pageLoaded: function pageLoaded() {}, + + //localization callbacks + localized: function localized() {}, + + //validation callbacks + validationMode: "blocking", + validationFailed: function validationFailed() {}, + + //history callbacks + historyUndo: function historyUndo() {}, + historyRedo: function historyRedo() {}, + + //scroll callbacks + scrollHorizontal: function scrollHorizontal() {}, + scrollVertical: function scrollVertical() {} +}; + +Tabulator.prototype.initializeOptions = function (options) { + + //warn user if option is not available + if (options.invalidOptionWarnings !== false) { + for (var key in options) { + if (typeof this.defaultOptions[key] === "undefined") { + console.warn("Invalid table constructor option:", key); + } + } + } + + //assign options to table + for (var key in this.defaultOptions) { + if (key in options) { + this.options[key] = options[key]; + } else { + if (Array.isArray(this.defaultOptions[key])) { + this.options[key] = Object.assign([], this.defaultOptions[key]); + } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { + this.options[key] = Object.assign({}, this.defaultOptions[key]); + } else { + this.options[key] = this.defaultOptions[key]; + } + } + } +}; + +Tabulator.prototype.initializeElement = function (element) { + + if (typeof HTMLElement !== "undefined" && element instanceof HTMLElement) { + this.element = element; + return true; + } else if (typeof element === "string") { + this.element = document.querySelector(element); + + if (this.element) { + return true; + } else { + console.error("Tabulator Creation Error - no element found matching selector: ", element); + return false; + } + } else { + console.error("Tabulator Creation Error - Invalid element provided:", element); + return false; + } +}; + +Tabulator.prototype.rtlCheck = function () { + var style = window.getComputedStyle(this.element); + + switch (this.options.textDirection) { + case "auto": + if (style.direction !== "rtl") { + break; + }; + + case "rtl": + this.element.classList.add("tabulator-rtl"); + this.rtl = true; + break; + + case "ltr": + this.element.classList.add("tabulator-ltr"); + + default: + this.rtl = false; + } +}; + +//convert depricated functionality to new functions +Tabulator.prototype._mapDepricatedFunctionality = function () { + + //map depricated persistance setup options + if (this.options.persistentLayout || this.options.persistentSort || this.options.persistentFilter) { + if (!this.options.persistence) { + this.options.persistence = {}; + } + } + + if (this.options.dataEdited) { + console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); + this.options.dataChanged = this.options.dataEdited; + } + + if (this.options.downloadDataFormatter) { + console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); + } + + if (typeof this.options.clipboardCopyHeader !== "undefined") { + this.options.columnHeaders = this.options.clipboardCopyHeader; + console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); + } + + if (this.options.printVisibleRows !== true) { + console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"); + + this.options.persistence.printRowRange = "active"; + } + + if (this.options.printCopyStyle !== true) { + console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"); + + this.options.persistence.printStyled = this.options.printCopyStyle; + } + + if (this.options.persistentLayout) { + console.warn("persistentLayout option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.columns === "undefined") { + this.options.persistence.columns = true; + } + } + + if (this.options.persistentSort) { + console.warn("persistentSort option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.sort === "undefined") { + this.options.persistence.sort = true; + } + } + + if (this.options.persistentFilter) { + console.warn("persistentFilter option is deprecated, you should now use the persistence option"); + + if (this.options.persistence !== true && typeof this.options.persistence.filter === "undefined") { + this.options.persistence.filter = true; + } + } + + if (this.options.columnVertAlign) { + console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"); + + this.options.columnHeaderVertAlign = this.options.columnVertAlign; + } +}; + +Tabulator.prototype._clearSelection = function () { + + this.element.classList.add("tabulator-block-select"); + + if (window.getSelection) { + if (window.getSelection().empty) { + // Chrome + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { + // Firefox + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { + // IE? + document.selection.empty(); + } + + this.element.classList.remove("tabulator-block-select"); +}; + +//concreate table +Tabulator.prototype._create = function () { + this._clearObjectPointers(); + + this._mapDepricatedFunctionality(); + + this.bindModules(); + + this.rtlCheck(); + + if (this.element.tagName === "TABLE") { + if (this.modExists("htmlTableImport", true)) { + this.modules.htmlTableImport.parseTable(); + } + } + + this.columnManager = new ColumnManager(this); + this.rowManager = new RowManager(this); + this.footerManager = new FooterManager(this); + + this.columnManager.setRowManager(this.rowManager); + this.rowManager.setColumnManager(this.columnManager); + + if (this.options.virtualDomHoz) { + this.vdomHoz = new VDomHoz(this); + } + + this._buildElement(); + + this._loadInitialData(); +}; + +//clear pointers to objects in default config object +Tabulator.prototype._clearObjectPointers = function () { + this.options.columns = this.options.columns.slice(0); + + if (!this.options.reactiveData) { + this.options.data = this.options.data.slice(0); + } +}; + +//build tabulator element +Tabulator.prototype._buildElement = function () { + var _this24 = this; + + var element = this.element, + mod = this.modules, + options = this.options; + + options.tableBuilding.call(this); + + element.classList.add("tabulator"); + element.setAttribute("role", "grid"); + + //empty element + while (element.firstChild) { + element.removeChild(element.firstChild); + } //set table height + if (options.height) { + options.height = isNaN(options.height) ? options.height : options.height + "px"; + element.style.height = options.height; + } + + //set table min height + if (options.minHeight !== false) { + options.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + "px"; + element.style.minHeight = options.minHeight; + } + + //set table maxHeight + if (options.maxHeight !== false) { + options.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + "px"; + element.style.maxHeight = options.maxHeight; + } + + this.columnManager.initialize(); + this.rowManager.initialize(); + + this._detectBrowser(); + + if (this.modExists("layout", true)) { + mod.layout.initialize(options.layout); + } + + //set localization + + mod.localize.initialize(); + + if (options.headerFilterPlaceholder !== false) { + mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for (var locale in options.langs) { + mod.localize.installLang(locale, options.langs[locale]); + } + + mod.localize.setLocale(options.locale); + + //configure placeholder element + if (typeof options.placeholder == "string") { + + var el = document.createElement("div"); + el.classList.add("tabulator-placeholder"); + + var span = document.createElement("span"); + span.innerHTML = options.placeholder; + + el.appendChild(span); + + options.placeholder = el; + } + + //build table elements + element.appendChild(this.columnManager.getElement()); + element.appendChild(this.rowManager.getElement()); + + if (options.footerElement) { + this.footerManager.activate(); + } + + if (options.persistence && this.modExists("persistence", true)) { + mod.persistence.initialize(); + } + + if (options.movableRows && this.modExists("moveRow")) { + mod.moveRow.initialize(); + } + + if (options.autoColumns && this.options.data) { + this.columnManager.generateColumnsFromRowData(this.options.data); + } + + if (this.modExists("columnCalcs")) { + mod.columnCalcs.initialize(); + } + + this.columnManager.setColumns(options.columns); + + if (options.dataTree && this.modExists("dataTree", true)) { + mod.dataTree.initialize(); + } + + if (this.modExists("frozenRows")) { + this.modules.frozenRows.initialize(); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort || options.initialSort) && this.modExists("sort", true)) { + var sorters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort) { + sorters = mod.persistence.load("sort"); + + if (sorters === false && options.initialSort) { + sorters = options.initialSort; + } + } else if (options.initialSort) { + sorters = options.initialSort; + } + + mod.sort.setSort(sorters); + } + + if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter || options.initialFilter) && this.modExists("filter", true)) { + var filters = []; + + if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter) { + filters = mod.persistence.load("filter"); + + if (filters === false && options.initialFilter) { + filters = options.initialFilter; + } + } else if (options.initialFilter) { + filters = options.initialFilter; + } + + mod.filter.setFilter(filters); + } + + if (options.initialHeaderFilter && this.modExists("filter", true)) { + options.initialHeaderFilter.forEach(function (item) { + + var column = _this24.columnManager.findColumn(item.field); + + if (column) { + mod.filter.setHeaderFilterValue(column, item.value); + } else { + console.warn("Column Filter Error - No matching column found:", item.field); + return false; + } + }); + } + + if (this.modExists("ajax")) { + mod.ajax.initialize(); + } + + if (options.pagination && this.modExists("page", true)) { + mod.page.initialize(); + } + + if (options.groupBy && this.modExists("groupRows", true)) { + mod.groupRows.initialize(); + } + + if (this.modExists("keybindings")) { + mod.keybindings.initialize(); + } + + if (this.modExists("selectRow")) { + mod.selectRow.clearSelectionData(true); + } + + if (options.autoResize && this.modExists("resizeTable")) { + mod.resizeTable.initialize(); + } + + if (this.modExists("clipboard")) { + mod.clipboard.initialize(); + } + + if (options.printAsHtml && this.modExists("print")) { + mod.print.initialize(); + } + + options.tableBuilt.call(this); +}; + +Tabulator.prototype._loadInitialData = function () { + var self = this; + + if (self.options.pagination && self.modExists("page")) { + self.modules.page.reset(true, true); + + if (self.options.pagination == "local") { + if (self.options.data.length) { + self.rowManager.setData(self.options.data, false, true); + } else { + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () { + if (self.options.paginationInitialPage) { + self.modules.page.setPage(self.options.paginationInitialPage); + } + }); + + return; + } else { + self.rowManager.setData(self.options.data, false, true); + } + } + + if (self.options.paginationInitialPage) { + self.modules.page.setPage(self.options.paginationInitialPage); + } + } else { + if (self.options.ajaxURL) { + self.modules.page.setPage(self.options.paginationInitialPage).then(function () {}).catch(function () {}); + } else { + self.rowManager.setData([], false, true); + } + } + } else { + if (self.options.data.length) { + self.rowManager.setData(self.options.data); + } else { + if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { + self.modules.ajax.loadData(false, true).then(function () {}).catch(function () {}); + } else { + self.rowManager.setData(self.options.data, false, true); + } + } + } +}; + +//deconstructor +Tabulator.prototype.destroy = function () { + var element = this.element; + + Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication + + if (this.options.reactiveData && this.modExists("reactiveData", true)) { + this.modules.reactiveData.unwatchData(); + } + + //clear row data + this.rowManager.rows.forEach(function (row) { + row.wipe(); + }); + + this.rowManager.rows = []; + this.rowManager.activeRows = []; + this.rowManager.displayRows = []; + + //clear event bindings + if (this.options.autoResize && this.modExists("resizeTable")) { + this.modules.resizeTable.clearBindings(); + } + + if (this.modExists("keybindings")) { + this.modules.keybindings.clearBindings(); + } + + //clear DOM + while (element.firstChild) { + element.removeChild(element.firstChild); + }element.classList.remove("tabulator"); +}; + +Tabulator.prototype._detectBrowser = function () { + var ua = navigator.userAgent || navigator.vendor || window.opera; + + if (ua.indexOf("Trident") > -1) { + this.browser = "ie"; + this.browserSlow = true; + } else if (ua.indexOf("Edge") > -1) { + this.browser = "edge"; + this.browserSlow = true; + } else if (ua.indexOf("Firefox") > -1) { + this.browser = "firefox"; + this.browserSlow = false; + } else { + this.browser = "other"; + this.browserSlow = false; + } + + this.browserMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0, 4)); +}; + +////////////////// Data Handling ////////////////// + +//block table redrawing +Tabulator.prototype.blockRedraw = function () { + return this.rowManager.blockRedraw(); +}; + +//restore table redrawing +Tabulator.prototype.restoreRedraw = function () { + return this.rowManager.restoreRedraw(); +}; + +//local data from local file +Tabulator.prototype.setDataFromLocalFile = function (extensions) { + var _this25 = this; + + return new Promise(function (resolve, reject) { + var input = document.createElement("input"); + input.type = "file"; + input.accept = extensions || ".json,application/json"; + + input.addEventListener("change", function (e) { + var file = input.files[0], + reader = new FileReader(), + data; + + reader.readAsText(file); + + reader.onload = function (e) { + + try { + data = JSON.parse(reader.result); + } catch (e) { + console.warn("File Load Error - File contents is invalid JSON", e); + reject(e); + return; + } + + _this25.setData(data).then(function (data) { + resolve(data); + }).catch(function (err) { + resolve(err); + }); + }; + + reader.onerror = function (e) { + console.warn("File Load Error - Unable to read file"); + reject(); + }; + }); + + input.click(); + }); +}; + +//load data +Tabulator.prototype.setData = function (data, params, config) { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, false, true); +}; + +Tabulator.prototype._setData = function (data, params, config, inPosition, columnsChanged) { + var self = this; + + if (typeof data === "string") { + if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { + //data is a json encoded string + return self.rowManager.setData(JSON.parse(data), inPosition, columnsChanged); + } else { + + if (self.modExists("ajax", true)) { + if (params) { + self.modules.ajax.setParams(params); + } + + if (config) { + self.modules.ajax.setConfig(config); + } + + self.modules.ajax.setUrl(data); + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + self.modules.page.reset(true, true); + return self.modules.page.setPage(1); + } else { + //assume data is url, make ajax call to url to get data + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } + } + } else { + if (data) { + //asume data is already an object + return self.rowManager.setData(data, inPosition, columnsChanged); + } else { + + //no data provided, check if ajaxURL is present; + if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { + + if (self.options.pagination == "remote" && self.modExists("page", true)) { + self.modules.page.reset(true, true); + return self.modules.page.setPage(1); + } else { + return self.modules.ajax.loadData(inPosition, columnsChanged); + } + } else { + //empty data + return self.rowManager.setData([], inPosition, columnsChanged); + } + } + } +}; + +//clear data +Tabulator.prototype.clearData = function () { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + this.rowManager.clearData(); +}; + +//get table data array +Tabulator.prototype.getData = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getData(active); +}; + +//get table data array count +Tabulator.prototype.getDataCount = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getDataCount(active); +}; + +//search for specific row components +Tabulator.prototype.searchRows = function (field, type, value) { + if (this.modExists("filter", true)) { + return this.modules.filter.search("rows", field, type, value); + } +}; + +//search for specific data +Tabulator.prototype.searchData = function (field, type, value) { + if (this.modExists("filter", true)) { + return this.modules.filter.search("data", field, type, value); + } +}; + +//get table html +Tabulator.prototype.getHtml = function (visible, style, config) { + if (this.modExists("export", true)) { + return this.modules.export.getHtml(visible, style, config); + } +}; + +//get print html +Tabulator.prototype.print = function (visible, style, config) { + if (this.modExists("print", true)) { + return this.modules.print.printFullscreen(visible, style, config); + } +}; + +//retrieve Ajax URL +Tabulator.prototype.getAjaxUrl = function () { + if (this.modExists("ajax", true)) { + return this.modules.ajax.getUrl(); + } +}; + +//replace data, keeping table in position with same sort +Tabulator.prototype.replaceData = function (data, params, config) { + if (this.modExists("ajax")) { + this.modules.ajax.blockActiveRequest(); + } + + return this._setData(data, params, config, true); +}; + +//update table data +Tabulator.prototype.updateData = function (data) { + var _this26 = this; + + var self = this; + var responses = 0; + + return new Promise(function (resolve, reject) { + if (_this26.modExists("ajax")) { + _this26.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + data.forEach(function (item) { + var row = self.rowManager.findRow(item[self.options.index]); + + if (row) { + responses++; + + row.updateData(item).then(function () { + responses--; + + if (!responses) { + resolve(); + } + }); + } + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +Tabulator.prototype.addData = function (data, pos, index) { + var _this27 = this; + + return new Promise(function (resolve, reject) { + if (_this27.modExists("ajax")) { + _this27.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + _this27.rowManager.addRows(data, pos, index).then(function (rows) { + var output = []; + + rows.forEach(function (row) { + output.push(row.getComponent()); + }); + + resolve(output); + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +//update table data +Tabulator.prototype.updateOrAddData = function (data) { + var _this28 = this; + + var self = this, + rows = [], + responses = 0; + + return new Promise(function (resolve, reject) { + if (_this28.modExists("ajax")) { + _this28.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (data) { + data.forEach(function (item) { + var row = self.rowManager.findRow(item[self.options.index]); + + responses++; + + if (row) { + row.updateData(item).then(function () { + responses--; + rows.push(row.getComponent()); + + if (!responses) { + resolve(rows); + } + }); + } else { + self.rowManager.addRows(item).then(function (newRows) { + responses--; + rows.push(newRows[0].getComponent()); + + if (!responses) { + resolve(rows); + } + }); + } + }); + } else { + console.warn("Update Error - No data provided"); + reject("Update Error - No data provided"); + } + }); +}; + +//get row object +Tabulator.prototype.getRow = function (index) { + var row = this.rowManager.findRow(index); + + if (row) { + return row.getComponent(); + } else { + console.warn("Find Error - No matching row found:", index); + return false; + } +}; + +//get row object +Tabulator.prototype.getRowFromPosition = function (position, active) { + var row = this.rowManager.getRowFromPosition(position, active); + + if (row) { + return row.getComponent(); + } else { + console.warn("Find Error - No matching row found:", position); + return false; + } +}; + +//delete row from table +Tabulator.prototype.deleteRow = function (index) { + var _this29 = this; + + return new Promise(function (resolve, reject) { + var self = _this29, + count = 0, + successCount = 0, + foundRows = []; + + function doneCheck() { + count++; + + if (count == index.length) { + if (successCount) { + self.rowManager.reRenderInPosition(); + resolve(); + } + } + } + + if (!Array.isArray(index)) { + index = [index]; + } + + //find matching rows + index.forEach(function (item) { + var row = _this29.rowManager.findRow(item, true); + + if (row) { + foundRows.push(row); + } else { + console.warn("Delete Error - No matching row found:", item); + reject("Delete Error - No matching row found"); + doneCheck(); + } + }); + + //sort rows into correct order to ensure smooth delete from table + foundRows.sort(function (a, b) { + return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; + }); + + foundRows.forEach(function (row) { + row.delete().then(function () { + successCount++; + doneCheck(); + }).catch(function (err) { + doneCheck(); + reject(err); + }); + }); + }); +}; + +//add row to table +Tabulator.prototype.addRow = function (data, pos, index) { + var _this30 = this; + + return new Promise(function (resolve, reject) { + if (typeof data === "string") { + data = JSON.parse(data); + } + + _this30.rowManager.addRows(data, pos, index).then(function (rows) { + //recalc column calculations if present + if (_this30.modExists("columnCalcs")) { + _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }); + }); +}; + +//update a row if it exitsts otherwise create it +Tabulator.prototype.updateOrAddRow = function (index, data) { + var _this31 = this; + + return new Promise(function (resolve, reject) { + var row = _this31.rowManager.findRow(index); + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (row) { + row.updateData(data).then(function () { + //recalc column calculations if present + if (_this31.modExists("columnCalcs")) { + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(row.getComponent()); + }).catch(function (err) { + reject(err); + }); + } else { + row = _this31.rowManager.addRows(data).then(function (rows) { + //recalc column calculations if present + if (_this31.modExists("columnCalcs")) { + _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }).catch(function (err) { + reject(err); + }); + } + }); +}; + +//update row data +Tabulator.prototype.updateRow = function (index, data) { + var _this32 = this; + + return new Promise(function (resolve, reject) { + var row = _this32.rowManager.findRow(index); + + if (typeof data === "string") { + data = JSON.parse(data); + } + + if (row) { + row.updateData(data).then(function () { + resolve(row.getComponent()); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Update Error - No matching row found:", index); + reject("Update Error - No matching row found"); + } + }); +}; + +//scroll to row in DOM +Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { + var _this33 = this; + + return new Promise(function (resolve, reject) { + var row = _this33.rowManager.findRow(index); + + if (row) { + _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Scroll Error - No matching row found:", index); + reject("Scroll Error - No matching row found"); + } + }); +}; + +Tabulator.prototype.moveRow = function (from, to, after) { + var fromRow = this.rowManager.findRow(from); + + if (fromRow) { + fromRow.moveToRow(to, after); + } else { + console.warn("Move Error - No matching row found:", from); + } +}; + +Tabulator.prototype.getRows = function (active) { + + if (active === true) { + console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"); + active = "active"; + } + + return this.rowManager.getComponents(active); +}; + +//get position of row in table +Tabulator.prototype.getRowPosition = function (index, active) { + var row = this.rowManager.findRow(index); + + if (row) { + return this.rowManager.getRowPosition(row, active); + } else { + console.warn("Position Error - No matching row found:", index); + return false; + } +}; + +//copy table data to clipboard +Tabulator.prototype.copyToClipboard = function (selector) { + if (this.modExists("clipboard", true)) { + this.modules.clipboard.copy(selector); + } +}; + +/////////////// Column Functions /////////////// + +Tabulator.prototype.setColumns = function (definition) { + this.columnManager.setColumns(definition); +}; + +Tabulator.prototype.getColumns = function (structured) { + return this.columnManager.getComponents(structured); +}; + +Tabulator.prototype.getColumn = function (field) { + var col = this.columnManager.findColumn(field); + + if (col) { + return col.getComponent(); + } else { + console.warn("Find Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.getColumnDefinitions = function () { + return this.columnManager.getDefinitionTree(); +}; + +Tabulator.prototype.getColumnLayout = function () { + if (this.modExists("persistence", true)) { + return this.modules.persistence.parseColumns(this.columnManager.getColumns()); + } +}; + +Tabulator.prototype.setColumnLayout = function (layout) { + if (this.modExists("persistence", true)) { + this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); + return true; + } + return false; +}; + +Tabulator.prototype.showColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + column.show(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + this.modules.responsiveLayout.update(); + } + } else { + console.warn("Column Show Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.hideColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + column.hide(); + + if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { + this.modules.responsiveLayout.update(); + } + } else { + console.warn("Column Hide Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.toggleColumn = function (field) { + var column = this.columnManager.findColumn(field); + + if (column) { + if (column.visible) { + column.hide(); + } else { + column.show(); + } + } else { + console.warn("Column Visibility Toggle Error - No matching column found:", field); + return false; + } +}; + +Tabulator.prototype.addColumn = function (definition, before, field) { + var _this34 = this; + + return new Promise(function (resolve, reject) { + var column = _this34.columnManager.findColumn(field); + + _this34.columnManager.addColumn(definition, before, column).then(function (column) { + resolve(column.getComponent()); + }).catch(function (err) { + reject(err); + }); + }); +}; + +Tabulator.prototype.deleteColumn = function (field) { + var _this35 = this; + + return new Promise(function (resolve, reject) { + var column = _this35.columnManager.findColumn(field); + + if (column) { + column.delete().then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Delete Error - No matching column found:", field); + reject(); + } + }); +}; + +Tabulator.prototype.updateColumnDefinition = function (field, definition) { + var _this36 = this; + + return new Promise(function (resolve, reject) { + var column = _this36.columnManager.findColumn(field); + + if (column) { + column.updateDefinition(definition).then(function (col) { + resolve(col); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Column Update Error - No matching column found:", field); + reject(); + } + }); +}; + +Tabulator.prototype.moveColumn = function (from, to, after) { + var fromColumn = this.columnManager.findColumn(from); + var toColumn = this.columnManager.findColumn(to); + + if (fromColumn) { + if (toColumn) { + this.columnManager.moveColumn(fromColumn, toColumn, after); + } else { + console.warn("Move Error - No matching column found:", toColumn); + } + } else { + console.warn("Move Error - No matching column found:", from); + } +}; + +//scroll to column in DOM +Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { + var _this37 = this; + + return new Promise(function (resolve, reject) { + var column = _this37.columnManager.findColumn(field); + + if (column) { + _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { + resolve(); + }).catch(function (err) { + reject(err); + }); + } else { + console.warn("Scroll Error - No matching column found:", field); + reject("Scroll Error - No matching column found"); + } + }); +}; + +//////////// Localization Functions //////////// +Tabulator.prototype.setLocale = function (locale) { + this.modules.localize.setLocale(locale); +}; + +Tabulator.prototype.getLocale = function () { + return this.modules.localize.getLocale(); +}; + +Tabulator.prototype.getLang = function (locale) { + return this.modules.localize.getLang(locale); +}; + +//////////// General Public Functions //////////// + +//redraw list without updating data +Tabulator.prototype.redraw = function (force) { + this.columnManager.redraw(force); + this.rowManager.redraw(force); +}; + +Tabulator.prototype.setHeight = function (height) { + + if (this.rowManager.renderMode !== "classic") { + this.options.height = isNaN(height) ? height : height + "px"; + this.element.style.height = this.options.height; + this.rowManager.setRenderMode(); + this.rowManager.redraw(); + } else { + console.warn("setHeight function is not available in classic render mode"); + } +}; + +///////////////////// Sorting //////////////////// + +//trigger sort +Tabulator.prototype.setSort = function (sortList, dir) { + if (this.modExists("sort", true)) { + this.modules.sort.setSort(sortList, dir); + this.rowManager.sorterRefresh(); + } +}; + +Tabulator.prototype.getSorters = function () { + if (this.modExists("sort", true)) { + return this.modules.sort.getSort(); + } +}; + +Tabulator.prototype.clearSort = function () { + if (this.modExists("sort", true)) { + this.modules.sort.clear(); + this.rowManager.sorterRefresh(); + } +}; + +///////////////////// Filtering //////////////////// + +//set standard filters +Tabulator.prototype.setFilter = function (field, type, value, params) { + if (this.modExists("filter", true)) { + this.modules.filter.setFilter(field, type, value, params); + this.rowManager.filterRefresh(); + } +}; + +//set standard filters +Tabulator.prototype.refreshFilter = function () { + if (this.modExists("filter", true)) { + this.rowManager.filterRefresh(); + } +}; + +//add filter to array +Tabulator.prototype.addFilter = function (field, type, value, params) { + if (this.modExists("filter", true)) { + this.modules.filter.addFilter(field, type, value, params); + this.rowManager.filterRefresh(); + } +}; + +//get all filters +Tabulator.prototype.getFilters = function (all) { + if (this.modExists("filter", true)) { + return this.modules.filter.getFilters(all); + } +}; + +Tabulator.prototype.setHeaderFilterFocus = function (field) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + this.modules.filter.setHeaderFilterFocus(column); + } else { + console.warn("Column Filter Focus Error - No matching column found:", field); + return false; + } + } +}; + +Tabulator.prototype.getHeaderFilterValue = function (field) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + return this.modules.filter.getHeaderFilterValue(column); + } else { + console.warn("Column Filter Error - No matching column found:", field); + } + } +}; + +Tabulator.prototype.setHeaderFilterValue = function (field, value) { + if (this.modExists("filter", true)) { + var column = this.columnManager.findColumn(field); + + if (column) { + this.modules.filter.setHeaderFilterValue(column, value); + } else { + console.warn("Column Filter Error - No matching column found:", field); + return false; + } + } +}; + +Tabulator.prototype.getHeaderFilters = function () { + if (this.modExists("filter", true)) { + return this.modules.filter.getHeaderFilters(); + } +}; + +//remove filter from array +Tabulator.prototype.removeFilter = function (field, type, value) { + if (this.modExists("filter", true)) { + this.modules.filter.removeFilter(field, type, value); + this.rowManager.filterRefresh(); + } +}; + +//clear filters +Tabulator.prototype.clearFilter = function (all) { + if (this.modExists("filter", true)) { + this.modules.filter.clearFilter(all); + this.rowManager.filterRefresh(); + } +}; + +//clear header filters +Tabulator.prototype.clearHeaderFilter = function () { + if (this.modExists("filter", true)) { + this.modules.filter.clearHeaderFilter(); + this.rowManager.filterRefresh(); + } +}; + +///////////////////// select //////////////////// +Tabulator.prototype.selectRow = function (rows) { + if (this.modExists("selectRow", true)) { + if (rows === true) { + console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"); + rows = "active"; + } + this.modules.selectRow.selectRows(rows); + } +}; + +Tabulator.prototype.deselectRow = function (rows) { + if (this.modExists("selectRow", true)) { + this.modules.selectRow.deselectRows(rows); + } +}; + +Tabulator.prototype.toggleSelectRow = function (row) { + if (this.modExists("selectRow", true)) { + this.modules.selectRow.toggleRow(row); + } +}; + +Tabulator.prototype.getSelectedRows = function () { + if (this.modExists("selectRow", true)) { + return this.modules.selectRow.getSelectedRows(); + } +}; + +Tabulator.prototype.getSelectedData = function () { + if (this.modExists("selectRow", true)) { + return this.modules.selectRow.getSelectedData(); + } +}; + +///////////////////// validation //////////////////// +Tabulator.prototype.getInvalidCells = function () { + if (this.modExists("validate", true)) { + return this.modules.validate.getInvalidCells(); + } +}; + +Tabulator.prototype.clearCellValidation = function (cells) { + var _this38 = this; + + if (this.modExists("validate", true)) { + + if (!cells) { + cells = this.modules.validate.getInvalidCells(); + } + + if (!Array.isArray(cells)) { + cells = [cells]; + } + + cells.forEach(function (cell) { + _this38.modules.validate.clearValidation(cell._getSelf()); + }); + } +}; + +Tabulator.prototype.validate = function (cells) { + var output = []; + + //clear row data + this.rowManager.rows.forEach(function (row) { + var valid = row.validate(); + + if (valid !== true) { + output = output.concat(valid); + } + }); + + return output.length ? output : true; +}; + +//////////// Pagination Functions //////////// + +Tabulator.prototype.setMaxPage = function (max) { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.setMaxPage(max); + } else { + return false; + } +}; + +Tabulator.prototype.setPage = function (page) { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.setPage(page); + } else { + return new Promise(function (resolve, reject) { + reject(); + }); + } +}; + +Tabulator.prototype.setPageToRow = function (row) { + var _this39 = this; + + return new Promise(function (resolve, reject) { + if (_this39.options.pagination && _this39.modExists("page")) { + row = _this39.rowManager.findRow(row); + + if (row) { + _this39.modules.page.setPageToRow(row).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + reject(); + } + } else { + reject(); + } + }); +}; + +Tabulator.prototype.setPageSize = function (size) { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.setPageSize(size); + this.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else { + return false; + } +}; + +Tabulator.prototype.getPageSize = function () { + if (this.options.pagination && this.modExists("page", true)) { + return this.modules.page.getPageSize(); + } +}; + +Tabulator.prototype.previousPage = function () { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.previousPage(); + } else { + return false; + } +}; + +Tabulator.prototype.nextPage = function () { + if (this.options.pagination && this.modExists("page")) { + this.modules.page.nextPage(); + } else { + return false; + } +}; + +Tabulator.prototype.getPage = function () { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.getPage(); + } else { + return false; + } +}; + +Tabulator.prototype.getPageMax = function () { + if (this.options.pagination && this.modExists("page")) { + return this.modules.page.getPageMax(); + } else { + return false; + } +}; + +///////////////// Grouping Functions /////////////// + +Tabulator.prototype.setGroupBy = function (groups) { + if (this.modExists("groupRows", true)) { + this.options.groupBy = groups; + this.modules.groupRows.initialize(); + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupValues = function (groupValues) { + if (this.modExists("groupRows", true)) { + this.options.groupValues = groupValues; + this.modules.groupRows.initialize(); + this.rowManager.refreshActiveData("display"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupStartOpen = function (values) { + if (this.modExists("groupRows", true)) { + this.options.groupStartOpen = values; + this.modules.groupRows.initialize(); + if (this.options.groupBy) { + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + return false; + } +}; + +Tabulator.prototype.setGroupHeader = function (values) { + if (this.modExists("groupRows", true)) { + this.options.groupHeader = values; + this.modules.groupRows.initialize(); + if (this.options.groupBy) { + this.rowManager.refreshActiveData("group"); + + if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { + this.modules.persistence.save("group"); + } + } else { + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + return false; + } +}; + +Tabulator.prototype.getGroups = function (values) { + if (this.modExists("groupRows", true)) { + return this.modules.groupRows.getGroups(true); + } else { + return false; + } +}; + +// get grouped table data in the same format as getData() +Tabulator.prototype.getGroupedData = function () { + if (this.modExists("groupRows", true)) { + return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); + } +}; + +Tabulator.prototype.getEditedCells = function () { + if (this.modExists("edit", true)) { + return this.modules.edit.getEditedCells(); + } +}; + +Tabulator.prototype.clearCellEdited = function (cells) { + var _this40 = this; + + if (this.modExists("edit", true)) { + + if (!cells) { + cells = this.modules.edit.getEditedCells(); + } + + if (!Array.isArray(cells)) { + cells = [cells]; + } + + cells.forEach(function (cell) { + _this40.modules.edit.clearEdited(cell._getSelf()); + }); + } +}; + +///////////////// Column Calculation Functions /////////////// +Tabulator.prototype.getCalcResults = function () { + if (this.modExists("columnCalcs", true)) { + return this.modules.columnCalcs.getResults(); + } else { + return false; + } +}; + +Tabulator.prototype.recalc = function () { + if (this.modExists("columnCalcs", true)) { + this.modules.columnCalcs.recalcAll(this.rowManager.activeRows); + } +}; + +/////////////// Navigation Management ////////////// + +Tabulator.prototype.navigatePrev = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + return cell.nav().prev(); + } + } + + return false; +}; + +Tabulator.prototype.navigateNext = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + return cell.nav().next(); + } + } + + return false; +}; + +Tabulator.prototype.navigateLeft = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().left(); + } + } + + return false; +}; + +Tabulator.prototype.navigateRight = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().right(); + } + } + + return false; +}; + +Tabulator.prototype.navigateUp = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().up(); + } + } + + return false; +}; + +Tabulator.prototype.navigateDown = function () { + var cell = false; + + if (this.modExists("edit", true)) { + cell = this.modules.edit.currentCell; + + if (cell) { + e.preventDefault(); + return cell.nav().down(); + } + } + + return false; +}; + +/////////////// History Management ////////////// +Tabulator.prototype.undo = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.undo(); + } else { + return false; + } +}; + +Tabulator.prototype.redo = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.redo(); + } else { + return false; + } +}; + +Tabulator.prototype.getHistoryUndoSize = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.getHistoryUndoSize(); + } else { + return false; + } +}; + +Tabulator.prototype.getHistoryRedoSize = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.getHistoryRedoSize(); + } else { + return false; + } +}; + +Tabulator.prototype.clearHistory = function () { + if (this.options.history && this.modExists("history", true)) { + return this.modules.history.clear(); + } else { + return false; + } +}; + +/////////////// Download Management ////////////// + +Tabulator.prototype.download = function (type, filename, options, active) { + if (this.modExists("download", true)) { + this.modules.download.download(type, filename, options, active); + } +}; + +Tabulator.prototype.downloadToTab = function (type, filename, options, active) { + if (this.modExists("download", true)) { + this.modules.download.download(type, filename, options, active, true); + } +}; + +/////////// Inter Table Communications /////////// + +Tabulator.prototype.tableComms = function (table, module, action, data) { + this.modules.comms.receive(table, module, action, data); +}; + +////////////// Extension Management ////////////// + +//object to hold module +Tabulator.prototype.moduleBindings = {}; + +//extend module +Tabulator.prototype.extendModule = function (name, property, values) { + + if (Tabulator.prototype.moduleBindings[name]) { + var source = Tabulator.prototype.moduleBindings[name].prototype[property]; + + if (source) { + if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { + for (var key in values) { + source[key] = values[key]; + } + } else { + console.warn("Module Error - Invalid value type, it must be an object"); + } + } else { + console.warn("Module Error - property does not exist:", property); + } + } else { + console.warn("Module Error - module does not exist:", name); + } +}; + +//add module to tabulator +Tabulator.prototype.registerModule = function (name, module) { + var self = this; + Tabulator.prototype.moduleBindings[name] = module; +}; + +//ensure that module are bound to instantiated function +Tabulator.prototype.bindModules = function () { + this.modules = {}; + + for (var name in Tabulator.prototype.moduleBindings) { + this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); + } +}; + +//Check for module +Tabulator.prototype.modExists = function (plugin, required) { + if (this.modules[plugin]) { + return true; + } else { + if (required) { + console.error("Tabulator Module Not Installed: " + plugin); + } + return false; + } +}; + +Tabulator.prototype.helpers = { + + elVisible: function elVisible(el) { + return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); + }, + + elOffset: function elOffset(el) { + var box = el.getBoundingClientRect(); + + return { + top: box.top + window.pageYOffset - document.documentElement.clientTop, + left: box.left + window.pageXOffset - document.documentElement.clientLeft + }; + }, + + deepClone: function deepClone(obj) { + var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); + + for (var i in obj) { + if (obj[i] != null && _typeof(obj[i]) === "object") { + if (obj[i] instanceof Date) { + clone[i] = new Date(obj[i]); + } else { + clone[i] = this.deepClone(obj[i]); + } + } + } + return clone; + } +}; + +Tabulator.prototype.comms = { + tables: [], + register: function register(table) { + Tabulator.prototype.comms.tables.push(table); + }, + deregister: function deregister(table) { + var index = Tabulator.prototype.comms.tables.indexOf(table); + + if (index > -1) { + Tabulator.prototype.comms.tables.splice(index, 1); + } + }, + lookupTable: function lookupTable(query, silent) { + var results = [], + matches, + match; + + if (typeof query === "string") { + matches = document.querySelectorAll(query); + + if (matches.length) { + for (var i = 0; i < matches.length; i++) { + match = Tabulator.prototype.comms.matchElement(matches[i]); + + if (match) { + results.push(match); + } + } + } + } else if (typeof HTMLElement !== "undefined" && query instanceof HTMLElement || query instanceof Tabulator) { + match = Tabulator.prototype.comms.matchElement(query); + + if (match) { + results.push(match); + } + } else if (Array.isArray(query)) { + query.forEach(function (item) { + results = results.concat(Tabulator.prototype.comms.lookupTable(item)); + }); + } else { + if (!silent) { + console.warn("Table Connection Error - Invalid Selector", query); + } + } + + return results; + }, + matchElement: function matchElement(element) { + return Tabulator.prototype.comms.tables.find(function (table) { + return element instanceof Tabulator ? table === element : table.element === element; + }); + } +}; + +Tabulator.prototype.findTable = function (query) { + var results = Tabulator.prototype.comms.lookupTable(query, true); + return Array.isArray(results) && !results.length ? false : results; +}; + +var Layout = function Layout(table) { + + this.table = table; + + this.mode = null; +}; + +//initialize layout system + +Layout.prototype.initialize = function (layout) { + + if (this.modes[layout]) { + + this.mode = layout; + } else { + + console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); + + this.mode = 'fitData'; + } + + this.table.element.setAttribute("tabulator-layout", this.mode); +}; + +Layout.prototype.getMode = function () { + + return this.mode; +}; + +//trigger table layout + +Layout.prototype.layout = function () { + + this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); + + if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { + + this.table.modules.persistence.save("columns"); + } +}; + +//layout render functions + +Layout.prototype.modes = { + + //resize columns to fit data they contain + + "fitData": function fitData(columns) { + + if (this.table.options.virtualDomHoz) { + + this.table.vdomHoz.fitDataLayoutOverride(); + } else { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain and stretch row to fill table + + "fitDataFill": function fitDataFill(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data they contain + + "fitDataTable": function fitDataTable(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + }, + + //resize columns to fit data the contain and stretch last column to fill table + + "fitDataStretch": function fitDataStretch(columns) { + var _this41 = this; + + var colsWidth = 0, + tableWidth = this.table.rowManager.element.clientWidth, + gap = 0, + lastCol = false; + + columns.forEach(function (column, i) { + + if (!column.widthFixed) { + + column.reinitializeWidth(); + } + + if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { + + lastCol = column; + } + + if (column.visible) { + + colsWidth += column.getWidth(); + } + }); + + if (lastCol) { + + gap = tableWidth - colsWidth + lastCol.getWidth(); + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + lastCol.setWidth(0); + + this.table.modules.responsiveLayout.update(); + } + + if (gap > 0) { + + lastCol.setWidth(gap); + } else { + + lastCol.reinitializeWidth(); + } + } else { + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + } + }, + + //resize columns to fit + + "fitColumns": function fitColumns(columns) { + + var self = this; + + var totalWidth = self.table.element.clientWidth; //table element width + + var fixedWidth = 0; //total width of columns with a defined width + + var flexWidth = 0; //total width available to flexible columns + + var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns + + var flexColWidth = 0; //desired width of flexible columns + + var flexColumns = []; //array of flexible width columns + + var fixedShrinkColumns = []; //array of fixed width columns that can shrink + + var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns + + var overflowWidth = 0; //horizontal overflow width + + var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps + + + function calcWidth(width) { + + var colWidth; + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + return colWidth; + } + + //ensure columns resize to take up the correct amount of space + + function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { + + var oversizeCols = [], + oversizeSpace = 0, + remainingSpace = 0, + nextColWidth = 0, + remainingFlexGrowUnits = flexGrowUnits, + gap = 0, + changeUnits = 0, + undersizeCols = []; + + function calcGrow(col) { + + return colWidth * (col.column.definition.widthGrow || 1); + } + + function calcShrink(col) { + + return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); + } + + columns.forEach(function (col, i) { + + var width = shrinkCols ? calcShrink(col) : calcGrow(col); + + if (col.column.minWidth >= width) { + + oversizeCols.push(col); + } else { + + if (col.column.maxWidth && col.column.maxWidth < width) { + + col.width = col.column.maxWidth; + + freeSpace -= col.column.maxWidth; + + remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + + if (remainingFlexGrowUnits) { + + colWidth = Math.floor(freeSpace / remainingFlexGrowUnits); + } + } else { + + undersizeCols.push(col); + + changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; + } + } + }); + + if (oversizeCols.length) { + + oversizeCols.forEach(function (col) { + + oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; + + col.width = col.column.minWidth; + }); + + remainingSpace = freeSpace - oversizeSpace; + + nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; + + gap = remainingSpace - nextColWidth * changeUnits; + + gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); + } else { + + gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; + + undersizeCols.forEach(function (column) { + + column.width = shrinkCols ? calcShrink(column) : calcGrow(column); + }); + } + + return gap; + } + + if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { + + this.table.modules.responsiveLayout.update(); + } + + //adjust for vertical scrollbar if present + + if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { + + totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; + } + + columns.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width; + + minWidth = parseInt(column.minWidth); + + if (width) { + + colWidth = calcWidth(width); + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + + if (column.definition.widthShrink) { + + fixedShrinkColumns.push({ + + column: column, + + width: colWidth > minWidth ? colWidth : minWidth + + }); + + flexShrinkUnits += column.definition.widthShrink; + } + } else { + + flexColumns.push({ + + column: column, + + width: 0 + + }); + + flexGrowUnits += column.definition.widthGrow || 1; + } + } + }); + + //calculate available space + + flexWidth = totalWidth - fixedWidth; + + //calculate correct column size + + flexColWidth = Math.floor(flexWidth / flexGrowUnits); + + //generate column widths + + var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); + + //increase width of last column to account for rounding errors + + if (flexColumns.length && gapFill > 0) { + + flexColumns[flexColumns.length - 1].width += +gapFill; + } + + //caculate space for columns to be shrunk into + + flexColumns.forEach(function (col) { + + flexWidth -= col.width; + }); + + overflowWidth = Math.abs(gapFill) + flexWidth; + + //shrink oversize columns if there is no available space + + if (overflowWidth > 0 && flexShrinkUnits) { + + gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); + } + + //decrease width of last column to account for rounding errors + + if (fixedShrinkColumns.length) { + + fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; + } + + flexColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + + fixedShrinkColumns.forEach(function (col) { + + col.column.setWidth(col.width); + }); + } + +}; + +Tabulator.prototype.registerModule("layout", Layout); +var Localize = function Localize(table) { + this.table = table; //hold Tabulator object + this.locale = "default"; //current locale + this.lang = false; //current language + this.bindings = {}; //update events to call when locale is changed + this.langList = {}; +}; + +Localize.prototype.initialize = function () { + this.langList = Tabulator.prototype.helpers.deepClone(this.langs); +}; + +//set header placehoder +Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { + this.langList.default.headerFilters.default = placeholder; +}; + +//set header filter placeholder by column +Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { + this.langList.default.headerFilters.columns[column] = placeholder; + + if (this.lang && !this.lang.headerFilters.columns[column]) { + this.lang.headerFilters.columns[column] = placeholder; + } +}; + +//setup a lang description object +Localize.prototype.installLang = function (locale, lang) { + if (this.langList[locale]) { + this._setLangProp(this.langList[locale], lang); + } else { + this.langList[locale] = lang; + } +}; + +Localize.prototype._setLangProp = function (lang, values) { + for (var key in values) { + if (lang[key] && _typeof(lang[key]) == "object") { + this._setLangProp(lang[key], values[key]); + } else { + lang[key] = values[key]; + } + } +}; + +//set current locale +Localize.prototype.setLocale = function (desiredLocale) { + var self = this; + + desiredLocale = desiredLocale || "default"; + + //fill in any matching languge values + function traverseLang(trans, path) { + for (var prop in trans) { + if (_typeof(trans[prop]) == "object") { + if (!path[prop]) { + path[prop] = {}; + } + traverseLang(trans[prop], path[prop]); + } else { + path[prop] = trans[prop]; + } + } + } + + //determing correct locale to load + if (desiredLocale === true && navigator.language) { + //get local from system + desiredLocale = navigator.language.toLowerCase(); + } + + if (desiredLocale) { + + //if locale is not set, check for matching top level locale else use default + if (!self.langList[desiredLocale]) { + var prefix = desiredLocale.split("-")[0]; + + if (self.langList[prefix]) { + console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); + desiredLocale = prefix; + } else { + console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); + desiredLocale = "default"; + } + } + } + + self.locale = desiredLocale; + + //load default lang template + self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); + + if (desiredLocale != "default") { + traverseLang(self.langList[desiredLocale], self.lang); + } + + self.table.options.localized.call(self.table, self.locale, self.lang); + + self._executeBindings(); +}; + +//get current locale +Localize.prototype.getLocale = function (locale) { + return self.locale; +}; + +//get lang object for given local or current if none provided +Localize.prototype.getLang = function (locale) { + return locale ? this.langList[locale] : this.lang; +}; + +//get text for current locale +Localize.prototype.getText = function (path, value) { + var path = value ? path + "|" + value : path, + pathArray = path.split("|"), + text = this._getLangElement(pathArray, this.locale); + + // if(text === false){ + // console.warn("Localization Error - Matching localized text not found for given path: ", path); + // } + + return text || ""; +}; + +//traverse langs object and find localized copy +Localize.prototype._getLangElement = function (path, locale) { + var self = this; + var root = self.lang; + + path.forEach(function (level) { + var rootPath; + + if (root) { + rootPath = root[level]; + + if (typeof rootPath != "undefined") { + root = rootPath; + } else { + root = false; + } + } + }); + + return root; +}; + +//set update binding +Localize.prototype.bind = function (path, callback) { + if (!this.bindings[path]) { + this.bindings[path] = []; + } + + this.bindings[path].push(callback); + + callback(this.getText(path), this.lang); +}; + +//itterate through bindings and trigger updates +Localize.prototype._executeBindings = function () { + var self = this; + + var _loop = function _loop(path) { + self.bindings[path].forEach(function (binding) { + binding(self.getText(path), self.lang); + }); + }; + + for (var path in self.bindings) { + _loop(path); + } +}; + +//Localized text listings +Localize.prototype.langs = { + "default": { //hold default locale text + "groups": { + "item": "item", + "items": "items" + }, + "columns": {}, + "ajax": { + "loading": "Loading", + "error": "Error" + }, + "pagination": { + "page_size": "Page Size", + "page_title": "Show Page", + "first": "First", + "first_title": "First Page", + "last": "Last", + "last_title": "Last Page", + "prev": "Prev", + "prev_title": "Prev Page", + "next": "Next", + "next_title": "Next Page", + "all": "All" + }, + "headerFilters": { + "default": "filter column...", + "columns": {} + } + } +}; + +Tabulator.prototype.registerModule("localize", Localize); +var Comms = function Comms(table) { + this.table = table; +}; + +Comms.prototype.getConnections = function (selectors) { + var self = this, + connections = [], + connection; + + connection = Tabulator.prototype.comms.lookupTable(selectors); + + connection.forEach(function (con) { + if (self.table !== con) { + connections.push(con); + } + }); + + return connections; +}; + +Comms.prototype.send = function (selectors, module, action, data) { + var self = this, + connections = this.getConnections(selectors); + + connections.forEach(function (connection) { + connection.tableComms(self.table.element, module, action, data); + }); + + if (!connections.length && selectors) { + console.warn("Table Connection Error - No tables matching selector found", selectors); + } +}; + +Comms.prototype.receive = function (table, module, action, data) { + if (this.table.modExists(module)) { + return this.table.modules[module].commsReceived(table, action, data); + } else { + console.warn("Inter-table Comms Error - no such module:", module); + } +}; + +Tabulator.prototype.registerModule("comms", Comms); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/dist/js/tabulator_core.min.js b/Sources/CustomControls/Table/control/dist/js/tabulator_core.min.js new file mode 100644 index 0000000..185e149 --- /dev/null +++ b/Sources/CustomControls/Table/control/dist/js/tabulator_core.min.js @@ -0,0 +1,6 @@ +/* Tabulator v4.9.1 (c) Oliver Folkerd */ +"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|e,l=Math.max(n>=0?n:i-Math.abs(n),0);lo?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){e=t[0];for(var l in e){var s={field:l,title:l},a=e[l];switch(void 0===a?"undefined":_typeof(a)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(a)?"array":"string";break;default:o=isNaN(a)||""===a?a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(t){var e=n.find(function(e){return e.field===t.field});e&&Object.assign(t,e)}):i.forEach(function(t){n[t.field]&&Object.assign(t,n[t.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=this,a=t.indexOf(e),r=[];a>-1&&(t.splice(a,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=a,t.splice(l,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(t){r=r.concat(s.table.modules.dataTree.getTreeChildren(t,!1,!0))}),r=r.concat(this.table.rowManager.rows),r.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(l,0,e)}})))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&s.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(s)})},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),(e.maxWidth||this.table.options.columnMaxWidth)&&!1!==e.maxWidth&&this.setMaxWidth(void 0===e.maxWidth?this.table.options.columnMaxWidth:parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){var t=(this.definition,this.table,document.createElement("div"));return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l,s,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s=function(t){a.titleFormatterRendered=t},l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n,s),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;l-1&&this.columns.splice(e,1),this.columns.length||this.delete()},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach(function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)}),t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()})},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())}):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})},Column.prototype.setMaxWidth=function(t){this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})},Column.prototype.delete=function(){var t=this;return new Promise(function(e,o){t.isGroup&&t.columns.forEach(function(t){t.delete()}),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.getElement()===t})||!1}return!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l,s=t instanceof Row?t:new Row(t||{},this),a=this.findAddRowPos(e),r=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(l=this.getDisplayRows(),a?l.length?o=l[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):l.length&&(o=l[l.length-1],a=!(l.length1&&(!o||o&&-1==u.indexOf(o)?a?u[0]!==s&&(o=u[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):u[u.length-1]!==s&&(o=u[u.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}return o&&(r=this.rows.indexOf(o)),o&&r>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),n>-1&&this.activeRows.splice(a?n:n+1,0,s),this.rows.splice(a?r:r+1,0,s)):a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),s},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=nn?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){"row"==t.type&&o.push(t.getData(e||"data"))}),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=l}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t._setDataActual(e,!0)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||s.indexOf(t)=0))break;l=a}else if(e-s[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-s[a].getElement().offsetTop>=0))break;l=a}}else n=this.vDomTop,l=this.vDomBottom;return s.slice(n,l+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==m.type&&(h=!1),i.vDomBottom++,u++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-r,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-r,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+r)/u),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=r+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s, +(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize(!0)})},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find(function(t){return t.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))})},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o,i=!1,n=0,l=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(t){!t.definition.width&&t.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(t=this.table.modules.groupRows.getGroups(!1)[0],e=t.getRows(!1)[0]):e=this.table.rowManager.getDisplayRows()[0],e)){o=e.getElement(),e.generateCells(),this.element.appendChild(o);for(var l=0;lthis.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(l+1)),l;lo.vDomScrollPosLeft&&n.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},VDomHoz.prototype.removeColRight=function(t){var e,t=this.columns[this.rightCol];t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t,e=this.columns[this.leftCol];e&&e.modules.vdomHoz.rightPos-1}return!1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(t)};Row.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},Row.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t},Row.prototype.getElement=function(){return this.create(),this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(t){t.reinitialize(!0)})},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=this.element&&Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise(function(l,s){"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t;for(var a in e)o.data[a]=e[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in t){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(t){var n=o.getCell(t.getField());if(n){var l=t.getFieldValue(e);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),l()})},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var l=document.createElement("div");l.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=i.placeholder,l.appendChild(s),i.placeholder=l}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var a=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(a=o.persistence.load("sort"))&&i.initialSort&&(a=i.initialSort):i.initialSort&&(a=i.initialSort),o.sort.setSort(a)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(r=o.persistence.load("filter"))&&i.initialFilter&&(r=i.initialFilter):i.initialFilter&&(r=i.initialFilter),o.filter.setFilter(r)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)});t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then(function(){}).catch(function(){}):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(t){t.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var l,s=n.files[0],a=new FileReader;a.readAsText(s),a.onload=function(t){try{l=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(l).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){var l=this;return"string"!=typeof t?t?l.rowManager.setData(t,i,n):l.modExists("ajax")&&(l.modules.ajax.getUrl||l.options.ajaxURLGenerator)?"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n):l.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?l.rowManager.setData(JSON.parse(t),i,n):l.modExists("ajax",!0)?(e&&l.modules.ajax.setParams(e),o&&l.modules.ajax.setConfig(o),l.modules.ajax.setUrl(t),"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&a&&(l.rowManager.reRenderInPosition(),o())}var l=e,s=0,a=0,r=[];Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())}),r.sort(function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1}),r.forEach(function(t){t.delete().then(function(){a++,n()}).catch(function(t){n(),i(t)})})})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t) +;s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,s).then(function(t){n(t.getComponent())}).catch(function(t){l(t)})})},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(i,n){var l=o.columnManager.findColumn(t);l?l.updateDefinition(e).then(function(t){i(t)}).catch(function(t){n(t)}):(console.warn("Column Update Error - No matching column found:",t),n())})},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.validate.clearValidation(t._getSelf())}))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach(function(t){var o=t.validate();!0!==o&&(e=e.concat(o))}),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.edit.clearEdited(t._getSelf())}))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var l=0;l0?l.setWidth(n):l.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function r(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var u=[],h=0,c=0,d=0,p=a,m=0,f=0,g=[];return t.forEach(function(t,e){var o=l?r(t):s(t);t.column.minWidth>=o?u.push(t):t.column.maxWidth&&t.column.maxWidththis.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var p=o(u,s,r,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){s-=t.width}),d=Math.abs(p)+s,d>0&&c&&(p=o(h,d,Math.floor(d/c),!0)),h.length&&(h[h.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langList[t]){var i=t.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langList.default||{}),"default"!=t&&e(o.langList[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms); \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/index.html b/Sources/CustomControls/Table/control/index.html new file mode 100644 index 0000000..8dfcbcc --- /dev/null +++ b/Sources/CustomControls/Table/control/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/Sources/CustomControls/Table/control/webcc.min.js b/Sources/CustomControls/Table/control/webcc.min.js new file mode 100644 index 0000000..4521576 --- /dev/null +++ b/Sources/CustomControls/Table/control/webcc.min.js @@ -0,0 +1,2 @@ +/* Version 1.4.2, copyright (C) 2018, Siemens AG. All Rights Reserved. */ +var WebCC=WebCC||function(){var a="pending",b=-1,c=window.parent,d=null,e=null,f={},g=[],h={},i=function(){window.clearTimeout(b),window.removeEventListener?window.removeEventListener("message",d):window.detachEvent("onmessage",d)},j=function(a,b,c){var d=document.createElement("script");d.setAttribute("type","text/javascript"),d.setAttribute("src",a),(b||c)&&(d.addEventListener?(b&&d.addEventListener("load",b),c&&d.addEventListener("error",function(){c("Failed to load "+a+" library")})):b&&(d.onreadystatechange=function(){"loaded"===this.readyState||"complete"===this.readyState?b():c&&c()})),document.getElementsByTagName("head")?document.getElementsByTagName("head")[0].appendChild(d):document.getElementsByTagName("body")[0].appendChild(d)},k=function(a){return JSON.stringify({t:"boot",c:a})},l=function(b,c,d){var l,m,n,o,p,q,r={},s=null,t=null,u=null;if(("waiting"===a||"ok"===a)&&"string"==typeof b.data&&b.data.length>0){try{if(r=JSON.parse(b.data),!(r&&r.t&&r.c))throw new Error("Incompatible message received");if("boot"!==r.t)throw new Error("Unknown message received: "+r.t)}catch(v){return}if(m=function(b){a="failed",i(),d({message:b}),swacPostMessage(k({message:"failed"}),"*")},"boot"===r.t&&"pong"===r.c.message){if(n=function(){SWAC.isContainer=!1,a="ok",e=r.c,e.containerVersion=e.containerVersion||"1.0.0",swacPostMessage(k({message:"ok"}),"*")},p=function(){var a,b=g.length,c=null;if("undefined"!=typeof SWAC.Hub.prototype.Extensions)c=SWAC.Hub.prototype.Extensions;else{if("undefined"==typeof WebCC)return n(),void 0;c=WebCC.Extensions}if(null!==t){if(Object.keys(c).length!==t+1&&"undefined"==typeof SWACBoot)return m("Invalid Extension"),void 0;for(var d in c)c.hasOwnProperty(d)&&"undefined"!=typeof h[d]&&(c[h[d]]=c[d],delete c[d],delete h[d])}0===b||"undefined"==typeof WebCC&&SWAC._internal.Utils.checkVersion(u,"1.4.1")<0?n():(a=g.pop(),"undefined"==typeof defineExtension?j(a,p,m):"undefined"==typeof SWACBoot&&"undefined"==typeof WebCC.Extensions?(s=/^\s+|\s+$/g,void 0===a||null===a||""===a.replace(s,"")?m("Failed to load SWAC.Config.Control.URLs library"):(l=function(){"undefined"!=typeof WebCC.Extensions?p():m("Failed to load SWAC.Config.Control.URLs library")},j(a,l,m)),s=null):"$$unknownExtension$$"===a?"undefined"!=typeof SWACBoot?p():m("Unknown Extension"):(t=Object.keys(c).length,j(a,p,"undefined"!=typeof SWACBoot?p:m)))},r.c.extensions)for(q in r.c.extensions)r.c.extensions.hasOwnProperty(q)&&g.unshift(r.c.extensions[q]);u=r.c.containerVersion||"1.0.0","undefined"!=typeof SWAC?p():(s=/^\s+|\s+$/g,void 0===r.c.url||null===r.c.url||""===r.c.url.replace(s,"")?m("Failed to load SWAC.Config.Container.URLs library"):(l=function(){"undefined"!=typeof SWAC||"undefined"!=typeof r.c.namespace&&"undefined"!=typeof window[r.c.namespace]?p():m("Failed to load SWAC.Config.Container.URLs library")},a="upgrading",j(r.c.url,l,m)),s=null)}else if("boot"===r.t&&"ok2"===r.c.message){a="done",i();for(o in e)e.hasOwnProperty(o)&&(f[o]=e[o]);e.message="SWAC successfully loaded",e.auth=e.authentication,delete e.authentication,delete e.url,delete e.extensions,delete e.namespace,r.c.details||(f.details={path:[""]});for(o in r.c)"message"!==o&&r.c.hasOwnProperty(o)&&(f.hasOwnProperty(o)||(f[o]=r.c[o]));delete e._internal,SWAC.Hub.prototype.containerVersion=e.containerVersion,c(e)}else"boot"===r.t&&"peng"===r.c.message&&(i(),d({message:r.c.reason}))}},m=function(){if(c===self){if("object"==typeof swacNative&&"function"==typeof swacNative.postMessage)return swacNative.postMessage;if(window.external&&"function"==typeof window.external.postMessage)return window.external.postMessage}return null},n=function(e,g,j,n,o){j=j||"*",o=o||1e3,g=g||function(){},n=n||"no";var p,q,r,s=[];if("done"===a)return window.setTimeout(function(){g({message:"Boot phase already done"})},0),void 0;if(p=m(),c===self&&"function"!=typeof p&&"function"!=typeof window.swacPostMessage)a="failed",f.details={path:[""]},window.setTimeout(function(){g({message:"Component is not embedded into an iframe"})},0);else{if("function"!=typeof window.swacPostMessage&&(window.swacPostMessage="function"==typeof p?p:function(a,b){return c.postMessage(a,b)}),d=function(a){l(a,e,g)},a="waiting",window.addEventListener?window.addEventListener("message",d,!1):window.attachEvent("onmessage",d),b=window.setTimeout(function(){"done"!==a&&(a="timedout",f.details={path:[""]},i(),g({message:"Bootload sequence timed out"}))},o),null!==arguments[6]&&"undefined"!=typeof arguments[6])for(r=0;r',' Value <', data.value, '>'); + }; + var subscribe_ = function () { + WebCC.onPropertyChanged.subscribe(webccInterface.setProperty); + console.log('Subscribe'); + }; + return { + init: init_, + setProperty: setProperty_, + subscribe: subscribe_, + contract: CONTRACT + }; +}(); + +var webccInterfaceInit = function () { + // Initialize + if (WebCC.isDesignMode) { + webccInterface.init(); + showDemoData(); + console.log('Design Mode'); + }else { + webccInterface.init(); + showRuntimeData(); + console.log('Connection OK'); + } +}; \ No newline at end of file diff --git a/Sources/CustomControls/manifest.json b/Sources/CustomControls/Table/manifest.json similarity index 95% rename from Sources/CustomControls/manifest.json rename to Sources/CustomControls/Table/manifest.json index 19d172c..bfd7f03 100644 --- a/Sources/CustomControls/manifest.json +++ b/Sources/CustomControls/Table/manifest.json @@ -1,73 +1,73 @@ -{ - "$schema": "./CWC_manifest_Schema.json", - "mver": "1.2.0", - "control": { - "identity": { - "name": "TableDnomaid", - "version": "1.0", - "displayname": "Table Dnomaid", - "icon": "./assets/TableDnomaid.ico", - "type": "guid://9DE938AC-F10E-4DED-B46D-5B3B0618B180", - "start": "./control/index.html" - }, - "environment": { - "prerequisites": { - "renderingspace": { - "defaultwidth": 810, - "defaultheight": 195, - "unit": "px" - } - }, - "extensions": { - "HMI": { - "mandatory": true, - "version": "~1.0.0" - } - } - }, - "metadata": { - "author": "Quimet", - "keywords": [ - "Template", - "Dnomaid" - ], - "homepage": "https://github.com/DnomaidGit", - "company": "Dnomaid" - }, - "contracts": { - "api": { - "methods": { - "DrawTableData": { - "parameters": { - "tableDataString": { - "type": "string" - } - }, - "description": "Table Data String(JSON)" - } - }, - "events": { - "SelectedRow": { - "arguments": { - "RowContent": { - "type": "string" - } - }, - "description": "Selected row" - } - }, - "properties": { - "TableDataString": { - "type": "string", - "default": "[{\"ID\":\"1\",\"Name\":\"Test1\",\"Temperature\":\"1°C\",\"Time\":\"00_00_00 00-00-1999\"},{\"ID\":\"2\",\"Name\":\"Test2\",\"Temperature\":\"2°C\",\"Time\":\"00_00_01 00-00-1999\"}]" - }, - "ColumnStyleString" :{ - "type": "string", - "default": "[{\"title\":\"ID\", \"field\":\"ID\"},{\"title\":\"Name\", \"field\":\"Name\"},{\"title\":\"Temperature\", \"field\":\"Temperature\"},{\"title\":\"Time\", \"field\":\"Time\"}]" - } - } - } - }, - "types": {} - } +{ + "$schema": "./CWC_manifest_Schema.json", + "mver": "1.2.0", + "control": { + "identity": { + "name": "TableDnomaid", + "version": "1.0", + "displayname": "Table Dnomaid", + "icon": "./assets/TableDnomaid.ico", + "type": "guid://9DE938AC-F10E-4DED-B46D-5B3B0618B180", + "start": "./control/index.html" + }, + "environment": { + "prerequisites": { + "renderingspace": { + "defaultwidth": 810, + "defaultheight": 195, + "unit": "px" + } + }, + "extensions": { + "HMI": { + "mandatory": true, + "version": "~1.0.0" + } + } + }, + "metadata": { + "author": "Quimet", + "keywords": [ + "Template", + "Dnomaid" + ], + "homepage": "https://github.com/DnomaidGit", + "company": "Dnomaid" + }, + "contracts": { + "api": { + "methods": { + "DrawTableData": { + "parameters": { + "tableDataString": { + "type": "string" + } + }, + "description": "Table Data String(JSON)" + } + }, + "events": { + "SelectedRow": { + "arguments": { + "RowContent": { + "type": "string" + } + }, + "description": "Selected row" + } + }, + "properties": { + "TableDataString": { + "type": "string", + "default": "[{\"ID\":\"1\",\"Name\":\"Test1\",\"Temperature\":\"1°C\",\"Time\":\"00_00_00 00-00-1999\"},{\"ID\":\"2\",\"Name\":\"Test2\",\"Temperature\":\"2°C\",\"Time\":\"00_00_01 00-00-1999\"}]" + }, + "ColumnStyleString" :{ + "type": "string", + "default": "[{\"title\":\"ID\", \"field\":\"ID\"},{\"title\":\"Name\", \"field\":\"Name\"},{\"title\":\"Temperature\", \"field\":\"Temperature\"},{\"title\":\"Time\", \"field\":\"Time\"}]" + } + } + } + }, + "types": {} + } } \ No newline at end of file diff --git a/Sources/CustomControls/{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip b/Sources/CustomControls/Table/{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip similarity index 100% rename from Sources/CustomControls/{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip rename to Sources/CustomControls/Table/{9DE938AC-F10E-4DED-B46D-5B3B0618B180}.zip