From: Steve Sutton Date: Fri, 11 Oct 2019 19:56:02 +0000 (-0400) Subject: Add Tabulator X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=62a36621e9ad7addbbbbf981d24506e59e8686b5;p=WP-Plugins%2Fglm-member-db-plugins.git Add Tabulator js datagrid library --- diff --git a/js/tabulator/.gitignore b/js/tabulator/.gitignore new file mode 100644 index 0000000..013f31d --- /dev/null +++ b/js/tabulator/.gitignore @@ -0,0 +1,6 @@ +*.sublime-project +*.sublime-workspace + +node_modules/ +examples/ +npm-debug.log \ No newline at end of file diff --git a/js/tabulator/CODE_OF_CONDUCT.md b/js/tabulator/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2599d16 --- /dev/null +++ b/js/tabulator/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/js/tabulator/LICENSE b/js/tabulator/LICENSE new file mode 100644 index 0000000..3e00dfd --- /dev/null +++ b/js/tabulator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2019 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/js/tabulator/README.md b/js/tabulator/README.md new file mode 100644 index 0000000..f4a4757 --- /dev/null +++ b/js/tabulator/README.md @@ -0,0 +1,82 @@ +![Tabulator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png) + +### Version 4.4 Out Now! + +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) +*** + +NPM Package Changed +================================ +jQuery was removed as a dependency in the 4.0 release, so Tabulator has moved in NPM from the old [jquery.tabulator](https://www.npmjs.com/package/jquery.tabulator) package to the new [tabulator-tables](https://www.npmjs.com/package/tabulator-tables) package. + + +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 + + +``` + +Coming Soon +================================ +Tabulator is actively under development and I plan to have even more useful features implemented soon, including: + +- Custom Row Templates +- Additional Editors and Formatters +- Multi Cell Editing +- Cell Selection + +Get in touch if there are any features you feel Tabulator needs. diff --git a/js/tabulator/bower.json b/js/tabulator/bower.json new file mode 100644 index 0000000..1c3e124 --- /dev/null +++ b/js/tabulator/bower.json @@ -0,0 +1,40 @@ +{ + "name": "tabulator", + "main": "dist/js/tabulator.js", + "version": "4.4.3", + "description": "Interactive table generation JavaScript library", + "keywords": [ + "table", + "grid", + "datagrid", + "tabulator", + "editable", + "cookie", + "jquery", + "jqueryui", + "sort", + "format", + "resizable", + "list", + "scrollable", + "ajax", + "json", + "widget", + "jquery", + "react", + "angular", + "vue" + ], + "authors": [ + "Oli Folkerd" + ], + "license": "MIT", + "homepage": "https://github.com/olifolkerd/tabulator", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.css b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.css new file mode 100644 index 0000000..a0adcf4 --- /dev/null +++ b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.css @@ -0,0 +1,842 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 14px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #ddd; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #ddd; + padding: 4px; + padding-top: 6px; + font-weight: bold; +} + +.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; +} diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.min.css b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.min.css new file mode 100644 index 0000000..c36adfb --- /dev/null +++ b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:14px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;font-weight:700}.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} +/*# sourceMappingURL=tabulator_bootstrap.min.css.map */ diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.min.css.map b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap.min.css.map new file mode 100644 index 0000000..2a62570 --- /dev/null +++ b/js/tabulator/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,kCACE,yBAA0B,AACvB,sBAAuB,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,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,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,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,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,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,uGACE,qBAAuB,CACxB,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,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,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,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,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,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,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B","file":"tabulator_bootstrap.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-block-select {\n -webkit-user-select: none;\n -moz-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-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-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\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}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\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.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #ddd;\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-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-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-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\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-arrow {\n right: calc(50% - 6px);\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 position: absolute;\n top: 0;\n left: 0;\n height: 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 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-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-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:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\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-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"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.css b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.css new file mode 100644 index 0000000..f236b64 --- /dev/null +++ b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.css @@ -0,0 +1,1045 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 14px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #dee2e6; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; +} + +.tabulator.table-dark .tabulator-row:hover { + background-color: rgba(255, 255, 255, 0.075) !important; +} + +.tabulator.table-striped .tabulator-row:nth-child(even) { + background-color: #f9f9f9; +} + +.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover { + background-color: #f5f5f5; + cursor: pointer; +} + +.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) { + 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; + 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-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-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:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.tabulator-edit-select-list .tabulator-edit-select-list-group { + border-bottom: 1px solid #dee2e6; + padding: 4px; + padding-top: 6px; + font-weight: bold; +} + +.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; +} diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.min.css b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.min.css new file mode 100644 index 0000000..2dd1806 --- /dev/null +++ b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:14px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #dee2e6}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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}.tabulator.table-dark .tabulator-row:hover{background-color:hsla(0,0%,100%,.075)!important}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected{background-color:#9abcea}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:#f5f5f5;cursor:pointer}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator.table-striped.table-dark .tabulator-row:nth-child(2n){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;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-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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #dee2e6;padding:4px;padding-top:6px;font-weight:700}.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} +/*# sourceMappingURL=tabulator_bootstrap4.min.css.map */ diff --git a/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.min.css.map b/js/tabulator/dist/css/bootstrap/tabulator_bootstrap4.min.css.map new file mode 100644 index 0000000..194b25f --- /dev/null +++ b/js/tabulator/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,kCACE,yBAA0B,AACvB,sBAAuB,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,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,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,wBAA0B,CAC3B,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,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,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,uGACE,qBAAuB,CACxB,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,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,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,oBAAsB,CACvB,AAED,2CACE,+CAAwD,CACzD,AAED,sDACE,wBAA0B,CAC3B,AAED,yEACE,wBAA0B,CAC3B,AAED,iFACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,+EACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,iEACE,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,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,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,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,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,8DACE,gCAAiC,AACjC,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B","file":"tabulator_bootstrap4.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-block-select {\n -webkit-user-select: none;\n -moz-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-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-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\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}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\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.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #dee2e6;\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-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-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-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\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-arrow {\n right: calc(50% - 6px);\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 position: absolute;\n top: 0;\n left: 0;\n height: 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}\n\n.tabulator.table-dark .tabulator-row:hover {\n background-color: rgba(255, 255, 255, 0.075) !important;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover {\n background-color: #f5f5f5;\n cursor: pointer;\n}\n\n.tabulator.table-striped .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) {\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 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-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-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:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\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-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"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/bulma/tabulator_bulma.css b/js/tabulator/dist/css/bulma/tabulator_bulma.css new file mode 100644 index 0000000..4b7d033 --- /dev/null +++ b/js/tabulator/dist/css/bulma/tabulator_bulma.css @@ -0,0 +1,847 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 15px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: transparent !important; + border: 1px solid #aaa; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #363636; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #363636; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: transparent; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/bulma/tabulator_bulma.min.css b/js/tabulator/dist/css/bulma/tabulator_bulma.min.css new file mode 100644 index 0000000..36506e5 --- /dev/null +++ b/js/tabulator/dist/css/bulma/tabulator_bulma.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:15px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:transparent!important;border:1px solid #aaa}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #363636}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #363636;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:transparent;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator_bulma.min.css.map */ diff --git a/js/tabulator/dist/css/bulma/tabulator_bulma.min.css.map b/js/tabulator/dist/css/bulma/tabulator_bulma.min.css.map new file mode 100644 index 0000000..76a2a42 --- /dev/null +++ b/js/tabulator/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,kCACE,yBAA0B,AACvB,sBAAuB,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,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,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,uCAAyC,AACzC,qBAAuB,CACxB,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,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,+BAAiC,CAClC,AAED,uHACE,6BAA8B,AAC9B,kBAAoB,CACrB,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,uGACE,qBAAuB,CACxB,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,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,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,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,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,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,mEACE,eAAgB,AAChB,kBAAmB,AACnB,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,cAAe,AACf,eAAkB,CACnB,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B","file":"tabulator_bulma.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-block-select {\n -webkit-user-select: none;\n -moz-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-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-arrow {\n display: inline-block;\n position: absolute;\n top: 15px;\n right: 8px;\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}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\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.ui-sortable-helper {\n position: absolute;\n background-color: transparent !important;\n border: 1px solid #aaa;\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-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-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-arrow {\n border-top: 6px solid #363636;\n border-bottom: none;\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-arrow {\n right: calc(50% - 6px);\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 position: absolute;\n top: 0;\n left: 0;\n height: 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 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-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-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:hover {\n cursor: pointer;\n color: transparent;\n background: #1D68CD;\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-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"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.css b/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.css new file mode 100644 index 0000000..f7ba325 --- /dev/null +++ b/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.css @@ -0,0 +1,1322 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 18px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #dae1e7 !important; + border: 1px solid #ddd; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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:hover { + cursor: pointer; + color: #FFFFFF; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.min.css b/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.min.css new file mode 100644 index 0000000..147de37 --- /dev/null +++ b/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:18px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#dae1e7!important;border:1px solid #ddd}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator_semantic-ui.min.css.map */ diff --git a/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map b/js/tabulator/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map new file mode 100644 index 0000000..4b91a1d --- /dev/null +++ b/js/tabulator/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,kCACE,yBAA0B,AACvB,sBAAuB,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,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,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,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,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,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,uGACE,qBAAuB,CACxB,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,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,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,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,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,mEACE,eAAgB,AAChB,WAAe,AACf,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,WAAY,AACZ,eAAkB,CACnB,AAED,4BACE,kBAAmB,AACnB,MAAO,AACP,SAAU,AACV,OAAQ,AACR,QAAS,AACT,aAAe,CAChB,AAED,uEACE,sBAAyB,CAC1B,AAED,uBACE,wBAA0B,CAC3B","file":"tabulator_semantic-ui.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-block-select {\n -webkit-user-select: none;\n -moz-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-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-arrow {\n display: inline-block;\n position: absolute;\n top: 18px;\n right: 8px;\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}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\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.ui-sortable-helper {\n position: absolute;\n background-color: #dae1e7 !important;\n border: 1px solid #ddd;\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-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-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-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\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-arrow {\n right: calc(50% - 6px);\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 position: absolute;\n top: 0;\n left: 0;\n height: 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 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-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:hover {\n cursor: pointer;\n color: #FFFFFF;\n background: #1D68CD;\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-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"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/tabulator.css b/js/tabulator/dist/css/tabulator.css new file mode 100644 index 0000000..90b542f --- /dev/null +++ b/js/tabulator/dist/css/tabulator.css @@ -0,0 +1,807 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #aaa; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/tabulator.min.css b/js/tabulator/dist/css/tabulator.min.css new file mode 100644 index 0000000..f5fab3c --- /dev/null +++ b/js/tabulator/dist/css/tabulator.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:9px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #aaa}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/js/tabulator/dist/css/tabulator.min.css.map b/js/tabulator/dist/css/tabulator.min.css.map new file mode 100644 index 0000000..406ab5c --- /dev/null +++ b/js/tabulator/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,CAqfxB,AApgBD,iFAoBI,cAAc,CACd,AArBJ,kCA0BE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA3BF,6BA+BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAlEwB,AAmExB,yBAtE4B,AAuE5B,WAtEmB,AAuEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAkPpB,AAjSF,qDAkDG,YAAY,CACZ,AAnDH,4CAuDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAzFoB,AA0FpB,mBA5F2B,AA6F3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAoLhB,AAlPH,6DAiEI,kBAAkB,AAClB,sBAhGsB,AAiGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AArEJ,mEAyEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AAjHJ,wFA+EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AAlGL,gHAyFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAjGN,oFAsGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAvImB,CAwInB,AA/GL,0FAwHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BA1JkB,AA2JlB,eAAgB,CAKhB,AAjIL,oHA+HM,iBAAiB,CACjB,AAhIN,0FAuIK,YAAa,CACb,AAxIL,+DA6II,kBAAkB,AAClB,mCAAmD,AACnD,qBA9KmB,CA+KnB,AAhJJ,qEAoJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAzKJ,8EA4JK,qBAAsB,CACtB,AA7JL,yEAgKK,cAAe,CACf,AAjKL,sFAqKM,QAAS,AACT,QAAS,CACT,AAvKN,oFA8KK,kBAAkB,CAClB,AA/KL,qEAkLK,eAAc,AACd,wBAAoD,CACpD,AApLL,uHAwLM,gBAAgB,AAChB,4BAlNkB,CAmNlB,AA1LN,sHA+LM,gBAAgB,AAChB,4BA1NgB,CA2NhB,AAjMN,uHAsMM,0BAhOgB,AAiOhB,kBAAmB,CACnB,AAxMN,+GAgNM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAtNN,oHA2NM,wBAAyB,CACzB,AA5NN,2GAiOM,gBAAe,AACf,gBAAgB,CAChB,AAnON,uIAuOO,gBAAe,AACf,mBAAmB,CACnB,AAzOP,uGA8OM,qBAAqB,CACrB,AA/ON,+CAqPG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAnQH,qEA6PI,2BAjRgB,CAkRhB,AA9PJ,sEAiQI,0BArRgB,CAsRhB,AAlQJ,qDAuQG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BAxSiB,AAySjB,6BApToB,AAsTpB,eAAgB,CAChB,AAxRH,oEA6QI,4BAAyD,CAKzD,AAlRJ,iGAgRK,YAAa,CACb,AAjRL,2DA2RG,cAAc,CAKd,AAhSH,iEA8RI,YAAa,CACb,AA/RJ,kCAqSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA2DjC,AApWF,wCA4SG,YAAa,CACb,AA7SH,yDAiTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AAxUH,wFAsTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AA1TJ,8DA+TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAvUJ,mDA4UG,kBAAiB,AACjB,qBAAoB,AACpB,sBApWqB,AAqWrB,mBAAmB,AACnB,iBAAgB,AAChB,UApWe,CAsXf,AAnWH,kFAsVK,gBAAiB,AACjB,4BAAwD,CASxD,AAhWL,sGA0VM,4BA9Wc,CA+Wd,AA3VN,yGA8VM,yBAlXc,CAmXd,AA/VN,6BA0WE,iBAAgB,AAChB,0BAjXwB,AAkXxB,yBArX4B,AAsX5B,iBAAiB,AACjB,WAtXmB,AAuXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgFpB,AAtcF,qDAyXG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BA7ZiB,AA8ZjB,0BA9ZiB,AAgajB,eAAgB,CAMhB,AAlZH,oEAkYI,4BAAyD,CAKzD,AAvYJ,iGAqYK,YAAa,CACb,AAtYL,gEA+YI,mBAAkB,AAClB,kBAAkB,CAClB,AAjZJ,kDAqZG,WA7ZkB,AA8ZlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AAzZH,kDA6ZG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAzaoB,AA0apB,iBAAiB,CACjB,AApaH,8CAuaG,YAAY,CACZ,AAxaH,6CA4aG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAxboB,AAybpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AArcH,oDAubI,UA5bmB,CA6bnB,AAxbJ,sDA2bI,UAAU,CACV,AA5bJ,kEAgcK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAncL,wCA0cE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAxdF,6CAidG,OAAM,AACN,UAAU,CACV,AAndH,8CAsdG,gBAAgB,CAChB,AAvdH,6BA6dE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAngBF,mDA4eG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlgBH,qEAyfI,sBAAqB,AACrB,UAAU,CACV,AA3fJ,mEA+fI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAjiBuB,CA84BvB,AAjXD,kCAQE,wBApiB4B,CAqiB5B,AATF,0CAYE,sBAriBsB,AAsiBtB,cAAe,CACf,AAdF,kCAiBE,wBAxiB6B,CAyiB7B,AAlBF,wCAqBE,yBA3iBkC,AA4iBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA5jBkB,AA6jBlB,6BA7jBkB,AA+jBlB,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,2BA9lBiB,CA+lBjB,AApEH,wDAuEG,0BAlmBiB,CAmmBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA3mBkB,AA4mBlB,4BA5mBkB,CA+nBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAnoBW,CA8oBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAvoBkB,AAwoBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA0LtB,AA1SF,iDAoHG,yBAxoBkB,AAyoBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAjpBgB,CAwpBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAtpBe,CAupBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA9sBiB,AA+sBjB,4BA/sBiB,CAgtBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA7tBe,AA8tBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1vBa,CA2vBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eArwBc,CAkxBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAhxBa,CAixBb,AAvPL,qEA6PG,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,WAzyBqB,AA0yBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,wDAoSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAzSH,+BA8SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA30BkB,AA40BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAwDf,AA/WF,qCA0TG,eAAc,AACd,+BAA+B,CAC/B,AA5TH,wEAiUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAr2BkB,AAs2BlB,eAAgB,CAChB,AAtUJ,uDA2UG,iBAAiB,CACjB,AA5UH,uDA+UG,iBAAiB,CACjB,AAhVH,uDAmVG,iBAAiB,CACjB,AApVH,uDAuVG,iBAAiB,CACjB,AAxVH,uDA2VG,kBAAkB,CAClB,AA5VH,gDAgWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAx4BmB,AAy4BnB,qBAAqB,CACrB,AAzWH,oCA4WG,iBAAgB,AAChB,UAAU,CACV,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAv5BuB,AAw5BvB,sBAt5BmB,AAw5BnB,eAx6Ba,AA06Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAj6BgB,CA86BhB,AAjCF,oEAuBG,WAv6BqB,AAw6BrB,kBA/5BkB,CAg6BlB,AAzBH,mEA4BG,eAAc,AAEd,WA96BqB,AA+6BrB,kBAt6BkB,CAu6BlB,AAhCH,8DAoCE,6BAl7BkB,AAo7BlB,YAAW,AACX,gBAAe,AAEf,WAt7BgB,AAu7BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CACzB","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-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//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\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\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\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\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//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//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\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-arrow{\r\n\t\t\t\t\t\tborder-top: none;\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\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\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-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\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-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\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\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight: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\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\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//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-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\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-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// 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\r\n"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/tabulator_midnight.css b/js/tabulator/dist/css/tabulator_midnight.css new file mode 100644 index 0000000..10fb2f0 --- /dev/null +++ b/js/tabulator/dist/css/tabulator_midnight.css @@ -0,0 +1,810 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #1a1a1a !important; + border: 1px solid #aaa; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: #999; + background: #666; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/tabulator_midnight.min.css b/js/tabulator/dist/css/tabulator_midnight.min.css new file mode 100644 index 0000000..cd1bf7b --- /dev/null +++ b/js/tabulator/dist/css/tabulator_midnight.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:9px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#1a1a1a!important;border:1px solid #aaa}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:#999;background:#666}.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-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} +/*# sourceMappingURL=tabulator_midnight.min.css.map */ diff --git a/js/tabulator/dist/css/tabulator_midnight.min.css.map b/js/tabulator/dist/css/tabulator_midnight.min.css.map new file mode 100644 index 0000000..5210ecf --- /dev/null +++ b/js/tabulator/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,CAkgBxB,AA9gBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA4BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BA9DwB,AA+DxB,sBAlEyB,AAmEzB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA4PpB,AAxSF,qDA+CG,YAAY,CACZ,AAhDH,4CAoDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BArFoB,AAsFpB,sBAxFwB,AAyFxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CA6LhB,AAxPH,6DA8DI,kBAAkB,AAClB,sBA5FsB,AA6FtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAlEJ,mEAsEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAwCX,AAhHJ,wFA4EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAerB,AAjGL,gHAsFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,gBAAgB,AAChB,UAAW,CACX,AA/FN,oFAqGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BArImB,CAsInB,AA9GL,0FAuHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAxJkB,AAyJlB,eAAgB,CAKhB,AAhIL,oHA8HM,iBAAiB,CACjB,AA/HN,0FAsIK,YAAa,CACb,AAvIL,+DA4II,kBAAkB,AAClB,mCAAgE,AAChE,qBA5KmB,CA6KnB,AA/IJ,qEAmJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAuBlB,AA9KJ,8EA2JK,qBAAsB,CACtB,AA5JL,yEA+JK,cAAe,CACf,AAhKL,uJAmKK,sBAAqB,AACrB,gBAAgB,AAChB,UAAW,CACX,AAtKL,sFA0KM,QAAS,AACT,QAAS,CACT,AA5KN,oFAmLK,kBAAkB,CAClB,AApLL,qEAuLK,eAAc,AACd,wBAAoD,CACpD,AAzLL,uHA8LM,gBAAgB,AAChB,4BAvNkB,CAwNlB,AAhMN,sHAqMM,gBAAgB,AAChB,4BA/NgB,CAgOhB,AAvMN,uHA4MM,0BArOgB,AAsOhB,kBAAmB,CACnB,AA9MN,+GAqNM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA3NN,oHAgOM,wBAAyB,CACzB,AAjON,2GAsOM,gBAAe,AACf,gBAAgB,CAChB,AAxON,uIA4OO,gBAAe,AACf,mBAAmB,CACnB,AA9OP,uGAmPM,qBAAqB,CACrB,AApPN,+CA2PG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAzQH,qEAmQI,2BAtRgB,CAuRhB,AApQJ,sEAuQI,0BA1RgB,CA2RhB,AAxQJ,qDA6QG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BA7SiB,AA8SjB,6BAzToB,AA2TpB,eAAgB,CAChB,AA9RH,oEAmRI,4BAAyD,CAKzD,AAxRJ,iGAsRK,YAAa,CACb,AAvRL,2DAiSG,cAAc,CAKd,AAtSH,iEAoSI,YAAa,CACb,AArSJ,kCA4SE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AAzWF,wCAmTG,YAAa,CACb,AApTH,yDAwTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AA/UH,wFA6TI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAjUJ,8DAsUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA9UJ,mDAmVG,kBAAiB,AACjB,qBAAoB,AACpB,sBA1WqB,AA2WrB,mBAAmB,AACnB,iBAAgB,AAChB,UA1We,CA0Xf,AAxWH,kFA4VK,gBAAiB,AACjB,4BAAwD,CASxD,AAtWL,sGAgWM,4BAnXc,CAoXd,AAjWN,yGAoWM,yBAvXc,CAwXd,AArWN,wCA6WE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA3XF,6CAoXG,OAAM,AACN,UAAU,CACV,AAtXH,8CAyXG,gBAAgB,CAChB,AA1XH,6BAgYE,iBAAgB,AAChB,0BAtYwB,AAuYxB,sBA1YyB,AA2YzB,iBAAgB,AAChB,WA3YmB,AA4YnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AAneF,qDA+YG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAWxD,6BAnbiB,AAobjB,0BApbiB,AAsbjB,eAAgB,CAMhB,AAzaH,oEAwZI,6BAAwD,AACxD,UAxbiB,CA6bjB,AA9ZJ,iGA4ZK,YAAa,CACb,AA7ZL,gEAsaI,mBAAkB,AAClB,kBAAkB,CAClB,AAxaJ,wDA8aI,UAAU,CACV,AA/aJ,kDAobG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA/boB,AAgcpB,iBAAiB,CACjB,AA3bH,8CA+bG,YAAY,CACZ,AAhcH,6CAocG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA/coB,AAgdpB,kBAAiB,AAEjB,8BAA+B,AAE/B,WArdkB,AAsdlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAleH,oDAodI,UAxdmB,CAydnB,AArdJ,sDAwdI,UAAU,CACV,AAzdJ,kEA6dK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAheL,6BAueE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA7gBF,mDAsfG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA5gBH,qEAmgBI,sBAAqB,AACrB,UAAU,CACV,AArgBJ,mEAygBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,qBA3iBuB,CAo5BvB,AA9WD,6BAQE,qBA7iByB,CA8iBzB,AATF,0CAYE,sBA9iBsB,AA+iBtB,cAAe,CACf,AAdF,kCAiBE,qBAjjB0B,CAkjB1B,AAlBF,wCAqBE,sBApjB+B,AAqjB/B,cAAe,CACf,AAvBF,gCA0BE,kBAAkB,AAElB,0BAhkBkB,AAikBlB,6BAjkBkB,AAmkBlB,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,2BAlmBiB,CAmmBjB,AA/DH,wDAkEG,0BAtmBiB,CAumBjB,AAnEH,8CAuEE,sBAAqB,AAErB,YAAW,AAEX,0BA/mBkB,AAgnBlB,4BAhnBkB,CAmoBlB,AA/FF,oDA+EG,YAAY,CACZ,AAhFH,oDAmFG,cAvoBW,CAkpBX,AA9FH,0DAuFK,iBAAkB,CAKlB,AA5FL,wEA0FM,kBAAkB,CAClB,AA3FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA5oBkB,AA6oBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA0LtB,AAtSF,iDAgHG,sBA7oBe,AA8oBf,SAAU,CAMV,AAvHH,+GAoHI,WAAU,AACV,sBAAsB,CACtB,AAtHJ,yDA0HG,qBAtpBgB,CA6pBhB,AAjIH,+HA4HI,WAAU,AACV,uBAAsB,AAEtB,UA3pBe,CA4pBf,AAhIJ,6EAsII,YAAa,CACb,AAvIJ,oDA6IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAjKH,8EAuJI,SAAS,CAST,AAhKJ,wGA2JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AA/JL,2DAoKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAntBiB,AAotBjB,4BAptBiB,CAqtBjB,AAjLH,4DAqLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAluBe,AAmuBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAtPH,kEAsMI,eAAc,AACd,yBAA4B,CAC5B,AAxMJ,kGA2MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA9NJ,wGAoNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA/vBa,CAgwBb,AA7NL,gGAiOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA1wBc,CAuxBd,AApPJ,sGA0OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eArxBa,CAsxBb,AAnPL,qEAyPG,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,WA9yBqB,AA+yBrB,gBAAgB,AAChB,eAAe,CAmBf,AA7RH,2EA6QI,UAAU,CACV,AA9QJ,sHAkRK,eAAe,CACf,AAnRL,sOA2RI,YAAY,CACZ,AA5RJ,wDAgSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AArSH,+BA4SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAl1BkB,AAm1BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CAuDf,AA7WF,qCAyTG,eAAc,AACd,+BAA+B,CAC/B,AA3TH,wEA+TI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA52BkB,AA62BlB,eAAgB,CAChB,AApUJ,uDAwUG,iBAAiB,CACjB,AAzUH,uDA4UG,iBAAiB,CACjB,AA7UH,uDAgVG,iBAAiB,CACjB,AAjVH,uDAoVG,iBAAiB,CACjB,AArVH,uDAwVG,kBAAkB,CAClB,AAzVH,gDA8VG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA/4BmB,AAg5BnB,qBAAqB,CACrB,AAvWH,oCA0WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA15BiB,AA25BjB,sBA55BmB,AA85BnB,eA96Ba,AAg7Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UA16BsB,CAu7BtB,AAjCF,oEAuBG,WAp6Be,AAq6Bf,eA76BwB,CA86BxB,AAzBH,mEA4BG,eAAc,AAEd,WA36Be,AA46Bf,eAr7BqB,CAs7BrB,AAhCH,8DAoCE,6BAx7BkB,AA07BlB,YAAW,AACX,gBAAe,AAEf,WA57BgB,AA67BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CACzB","file":"tabulator_midnight.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-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//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}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\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\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\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//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//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\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-arrow{\r\n\t\t\t\t\t\tborder-top: none;\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\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\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-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\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-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\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\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight: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\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\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-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\t\t}\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-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// 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\r\n"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/tabulator_modern.css b/js/tabulator/dist/css/tabulator_modern.css new file mode 100644 index 0000000..d4b4968 --- /dev/null +++ b/js/tabulator/dist/css/tabulator_modern.css @@ -0,0 +1,832 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #fff; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #3759D7; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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: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; + background-color: #3759D7; + padding-left: 10px !important; + margin-bottom: 2px; +} + +.tabulator-row:nth-child(even) { + background-color: #627ce0; +} + +.tabulator-row:nth-child(even) .tabulator-cell { + background-color: #fff; +} + +.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 { + padding-left: 10px; + 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; + 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 #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-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-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:hover { + cursor: pointer; + color: #f3f3f3; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/tabulator_modern.min.css b/js/tabulator/dist/css/tabulator_modern.min.css new file mode 100644 index 0000000..ff419a0 --- /dev/null +++ b/js/tabulator/dist/css/tabulator_modern.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:9px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #fff}.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-arrow{border-top:none;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3759d7;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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: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;background-color:#3759d7;padding-left:10px!important;margin-bottom:2px}.tabulator-row:nth-child(2n){background-color:#627ce0}.tabulator-row:nth-child(2n) .tabulator-cell{background-color:#fff}.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{padding-left:10px;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;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 #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-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-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:hover{cursor:pointer;color:#f3f3f3;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator_modern.min.css.map */ diff --git a/js/tabulator/dist/css/tabulator_modern.min.css.map b/js/tabulator/dist/css/tabulator_modern.min.css.map new file mode 100644 index 0000000..943ce96 --- /dev/null +++ b/js/tabulator/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,CA+gBxB,AA3hBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA4BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCA7Ee,AA8Ef,kBAAiB,AACjB,sBAvEyB,AAwEzB,cAhFe,AAiFf,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,kBArDe,AAuDf,eAAgB,CAgQhB,AAjTF,qDAoDG,YAAY,CACZ,AArDH,4CAyDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BA9FoB,AA+FpB,sBAjGwB,AAkGxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAyLhB,AAzPH,6DAmEI,kBAAkB,AAClB,yBAhHa,AAiHb,mBAA8C,AAC9C,mBAAoB,CACpB,AAvEJ,mEA2EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAyCX,AAtHJ,wFAiFK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAgBrB,AAvGL,gHA2FM,sBAAsB,AACtB,WAAW,AAEX,yBA1IW,AA4IX,YAAW,AAEX,gBAAgB,AAEhB,cAAc,AACd,aAjJW,CAkJX,AAtGN,oFA2GK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,+BA/IqC,CAgJrC,AApHL,0FA6HK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,6BA5KY,AA6KZ,eAAgB,CAKhB,AAtIL,oHAoIM,iBAAiB,CACjB,AArIN,0FA6IK,YAAa,CACb,AA9IL,+DAmJI,kBAAkB,AAClB,mCAAgE,AAChE,qBAvLmB,CAwLnB,AAtJJ,qEA0JI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA/KJ,8EAkKK,qBAAsB,CACtB,AAnKL,yEAsKK,cAAe,CACf,AAvKL,sFA2KM,QAAS,AACT,QAAS,CACT,AA7KN,oFAoLK,kBAAkB,CAClB,AArLL,qEAwLK,eAAc,AACd,wBAAoD,CACpD,AA1LL,uHA+LM,gBAAgB,AAChB,+BA5NoC,CA6NpC,AAjMN,sHAsMM,gBAAgB,AAChB,+BAnPW,CAoPX,AAxMN,uHA6MM,6BAzPW,AA0PX,kBAAmB,CACnB,AA/MN,+GAsNM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA5NN,oHAiOM,wBAAyB,CACzB,AAlON,2GAuOM,gBAAe,AACf,gBAAgB,CAChB,AAzON,uIA6OO,gBAAe,AACf,mBAAmB,CACnB,AA/OP,uGAoPM,qBAAqB,CACrB,AArPN,+CA4PG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CAWX,AA5QH,qEAoQI,kBA1Qa,AA4Qb,2BA7RgB,CA8RhB,AAvQJ,sEA0QI,0BAjSgB,CAkShB,AA3QJ,qDA+QG,sBAAqB,AACrB,eAAc,AAEd,uCAAqD,AAErD,0BAAyD,AAgBzD,0BA3TiB,AA4TjB,6BAvUoB,AAyUpB,eAAgB,CAChB,AAxSH,oEAuRI,yBAA0B,AAE1B,yBAAyD,CASzD,AAlSJ,iGA4RK,YAAa,CACb,AA7RL,oFAgSK,eAAe,CACf,AAjSL,2DA2SG,cAAc,CAKd,AAhTH,iEA8SI,YAAa,CACb,AA/SJ,kCAqTE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AAlXF,wCA4TG,YAAa,CACb,AA7TH,yDAiUG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AAxVH,wFAsUI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AA1UJ,8DA+UI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cAhYa,AAiYb,gBAAiB,AACjB,cAAe,CACf,AAvVJ,mDA4VG,kBAAiB,AACjB,qBAAoB,AACpB,yBAvXwB,AAwXxB,mBAAmB,AACnB,iBAAgB,AAChB,UAvXe,CAuYf,AAjXH,kFAqWK,gBAAiB,AACjB,4BAAwD,CASxD,AA/WL,sGAyWM,+BArZW,CAsZX,AA1WN,yGA6WM,4BAzZW,CA0ZX,AA9WN,wCAuXE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AArYF,6CA8XG,OAAM,AACN,UAAU,CACV,AAhYH,8CAmYG,gBAAgB,CAChB,AApYH,6BA0YE,iBAAgB,AAChB,0BApZwB,AAqZxB,sBAxZyB,AAyZzB,iBAAgB,AAChB,cA1be,AA2bf,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA0FpB,AAhfF,qDAyZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,0BAAyD,AAEzD,uCAAqD,AACrD,0CAAwD,AAcxD,6BAvciB,AAwcjB,0BAxciB,AA0cjB,eAAgB,CAOhB,AA1bH,oEAqaI,yBAAyD,CASzD,AA9aJ,iGAwaK,YAAa,CACb,AAzaL,oFA4aK,eAAe,CACf,AA7aL,gEAsbI,mBAAkB,AAClB,mBAAkB,AAClB,4BAA6B,CAC7B,AAzbJ,kDA8bG,cA1ec,AA2ed,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AAlcH,kDAscG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBArdoB,AAsdpB,iBAAiB,CACjB,AA7cH,8CAidG,YAAY,CACZ,AAldH,6CAsdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAreoB,AAsepB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AA/eH,oDAieI,aA7gBa,CA8gBb,AAleJ,sDAqeI,UAAU,CACV,AAteJ,kEA0eK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA7eL,6BAofE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA1hBF,mDAmgBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAzhBH,qEAghBI,sBAAqB,AACrB,UAAU,CACV,AAlhBJ,mEAshBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAGlB,sBAAsB,AACtB,gBAA0C,AAE1C,yBAjlBgB,AAmlBhB,4BAAqC,AAErC,iBAAkB,CAqXlB,AAhYD,6BAcE,wBAhjBqC,CAqjBrC,AAnBF,6CAiBG,qBAvkBwB,CAwkBxB,AAlBH,0CAsBE,cAAe,CAKf,AA3BF,0DAyBG,qBA5kBqB,CA6kBrB,AA1BH,kDA+BG,wBAhlB4B,CAilB5B,AAhCH,wDAqCG,yBArlBiC,AAslBjC,cAAe,CACf,AAvCH,gCA2CE,kBAAkB,AAElB,0BAlmBkB,AAmmBlB,6BAnmBkB,AAqmBlB,8BAA+B,AAC/B,UAAU,CACV,AAlDF,4CAsDE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApEF,iDA6DG,MAAK,AACL,WAAW,CACX,AA/DH,kDAkEG,gBAAgB,CAChB,AAnEH,iCAuEE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CAUX,AAtFF,uDA+EG,kBAnnBc,AAonBd,2BAroBiB,CAsoBjB,AAjFH,wDAoFG,0BAzoBiB,CA0oBjB,AArFH,8CAyFE,sBAAqB,AAErB,YAAW,AAEX,0BAlpBkB,AAmpBlB,4BAnpBkB,CAsqBlB,AAjHF,oDAiGG,YAAY,CACZ,AAlGH,oDAqGG,cA1qBW,CAqrBX,AAhHH,0DAyGK,iBAAkB,CAKlB,AA9GL,wEA4GM,kBAAkB,CAClB,AA7GN,+BAqHE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,gBAAe,AACf,4BA9qBkB,AA+qBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,uBAAsB,AAEtB,wBAtrByB,CA+2BzB,AAxTF,iDAkIG,yBAhrBkB,AAirBlB,SAAU,CAMV,AAzIH,+GAsII,WAAU,AACV,sBAAsB,CACtB,AAxIJ,yDA4IG,qBAzrBgB,CAgsBhB,AAnJH,+HA8II,WAAU,AACV,uBAAsB,AAEtB,UA9rBe,CA+rBf,AAlJJ,6EAwJI,YAAa,CACb,AAzJJ,oDA+JG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAnLH,8EAyKI,SAAS,CAST,AAlLJ,wGA6KK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAjLL,2DAsLG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAtvBiB,AAuvBjB,4BAvvBiB,CAwvBjB,AAnMH,4DAuMG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBArwBe,AAswBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAxQH,kEAwNI,eAAc,AACd,yBAA4B,CAC5B,AA1NJ,kGA6NI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAhPJ,wGAsOK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlyBa,CAmyBb,AA/OL,gGAmPI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA7yBc,CA0zBd,AAtQJ,sGA4PK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAxzBa,CAyzBb,AArQL,qEA2QG,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,cAj1BwB,AAk1BxB,gBAAgB,AAChB,eAAe,CAmBf,AA/SH,2EA+RI,UAAU,CACV,AAhSJ,sHAoSK,eAAe,CACf,AArSL,sOA6SI,YAAY,CACZ,AA9SJ,wDAkTG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAvTH,+BA6TE,sBAAqB,AACrB,gCAx4Be,AAy4Bf,6BAz4Be,AA04Bf,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CAwDf,AA/XF,qCA0UG,eAAc,AACd,+BAA+B,CAC/B,AA5UH,wEAiVI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BA95Ba,AA+5Bb,eAAgB,CAChB,AAtVJ,uDA0VG,iBAAiB,CACjB,AA3VH,uDA8VG,iBAAiB,CACjB,AA/VH,uDAkWG,iBAAiB,CACjB,AAnWH,uDAsWG,iBAAiB,CACjB,AAvWH,uDA0WG,kBAAkB,CAClB,AA3WH,gDAgXG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAj8Bc,AAk8Bd,qBAAqB,CACrB,AAzXH,oCA4XG,iBAAgB,AAChB,aAv8Bc,CAw8Bd,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,mBAh8B0B,AAi8B1B,yBAx7BoB,AA07BpB,eAj9Ba,AAm9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UA18BgB,CAu9BhB,AAjCF,oEAuBG,cAh9BwB,AAi9BxB,kBAx8BkB,CAy8BlB,AAzBH,mEA4BG,eAAc,AAEd,cAv9BwB,AAw9BxB,kBA/8BkB,CAg9BlB,AAhCH,8DAoCE,6BA39BkB,AA69BlB,YAAW,AACX,gBAAe,AAEf,WA/9BgB,AAg+BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CACzB","file":"tabulator_modern.min.css","sourcesContent":["/* Tabulator v4.4.3 (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-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//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\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\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\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\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//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//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\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\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\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\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\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-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\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-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\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\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight: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\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\tbackground-color: $handleColor;\r\n\r\n\tpadding-left: $handleWidth !important;\r\n\r\n\tmargin-bottom: 2px;\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\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\tpadding-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\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: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\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-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\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-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// 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\r\n"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/tabulator_simple.css b/js/tabulator/dist/css/tabulator_simple.css new file mode 100644 index 0000000..d558324 --- /dev/null +++ b/js/tabulator/dist/css/tabulator_simple.css @@ -0,0 +1,804 @@ +/* Tabulator v4.4.3 (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-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #ddd; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/tabulator_simple.min.css b/js/tabulator/dist/css/tabulator_simple.min.css new file mode 100644 index 0000000..fd9ae4d --- /dev/null +++ b/js/tabulator/dist/css/tabulator_simple.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:9px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator_simple.min.css.map */ diff --git a/js/tabulator/dist/css/tabulator_simple.min.css.map b/js/tabulator/dist/css/tabulator_simple.min.css.map new file mode 100644 index 0000000..b4702ad --- /dev/null +++ b/js/tabulator/dist/css/tabulator_simple.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_simple.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAClB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAwfxB,AAngBD,iFAgBI,cAAc,CACd,AAjBJ,kCAsBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAvBF,6BA2BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BA9DwB,AA+DxB,sBAlEyB,AAmEzB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoPpB,AA/RF,qDA8CG,YAAY,CACZ,AA/CH,4CAmDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BArFoB,AAsFpB,sBAxFwB,AAyFxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAuLhB,AAjPH,6DA6DI,kBAAkB,AAClB,sBA5FsB,AA6FtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAjEJ,mEAqEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AA7GJ,wFA2EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA9FL,gHAqFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA7FN,oFAkGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAnImB,CAoInB,AA3GL,0FAoHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAtJkB,AAuJlB,eAAgB,CAKhB,AA7HL,oHA2HM,iBAAiB,CACjB,AA5HN,0FAoIK,YAAa,CACb,AArIL,+DA0II,kBAAkB,AAClB,mCAA+D,AAC/D,qBA3KmB,CA4KnB,AA7IJ,qEAiJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAtKJ,8EAyJK,qBAAsB,CACtB,AA1JL,yEA6JK,cAAe,CACf,AA9JL,sFAkKO,QAAS,AACT,QAAS,CACV,AApKN,oFA4KK,kBAAkB,CAClB,AA7KL,qEAgLK,eAAc,AACd,wBAAoD,CACpD,AAlLL,uHAuLM,gBAAgB,AAChB,4BAjNkB,CAkNlB,AAzLN,sHA8LM,gBAAgB,AAChB,4BAzNgB,CA0NhB,AAhMN,uHAqMM,0BA/NgB,AAgOhB,kBAAmB,CACnB,AAvMN,+GA8MM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AApNN,oHAyNM,wBAAyB,CACzB,AA1NN,2GA+NM,gBAAe,AACf,gBAAgB,CAChB,AAjON,uIAqOO,gBAAe,AACf,mBAAmB,CACnB,AAvOP,uGA4OM,qBAAqB,CACrB,AA7ON,+CAoPG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAlQH,qEA4PI,2BAhRgB,CAiRhB,AA7PJ,sEAgQI,0BApRgB,CAqRhB,AAjQJ,qDAqQG,sBAAqB,AACrB,eAAc,AAEd,6BAAwD,AAUxD,0BAtSiB,AAuSjB,6BAjTuB,AAmTvB,eAAgB,CAChB,AAtRH,oEA2QI,4BAAwD,CAKxD,AAhRJ,iGA8QK,YAAa,CACb,AA/QL,2DAyRG,cAAc,CAKd,AA9RH,iEA4RI,YAAa,CACb,AA7RJ,kCAqSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA0DjC,AAnWF,wCA4SG,YAAa,CACb,AA7SH,yDAiTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AAxUH,wFAsTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AA1TJ,8DA+TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAvUJ,mDA4UG,kBAAiB,AACjB,qBAAoB,AACpB,sBApWqB,AAqWrB,mBAAmB,AACnB,iBAAgB,AAChB,UApWe,CAqXf,AAlWH,kFAqVK,gBAAiB,AACjB,4BAAwD,CASxD,AA/VL,sGAyVM,4BA7Wc,CA8Wd,AA1VN,yGA6VM,yBAjXc,CAkXd,AA9VN,wCAuWE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AArXF,6CA8WG,OAAM,AACN,UAAU,CACV,AAhXH,8CAmXG,gBAAgB,CAChB,AApXH,6BA0XE,iBAAgB,AAChB,0BAhYwB,AAiYxB,sBApYyB,AAqYzB,iBAAgB,AAChB,WArYmB,AAsYnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAkFpB,AAxdF,qDAyYG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAUxD,6BAjawB,AAkaxB,0BA9aiB,AAgbjB,eAAgB,CAMhB,AAlaH,oEAkZI,4BAAwD,CAKxD,AAvZJ,iGAqZK,YAAa,CACb,AAtZL,gEA+ZI,mBAAkB,AAClB,kBAAkB,CAClB,AAjaJ,kDAsaG,WA7akB,AA8alB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA1aH,kDA8aG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAzboB,AA0bpB,iBAAiB,CACjB,AArbH,8CAybG,YAAY,CACZ,AA1bH,6CA8bG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAzcoB,AA0cpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AAvdH,oDAycI,UA7cmB,CA8cnB,AA1cJ,sDA6cI,UAAU,CACV,AA9cJ,kEAkdK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AArdL,6BA4dE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAlgBF,mDA2eG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAjgBH,qEAwfI,sBAAqB,AACrB,UAAU,CACV,AA1fJ,mEA8fI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAE1C,4BAhiBmB,CAy4BnB,AA/WD,4CAKC,qBAjiBuB,CAsiBtB,AAVF,0CAaE,sBAriBsB,AAsiBtB,cAAe,CACf,AAfF,kCAkBE,wBAxiB6B,CAyiB7B,AAnBF,wCAsBE,yBA3iBkC,AA4iBlC,cAAe,CACf,AAxBF,gCA2BE,kBAAkB,AAElB,0BAvjBkB,AAwjBlB,6BAxjBkB,AA0jBlB,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,2BAzlBiB,CA0lBjB,AAhEH,wDAmEG,0BA7lBiB,CA8lBjB,AApEH,8CAwEE,sBAAqB,AAErB,YAAW,AAEX,0BAtmBkB,AAumBlB,4BAvmBkB,CA0nBlB,AAhGF,oDAgFG,YAAY,CACZ,AAjFH,oDAoFG,cA9nBW,CAyoBX,AA/FH,0DAwFK,iBAAkB,CAKlB,AA7FL,wEA2FM,kBAAkB,CAClB,AA5FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAloBkB,AAmoBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA6LtB,AAzSF,4CA+GG,iBAAkB,CAClB,AAhHH,iDAmHG,yBAroBkB,AAsoBlB,SAAU,CAMV,AA1HH,+GAuHI,WAAU,AACV,sBAAsB,CACtB,AAzHJ,yDA6HG,qBA9oBgB,CAqpBhB,AApIH,+HA+HI,WAAU,AACV,uBAAsB,AAEtB,UAnpBe,CAopBf,AAnIJ,6EAyII,YAAa,CACb,AA1IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApKH,8EA0JI,SAAS,CAST,AAnKJ,wGA8JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAlKL,2DAuKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA5sBiB,AA6sBjB,4BA7sBiB,CA8sBjB,AApLH,4DAwLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA3tBe,AA4tBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAzPH,kEAyMI,eAAc,AACd,yBAA4B,CAC5B,AA3MJ,kGA8MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjOJ,wGAuNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAxvBa,CAyvBb,AAhOL,gGAoOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAnwBc,CAgxBd,AAvPJ,sGA6OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA9wBa,CA+wBb,AAtPL,qEA4PG,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,WAvyBqB,AAwyBrB,gBAAgB,AAChB,eAAe,CAmBf,AAhSH,2EAgRI,UAAU,CACV,AAjRJ,sHAqRK,eAAe,CACf,AAtRL,sOA8RI,YAAY,CACZ,AA/RJ,wDAmSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAxSH,+BA8SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA10BkB,AA20BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CAuDf,AA9WF,qCA0TG,eAAc,AACd,+BAA+B,CAC/B,AA5TH,wEAgUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAn2BkB,AAo2BlB,eAAgB,CAChB,AArUJ,uDAyUG,iBAAiB,CACjB,AA1UH,uDA6UG,iBAAiB,CACjB,AA9UH,uDAiVG,iBAAiB,CACjB,AAlVH,uDAqVG,iBAAiB,CACjB,AAtVH,uDAyVG,kBAAkB,CAClB,AA1VH,gDA+VG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAt4BmB,AAu4BnB,qBAAqB,CACrB,AAxWH,oCA2WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAp5BuB,AAq5BvB,sBAn5BmB,AAq5BnB,eAr6Ba,AAu6Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UA95BgB,CA26BhB,AAjCF,oEAuBG,WAp6BqB,AAq6BrB,kBA35BkB,CA45BlB,AAzBH,mEA4BG,eAAc,AAEd,WA36BqB,AA46BrB,kBAl6BkB,CAm6BlB,AAhCH,8DAoCE,6BA/6BkB,AAi7BlB,YAAW,AACX,gBAAe,AAEf,WAn7BgB,AAo7BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CACzB","file":"tabulator_simple.min.css","sourcesContent":["/* Tabulator v4.4.3 (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\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-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//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\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\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\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\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//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//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\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 width : 0;\r\n\t\t\t\t\t height: 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-arrow{\r\n\t\t\t\t\t\tborder-top: none;\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\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\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-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\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-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\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\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight: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\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\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-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\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-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// 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\r\n"]} \ No newline at end of file diff --git a/js/tabulator/dist/css/tabulator_site.css b/js/tabulator/dist/css/tabulator_site.css new file mode 100644 index 0000000..fdfbea5 --- /dev/null +++ b/js/tabulator/dist/css/tabulator_site.css @@ -0,0 +1,804 @@ +/* Tabulator v4.4.3 (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="fitColumns"] .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-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-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-arrow { + display: inline-block; + position: absolute; + top: 14px; + right: 8px; + 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; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #222 !important; + border: 1px solid #aaa; +} + +.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-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #3FB449; + border-bottom: none; +} + +.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-arrow { + right: calc(50% - 6px); +} + +.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"] { + position: absolute; + top: 0; + left: 0; + height: 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; + 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-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-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:hover { + cursor: pointer; + color: #fff; + background: #1D68CD; +} + +.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-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; +} diff --git a/js/tabulator/dist/css/tabulator_site.min.css b/js/tabulator/dist/css/tabulator_site.min.css new file mode 100644 index 0000000..57e4f7b --- /dev/null +++ b/js/tabulator/dist/css/tabulator_site.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.4.3 (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=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-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-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-arrow{display:inline-block;position:absolute;top:14px;right:8px;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}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#222!important;border:1px solid #aaa}.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-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.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-arrow{right:calc(50% - 6px)}.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]{position:absolute;top:0;left:0;height: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;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-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-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:hover{cursor:pointer;color:#fff;background:#1d68cd}.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-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} +/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/js/tabulator/dist/css/tabulator_site.min.css.map b/js/tabulator/dist/css/tabulator_site.min.css.map new file mode 100644 index 0000000..b023e6c --- /dev/null +++ b/js/tabulator/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,CA8fxB,AA7gBD,iFAoBI,cAAc,CACd,AArBJ,oFA6BK,iBAAkB,CAClB,AA9BL,kCAqCE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAtCF,6BA0CE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCA5E2B,AA6E3B,sBAhFyB,AAiFzB,WAhFmB,AAiFnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAkPpB,AA5SF,qDA6DG,YAAY,CACZ,AA9DH,4CAkEG,qBAAoB,AAEpB,kBAAiB,AACjB,sBAAqB,AACrB,4BApGoB,AAqGpB,sBAvGwB,AAwGxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAoLhB,AA9PH,6DA6EI,kBAAkB,AAClB,yBA3GyB,AA4GzB,mBAA8C,AAC9C,mBAAoB,CACpB,AAjFJ,mEAqFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AA7HJ,wFA2FK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA9GL,gHAqGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA7GN,oFAkHK,qBAAqB,AACrB,kBAAkB,AAClB,SAAQ,AACR,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAlJmB,CAmJnB,AA3HL,0FAoIK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BArKkB,AAsKlB,eAAgB,CAKhB,AA7IL,oHA2IM,iBAAiB,CACjB,AA5IN,0FAmJK,YAAa,CACb,AApJL,+DAyJI,kBAAkB,AAClB,gCAAmD,AACnD,qBAzLmB,CA0LnB,AA5JJ,qEAgKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AArLJ,8EAwKK,qBAAsB,CACtB,AAzKL,yEA4KK,cAAe,CACf,AA7KL,sFAiLO,QAAS,AACT,QAAS,CACV,AAnLN,oFA0LK,kBAAkB,CAClB,AA3LL,qEA8LK,eAAc,AACd,wBAAoD,CACpD,AAhML,uHAoMM,gBAAgB,AAChB,4BA7NkB,CA8NlB,AAtMN,sHA2MM,gBAAgB,AAChB,+BArOmB,CAsOnB,AA7MN,uHAkNM,6BA3OmB,AA4OnB,kBAAmB,CACnB,AApNN,+GA2NM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAjON,oHAsOM,wBAAyB,CACzB,AAvON,2GA4OM,gBAAe,AACf,gBAAgB,CAChB,AA9ON,uIAkPO,gBAAe,AACf,mBAAmB,CACnB,AApPP,uGAyPM,qBAAqB,CACrB,AA1PN,+CAiQG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AA/QH,qEAyQI,2BA5RgB,CA6RhB,AA1QJ,sEA6QI,0BAhSgB,CAiShB,AA9QJ,qDAkRG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BAlTiB,AAqTjB,eAAgB,CAChB,AAnSH,oEAwRI,4BAA0D,CAK1D,AA7RJ,iGA2RK,YAAa,CACb,AA5RL,2DAsSG,cAAc,CAKd,AA3SH,iEAySI,YAAa,CACb,AA1SJ,kCAgTE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAkDjC,AAtWF,wCAuTG,YAAa,CACb,AAxTH,yDA4TG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AAnVH,wFAiUI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AArUJ,8DA0UI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA5WyB,AA6WzB,gBAAiB,AACjB,cAAe,CACf,AAlVJ,mDAuVG,kBAAiB,AACjB,qBAAoB,AACpB,sBA9WqB,AA+WrB,mBAAmB,AACnB,iBAAgB,AAChB,UA9We,CAuXf,AArWH,kFAgWK,gBAAiB,AACjB,6BAA0D,AAC1D,UAjYgB,CAkYhB,AAnWL,6BA2WE,iBAAgB,AAChB,gBAAe,AACf,6BAlX2B,AAmX3B,sBAtXyB,AAuXzB,iBAAgB,AAChB,WAvXmB,AAwXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AA/cF,qDA2XG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BAhaiB,AAkajB,eAAgB,CAMhB,AArZH,oEAoYI,6BAA0D,AAC1D,oBAAiC,CAKjC,AA1YJ,iGAwYK,YAAa,CACb,AAzYL,gEAkZI,mBAAkB,AAClB,kBAAkB,CAClB,AApZJ,wDA0ZI,UAAU,CACV,AA3ZJ,kDAgaG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA3aoB,AA4apB,iBAAiB,CACjB,AAvaH,8CA2aG,YAAY,CACZ,AA5aH,6CAgbG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA3boB,AA4bpB,kBAAiB,AAEjB,gBAAe,AAEf,WAjckB,AAkclB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AA9cH,oDAgcI,aArcyB,CAsczB,AAjcJ,sDAocI,UAAU,CACV,AArcJ,kEAycK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA5cL,wCAmdE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjeF,6CA0dG,OAAM,AACN,UAAU,CACV,AA5dH,8CA+dG,gBAAgB,CAChB,AAheH,6BAseE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA5gBF,mDAqfG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA3gBH,qEAkgBI,sBAAqB,AACrB,UAAU,CACV,AApgBJ,mEAwgBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAziBuB,CAs5BvB,AAjXD,kCAQE,wBA5iB4B,CA6iB5B,AATF,0CAYE,sBA7iBsB,AA8iBtB,cAAe,CACf,AAdF,kCAiBE,wBAhjB6B,CAijB7B,AAlBF,wCAqBE,yBAnjBkC,AAojBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BApkBkB,AAqkBlB,6BArkBkB,AAukBlB,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,2BAtmBiB,CAumBjB,AApEH,wDAuEG,0BA1mBiB,CA2mBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BAnnBkB,AAonBlB,4BApnBkB,CAuoBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cA3oBW,CAspBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA/oBkB,AAgpBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA0LtB,AA1SF,iDAoHG,yBAhpBkB,AAipBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAzpBgB,CAgqBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UA9pBe,CA+pBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBA3sBoB,CA4sBpB,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAttBiB,AAutBjB,4BAvtBiB,CAwtBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAruBe,AAsuBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlwBa,CAmwBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA7wBc,CA0xBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAxxBa,CAyxBb,AAvPL,qEA6PG,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,WAjzBqB,AAkzBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,wDAoSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAzSH,+BA8SE,sBAAqB,AACrB,4BAl1BkB,AAm1BlB,0BAAyB,AACzB,gCA91B2B,AA+1B3B,YAAW,AACX,kBAAiB,AACjB,gBAp2ByB,AAq2BzB,WAp2BmB,AAq2BnB,gBAAgB,AAEhB,cAAe,CAuDf,AA/WF,qCA2TG,eAAc,AACd,wBAAoD,CACpD,AA7TH,wEAiUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BA72BqB,AA82BrB,eAAgB,CAChB,AAtUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,gDAgWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAh5BsB,AAi5BtB,qBAAqB,CACrB,AAzWH,oCA4WG,iBAAgB,AAChB,aA15B0B,CA25B1B,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA/5BuB,AAg6BvB,sBA95BmB,AAg6BnB,eAh7Ba,AAk7Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAz6BgB,CAs7BhB,AAjCF,oEAuBG,WA/6BqB,AAg7BrB,kBAv6BkB,CAw6BlB,AAzBH,mEA4BG,eAAc,AAEd,WAt7BqB,AAu7BrB,kBA96BkB,CA+6BlB,AAhCH,8DAoCE,6BA17BkB,AA47BlB,YAAW,AACX,gBAAe,AAEf,WA97BgB,AA+7BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CACzB","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.4.3 (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=\"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//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\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:14px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\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\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\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//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//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\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 width : 0;\r\n\t\t\t\t\t height: 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-arrow{\r\n\t\t\t\t\t\tborder-top: none;\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\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\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-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\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-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\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\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight: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\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\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-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\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-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// 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\r\n"]} \ No newline at end of file diff --git a/js/tabulator/dist/js/jquery_wrapper.js b/js/tabulator/dist/js/jquery_wrapper.js new file mode 100644 index 0000000..d14ca6d --- /dev/null +++ b/js/tabulator/dist/js/jquery_wrapper.js @@ -0,0 +1,46 @@ +/* Tabulator v4.4.3 (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', 'jquery-ui', 'tabulator'], factory); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery'), require('jquery-ui'), require('tabulator')); + } else { + factory(jQuery); + } +})(function ($, undefined, Tabulator) { + $.widget("ui.tabulator", { + _create: function _create() { + this.table = new Tabulator(this.element[0], this.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/js/tabulator/dist/js/jquery_wrapper.min.js b/js/tabulator/dist/js/jquery_wrapper.min.js new file mode 100644 index 0000000..f28468d --- /dev/null +++ b/js/tabulator/dist/js/jquery_wrapper.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (c) Oliver Folkerd */ +!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui","tabulator"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery"),require("jquery-ui"),require("tabulator")):e(jQuery)}(function(e,t,o){e.widget("ui.tabulator",{_create:function(){this.table=new o(this.element[0],this.options);for(var e in o.prototype)"function"==typeof o.prototype[e]&&"_"!==e.charAt(0)&&(this[e]=this.table[e].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/js/tabulator/dist/js/modules/accessor.js b/js/tabulator/dist/js/modules/accessor.js new file mode 100644 index 0000000..b174a5c --- /dev/null +++ b/js/tabulator/dist/js/modules/accessor.js @@ -0,0 +1,91 @@ +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.4.3 (c) Oliver Folkerd */ + +var Accessor = function Accessor(table) { + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "download", "clipboard"]; //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 (dataIn, type) { + var self = this, + key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); + + self.table.columnManager.traverse(function (column) { + var value, accessor, params, component; + + if (column.modules.accessor) { + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if (accessor) { + value = column.getFieldValue(data); + + if (value != "undefined") { + component = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); + } + } + } + }); + + return data; +}, + +//default accessors +Accessor.prototype.accessors = {}; + +Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/accessor.min.js b/js/tabulator/dist/js/modules/accessor.min.js new file mode 100644 index 0000000..4fc25aa --- /dev/null +++ b/js/tabulator/dist/js/modules/accessor.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,r={};this.allowedTypes.forEach(function(c){var t,a="accessor"+(c.charAt(0).toUpperCase()+c.slice(1));o.definition[a]&&(t=e.lookupAccessor(o.definition[a]))&&(s=!0,r[a]={accessor:t,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=r)},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=this,r="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),c=Tabulator.prototype.helpers.deepClone(o||{});return s.table.columnManager.traverse(function(o){var s,t,a,n;o.modules.accessor&&(t=o.modules.accessor[r]||o.modules.accessor.accessor||!1)&&"undefined"!=(s=o.getFieldValue(c))&&(n=o.getComponent(),a="function"==typeof t.params?t.params(s,c,e,n):t.params,o.setFieldValue(c,t.accessor(s,c,e,a,n)))}),c},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/ajax.js b/js/tabulator/dist/js/modules/ajax.js new file mode 100644 index 0000000..afd9deb --- /dev/null +++ b/js/tabulator/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.4.3 (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) { + var self = this; + + if (this.progressiveLoad) { + return this._loadDataProgressive(); + } else { + return this._loadDataStandard(inPosition); + } +}; + +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) { + var _this = this; + + return new Promise(function (resolve, reject) { + _this.sendRequest(inPosition).then(function (data) { + _this.table.rowManager.setData(data, inPosition).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); + } 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"); + } + + self.hideLoader(); + + self.loading = false; + }).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(); + }); + } 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 += "?" + this.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(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/js/tabulator/dist/js/modules/ajax.min.js b/js/tabulator/dist/js/modules/ajax.min.js new file mode 100644 index 0000000..66a965f --- /dev/null +++ b/js/tabulator/dist/js/modules/ajax.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e)},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/js/tabulator/dist/js/modules/calculation_colums.min.js b/js/tabulator/dist/js/modules/calculation_colums.min.js new file mode 100644 index 0000000..9aae8ba --- /dev/null +++ b/js/tabulator/dist/js/modules/calculation_colums.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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},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.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&(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.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=[];return t.forEach(function(t){o.push(t.getData())}),o},ColumnCalcs.prototype.generateRow=function(t,o){var e,i=this,l=this.generateRowData(t,o);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),e=new Row(l,this),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.type="calc",e.generateCells=function(){var o=[];i.table.columnManager.columnsByIndex.forEach(function(l){i.genColumn.setField(l.getField()),i.genColumn.hozAlign=l.hozAlign,l.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(l.definition[t+"CalcFormatter"]),params:l.definition[t+"CalcFormatterParams"]}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=l.definition.cssClass;var a=new Cell(i.genColumn,e);a.column=l,a.setWidth(),l.cells.push(a),o.push(a),l.visible||a.hide()}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,i,l={},a="top"==t?this.topCalcs:this.botCalcs,n="top"==t?"topCalc":"botCalc";return a.forEach(function(t){var a=[];t.modules.columnCalcs&&t.modules.columnCalcs[n]&&(o.forEach(function(o){a.push(t.getFieldValue(o))}),i=n+"Params",e="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](a,o):t.modules.columnCalcs[i],t.setFieldValue(l,t.modules.columnCalcs[n](a,o,e)))}),l},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(),i=t.getSubGroups(),l={};return i.forEach(function(t){l[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:l}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var i=0,l=void 0!==e.precision?e.precision:2;return t.length&&(i=t.reduce(function(t,o){return o=Number(o),t+o}),i/=t.length,i=!1!==l?i.toFixed(l):i),parseFloat(i).toString()},max:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?!1!==l?i.toFixed(l):i:""},min:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t)) max) { + max = len; + } + }); + + headers.forEach(function (title) { + var len = title.length; + if (len < max) { + for (var i = len; i < max; i++) { + title.push(""); + } + } + }); + } + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + return headers; +}; + +Clipboard.prototype.rowsToData = function (rows, columns, config, params) { + var data = []; + + rows.forEach(function (row) { + var rowArray = [], + rowData = row instanceof RowComponent ? row.getData("clipboard") : row; + + columns.forEach(function (column) { + var value = column.getFieldValue(rowData); + + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + rowArray.push(value); + }); + + data.push(rowArray); + }); + + return data; +}; + +Clipboard.prototype.buildComplexRows = function (config) { + var _this3 = this; + + var output = [], + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach(function (group) { + output.push(_this3.processGroupData(group)); + }); + + return output; +}; + +Clipboard.prototype.processGroupData = function (group) { + var _this4 = this; + + var subGroups = group.getSubGroups(); + + var groupData = { + type: "group", + key: group.key + }; + + if (subGroups.length) { + groupData.subGroups = []; + + subGroups.forEach(function (subGroup) { + groupData.subGroups.push(_this4.processGroupData(subGroup)); + }); + } else { + groupData.rows = group.getRows(true); + } + + return groupData; +}; + +Clipboard.prototype.getCalcRow = function (calcs, columns, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + return this.rowsToData([calcData], columns); + } + } + + return []; +}; + +Clipboard.prototype.buildOutput = function (rows, config, params) { + var _this5 = this; + + var output = [], + calcs, + columns = []; + + if (config.columnHeaders == "groups") { + columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); + + output = output.concat(this.groupHeadersToRows(columns)); + } else { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.definition.clipboard || column.visible && column.definition.clipboard !== false) { + columns.push(column); + } + }); + + output.push(this.generateSimpleHeaders(columns)); + } + + if (this.config.columnCalcs) { + calcs = this.table.getCalcResults(); + } + + //generate styled content + if (this.table.options.clipboardCopyStyled) { + this.generateHTML(rows, columns, calcs, config, params); + } + + //generate unstyled content + if (config.rowGroups) { + rows.forEach(function (row) { + output = output.concat(_this5.parseRowGroupData(row, columns, config, params, calcs || {})); + }); + } else { + if (config.columnCalcs) { + output = output.concat(this.getCalcRow(calcs, columns, "top")); + } + + output = output.concat(this.rowsToData(rows, columns, config, params)); + + if (config.columnCalcs) { + output = output.concat(this.getCalcRow(calcs, columns, "bottom")); + } + } + + return output; +}; + +Clipboard.prototype.parseRowGroupData = function (group, columns, config, params, calcObj) { + var _this6 = this; + + var groupData = []; + + groupData.push([group.key]); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + groupData = groupData.concat(_this6.parseRowGroupData(subGroup, config, params, calcObj[group.key] ? calcObj[group.key].groups || {} : {})); + }); + } else { + if (config.columnCalcs) { + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "top")); + } + + groupData = groupData.concat(this.rowsToData(group.rows, columns, config, params)); + + if (config.columnCalcs) { + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "bottom")); + } + } + + return groupData; +}; + +Clipboard.prototype.generateHTML = function (rows, columns, calcs, config, params) { + var self = this, + data = [], + headers = [], + body, + oddRow, + evenRow, + calcRow, + firstRow, + firstCell, + firstGroup, + lastCell, + styleCells; + + //create table element + this.htmlElement = document.createElement("table"); + self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); + + function generateSimpleHeaders() { + var headerEl = document.createElement("tr"); + + columns.forEach(function (column) { + var columnEl = document.createElement("th"); + columnEl.innerHTML = column.definition.title; + + self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); + } + + function generateHeaders(headers) { + + var headerHolderEl = document.createElement("thead"); + + headers.forEach(function (columns) { + var headerEl = document.createElement("tr"); + + columns.forEach(function (column) { + var columnEl = document.createElement("th"); + + if (column.width > 1) { + columnEl.colSpan = column.width; + } + + if (column.height > 1) { + columnEl.rowSpan = column.height; + } + + columnEl.innerHTML = column.title; + + self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerHolderEl.appendChild(headerEl); + }); + + self.htmlElement.appendChild(headerHolderEl); + } + + function parseColumnGroup(column, level) { + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + headers[level].push({ + title: column.title, + width: column.width, + height: 1, + children: !!column.subGroups, + element: column.column.getElement() + }); + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } + } + + function padVerticalColumnheaders() { + headers.forEach(function (row, index) { + row.forEach(function (header) { + if (!header.children) { + header.height = headers.length - index; + } + }); + }); + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + // calcRowIndexs.push(body.length); + processRows([calcData]); + } + } + } + + //create headers if needed + if (config.columnHeaders) { + if (config.columnHeaders == "groups") { + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + padVerticalColumnheaders(); + generateHeaders(headers); + } else { + generateSimpleHeaders(); + } + } + + // columns = this.table.columnManager.columnsByIndex; + + //create table body + body = document.createElement("tbody"); + + //lookup row styles + if (window.getComputedStyle) { + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (firstRow) { + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + function processRows(rowArray) { + //add rows to table + rowArray.forEach(function (row, i) { + var rowEl = document.createElement("tr"), + styleRow = firstRow, + isCalc = false, + rowData; + + if (row instanceof RowComponent) { + rowData = row.getData("clipboard"); + } else { + rowData = row; + isCalc = true; + } + + columns.forEach(function (column, j) { + var cellEl = document.createElement("td"), + value = column.getFieldValue(rowData); + + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + cellEl.innerHTML = value; + + if (column.definition.align) { + cellEl.style.textAlign = column.definition.align; + } + + if (j < columns.length - 1) { + if (firstCell) { + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + } else { + if (firstCell) { + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + } + + rowEl.appendChild(cellEl); + }); + + if (isCalc) { + styleRow = calcRow; + } else { + if (!(i % 2) && oddRow) { + styleRow = oddRow; + } + + if (i % 2 && evenRow) { + styleRow = evenRow; + } + } + + if (styleRow) { + self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + } + + body.appendChild(rowEl); + }); + } + + function processGroup(group, calcObj) { + var groupEl = document.createElement("tr"), + groupCellEl = document.createElement("td"); + + groupCellEl.colSpan = columns.length; + + groupCellEl.innerHTML = group.key; + + groupEl.appendChild(groupCellEl); + body.appendChild(groupEl); + + self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + processGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + processRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + if (config.rowGroups) { + rows.forEach(function (group) { + processGroup(group, calcs || {}); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + processRows(rows); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + this.htmlElement.appendChild(body); +}; + +Clipboard.prototype.mapElementStyles = function (from, to, props) { + + var lookup = { + "background-color": "backgroundColor", + "color": "fontColor", + "font-weight": "fontWeight", + "font-family": "fontFamily", + "font-size": "fontSize", + "border-top": "borderTop", + "border-left": "borderLeft", + "border-right": "borderRight", + "border-bottom": "borderBottom" + }; + + if (window.getComputedStyle) { + var fromStyle = window.getComputedStyle(from); + + props.forEach(function (prop) { + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + + // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; +}; + +Clipboard.prototype.copySelectors = { + userSelection: function userSelection(config, params) { + return params; + }, + selected: function selected(config, params) { + var rows = []; + + if (this.table.modExists("selectRow", true)) { + rows = this.table.modules.selectRow.getSelectedRows(); + } + + if (config.rowGroups) { + console.warn("Clipboard Warning - select coptSelector does not support row groups"); + } + + return this.buildOutput(rows, config, params); + }, + table: function table(config, params) { + if (config.rowGroups) { + console.warn("Clipboard Warning - table coptSelector does not support row groups"); + } + + return this.buildOutput(this.table.rowManager.getComponents(), config, params); + }, + active: function active(config, params) { + var rows; + + if (config.rowGroups) { + rows = this.buildComplexRows(config); + } else { + rows = this.table.rowManager.getComponents(true); + } + + return this.buildOutput(rows, config, params); + } +}; + +Clipboard.prototype.copyFormatters = { + raw: function raw(data, params) { + return data; + }, + table: function table(data, params) { + var output = []; + + data.forEach(function (row) { + row.forEach(function (value) { + if (typeof value == "undefined") { + value = ""; + } + + value = typeof value == "undefined" || value === null ? "" : value.toString(); + + if (value.match(/\r|\n/)) { + value = value.split('"').join('""'); + value = '"' + value + '"'; + } + }); + + output.push(row.join("\t")); + }); + + return output.join("\n"); + } +}; + +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); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/clipboard.min.js b/js/tabulator/dist/js/modules/clipboard.min.js new file mode 100644 index 0000000..5c068c1 --- /dev/null +++ b/js/tabulator/dist/js/modules/clipboard.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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},Clipboard=function(t){this.table=t,this.mode=!0,this.copySelector=!1,this.copySelectorParams={},this.copyFormatter=!1,this.copyFormatterParams={},this.pasteParser=function(){},this.pasteAction=function(){},this.htmlElement=!1,this.config={},this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(o){var e;t.processConfig(),t.blocked||(o.preventDefault(),e=t.generateContent(),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",e):o.clipboardData&&o.clipboardData.setData?(o.clipboardData.setData("text/plain",e),t.htmlElement&&o.clipboardData.setData("text/html",t.htmlElement.outerHTML)):o.originalEvent&&o.originalEvent.clipboardData.setData&&(o.originalEvent.clipboardData.setData("text/plain",e),t.htmlElement&&o.originalEvent.clipboardData.setData("text/html",t.htmlElement.outerHTML)),t.table.options.clipboardCopied.call(this.table,e),t.reset())}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(o){t.paste(o)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.processConfig=function(){var t={columnHeaders:"groups",rowGroups:!0,columnCalcs:!0};if(void 0!==this.table.options.clipboardCopyHeader&&(t.columnHeaders=this.table.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),this.table.options.clipboardCopyConfig)for(var o in this.table.options.clipboardCopyConfig)t[o]=this.table.options.clipboardCopyConfig[o];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnHeaders?"groups"!==t.columnHeaders&&!0!==t||this.table.columnManager.columns.length==this.table.columnManager.columnsByIndex.length?this.config.columnHeaders="columns":this.config.columnHeaders="groups":this.config.columnHeaders=!1,t.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},Clipboard.prototype.reset=function(){this.blocked=!1,this.originalSelectionText=""},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var o,e,r;this.checkPaseOrigin(t)&&(o=this.getPasteData(t),e=this.pasteParser.call(this,o),e?(t.preventDefault(),this.table.modExists("mutator")&&(e=this.mutateData(e)),r=this.pasteAction.call(this,e),this.table.options.clipboardPasted.call(this.table,o,e,r)):this.table.options.clipboardPasteError.call(this.table,o))},Clipboard.prototype.mutateData=function(t){var o=this,e=[];return Array.isArray(t)?t.forEach(function(t){e.push(o.table.modules.mutator.transformRow(t,"clipboard"))}):e=t,e},Clipboard.prototype.checkPaseOrigin=function(t){var o=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(o=!1),o},Clipboard.prototype.getPasteData=function(t){var o;return window.clipboardData&&window.clipboardData.getData?o=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?o=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(o=t.originalEvent.clipboardData.getData("text/plain")),o},Clipboard.prototype.copy=function(t,o,e,r,a){var n,i,l;this.blocked=!1,!0!==this.mode&&"copy"!==this.mode||(void 0!==window.getSelection&&void 0!==document.createRange?(n=document.createRange(),n.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&a&&(t="userSelection",e="raw",o=i.toString()),i.removeAllRanges(),i.addRange(n)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(l=document.body.createTextRange(),l.moveToElementText(this.table.element),l.select()),this.setSelector(t),this.copySelectorParams=void 0!==o&&null!=o?o:this.config.columnHeaders,this.setFormatter(e),this.copyFormatterParams=void 0!==r&&null!=r?r:{},document.execCommand("copy"),i&&i.removeAllRanges())},Clipboard.prototype.setSelector=function(t){switch(t=t||this.table.options.clipboardCopySelector,void 0===t?"undefined":_typeof(t)){case"string":this.copySelectors[t]?this.copySelector=this.copySelectors[t]:console.warn("Clipboard Error - No such selector found:",t);break;case"function":this.copySelector=t}},Clipboard.prototype.setFormatter=function(t){switch(t=t||this.table.options.clipboardCopyFormatter,void 0===t?"undefined":_typeof(t)){case"string":this.copyFormatters[t]?this.copyFormatter=this.copyFormatters[t]:console.warn("Clipboard Error - No such formatter found:",t);break;case"function":this.copyFormatter=t}},Clipboard.prototype.generateContent=function(){var t;return this.htmlElement=!1,t=this.copySelector.call(this,this.config,this.copySelectorParams),this.copyFormatter.call(this,t,this.config,this.copyFormatterParams)},Clipboard.prototype.generateSimpleHeaders=function(t){var o=[];return t.forEach(function(t){o.push(t.definition.title)}),o},Clipboard.prototype.generateColumnGroupHeaders=function(t){var o=this,e=[];return this.table.columnManager.columns.forEach(function(t){var r=o.processColumnGroup(t);r&&e.push(r)}),e},Clipboard.prototype.processColumnGroup=function(t){var o=this,e=t.columns,r={type:"group",title:t.definition.title,column:t};if(e.length){if(r.subGroups=[],r.width=0,e.forEach(function(t){var e=o.processColumnGroup(t);e&&(r.width+=e.width,r.subGroups.push(e))}),!r.width)return!1}else{if(!t.field||!(t.definition.clipboard||t.visible&&!1!==t.definition.clipboard))return!1;r.width=1}return r},Clipboard.prototype.groupHeadersToRows=function(t){function o(t,a){void 0===r[a]&&(r[a]=[]),r[a].push(t.title),t.subGroups?t.subGroups.forEach(function(t){o(t,a+1)}):e()}function e(){var t=0;r.forEach(function(o){var e=o.length;e>t&&(t=e)}),r.forEach(function(o){var e=o.length;if(e1&&(o.colSpan=t.width),t.height>1&&(o.rowSpan=t.height),o.innerHTML=t.title,g.mapElementStyles(t.element,o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),g.mapElementStyles(g.table.columnManager.getHeadersElement(),e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),g.htmlElement.appendChild(o)}(y)):function(){var t=document.createElement("tr");o.forEach(function(o){var e=document.createElement("th");e.innerHTML=o.definition.title,g.mapElementStyles(o.getElement(),e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(e)}),g.mapElementStyles(g.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),g.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),c=document.createElement("tbody"),window.getComputedStyle&&(p=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),u=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),d=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),h=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),f=this.table.element.getElementsByClassName("tabulator-group")[0],h&&(m=h.getElementsByClassName("tabulator-cell"),b=m[0],m[m.length-1])),r.rowGroups?t.forEach(function(t){s(t,e||{})}):(r.columnCalcs&&i(e,"top"),l(t),r.columnCalcs&&i(e,"bottom")),this.htmlElement.appendChild(c)},Clipboard.prototype.mapElementStyles=function(t,o,e){var r={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var a=window.getComputedStyle(t);e.forEach(function(t){o.style[r[t]]=a.getPropertyValue(t)})}},Clipboard.prototype.copySelectors={userSelection:function(t,o){return o},selected:function(t,o){var e=[];return this.table.modExists("selectRow",!0)&&(e=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(e,t,o)},table:function(t,o){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,o)},active:function(t,o){var e;return e=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(e,t,o)}},Clipboard.prototype.copyFormatters={raw:function(t,o){return t},table:function(t,o){var e=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),e.push(t.join("\t"))}),e.join("\n")}},Clipboard.prototype.pasteParsers={table:function(t){var o=[],e=!0,r=this.table.columnManager.columns,a=[],n=[];return t=t.split("\n"),t.forEach(function(t){o.push(t.split("\t"))}),!(!o.length||1===o.length&&o[0].length<2)&&(!0,o[0].forEach(function(t){var o=r.find(function(o){return t&&o.definition.title&&t.trim()&&o.definition.title.trim()===t.trim()});o?a.push(o):e=!1}),e||(e=!0,a=[],o[0].forEach(function(t){var o=r.find(function(o){return t&&o.field&&t.trim()&&o.field.trim()===t.trim()});o?a.push(o):e=!1}),e||(a=this.table.columnManager.columnsByIndex)),e&&o.shift(),o.forEach(function(t){var o={};t.forEach(function(t,e){a[e]&&(o[a[e].field]=t)}),n.push(o)}),n)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/data_tree.js b/js/tabulator/dist/js/modules/data_tree.js new file mode 100644 index 0000000..8686cb3 --- /dev/null +++ b/js/tabulator/dist/js/modules/data_tree.js @@ -0,0 +1,341 @@ +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.4.3 (c) Oliver Folkerd */ + +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; + + row.modules.dataTree = { + index: 0, + open: children ? this.startOpen(row.getComponent(), 0) : false, + controlEl: false, + branchEl: false, + 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) { + config.branchEl.parentNode.removeChild(config.branchEl); + } + + this.generateControlElement(row, el); + + if (config.index) { + if (this.branchEl) { + config.branchEl = this.branchEl.cloneNode(true); + el.insertBefore(config.branchEl, el.firstChild); + config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + 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 _this = 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(); + _this.collapseRow(row); + }); + } else { + config.controlEl = this.expandEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this.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 _this2 = this; + + var output = []; + + rows.forEach(function (row, i) { + var config, children; + + output.push(row); + + if (row instanceof Row) { + + config = row.modules.dataTree.children; + + if (!config.index && config.children !== false) { + children = _this2.getChildren(row); + + children.forEach(function (child) { + output.push(child); + }); + } + } + }); + + return output; +}; + +DataTree.prototype.getChildren = function (row) { + var _this3 = 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")) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + if (this.table.modExists("sort")) { + this.table.modules.sort.sort(children); + } + + children.forEach(function (child) { + output.push(child); + + var subChildren = _this3.getChildren(child); + + subChildren.forEach(function (sub) { + output.push(sub); + }); + }); + } + + return output; +}; + +DataTree.prototype.generateChildren = function (row) { + var _this4 = this; + + var children = []; + + var childArray = row.getData()[this.field]; + + if (!Array.isArray(childArray)) { + childArray = [childArray]; + } + + childArray.forEach(function (childData) { + var childRow = new Row(childData || {}, _this4.table.rowManager); + childRow.modules.dataTree.index = row.modules.dataTree.index + 1; + childRow.modules.dataTree.parent = row; + if (childRow.modules.dataTree.children) { + childRow.modules.dataTree.open = _this4.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.getTreeChildren = function (row) { + 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(childRow.getComponent()); + } + }); + } + + return output; +}; + +DataTree.prototype.checkForRestyle = function (cell) { + if (!cell.row.cells.indexOf(cell)) { + if (cell.row.modules.dataTree.children !== false) { + 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); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/data_tree.min.js b/js/tabulator/dist/js/modules/data_tree.min.js new file mode 100644 index 0000000..c98b238 --- /dev/null +++ b/js/tabulator/dist/js/modules/data_tree.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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},DataTree=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var e=null,t=this.table.columnManager.getFirstVisibileColumn(),a=this.table.options;switch(this.field=a.dataTreeChildField,this.indent=a.dataTreeChildIndent,this.elementField=a.dataTreeElementColumn||!!t&&t.field,a.dataTreeBranchElement&&(!0===a.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof a.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=a.dataTreeBranchElement),a.dataTreeCollapseElement?"string"==typeof a.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=a.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),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;e.modules.dataTree={index:0,open:!!n&&this.startOpen(e.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,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.removeChild(n.branchEl),this.generateControlElement(e,a),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+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&&(r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){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.modules.filter.filter(a.children):a.children,this.table.modExists("sort")&&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.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.getTreeChildren=function(e){var t=e.modules.dataTree,a=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),t.children.forEach(function(e){e instanceof Row&&a.push(e.getComponent())})),a},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||!1!==e.row.modules.dataTree.children&&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/js/tabulator/dist/js/modules/download.js b/js/tabulator/dist/js/modules/download.js new file mode 100644 index 0000000..277bbf0 --- /dev/null +++ b/js/tabulator/dist/js/modules/download.js @@ -0,0 +1,900 @@ +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.4.3 (c) Oliver Folkerd */ + +var Download = function Download(table) { + this.table = table; //hold Tabulator object + this.fields = {}; //hold filed multi dimension arrays + this.columnsByIndex = []; //hold columns in their order in the table + this.columnsByField = {}; //hold columns with lookup by field name + this.config = {}; +}; + +//trigger file download +Download.prototype.download = function (type, filename, options, interceptCallback) { + var self = this, + downloadFunc = false; + this.processConfig(); + + 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); + } + } + + this.processColumns(); + + if (downloadFunc) { + downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); + } +}; + +Download.prototype.processConfig = function () { + var config = { //download config + columnGroups: true, + rowGroups: true, + columnCalcs: true + }; + + if (this.table.options.downloadConfig) { + for (var key in this.table.options.downloadConfig) { + config[key] = this.table.options.downloadConfig[key]; + } + } + + if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { + this.config.rowGroups = true; + } + + if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { + this.config.columnGroups = true; + } + + if (config.columnCalcs && this.table.modExists("columnCalcs")) { + this.config.columnCalcs = true; + } +}; + +Download.prototype.processColumns = function () { + var self = this; + + self.columnsByIndex = []; + self.columnsByField = {}; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.field && column.definition.download !== false && (column.visible || !column.visible && column.definition.download)) { + self.columnsByIndex.push(column); + self.columnsByField[column.field] = column; + } + }); +}; + +Download.prototype.processDefinitions = function () { + var self = this, + processedDefinitions = []; + + if (this.config.columnGroups) { + self.table.columnManager.columns.forEach(function (column) { + var colData = self.processColumnGroup(column); + + if (colData) { + processedDefinitions.push(colData); + } + }); + } else { + self.columnsByIndex.forEach(function (column) { + if (column.download !== false) { + //isolate definiton from defintion object + processedDefinitions.push(self.processDefinition(column)); + } + }); + } + + return processedDefinitions; +}; + +Download.prototype.processColumnGroup = function (column) { + var _this = this; + + var subGroups = column.columns, + maxDepth = 0; + var processedColumn = this.processDefinition(column); + var groupData = { + type: "group", + title: processedColumn.title, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this.processColumnGroup(subGroup); + + if (subGroupData.depth > maxDepth) { + maxDepth = subGroupData.depth; + } + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + } + }); + + groupData.depth += maxDepth; + + if (!groupData.width) { + return false; + } + } else { + if (column.field && column.definition.download !== false && (column.visible || !column.visible && column.definition.download)) { + groupData.width = 1; + groupData.definition = processedColumn; + } else { + return false; + } + } + + return groupData; +}; + +Download.prototype.processDefinition = function (column) { + var def = {}; + + for (var key in column.definition) { + def[key] = column.definition[key]; + } + + if (typeof column.definition.downloadTitle != "undefined") { + def.title = column.definition.downloadTitle; + } + + return def; +}; + +Download.prototype.processData = function () { + var _this2 = this; + + var self = this, + data = [], + groups = [], + calcs = {}; + + if (this.config.rowGroups) { + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach(function (group) { + data.push(_this2.processGroupData(group)); + }); + } else { + data = self.table.rowManager.getData(true, "download"); + } + + if (this.config.columnCalcs) { + calcs = this.table.getCalcResults(); + + data = { + calcs: calcs, + data: data + }; + } + + //bulk data processing + if (typeof self.table.options.downloadDataFormatter == "function") { + data = self.table.options.downloadDataFormatter(data); + } + + return data; +}; + +Download.prototype.processGroupData = function (group) { + var _this3 = this; + + var subGroups = group.getSubGroups(); + + var groupData = { + type: "group", + key: group.key + }; + + if (subGroups.length) { + groupData.subGroups = []; + + subGroups.forEach(function (subGroup) { + groupData.subGroups.push(_this3.processGroupData(subGroup)); + }); + } else { + groupData.rows = group.getData(true, "download"); + } + + return groupData; +}; + +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(); + } + } +}; + +//nested field lookup +Download.prototype.getFieldValue = function (field, data) { + var column = this.columnsByField[field]; + + if (column) { + return column.getFieldValue(data); + } + + return false; +}; + +Download.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "intercept": + this.download(data.type, "", data.options, data.intercept); + break; + } +}; + +//downloaders +Download.prototype.downloaders = { + csv: function csv(columns, data, options, setFileContents, config) { + var self = this, + titles = [], + fields = [], + delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents, + output; + + //build column headers + function parseSimpleTitles() { + columns.forEach(function (column) { + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.field); + }); + } + + function parseColumnGroup(column, level) { + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } else { + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.definition.field); + } + } + + if (config.columnGroups) { + console.warn("Download Warning - CSV downloader cannot process column groups"); + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + } else { + parseSimpleTitles(); + } + + //generate header row + fileContents = [titles.join(delimiter)]; + + function parseRows(data) { + //generate each row of the table + data.forEach(function (row) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + //escape quotation marks + rowData.push('"' + String(value).split('"').join('""') + '"'); + }); + + fileContents.push(rowData.join(delimiter)); + }); + } + + function parseGroup(group) { + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup); + }); + } else { + parseRows(group.rows); + } + } + + if (config.columnCalcs) { + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + if (config.rowGroups) { + console.warn("Download Warning - CSV downloader cannot process row groups"); + + data.forEach(function (group) { + parseGroup(group); + }); + } else { + parseRows(data); + } + + output = fileContents.join("\n"); + + if (options.bom) { + output = "\uFEFF" + output; + } + + setFileContents(output, "text/csv"); + }, + + json: function json(columns, data, options, setFileContents, config) { + var fileContents; + + if (config.columnCalcs) { + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + fileContents = JSON.stringify(data, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf: function pdf(columns, data, options, setFileContents, config) { + var self = this, + fields = [], + header = [], + body = [], + calcs = {}, + headerDepth = 1, + table = "", + 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 (config.columnCalcs) { + calcs = data.calcs; + data = data.data; + } + + if (!jsPDFParams.orientation) { + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if (!jsPDFParams.unit) { + jsPDFParams.unit = "pt"; + } + + //build column headers + function parseSimpleTitles() { + columns.forEach(function (column) { + if (column.field) { + header.push(column.title || ""); + fields.push(column.field); + } + }); + + header = [header]; + } + + function parseColumnGroup(column, level) { + var colSpan = column.width, + rowSpan = 1, + col = { + content: column.title || "" + }; + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + rowSpan = 1; + } else { + fields.push(column.definition.field); + rowSpan = headerDepth - level; + } + + col.rowSpan = rowSpan; + // col.colSpan = colSpan; + + header[level].push(col); + + colSpan--; + + if (rowSpan > 1) { + for (var i = level + 1; i < headerDepth; i++) { + header[i].push(""); + } + } + + for (var i = 0; i < colSpan; i++) { + header[level].push(""); + } + } + + if (config.columnGroups) { + columns.forEach(function (column) { + if (column.depth > headerDepth) { + headerDepth = column.depth; + } + }); + + for (var i = 0; i < headerDepth; i++) { + header.push([]); + } + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + } else { + parseSimpleTitles(); + } + + function parseValue(value) { + switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + return value; + } + + function parseRows(data) { + //build table rows + data.forEach(function (row) { + body.push(parseRow(row)); + }); + } + + function parseRow(row, styles) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + value = parseValue(value); + + if (styles) { + rowData.push({ + content: value, + styles: styles + }); + } else { + rowData.push(value); + } + }); + + return rowData; + } + + function parseGroup(group, calcObj) { + var groupData = []; + + groupData.push({ content: parseValue(group.key), colSpan: fields.length, styles: rowGroupStyles }); + + body.push(groupData); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + body.push(parseRow(calcData, rowCalcStyles)); + } + } + } + + if (config.rowGroups) { + data.forEach(function (group) { + parseGroup(group, calcs); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + 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(columns, data, options, setFileContents, config) { + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = { SheetNames: [], Sheets: {} }, + calcs = {}, + groupRowIndexs = [], + groupColumnIndexs = [], + calcRowIndexs = [], + output; + + if (config.columnCalcs) { + calcs = data.calcs; + data = data.data; + } + + function generateSheet() { + var titles = [], + fields = [], + rows = [], + worksheet; + + //convert rows to worksheet + function rowsToSheet() { + var sheet = {}; + var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; + + XLSX.utils.sheet_add_aoa(sheet, rows); + + sheet['!ref'] = XLSX.utils.encode_range(range); + + var merges = generateMerges(); + + if (merges.length) { + sheet["!merges"] = merges; + } + + return sheet; + } + + function parseSimpleTitles() { + //get field lists + columns.forEach(function (column) { + titles.push(column.title); + fields.push(column.field); + }); + + rows.push(titles); + } + + function parseColumnGroup(column, level) { + + if (typeof titles[level] === "undefined") { + titles[level] = []; + } + + if (typeof groupColumnIndexs[level] === "undefined") { + groupColumnIndexs[level] = []; + } + + if (column.width > 1) { + + groupColumnIndexs[level].push({ + type: "hoz", + start: titles[level].length, + end: titles[level].length + column.width - 1 + }); + } + + titles[level].push(column.title); + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } else { + fields.push(column.definition.field); + padColumnTitles(fields.length - 1, level); + + groupColumnIndexs[level].push({ + type: "vert", + start: fields.length - 1 + }); + } + } + + function padColumnTitles() { + var max = 0; + + titles.forEach(function (title) { + var len = title.length; + if (len > max) { + max = len; + } + }); + + titles.forEach(function (title) { + var len = title.length; + if (len < max) { + for (var i = len; i < max; i++) { + title.push(""); + } + } + }); + } + + if (config.columnGroups) { + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + titles.forEach(function (title) { + rows.push(title); + }); + } else { + parseSimpleTitles(); + } + + function generateMerges() { + var output = []; + + groupRowIndexs.forEach(function (index) { + output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); + }); + + groupColumnIndexs.forEach(function (merges, level) { + merges.forEach(function (merge) { + if (merge.type === "hoz") { + output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); + } else { + if (level != titles.length - 1) { + output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); + } + } + }); + }); + + return output; + } + + //generate each row of the table + function parseRows(data) { + data.forEach(function (row) { + rows.push(parseRow(row)); + }); + } + + function parseRow(row) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + rowData.push(!(value instanceof Date) && (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" ? JSON.stringify(value) : value); + }); + + return rowData; + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + calcRowIndexs.push(rows.length); + rows.push(parseRow(calcData)); + } + } + } + + function parseGroup(group, calcObj) { + var groupData = []; + + groupData.push(group.key); + + groupRowIndexs.push(rows.length); + + rows.push(groupData); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + if (config.rowGroups) { + data.forEach(function (group) { + parseGroup(group, calcs); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + worksheet = rowsToSheet(); + + 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.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { + type: "xlsx", + options: { sheetOnly: true }, + intercept: function intercept(data) { + workbook.Sheets[sheet] = data; + } + }); + } + } + } else { + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + //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"); + } + +}; + +Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/download.min.js b/js/tabulator/dist/js/modules/download.min.js new file mode 100644 index 0000000..01df3e1 --- /dev/null +++ b/js/tabulator/dist/js/modules/download.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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},Download=function(o){this.table=o,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};Download.prototype.download=function(o,n,t,e){function i(t,i){e?!0===e?s.triggerDownload(t,i,o,n,!0):e(t):s.triggerDownload(t,i,o,n)}var s=this,r=!1;this.processConfig(),"function"==typeof o?r=o:s.downloaders[o]?r=s.downloaders[o]:console.warn("Download Error - No such download type found: ",o),this.processColumns(),r&&r.call(this,s.processDefinitions(),s.processData(),t||{},i,this.config)},Download.prototype.processConfig=function(){var o={columnGroups:!0,rowGroups:!0,columnCalcs:!0};if(this.table.options.downloadConfig)for(var n in this.table.options.downloadConfig)o[n]=this.table.options.downloadConfig[n];o.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),o.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0),o.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},Download.prototype.processColumns=function(){var o=this;o.columnsByIndex=[],o.columnsByField={},o.table.columnManager.columnsByIndex.forEach(function(n){n.field&&!1!==n.definition.download&&(n.visible||!n.visible&&n.definition.download)&&(o.columnsByIndex.push(n),o.columnsByField[n.field]=n)})},Download.prototype.processDefinitions=function(){var o=this,n=[];return this.config.columnGroups?o.table.columnManager.columns.forEach(function(t){var e=o.processColumnGroup(t);e&&n.push(e)}):o.columnsByIndex.forEach(function(t){!1!==t.download&&n.push(o.processDefinition(t))}),n},Download.prototype.processColumnGroup=function(o){var n=this,t=o.columns,e=0,i=this.processDefinition(o),s={type:"group",title:i.title,depth:1};if(t.length){if(s.subGroups=[],s.width=0,t.forEach(function(o){var t=n.processColumnGroup(o);t.depth>e&&(e=t.depth),t&&(s.width+=t.width,s.subGroups.push(t))}),s.depth+=e,!s.width)return!1}else{if(!o.field||!1===o.definition.download||!(o.visible||!o.visible&&o.definition.download))return!1;s.width=1,s.definition=i}return s},Download.prototype.processDefinition=function(o){var n={};for(var t in o.definition)n[t]=o.definition[t];return void 0!==o.definition.downloadTitle&&(n.title=o.definition.downloadTitle),n},Download.prototype.processData=function(){var o=this,n=this,t=[],e=[],i={};return this.config.rowGroups?(e=this.table.modules.groupRows.getGroups(),e.forEach(function(n){t.push(o.processGroupData(n))})):t=n.table.rowManager.getData(!0,"download"),this.config.columnCalcs&&(i=this.table.getCalcResults(),t={calcs:i,data:t}),"function"==typeof n.table.options.downloadDataFormatter&&(t=n.table.options.downloadDataFormatter(t)),t},Download.prototype.processGroupData=function(o){var n=this,t=o.getSubGroups(),e={type:"group",key:o.key};return t.length?(e.subGroups=[],t.forEach(function(o){e.subGroups.push(n.processGroupData(o))})):e.rows=o.getData(!0,"download"),e},Download.prototype.triggerDownload=function(o,n,t,e,i){var s=document.createElement("a"),r=new Blob([o],{type:n}),e=e||"Tabulator."+("function"==typeof t?"txt":t);(r=this.table.options.downloadReady.call(this.table,o,r))&&(i?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,e):(s.setAttribute("href",window.URL.createObjectURL(r)),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.getFieldValue=function(o,n){var t=this.columnsByField[o];return!!t&&t.getFieldValue(n)},Download.prototype.commsReceived=function(o,n,t){switch(n){case"intercept":this.download(t.type,"",t.options,t.intercept)}},Download.prototype.downloaders={csv:function(o,n,t,e,i){function s(o,n){o.subGroups?o.subGroups.forEach(function(o){s(o,n+1)}):(f.push('"'+String(o.title).split('"').join('""')+'"'),p.push(o.definition.field))}function r(o){o.forEach(function(o){var n=[];p.forEach(function(t){var e=c.getFieldValue(t,o);switch(void 0===e?"undefined":_typeof(e)){case"object":e=JSON.stringify(e);break;case"undefined":case"null":e="";break;default:e=e}n.push('"'+String(e).split('"').join('""')+'"')}),u.push(n.join(d))})}function a(o){o.subGroups?o.subGroups.forEach(function(o){a(o)}):r(o.rows)}var u,l,c=this,f=[],p=[],d=t&&t.delimiter?t.delimiter:",";i.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),o.forEach(function(o){s(o,0)})):function(){o.forEach(function(o){f.push('"'+String(o.title).split('"').join('""')+'"'),p.push(o.field)})}(),u=[f.join(d)],i.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),n=n.data),i.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),n.forEach(function(o){a(o)})):r(n),l=u.join("\n"),t.bom&&(l="\ufeff"+l),e(l,"text/csv")},json:function(o,n,t,e,i){var s;i.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),n=n.data),s=JSON.stringify(n,null,"\t"),e(s,"application/json")},pdf:function(o,n,t,e,i){function s(o,n){var t=o.width,e=1,i={content:o.title||""};if(o.subGroups?(o.subGroups.forEach(function(o){s(o,n+1)}),e=1):(p.push(o.definition.field),e=y-n),i.rowSpan=e,d[n].push(i),t--,e>1)for(var r=n+1;ry&&(y=o.depth)});for(var S=0;S1&&p[n].push({type:"hoz",start:w[n].length,end:w[n].length+o.width-1}),w[n].push(o.title),o.subGroups?o.subGroups.forEach(function(o){t(o,n+1)}):(y.push(o.definition.field),e(y.length),p[n].push({type:"vert",start:y.length-1}))}function e(){var o=0;w.forEach(function(n){var t=n.length;t>o&&(o=t)}),w.forEach(function(n){var t=n.length;if(t0&&s(E[t-1]);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t=E.indexOf(k),t-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&i.push(t)}),k=i,s(t)}function s(e){for(var t=!1;E.firstChild;)E.removeChild(E.firstChild);k.forEach(function(i){var n=i.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=i.title,n.addEventListener("click",function(){u(i),c()}),n.addEventListener("mousedown",function(){w=!1,setTimeout(function(){w=!0},10)}),i.element=n,e&&i.value==h&&(g.value=i.title,i.element.classList.add("active"),t=!0),i===L&&(i.element.classList.add("active"),t=!0)),E.appendChild(n)}),t||u(!1)}function u(e,t){L&&L.element&&L.element.classList.remove("active"),L=e,e&&e.element&&e.element.classList.add("active")}function c(){f(),L?h!==L.value?(h=L.value,g.value=L.title,i(L.value)):n():a.freetext?(h=g.value,i(g.value)):a.allowEmpty&&""===g.value?(h=g.value,i(g.value)):n()}function d(){f(),n()}function m(){if(!E.parentNode){for(;E.firstChild;)E.removeChild(E.firstChild);C=!0===a.values?o():"string"==typeof a.values?o(a.values):a.values||[],r(C,h);var e=Tabulator.prototype.helpers.elOffset(b);E.style.minWidth=b.offsetWidth+"px",E.style.top=e.top+b.offsetHeight+"px",E.style.left=e.left+"px",document.body.appendChild(E)}}function f(){E.parentNode&&E.parentNode.removeChild(E),v()}function v(){p.table.rowManager.element.removeEventListener("scroll",d)}var p=this,b=e.getElement(),h=e.getValue(),y=void 0!==h||null===h?h:void 0!==a.defaultValue?a.defaultValue:"",g=document.createElement("input"),E=document.createElement("div"),A=[],k=[],C=[],L={},w=!0;if(this.table.rowManager.element.addEventListener("scroll",d),g.setAttribute("type","search"),g.style.padding="4px",g.style.width="100%",g.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var x in a.elementAttributes)"+"==x.charAt(0)?(x=x.slice(1),g.setAttribute(x,g.getAttribute(x)+a.elementAttributes["+"+x])):g.setAttribute(x,a.elementAttributes[x]);return g.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t=k.indexOf(L),u(t>0?k[t-1]:!1);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t=k.indexOf(L),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,o(e)}var l=this,s=e.getElement(),u=e.getValue(),c=s.getElementsByTagName("svg").length||5,d=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),v=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",v.setAttribute("width",d),v.setAttribute("height",d),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var p in a.elementAttributes)"+"==p.charAt(0)?(p=p.slice(1),f.setAttribute(p,f.getAttribute(p)+a.elementAttributes["+"+p])):f.setAttribute(p,a.elementAttributes[p]);for(var b=1;b<=c;b++)!function(e){var t=document.createElement("span"),n=v.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e)}),t.appendChild(n),f.appendChild(t)}(b);return u=Math.min(parseInt(u),c),o(u),f.addEventListener("mousemove",function(e){o(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,a){function o(){var e=d*Math.round(v.offsetWidth/(s.clientWidth/100))+c;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===a.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:a.max,c=void 0===a.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:a.min,d=(u-c)/100,m=e.getValue()||0,f=document.createElement("div"),v=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"),v.style.display="inline-block",v.style.position="relative",v.style.height="100%",v.style.backgroundColor="#488CE9",v.style.maxWidth="100%",v.style.minWidth="0%",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var p in a.elementAttributes)"+"==p.charAt(0)?(p=p.slice(1),v.setAttribute(p,v.getAttribute(p)+a.elementAttributes["+"+p])):v.setAttribute(p,a.elementAttributes[p]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),c),m=Math.round((m-c)/d),v.style.width=m+"%",s.setAttribute("aria-valuemin",c),s.setAttribute("aria-valuemax",u),v.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=v.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(v.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,o())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:v.style.width=v.clientWidth+s.clientWidth/100+"px";break;case 37:v.style.width=v.clientWidth-s.clientWidth/100+"px";break;case 13:o();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),v},tickCross:function(e,t,i,n,a){function o(e){return s?e?c?u:l.checked:l.checked&&!c?(l.checked=!1,l.indeterminate=!0,c=!0,u):(c=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=a.tristate,u=void 0===a.indeterminateValue?null:a.indeterminateValue,c=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var d in a.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),l.setAttribute(d,l.getAttribute(d)+a.elementAttributes["+"+d])):l.setAttribute(d,a.elementAttributes[d]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(c=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus()}),l.checked=!0===r||"true"===r||"True"===r||1===r,l.addEventListener("change",function(e){i(o())}),l.addEventListener("blur",function(e){i(o(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(o()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/filter.js b/js/tabulator/dist/js/modules/filter.js new file mode 100644 index 0000000..88ae538 --- /dev/null +++ b/js/tabulator/dist/js/modules/filter.js @@ -0,0 +1,754 @@ +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.4.3 (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.headerFilterElements = []; //hold header filter elements for manipulation + this.headerFilterColumns = []; //hold columns that use header filters + + 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 = "", + 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 }; + } else { + delete self.headerFilters[field]; + } + + 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) { + 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) { + var oldFilterElement = column.modules.filter.headerElement.parentNode; + var oldFilterElementIndex = self.headerFilterElements.indexOf(oldFilterElement); + if (oldFilterElementIndex >= 0) { + self.headerFilterElements.splice(oldFilterElementIndex, 1); + } + + var oldColumnIndex = self.headerFilterColumns.indexOf(oldColumnIndex); + if (oldColumnIndex >= 0) { + self.headerFilterColumns.splice(oldColumnIndex, 1); + } + + column.contentElement.removeChild(oldFilterElement); + } + + 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); + }, 300); + }; + + 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); + + self.headerFilterElements.push(editorElement); + 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.headerFilterElements.forEach(function (element) { + element.style.display = 'none'; + }); +}; + +//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.showHeaderFilterElements = function () { + this.headerFilterElements.forEach(function (element) { + element.style.display = ''; + }); +}; + +//programatically set value 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()); + } +}; + +//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); + 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); + } 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) { + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + self.addFilter(field); +}; + +//add filter to array +Filter.prototype.addFilter = function (field, type, value) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + + filter = self.findFilter(filter); + + if (filter) { + self.filterList.push(filter); + + self.changed = true; + } + }); + + if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { + 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)); + }; + } else { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, data[filter.field]); + }; + } + } 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.persistentFilter && this.table.modExists("persistence", true)) { + 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.persistentFilter && this.table.modExists("persistence", true)) { + this.table.modules.persistence.save("filter"); + } +}; + +//clear header filters +Filter.prototype.clearHeaderFilter = function () { + var self = this; + + this.headerFilters = {}; + + 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; + } + } + }, + + //in array + "in": function _in(filterVal, rowVal, rowData, filterParams) { + if (Array.isArray(filterVal)) { + return filterVal.indexOf(rowVal) > -1; + } 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/js/tabulator/dist/js/modules/filter.min.js b/js/tabulator/dist/js/modules/filter.min.js new file mode 100644 index 0000000..5971aaf --- /dev/null +++ b/js/tabulator/dist/js/modules/filter.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,l="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",o="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete i.headerFilters[n];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":i.filters[e.definition.headerFilterFunc]?(o=e.definition.headerFilterFunc,r=function(r){var n=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return n="function"==typeof n?n(t,l,r):n,i.filters[e.definition.headerFilterFunc](t,l,r,n)}):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)},o=r}if(!r)switch(l){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},o="like";break;default:r=function(r){return e.getFieldValue(r)==t},o="="}i.headerFilters[n]={value:t,func:r,type:o}}i.changed=!0,i.table.rowManager.filterRefresh()}return!0}var i=this,n=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t){function r(){}var i,n,l,o,a,s,d,u=this,f=this,c=e.modules.filter.success,h=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode){var p=e.modules.filter.headerElement.parentNode,F=f.headerFilterElements.indexOf(p);F>=0&&f.headerFilterElements.splice(F,1);var m=f.headerFilterColumns.indexOf(m);m>=0&&f.headerFilterColumns.splice(m,1),e.contentElement.removeChild(p)}if(h){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},i=document.createElement("div"),i.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":f.table.modules.edit.editors[e.definition.headerFilter]?(n=f.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":n=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?n=e.modules.edit.editor:e.definition.formatter&&f.table.modules.edit.editors[e.definition.formatter]?(n=f.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})):n=f.table.modules.edit.editors.input}if(n){if(o={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return i},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},d=e.definition.headerFilterParams||{},d="function"==typeof d?d.call(f.table):d,!(l=n.call(this.table.modules.edit,o,function(){},c,r,d)))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor returned a value of false");if(!(l instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor should return an instance of Node, the editor returned:",l);h?f.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){l.setAttribute("placeholder",void 0!==e&&e?e:f.table.modules.localize.getText("headerFilters|default"))}):f.table.modules.localize.bind("headerFilters|default",function(e){l.setAttribute("placeholder",void 0!==f.column.definition.headerFilterPlaceholder&&f.column.definition.headerFilterPlaceholder?f.column.definition.headerFilterPlaceholder:e)}),l.addEventListener("click",function(e){e.stopPropagation(),l.focus()}),l.addEventListener("focus",function(e){var t=u.table.columnManager.element.scrollLeft;t!==u.table.rowManager.element.scrollLeft&&(u.table.rowManager.scrollHorizontal(t),u.table.columnManager.scrollHorizontal(t))}),a=!1,s=function(e){a&&clearTimeout(a),a=setTimeout(function(){c(l.value)},300)},e.modules.filter.headerElement=l,e.modules.filter.attrType=l.hasAttribute("type")?l.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=l.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)&&(l.addEventListener("keyup",s),l.addEventListener("search",s),"number"==e.modules.filter.attrType&&l.addEventListener("change",function(e){c(l.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&l.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||l.addEventListener("mousedown",function(e){e.stopPropagation()})),i.appendChild(l),e.contentElement.appendChild(i),f.headerFilterElements.push(l),f.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.headerFilterElements.forEach(function(e){e.style.display="none"})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(e){e.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.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t),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):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){var i=this;i.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r}]),i.addFilter(e)},Filter.prototype.addFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){(e=i.findFilter(e))&&(i.filterList.push(e),i.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&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))}:function(t){return r.filters[e.type](e.value,t[e.field])}):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.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},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},in:function(e,t,r,i){return Array.isArray(e)?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/js/tabulator/dist/js/modules/format.js b/js/tabulator/dist/js/modules/format.js new file mode 100644 index 0000000..ac9c843 --- /dev/null +++ b/js/tabulator/dist/js/modules/format.js @@ -0,0 +1,632 @@ +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.4.3 (c) Oliver Folkerd */ + +var Format = function Format(table) { + this.table = table; //hold Tabulator object +}; + +//initialize column formatter +Format.prototype.initializeColumn = function (column) { + var self = this, + config = { params: column.definition.formatterParams || {} }; + + //set column formatter + switch (_typeof(column.definition.formatter)) { + case "string": + + if (column.definition.formatter === "tick") { + column.definition.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 (self.formatters[column.definition.formatter]) { + config.formatter = self.formatters[column.definition.formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); + config.formatter = self.formatters.plaintext; + } + break; + + case "function": + config.formatter = column.definition.formatter; + break; + + default: + config.formatter = self.formatters.plaintext; + break; + } + + column.modules.format = config; +}; + +Format.prototype.cellRendered = function (cell) { + if (cell.column.modules.format.renderedCallback) { + cell.column.modules.format.renderedCallback(); + } +}; + +//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) { + cell.column.modules.format.renderedCallback = callback; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); +}; + +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; +}; + +//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 || "", + 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); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + } else { + return " "; + } + }, + + //image element + image: function image(cell, formatterParams, onRendered) { + var el = document.createElement("img"); + el.setAttribute("src", cell.getValue()); + + 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 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); + + return "
" + (legend ? "
" + legend + "
" : ""); + }, + + //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"); + + function toggleList(isOpen) { + var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; + + open = isOpen; + + if (open) { + el.classList.add("open"); + if (collapse) { + collapse.style.display = ''; + } + } else { + el.classList.remove("open"); + if (collapse) { + collapse.style.display = 'none'; + } + } + } + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + if (self.table.options.responsiveLayoutCollapseStartOpen) { + open = true; + } + + el.addEventListener("click", function (e) { + e.stopImmediatePropagation(); + toggleList(!open); + }); + + toggleList(open); + + return el; + }, + + rowSelection: function rowSelection(cell) { + 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(); + + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + } else { + checkbox.addEventListener("change", function (e) { + if (_this.table.modules.selectRow.selectedRows.length) { + _this.table.deselectRow(); + } else { + _this.table.selectRow(); + } + }); + + this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); + } + } + return checkbox; + } +}; + +Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/format.min.js b/js/tabulator/dist/js/modules/format.min.js new file mode 100644 index 0000000..d973d78 --- /dev/null +++ b/js/tabulator/dist/js/modules/format.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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){var t=this,o={params:e.definition.formatterParams||{}};switch(_typeof(e.definition.formatter)){case"string":"tick"===e.definition.formatter&&(e.definition.formatter="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")),t.formatters[e.definition.formatter]?o.formatter=t.formatters[e.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",e.definition.formatter),o.formatter=t.formatters.plaintext);break;case"function":o.formatter=e.definition.formatter;break;default:o.formatter=t.formatters.plaintext}e.modules.format=o},Format.prototype.cellRendered=function(e){e.column.modules.format.renderedCallback&&e.column.modules.format.renderedCallback()},Format.prototype.formatValue=function(e){function t(t){e.column.modules.format.renderedCallback=t}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.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},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,i,n,l=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",d=t.symbol||"",u=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(l))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?l.toFixed(m):l,r=String(r).split("."),a=r[0],i=r.length>1?s+r[1]:"",n=/(\d+)(\d{3})/;n.test(a);)a=a.replace(n,"$1"+c+"$2");return u?a+i+d:d+a+i},link:function(e,t,o){var r,a=e.getValue(),i=t.urlPrefix||"",n=a,l=document.createElement("a");if(t.labelField&&(r=e.getData(),n=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":n=t.label;break;case"function":n=t.label(e)}if(n){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 l.setAttribute("href",i+a),t.target&&l.setAttribute("target",t.target),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(n)),l}return" "},image:function(e,t,o){var r=document.createElement("img");switch(r.setAttribute("src",e.getValue()),_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(),i=t.allowEmpty,n=t.allowTruthy,l=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return n&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),l||""):!i||"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",i=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=e.getValue(),l=moment(n,r);return l.isValid()?l.format(a):!0===i?n:"function"==typeof i?i(n):i},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",i=void 0!==t.suffix&&t.suffix,n=void 0!==t.unit?t.unit:void 0,l=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),d=moment(c,r);return d.isValid()?l?moment.duration(d.diff(s)).humanize(i):d.diff(s,n)+(i?" "+i:""):!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(),i=t&&t.stars?t.stars:5,n=document.createElement("span"),l=document.createElementNS("http://www.w3.org/2000/svg","svg");n.style.verticalAlign="middle",l.setAttribute("width","14"),l.setAttribute("height","14"),l.setAttribute("viewBox","0 0 512 512"),l.setAttribute("xml:space","preserve"),l.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,i));for(var s=1;s<=i;s++){var c=l.cloneNode(!0);c.innerHTML=s<=r?'':'',n.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),n},traffic:function(e,t,o){var r,a,i=this.sanitizeHTML(e.getValue())||0,n=document.createElement("span"),l=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],d="#666666";if(!isNaN(i)&&void 0!==e.getValue()){switch(n.classList.add("tabulator-traffic-light"),a=parseFloat(i)<=l?parseFloat(i):l,a=parseFloat(a)>=s?parseFloat(a):s,r=(l-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":d=c;break;case"function":d=c(i);break;case"object":if(Array.isArray(c)){var u=100/c.length,m=Math.floor(a/u);m=Math.min(m,c.length-1),m=Math.max(m,0),d=c[m];break}}return n.style.backgroundColor=d,n}},progress:function(e,t,o){var r,a,i,n,l,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),d=t&&t.max?t.max:100,u=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=d?parseFloat(s):d,a=parseFloat(a)>=u?parseFloat(a):u,r=(d-u)/100,a=Math.round((a-u)/r),_typeof(t.color)){case"string":i=t.color;break;case"function":i=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),i=t.color[p];break}default:i="#2DC214"}switch(_typeof(t.legend)){case"string":n=t.legend;break;case"function":n=t.legend(s);break;case"boolean":n=s;break;default:n=!1}switch(_typeof(t.legendColor)){case"string":l=t.legendColor;break;case"function":l=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),l=t.legendColor[p]}break;default:l="#000"}return c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a),"
"+(n?"
"+n+"
":"")},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(t){var o=e.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];i=t,i?(n.classList.add("open"),o&&(o.style.display="")):(n.classList.remove("open"),o&&(o.style.display="none"))}var a=this,i=!1,n=document.createElement("div");return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.table.options.responsiveLayoutCollapseStartOpen&&(i=!0),n.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!i)}),r(i),n},rowSelection:function(e){var t=this,o=document.createElement("input");if(o.type="checkbox",this.table.modExists("selectRow",!0))if(o.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var r=e.getRow();o.addEventListener("change",function(e){r.toggleSelect()}),o.checked=r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,o)}else o.addEventListener("change",function(e){t.table.modules.selectRow.selectedRows.length?t.table.deselectRow():t.table.selectRow()}),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/frozen_columns.js b/js/tabulator/dist/js/modules/frozen_columns.js new file mode 100644 index 0000000..687a245 --- /dev/null +++ b/js/tabulator/dist/js/modules/frozen_columns.js @@ -0,0 +1,243 @@ +/* Tabulator v4.4.3 (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.definition.frozen) { + + if (!column.parent.isGroup) { + + if (!column.isGroup) { + 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 { + console.warn("Frozen Column Error - Column Groups cannot be frozen"); + } + } else { + console.warn("Frozen Column Error - Grouped columns cannot be frozen"); + } + } else { + this.initializationMode = "right"; + } +}; + +//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; + + 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; + } + + _this2.layoutElement(column.getElement(), column); + + if (allCells) { + column.cells.forEach(function (cell) { + _this2.layoutElement(cell.getElement(), 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; + } + + _this2.layoutElement(column.getElement(), column); + + if (allCells) { + column.cells.forEach(function (cell) { + _this2.layoutElement(cell.getElement(), column); + }); + } + }); +}; + +//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(), column); + } + }); + + this.rightColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this3.layoutElement(cell.getElement(), 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/js/tabulator/dist/js/modules/frozen_columns.min.js b/js/tabulator/dist/js/modules/frozen_columns.min.js new file mode 100644 index 0000000..9cf6fa6 --- /dev/null +++ b/js/tabulator/dist/js/modules/frozen_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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 o={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(o.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=o):this.initializationMode="right"},FrozenColumns.prototype.scrollHorizontal=function(){var t,o=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){o.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&o.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 o=this;this.leftColumns.forEach(function(e,n){e.modules.frozen.margin=o._calcSpace(o.leftColumns,n)+o.table.columnManager.scrollLeft+"px",n==o.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutElement(e.getElement(),e),t&&e.cells.forEach(function(t){o.layoutElement(t.getElement(),e)})}),this.rightColumns.forEach(function(e,n){e.modules.frozen.margin=o.rightPadding-o._calcSpace(o.rightColumns,n+1)+"px",n==o.rightColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutElement(e.getElement(),e),t&&e.cells.forEach(function(t){o.layoutElement(t.getElement(),e)})})},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(o){"row"===o.type&&t.layoutRow(o)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var o=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(e){var n=t.getCell(e);n&&o.layoutElement(n.getElement(),e)}),this.rightColumns.forEach(function(e){var n=t.getCell(e);n&&o.layoutElement(n.getElement(),e)})},FrozenColumns.prototype.layoutElement=function(t,o){o.modules.frozen&&(t.style.position="absolute",t.style.left=o.modules.frozen.margin,t.classList.add("tabulator-frozen"),o.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+o.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,o){for(var e=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; + + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.table.rowManager.adjustTableSize(); + + this.rows.splice(index, 1); + + this.table.rowManager.refreshActiveData("display"); + + if (this.rows.length) { + this.styleRows(); + } + } else { + console.warn("Freeze Error - Row is already unfrozen"); + } +}; + +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/js/tabulator/dist/js/modules/frozen_rows.min.js b/js/tabulator/dist/js/modules/frozen_rows.min.js new file mode 100644 index 0000000..7c6debc --- /dev/null +++ b/js/tabulator/dist/js/modules/frozen_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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){var o=this.rows.indexOf(e);if(e.modules.frozen){e.modules.frozen=!1;var t=e.getElement();t.parentNode.removeChild(t),this.table.rowManager.adjustTableSize(),this.rows.splice(o,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},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/js/tabulator/dist/js/modules/group_rows.js b/js/tabulator/dist/js/modules/group_rows.js new file mode 100644 index 0000000..090abdf --- /dev/null +++ b/js/tabulator/dist/js/modules/group_rows.js @@ -0,0 +1,1048 @@ +/* Tabulator v4.4.3 (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 () { + 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.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 () { + 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-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(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.groupManager.table.options.groupDblClick(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + self.element.addEventListener("contextmenu", function (e) { + self.groupManager.table.options.groupContext(e, self.getComponent()); + }); + } + + 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); +}; + +////////////// 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 () { + return new GroupComponent(this); +}; + +////////////////////////////////////////////////// +////////////// 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.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.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) { + 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/js/tabulator/dist/js/modules/group_rows.min.js b/js/tabulator/dist/js/modules/group_rows.min.js new file mode 100644 index 0000000..af2ccd1 --- /dev/null +++ b/js/tabulator/dist/js/modules/group_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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 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,s,i,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=s,this.hasSubGroups=e-1?e?this.rows.splice(s+1,0,t):this.rows.splice(s,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.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,s){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 s=this.table.columnManager.getRealColumns();s.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,s;"function"==typeof o?r=o:(s=t.table.columnManager.getColumnByField(o),r=s?function(t){return s.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.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 s=[];t.hasSubGroups?(s=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=s.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(s)):(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,s=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[s]),this.groups[s]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]||this.createGroup(e,0,o),this.groups[r].addRow(t)},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.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){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/js/tabulator/dist/js/modules/history.js b/js/tabulator/dist/js/modules/history.js new file mode 100644 index 0000000..c00a321 --- /dev/null +++ b/js/tabulator/dist/js/modules/history.js @@ -0,0 +1,141 @@ +/* Tabulator v4.4.3 (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.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.pos], false); + 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.pos], false); + 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/js/tabulator/dist/js/modules/history.min.js b/js/tabulator/dist/js/modules/history.min.js new file mode 100644 index 0000000..feb4d98 --- /dev/null +++ b/js/tabulator/dist/js/modules/history.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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.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.pos],!1),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.pos],!1),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/js/tabulator/dist/js/modules/html_table_export.js b/js/tabulator/dist/js/modules/html_table_export.js new file mode 100644 index 0000000..82702a3 --- /dev/null +++ b/js/tabulator/dist/js/modules/html_table_export.js @@ -0,0 +1,377 @@ +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.4.3 (c) Oliver Folkerd */ + +var HtmlTableExport = function HtmlTableExport(table) { + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; +}; + +HtmlTableExport.prototype.genereateTable = function (config, style, visible, colVisProp) { + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.generateHeaderElements(); + var body = this.generateBodyElements(visible); + + var table = document.createElement("table"); + table.classList.add("tabulator-print-table"); + table.appendChild(headers); + table.appendChild(body); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + + return table; +}; + +HtmlTableExport.prototype.generateColumnGroupHeaders = function () { + var _this = this; + + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach(function (column) { + var colData = _this.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; +}; + +HtmlTableExport.prototype.processColumnGroup = function (column) { + var _this2 = this; + + var subGroups = column.columns, + maxDepth = 0; + + var groupData = { + title: column.definition.title, + column: column, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this2.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; +}; + +HtmlTableExport.prototype.groupHeadersToRows = function (columns) { + + var headers = [], + headerDepth = 0; + + 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.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); + }); + + return headers; +}; + +HtmlTableExport.prototype.generateHeaderElements = function () { + var _this3 = this; + + var headerEl = document.createElement("thead"); + + var rows = this.groupHeadersToRows(this.generateColumnGroupHeaders()); + + rows.forEach(function (row) { + var rowEl = document.createElement("tr"); + + _this3.mapElementStyles(_this3.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + row.forEach(function (column) { + var cellEl = document.createElement("th"); + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.column.definition.title; + + if (_this3.cloneTableStyle) { + cellEl.style.boxSizing = "border-box"; + } + + _this3.mapElementStyles(column.column.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this3.mapElementStyles(column.column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if (column.column.visible) { + _this3.mapElementStyles(column.column.getElement(), cellEl, ["width"]); + } else { + if (column.column.definition.width) { + cellEl.style.width = column.column.definition.width + "px"; + } + } + + if (column.column.parent) { + _this3.mapElementStyles(column.column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + }); + + headerEl.appendChild(rowEl); + }); + + return headerEl; +}; + +HtmlTableExport.prototype.generateBodyElements = function (visible) { + var _this4 = this; + + var oddRow, evenRow, calcRow, firstRow, firstCell, firstGroup, lastCell, styleCells, styleRow; + + //lookup row styles + if (this.cloneTableStyle && window.getComputedStyle) { + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (firstRow) { + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + var bodyEl = document.createElement("tbody"); + + var rows = visible ? this.table.rowManager.getVisibleRows(true) : this.table.rowManager.getDisplayRows(); + var columns = []; + + 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); + } + } + + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (_this4.columnVisCheck(column)) { + columns.push(column); + } + }); + + rows = rows.filter(function (row) { + switch (row.type) { + case "group": + return _this4.config.rowGroups !== false; + break; + + case "calc": + return _this4.config.columnCalcs !== false; + break; + } + + return true; + }); + + if (rows.length > 1000) { + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + rows.forEach(function (row, i) { + var rowData = row.getData(); + + var rowEl = document.createElement("tr"); + rowEl.classList.add("tabulator-print-table-row"); + + switch (row.type) { + case "group": + var cellEl = document.createElement("td"); + cellEl.colSpan = columns.length; + cellEl.innerHTML = row.key; + + rowEl.classList.add("tabulator-print-table-group"); + + _this4.mapElementStyles(firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + _this4.mapElementStyles(firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + rowEl.appendChild(cellEl); + break; + + case "calc": + rowEl.classList.add("tabulator-print-table-calcs"); + + case "row": + columns.forEach(function (column) { + var cellEl = document.createElement("td"); + + var value = column.getFieldValue(rowData); + + var cellWrapper = { + getValue: function getValue() { + return value; + }, + getField: function getField() { + return column.defi; + }, + getElement: function getElement() { + return cellEl; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getData: function getData() { + return rowData; + }, + getRow: function getRow() { + return row.getComponent(); + }, + getComponent: function getComponent() { + return cellWrapper; + }, + column: column + }; + + if (_this4.table.modExists("format")) { + value = _this4.table.modules.format.formatValue(cellWrapper); + } 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 (firstCell) { + _this4.mapElementStyles(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", "text-align"]); + } + + rowEl.appendChild(cellEl); + }); + + styleRow = row.type == "calc" ? calcRow : i % 2 && evenRow ? evenRow : oddRow; + + _this4.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + break; + } + + bodyEl.appendChild(rowEl); + }); + + return bodyEl; +}; + +HtmlTableExport.prototype.columnVisCheck = function (column) { + return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); +}; + +HtmlTableExport.prototype.getHtml = function (visible, style, config) { + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTable(config || this.table.options.htmlOutputConfig, style, visible, "htmlOutput")); + + return holder.innerHTML; +}; + +HtmlTableExport.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("htmlTableExport", HtmlTableExport); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/html_table_export.min.js b/js/tabulator/dist/js/modules/html_table_export.min.js new file mode 100644 index 0000000..90b25c7 --- /dev/null +++ b/js/tabulator/dist/js/modules/html_table_export.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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},HtmlTableExport=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};HtmlTableExport.prototype.genereateTable=function(t,e,o,n){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=n;var r=this.generateHeaderElements(),l=this.generateBodyElements(o),a=document.createElement("table");return a.classList.add("tabulator-print-table"),a.appendChild(r),a.appendChild(l),this.mapElementStyles(this.table.element,a,["border-top","border-left","border-right","border-bottom"]),a},HtmlTableExport.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},HtmlTableExport.prototype.processColumnGroup=function(t){var e=this,o=t.columns,n=0,r={title:t.definition.title,column:t,depth:1};if(o.length){if(r.subGroups=[],r.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(r.width+=o.width,r.subGroups.push(o),o.depth>n&&(n=o.depth))}),r.depth+=n,!r.width)return!1}else{if(!this.columnVisCheck(t))return!1;r.width=1}return r},HtmlTableExport.prototype.groupHeadersToRows=function(t){function e(t,r){var l=n-r;void 0===o[r]&&(o[r]=[]),t.height=t.subGroups?1:l-t.depth+1,o[r].push(t),t.subGroups&&t.subGroups.forEach(function(t){e(t,r+1)})}var o=[],n=0;return t.forEach(function(t){t.depth>n&&(n=t.depth)}),t.forEach(function(t){e(t,0)}),o},HtmlTableExport.prototype.generateHeaderElements=function(){var t=this,e=document.createElement("thead");return this.groupHeadersToRows(this.generateColumnGroupHeaders()).forEach(function(o){var n=document.createElement("tr");t.mapElementStyles(t.table.columnManager.getHeadersElement(),e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.forEach(function(e){var o=document.createElement("th");o.colSpan=e.width,o.rowSpan=e.height,o.innerHTML=e.column.definition.title,t.cloneTableStyle&&(o.style.boxSizing="border-box"),t.mapElementStyles(e.column.getElement(),o,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.mapElementStyles(e.column.contentElement,o,["padding-top","padding-left","padding-right","padding-bottom"]),e.column.visible?t.mapElementStyles(e.column.getElement(),o,["width"]):e.column.definition.width&&(o.style.width=e.column.definition.width+"px"),e.column.parent&&t.mapElementStyles(e.column.parent.groupElement,o,["border-top"]),n.appendChild(o)}),e.appendChild(n)}),e},HtmlTableExport.prototype.generateBodyElements=function(t){var e,o,n,r,l,a,i,d,u=this;this.cloneTableStyle&&window.getComputedStyle&&(e=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),o=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),n=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),r=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),a=this.table.element.getElementsByClassName("tabulator-group")[0],r&&(i=r.getElementsByClassName("tabulator-cell"),l=i[0],i[i.length-1]));var c=document.createElement("tbody"),s=t?this.table.rowManager.getVisibleRows(!0):this.table.rowManager.getDisplayRows(),p=[];return!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&s.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&s.push(this.table.modules.columnCalcs.botRow)),this.table.columnManager.columnsByIndex.forEach(function(t){u.columnVisCheck(t)&&p.push(t)}),s=s.filter(function(t){switch(t.type){case"group":return!1!==u.config.rowGroups;case"calc":return!1!==u.config.columnCalcs}return!0}),s.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),s.forEach(function(t,r){var i=t.getData(),s=document.createElement("tr");switch(s.classList.add("tabulator-print-table-row"),t.type){case"group":var m=document.createElement("td");m.colSpan=p.length,m.innerHTML=t.key,s.classList.add("tabulator-print-table-group"),u.mapElementStyles(a,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),u.mapElementStyles(a,m,["padding-top","padding-left","padding-right","padding-bottom"]),s.appendChild(m);break;case"calc":s.classList.add("tabulator-print-table-calcs");case"row":p.forEach(function(e){var o=document.createElement("td"),n=e.getFieldValue(i),r={getValue:function(){return n},getField:function(){return e.defi},getElement:function(){return o},getColumn:function(){return e.getComponent()},getData:function(){return i},getRow:function(){return t.getComponent()},getComponent:function(){return r},column:e};if(u.table.modExists("format"))n=u.table.modules.format.formatValue(r);else switch(void 0===n?"undefined":_typeof(n)){case"object":n=JSON.stringify(n);break;case"undefined":case"null":n="";break;default:n=n}n instanceof Node?o.appendChild(n):o.innerHTML=n,l&&u.mapElementStyles(l,o,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),s.appendChild(o)}),d="calc"==t.type?n:r%2&&o?o:e,u.mapElementStyles(d,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"])}c.appendChild(s)}),c},HtmlTableExport.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},HtmlTableExport.prototype.getHtml=function(t,e,o){var n=document.createElement("div");return n.appendChild(this.genereateTable(o||this.table.options.htmlOutputConfig,e,t,"htmlOutput")),n.innerHTML},HtmlTableExport.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("htmlTableExport",HtmlTableExport); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/html_table_import.js b/js/tabulator/dist/js/modules/html_table_import.js new file mode 100644 index 0000000..08d6ed9 --- /dev/null +++ b/js/tabulator/dist/js/modules/html_table_import.js @@ -0,0 +1,203 @@ +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.4.3 (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); + + for (var i in attributes) { + var attrib = attributes[i], + name; + + if (attrib && (typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + + name = attrib.name.replace("tabulator-", ""); + + col[name] = this._attribValue(attrib.value); + } + } + + 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/js/tabulator/dist/js/modules/html_table_import.min.js b/js/tabulator/dist/js/modules/html_table_import.min.js new file mode 100644 index 0000000..adeaa25 --- /dev/null +++ b/js/tabulator/dist/js/modules/html_table_import.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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],r=[];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 l=0;l -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) { + 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) { + 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(newRow); + } + } + + newRow.then(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(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); + } + } + } +}; + +Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/keybindings.min.js b/js/tabulator/dist/js/modules/keybindings.min.js new file mode 100644 index 0000000..4f681fb --- /dev/null +++ b/js/tabulator/dist/js/modules/keybindings.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!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&&(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&&(n=!0===n?this.table.addRow({}):"function"==typeof n?this.table.addRow(n(i.row.getComponent())):this.table.addRow(n),n.then(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(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/moveable_columns.js b/js/tabulator/dist/js/modules/moveable_columns.js new file mode 100644 index 0000000..b0366cb --- /dev/null +++ b/js/tabulator/dist/js/modules/moveable_columns.js @@ -0,0 +1,289 @@ +/* Tabulator v4.4.3 (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(); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + } else { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(); + 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/js/tabulator/dist/js/modules/moveable_columns.min.js b/js/tabulator/dist/js/modules/moveable_columns.min.js new file mode 100644 index 0000000..07c57c4 --- /dev/null +++ b/js/tabulator/dist/js/modules/moveable_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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();n.parentNode.insertBefore(o[t].getElement(),n.nextSibling)}):e.getCells().forEach(function(e,t){var n=e.getElement();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) { + if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { + if (self.toRow !== row || !self.toRowAfter) { + var rowEl = row.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + } else { + if (self.toRow !== row || self.toRowAfter) { + var rowEl = row.getElement(); + 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(); + + 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, cell.getElement()); +}; + +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"; +}; + +//establish connection with other tables +MoveRows.prototype.connectToTables = function (row) { + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStart.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "connect", { + row: row + }); +}; + +//disconnect from other tables +MoveRows.prototype.disconnectFromTables = function () { + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStop.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); +}; + +//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; + + 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/js/tabulator/dist/js/modules/moveable_rows.min.js b/js/tabulator/dist/js/modules/moveable_rows.min.js new file mode 100644 index 0000000..bb6ea65 --- /dev/null +++ b/js/tabulator/dist/js/modules/moveable_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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.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.connection=this.table.options.movableRowsConnectedTables},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){if(t.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var n=e.getElement();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();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,e.getElement())},MoveRows.prototype.bindTouchEvents=function(e,t){var o,n,i,s,l,r,a,c=this,h=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,n=e.nextRow(),s=n?n.getHeight()/2:0,i=e.prevRow(),l=i?i.getHeight()/2:0,r=0,a=0,h=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var m,v;c.moving&&(t.preventDefault(),c.moveHover(t),h||(h=t.touches[0].pageY),m=t.touches[0].pageY-h,m>0?n&&m-r>s&&(v=n)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(c.placeholderElement,v.getElement().nextSibling),c.moveRow(v,!0)):i&&-m-a>l&&(v=i)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(c.placeholderElement,v.getElement()),c.moveRow(v,!1)),v&&(o=v,n=v.nextRow(),r=s,s=n?n.getHeight()/2:0,i=v.prevRow(),a=l,l=i?i.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.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,i=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-i+window.pageXOffset,this.startY=n.top-s+window.pageYOffset):this.startY=s-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.connectToTables=function(e){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:e})},MoveRows.prototype.disconnectFromTables=function(){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},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(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/js/tabulator/dist/js/modules/mutator.js b/js/tabulator/dist/js/modules/mutator.js new file mode 100644 index 0000000..ef90ea8 --- /dev/null +++ b/js/tabulator/dist/js/modules/mutator.js @@ -0,0 +1,113 @@ +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.4.3 (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, update) { + 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(data); + + if (!update || update && 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; + + if (mutator) { + return mutator.mutator(value, cell.row.getData(), "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/js/tabulator/dist/js/modules/mutator.min.js b/js/tabulator/dist/js/modules/mutator.min.js new file mode 100644 index 0000000..1534f29 --- /dev/null +++ b/js/tabulator/dist/js/modules/mutator.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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(t),(!e||e&&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;return e?e.mutator(o,t.row.getData(),"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/js/tabulator/dist/js/modules/page.js b/js/tabulator/dist/js/modules/page.js new file mode 100644 index 0000000..a3af23a --- /dev/null +++ b/js/tabulator/dist/js/modules/page.js @@ -0,0 +1,636 @@ +/* Tabulator v4.4.3 (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.pageSizes = []; + + 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; + itemEl.innerHTML = item; + + _this.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } +}; + +//setup pageination +Page.prototype.initialize = function (hidden) { + var self = this, + pageSelectLabel; + + //update param names + for (var key in self.table.options.paginationDataSent) { + self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; + } + + for (var _key in self.table.options.paginationDataReceived) { + self.paginationDataReceivedNames[_key] = self.table.options.paginationDataReceived[_key]; + } + + //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); + }); + + self.prevBut.addEventListener("click", function () { + self.previousPage(); + }); + + self.nextBut.addEventListener("click", function () { + self.nextPage().then(function () {}).catch(function () {}); + }); + + self.lastBut.addEventListener("click", function () { + self.setPage(self.max); + }); + + 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); + 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; + self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); + 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 = 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) { + if (this.mode == "local" || force) { + this.page = 1; + } + 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; + + 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(); + }); + } 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 = 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) { + size = parseInt(size); + + if (size > 0) { + this.size = size; + } + + if (this.pageSizeSelect) { + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } +}; + +//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"); + button.setAttribute("aria-label", "Show Page " + page); + button.setAttribute("title", "Show Page " + page); + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function (e) { + self.setPage(page); + }); + + 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(); + }); + } 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(); + }); + } 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 = []; + 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.paginationDataSentNames.page] = self.page; + + //set page size if defined + if (_this7.size) { + pageParams[_this7.paginationDataSentNames.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.paginationDataSentNames.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.paginationDataSentNames.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.paginationDataReceivedNames.last_page] === "undefined") { + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); + } + + if (data[this.paginationDataReceivedNames.data]) { + this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; + + if (this.progressiveLoad) { + switch (this.mode) { + case "progressive_load": + this.table.rowManager.addRows(data[this.paginationDataReceivedNames.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.paginationDataReceivedNames.data]); + + this.table.rowManager.setData(data, true); + + 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.paginationDataReceivedNames.data]); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + } else { + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.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/js/tabulator/dist/js/modules/page.min.js b/js/tabulator/dist/js/modules/page.min.js new file mode 100644 index 0000000..ab6e069 --- /dev/null +++ b/js/tabulator/dist/js/modules/page.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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.pageSizes=[],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,a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a=this;for(var i in a.table.options.paginationDataSent)a.paginationDataSentNames[i]=a.table.options.paginationDataSent[i];for(var n in a.table.options.paginationDataReceived)a.paginationDataReceivedNames[n]=a.table.options.paginationDataReceived[n];a.table.modules.localize.bind("pagination|first",function(e){a.firstBut.innerHTML=e}),a.table.modules.localize.bind("pagination|first_title",function(e){a.firstBut.setAttribute("aria-label",e),a.firstBut.setAttribute("title",e)}),a.table.modules.localize.bind("pagination|prev",function(e){a.prevBut.innerHTML=e}),a.table.modules.localize.bind("pagination|prev_title",function(e){a.prevBut.setAttribute("aria-label",e),a.prevBut.setAttribute("title",e)}),a.table.modules.localize.bind("pagination|next",function(e){a.nextBut.innerHTML=e}),a.table.modules.localize.bind("pagination|next_title",function(e){a.nextBut.setAttribute("aria-label",e),a.nextBut.setAttribute("title",e)}),a.table.modules.localize.bind("pagination|last",function(e){a.lastBut.innerHTML=e}),a.table.modules.localize.bind("pagination|last_title",function(e){a.lastBut.setAttribute("aria-label",e),a.lastBut.setAttribute("title",e)}),a.firstBut.addEventListener("click",function(){a.setPage(1)}),a.prevBut.addEventListener("click",function(){a.previousPage()}),a.nextBut.addEventListener("click",function(){a.nextPage().then(function(){}).catch(function(){})}),a.lastBut.addEventListener("click",function(){a.setPage(a.max)}),a.table.options.paginationElement&&(a.element=a.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),a.table.modules.localize.bind("pagination|page_size",function(e){a.pageSizeSelect.setAttribute("aria-label",e),a.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),a.element.appendChild(t),a.element.appendChild(a.pageSizeSelect),a.pageSizeSelect.addEventListener("change",function(e){a.setPageSize(a.pageSizeSelect.value),a.setPage(1).then(function(){}).catch(function(){})})),a.element.appendChild(a.firstBut),a.element.appendChild(a.prevBut),a.element.appendChild(a.pagesElement),a.element.appendChild(a.nextBut),a.element.appendChild(a.lastBut),a.table.options.paginationElement||e||a.table.footerManager.append(a.element,a),a.mode=a.table.options.pagination,a.size=a.table.options.paginationSize||Math.floor(a.table.rowManager.getElement().clientHeight/24),a.count=a.table.options.paginationButtonCount,a.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?Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e){return("local"==this.mode||e)&&(this.page=1),!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;return new Promise(function(a,i){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){a()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),i())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var o=Math.ceil((s+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){e=parseInt(e),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList()},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&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));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"),a.setAttribute("aria-label","Show Page "+e),a.setAttribute("title","Show Page "+e),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e)}),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()})):(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 -1) { + cookie = cookie.substr(0, end); + } + + data = cookie.replace(id + "=", ""); + } + break; + + default: + console.warn("Persistence Load Error - invalid mode selected", this.mode); + } + + return data ? JSON.parse(data) : 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); + + if (from) { + + from.width = column.width; + from.visible = column.visible; + + 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; + } + + var id = this.id + (type === "columns" ? "" : "-" + type); + + this.saveData(id, 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; +}; + +//save data to chosed medium +Persistence.prototype.saveData = function (id, data) { + + data = JSON.stringify(data); + + switch (this.mode) { + case "local": + localStorage.setItem(id, data); + break; + + case "cookie": + var expireDate = new Date(); + expireDate.setDate(expireDate.getDate() + 10000); + + //save cookie + document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); + break; + + default: + console.warn("Persistence Save Error - invalid mode selected", this.mode); + } +}; + +//build permission list +Persistence.prototype.parseColumns = function (columns) { + var self = this, + definitions = []; + + columns.forEach(function (column) { + var def = {}; + + if (column.isGroup) { + def.title = column.getDefinition().title; + def.columns = self.parseColumns(column.getColumns()); + } else { + def.title = column.getDefinition().title; + def.field = column.getField(); + def.width = column.getWidth(); + def.visible = column.visible; + } + + definitions.push(def); + }); + + return definitions; +}; + +Tabulator.prototype.registerModule("persistence", Persistence); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/persistence.min.js b/js/tabulator/dist/js/modules/persistence.min.js new file mode 100644 index 0000000..10efece --- /dev/null +++ b/js/tabulator/dist/js/modules/persistence.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (c) Oliver Folkerd */ +var Persistence=function(e){this.table=e,this.mode="",this.id="",this.persistProps=["field","width","visible"]};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(e,t){this.mode=!0!==e?e:this.localStorageTest()?"local":"cookie",this.id="tabulator-"+(t||this.table.element.getAttribute("id")||"")},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){var t="",i=this.id+("columns"===e?"":"-"+e);switch(this.mode){case"local":t=localStorage.getItem(i);break;case"cookie":var o=document.cookie,s=o.indexOf(i+"="),r=void 0;s>-1&&(o=o.substr(s),r=o.indexOf(";"),r>-1&&(o=o.substr(0,r)),t=o.replace(i+"=",""));break;default:console.warn("Persistence Load Error - invalid mode selected",this.mode)}return!!t&&JSON.parse(t)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var r=i._findColumn(e,t);r&&(r.width=t.width,r.visible=t.visible,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())}var i=this.id+("columns"===e?"":"-"+e);this.saveData(i,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.saveData=function(e,t){switch(t=JSON.stringify(t),this.mode){case"local":localStorage.setItem(e,t);break;case"cookie":var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"="+t+"; expires="+i.toUTCString();break;default:console.warn("Persistence Save Error - invalid mode selected",this.mode)}},Persistence.prototype.parseColumns=function(e){var t=this,i=[];return e.forEach(function(e){var o={};e.isGroup?(o.title=e.getDefinition().title,o.columns=t.parseColumns(e.getColumns())):(o.title=e.getDefinition().title,o.field=e.getField(),o.width=e.getWidth(),o.visible=e.visible),i.push(o)}),i},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/print.js b/js/tabulator/dist/js/modules/print.js new file mode 100644 index 0000000..799a5ed --- /dev/null +++ b/js/tabulator/dist/js/modules/print.js @@ -0,0 +1,96 @@ +/* Tabulator v4.4.3 (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.htmlTableExport.genereateTable(this.table.options.printConfig, this.table.options.printCopyStyle, this.table.options.printVisibleRows, "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.htmlTableExport.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printCopyStyle, 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/js/tabulator/dist/js/modules/print.min.js b/js/tabulator/dist/js/modules/print.min.js new file mode 100644 index 0000000..24a5cb1 --- /dev/null +++ b/js/tabulator/dist/js/modules/print.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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.htmlTableExport.genereateTable(this.table.options.printConfig,this.table.options.printCopyStyle,this.table.options.printVisibleRows,"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,s=window.scrollY,a=document.createElement("div"),r=document.createElement("div"),p=this.table.modules.htmlTableExport.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==e?e:this.table.options.printCopyStyle,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.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?a.innerHTML=n:a.appendChild(n),this.element.appendChild(a)),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,s),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/reactive_data.js b/js/tabulator/dist/js/modules/reactive_data.js new file mode 100644 index 0000000..c403d2d --- /dev/null +++ b/js/tabulator/dist/js/modules/reactive_data.js @@ -0,0 +1,235 @@ +/* Tabulator v4.4.3 (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 self = this, + data = row.getData(); + + this.blocked = true; + + for (var key in data) { + this.watchKey(row, data, key); + } + + this.blocked = false; +}; + +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/js/tabulator/dist/js/modules/reactive_data.min.js b/js/tabulator/dist/js/modules/reactive_data.min.js new file mode 100644 index 0000000..4697757 --- /dev/null +++ b/js/tabulator/dist/js/modules/reactive_data.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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,o=Array.from(arguments),n=o[0]<0?e.length+o[0]:o[0],c=o[1],i=!!o[2]&&o.slice(2);if(!a.blocked&&t===a.currentVersion){if(i&&(r=!!e[n]&&a.table.rowManager.getRowFromDataObject(e[n]),r?i.forEach(function(e){a.table.rowManager.addRowActual(e,!0,r,!0)}):(i=i.slice().reverse(),i.forEach(function(e){a.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==c){var u=e.slice(n,void 0===o[1]?o[1]:n+c);u.forEach(function(e,t){var r=a.table.rowManager.getRowFromDataObject(e);r&&r.deleteActual(t!==u.length-1)})}(i||0!==c)&&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.blocked=!1},ReactiveData.prototype.watchKey=function(e,t,a){var r=this,o=Object.getOwnPropertyDescriptor(t,a),n=t[a],c=this.currentVersion;Object.defineProperty(t,a,{set:function(t){if(n=t,!r.blocked&&c===r.currentVersion){var i={};i[a]=t,e.updateData(i)}o.set&&o.set(t)},get:function(){return o.get&&o.get(),n}})},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/js/tabulator/dist/js/modules/resize_columns.js b/js/tabulator/dist/js/modules/resize_columns.js new file mode 100644 index 0000000..f8929c4 --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_columns.js @@ -0,0 +1,161 @@ +/* Tabulator v4.4.3 (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)) { + 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)) { + 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(); + + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + + 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.persistentLayout && self.table.modExists("persistence", true)) { + 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/js/tabulator/dist/js/modules/resize_columns.min.js b/js/tabulator/dist/js/modules/resize_columns.min.js new file mode 100644 index 0000000..a7b2701 --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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,n){var i=this,o=!1,s=this.table.options.resizableColumns;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!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 n=t.getLastColumn();n&&i._checkResizability(n)&&(i.startColumn=t,i._mouseDown(e,n,a))};a.addEventListener("mousedown",r),a.addEventListener("touchstart",r,{passive:!0}),a.addEventListener("dblclick",function(e){var n=t.getLastColumn();n&&i._checkResizability(n)&&n.reinitializeWidth(!0)}),l.addEventListener("click",function(e){e.stopPropagation()});var d=function(e){var n,o,s;(n=t.getFirstColumn())&&(o=i.table.columnManager.findColumnIndex(n),(s=o>0&&i.table.columnManager.getColumnByIndex(o-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,l)))};l.addEventListener("mousedown",d),l.addEventListener("touchstart",d,{passive:!0}),l.addEventListener("dblclick",function(e){var n,o,s;(n=t.getFirstColumn())&&(o=i.table.columnManager.findColumnIndex(n),(s=o>0&&i.table.columnManager.getColumnByIndex(o-1))&&i._checkResizability(s)&&s.reinitializeWidth(!0))}),n.appendChild(a),n.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,n){function i(e){t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function o(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",o),document.body.removeEventListener("mousemove",i),n.removeEventListener("touchmove",i),n.removeEventListener("touchend",o),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistentLayout&&s.table.modExists("persistence",!0)&&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",o),n.addEventListener("touchmove",i,{passive:!0}),n.addEventListener("touchend",o)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/resize_rows.js b/js/tabulator/dist/js/modules/resize_rows.js new file mode 100644 index 0000000..cb4a2b8 --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_rows.js @@ -0,0 +1,98 @@ +/* Tabulator v4.4.3 (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, { passive: true }); + handle.addEventListener("touchstart", handleDown); + + 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/js/tabulator/dist/js/modules/resize_rows.min.js b/js/tabulator/dist/js/modules/resize_rows.min.js new file mode 100644 index 0000000..e5d08f8 --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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,{passive:!0}),s.addEventListener("touchstart",a),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/js/tabulator/dist/js/modules/resize_table.js b/js/tabulator/dist/js/modules/resize_table.js new file mode 100644 index 0000000..75f7294 --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_table.js @@ -0,0 +1,38 @@ +/* Tabulator v4.4.3 (c) Oliver Folkerd */ + +var ResizeTable = function ResizeTable(table) { + this.table = table; //hold Tabulator object + this.binding = false; + this.observer = false; +}; + +ResizeTable.prototype.initialize = function (row) { + var table = this.table, + observer; + + if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { + this.observer = new ResizeObserver(function (entry) { + table.redraw(); + }); + + this.observer.observe(table.element); + } else { + this.binding = function () { + 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); + } +}; + +Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/resize_table.min.js b/js/tabulator/dist/js/modules/resize_table.min.js new file mode 100644 index 0000000..8db36ed --- /dev/null +++ b/js/tabulator/dist/js/modules/resize_table.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (c) Oliver Folkerd */ +var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1};ResizeTable.prototype.initialize=function(e){var i=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(e){i.redraw()}),this.observer.observe(i.element)):(this.binding=function(){i.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)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/responsive_layout.js b/js/tabulator/dist/js/modules/responsive_layout.js new file mode 100644 index 0000000..7b800ef --- /dev/null +++ b/js/tabulator/dist/js/modules/responsive_layout.js @@ -0,0 +1,255 @@ +/* Tabulator v4.4.3 (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; +}; + +//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(); + } +}; + +//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.layoutRow = function (row) { + var rowEl = row.getElement(), + el = document.createElement("div"); + + el.classList.add("tabulator-responsive-collapse"); + + if (!rowEl.classList.contains("tabulator-calcs")) { + row.modules.responsiveLayout = { + element: el + }; + + if (!this.collapseStartOpen) { + el.style.display = 'none'; + } + + rowEl.appendChild(el); + + 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) { + column.hide(false, true); + + if (this.mode === "collapse") { + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + } +}; + +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(); + } +}; + +//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({ + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + } else { + output.push({ + title: column.definition.title, + value: value + }); + } + } + }); + + return output; +}; + +ResponsiveLayout.prototype.formatCollapsedData = function (data) { + var list = document.createElement("table"), + listContents = ""; + + data.forEach(function (item) { + var div = document.createElement("div"); + + if (item.value instanceof Node) { + div.appendChild(item.value); + item.value = div.innerHTML; + } + + listContents += "" + item.title + "" + item.value + ""; + }); + + list.innerHTML = listContents; + + return Object.keys(data).length ? list : ""; +}; + +Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/responsive_layout.min.js b/js/tabulator/dist/js/modules/responsive_layout.min.js new file mode 100644 index 0000000..0ee2860 --- /dev/null +++ b/js/tabulator/dist/js/modules/responsive_layout.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (c) Oliver Folkerd */ +var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};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()},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.layoutRow=function(e){var t=e.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),t.classList.contains("tabulator-calcs")||(e.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),t.appendChild(o),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent())},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())},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 a=i.getFieldValue(n);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},s.push({title:i.definition.title,value:i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)})):s.push({title:i.definition.title,value:a}))}),s},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+=""+e.title+""+e.value+""}),t.innerHTML=o,Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/select_row.js b/js/tabulator/dist/js/modules/select_row.js new file mode 100644 index 0000000..42c5b89 --- /dev/null +++ b/js/tabulator/dist/js/modules/select_row.js @@ -0,0 +1,361 @@ +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.4.3 (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) { + + self.table._clearSelection(); + + if (e.shiftKey) { + 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(); + + if (self.table.options.selectable !== true) { + if (toggledRows.length > self.table.options.selectable) { + toggledRows = toggledRows.slice(0, self.table.options.selectable); + } + } + + self.selectRows(toggledRows); + } + } else if (e.ctrlKey || e.metaKey) { + self.toggleRow(row); + self.lastClickedRow = row; + } else { + self.deselectRows(); + self.selectRows(row); + self.lastClickedRow = row; + } + + self.table._clearSelection(); + }); + } 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 self = this; + + switch (typeof rows === "undefined" ? "undefined" : _typeof(rows)) { + case "undefined": + self.table.rowManager.rows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + break; + + case "boolean": + if (rows === true) { + self.table.rowManager.activeRows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } + break; + + default: + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } else { + self._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 (!silent) { + this.table.options.rowSelected.call(this.table, row.getComponent()); + this._rowSelectionChanged(); + } + } + } 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) { + 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(); + } else { + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(); + } else { + self._deselectRow(rows); + } + } +}; + +//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 (!silent) { + self.table.options.rowDeselected.call(this.table, row.getComponent()); + self._rowSelectionChanged(); + } + } + } 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 () { + 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; + } + } + + 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; +}; + +Tabulator.prototype.registerModule("selectRow", SelectRow); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/select_row.min.js b/js/tabulator/dist/js/modules/select_row.min.js new file mode 100644 index 0000000..3c0eb5e --- /dev/null +++ b/js/tabulator/dist/js/modules/select_row.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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(t.table._clearSelection(),o.shiftKey){t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,n=l>=s?l:s,i=t.table.rowManager.getDisplayRows().slice(0),a=i.splice(c,n-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))}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(),t.selectRows(e),t.lastClickedRow=e);t.table._clearSelection()}):(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=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":t.table.rowManager.rows.forEach(function(e){t._selectRow(e,!0,!0)}),t._rowSelectionChanged();break;case"boolean":!0===e&&(t.table.rowManager.activeRows.forEach(function(e){t._selectRow(e,!0,!0)}),t._rowSelectionChanged());break;default:Array.isArray(e)?(e.forEach(function(e){t._selectRow(e,!0,!0)}),t._rowSelectionChanged()):t._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),t||(this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged())):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){var t,o=this;if(void 0===e){t=o.selectedRows.length;for(var l=0;l-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),t||(l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged())):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(){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)),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},Tabulator.prototype.registerModule("selectRow",SelectRow); \ No newline at end of file diff --git a/js/tabulator/dist/js/modules/sort.js b/js/tabulator/dist/js/modules/sort.js new file mode 100644 index 0000000..a2507d0 --- /dev/null +++ b/js/tabulator/dist/js/modules/sort.js @@ -0,0 +1,560 @@ +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.4.3 (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-arrow"); + //create sorter arrow + content.appendChild(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.persistentSort && this.table.modExists("persistence", true)) { + 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, + lastSort, + sortList; + + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; + + if (self.table.options.dataSorting) { + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + sortList.forEach(function (item, i) { + + if (item.column && item.column.modules.sort) { + + //if no sorter has been defined, take a guess + if (!item.column.modules.sort.sorter) { + item.column.modules.sort.sorter = self.findSorter(item.column); + } + + self._sortItem(data, item.column, item.dir, sortList, i); + } + + self.setColumnHeader(item.column, item.dir); + }); + } else { + sortList.forEach(function (item, i) { + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); + } +}; + +//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._sortItem = function (data, column, dir, sortList, i) { + var self = this; + + var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; + + data.sort(function (a, b) { + + var result = self._sortRow(a, b, column, dir, params); + + //if results match recurse through previous searchs to be sure + if (result === 0 && i) { + for (var j = i - 1; j >= 0; j--) { + result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, 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 = parseFloat(String(a).split(thousand).join("").split(decimal).join(".")); + b = parseFloat(String(b).split(thousand).join("").split(decimal).join(".")); + + //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/js/tabulator/dist/js/modules/sort.min.js b/js/tabulator/dist/js/modules/sort.min.js new file mode 100644 index 0000000..eb36968 --- /dev/null +++ b/js/tabulator/dist/js/modules/sort.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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 o,r,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)&&(o=t.getElement(),o.classList.add("tabulator-sortable"),r=document.createElement("div"),r.classList.add("tabulator-arrow"),e.appendChild(r),o.addEventListener("click",function(e){var o="",r=[],i=!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)?(r=n.getSort(),i=r.findIndex(function(e){return e.field===t.getField()}),i>-1?(r[i].dir=o,i!=r.length-1&&(i=r.splice(i,1)[0],"none"!=o&&r.push(i))):"none"!=o&&r.push({column:t,dir:o}),n.setSort(r)):"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=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 o=this,r=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=o.table.columnManager.findColumn(t.column),e?(t.column=e,r.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),o.sortList=r,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&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],r="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"undefined":_typeof(e)){case"undefined":r="string";break;case"boolean":r="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(r="alphanum"):r="number"}return this.sorters[r]},Sort.prototype.sort=function(t){var e,o=this;e=this.table.options.sortOrderReverse?o.sortList.slice().reverse():o.sortList,o.table.options.dataSorting&&o.table.options.dataSorting.call(o.table,o.getSort()),o.clearColumnHeaders(),o.table.options.ajaxSorting?e.forEach(function(t,e){o.setColumnHeader(t.column,t.dir)}):e.forEach(function(r,n){r.column&&r.column.modules.sort&&(r.column.modules.sort.sorter||(r.column.modules.sort.sorter=o.findSorter(r.column)),o._sortItem(t,r.column,r.dir,e,n)),o.setColumnHeader(r.column,r.dir)}),o.table.options.dataSorted&&o.table.options.dataSorted.call(o.table,o.getSort(),o.table.rowManager.getComponents(!0))},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._sortItem=function(t,e,o,r,n){var i=this,s="function"==typeof e.modules.sort.params?e.modules.sort.params(e.getComponent(),o):e.modules.sort.params;t.sort(function(t,a){var l=i._sortRow(t,a,e,o,s);if(0===l&&n)for(var u=n-1;u>=0&&0===(l=i._sortRow(t,a,r[u].column,r[u].dir,s));u--);return l})},Sort.prototype._sortRow=function(t,e,o,r,n){var i,s,a="asc"==r?t:e,l="asc"==r?e:t;return t=o.getFieldValue(a.getData()),e=o.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",i=a.getComponent(),s=l.getComponent(),o.modules.sort.sorter.call(this,t,e,i,s,o.getComponent(),r,n)},Sort.prototype.sorters={number:function(t,e,o,r,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator||".",u=s.thousandSeparator||",",c=0;if(t=parseFloat(String(t).split(u).join("").split(l).join(".")),e=parseFloat(String(e).split(u).join("").split(l).join(".")),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,o,r,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,o,r,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,r,n,i,s)},time:function(t,e,o,r,n,i,s){return s.format||(s.format="hh:mm"),this.sorters.datetime.call(this,t,e,o,r,n,i,s)},datetime:function(t,e,o,r,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,o,r,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,o,r,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,o,r,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,r,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/js/tabulator/dist/js/modules/validate.js b/js/tabulator/dist/js/modules/validate.js new file mode 100644 index 0000000..3bf46d1 --- /dev/null +++ b/js/tabulator/dist/js/modules/validate.js @@ -0,0 +1,219 @@ +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.4.3 (c) Oliver Folkerd */ + +var Validate = function Validate(table) { + this.table = table; +}; + +//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; + } + + console.log("v", value, type, params); + + 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 = []; + + if (validators) { + validators.forEach(function (item) { + if (!item.func.call(self, cell, value, item.params)) { + valid.push({ + type: item.type, + parameters: item.params + }); + } + }); + } + + return valid.length ? valid : true; +}; + +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; + }, + + //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/js/tabulator/dist/js/modules/validate.min.js b/js/tabulator/dist/js/modules/validate.min.js new file mode 100644 index 0000000..259a30f --- /dev/null +++ b/js/tabulator/dist/js/modules/validate.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.4.3 (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};Validate.prototype.initializeColumn=function(t){var n,i=this,o=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(n=i._extractValidator(t))&&o.push(n)}):(n=this._extractValidator(t.definition.validator))&&o.push(n),t.modules.validate=!!o.length&&o)},Validate.prototype._extractValidator=function(t){var n,i,o;switch(void 0===t?"undefined":_typeof(t)){case"string":return o=t.indexOf(":"),o>-1?(n=t.substring(0,o),i=t.substring(o+1)):n=t,console.log("v",t,n,i),this._buildValidator(n,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,n){var i="function"==typeof t?t:this.validators[t];return i?{type:"function"==typeof t?"function":t,func:i,params:n}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,n,i){var o=this,r=[];return t&&t.forEach(function(t){t.func.call(o,n,i,t.params)||r.push({type:t.type,parameters:t.params})}),!r.length||r},Validate.prototype.validators={integer:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&Math.floor(n)===n},float:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&n%1!=0},numeric:function(t,n,i){return""===n||null===n||void 0===n||!isNaN(n)},string:function(t,n,i){return""===n||null===n||void 0===n||isNaN(n)},max:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)<=i},min:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)>=i},minLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length>=i},maxLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length<=i},in:function(t,n,i){return""===n||null===n||void 0===n||("string"==typeof i&&(i=i.split("|")),""===n||i.indexOf(n)>-1)},regex:function(t,n,i){return""===n||null===n||void 0===n||new RegExp(i).test(n)},unique:function(t,n,i){if(""===n||null===n||void 0===n)return!0;var o=!0,r=t.getData(),e=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var i=t.getData();i!==r&&n==e.getFieldValue(i)&&(o=!1)}),o},required:function(t,n,i){return""!==n&&null!==n&&void 0!==n}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file diff --git a/js/tabulator/dist/js/tabulator.js b/js/tabulator/dist/js/tabulator.js new file mode 100644 index 0000000..b07cde7 --- /dev/null +++ b/js/tabulator/dist/js/tabulator.js @@ -0,0 +1,22906 @@ +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.4.3 (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; + } + + }); + } + + 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 = [], + 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); + } + + 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(); + } + + 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()); + } + } + + 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.columnVertAlign, 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) { + + 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.columnMoved) { + + this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); + } + + if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { + + this.table.modules.persistence.save("columns"); + } + }; + + ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { + + var fromIndex = columns.indexOf(from), + toIndex; + + 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) { + + this.table.rowManager.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 _this2 = this; + + var left = 0, + offset = 0, + adjust = 0, + colEl = column.getElement(); + + return new Promise(function (resolve, reject) { + + if (typeof position === "undefined") { + + position = _this2.table.options.scrollToColumnPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this2.table.options.scrollToColumnIfVisible; + } + + if (column.visible) { + + //align to correct position + + + switch (position) { + + case "middle": + + case "center": + + adjust = -_this2.element.clientWidth / 2; + + break; + + case "right": + + adjust = colEl.clientWidth - _this2.headersElement.clientWidth; + + break; + + } + + //check column visibility + + + if (!ifVisible) { + + offset = colEl.offsetLeft; + + if (offset > 0 && offset + colEl.offsetWidth < _this2.element.clientWidth) { + + return false; + } + } + + //calculate scroll position + + + left = colEl.offsetLeft + _this2.element.scrollLeft + adjust; + + left = Math.max(Math.min(left, _this2.table.rowManager.element.scrollWidth - _this2.table.rowManager.element.clientWidth), 0); + + _this2.table.rowManager.scrollHorizontal(left); + + _this2.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 column = this._addColumn(definition, before, nextToColumn); + + this._reIndexColumns(); + + 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); + } + + this.redraw(); + + if (this.table.modules.layout.getMode() != "fitColumns") { + + column.reinitializeWidth(); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); + }; + + //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.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 (this.table.modules.layout.getMode() == "fitColumns") { + + 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.persistentLayout && this.table.modExists("persistence", true)) { + + 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 () { + + 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 () { + + 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.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; + }; + + 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.groupElement = this.createGroupElement(); //column group holder element + + this.isGroup = false; + + this.tooltip = false; //hold column tooltip + + this.hozAlign = ""; //horizontal text alignment + + + //multi dimensional filed handling + + this.field = ""; + + this.fieldStructure = ""; + + this.getFieldValue = ""; + + this.setFieldValue = ""; + + 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.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._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(); + }; + + 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 _this3 = this; + + Object.keys(this.definition).forEach(function (key) { + + if (_this3.defaultOptionList.indexOf(key) === -1) { + + console.warn("Invalid column definition option in '" + (_this3.field || _this3.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._setNesteData : 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"); + } + }; + + 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); + } + + //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 self = this, + def = self.definition, + table = self.table, + sortable; + + //set column sorter + + if (table.modExists("sort")) { + + table.modules.sort.initializeColumn(self, self.contentElement); + } + + //set column formatter + + if (table.modExists("format")) { + + table.modules.format.initializeColumn(self); + } + + //set column editor + + if (typeof def.editor != "undefined" && table.modExists("edit")) { + + table.modules.edit.initializeColumn(self); + } + + //set colum validator + + if (typeof def.validator != "undefined" && table.modExists("validate")) { + + table.modules.validate.initializeColumn(self); + } + + //set column mutator + + if (table.modExists("mutator")) { + + table.modules.mutator.initializeColumn(self); + } + + //set column accessor + + if (table.modExists("accessor")) { + + table.modules.accessor.initializeColumn(self); + } + + //set respoviveLayout + + if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { + + table.modules.responsiveLayout.initializeColumn(self); + } + + //set column visibility + + if (typeof def.visible != "undefined") { + + if (def.visible) { + + self.show(true); + } else { + + self.hide(true); + } + } + + //asign additional css classes to column header + + if (def.cssClass) { + + var classeNames = def.cssClass.split(" "); + + classeNames.forEach(function (className) { + + self.element.classList.add(className); + }); + } + + if (def.field) { + + this.element.setAttribute("tabulator-field", def.field); + } + + //set min width if present + + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(def.minWidth)); + + self.reinitializeWidth(); + + //set tooltip if present + + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; + + //set orizontal text alignment + + self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; + }; + + Column.prototype._buildColumnHeaderContent = function () { + + var self = this, + def = self.definition, + table = self.table; + + var contentElement = document.createElement("div"); + + contentElement.classList.add("tabulator-col-content"); + + contentElement.appendChild(self._buildColumnHeaderTitle()); + + 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 formatter, contents, params, mockCell; + + if (this.definition.titleFormatter && this.table.modExists("format")) { + + formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); + + 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); + + 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 () { + + this.element.classList.add("tabulator-col-group"); + + this.element.setAttribute("role", "columngroup"); + + this.element.setAttribute("aria-title", this.definition.title); + + 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._setNesteData = 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]]) { + + dataObj[structure[i]] = {}; + } + + 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(); + }); + }; + + //// 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.persistentLayout && this.table.modExists("responsiveLayout", true)) { + + 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(); + } + } + }; + + //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.persistentLayout && this.table.modExists("persistence", true)) { + + 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(); + } + } + }; + + 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"; + } + }; + + 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); + + 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 () { + + // return this.element.offsetWidth; + + return this.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.delete = function () { + + if (this.isGroup) { + + this.columns.forEach(function (column) { + + column.delete(); + }); + } + + var cellCount = this.cells.length; + + for (var i = 0; i < cellCount; i++) { + + this.cells[0].delete(); + } + + this.element.parentNode.removeChild(this.element); + + this.table.columnManager.deregisterColumn(this); + }; + + //////////////// 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.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", "width", "minWidth", "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", "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", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print"]; + + //////////////// Event Bindings ///////////////// + + + //////////////// Object Generation ///////////////// + + Column.prototype.getComponent = function () { + + return new ColumnComponent(this); + }; + + var RowManager = function RowManager(table) { + + this.table = table; + + this.element = this.createHolderElement(); //containing element + + this.tableElement = 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 = "classic"; //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 + }; + + //////////////// 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.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); + } + } 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.element === 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 _this4 = 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 = _this4.table.options.scrollToRowPosition; + } + + if (typeof ifVisible === "undefined") { + + ifVisible = _this4.table.options.scrollToRowIfVisible; + } + + if (position === "nearest") { + + switch (_this4.renderMode) { + + case "classic": + + rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; + + position = Math.abs(_this4.element.scrollTop - rowTop) > Math.abs(_this4.element.scrollTop + _this4.element.clientHeight - rowTop) ? "bottom" : "top"; + + break; + + case "virtual": + + position = Math.abs(_this4.vDomTop - rowIndex) > Math.abs(_this4.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(_this4.element).top; + + if (offset > 0 && offset < _this4.element.clientHeight - rowEl.offsetHeight) { + + return false; + } + } + } + + //scroll to row + + switch (_this4.renderMode) { + + case "classic": + + _this4.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this4.element).top + _this4.element.scrollTop; + + break; + + case "virtual": + + _this4._virtualRenderFill(rowIndex, true); + + break; + + } + + //align to correct position + + switch (position) { + + case "middle": + + case "center": + + if (_this4.element.scrollHeight - _this4.element.scrollTop == _this4.element.clientHeight) { + + _this4.element.scrollTop = _this4.element.scrollTop + (rowEl.offsetTop - _this4.element.scrollTop) - (_this4.element.scrollHeight - rowEl.offsetTop) / 2; + } else { + + _this4.element.scrollTop = _this4.element.scrollTop - _this4.element.clientHeight / 2; + } + + break; + + case "bottom": + + if (_this4.element.scrollHeight - _this4.element.scrollTop == _this4.element.clientHeight) { + + _this4.element.scrollTop = _this4.element.scrollTop - (_this4.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + } else { + + _this4.element.scrollTop = _this4.element.scrollTop - _this4.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) { + var _this5 = this; + + var self = this; + + return new Promise(function (resolve, reject) { + + if (renderInPosition && _this5.getDisplayRows().length) { + + if (self.table.options.pagination) { + + self._setDataActual(data, true); + } else { + + _this5.reRenderInPosition(function () { + + self._setDataActual(data); + }); + } + } else { + + if (_this5.table.options.autoColumns) { + + _this5.table.columnManager.generateColumnsFromRowData(data); + } + + _this5.resetScroll(); + + _this5._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.table.options.dataLoaded.call(this.table, data); + + self.refreshActiveData(false, false, renderInPosition); + } 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 = []; + }; + + 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.table.options.rowDeleted.call(this.table, row.getComponent()); + + this.table.options.dataEdited.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 _this6 = this; + + var self = this, + length = 0, + rows = []; + + return new Promise(function (resolve, reject) { + + pos = _this6.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 (_this6.table.options.groupBy && _this6.table.modExists("groupRows")) { + + _this6.table.modules.groupRows.updateGroupRows(true); + } else if (_this6.table.options.pagination && _this6.table.modExists("page")) { + + _this6.refreshActiveData(false, false, true); + } else { + + _this6.reRenderInPosition(); + } + + //recalc column calculations if present + + if (_this6.table.modExists("columnCalcs")) { + + _this6.table.modules.columnCalcs.recalc(_this6.table.rowManager.activeRows); + } + + 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), + 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 (index) { + + 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) { + + var allIndex = this.rows.indexOf(index), + 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); + } + + if (allIndex > -1) { + + 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()); + + this.table.options.dataEdited.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, { pos: this.getRowPosition(from), to: to, after: after }); + } + + this.moveRowActual(from, to, after); + + this.table.options.rowMoved.call(this.table, from.getComponent()); + }; + + RowManager.prototype.moveRowActual = function (from, to, after) { + + var self = this; + + this._moveRowInArray(this.rows, from, to, after); + + this._moveRowInArray(this.activeRows, from, to, after); + + this.displayRowIterator(function (rows) { + + self._moveRowInArray(rows, from, to, after); + }); + + if (this.table.options.groupBy && this.table.modExists("groupRows")) { + + 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 (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 self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function (row) { + + output.push(row.getData(transform || "data")); + }); + + return output; + }; + + RowManager.prototype.getComponents = function (active) { + + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function (row) { + + output.push(row.getComponent()); + }); + + return output; + }; + + RowManager.prototype.getDataCount = function (active) { + + return active ? this.activeRows.length : this.rows.length; + }; + + RowManager.prototype._genRemoteRequest = function () { + + var self = this, + table = self.table, + options = table.options, + params = {}; + + if (table.modExists("page")) { + + //set sort data if defined + + if (options.ajaxSorting) { + + var sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + + delete item.column; + }); + + params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + + if (options.ajaxFiltering) { + + var filters = self.table.modules.filter.getFilters(true, true); + + params[self.table.modules.page.paginationDataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(params, true); + } + + table.modules.ajax.sendRequest().then(function (data) { + + self.setData(data); + }).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, + displayIndex; + + 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; + } + + //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 { + + self.renderTable(); + + if (table.options.layoutColumnsOnNewData) { + + self.table.columnManager.redraw(true); + } + } + } + + if (table.modExists("columnCalcs")) { + + table.modules.columnCalcs.recalc(this.activeRows); + } + }; + + 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; + } + } 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 () { + + return this.rows; + }; + + ///////////////// Table Rendering ///////////////// + + + //trigger rerender of table in current position + + RowManager.prototype.reRenderInPosition = function (callback) { + + if (this.getRenderMode() == "virtual") { + + 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.element.clientHeight || this.table.options.height) && this.table.options.virtualDom) { + + this.renderMode = "virtual"; + } else { + + this.renderMode = "classic"; + } + }; + + RowManager.prototype.getRenderMode = function () { + + return this.renderMode; + }; + + RowManager.prototype.renderTable = function () { + + var self = this; + + self.table.options.renderStarted.call(this.table); + + self.element.scrollTop = 0; + + switch (self.renderMode) { + + case "classic": + + self._simpleRender(); + + break; + + case "virtual": + + self._virtualRenderFill(); + + break; + + } + + if (self.firstRender) { + + if (self.displayRowsCount) { + + self.firstRender = false; + + self.table.modules.layout.layout(); + } else { + + self.renderEmptyScroll(); + } + } + + if (self.table.modExists("frozenColumns")) { + + self.table.modules.frozenColumns.layout(); + } + + if (!self.displayRowsCount) { + + if (self.table.options.placeholder) { + + if (this.renderMode) { + + self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); + } + + self.getElement().appendChild(self.table.options.placeholder); + } + } + + self.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 () { + + 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.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()); + + 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(); + } + }; + + //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 { + + //scrolling down + + if (topDiff >= 0) { + + //hide top row if needed + + if (this.scrollTop > this.vDomWindowBuffer) { + + this._removeTopRow(topDiff); + } + } + + 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 () { + + if (this.renderMode === "virtual") { + + this.height = this.element.clientHeight; + + this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; + + var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); + + this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; + + this.element.style.height = "calc(100% - " + otherHeight + "px)"; + + this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; + } + }; + + //renitialize all rows + + RowManager.prototype.reinitialize = function () { + + this.rows.forEach(function (row) { + + row.reinitialize(); + }); + }; + + //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')); + } + }; + + //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.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.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); + } + + 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) { + + this.table = parent.table; + + this.parent = parent; + + this.data = {}; + + this.type = "row"; //type of element + + this.element = this.createElement(); + + 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.setData(data); + + this.generateElement(); + }; + + Row.prototype.createElement = function () { + + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + + el.setAttribute("role", "row"); + + return el; + }; + + Row.prototype.getElement = function () { + + 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; + + //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); + } + + //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 self = this; + + if (!self.initialized || force) { + + self.deleteCells(); + + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); + } //handle frozen cells + + if (this.table.modExists("frozenColumns")) { + + this.table.modules.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + self.cells.forEach(function (cell) { + + self.element.appendChild(cell.getElement()); + + cell.cellRendered(); + }); + + if (force) { + + self.normalizeHeight(); + } + + //setup movable rows + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + + self.table.modules.dataTree.layoutRow(this); + } + + //setup movable rows + + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { + + self.table.modules.responsiveLayout.layoutRow(this); + } + + if (self.table.options.rowFormatter) { + + self.table.options.rowFormatter(self.getComponent()); + } + + //set resizable handles + + if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { + + self.table.modules.resizeRows.initializeRow(self); + } + + self.initialized = true; + } + }; + + Row.prototype.reinitializeHeight = function () { + + this.heightInitialized = false; + + if (this.element.offsetParent !== null) { + + this.normalizeHeight(true); + } + }; + + Row.prototype.reinitialize = function () { + + this.initialized = false; + + this.heightInitialized = false; + + if (!this.manualHeight) { + + this.height = 0; + + this.heightStyled = ""; + } + + if (this.element.offsetParent !== null) { + + this.initialize(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 (data) { + var _this7 = this; + + var self = this, + visible = Tabulator.prototype.helpers.elVisible(this.element); + + return new Promise(function (resolve, reject) { + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (_this7.table.options.reactiveData && _this7.table.modExists("reactiveData", true)) { + + _this7.table.modules.reactiveData.block(); + } + + //mutate incomming data if needed + + if (self.table.modExists("mutator")) { + + data = self.table.modules.mutator.transformRow(data, "data", true); + } + + //set data + + for (var attrname in data) { + + self.data[attrname] = data[attrname]; + } + + if (_this7.table.options.reactiveData && _this7.table.modExists("reactiveData", true)) { + + _this7.table.modules.reactiveData.unblock(); + } + + //update affected cells only + + for (var attrname in data) { + + var columns = _this7.table.columnManager.getColumnsByFieldRoot(attrname); + + columns.forEach(function (column) { + + var cell = _this7.getCell(column.getField()); + + if (cell) { + + var value = column.getFieldValue(data); + + if (cell.getValue() != value) { + + cell.setValueProcessData(value); + + if (visible) { + + cell.cellRendered(); + } + } + } + }); + } + + //Partial reinitialization if visible + + if (visible) { + + self.normalizeHeight(); + + if (self.table.options.rowFormatter) { + + self.table.options.rowFormatter(self.getComponent()); + } + } else { + + _this7.initialized = false; + + _this7.height = 0; + + _this7.heightStyled = ""; + } + + if (self.table.options.dataTree !== false && self.table.modExists("dataTree") && _this7.table.modules.dataTree.redrawNeeded(data)) { + + _this7.table.modules.dataTree.initializeRow(_this7); + + _this7.table.modules.dataTree.layoutRow(_this7); + + _this7.table.rowManager.refreshActiveData("tree", false, true); + } + + //self.reinitialize(); + + + self.table.options.rowUpdated.call(_this7.table, self.getComponent()); + + resolve(); + }); + }; + + Row.prototype.getData = function (transform) { + + var self = this; + + if (transform) { + + if (self.table.modExists("accessor")) { + + return self.table.modules.accessor.transformRow(self.data, transform); + } + } else { + + 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); + } + }; + + ///////////////////// Actions ///////////////////// + + + Row.prototype.delete = function () { + var _this8 = this; + + return new Promise(function (resolve, reject) { + + var index, rows; + + if (_this8.table.options.history && _this8.table.modExists("history")) { + + if (_this8.table.options.groupBy && _this8.table.modExists("groupRows")) { + + rows = _this8.getGroup().rows; + + index = rows.indexOf(_this8); + + if (index) { + + index = rows[index - 1]; + } + } else { + + index = _this8.table.rowManager.getRowIndex(_this8); + + if (index) { + + index = _this8.table.rowManager.rows[index - 1]; + } + } + + _this8.table.modules.history.action("rowDelete", _this8, { data: _this8.getData(), pos: !index, index: index }); + } + + _this8.deleteActual(); + + resolve(); + }); + }; + + Row.prototype.deleteActual = function (blockRedraw) { + + var index = this.table.rowManager.getRowIndex(this); + + //deselect row if it is selected + + if (this.table.modExists("selectRow")) { + + this.table.modules.selectRow._deselectRow(this, true); + } + + // 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; + + //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.deleteCells = function () { + + var cellCount = this.cells.length; + + for (var i = 0; i < cellCount; i++) { + + this.cells[0].delete(); + } + }; + + Row.prototype.wipe = function () { + + this.deleteCells(); + + while (this.element.firstChild) { + this.element.removeChild(this.element.firstChild); + }this.element = false; + + this.modules = {}; + + if (this.element.parentNode) { + + this.element.parentNode.removeChild(this.element); + } + }; + + Row.prototype.getGroup = function () { + + return this.modules.group || false; + }; + + //////////////// Object Generation ///////////////// + + Row.prototype.getComponent = function () { + + return new RowComponent(this); + }; + + //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.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.edit = function (force) { + + return this._cell.edit(force); + }; + + CellComponent.prototype.cancelEdit = function () { + + this._cell.cancelEdit(); + }; + + 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.oldValue = null; + + this.height = null; + + this.width = null; + + this.minWidth = null; + + this.build(); + }; + + //////////////// Setup Functions ///////////////// + + + //generate element + + Cell.prototype.build = function () { + + this.generateElement(); + + this.setWidth(); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); + }; + + 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(); + + //set text alignment + + element.style.textAlign = 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) { + + 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 () { + + 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); + } + + this.table.options.cellEdited.call(this.table, component); + + this.table.options.dataEdited.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(); + } + + this._generateContents(); + + this._generateTooltip(); + + //set resizable handles + + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { + + this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + //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.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 = ""; + }; + + 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.delete = function () { + + this.element.parentNode.removeChild(this.element); + + 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 () { + + return new CellComponent(this); + }; + + 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.browser = ""; //hold current browser type + + this.browserSlow = false; //handle reduced functionality for slower browsers + + + this.modules = {}; //hold all modules bound to this table + + + 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 + + + layout: "fitData", ///layout type "fitColumns" | "fitData" + + layoutColumnsOnNewData: false, //update column widths on setData + + + columnMinWidth: 40, //minimum global width for a column + + columnVertAlign: "top", //vertical alignment of column headers + + + resizableColumns: true, //resizable columns + + resizableRows: false, //resizable rows + + autoResize: true, //auto resize table + + + columns: [], //store for colum header info + + + data: [], //default starting data + + + autoColumns: false, //build columns from data row structure + + + 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 + + + footerElement: false, //hold footer element + + + index: "id", //filed for row index + + + 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 + + clipboardCopySelector: "active", //method of chosing which data is coppied to the clipboard + + clipboardCopyFormatter: "table", //convert data to a clipboard string + + clipboardPasteParser: "table", //convert pasted clipboard data to rows + + clipboardPasteAction: "insert", //how to insert pasted data into the table + + clipboardCopyConfig: false, //clipboard config + + + 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: false, //download config + + + dataTree: false, //enable data tree + + 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 + + + printAsHtml: false, //enable print as html + + printFormatter: false, //printing page formatter + + printHeader: false, //page header contents + + printFooter: false, //page footer contents + + printCopyStyle: true, //enable print as html styling + + printVisibleRows: true, //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 + + + 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 + + + persistentLayout: false, //store column layout in memory + + persistentSort: false, //store sorting in memory + + persistentFilter: false, //store filters in memory + + persistenceID: "", //key for persistent storage + + persistenceMode: true, //mode for storing persistence information + + + 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 + + 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, + + groupHeader: false, //header generation function + + + 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 + + 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() {}, + + scrollToRowPosition: "top", + + scrollToRowIfVisible: true, + + scrollToColumnPosition: "left", + + scrollToColumnIfVisible: true, + + rowFormatter: false, + + 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, + + 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: function dataEdited() {}, + + //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, + + groupTap: false, + + groupDblTap: false, + + groupTapHold: false, + + columnCalcs: true, + + //pagination callbacks + + pageLoaded: function pageLoaded() {}, + + //localization callbacks + + localized: function localized() {}, + + //validation has failed + + validationFailed: function validationFailed() {}, + + //history callbacks + + historyUndo: function historyUndo() {}, + + historyRedo: function historyRedo() {} + + }; + + 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] = []; + } else if (_typeof(this.defaultOptions[key]) === "object") { + + this.options[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; + } + }; + + //convert depricated functionality to new functions + + Tabulator.prototype._mapDepricatedFunctionality = function () {}; + + 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(); + + 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); + + 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 _this9 = 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; + } + + this.columnManager.initialize(); + + this.rowManager.initialize(); + + this._detectBrowser(); + + if (this.modExists("layout", true)) { + + mod.layout.initialize(options.layout); + } + + //set localization + + 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.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)) { + + mod.persistence.initialize(options.persistenceMode, options.persistenceID); + } + + if (options.persistentLayout && this.modExists("persistence", true)) { + + options.columns = mod.persistence.load("columns", options.columns); + } + + 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.persistentSort || options.initialSort) && this.modExists("sort", true)) { + + var sorters = []; + + if (options.persistentSort && this.modExists("persistence", true)) { + + 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.persistentFilter || options.initialFilter) && this.modExists("filter", true)) { + + var filters = []; + + if (options.persistentFilter && this.modExists("persistence", true)) { + + 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 = _this9.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); + + if (self.options.pagination == "local") { + + 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().then(function () {}).catch(function () {}); + } else { + + self.rowManager.setData(self.options.data); + } + } + } else { + + if (self.options.ajaxURL) { + + self.modules.page.setPage(1).then(function () {}).catch(function () {}); + } else { + + self.rowManager.setData([]); + } + } + } 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().then(function () {}).catch(function () {}); + } else { + + self.rowManager.setData(self.options.data); + } + } + } + }; + + //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; + + 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; + } + }; + + ////////////////// Data Handling ////////////////// + + + //loca data from local file + + Tabulator.prototype.setDataFromLocalFile = function (extensions) { + var _this10 = 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; + } + + _this10._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); + }; + + Tabulator.prototype._setData = function (data, params, config, inPosition) { + + 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); + } 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); + + 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); + } + } + } + } else { + + if (data) { + + //asume data is already an object + + return self.rowManager.setData(data, inPosition); + } 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); + + return self.modules.page.setPage(1); + } else { + + return self.modules.ajax.loadData(inPosition); + } + } else { + + //empty data + + return self.rowManager.setData([], inPosition); + } + } + } + }; + + //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) { + + return this.rowManager.getData(active); + }; + + //get table data array count + + Tabulator.prototype.getDataCount = function (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("htmlTableExport", true)) { + + return this.modules.htmlTableExport.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 _this11 = this; + + var self = this; + + var responses = 0; + + return new Promise(function (resolve, reject) { + + if (_this11.modExists("ajax")) { + + _this11.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 _this12 = this; + + return new Promise(function (resolve, reject) { + + if (_this12.modExists("ajax")) { + + _this12.modules.ajax.blockActiveRequest(); + } + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (data) { + + _this12.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 _this13 = this; + + var self = this, + rows = [], + responses = 0; + + return new Promise(function (resolve, reject) { + + if (_this13.modExists("ajax")) { + + _this13.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 _this14 = this; + + return new Promise(function (resolve, reject) { + + var row = _this14.rowManager.findRow(index); + + if (row) { + + row.delete().then(function () { + + resolve(); + }).catch(function (err) { + + reject(err); + }); + } else { + + console.warn("Delete Error - No matching row found:", index); + + reject("Delete Error - No matching row found"); + } + }); + }; + + //add row to table + + Tabulator.prototype.addRow = function (data, pos, index) { + var _this15 = this; + + return new Promise(function (resolve, reject) { + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + _this15.rowManager.addRows(data, pos, index).then(function (rows) { + + //recalc column calculations if present + + if (_this15.modExists("columnCalcs")) { + + _this15.modules.columnCalcs.recalc(_this15.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }); + }); + }; + + //update a row if it exitsts otherwise create it + + Tabulator.prototype.updateOrAddRow = function (index, data) { + var _this16 = this; + + return new Promise(function (resolve, reject) { + + var row = _this16.rowManager.findRow(index); + + if (typeof data === "string") { + + data = JSON.parse(data); + } + + if (row) { + + row.updateData(data).then(function () { + + //recalc column calculations if present + + if (_this16.modExists("columnCalcs")) { + + _this16.modules.columnCalcs.recalc(_this16.rowManager.activeRows); + } + + resolve(row.getComponent()); + }).catch(function (err) { + + reject(err); + }); + } else { + + row = _this16.rowManager.addRows(data).then(function (rows) { + + //recalc column calculations if present + + if (_this16.modExists("columnCalcs")) { + + _this16.modules.columnCalcs.recalc(_this16.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }).catch(function (err) { + + reject(err); + }); + } + }); + }; + + //update row data + + Tabulator.prototype.updateRow = function (index, data) { + var _this17 = this; + + return new Promise(function (resolve, reject) { + + var row = _this17.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 _this18 = this; + + return new Promise(function (resolve, reject) { + + var row = _this18.rowManager.findRow(index); + + if (row) { + + _this18.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) { + + 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, selectorParams, formatter, formatterParams) { + + if (this.modExists("clipboard", true)) { + + this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); + } + }; + + /////////////// 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 column = this.columnManager.findColumn(field); + + this.columnManager.addColumn(definition, before, column); + }; + + Tabulator.prototype.deleteColumn = function (field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.delete(); + } else { + + console.warn("Column Delete Error - No matching column found:", field); + + return false; + } + }; + + 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 _this19 = this; + + return new Promise(function (resolve, reject) { + + var column = _this19.columnManager.findColumn(field); + + if (column) { + + _this19.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.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) { + + if (this.modExists("filter", true)) { + + this.modules.filter.setFilter(field, type, value); + + this.rowManager.filterRefresh(); + } + }; + + //add filter to array + + Tabulator.prototype.addFilter = function (field, type, value) { + + if (this.modExists("filter", true)) { + + this.modules.filter.addFilter(field, type, value); + + 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.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(); + } + }; + + ///////////////////// Filtering //////////////////// + + Tabulator.prototype.selectRow = function (rows) { + + if (this.modExists("selectRow", true)) { + + 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(); + } + }; + + //////////// 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 _this20 = this; + + return new Promise(function (resolve, reject) { + + if (_this20.options.pagination && _this20.modExists("page")) { + + row = _this20.rowManager.findRow(row); + + if (row) { + + _this20.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"); + } 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"); + } 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"); + } 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(); + } + }; + + ///////////////// Column Calculation Functions /////////////// + + Tabulator.prototype.getCalcResults = function () { + + if (this.modExists("columnCalcs", true)) { + + return this.modules.columnCalcs.getResults(); + } else { + + return false; + } + }; + + /////////////// 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; + } + }; + + /////////////// Download Management ////////////// + + + Tabulator.prototype.download = function (type, filename, options) { + + if (this.modExists("download", true)) { + + this.modules.download.download(type, filename, options); + } + }; + + Tabulator.prototype.downloadToTab = function (type, filename, options) { + + if (this.modExists("download", true)) { + + this.modules.download.download(type, filename, options, 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 = Array.isArray(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]); + } + } else { + + clone[i] = 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) { + + 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 { + + 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; + }); + } + + }; + + 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); + }; + + //layout render functions + + + Layout.prototype.modes = { + + //resize columns to fit data the contain + + + "fitData": function fitData(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 + + + "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 + + + "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, + 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 { + + 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 + }; + + //set header placehoder + + Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { + + this.langs.default.headerFilters.default = placeholder; + }; + + //set header filter placeholder by column + + Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { + + this.langs.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.langs[locale]) { + + this._setLangProp(this.langs[locale], lang); + } else { + + this.langs[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.langs[desiredLocale]) { + + var prefix = desiredLocale.split("-")[0]; + + if (self.langs[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.langs.default || {}); + + if (desiredLocale != "default") { + + traverseLang(self.langs[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.langs[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", + + "first": "First", + + "first_title": "First Page", + + "last": "Last", + + "last_title": "Last Page", + + "prev": "Prev", + + "prev_title": "Prev Page", + + "next": "Next", + + "next_title": "Next Page" + + }, + + "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"]; //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 (dataIn, type) { + var self = this, + key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); + + self.table.columnManager.traverse(function (column) { + var value, accessor, params, component; + + if (column.modules.accessor) { + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if (accessor) { + value = column.getFieldValue(data); + + if (value != "undefined") { + component = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); + } + } + } + }); + + 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) { + var self = this; + + if (this.progressiveLoad) { + return this._loadDataProgressive(); + } else { + return this._loadDataStandard(inPosition); + } + }; + + 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) { + var _this21 = this; + + return new Promise(function (resolve, reject) { + _this21.sendRequest(inPosition).then(function (data) { + _this21.table.rowManager.setData(data, inPosition).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 _this22 = 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(_this22.table, self.url, self.params) !== false) { + + self.loading = true; + + if (!silent) { + self.showLoader(); + } + + _this22.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); + } 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"); + } + + self.hideLoader(); + + self.loading = false; + }).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(); + }); + } 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 += "?" + this.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(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); + + 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.headersElement.after(this.topElement); + 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) { + var hozAdjust = 0, + scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; + + if (this.botInitialized) { + 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.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 data = []; + + rows.forEach(function (row) { + data.push(row.getData()); + }); + + 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); + + if (self.table.modExists("mutator")) { + self.table.modules.mutator.enable(); + } + + row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); + row.type = "calc"; + + 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.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) { + value = Number(value); + return sum + 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.copySelector = false; + this.copySelectorParams = {}; + this.copyFormatter = false; + this.copyFormatterParams = {}; + this.pasteParser = function () {}; + this.pasteAction = function () {}; + this.htmlElement = false; + this.config = {}; + + this.blocked = true; //block copy actions not originating from this command + }; + + Clipboard.prototype.initialize = function () { + var self = this; + + this.mode = this.table.options.clipboard; + + if (this.mode === true || this.mode === "copy") { + this.table.element.addEventListener("copy", function (e) { + var data; + + self.processConfig(); + + if (!self.blocked) { + e.preventDefault(); + + data = self.generateContent(); + + if (window.clipboardData && window.clipboardData.setData) { + window.clipboardData.setData('Text', data); + } else if (e.clipboardData && e.clipboardData.setData) { + e.clipboardData.setData('text/plain', data); + if (self.htmlElement) { + e.clipboardData.setData('text/html', self.htmlElement.outerHTML); + } + } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { + e.originalEvent.clipboardData.setData('text/plain', data); + if (self.htmlElement) { + e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); + } + } + + self.table.options.clipboardCopied.call(this.table, data); + + self.reset(); + } + }); + } + + if (this.mode === true || this.mode === "paste") { + this.table.element.addEventListener("paste", function (e) { + self.paste(e); + }); + } + + this.setPasteParser(this.table.options.clipboardPasteParser); + this.setPasteAction(this.table.options.clipboardPasteAction); + }; + + Clipboard.prototype.processConfig = function () { + var config = { + columnHeaders: "groups", + rowGroups: true, + columnCalcs: true + }; + + if (typeof this.table.options.clipboardCopyHeader !== "undefined") { + config.columnHeaders = this.table.options.clipboardCopyHeader; + console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); + } + + if (this.table.options.clipboardCopyConfig) { + for (var key in this.table.options.clipboardCopyConfig) { + config[key] = this.table.options.clipboardCopyConfig[key]; + } + } + + if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { + this.config.rowGroups = true; + } + + if (config.columnHeaders) { + if ((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { + this.config.columnHeaders = "groups"; + } else { + this.config.columnHeaders = "columns"; + } + } else { + this.config.columnHeaders = false; + } + + if (config.columnCalcs && this.table.modExists("columnCalcs")) { + this.config.columnCalcs = true; + } + }; + + Clipboard.prototype.reset = function () { + this.blocked = false; + this.originalSelectionText = ""; + }; + + 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.copy = function (selector, selectorParams, formatter, formatterParams, internal) { + var range, sel, textRange; + this.blocked = false; + + if (this.mode === true || this.mode === "copy") { + + if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { + range = document.createRange(); + range.selectNodeContents(this.table.element); + sel = window.getSelection(); + + if (sel.toString() && internal) { + selector = "userSelection"; + formatter = "raw"; + selectorParams = 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(); + } + + this.setSelector(selector); + this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; + this.setFormatter(formatter); + this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; + + document.execCommand('copy'); + + if (sel) { + sel.removeAllRanges(); + } + } + }; + + Clipboard.prototype.setSelector = function (selector) { + selector = selector || this.table.options.clipboardCopySelector; + + switch (typeof selector === 'undefined' ? 'undefined' : _typeof(selector)) { + case "string": + if (this.copySelectors[selector]) { + this.copySelector = this.copySelectors[selector]; + } else { + console.warn("Clipboard Error - No such selector found:", selector); + } + break; + + case "function": + this.copySelector = selector; + break; + } + }; + + Clipboard.prototype.setFormatter = function (formatter) { + + formatter = formatter || this.table.options.clipboardCopyFormatter; + + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + case "string": + if (this.copyFormatters[formatter]) { + this.copyFormatter = this.copyFormatters[formatter]; + } else { + console.warn("Clipboard Error - No such formatter found:", formatter); + } + break; + + case "function": + this.copyFormatter = formatter; + break; + } + }; + + Clipboard.prototype.generateContent = function () { + var data; + + this.htmlElement = false; + data = this.copySelector.call(this, this.config, this.copySelectorParams); + + return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); + }; + + Clipboard.prototype.generateSimpleHeaders = function (columns) { + var headers = []; + + columns.forEach(function (column) { + headers.push(column.definition.title); + }); + + return headers; + }; + + Clipboard.prototype.generateColumnGroupHeaders = function (columns) { + var _this23 = this; + + var output = []; + + this.table.columnManager.columns.forEach(function (column) { + var colData = _this23.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; + }; + + Clipboard.prototype.processColumnGroup = function (column) { + var _this24 = this; + + var subGroups = column.columns; + + var groupData = { + type: "group", + title: column.definition.title, + column: column + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this24.processColumnGroup(subGroup); + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + } + }); + + if (!groupData.width) { + return false; + } + } else { + if (column.field && (column.definition.clipboard || column.visible && column.definition.clipboard !== false)) { + groupData.width = 1; + } else { + return false; + } + } + + return groupData; + }; + + Clipboard.prototype.groupHeadersToRows = function (columns) { + + var headers = []; + + function parseColumnGroup(column, level) { + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + headers[level].push(column.title); + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } else { + padColumnheaders(); + } + } + + function padColumnheaders() { + var max = 0; + + headers.forEach(function (title) { + var len = title.length; + if (len > max) { + max = len; + } + }); + + headers.forEach(function (title) { + var len = title.length; + if (len < max) { + for (var i = len; i < max; i++) { + title.push(""); + } + } + }); + } + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + return headers; + }; + + Clipboard.prototype.rowsToData = function (rows, columns, config, params) { + var data = []; + + rows.forEach(function (row) { + var rowArray = [], + rowData = row instanceof RowComponent ? row.getData("clipboard") : row; + + columns.forEach(function (column) { + var value = column.getFieldValue(rowData); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + rowArray.push(value); + }); + + data.push(rowArray); + }); + + return data; + }; + + Clipboard.prototype.buildComplexRows = function (config) { + var _this25 = this; + + var output = [], + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach(function (group) { + output.push(_this25.processGroupData(group)); + }); + + return output; + }; + + Clipboard.prototype.processGroupData = function (group) { + var _this26 = this; + + var subGroups = group.getSubGroups(); + + var groupData = { + type: "group", + key: group.key + }; + + if (subGroups.length) { + groupData.subGroups = []; + + subGroups.forEach(function (subGroup) { + groupData.subGroups.push(_this26.processGroupData(subGroup)); + }); + } else { + groupData.rows = group.getRows(true); + } + + return groupData; + }; + + Clipboard.prototype.getCalcRow = function (calcs, columns, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + return this.rowsToData([calcData], columns); + } + } + + return []; + }; + + Clipboard.prototype.buildOutput = function (rows, config, params) { + var _this27 = this; + + var output = [], + calcs, + columns = []; + + if (config.columnHeaders == "groups") { + columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); + + output = output.concat(this.groupHeadersToRows(columns)); + } else { + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (column.definition.clipboard || column.visible && column.definition.clipboard !== false) { + columns.push(column); + } + }); + + output.push(this.generateSimpleHeaders(columns)); + } + + if (this.config.columnCalcs) { + calcs = this.table.getCalcResults(); + } + + //generate styled content + if (this.table.options.clipboardCopyStyled) { + this.generateHTML(rows, columns, calcs, config, params); + } + + //generate unstyled content + if (config.rowGroups) { + rows.forEach(function (row) { + output = output.concat(_this27.parseRowGroupData(row, columns, config, params, calcs || {})); + }); + } else { + if (config.columnCalcs) { + output = output.concat(this.getCalcRow(calcs, columns, "top")); + } + + output = output.concat(this.rowsToData(rows, columns, config, params)); + + if (config.columnCalcs) { + output = output.concat(this.getCalcRow(calcs, columns, "bottom")); + } + } + + return output; + }; + + Clipboard.prototype.parseRowGroupData = function (group, columns, config, params, calcObj) { + var _this28 = this; + + var groupData = []; + + groupData.push([group.key]); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + groupData = groupData.concat(_this28.parseRowGroupData(subGroup, config, params, calcObj[group.key] ? calcObj[group.key].groups || {} : {})); + }); + } else { + if (config.columnCalcs) { + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "top")); + } + + groupData = groupData.concat(this.rowsToData(group.rows, columns, config, params)); + + if (config.columnCalcs) { + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "bottom")); + } + } + + return groupData; + }; + + Clipboard.prototype.generateHTML = function (rows, columns, calcs, config, params) { + var self = this, + data = [], + headers = [], + body, + oddRow, + evenRow, + calcRow, + firstRow, + firstCell, + firstGroup, + lastCell, + styleCells; + + //create table element + this.htmlElement = document.createElement("table"); + self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); + + function generateSimpleHeaders() { + var headerEl = document.createElement("tr"); + + columns.forEach(function (column) { + var columnEl = document.createElement("th"); + columnEl.innerHTML = column.definition.title; + + self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); + } + + function generateHeaders(headers) { + + var headerHolderEl = document.createElement("thead"); + + headers.forEach(function (columns) { + var headerEl = document.createElement("tr"); + + columns.forEach(function (column) { + var columnEl = document.createElement("th"); + + if (column.width > 1) { + columnEl.colSpan = column.width; + } + + if (column.height > 1) { + columnEl.rowSpan = column.height; + } + + columnEl.innerHTML = column.title; + + self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerHolderEl.appendChild(headerEl); + }); + + self.htmlElement.appendChild(headerHolderEl); + } + + function parseColumnGroup(column, level) { + + if (typeof headers[level] === "undefined") { + headers[level] = []; + } + + headers[level].push({ + title: column.title, + width: column.width, + height: 1, + children: !!column.subGroups, + element: column.column.getElement() + }); + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } + } + + function padVerticalColumnheaders() { + headers.forEach(function (row, index) { + row.forEach(function (header) { + if (!header.children) { + header.height = headers.length - index; + } + }); + }); + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + // calcRowIndexs.push(body.length); + processRows([calcData]); + } + } + } + + //create headers if needed + if (config.columnHeaders) { + if (config.columnHeaders == "groups") { + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + padVerticalColumnheaders(); + generateHeaders(headers); + } else { + generateSimpleHeaders(); + } + } + + // columns = this.table.columnManager.columnsByIndex; + + //create table body + body = document.createElement("tbody"); + + //lookup row styles + if (window.getComputedStyle) { + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (firstRow) { + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + function processRows(rowArray) { + //add rows to table + rowArray.forEach(function (row, i) { + var rowEl = document.createElement("tr"), + styleRow = firstRow, + isCalc = false, + rowData; + + if (row instanceof RowComponent) { + rowData = row.getData("clipboard"); + } else { + rowData = row; + isCalc = true; + } + + columns.forEach(function (column, j) { + var cellEl = document.createElement("td"), + value = column.getFieldValue(rowData); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + cellEl.innerHTML = value; + + if (column.definition.align) { + cellEl.style.textAlign = column.definition.align; + } + + if (j < columns.length - 1) { + if (firstCell) { + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + } else { + if (firstCell) { + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + } + + rowEl.appendChild(cellEl); + }); + + if (isCalc) { + styleRow = calcRow; + } else { + if (!(i % 2) && oddRow) { + styleRow = oddRow; + } + + if (i % 2 && evenRow) { + styleRow = evenRow; + } + } + + if (styleRow) { + self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + } + + body.appendChild(rowEl); + }); + } + + function processGroup(group, calcObj) { + var groupEl = document.createElement("tr"), + groupCellEl = document.createElement("td"); + + groupCellEl.colSpan = columns.length; + + groupCellEl.innerHTML = group.key; + + groupEl.appendChild(groupCellEl); + body.appendChild(groupEl); + + self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + processGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + processRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + if (config.rowGroups) { + rows.forEach(function (group) { + processGroup(group, calcs || {}); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + processRows(rows); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + this.htmlElement.appendChild(body); + }; + + Clipboard.prototype.mapElementStyles = function (from, to, props) { + + var lookup = { + "background-color": "backgroundColor", + "color": "fontColor", + "font-weight": "fontWeight", + "font-family": "fontFamily", + "font-size": "fontSize", + "border-top": "borderTop", + "border-left": "borderLeft", + "border-right": "borderRight", + "border-bottom": "borderBottom" + }; + + if (window.getComputedStyle) { + var fromStyle = window.getComputedStyle(from); + + props.forEach(function (prop) { + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + + // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; + }; + + Clipboard.prototype.copySelectors = { + userSelection: function userSelection(config, params) { + return params; + }, + selected: function selected(config, params) { + var rows = []; + + if (this.table.modExists("selectRow", true)) { + rows = this.table.modules.selectRow.getSelectedRows(); + } + + if (config.rowGroups) { + console.warn("Clipboard Warning - select coptSelector does not support row groups"); + } + + return this.buildOutput(rows, config, params); + }, + table: function table(config, params) { + if (config.rowGroups) { + console.warn("Clipboard Warning - table coptSelector does not support row groups"); + } + + return this.buildOutput(this.table.rowManager.getComponents(), config, params); + }, + active: function active(config, params) { + var rows; + + if (config.rowGroups) { + rows = this.buildComplexRows(config); + } else { + rows = this.table.rowManager.getComponents(true); + } + + return this.buildOutput(rows, config, params); + } + }; + + Clipboard.prototype.copyFormatters = { + raw: function raw(data, params) { + return data; + }, + table: function table(data, params) { + var output = []; + + data.forEach(function (row) { + row.forEach(function (value) { + if (typeof value == "undefined") { + value = ""; + } + + value = typeof value == "undefined" || value === null ? "" : value.toString(); + + if (value.match(/\r|\n/)) { + value = value.split('"').join('""'); + value = '"' + value + '"'; + } + }); + + output.push(row.join("\t")); + }); + + return output.join("\n"); + } + }; + + 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; + + row.modules.dataTree = { + index: 0, + open: children ? this.startOpen(row.getComponent(), 0) : false, + controlEl: false, + branchEl: false, + 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) { + config.branchEl.parentNode.removeChild(config.branchEl); + } + + this.generateControlElement(row, el); + + if (config.index) { + if (this.branchEl) { + config.branchEl = this.branchEl.cloneNode(true); + el.insertBefore(config.branchEl, el.firstChild); + config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + 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 _this29 = 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(); + _this29.collapseRow(row); + }); + } else { + config.controlEl = this.expandEl.cloneNode(true); + config.controlEl.addEventListener("click", function (e) { + e.stopPropagation(); + _this29.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 _this30 = this; + + var output = []; + + rows.forEach(function (row, i) { + var config, children; + + output.push(row); + + if (row instanceof Row) { + + config = row.modules.dataTree.children; + + if (!config.index && config.children !== false) { + children = _this30.getChildren(row); + + children.forEach(function (child) { + output.push(child); + }); + } + } + }); + + return output; + }; + + DataTree.prototype.getChildren = function (row) { + var _this31 = 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")) { + children = this.table.modules.filter.filter(config.children); + } else { + children = config.children; + } + + if (this.table.modExists("sort")) { + this.table.modules.sort.sort(children); + } + + children.forEach(function (child) { + output.push(child); + + var subChildren = _this31.getChildren(child); + + subChildren.forEach(function (sub) { + output.push(sub); + }); + }); + } + + return output; + }; + + DataTree.prototype.generateChildren = function (row) { + var _this32 = this; + + var children = []; + + var childArray = row.getData()[this.field]; + + if (!Array.isArray(childArray)) { + childArray = [childArray]; + } + + childArray.forEach(function (childData) { + var childRow = new Row(childData || {}, _this32.table.rowManager); + childRow.modules.dataTree.index = row.modules.dataTree.index + 1; + childRow.modules.dataTree.parent = row; + if (childRow.modules.dataTree.children) { + childRow.modules.dataTree.open = _this32.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.getTreeChildren = function (row) { + 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(childRow.getComponent()); + } + }); + } + + return output; + }; + + DataTree.prototype.checkForRestyle = function (cell) { + if (!cell.row.cells.indexOf(cell)) { + if (cell.row.modules.dataTree.children !== false) { + 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 + this.fields = {}; //hold filed multi dimension arrays + this.columnsByIndex = []; //hold columns in their order in the table + this.columnsByField = {}; //hold columns with lookup by field name + this.config = {}; + }; + + //trigger file download + Download.prototype.download = function (type, filename, options, interceptCallback) { + var self = this, + downloadFunc = false; + this.processConfig(); + + 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); + } + } + + this.processColumns(); + + if (downloadFunc) { + downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); + } + }; + + Download.prototype.processConfig = function () { + var config = { //download config + columnGroups: true, + rowGroups: true, + columnCalcs: true + }; + + if (this.table.options.downloadConfig) { + for (var key in this.table.options.downloadConfig) { + config[key] = this.table.options.downloadConfig[key]; + } + } + + if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { + this.config.rowGroups = true; + } + + if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { + this.config.columnGroups = true; + } + + if (config.columnCalcs && this.table.modExists("columnCalcs")) { + this.config.columnCalcs = true; + } + }; + + Download.prototype.processColumns = function () { + var self = this; + + self.columnsByIndex = []; + self.columnsByField = {}; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.field && column.definition.download !== false && (column.visible || !column.visible && column.definition.download)) { + self.columnsByIndex.push(column); + self.columnsByField[column.field] = column; + } + }); + }; + + Download.prototype.processDefinitions = function () { + var self = this, + processedDefinitions = []; + + if (this.config.columnGroups) { + self.table.columnManager.columns.forEach(function (column) { + var colData = self.processColumnGroup(column); + + if (colData) { + processedDefinitions.push(colData); + } + }); + } else { + self.columnsByIndex.forEach(function (column) { + if (column.download !== false) { + //isolate definiton from defintion object + processedDefinitions.push(self.processDefinition(column)); + } + }); + } + + return processedDefinitions; + }; + + Download.prototype.processColumnGroup = function (column) { + var _this33 = this; + + var subGroups = column.columns, + maxDepth = 0; + var processedColumn = this.processDefinition(column); + var groupData = { + type: "group", + title: processedColumn.title, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this33.processColumnGroup(subGroup); + + if (subGroupData.depth > maxDepth) { + maxDepth = subGroupData.depth; + } + + if (subGroupData) { + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + } + }); + + groupData.depth += maxDepth; + + if (!groupData.width) { + return false; + } + } else { + if (column.field && column.definition.download !== false && (column.visible || !column.visible && column.definition.download)) { + groupData.width = 1; + groupData.definition = processedColumn; + } else { + return false; + } + } + + return groupData; + }; + + Download.prototype.processDefinition = function (column) { + var def = {}; + + for (var key in column.definition) { + def[key] = column.definition[key]; + } + + if (typeof column.definition.downloadTitle != "undefined") { + def.title = column.definition.downloadTitle; + } + + return def; + }; + + Download.prototype.processData = function () { + var _this34 = this; + + var self = this, + data = [], + groups = [], + calcs = {}; + + if (this.config.rowGroups) { + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach(function (group) { + data.push(_this34.processGroupData(group)); + }); + } else { + data = self.table.rowManager.getData(true, "download"); + } + + if (this.config.columnCalcs) { + calcs = this.table.getCalcResults(); + + data = { + calcs: calcs, + data: data + }; + } + + //bulk data processing + if (typeof self.table.options.downloadDataFormatter == "function") { + data = self.table.options.downloadDataFormatter(data); + } + + return data; + }; + + Download.prototype.processGroupData = function (group) { + var _this35 = this; + + var subGroups = group.getSubGroups(); + + var groupData = { + type: "group", + key: group.key + }; + + if (subGroups.length) { + groupData.subGroups = []; + + subGroups.forEach(function (subGroup) { + groupData.subGroups.push(_this35.processGroupData(subGroup)); + }); + } else { + groupData.rows = group.getData(true, "download"); + } + + return groupData; + }; + + 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(); + } + } + }; + + //nested field lookup + Download.prototype.getFieldValue = function (field, data) { + var column = this.columnsByField[field]; + + if (column) { + return column.getFieldValue(data); + } + + return false; + }; + + Download.prototype.commsReceived = function (table, action, data) { + switch (action) { + case "intercept": + this.download(data.type, "", data.options, data.intercept); + break; + } + }; + + //downloaders + Download.prototype.downloaders = { + csv: function csv(columns, data, options, setFileContents, config) { + var self = this, + titles = [], + fields = [], + delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents, + output; + + //build column headers + function parseSimpleTitles() { + columns.forEach(function (column) { + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.field); + }); + } + + function parseColumnGroup(column, level) { + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } else { + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.definition.field); + } + } + + if (config.columnGroups) { + console.warn("Download Warning - CSV downloader cannot process column groups"); + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + } else { + parseSimpleTitles(); + } + + //generate header row + fileContents = [titles.join(delimiter)]; + + function parseRows(data) { + //generate each row of the table + data.forEach(function (row) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + //escape quotation marks + rowData.push('"' + String(value).split('"').join('""') + '"'); + }); + + fileContents.push(rowData.join(delimiter)); + }); + } + + function parseGroup(group) { + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup); + }); + } else { + parseRows(group.rows); + } + } + + if (config.columnCalcs) { + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + if (config.rowGroups) { + console.warn("Download Warning - CSV downloader cannot process row groups"); + + data.forEach(function (group) { + parseGroup(group); + }); + } else { + parseRows(data); + } + + output = fileContents.join("\n"); + + if (options.bom) { + output = '\uFEFF' + output; + } + + setFileContents(output, "text/csv"); + }, + + json: function json(columns, data, options, setFileContents, config) { + var fileContents; + + if (config.columnCalcs) { + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + fileContents = JSON.stringify(data, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf: function pdf(columns, data, options, setFileContents, config) { + var self = this, + fields = [], + header = [], + body = [], + calcs = {}, + headerDepth = 1, + table = "", + 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 (config.columnCalcs) { + calcs = data.calcs; + data = data.data; + } + + if (!jsPDFParams.orientation) { + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if (!jsPDFParams.unit) { + jsPDFParams.unit = "pt"; + } + + //build column headers + function parseSimpleTitles() { + columns.forEach(function (column) { + if (column.field) { + header.push(column.title || ""); + fields.push(column.field); + } + }); + + header = [header]; + } + + function parseColumnGroup(column, level) { + var colSpan = column.width, + rowSpan = 1, + col = { + content: column.title || "" + }; + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + rowSpan = 1; + } else { + fields.push(column.definition.field); + rowSpan = headerDepth - level; + } + + col.rowSpan = rowSpan; + // col.colSpan = colSpan; + + header[level].push(col); + + colSpan--; + + if (rowSpan > 1) { + for (var i = level + 1; i < headerDepth; i++) { + header[i].push(""); + } + } + + for (var i = 0; i < colSpan; i++) { + header[level].push(""); + } + } + + if (config.columnGroups) { + columns.forEach(function (column) { + if (column.depth > headerDepth) { + headerDepth = column.depth; + } + }); + + for (var i = 0; i < headerDepth; i++) { + header.push([]); + } + + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + } else { + parseSimpleTitles(); + } + + function parseValue(value) { + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + return value; + } + + function parseRows(data) { + //build table rows + data.forEach(function (row) { + body.push(parseRow(row)); + }); + } + + function parseRow(row, styles) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + value = parseValue(value); + + if (styles) { + rowData.push({ + content: value, + styles: styles + }); + } else { + rowData.push(value); + } + }); + + return rowData; + } + + function parseGroup(group, calcObj) { + var groupData = []; + + groupData.push({ content: parseValue(group.key), colSpan: fields.length, styles: rowGroupStyles }); + + body.push(groupData); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + body.push(parseRow(calcData, rowCalcStyles)); + } + } + } + + if (config.rowGroups) { + data.forEach(function (group) { + parseGroup(group, calcs); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + 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(columns, data, options, setFileContents, config) { + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = { SheetNames: [], Sheets: {} }, + calcs = {}, + groupRowIndexs = [], + groupColumnIndexs = [], + calcRowIndexs = [], + output; + + if (config.columnCalcs) { + calcs = data.calcs; + data = data.data; + } + + function generateSheet() { + var titles = [], + fields = [], + rows = [], + worksheet; + + //convert rows to worksheet + function rowsToSheet() { + var sheet = {}; + var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; + + XLSX.utils.sheet_add_aoa(sheet, rows); + + sheet['!ref'] = XLSX.utils.encode_range(range); + + var merges = generateMerges(); + + if (merges.length) { + sheet["!merges"] = merges; + } + + return sheet; + } + + function parseSimpleTitles() { + //get field lists + columns.forEach(function (column) { + titles.push(column.title); + fields.push(column.field); + }); + + rows.push(titles); + } + + function parseColumnGroup(column, level) { + + if (typeof titles[level] === "undefined") { + titles[level] = []; + } + + if (typeof groupColumnIndexs[level] === "undefined") { + groupColumnIndexs[level] = []; + } + + if (column.width > 1) { + + groupColumnIndexs[level].push({ + type: "hoz", + start: titles[level].length, + end: titles[level].length + column.width - 1 + }); + } + + titles[level].push(column.title); + + if (column.subGroups) { + column.subGroups.forEach(function (subGroup) { + parseColumnGroup(subGroup, level + 1); + }); + } else { + fields.push(column.definition.field); + padColumnTitles(fields.length - 1, level); + + groupColumnIndexs[level].push({ + type: "vert", + start: fields.length - 1 + }); + } + } + + function padColumnTitles() { + var max = 0; + + titles.forEach(function (title) { + var len = title.length; + if (len > max) { + max = len; + } + }); + + titles.forEach(function (title) { + var len = title.length; + if (len < max) { + for (var i = len; i < max; i++) { + title.push(""); + } + } + }); + } + + if (config.columnGroups) { + columns.forEach(function (column) { + parseColumnGroup(column, 0); + }); + + titles.forEach(function (title) { + rows.push(title); + }); + } else { + parseSimpleTitles(); + } + + function generateMerges() { + var output = []; + + groupRowIndexs.forEach(function (index) { + output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); + }); + + groupColumnIndexs.forEach(function (merges, level) { + merges.forEach(function (merge) { + if (merge.type === "hoz") { + output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); + } else { + if (level != titles.length - 1) { + output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); + } + } + }); + }); + + return output; + } + + //generate each row of the table + function parseRows(data) { + data.forEach(function (row) { + rows.push(parseRow(row)); + }); + } + + function parseRow(row) { + var rowData = []; + + fields.forEach(function (field) { + var value = self.getFieldValue(field, row); + rowData.push(!(value instanceof Date) && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object" ? JSON.stringify(value) : value); + }); + + return rowData; + } + + function addCalcRow(calcs, selector, pos) { + var calcData = calcs[selector]; + + if (calcData) { + if (pos) { + calcData = calcData[pos]; + } + + if (Object.keys(calcData).length) { + calcRowIndexs.push(rows.length); + rows.push(parseRow(calcData)); + } + } + } + + function parseGroup(group, calcObj) { + var groupData = []; + + groupData.push(group.key); + + groupRowIndexs.push(rows.length); + + rows.push(groupData); + + if (group.subGroups) { + group.subGroups.forEach(function (subGroup) { + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + } else { + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if (config.columnCalcs) { + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + if (config.rowGroups) { + data.forEach(function (group) { + parseGroup(group, calcs); + }); + } else { + if (config.columnCalcs) { + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if (config.columnCalcs) { + addCalcRow(calcs, "bottom"); + } + } + + worksheet = rowsToSheet(); + + 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.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { + type: "xlsx", + options: { sheetOnly: true }, + intercept: function intercept(data) { + workbook.Sheets[sheet] = data; + } + }); + } + } + } else { + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + //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"); + } + + }; + + 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; + }; + + //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 () { + var cell = this.currentCell, + cellEl; + + this.invalidEdit = false; + + if (cell) { + this.currentCell = false; + + cellEl = cell.getElement(); + 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(); + cell.setValueActual(cell.getValue()); + + 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(); + + element.setAttribute("tabindex", 0); + + element.addEventListener("click", function (e) { + if (!element.classList.contains("tabulator-editing")) { + element.focus(); + } + }); + + element.addEventListener("mousedown", function (e) { + self.mouseClick = true; + }); + + element.addEventListener("focus", function (e) { + if (!self.recursionBlock) { + self.edit(cell, e, false); + } + }); + }; + + Edit.prototype.focusCellNoEvent = function (cell) { + this.recursionBlock = true; + if (this.table.browser !== "ie") { + cell.getElement().focus(); + } + this.recursionBlock = false; + }; + + Edit.prototype.editCell = function (cell, forceEdit) { + this.focusCellNoEvent(cell); + this.edit(cell, false, forceEdit); + }; + + 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")) { + valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); + } + + if (valid === true) { + self.clearEditor(); + cell.setValue(value, true); + + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.checkForRestyle(cell); + } + + return true; + } else { + self.invalidEdit = true; + element.classList.add("tabulator-validation-fail"); + self.focusCellNoEvent(cell); + 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; + + 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; + } + }; + + //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(); + 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 13: + onChange(e); + break; + + case 27: + cancel(); + break; + } + }); + + return input; + }, + + //resizable text area element + textarea: function textarea(cell, onRendered, success, cancel, editorParams) { + var self = this, + cellValue = cell.getValue(), + 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(); + 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 + } + + 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) { + if (e.keyCode == 27) { + cancel(); + } + }); + + return input; + }, + + //input element with type of number + number: function number(cell, onRendered, success, cancel, editorParams) { + + var cellValue = cell.getValue(), + 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(); + 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; + } + }); + + 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(); + 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 self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : "", + input = document.createElement("input"), + listEl = document.createElement("div"), + dataItems = [], + displayItems = [], + currentItem = {}, + blurable = true; + + this.table.rowManager.element.addEventListener("scroll", cancelItem); + + if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { + console.warn("DEPRECATION WANRING - 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; + } + }); + + 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 select lookup list:", field); + } + + return output; + } + + function parseItems(inputValues, curentValue) { + var dataList = []; + var displayList = []; + + function processComplexListItem(item) { + var item = { + label: editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, + value: item.value, + element: false + }; + + if (item.value === curentValue || !isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue)) { + setCurrentItem(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, + element: false + }; + + displayList.push(item); + + value.options.forEach(function (item) { + processComplexListItem(item); + }); + } else { + processComplexListItem(value); + } + } else { + + item = { + label: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, + value: value, + element: false + }; + + if (item.value === curentValue || !isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue)) { + setCurrentItem(item); + } + + dataList.push(item); + displayList.push(item); + } + }); + } else { + for (var key in inputValues) { + var item = { + label: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : 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); + } + + dataList.push(item); + displayList.push(item); + } + } + + dataItems = dataList; + displayItems = displayList; + + fillList(); + } + + function fillList() { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }displayItems.forEach(function (item) { + var el = item.element; + + if (!el) { + + if (item.group) { + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-group"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + } else { + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + + el.addEventListener("click", function () { + setCurrentItem(item); + chooseItem(); + }); + + if (item === currentItem) { + el.classList.add("active"); + } + } + + el.addEventListener("mousedown", function () { + blurable = false; + + setTimeout(function () { + blurable = true; + }, 10); + }); + + item.element = el; + } + + listEl.appendChild(el); + }); + } + + function setCurrentItem(item) { + + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + currentItem = item; + input.value = item.label === " " ? "" : item.label; + + if (item.element) { + item.element.classList.add("active"); + } + } + + function chooseItem() { + hideList(); + + if (initialValue !== currentItem.value) { + initialValue = currentItem.value; + success(currentItem.value); + } else { + cancel(); + } + } + + function cancelItem() { + hideList(); + cancel(); + } + + function showList() { + 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"; + document.body.appendChild(listEl); + } + } + + function hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //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); + } + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = dataItems.indexOf(currentItem); + + if (index > 0) { + setCurrentItem(dataItems[index - 1]); + } + break; + + case 40: + //down arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = dataItems.indexOf(currentItem); + + if (index < dataItems.length - 1) { + if (index == -1) { + setCurrentItem(dataItems[0]); + } else { + setCurrentItem(dataItems[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; + } + }); + + input.addEventListener("blur", function (e) { + if (blurable) { + cancelItem(); + } + }); + + input.addEventListener("focus", function (e) { + showList(); + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function () { + input.style.height = "100%"; + input.focus(); + }); + + return input; + }, + + //autocomplete + autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + 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 = {}, + blurable = true; + + this.table.rowManager.element.addEventListener("scroll", cancelItem); + + 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 parseItems(inputValues, curentValue) { + var itemList = []; + + if (Array.isArray(inputValues)) { + inputValues.forEach(function (value) { + var item = { + title: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, + value: value, + element: false + }; + + if (item.value === curentValue || !isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue)) { + setCurrentItem(item); + } + + itemList.push(item); + }); + } else { + for (var key in inputValues) { + var item = { + title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : 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); + } + + itemList.push(item); + } + } + + if (editorParams.searchFunc) { + itemList.forEach(function (item) { + item.search = { + title: item.title, + value: item.value + }; + }); + } + + allItems = itemList; + } + + function filterList(term, intialLoad) { + var matches = [], + searchObjs = [], + searchResults = []; + + if (editorParams.searchFunc) { + + allItems.forEach(function (item) { + searchObjs.push(item.search); + }); + + searchResults = editorParams.searchFunc(term, searchObjs); + + searchResults.forEach(function (result) { + var match = allItems.find(function (item) { + return item.search === result; + }); + + if (match) { + matches.push(match); + } + }); + } else { + if (term === "") { + + if (editorParams.showListOnEmpty) { + allItems.forEach(function (item) { + matches.push(item); + }); + } + } else { + allItems.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); + } + } + }); + } + } + + displayItems = matches; + + fillList(intialLoad); + } + + function fillList(intialLoad) { + var current = false; + + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }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 () { + setCurrentItem(item); + chooseItem(); + }); + + el.addEventListener("mousedown", function () { + 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 setCurrentItem(item, showInputValue) { + if (currentItem && currentItem.element) { + currentItem.element.classList.remove("active"); + } + + currentItem = item; + + if (item && item.element) { + item.element.classList.add("active"); + } + } + + 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 cancelItem() { + hideList(); + cancel(); + } + + function showList() { + if (!listEl.parentNode) { + while (listEl.firstChild) { + listEl.removeChild(listEl.firstChild); + }if (editorParams.values === true) { + values = getUniqueColumnValues(); + } else if (typeof editorParams.values === "string") { + values = getUniqueColumnValues(editorParams.values); + } else { + values = editorParams.values || []; + } + + parseItems(values, initialValue); + + 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 hideList() { + if (listEl.parentNode) { + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //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]); + } + } + } + + //allow key based navigation + input.addEventListener("keydown", function (e) { + var index; + + switch (e.keyCode) { + case 38: + //up arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = displayItems.indexOf(currentItem); + + if (index > 0) { + setCurrentItem(displayItems[index - 1]); + } else { + setCurrentItem(false); + } + break; + + case 40: + //down arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = displayItems.indexOf(currentItem); + + 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; + showList(); + input.value = value; + filterList(value, true); + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function () { + input.style.height = "100%"; + input.focus(); + }); + + return input; + }, + + //start 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); + }); + + 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 calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 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 + bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; + break; + + case 37: + //left arrow + bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; + break; + + 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(); + }); + } + + input.checked = value === true || value === "true" || value === "True" || value === 1; + + 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 Filter = function Filter(table) { + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterElements = []; //hold header filter elements for manipulation + this.headerFilterColumns = []; //hold columns that use header filters + + 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 = "", + 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 }; + } else { + delete self.headerFilters[field]; + } + + 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) { + var _this36 = 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) { + var oldFilterElement = column.modules.filter.headerElement.parentNode; + var oldFilterElementIndex = self.headerFilterElements.indexOf(oldFilterElement); + if (oldFilterElementIndex >= 0) { + self.headerFilterElements.splice(oldFilterElementIndex, 1); + } + + var oldColumnIndex = self.headerFilterColumns.indexOf(oldColumnIndex); + if (oldColumnIndex >= 0) { + self.headerFilterColumns.splice(oldColumnIndex, 1); + } + + column.contentElement.removeChild(oldFilterElement); + } + + 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 = _this36.table.columnManager.element.scrollLeft; + + if (left !== _this36.table.rowManager.element.scrollLeft) { + _this36.table.rowManager.scrollHorizontal(left); + _this36.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); + }, 300); + }; + + 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); + + self.headerFilterElements.push(editorElement); + 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.headerFilterElements.forEach(function (element) { + element.style.display = 'none'; + }); + }; + + //show all header filter elements (used to ensure correct column widths in "fitData" layout mode) + Filter.prototype.showHeaderFilterElements = function () { + this.headerFilterElements.forEach(function (element) { + element.style.display = ''; + }); + }; + + //programatically set value 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()); + } + }; + + //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); + 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); + } 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) { + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + self.addFilter(field); + }; + + //add filter to array + Filter.prototype.addFilter = function (field, type, value) { + var self = this; + + if (!Array.isArray(field)) { + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + + filter = self.findFilter(filter); + + if (filter) { + self.filterList.push(filter); + + self.changed = true; + } + }); + + if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { + 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)); + }; + } else { + filterFunc = function filterFunc(data) { + return self.filters[filter.type](filter.value, data[filter.field]); + }; + } + } 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 _this37 = this; + + var output = []; + + filterList.forEach(function (filter) { + var item; + + if (Array.isArray(filter)) { + output.push(_this37.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.persistentFilter && this.table.modExists("persistence", true)) { + 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.persistentFilter && this.table.modExists("persistence", true)) { + this.table.modules.persistence.save("filter"); + } + }; + + //clear header filters + Filter.prototype.clearHeaderFilter = function () { + var self = this; + + this.headerFilters = {}; + + 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; + } + } + }, + + //in array + "in": function _in(filterVal, rowVal, rowData, filterParams) { + if (Array.isArray(filterVal)) { + return filterVal.indexOf(rowVal) > -1; + } 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) { + var self = this, + config = { params: column.definition.formatterParams || {} }; + + //set column formatter + switch (_typeof(column.definition.formatter)) { + case "string": + + if (column.definition.formatter === "tick") { + column.definition.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 (self.formatters[column.definition.formatter]) { + config.formatter = self.formatters[column.definition.formatter]; + } else { + console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); + config.formatter = self.formatters.plaintext; + } + break; + + case "function": + config.formatter = column.definition.formatter; + break; + + default: + config.formatter = self.formatters.plaintext; + break; + } + + column.modules.format = config; + }; + + Format.prototype.cellRendered = function (cell) { + if (cell.column.modules.format.renderedCallback) { + cell.column.modules.format.renderedCallback(); + } + }; + + //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) { + cell.column.modules.format.renderedCallback = callback; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); + }; + + 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; + }; + + //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 || "", + 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); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + } else { + return " "; + } + }, + + //image element + image: function image(cell, formatterParams, onRendered) { + var el = document.createElement("img"); + el.setAttribute("src", cell.getValue()); + + 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 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); + + return "
" + (legend ? "
" + legend + "
" : ""); + }, + + //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"); + + function toggleList(isOpen) { + var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; + + open = isOpen; + + if (open) { + el.classList.add("open"); + if (collapse) { + collapse.style.display = ''; + } + } else { + el.classList.remove("open"); + if (collapse) { + collapse.style.display = 'none'; + } + } + } + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + if (self.table.options.responsiveLayoutCollapseStartOpen) { + open = true; + } + + el.addEventListener("click", function (e) { + e.stopImmediatePropagation(); + toggleList(!open); + }); + + toggleList(open); + + return el; + }, + + rowSelection: function rowSelection(cell) { + var _this38 = 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(); + + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + } else { + checkbox.addEventListener("change", function (e) { + if (_this38.table.modules.selectRow.selectedRows.length) { + _this38.table.deselectRow(); + } else { + _this38.table.selectRow(); + } + }); + + 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.definition.frozen) { + + if (!column.parent.isGroup) { + + if (!column.isGroup) { + 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 { + console.warn("Frozen Column Error - Column Groups cannot be frozen"); + } + } else { + console.warn("Frozen Column Error - Grouped columns cannot be frozen"); + } + } else { + this.initializationMode = "right"; + } + }; + + //quick layout to smooth horizontal scrolling + FrozenColumns.prototype.scrollHorizontal = function () { + var _this39 = this; + + var rows; + + if (this.active) { + clearTimeout(this.scrollEndTimer); + + //layout all rows after scroll is complete + this.scrollEndTimer = setTimeout(function () { + _this39.layout(); + }, 100); + + rows = this.table.rowManager.getVisibleRows(); + + this.calcMargins(); + + this.layoutColumnPosition(); + + this.layoutCalcRows(); + + rows.forEach(function (row) { + if (row.type === "row") { + _this39.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 _this40 = this; + + this.leftColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this40._calcSpace(_this40.leftColumns, i) + _this40.table.columnManager.scrollLeft + "px"; + + if (i == _this40.leftColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + _this40.layoutElement(column.getElement(), column); + + if (allCells) { + column.cells.forEach(function (cell) { + _this40.layoutElement(cell.getElement(), column); + }); + } + }); + + this.rightColumns.forEach(function (column, i) { + column.modules.frozen.margin = _this40.rightPadding - _this40._calcSpace(_this40.rightColumns, i + 1) + "px"; + + if (i == _this40.rightColumns.length - 1) { + column.modules.frozen.edge = true; + } else { + column.modules.frozen.edge = false; + } + + _this40.layoutElement(column.getElement(), column); + + if (allCells) { + column.cells.forEach(function (cell) { + _this40.layoutElement(cell.getElement(), column); + }); + } + }); + }; + + //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 _this41 = 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) { + _this41.layoutElement(cell.getElement(), column); + } + }); + + this.rightColumns.forEach(function (column) { + var cell = row.getCell(column); + + if (cell) { + _this41.layoutElement(cell.getElement(), 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); + 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; + + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.table.rowManager.adjustTableSize(); + + this.rows.splice(index, 1); + + this.table.rowManager.refreshActiveData("display"); + + if (this.rows.length) { + this.styleRows(); + } + } else { + console.warn("Freeze Error - Row is already unfrozen"); + } + }; + + 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 () { + 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.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 () { + 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-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 _this42 = this; + + var level = this.level + 1; + if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { + this.groupManager.allowedValues[level].forEach(function (value) { + _this42._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(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + self.element.addEventListener("dblclick", function (e) { + self.groupManager.table.options.groupDblClick(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + self.element.addEventListener("contextmenu", function (e) { + self.groupManager.table.options.groupContext(e, self.getComponent()); + }); + } + + 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); + }; + + ////////////// 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 () { + return new GroupComponent(this); + }; + + ////////////////////////////////////////////////// + ////////////// 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.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.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) { + 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.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.pos], false); + 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.pos], false); + 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); + + for (var i in attributes) { + var attrib = attributes[i], + name; + + if (attrib && (typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + + name = attrib.name.replace("tabulator-", ""); + + col[name] = this._attribValue(attrib.value); + } + } + + 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 HtmlTableExport = function HtmlTableExport(table) { + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; + }; + + HtmlTableExport.prototype.genereateTable = function (config, style, visible, colVisProp) { + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.generateHeaderElements(); + var body = this.generateBodyElements(visible); + + var table = document.createElement("table"); + table.classList.add("tabulator-print-table"); + table.appendChild(headers); + table.appendChild(body); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + + return table; + }; + + HtmlTableExport.prototype.generateColumnGroupHeaders = function () { + var _this43 = this; + + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach(function (column) { + var colData = _this43.processColumnGroup(column); + + if (colData) { + output.push(colData); + } + }); + + return output; + }; + + HtmlTableExport.prototype.processColumnGroup = function (column) { + var _this44 = this; + + var subGroups = column.columns, + maxDepth = 0; + + var groupData = { + title: column.definition.title, + column: column, + depth: 1 + }; + + if (subGroups.length) { + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach(function (subGroup) { + var subGroupData = _this44.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; + }; + + HtmlTableExport.prototype.groupHeadersToRows = function (columns) { + + var headers = [], + headerDepth = 0; + + 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.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); + }); + + return headers; + }; + + HtmlTableExport.prototype.generateHeaderElements = function () { + var _this45 = this; + + var headerEl = document.createElement("thead"); + + var rows = this.groupHeadersToRows(this.generateColumnGroupHeaders()); + + rows.forEach(function (row) { + var rowEl = document.createElement("tr"); + + _this45.mapElementStyles(_this45.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + row.forEach(function (column) { + var cellEl = document.createElement("th"); + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.column.definition.title; + + if (_this45.cloneTableStyle) { + cellEl.style.boxSizing = "border-box"; + } + + _this45.mapElementStyles(column.column.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this45.mapElementStyles(column.column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if (column.column.visible) { + _this45.mapElementStyles(column.column.getElement(), cellEl, ["width"]); + } else { + if (column.column.definition.width) { + cellEl.style.width = column.column.definition.width + "px"; + } + } + + if (column.column.parent) { + _this45.mapElementStyles(column.column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + }); + + headerEl.appendChild(rowEl); + }); + + return headerEl; + }; + + HtmlTableExport.prototype.generateBodyElements = function (visible) { + var _this46 = this; + + var oddRow, evenRow, calcRow, firstRow, firstCell, firstGroup, lastCell, styleCells, styleRow; + + //lookup row styles + if (this.cloneTableStyle && window.getComputedStyle) { + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if (firstRow) { + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + var bodyEl = document.createElement("tbody"); + + var rows = visible ? this.table.rowManager.getVisibleRows(true) : this.table.rowManager.getDisplayRows(); + var columns = []; + + 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); + } + } + + this.table.columnManager.columnsByIndex.forEach(function (column) { + if (_this46.columnVisCheck(column)) { + columns.push(column); + } + }); + + rows = rows.filter(function (row) { + switch (row.type) { + case "group": + return _this46.config.rowGroups !== false; + break; + + case "calc": + return _this46.config.columnCalcs !== false; + break; + } + + return true; + }); + + if (rows.length > 1000) { + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + rows.forEach(function (row, i) { + var rowData = row.getData(); + + var rowEl = document.createElement("tr"); + rowEl.classList.add("tabulator-print-table-row"); + + switch (row.type) { + case "group": + var cellEl = document.createElement("td"); + cellEl.colSpan = columns.length; + cellEl.innerHTML = row.key; + + rowEl.classList.add("tabulator-print-table-group"); + + _this46.mapElementStyles(firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + _this46.mapElementStyles(firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + rowEl.appendChild(cellEl); + break; + + case "calc": + rowEl.classList.add("tabulator-print-table-calcs"); + + case "row": + columns.forEach(function (column) { + var cellEl = document.createElement("td"); + + var value = column.getFieldValue(rowData); + + var cellWrapper = { + getValue: function getValue() { + return value; + }, + getField: function getField() { + return column.defi; + }, + getElement: function getElement() { + return cellEl; + }, + getColumn: function getColumn() { + return column.getComponent(); + }, + getData: function getData() { + return rowData; + }, + getRow: function getRow() { + return row.getComponent(); + }, + getComponent: function getComponent() { + return cellWrapper; + }, + column: column + }; + + if (_this46.table.modExists("format")) { + value = _this46.table.modules.format.formatValue(cellWrapper); + } 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 (firstCell) { + _this46.mapElementStyles(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", "text-align"]); + } + + rowEl.appendChild(cellEl); + }); + + styleRow = row.type == "calc" ? calcRow : i % 2 && evenRow ? evenRow : oddRow; + + _this46.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + break; + } + + bodyEl.appendChild(rowEl); + }); + + return bodyEl; + }; + + HtmlTableExport.prototype.columnVisCheck = function (column) { + return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); + }; + + HtmlTableExport.prototype.getHtml = function (visible, style, config) { + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTable(config || this.table.options.htmlOutputConfig, style, visible, "htmlOutput")); + + return holder.innerHTML; + }; + + HtmlTableExport.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("htmlTableExport", HtmlTableExport); + + 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 _this47 = this; + + var self = this; + + var _loop2 = function _loop2(key) { + + if (_this47.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 + }; + + 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; + + 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) { + 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) { + 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(newRow); + } + } + + newRow.then(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(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); + } + } + } + }; + + Tabulator.prototype.registerModule("keybindings", Keybindings); + 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(); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + } else { + column.getCells().forEach(function (cell, i) { + var cellEl = cell.getElement(); + 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.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.connection = this.table.options.movableRowsConnectedTables; + }; + + 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) { + if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { + if (self.toRow !== row || !self.toRowAfter) { + var rowEl = row.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + } else { + if (self.toRow !== row || self.toRowAfter) { + var rowEl = row.getElement(); + 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(); + + 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, cell.getElement()); + }; + + 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"; + }; + + //establish connection with other tables + MoveRows.prototype.connectToTables = function (row) { + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStart.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "connect", { + row: row + }); + }; + + //disconnect from other tables + MoveRows.prototype.disconnectFromTables = function () { + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStop.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); + }; + + //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; + + 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, update) { + 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(data); + + if (!update || update && 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; + + if (mutator) { + return mutator.mutator(value, cell.row.getData(), "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.pageSizes = []; + + 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 _this48 = 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; + itemEl.innerHTML = item; + + _this48.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } + }; + + //setup pageination + Page.prototype.initialize = function (hidden) { + var self = this, + pageSelectLabel; + + //update param names + for (var key in self.table.options.paginationDataSent) { + self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; + } + + for (var _key2 in self.table.options.paginationDataReceived) { + self.paginationDataReceivedNames[_key2] = self.table.options.paginationDataReceived[_key2]; + } + + //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); + }); + + self.prevBut.addEventListener("click", function () { + self.previousPage(); + }); + + self.nextBut.addEventListener("click", function () { + self.nextPage().then(function () {}).catch(function () {}); + }); + + self.lastBut.addEventListener("click", function () { + self.setPage(self.max); + }); + + 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); + 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; + self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); + 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 = 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) { + if (this.mode == "local" || force) { + this.page = 1; + } + 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 _this49 = this; + + return new Promise(function (resolve, reject) { + + page = parseInt(page); + + if (page > 0 && page <= _this49.max) { + _this49.page = page; + _this49.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Requested page is out of range of 1 - " + _this49.max + ":", page); + reject(); + } + }); + }; + + Page.prototype.setPageToRow = function (row) { + var _this50 = this; + + return new Promise(function (resolve, reject) { + + var rows = _this50.table.rowManager.getDisplayRows(_this50.displayIndex - 1); + var index = rows.indexOf(row); + + if (index > -1) { + var page = Math.ceil((index + 1) / _this50.size); + + _this50.setPage(page).then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Requested row is not visible"); + reject(); + } + }); + }; + + Page.prototype.setPageSize = function (size) { + size = parseInt(size); + + if (size > 0) { + this.size = size; + } + + if (this.pageSizeSelect) { + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } + }; + + //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"); + button.setAttribute("aria-label", "Show Page " + page); + button.setAttribute("title", "Show Page " + page); + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function (e) { + self.setPage(page); + }); + + return button; + }; + + //previous page + Page.prototype.previousPage = function () { + var _this51 = this; + + return new Promise(function (resolve, reject) { + if (_this51.page > 1) { + _this51.page--; + _this51.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + reject(); + } + }); + }; + + //next page + Page.prototype.nextPage = function () { + var _this52 = this; + + return new Promise(function (resolve, reject) { + if (_this52.page < _this52.max) { + _this52.page++; + _this52.trigger().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + } else { + if (!_this52.progressiveLoad) { + console.warn("Pagination Error - Next page would be greater than maximum page of " + _this52.max + ":", _this52.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 = []; + 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 _this53 = this; + + var left; + + return new Promise(function (resolve, reject) { + + switch (_this53.mode) { + case "local": + left = _this53.table.rowManager.scrollLeft; + + _this53.table.rowManager.refreshActiveData("page"); + _this53.table.rowManager.scrollHorizontal(left); + + _this53.table.options.pageLoaded.call(_this53.table, _this53.getPage()); + resolve(); + break; + + case "remote": + case "progressive_load": + case "progressive_scroll": + _this53.table.modules.ajax.blockActiveRequest(); + _this53._getRemotePage().then(function () { + resolve(); + }).catch(function () { + reject(); + }); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", _this53.mode); + reject(); + } + }); + }; + + Page.prototype._getRemotePage = function () { + var _this54 = 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[_this54.paginationDataSentNames.page] = self.page; + + //set page size if defined + if (_this54.size) { + pageParams[_this54.paginationDataSentNames.size] = _this54.size; + } + + //set sort data if defined + if (_this54.table.options.ajaxSorting && _this54.table.modExists("sort")) { + var sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function (item) { + delete item.column; + }); + + pageParams[_this54.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if (_this54.table.options.ajaxFiltering && _this54.table.modExists("filter")) { + var filters = self.table.modules.filter.getFilters(true, true); + pageParams[_this54.paginationDataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(pageParams); + + self.table.modules.ajax.sendRequest(_this54.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.paginationDataReceivedNames.last_page] === "undefined") { + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); + } + + if (data[this.paginationDataReceivedNames.data]) { + this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; + + if (this.progressiveLoad) { + switch (this.mode) { + case "progressive_load": + this.table.rowManager.addRows(data[this.paginationDataReceivedNames.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.paginationDataReceivedNames.data]); + + this.table.rowManager.setData(data, true); + + 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.paginationDataReceivedNames.data]); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + } else { + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.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"]; + }; + + // 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 (mode, id) { + //determine persistent layout storage type + + this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie"; + + //set storage tag + this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); + }; + + //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) { + var data = "", + id = this.id + (type === "columns" ? "" : "-" + type); + + switch (this.mode) { + case "local": + data = localStorage.getItem(id); + break; + + case "cookie": + + //find cookie + var cookie = document.cookie, + cookiePos = cookie.indexOf(id + "="), + end = void 0; + + //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(id + "=", ""); + } + break; + + default: + console.warn("Persistence Load Error - invalid mode selected", this.mode); + } + + return data ? JSON.parse(data) : 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); + + if (from) { + + from.width = column.width; + from.visible = column.visible; + + 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; + } + + var id = this.id + (type === "columns" ? "" : "-" + type); + + this.saveData(id, 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; + }; + + //save data to chosed medium + Persistence.prototype.saveData = function (id, data) { + + data = JSON.stringify(data); + + switch (this.mode) { + case "local": + localStorage.setItem(id, data); + break; + + case "cookie": + var expireDate = new Date(); + expireDate.setDate(expireDate.getDate() + 10000); + + //save cookie + document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); + break; + + default: + console.warn("Persistence Save Error - invalid mode selected", this.mode); + } + }; + + //build permission list + Persistence.prototype.parseColumns = function (columns) { + var self = this, + definitions = []; + + columns.forEach(function (column) { + var def = {}; + + if (column.isGroup) { + def.title = column.getDefinition().title; + def.columns = self.parseColumns(column.getColumns()); + } else { + def.title = column.getDefinition().title; + def.field = column.getField(); + def.width = column.getWidth(); + def.visible = column.visible; + } + + definitions.push(def); + }); + + return definitions; + }; + + 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.htmlTableExport.genereateTable(this.table.options.printConfig, this.table.options.printCopyStyle, this.table.options.printVisibleRows, "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.htmlTableExport.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printCopyStyle, 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 self = this, + data = row.getData(); + + this.blocked = true; + + for (var key in data) { + this.watchKey(row, data, key); + } + + this.blocked = false; + }; + + 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)) { + 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)) { + 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(); + + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + + 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.persistentLayout && self.table.modExists("persistence", true)) { + 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, { passive: true }); + handle.addEventListener("touchstart", handleDown); + + 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; + }; + + ResizeTable.prototype.initialize = function (row) { + var table = this.table, + observer; + + if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { + this.observer = new ResizeObserver(function (entry) { + table.redraw(); + }); + + this.observer.observe(table.element); + } else { + this.binding = function () { + 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); + } + }; + + 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; + }; + + //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(); + } + }; + + //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.layoutRow = function (row) { + var rowEl = row.getElement(), + el = document.createElement("div"); + + el.classList.add("tabulator-responsive-collapse"); + + if (!rowEl.classList.contains("tabulator-calcs")) { + row.modules.responsiveLayout = { + element: el + }; + + if (!this.collapseStartOpen) { + el.style.display = 'none'; + } + + rowEl.appendChild(el); + + 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) { + column.hide(false, true); + + if (this.mode === "collapse") { + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + } + }; + + 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(); + } + }; + + //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({ + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + } else { + output.push({ + title: column.definition.title, + value: value + }); + } + } + }); + + return output; + }; + + ResponsiveLayout.prototype.formatCollapsedData = function (data) { + var list = document.createElement("table"), + listContents = ""; + + data.forEach(function (item) { + var div = document.createElement("div"); + + if (item.value instanceof Node) { + div.appendChild(item.value); + item.value = div.innerHTML; + } + + listContents += "" + item.title + "" + item.value + ""; + }); + + list.innerHTML = listContents; + + 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) { + + self.table._clearSelection(); + + if (e.shiftKey) { + 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(); + + if (self.table.options.selectable !== true) { + if (toggledRows.length > self.table.options.selectable) { + toggledRows = toggledRows.slice(0, self.table.options.selectable); + } + } + + self.selectRows(toggledRows); + } + } else if (e.ctrlKey || e.metaKey) { + self.toggleRow(row); + self.lastClickedRow = row; + } else { + self.deselectRows(); + self.selectRows(row); + self.lastClickedRow = row; + } + + self.table._clearSelection(); + }); + } 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 self = this; + + switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { + case "undefined": + self.table.rowManager.rows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + break; + + case "boolean": + if (rows === true) { + self.table.rowManager.activeRows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } + break; + + default: + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } else { + self._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 (!silent) { + this.table.options.rowSelected.call(this.table, row.getComponent()); + this._rowSelectionChanged(); + } + } + } 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) { + 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(); + } else { + if (Array.isArray(rows)) { + rows.forEach(function (row) { + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(); + } else { + self._deselectRow(rows); + } + } + }; + + //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 (!silent) { + self.table.options.rowDeselected.call(this.table, row.getComponent()); + self._rowSelectionChanged(); + } + } + } 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 () { + 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; + } + } + + 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; + }; + + 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-arrow"); + //create sorter arrow + content.appendChild(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.persistentSort && this.table.modExists("persistence", true)) { + 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, + lastSort, + sortList; + + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; + + if (self.table.options.dataSorting) { + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + sortList.forEach(function (item, i) { + + if (item.column && item.column.modules.sort) { + + //if no sorter has been defined, take a guess + if (!item.column.modules.sort.sorter) { + item.column.modules.sort.sorter = self.findSorter(item.column); + } + + self._sortItem(data, item.column, item.dir, sortList, i); + } + + self.setColumnHeader(item.column, item.dir); + }); + } else { + sortList.forEach(function (item, i) { + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); + } + }; + + //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._sortItem = function (data, column, dir, sortList, i) { + var self = this; + + var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; + + data.sort(function (a, b) { + + var result = self._sortRow(a, b, column, dir, params); + + //if results match recurse through previous searchs to be sure + if (result === 0 && i) { + for (var j = i - 1; j >= 0; j--) { + result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, 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 = parseFloat(String(a).split(thousand).join("").split(decimal).join(".")); + b = parseFloat(String(b).split(thousand).join("").split(decimal).join(".")); + + //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; + }; + + //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; + } + + console.log("v", value, type, params); + + 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 = []; + + if (validators) { + validators.forEach(function (item) { + if (!item.func.call(self, cell, value, item.params)) { + valid.push({ + type: item.type, + parameters: item.params + }); + } + }); + } + + return valid.length ? valid : true; + }; + + 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; + }, + + //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/js/tabulator/dist/js/tabulator.min.js b/js/tabulator/dist/js/tabulator.min.js new file mode 100644 index 0000000..a969f72 --- /dev/null +++ b/js/tabulator/dist/js/tabulator.min.js @@ -0,0 +1,11 @@ +/* Tabulator v4.4.3 (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};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tabulator=e()}(this,function(){"use strict";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;no?(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()},t.prototype.generateColumnsFromRowData=function(t){var e,o,i=[];if(t&&t.length){e=t[0];for(var n in e){var s={field:n,title:n},r=e[n];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"}s.sorter=o,i.push(s)}this.table.options.columns=i,this.setColumns(this.table.options.columns)}},t.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(),o.redraw(!0)},t.prototype._addColumn=function(t,e,o){var n=new i(t,this),s=n.getElement(),r=o?this.findColumnIndex(o):o;if(o&&r>-1){var a=this.columns.indexOf(o.getTopColumn()),l=o.getElement();e?(this.columns.splice(a,0,n),l.parentNode.insertBefore(s,l)):(this.columns.splice(a+1,0,n),l.parentNode.insertBefore(s,l.nextSibling))}else e?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n},t.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},t.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},t.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.columnVertAlign,e)}),t.rowManager.adjustTableSize()},t.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof i)return t;if(t instanceof o)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},t.prototype.getColumnByField=function(t){return this.columnsByField[t]},t.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},t.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},t.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},t.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},t.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},t.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},t.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()},t.prototype.moveColumnActual=function(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.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(t,e,o,i,n){var s,r=t.indexOf(e);r>-1&&(t.splice(r,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&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)}}))},t.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,r=0,a=t.getElement();return new Promise(function(l,c){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":r=-i.element.clientWidth/2;break;case"right":r=a.clientWidth-i.headersElement.clientWidth}if(!o&&(s=a.offsetLeft)>0&&s+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,r;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=r>s?r:s)}),o},t.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),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),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.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.redraw()},t.prototype.redraw=function(t){t&&(u.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?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.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(t){this._column=t,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 t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getVisibility=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){this._column.delete()},o.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getParentColumn=function(){return this._column.parent instanceof i&&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.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},o.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)},o.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},o.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()};var i=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.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",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.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,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()};i.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},i.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},i.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)})},i.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._setNesteData:this._setFlatData},i.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},i.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},i.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},i.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"))},i.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","")},i.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.element.addEventListener("mouseenter",function(e){t.setTooltip()})},i.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)},i.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:parseInt(e.minWidth)),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},i.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},i.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},i.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s={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,s,n),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},i.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},i.prototype._getFlatData=function(t){return t[this.field]},i.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s-1&&this._nextVisibleColumn(t+1)},i.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},i.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},i.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},i.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()},i.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))},i.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},i.prototype.defaultOptionList=["title","field","columns","visible","align","width","minWidth","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","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","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print"],i.prototype.getComponent=function(){return new o(this)};var n=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",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=[]};n.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},n.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},n.prototype.getElement=function(){return this.element},n.prototype.getTableElement=function(){return this.tableElement},n.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},n.prototype.setColumnManager=function(t){this.columnManager=t},n.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.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.scrollTop=e})},n.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 r)return t;if(t instanceof s)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},n.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},n.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},n.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),r=t.getElement(),a=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=u.prototype.helpers.elOffset(r).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&&u.prototype.helpers.elVisible(r)&&(a=u.prototype.helpers.elOffset(r).top-u.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.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.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")},n.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},n.prototype.addRows=function(t,e,o){var i=this,n=this,s=0,r=[];return new Promise(function(a,l){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),s=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var s=n.addRow(t,e,o,!0);r.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),a(r)})},n.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},n.prototype.addRowActual=function(t,e,o,i){var n,s=t instanceof r?t:new r(t||{},this),a=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),a?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):n.length&&(o=n[n.length-1],a=!(n.length1&&(!o||o&&-1==l.indexOf(o)?a?l[0]!==s&&(o=l[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):l[l.length-1]!==s&&(o=l[l.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}if(o){var c=this.rows.indexOf(o),u=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),u>-1&&this.activeRows.splice(a?u:u+1,0,s),c>-1&&this.rows.splice(a?c:c+1,0,s)}else 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));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),s},n.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},n.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")){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))}},n.prototype._moveRowInArray=function(t,e,o,i){var n,s,r,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),s=t.indexOf(o),s>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){r=nn?s:n+1;for(var l=r;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},n.prototype.clearData=function(){this.setData([])},n.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},n.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},n.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},n.prototype.getData=function(t,e){var o=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},n.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},n.prototype.getDataCount=function(t){return t?this.activeRows.length:this.rows.length},n.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=s}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},n.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)},n.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)},n.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)},n.prototype.refreshActiveData=function(t,e,o){var i,n=this,s=this.table;switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),t||(t="all"),s.options.selectable&&!s.options.selectablePersistence&&s.modExists("selectRow")&&s.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:s.modExists("filter")?n.setActiveRows(s.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:s.modExists("sort")&&s.modules.sort.sort(this.activeRows);case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&s.modules.frozenRows.isFrozen()&&(s.modules.frozenRows.getDisplayIndex()||s.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:s.options.groupBy&&s.modExists("groupRows")&&(s.modules.groupRows.getDisplayIndex()||s.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:s.options.dataTree&&s.modExists("dataTree")&&(s.modules.dataTree.getDisplayIndex()||s.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&s.modules.dataTree.setDisplayIndex(i)),s.options.pagination&&s.modExists("page")&&!o&&"local"==s.modules.page.getMode()&&s.modules.page.reset();case"page":e?e=!1:s.options.pagination&&s.modExists("page")&&(s.modules.page.getDisplayIndex()||s.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.page.getDisplayIndex(),"local"==s.modules.page.getMode()&&s.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(s.modules.page.getRows(this.getDisplayRows(i-1)),i))&&s.modules.page.setDisplayIndex(i))}u.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),s.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),s.modExists("columnCalcs")&&s.modules.columnCalcs.recalc(this.activeRows)},n.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},n.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},n.prototype.getNextDisplayIndex=function(){return this.displayRows.length},n.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},n.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},n.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,s=0,r=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(r[a])if(i){if(!(o-r[a].getElement().offsetTop>=0))break;s=a}else e-r[a].getElement().offsetTop>=0?n=a:i=!0}else n=this.vDomTop,s=this.vDomBottom;return r.slice(n,s+1)},n.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},n.prototype.getRows=function(){return this.rows},n.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(s[r]){var a=e-s[r].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(d=!1),i.vDomBottom++,c++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(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&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=d?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()},n.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)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},n.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],r=s.getHeight()||this.vDomRowHeight;t>=r&&(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-=r,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r,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)}},n.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)}},n.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=r&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=r,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r,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)}},n.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)}},n.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},n.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},n.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},n.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},n.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))},n.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 s=function(t){this._row=t};s.prototype.getData=function(t){return this._row.getData(t)},s.prototype.getElement=function(){return this._row.getElement()},s.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},s.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},s.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},s.prototype.delete=function(){return this._row.delete()},s.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},s.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},s.prototype.move=function(t,e){this._row.moveToRow(t,e)},s.prototype.update=function(t){return this._row.updateData(t)},s.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},s.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},s.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},s.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},s.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},s.prototype._getSelf=function(){return this._row},s.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},s.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},s.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},s.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},s.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},s.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},s.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},s.prototype.reformat=function(){return this._row.reinitialize()},s.prototype.getGroup=function(){return this._row.getGroup().getComponent()},s.prototype.getTable=function(){return this._row.table},s.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},s.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var r=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};r.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},r.prototype.getElement=function(){return this.element},r.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},r.prototype.generateElement=function(){var t,e,o,i=this;!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),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}))},r.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},r.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},r.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},r.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},r.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},r.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},r.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},r.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},r.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)},r.prototype.getHeight=function(){return this.outerHeight},r.prototype.getWidth=function(){return this.element.offsetWidth},r.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},r.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)},r.prototype.updateData=function(t){var e=this,o=this,i=u.prototype.helpers.elVisible(this.element);return new Promise(function(n,s){"string"==typeof t&&(t=JSON.parse(t)),e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.block(),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var r in t)o.data[r]=t[r];e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.unblock();for(var r in t){e.table.columnManager.getColumnsByFieldRoot(r).forEach(function(o){var n=e.getCell(o.getField());if(n){var s=o.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}i?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0,e.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&e.table.modules.dataTree.redrawNeeded(t)&&(e.table.modules.dataTree.initializeRow(e),e.table.modules.dataTree.layoutRow(e),e.table.rowManager.refreshActiveData("tree",!1,!0)),o.table.options.rowUpdated.call(e.table,o.getComponent()),n()})},r.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},r.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},r.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},r.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&&u.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},r.prototype.getCells=function(){return this.cells},r.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},r.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},r.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)},r.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()})},r.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),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.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))},r.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-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)},u.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,r=n.files[0],a=new FileReader;a.readAsText(r),a.onload=function(t){try{s=JSON.parse(a.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)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},u.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},u.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},u.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},u.prototype.getData=function(t){return this.rowManager.getData(t)},u.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},u.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},u.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},u.prototype.getHtml=function(t,e,o){if(this.modExists("htmlTableExport",!0))return this.modules.htmlTableExport.getHtml(t,e,o)},u.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},u.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},u.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},u.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"))})},u.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"))})},u.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(s,r){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"),r("Update Error - No data provided"))})},u.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},u.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)},u.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},u.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())})})},u.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)})})},u.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"))})},u.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.rowManager.findRow(t);r?i.rowManager.scrollToRow(r,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"))})},u.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)},u.prototype.getRows=function(t){return this.rowManager.getComponents(t)},u.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)},u.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},u.prototype.setColumns=function(t){this.columnManager.setColumns(t)},u.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},u.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},u.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},u.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},u.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},u.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()},u.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()},u.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()},u.prototype.addColumn=function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},u.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},u.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)},u.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(t);r?i.columnManager.scrollToColumn(r,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"))})},u.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},u.prototype.getLocale=function(){return this.modules.localize.getLocale()},u.prototype.getLang=function(t){return this.modules.localize.getLang(t)},u.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},u.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.redraw()):console.warn("setHeight function is not available in classic render mode")},u.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},u.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},u.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},u.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},u.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)}},u.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)}},u.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},u.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},u.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},u.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},u.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},u.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},u.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},u.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},u.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},u.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},u.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()})},u.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(){})},u.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},u.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},u.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},u.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},u.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},u.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},u.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"):console.warn("Grouping Update - cant refresh view, no groups have been set")},u.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"):console.warn("Grouping Update - cant refresh view, no groups have been set")},u.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},u.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},u.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},u.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},u.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},u.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},u.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},u.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},u.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},u.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},u.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},u.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},u.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},u.prototype.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},u.prototype.downloadToTab=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o,!0)},u.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},u.prototype.moduleBindings={},u.prototype.extendModule=function(t,e,o){if(u.prototype.moduleBindings[t]){var i=u.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)},u.prototype.registerModule=function(t,e){u.prototype.moduleBindings[t]=e},u.prototype.bindModules=function(){this.modules={};for(var t in u.prototype.moduleBindings)this.modules[t]=new u.prototype.moduleBindings[t](this)},u.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},u.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=Array.isArray(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]):e[o]=t[o];return e}},u.prototype.comms={tables:[],register:function(t){u.prototype.comms.tables.push(t)},deregister:function(t){var e=u.prototype.comms.tables.indexOf(t);e>-1&&u.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,s){function r(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var l=[],c=0,u=0,d=0,h=0,p=0,m=[];return t.forEach(function(t,e){var o=s?a(t):r(t);t.column.minWidth>=o?l.push(t):(m.push(t),p+=s?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),l.length?(l.forEach(function(t){c+=s?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),u=i-c,d=p?Math.floor(u/p):u,h=u-d*p,h+=o(m,u,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=s?a(t):r(t)})),h}var i=this,n=i.table.element.clientWidth,s=0,r=0,a=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.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),s+=n>i?n:i,t.definition.widthShrink&&(u.push({column:t,width:n>i?n:i}),d+=t.definition.widthShrink)):(c.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),r=n-s,l=Math.floor(r/a);var p=o(c,r,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(t){r-=t.width}),h=Math.abs(p)+r,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(t){t.column.setWidth(t.width)}),u.forEach(function(t){t.column.setWidth(t.width)})}},u.prototype.registerModule("layout",d);var h=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};h.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},h.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},h.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},h.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]},h.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.langs[t]){var i=t.split("-")[0];o.langs[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=u.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},h.prototype.getLocale=function(t){return self.locale},h.prototype.getLang=function(t){return t?this.langs[t]:this.lang},h.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},h.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},h.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},h.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)},h.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},u.prototype.registerModule("localize",h);var p=function(t){this.table=t};p.prototype.getConnections=function(t){var e,o=this,i=[];return e=u.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},p.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)},p.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)},u.prototype.registerModule("comms",p);var m=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard"]};m.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupAccessor(t.definition[r]))&&(o=!0,i[r]={accessor:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.accessor=i)},m.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},m.prototype.transformRow=function(t,e){var o=this,i="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),n=u.prototype.helpers.deepClone(t||{});return o.table.columnManager.traverse(function(t){var o,s,r,a;t.modules.accessor&&(s=t.modules.accessor[i]||t.modules.accessor.accessor||!1)&&"undefined"!=(o=t.getFieldValue(n))&&(a=t.getComponent(),r="function"==typeof s.params?s.params(o,n,e,a):s.params,t.setFieldValue(n,s.accessor(o,n,e,r,a)))}),n},m.prototype.accessors={},u.prototype.registerModule("accessor",m);var f=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};f.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(t=document.createElement("template"),t.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"),t.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"))},f.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},f.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},f.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},f.prototype.getParams=function(){return this.params||{}},f.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]},f.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},f.prototype.setUrl=function(t){this.url=t},f.prototype.getUrl=function(){return this.url},f.prototype.loadData=function(t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t)},f.prototype.nextPage=function(t){var e;this.loading||(e=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ti||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))t&&(t=o)}),i.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,v.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),v.mapElementStyles(v.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),v.htmlElement.appendChild(e)}(y)):function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,v.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),v.mapElementStyles(v.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),v.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),u=document.createElement("tbody"),window.getComputedStyle&&(d=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),h=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),p=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),m=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),g=this.table.element.getElementsByClassName("tabulator-group")[0],m&&(b=m.getElementsByClassName("tabulator-cell"),f=b[0],b[b.length-1])),i.rowGroups?t.forEach(function(t){c(t,o||{})}):(i.columnCalcs&&a(o,"top"),l(t),i.columnCalcs&&a(o,"bottom")),this.htmlElement.appendChild(u)},b.prototype.mapElementStyles=function(t,e,o){var i={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[i[t]]=n.getPropertyValue(t)})}},b.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(o,t,e)}},b.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),o.push(t.join("\t"))}),o.join("\n")}},b.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=i.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?n.push(e):o=!1}),o||(o=!0,n=[],e[0].forEach(function(t){var e=i.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?n.push(e):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){n[o]&&(e[n[o].field]=t)}),s.push(e)}),s)}},b.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},u.prototype.registerModule("clipboard",b);var v=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};v.prototype.initialize=function(){var t=null,e=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!e&&e.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?(t=document.createElement("div"),t.innerHTML=o.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?(t=document.createElement("div"),t.innerHTML=o.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(t=document.createElement("div"),t.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]}}},v.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;t.modules.dataTree={index:0,open:!!i&&this.startOpen(t.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:i}},v.prototype.layoutRow=function(t){var e=this.elementField?t.getCell(this.elementField):t.getCells()[0],o=e.getElement(),i=t.modules.dataTree;i.branchEl&&i.branchEl.parentNode.removeChild(i.branchEl),this.generateControlElement(t,o),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},v.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,e=e||t.getCells()[0].getElement(),n=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))},v.prototype.setDisplayIndex=function(t){this.displayIndex=t},v.prototype.getDisplayIndex=function(){return this.displayIndex},v.prototype.getRows=function(t){var e=this,o=[];return t.forEach(function(t,i){var n,s;o.push(t),t instanceof r&&(n=t.modules.dataTree.children,n.index||!1===n.children||(s=e.getChildren(t),s.forEach(function(t){o.push(t)})))}),o},v.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.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.modules.sort.sort(i),i.forEach(function(t){n.push(t),e.getChildren(t).forEach(function(t){n.push(t)})})),n},v.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 r(i||{},e.table.rowManager);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},v.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))},v.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))},v.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},v.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},v.prototype.getTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),e.children.forEach(function(t){t instanceof r&&o.push(t.getComponent())})),o},v.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||!1!==t.row.modules.dataTree.children&&t.row.reinitialize()},v.prototype.getChildField=function(){return this.field},v.prototype.redrawNeeded=function(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]},u.prototype.registerModule("dataTree",v);var y=function(t){this.table=t,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};y.prototype.download=function(t,e,o,i){function n(o,n){i?!0===i?s.triggerDownload(o,n,t,e,!0):i(o):s.triggerDownload(o,n,t,e)}var s=this,r=!1;this.processConfig(),"function"==typeof t?r=t:s.downloaders[t]?r=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),this.processColumns(),r&&r.call(this,s.processDefinitions(),s.processData(),o||{},n,this.config)},y.prototype.processConfig=function(){var t={columnGroups:!0,rowGroups:!0,columnCalcs:!0};if(this.table.options.downloadConfig)for(var e in this.table.options.downloadConfig)t[e]=this.table.options.downloadConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0),t.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},y.prototype.processColumns=function(){var t=this;t.columnsByIndex=[],t.columnsByField={},t.table.columnManager.columnsByIndex.forEach(function(e){e.field&&!1!==e.definition.download&&(e.visible||!e.visible&&e.definition.download)&&(t.columnsByIndex.push(e),t.columnsByField[e.field]=e)})},y.prototype.processDefinitions=function(){var t=this,e=[];return this.config.columnGroups?t.table.columnManager.columns.forEach(function(o){var i=t.processColumnGroup(o);i&&e.push(i)}):t.columnsByIndex.forEach(function(o){!1!==o.download&&e.push(t.processDefinition(o))}),e},y.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i=0,n=this.processDefinition(t),s={type:"group",title:n.title,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o.depth>i&&(i=o.depth),o&&(s.width+=o.width,s.subGroups.push(o))}),s.depth+=i,!s.width)return!1}else{if(!t.field||!1===t.definition.download||!(t.visible||!t.visible&&t.definition.download))return!1;s.width=1,s.definition=n}return s},y.prototype.processDefinition=function(t){var e={};for(var o in t.definition)e[o]=t.definition[o];return void 0!==t.definition.downloadTitle&&(e.title=t.definition.downloadTitle),e},y.prototype.processData=function(){var t=this,e=this,o=[],i=[],n={};return this.config.rowGroups?(i=this.table.modules.groupRows.getGroups(),i.forEach(function(e){o.push(t.processGroupData(e))})):o=e.table.rowManager.getData(!0,"download"),this.config.columnCalcs&&(n=this.table.getCalcResults(),o={calcs:n,data:o}),"function"==typeof e.table.options.downloadDataFormatter&&(o=e.table.options.downloadDataFormatter(o)),o},y.prototype.processGroupData=function(t){var e=this,o=t.getSubGroups(),i={type:"group",key:t.key};return o.length?(i.subGroups=[],o.forEach(function(t){i.subGroups.push(e.processGroupData(t))})):i.rows=t.getData(!0,"download"),i},y.prototype.triggerDownload=function(t,e,o,i,n){var s=document.createElement("a"),r=new Blob([t],{type:e}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(r=this.table.options.downloadReady.call(this.table,t,r))&&(n?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,i):(s.setAttribute("href",window.URL.createObjectURL(r)),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())},y.prototype.getFieldValue=function(t,e){var o=this.columnsByField[t];return!!o&&o.getFieldValue(e)},y.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.intercept)}},y.prototype.downloaders={csv:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(d.push('"'+String(t.title).split('"').join('""')+'"'),h.push(t.definition.field))}function r(t){t.forEach(function(t){var e=[];h.forEach(function(o){var i=u.getFieldValue(o,t);switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),l.push(e.join(p))})}function a(t){t.subGroups?t.subGroups.forEach(function(t){a(t)}):r(t.rows)}var l,c,u=this,d=[],h=[],p=o&&o.delimiter?o.delimiter:",";n.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){d.push('"'+String(t.title).split('"').join('""')+'"'),h.push(t.field)})}(),l=[d.join(p)],n.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),n.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),e.forEach(function(t){a(t)})):r(e),c=l.join("\n"),o.bom&&(c="\ufeff"+c),i(c,"text/csv")},json:function(t,e,o,i,n){var s;n.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),s=JSON.stringify(e,null,"\t"),i(s,"application/json")},pdf:function(t,e,o,i,n){function s(t,e){var o=t.width,i=1,n={content:t.title||""};if(t.subGroups?(t.subGroups.forEach(function(t){s(t,e+1)}),i=1):(h.push(t.definition.field),i=g-e),n.rowSpan=i,p[e].push(n),o--,i>1)for(var r=e+1;rg&&(g=t.depth)});for(var C=0;C1&&h[e].push({type:"hoz",start:f[e].length,end:f[e].length+t.width-1}),f[e].push(t.title),t.subGroups?t.subGroups.forEach(function(t){o(t,e+1)}):(g.push(t.definition.field),i(g.length),h[e].push({type:"vert",start:g.length-1}))}function i(){var t=0;f.forEach(function(e){var o=e.length;o>t&&(t=o)}),f.forEach(function(e){var o=e.length;if(o0&&l(E[e-1]);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e=E.indexOf(x),e-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&o.push(e)}),x=o,l(e)}function l(t){for(var e=!1;E.firstChild;)E.removeChild(E.firstChild);x.forEach(function(o){var i=o.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=o.title,i.addEventListener("click",function(){c(o),d()}),i.addEventListener("mousedown",function(){L=!1,setTimeout(function(){L=!0},10)}),o.element=i,t&&o.value==v&&(w.value=o.title,o.element.classList.add("active"),e=!0),o===M&&(o.element.classList.add("active"),e=!0)),E.appendChild(i)}),e||c(!1)}function c(t,e){M&&M.element&&M.element.classList.remove("active"),M=t,t&&t.element&&t.element.classList.add("active")}function d(){m(),M?v!==M.value?(v=M.value,w.value=M.title,o(M.value)):i():n.freetext?(v=w.value,o(w.value)):n.allowEmpty&&""===w.value?(v=w.value,o(w.value)):i()}function h(){m(),i()}function p(){if(!E.parentNode){for(;E.firstChild;)E.removeChild(E.firstChild);R=!0===n.values?s():"string"==typeof n.values?s(n.values):n.values||[],r(R,v);var t=u.prototype.helpers.elOffset(b);E.style.minWidth=b.offsetWidth+"px",E.style.top=t.top+b.offsetHeight+"px",E.style.left=t.left+"px",document.body.appendChild(E)}}function m(){E.parentNode&&E.parentNode.removeChild(E),f()}function f(){g.table.rowManager.element.removeEventListener("scroll",h)}var g=this,b=t.getElement(),v=t.getValue(),y=void 0!==v||null===v?v:void 0!==n.defaultValue?n.defaultValue:"",w=document.createElement("input"),E=document.createElement("div"),C=[],x=[],R=[],M={},L=!0;if(this.table.rowManager.element.addEventListener("scroll",h),w.setAttribute("type","search"),w.style.padding="4px",w.style.width="100%",w.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var D in n.elementAttributes)"+"==D.charAt(0)?(D=D.slice(1),w.setAttribute(D,w.getAttribute(D)+n.elementAttributes["+"+D])):w.setAttribute(D,n.elementAttributes[D]);return w.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e=x.indexOf(M),c(e>0?x[e-1]:!1);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e=x.indexOf(M),e'):("ie"==a.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='')})}function r(t){c=t,s(t)}var a=this,l=t.getElement(),c=t.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(t){var e=document.createElement("span"),i=m.cloneNode(!0);h.push(i),e.addEventListener("mouseenter",function(e){e.stopPropagation(),e.stopImmediatePropagation(),s(t)}),e.addEventListener("mousemove",function(t){t.stopPropagation(),t.stopImmediatePropagation()}),e.addEventListener("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),o(t)}),e.appendChild(i),p.appendChild(e)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(t){s(0)}),p.addEventListener("click",function(t){o(0)}),l.addEventListener("blur",function(t){i()}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:r(c+1);break;case 37:r(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(t,e,o,i,n){function s(){var t=d*Math.round(m.offsetWidth/(l.clientWidth/100))+u;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var r,a,l=t.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=t.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(t){r=t.screenX,a=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(t){r&&(m.style.width=a+t.screenX-r+"px")}),l.addEventListener("mouseup",function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,s())}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(t,e,o,i,n){function s(t){return l?t?u?c:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,c):(u=!1,a.checked):a.checked}var r=t.getValue(),a=document.createElement("input"),l=n.tristate,c=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 d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),a.setAttribute(d,a.getAttribute(d)+n.elementAttributes["+"+d])):a.setAttribute(d,n.elementAttributes[d]);return a.value=r,!l||void 0!==r&&r!==c&&""!==r||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e(function(){a.focus()}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(t){o(s())}),a.addEventListener("blur",function(t){o(s(!0))}),a.addEventListener("keydown",function(t){13==t.keyCode&&o(s()),27==t.keyCode&&i()}),a}},u.prototype.registerModule("edit",w);var E=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};E.prototype.initializeColumn=function(t,e){function o(e){var o,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",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 i.headerFilters[n];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":i.filters[t.definition.headerFilterFunc]?(r=t.definition.headerFilterFunc,o=function(o){var n=t.definition.headerFilterFuncParams||{},s=t.getFieldValue(o);return n="function"==typeof n?n(e,s,o):n,i.filters[t.definition.headerFilterFunc](e,s,o,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":o=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)},r=o}if(!o)switch(s){case"partial":o=function(o){var i=t.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(e).toLowerCase())>-1},r="like";break;default:o=function(o){return t.getFieldValue(o)==e},r="="}i.headerFilters[n]={value:e,func:o,type:r}}i.changed=!0,i.table.rowManager.filterRefresh()}return!0}var i=this,n=t.getField();t.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},E.prototype.generateHeaderFilterElement=function(t,e){function o(){}var i,n,s,r,a,l,c,u=this,d=this,h=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode){var m=t.modules.filter.headerElement.parentNode,f=d.headerFilterElements.indexOf(m);f>=0&&d.headerFilterElements.splice(f,1);var g=d.headerFilterColumns.indexOf(g);g>=0&&d.headerFilterColumns.splice(g,1),t.contentElement.removeChild(m)}if(p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},i=document.createElement("div"),i.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(r={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(){}}}},c=t.definition.headerFilterParams||{},c="function"==typeof c?c.call(d.table):c,!(s=n.call(this.table.modules.edit,r,function(){},h,o,c)))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=u.table.columnManager.element.scrollLeft;e!==u.table.rowManager.element.scrollLeft&&(u.table.rowManager.scrollHorizontal(e),u.table.columnManager.scrollHorizontal(e))}),a=!1,l=function(t){a&&clearTimeout(a),a=setTimeout(function(){h(s.value)},300)},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),d.headerFilterElements.push(s),d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},E.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display="none"})},E.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display=""})},E.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())},E.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},E.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},E.prototype.addFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){(t=i.findFilter(t))&&(i.filterList.push(t),i.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.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]?(e=o.table.columnManager.getColumnByField(t.field),i=e?function(i){return o.filters[t.type](t.value,e.getFieldValue(i))}:function(e){return o.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},E.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach(function(t){(t=e.findFilter(t))&&o.push(t)}),!!o.length&&o},E.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))},E.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},E.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},E.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}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},this.headerFilterColumns.forEach(function(e){e.modules.filter.value=null,e.modules.filter.prevSuccess=void 0,t.reloadHeaderFilter(e)}),this.changed=!0},E.prototype.search=function(t,e,o,i){var n=this,s=[],r=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach(function(t){(t=n.findFilter(t))&&r.push(t)}),this.table.rowManager.rows.forEach(function(e){var o=!0;r.forEach(function(t){n.filterRecurse(t,e.getData())||(o=!1)}),o&&s.push("data"===t?e.getData("data"):e.getComponent())}),s},E.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},E.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();o.filterList.forEach(function(t){o.filterRecurse(t,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},E.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},E.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||void 0===t?e===t:void 0!==e&&null!==e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},in:function(t,e,o,i){return Array.isArray(t)?t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},u.prototype.registerModule("filter",E);var C=function(t){this.table=t};C.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":"tick"===t.definition.formatter&&(t.definition.formatter="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")),e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.modules.format=o},C.prototype.cellRendered=function(t){t.column.modules.format.renderedCallback&&t.column.modules.format.renderedCallback()},C.prototype.formatValue=function(t){function e(e){t.column.modules.format.renderedCallback=e}var o=t.getComponent(),i="function"==typeof t.column.modules.format.params?t.column.modules.format.params(o):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,o,i,e)},C.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},C.prototype.emptyToSpace=function(t){return null===t||void 0===t?" ":t},C.prototype.getFormatter=function(t){var 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},C.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,r,a=parseFloat(t.getValue()),l=e.decimal||".",c=e.thousand||",",u=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?a.toFixed(h):a,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(t,e,o){var i,n=t.getValue(),s=e.urlPrefix||"",r=n,a=document.createElement("a");if(e.labelField&&(i=t.getData(),r=i[e.labelField]),e.label)switch(_typeof(e.label)){case"string":r=e.label;break;case"function":r=e.label(t)}if(r){if(e.urlField&&(i=t.getData(),n=i[e.urlField]),e.url)switch(_typeof(e.url)){case"string":n=e.url;break;case"function":n=e.url(t)}return a.setAttribute("href",s+n),e.target&&a.setAttribute("target",e.target),a.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),a}return" "},image:function(t,e,o){var i=document.createElement("img");switch(i.setAttribute("src",t.getValue()),_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,r=e.allowTruthy,a=void 0!==e.tickElement?e.tickElement:'',l=void 0!==e.crossElement?e.crossElement:'';return r&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),a||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==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:"",r=t.getValue(),a=moment(r,i);return a.isValid()?a.format(n):!0===s?r:"function"==typeof s?s(r):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,r=void 0!==e.unit?e.unit:void 0,a=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),c=t.getValue(),u=moment(c,i);return u.isValid()?a?moment.duration(u.diff(l)).humanize(s):u.diff(l,r)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):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,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.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=a.cloneNode(!0);c.innerHTML=l<=i?'':'',r.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),r},traffic:function(t,e,o){var i,n,s=this.sanitizeHTML(t.getValue())||0,r=document.createElement("span"),a=e&&e.max?e.max:100,l=e&&e.min?e.min:0,c=e&&void 0!==e.color?e.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==t.getValue()){switch(r.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=a?parseFloat(s):a,n=parseFloat(n)>=l?parseFloat(n):l,i=(a-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 r.style.backgroundColor=u,r}},progress:function(t,e,o){var i,n,s,r,a,l=this.sanitizeHTML(t.getValue())||0,c=t.getElement(),u=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=u?parseFloat(l):u,n=parseFloat(n)>=d?parseFloat(n):d,i=(u-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":r=e.legend;break;case"function":r=e.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(_typeof(e.legendColor)){case"string":a=e.legendColor;break;case"function":a=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){var p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),a=e.legendColor[m]}break;default:a="#000"}return c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",n),"
"+(r?"
"+r+"
":"")},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){function i(e){var o=t.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];s=e,s?(r.classList.add("open"),o&&(o.style.display="")):(r.classList.remove("open"),o&&(o.style.display="none"))}var n=this,s=!1,r=document.createElement("div");return r.classList.add("tabulator-responsive-collapse-toggle"),r.innerHTML="+-",t.getElement().classList.add("tabulator-row-handle"),n.table.options.responsiveLayoutCollapseStartOpen&&(s=!0),r.addEventListener("click",function(t){t.stopImmediatePropagation(),i(!s)}),i(s),r},rowSelection:function(t){var e=this,o=document.createElement("input");if(o.type="checkbox",this.table.modExists("selectRow",!0))if(o.addEventListener("click",function(t){t.stopPropagation()}),"function"==typeof t.getRow){var i=t.getRow();o.addEventListener("change",function(t){i.toggleSelect()}),o.checked=i.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(i,o)}else o.addEventListener("change",function(t){e.table.modules.selectRow.selectedRows.length?e.table.deselectRow():e.table.selectRow()}),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},u.prototype.registerModule("format",C);var x=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};x.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},x.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(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"},x.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)},x.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},x.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))},x.prototype.layoutColumnPosition=function(t){var e=this;this.leftColumns.forEach(function(o,i){o.modules.frozen.margin=e._calcSpace(e.leftColumns,i)+e.table.columnManager.scrollLeft+"px",i==e.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})}),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,e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})})},x.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)},x.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(),o)}),this.rightColumns.forEach(function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(),o)})},x.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))},x.prototype._calcSpace=function(t,e){for(var o=0,i=0;i-1&&e.splice(o,1)}),e},R.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())},R.prototype.unfreezeRow=function(t){var e=this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=!1;var o=t.getElement();o.parentNode.removeChild(o),this.table.rowManager.adjustTableSize(),this.rows.splice(e,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},R.prototype.styleRows=function(t){var e=this;this.rows.forEach(function(t,o){e.table.rowManager.styleRow(t,o)})},u.prototype.registerModule("frozenRows",R);var M=function(t){this._group=t,this.type="GroupComponent"};M.prototype.getKey=function(){return this._group.key},M.prototype.getField=function(){return this._group.field},M.prototype.getElement=function(){return this._group.element},M.prototype.getRows=function(){return this._group.getRows(!0)},M.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},M.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},M.prototype.getVisibility=function(){return this._group.visible},M.prototype.show=function(){this._group.show()},M.prototype.hide=function(){this._group.hide()},M.prototype.toggle=function(){this._group.toggleVisibility()},M.prototype._getSelf=function(){return this._group},M.prototype.getTable=function(){return this._group.groupManager.table};var L=function(t,e,o,i,n,s,r){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)},L.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(e){e.scrollHeader(t)})},L.prototype.getRowIndex=function(t){},L.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},L.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))},L.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],e=this.groupList.indexOf(t),e>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},L.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},L.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},L.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},L.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},L.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)},L.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 e=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o})}):t.rows.forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=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)},L.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()))},L.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},L.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},L.prototype.getRows=function(t){var e=[];return this.rows.forEach(function(o){e.push(t?o.getComponent():o)}),e},L.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)},L.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();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.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;"function"==typeof e?i=e:(n=t.table.columnManager.getColumnByField(e),i=n?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},D.prototype.setDisplayIndex=function(t){this.displayIndex=t},D.prototype.getDisplayIndex=function(){return this.displayIndex},D.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)},D.prototype.getGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},D.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},D.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach(function(t){var i={};i.level=0,i.rowCount=0,i.headerContent="";var 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},D.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},D.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},D.prototype.countGroups=function(){return this.groupList.length},D.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)})},D.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new L(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},D.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]||this.createGroup(o,0,e),this.groups[i].addRow(t)},D.prototype.assignRowToExistingGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(t)},D.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},D.prototype.updateGroupRows=function(t){var e=this,o=[];if(e.groupList.forEach(function(t){o=o.concat(t.getHeadersAndRows())}),t){var i=e.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),e.table.rowManager.refreshActiveData("group",!0,!0)}return o},D.prototype.scrollHeaders=function(t){t+="px",this.groupList.forEach(function(e){e.scrollHeader(t)})},D.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))},u.prototype.registerModule("groupRows",D);var T=function(t){this.table=t,this.history=[],this.index=-1};T.prototype.clear=function(){this.history=[],this.index=-1},T.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++},T.prototype.getHistoryUndoSize=function(){return this.index+1},T.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},T.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},T.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},T.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.pos],!1),this.table.rowManager.redraw()}},T.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.pos],!1),this.table.rowManager.redraw()}},T.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof r)o.component===t&&(o.component=e);else if(o.component instanceof l&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},u.prototype.registerModule("history",T);var k=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};k.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,i=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],s=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),i.length?t._extractHeaders(i,n):t._generateBlankHeaders(i,n);for(var r=0;ri&&(i=o.depth))}),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n},S.prototype.groupHeadersToRows=function(t){function e(t,n){var s=i-n;void 0===o[n]&&(o[n]=[]),t.height=t.subGroups?1:s-t.depth+1,o[n].push(t),t.subGroups&&t.subGroups.forEach(function(t){e(t,n+1)})}var o=[],i=0;return t.forEach(function(t){t.depth>i&&(i=t.depth)}),t.forEach(function(t){e(t,0)}),o},S.prototype.generateHeaderElements=function(){var t=this,e=document.createElement("thead");return this.groupHeadersToRows(this.generateColumnGroupHeaders()).forEach(function(o){var i=document.createElement("tr");t.mapElementStyles(t.table.columnManager.getHeadersElement(),e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.forEach(function(e){var o=document.createElement("th");o.colSpan=e.width,o.rowSpan=e.height,o.innerHTML=e.column.definition.title,t.cloneTableStyle&&(o.style.boxSizing="border-box"),t.mapElementStyles(e.column.getElement(),o,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.mapElementStyles(e.column.contentElement,o,["padding-top","padding-left","padding-right","padding-bottom"]),e.column.visible?t.mapElementStyles(e.column.getElement(),o,["width"]):e.column.definition.width&&(o.style.width=e.column.definition.width+"px"),e.column.parent&&t.mapElementStyles(e.column.parent.groupElement,o,["border-top"]),i.appendChild(o)}),e.appendChild(i)}),e},S.prototype.generateBodyElements=function(t){var e,o,i,n,s,r,a,l,c=this;this.cloneTableStyle&&window.getComputedStyle&&(e=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),o=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),i=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),n=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),r=this.table.element.getElementsByClassName("tabulator-group")[0],n&&(a=n.getElementsByClassName("tabulator-cell"),s=a[0],a[a.length-1]));var u=document.createElement("tbody"),d=t?this.table.rowManager.getVisibleRows(!0):this.table.rowManager.getDisplayRows(),h=[];return!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&d.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&d.push(this.table.modules.columnCalcs.botRow)),this.table.columnManager.columnsByIndex.forEach(function(t){c.columnVisCheck(t)&&h.push(t)}),d=d.filter(function(t){switch(t.type){case"group":return!1!==c.config.rowGroups;case"calc":return!1!==c.config.columnCalcs}return!0}),d.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),d.forEach(function(t,n){var a=t.getData(),d=document.createElement("tr");switch(d.classList.add("tabulator-print-table-row"),t.type){case"group":var p=document.createElement("td");p.colSpan=h.length,p.innerHTML=t.key,d.classList.add("tabulator-print-table-group"),c.mapElementStyles(r,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),c.mapElementStyles(r,p,["padding-top","padding-left","padding-right","padding-bottom"]),d.appendChild(p);break;case"calc":d.classList.add("tabulator-print-table-calcs");case"row":h.forEach(function(e){var o=document.createElement("td"),i=e.getFieldValue(a),n={getValue:function(){return i},getField:function(){return e.defi},getElement:function(){return o},getColumn:function(){return e.getComponent()},getData:function(){return a},getRow:function(){return t.getComponent()},getComponent:function(){return n},column:e};if(c.table.modExists("format"))i=c.table.modules.format.formatValue(n);else switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}i instanceof Node?o.appendChild(i):o.innerHTML=i,s&&c.mapElementStyles(s,o,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),d.appendChild(o)}),l="calc"==t.type?i:n%2&&o?o:e,c.mapElementStyles(l,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"])}u.appendChild(d)}),u},S.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},S.prototype.getHtml=function(t,e,o){var i=document.createElement("div");return i.appendChild(this.genereateTable(o||this.table.options.htmlOutputConfig,e,t,"htmlOutput")),i.innerHTML},S.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)})}}},u.prototype.registerModule("htmlTableExport",S);var F=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};F.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var o in this.bindings)e[o]=this.bindings[o];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},F.prototype.mapBindings=function(t){var e=this,o=this;for(var i in t)!function(i){e.actions[i]?t[i]&&("object"!==_typeof(t[i])&&(t[i]=[t[i]]),t[i].forEach(function(t){o.mapBinding(i,t)})):console.warn("Key Binding Error - no such action:",i)}(i)},F.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}})},F.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach(function(o){t.checkBinding(e,o)}))},this.keydownBinding=function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.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(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!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(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(),e.next()||i&&(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(i),i.then(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(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},u.prototype.registerModule("keybindings",F);var z=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)};z.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},z.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)-u.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},z.prototype.bindTouchEvents=function(t){var e,o,i,n,s,r,a,l=this,c=t.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,e=t,o=t.nextColumn(),n=o?o.getWidth()/2:0,i=t.prevColumn(),s=i?i.getWidth()/2:0,r=0,a=0,u=!1,l.startMove(c,t)},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-r>n&&(h=o)!==t&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-a>s&&(h=i)!==t&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(e=h,o=h.nextColumn(),r=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),a=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(t)})},z.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-u.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)},z.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)})},z.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)})},z.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();i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)}):t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i)})},z.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)))},z.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)-u.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-nt.getHeight()/2){if(e.toRow!==t||!e.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)}}else if(e.toRow!==t||e.toRowAfter){var i=t.getElement();i.previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}}.bind(e),t.modules.moveRow=o},_.prototype.initializeRow=function(t){var e,o=this,i={};i.mouseup=function(e){o.tableRowDrop(e,t)}.bind(o),i.mousemove=function(e){if(e.pageY-u.prototype.helpers.elOffset(t.element).top+o.table.rowManager.element.scrollTop>t.getHeight()/2){if(o.toRow!==t||!o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)}}else if(o.toRow!==t||o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1)}}.bind(o),this.hasHandle||(e=t.getElement(),e.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},_.prototype.initializeCell=function(t){var e=this,o=t.getElement();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,t.getElement())},_.prototype.bindTouchEvents=function(t,e){var o,i,n,s,r,a,l,c=this,u=!1;e.addEventListener("touchstart",function(e){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=t,i=t.nextRow(),s=i?i.getHeight()/2:0,n=t.prevRow(),r=n?n.getHeight()/2:0,a=0,l=0,u=!1,c.startMove(e,t)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",function(e){var d,h;c.moving&&(e.preventDefault(),c.moveHover(e),u||(u=e.touches[0].pageY),d=e.touches[0].pageY-u,d>0?i&&d-a>s&&(h=i)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>r&&(h=n)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),a=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=r,r=n?n.getHeight()/2:0))}),e.addEventListener("touchend",function(t){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(t),c.touchMove=!1)})},_.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)})},_.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)})},_.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)},_.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},_.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()))},_.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},_.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},_.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"},_.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"}, +_.prototype.connectToTables=function(t){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:t})},_.prototype.disconnectFromTables=function(){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},_.prototype.connect=function(t,e){var o=this;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"),o.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},_.prototype.disconnect=function(t){var e=this;t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),e.table.element.removeEventListener("mouseup",e.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},_.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()},_.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(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})},_.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)}},_.prototype.senders={delete:function(t,e,o){t.delete()}},_.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)}},u.prototype.registerModule("moveRow",_);var H=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};H.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupMutator(t.definition[r]))&&(o=!0,i[r]={mutator:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.mutate=i)},H.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},H.prototype.transformRow=function(t,e,o){var i,n=this,s="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var r,a,l;n.modules.mutate&&(r=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(t),(!o||o&&void 0!==i)&&(l=n.getComponent(),a="function"==typeof r.params?r.params(i,t,e,l):r.params,n.setFieldValue(t,r.mutator(i,t,e,a,l))))}),t},H.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return o?o.mutator(e,t.row.getData(),"edit",o.params,t.getComponent()):e},H.prototype.enable=function(){this.enabled=!0},H.prototype.disable=function(){this.enabled=!1},H.prototype.mutators={},u.prototype.registerModule("mutator",H);var A=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.pageSizes=[],this.createElements()};A.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"),t.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"))},A.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,o.innerHTML=e,t.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},A.prototype.initialize=function(t){var e,o=this;for(var i in o.table.options.paginationDataSent)o.paginationDataSentNames[i]=o.table.options.paginationDataSent[i];for(var n in o.table.options.paginationDataReceived)o.paginationDataReceivedNames[n]=o.table.options.paginationDataReceived[n];o.table.modules.localize.bind("pagination|first",function(t){o.firstBut.innerHTML=t}),o.table.modules.localize.bind("pagination|first_title",function(t){o.firstBut.setAttribute("aria-label",t),o.firstBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|prev",function(t){o.prevBut.innerHTML=t}),o.table.modules.localize.bind("pagination|prev_title",function(t){o.prevBut.setAttribute("aria-label",t),o.prevBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|next",function(t){o.nextBut.innerHTML=t}),o.table.modules.localize.bind("pagination|next_title",function(t){o.nextBut.setAttribute("aria-label",t),o.nextBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|last",function(t){o.lastBut.innerHTML=t}),o.table.modules.localize.bind("pagination|last_title",function(t){o.lastBut.setAttribute("aria-label",t),o.lastBut.setAttribute("title",t)}),o.firstBut.addEventListener("click",function(){o.setPage(1)}),o.prevBut.addEventListener("click",function(){o.previousPage()}),o.nextBut.addEventListener("click",function(){o.nextPage().then(function(){}).catch(function(){})}),o.lastBut.addEventListener("click",function(){o.setPage(o.max)}),o.table.options.paginationElement&&(o.element=o.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),o.table.modules.localize.bind("pagination|page_size",function(t){o.pageSizeSelect.setAttribute("aria-label",t),o.pageSizeSelect.setAttribute("title",t),e.innerHTML=t}),o.element.appendChild(e),o.element.appendChild(o.pageSizeSelect),o.pageSizeSelect.addEventListener("change",function(t){o.setPageSize(o.pageSizeSelect.value),o.setPage(1).then(function(){}).catch(function(){})})),o.element.appendChild(o.firstBut),o.element.appendChild(o.prevBut),o.element.appendChild(o.pagesElement),o.element.appendChild(o.nextBut),o.element.appendChild(o.lastBut),o.table.options.paginationElement||t||o.table.footerManager.append(o.element,o),o.mode=o.table.options.pagination,o.size=o.table.options.paginationSize||Math.floor(o.table.rowManager.getElement().clientHeight/24),o.count=o.table.options.paginationButtonCount,o.generatePageSizeSelectList()},A.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},A.prototype.setDisplayIndex=function(t){this.displayIndex=t},A.prototype.getDisplayIndex=function(){return this.displayIndex},A.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},A.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},A.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},A.prototype.setPage=function(t){var e=this;return new Promise(function(o,i){t=parseInt(t),t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){o()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},A.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){var n=e.table.rowManager.getDisplayRows(e.displayIndex-1),s=n.indexOf(t);if(s>-1){var r=Math.ceil((s+1)/e.size);e.setPage(r).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},A.prototype.setPageSize=function(t){t=parseInt(t),t>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList()},A.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&s<=t.max&&t.pagesElement.appendChild(t._generatePageButton(s));this.footerRedraw()},A.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"),o.setAttribute("aria-label","Show Page "+t),o.setAttribute("title","Show Page "+t),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",function(o){e.setPage(t)}),o},A.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()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},A.prototype.nextPage=function(){var t=this;return new Promise(function(e,o){t.page-1&&(i=i.substr(n),s=i.indexOf(";"),s>-1&&(i=i.substr(0,s)),e=i.replace(o+"=",""));break;default:console.warn("Persistence Load Error - invalid mode selected",this.mode)}return!!e&&JSON.parse(e)},P.prototype.mergeDefinition=function(t,e){var o=this,i=[];return e=e||[],e.forEach(function(e,n){var s=o._findColumn(t,e);s&&(s.width=e.width,s.visible=e.visible,s.columns&&(s.columns=o.mergeDefinition(s.columns,e.columns)),i.push(s))}),t.forEach(function(t,n){o._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))}),i},P.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}})},P.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())}var o=this.id+("columns"===t?"":"-"+t);this.saveData(o,e)},P.prototype.validateSorters=function(t){return t.forEach(function(t){t.column=t.field,delete t.field}),t},P.prototype.saveData=function(t,e){switch(e=JSON.stringify(e),this.mode){case"local":localStorage.setItem(t,e);break;case"cookie":var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=t+"="+e+"; expires="+o.toUTCString();break;default:console.warn("Persistence Save Error - invalid mode selected",this.mode)}},P.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),o.push(i)}),o},u.prototype.registerModule("persistence",P);var B=function(t){this.table=t,this.element=!1,this.manualBlock=!1};B.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},B.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.htmlTableExport.genereateTable(this.table.options.printConfig,this.table.options.printCopyStyle,this.table.options.printVisibleRows,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},B.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="")},B.prototype.printFullscreen=function(t,e,o){var i,n,s=window.scrollX,r=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.htmlTableExport.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==e?e:this.table.options.printCopyStyle,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.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?a.innerHTML=i:a.appendChild(i),this.element.appendChild(a)),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,r),this.manualBlock=!1},u.prototype.registerModule("print",B);var N=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};N.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],r=n[1],a=!!n[2]&&n.slice(2);if(!o.blocked&&e===o.currentVersion){if(a&&(i=!!t[s]&&o.table.rowManager.getRowFromDataObject(t[s]),i?a.forEach(function(t){o.table.rowManager.addRowActual(t,!0,i,!0)}):(a=a.slice().reverse(),a.forEach(function(t){o.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==r){var l=t.slice(s,void 0===n[1]?n[1]:s+r);l.forEach(function(t,e){var i=o.table.rowManager.getRowFromDataObject(t);i&&i.deleteActual(e!==l.length-1)})}(a||0!==r)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(t,arguments)}})},N.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})},N.prototype.watchRow=function(t){var e=t.getData();this.blocked=!0;for(var o in e)this.watchKey(t,e,o);this.blocked=!1},N.prototype.watchKey=function(t,e,o){var i=this,n=Object.getOwnPropertyDescriptor(e,o),s=e[o],r=this.currentVersion;Object.defineProperty(e,o,{set:function(e){if(s=e,!i.blocked&&r===i.currentVersion){var a={};a[o]=e,t.updateData(a)}n.set&&n.set(e)},get:function(){return n.get&&n.get(),s}})},N.prototype.unwatchRow=function(t){var e=t.getData();for(var o in e)Object.defineProperty(e,o,{value:e[o]})},N.prototype.block=function(){this.blocked=!0},N.prototype.unblock=function(){this.blocked=!1},u.prototype.registerModule("reactiveData",N);var I=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};I.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 r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.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,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&o.reinitializeWidth(!0)}),a.addEventListener("click",function(t){t.stopPropagation()});var c=function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s,a)))};a.addEventListener("mousedown",c),a.addEventListener("touchstart",c,{passive:!0}),a.addEventListener("dblclick",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&s.reinitializeWidth(!0))}),o.appendChild(r),o.appendChild(a)}},I.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},I.prototype._mouseDown=function(t,e,o){function i(t){e.setWidth(s.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-s.startX)),!s.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function n(t){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.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.persistentLayout&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,e.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,s.startWidth=e.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},u.prototype.registerModule("resizeColumns",I);var O=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};O.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,{passive:!0}),i.addEventListener("touchstart",s),n.addEventListener("click",function(t){t.stopPropagation()});var r=function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(i),o.appendChild(n)},O.prototype._mouseDown=function(t,e,o){function i(t){e.setHeight(s.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-s.startY))}function n(t){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,e.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),s.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,s.startHeight=e.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},u.prototype.registerModule("resizeRows",O);var G=function(t){this.table=t,this.binding=!1,this.observer=!1};G.prototype.initialize=function(t){var e=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(t){e.redraw()}),this.observer.observe(e.element)):(this.binding=function(){e.redraw()},window.addEventListener("resize",this.binding))},G.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},u.prototype.registerModule("resizeTable",G);var j=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};j.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.reverse(),e=e.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()},j.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},j.prototype.layoutRow=function(t){var e=t.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),e.classList.contains("tabulator-calcs")||(t.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),e.appendChild(o),this.generateCollapsedRowContent(t))},j.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},j.prototype.hideColumn=function(t){t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent())},j.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&(e=this.hiddenColumns.indexOf(t),e>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent())},j.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.modules.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=(t.table.options.headerVisible?t.table.columnManager.element.clientWidth:t.table.element.clientWidth)-o;if(i<0){var n=t.columns[t.index];n?(t.hideColumn(n),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(t.showColumn(s),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},j.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach(function(e){t.generateCollapsedRowContent(e)})},j.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)),o&&e.appendChild(o)}},j.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n=[];return this.hiddenColumns.forEach(function(s){var r=s.getFieldValue(i) +;s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n.push({title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)})):n.push({title:s.definition.title,value:r}))}),n},j.prototype.formatCollapsedData=function(t){var e=document.createElement("table"),o="";return t.forEach(function(t){var e=document.createElement("div");t.value instanceof Node&&(e.appendChild(t.value),t.value=e.innerHTML),o+=""+t.title+""+t.value+""}),e.innerHTML=o,Object.keys(t).length?e:""},u.prototype.registerModule("responsiveLayout",j);var V=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};V.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},V.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(e.table._clearSelection(),o.shiftKey){e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,r=i>=n?i:n,a=e.table.rowManager.getDisplayRows().slice(0),l=a.splice(s,r-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==e.lastClickedRow&&(!0===e.table.options.selectable||e.isRowSelected(t)?e.toggleRow(o):e.selectedRows.lengthe.table.options.selectable&&(l=l.slice(0,e.table.options.selectable)),e.selectRows(l))}else o.ctrlKey||o.metaKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(t),e.lastClickedRow=t);e.table._clearSelection()}):(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"))},V.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))},V.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged()):e._selectRow(t,!1,!0)}},V.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),e||(this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},V.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},V.prototype.deselectRows=function(t){var e,o=this;if(void 0===t){e=o.selectedRows.length;for(var i=0;i-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),e||(i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged())):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},V.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},V.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},V.prototype._rowSelectionChanged=function(){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)),this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},V.prototype.registerRowSelectCheckbox=function(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e},V.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t},u.prototype.registerModule("selectRow",V);var W=function(t){this.table=t,this.sortList=[],this.changed=!1};W.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(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-arrow"),e.appendChild(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)?(i=n.getSort(),s=i.findIndex(function(e){return e.field===t.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:t,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(t,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},W.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},W.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},W.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),e?(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.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},W.prototype.clear=function(){this.setSort([])},W.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"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]},W.prototype.sort=function(t){var e,o=this;e=this.table.options.sortOrderReverse?o.sortList.slice().reverse():o.sortList,o.table.options.dataSorting&&o.table.options.dataSorting.call(o.table,o.getSort()),o.clearColumnHeaders(),o.table.options.ajaxSorting?e.forEach(function(t,e){o.setColumnHeader(t.column,t.dir)}):e.forEach(function(i,n){i.column&&i.column.modules.sort&&(i.column.modules.sort.sorter||(i.column.modules.sort.sorter=o.findSorter(i.column)),o._sortItem(t,i.column,i.dir,e,n)),o.setColumnHeader(i.column,i.dir)}),o.table.options.dataSorted&&o.table.options.dataSorted.call(o.table,o.getSort(),o.table.rowManager.getComponents(!0))},W.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},W.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},W.prototype._sortItem=function(t,e,o,i,n){var s=this,r="function"==typeof e.modules.sort.params?e.modules.sort.params(e.getComponent(),o):e.modules.sort.params;t.sort(function(t,a){var l=s._sortRow(t,a,e,o,r);if(0===l&&n)for(var c=n-1;c>=0&&0===(l=s._sortRow(t,a,i[c].column,i[c].dir,r));c--);return l})},W.prototype._sortRow=function(t,e,o,i,n){var s,r,a="asc"==i?t:e,l="asc"==i?e:t;return t=o.getFieldValue(a.getData()),e=o.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),r=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,r,o.getComponent(),i,n)},W.prototype.sorters={number:function(t,e,o,i,n,s,r){var a=r.alignEmptyValues,l=r.decimalSeparator||".",c=r.thousandSeparator||",",u=0;if(t=parseFloat(String(t).split(c).join("").split(l).join(".")),e=parseFloat(String(e).split(c).join("").split(l).join(".")),isNaN(t))u=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;u=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(u*=-1),u},string:function(t,e,o,i,n,s,r){var a,l=r.alignEmptyValues,c=0;if(t){if(e){switch(_typeof(r.locale)){case"boolean":r.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=r.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}c=1}else c=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(t,e,o,i,n,s,r){return r.format||(r.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},time:function(t,e,o,i,n,s,r){return r.format||(r.format="hh:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},datetime:function(t,e,o,i,n,s,r){var a=r.format||"DD/MM/YYYY hh:mm:ss",l=r.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;c=1}else c=e.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(t,e,o,i,n,s,r){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,r){function a(t){switch(u){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,c=0,u=r.type||"length",d=r.alignEmptyValues,h=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,c=e?a(e):0,l-c;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(t,e,o,i,n,s,r){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,r){var a,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=r.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(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;hu?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},u.prototype.registerModule("sort",W);var U=function(t){this.table=t};return U.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)},U.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return i=t.indexOf(":"),i>-1?(e=t.substring(0,i),o=t.substring(i+1)):e=t,console.log("v",t,e,o),this._buildValidator(e,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},U.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)},U.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},U.prototype.validators={integer:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null===e||void 0===e||!isNaN(e)},string:function(t,e,o){return""===e||null===e||void 0===e||isNaN(e)},max:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)>=o},minLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length<=o},in:function(t,e,o){return""===e||null===e||void 0===e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null===e||void 0===e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null===e||void 0===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&&void 0!==e}},u.prototype.registerModule("validate",U),u}); \ No newline at end of file diff --git a/js/tabulator/dist/js/tabulator_core.js b/js/tabulator/dist/js/tabulator_core.js new file mode 100644 index 0000000..e69de29 diff --git a/js/tabulator/dist/js/tabulator_core.min.js b/js/tabulator/dist/js/tabulator_core.min.js new file mode 100644 index 0000000..d62262c --- /dev/null +++ b/js/tabulator/dist/js/tabulator_core.min.js @@ -0,0 +1,5 @@ +/* Tabulator v4.4.3 (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;no?(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=[];if(t&&t.length){e=t[0];for(var n in e){var l={field:n,title:n},s=e[n];switch(void 0===s?"undefined":_typeof(s)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(s)?"array":"string";break;default:o=isNaN(s)||""===s?s.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}l.sorter=o,i.push(l)}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(),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()));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.columnVertAlign,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){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.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=t.indexOf(e);s>-1&&(t.splice(s,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=s,t.splice(l,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(s,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._addColumn(t,e,o);this._reIndexColumns(),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),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},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.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?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.persistentLayout&&this.table.modExists("persistence",!0)&&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 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(){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.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()};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.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",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.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,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()};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._setNesteData: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"))},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.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=t.definition,o=t.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:parseInt(e.minWidth)),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},Column.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},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;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),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),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(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),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._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.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","width","minWidth","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","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","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print"],Column.prototype.getComponent=function(){return new ColumnComponent(this)};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",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=[]};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.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.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.element===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.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.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),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=t instanceof Row?t:new Row(t||{},this),s=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),s?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],s=!1):n.length&&(o=n[n.length-1],s=!(n.length1&&(!o||o&&-1==a.indexOf(o)?s?a[0]!==l&&(o=a[0],this._moveRowInArray(l.getGroup().rows,l,o,!s)):a[a.length-1]!==l&&(o=a[a.length-1],this._moveRowInArray(l.getGroup().rows,l,o,!s)):this._moveRowInArray(l.getGroup().rows,l,o,!s))}if(o){var r=this.rows.indexOf(o),u=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(s?e:e+1,0,l)}),u>-1&&this.activeRows.splice(s?u:u+1,0,l),r>-1&&this.rows.splice(s?r:r+1,0,l)}else s?(this.displayRowIterator(function(t){t.unshift(l)}),this.activeRows.unshift(l),this.rows.unshift(l)):(this.displayRowIterator(function(t){t.push(l)}),this.activeRows.push(l),this.rows.push(l));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,l.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),l},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),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")){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=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},RowManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},RowManager.prototype.getDataCount=function(t){return t?this.activeRows.length:this.rows.length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=l}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).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;switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),t||(t="all"),l.options.selectable&&!l.options.selectablePersistence&&l.modExists("selectRow")&&l.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:l.modExists("filter")?n.setActiveRows(l.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:l.modExists("sort")&&l.modules.sort.sort(this.activeRows);case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&l.modules.frozenRows.isFrozen()&&(l.modules.frozenRows.getDisplayIndex()||l.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:l.options.groupBy&&l.modExists("groupRows")&&(l.modules.groupRows.getDisplayIndex()||l.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:l.options.dataTree&&l.modExists("dataTree")&&(l.modules.dataTree.getDisplayIndex()||l.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&l.modules.dataTree.setDisplayIndex(i)),l.options.pagination&&l.modExists("page")&&!o&&"local"==l.modules.page.getMode()&&l.modules.page.reset();case"page":e?e=!1:l.options.pagination&&l.modExists("page")&&(l.modules.page.getDisplayIndex()||l.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.page.getDisplayIndex(),"local"==l.modules.page.getMode()&&l.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(l.modules.page.getRows(this.getDisplayRows(i-1)),i))&&l.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),l.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),l.modExists("columnCalcs")&&l.modules.columnCalcs.recalc(this.activeRows)},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,l=0,s=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a])if(i){if(!(o-s[a].getElement().offsetTop>=0))break;l=a}else e-s[a].getElement().offsetTop>=0?n=a:i=!0}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(){return this.rows},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){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&&(c=!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=c?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()},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)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),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(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},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 RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},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",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},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.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},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)},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){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return 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;!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),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(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this), +"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!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=this,o=this,i=Tabulator.prototype.helpers.elVisible(this.element);return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.block(),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var s in t)o.data[s]=t[s];e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.unblock();for(var s in t){e.table.columnManager.getColumnsByFieldRoot(s).forEach(function(o){var n=e.getCell(o.getField());if(n){var l=o.getFieldValue(t);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}i?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0,e.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&e.table.modules.dataTree.redrawNeeded(t)&&(e.table.modules.dataTree.initializeRow(e),e.table.modules.dataTree.layoutRow(e),e.table.rowManager.refreshActiveData("tree",!1,!0)),o.table.options.rowUpdated.call(e.table,o.getComponent()),n()})},Row.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0: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.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.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),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.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.deleteCells=function(){for(var t=this.cells.length,e=0;e-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)},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)},Tabulator.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return 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("htmlTableExport",!0))return this.modules.htmlTableExport.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){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},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 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,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},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.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},Tabulator.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},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.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){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),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.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)&&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.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")},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"):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"):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.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},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.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},Tabulator.prototype.downloadToTab=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o,!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=Array.isArray(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]):e[o]=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){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-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 a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,c=0,h=0,p=0,d=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),d+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),c=i-u,h=d?Math.floor(c/d):c,p=c-h*d,p+=o(m,c,h,l)):(p=d?i-Math.floor(i/d)*d:i,m.forEach(function(t){t.width=l?a(t):s(t)})),p}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],c=[],h=0,p=0,d=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.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&&(c.push({column:t,width:n>i?n:i}),h+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var d=o(u,s,r,!1);u.length&&d>0&&(u[u.length-1].width+=+d),u.forEach(function(t){s-=t.width}),p=Math.abs(d)+s,p>0&&h&&(d=o(c,p,Math.floor(p/h),!0)),c.length&&(c[c.length-1].width-=d),u.forEach(function(t){t.column.setWidth(t.width)}),c.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={}};Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.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.langs[t]?this._setLangProp(this.langs[t],e):this.langs[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.langs[t]){var i=t.split("-")[0];o.langs[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.langs.default||{}),"default"!=t&&e(o.langs[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.langs[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",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},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/js/tabulator/gulpfile.js b/js/tabulator/gulpfile.js new file mode 100644 index 0000000..720edd4 --- /dev/null +++ b/js/tabulator/gulpfile.js @@ -0,0 +1,201 @@ +var gulp = require('gulp'), +sass = require('gulp-sass'), +autoprefixer = require('gulp-autoprefixer'), +cssnano = require('gulp-cssnano'), +jshint = require('gulp-jshint'), +uglify = require('gulp-uglify'), +imagemin = require('gulp-imagemin'), +rename = require('gulp-rename'), +concat = require('gulp-concat'), +notify = require('gulp-notify'), +cache = require('gulp-cache'), +livereload = require('gulp-livereload'), +del = require('del'); +include = require('gulp-include'), +sourcemaps = require('gulp-sourcemaps'), +babel = require('gulp-babel'), +plumber = require('gulp-plumber'), +gutil = require('gulp-util'), +insert = require('gulp-insert'), +fs = require('fs'); + +var version_no = "4.4.3", + +version = "/* Tabulator v" + version_no + " (c) Oliver Folkerd */\n"; + +var gulp_src = gulp.src; +gulp.src = function() { + return gulp_src.apply(gulp, arguments) + .pipe(plumber(function(error) { + // Output an error message + gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message)); + // emit the end event, to properly end the task + this.emit('end'); + }) + ); +}; + +//build css +gulp.task('styles', function() { + return gulp.src('src/scss/**/tabulator*.scss') + .pipe(sourcemaps.init()) + .pipe(insert.prepend(version + "\n")) + .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) + .pipe(autoprefixer('last 4 version')) + .pipe(gulp.dest('dist/css')) + .pipe(rename({suffix: '.min'})) + .pipe(cssnano({zindex: false})) + .pipe(insert.prepend(version)) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('dist/css')) + .on('end', function(){ gutil.log('Styles task complete'); }) + }); + + +//build tabulator +gulp.task('tabulator', function() { + //return gulp.src('src/js/**/*.js') + return gulp.src('src/js/core_modules.js') + .pipe(insert.prepend(version + "\n")) + //.pipe(sourcemaps.init()) + .pipe(include()) + //.pipe(jshint()) + // .pipe(jshint.reporter('default')) + .pipe(babel({ + //presets:['es2015'] + compact: false, + presets: [["env",{ + "targets": { + "browsers": ["last 4 versions"] + }, + loose: true, + modules: false, + }, ], { }] + })) + .pipe(concat('tabulator.js')) + .pipe(gulp.dest('dist/js')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(insert.prepend(version)) + // .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('dist/js')) + //.pipe(notify({ message: 'Scripts task complete' })); + .on('end', function(){ gutil.log('Tabulator Complete'); }) + //.on("error", console.log) + }); + + +//simplified core js +gulp.task('core', function() { + return gulp.src('src/js/core.js') + .pipe(insert.prepend(version + "\n")) + .pipe(include()) + .pipe(babel({ + presets: [["env", { + "targets": { + "browsers": ["last 4 versions"] + }, + loose: true, + modules: false, + }] + ] + })) + .pipe(concat('tabulator_core.js')) + .pipe(gulp.dest('dist/js')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(insert.prepend(version)) + .pipe(gulp.dest('dist/js')) + .on('end', function(){ gutil.log('Core complete'); }) + }); + + + +//make jquery wrapper +gulp.task('modules', function(){ + + var path = __dirname + "/src/js/modules/"; + + var files = fs.readdirSync(path); + + var core = ["layout.js", "localize.js", "comms.js"]; + + files.forEach(function(file, index){ + + if(!core.includes(file)){ + return gulp.src('src/js/modules/' + file) + .pipe(insert.prepend(version + "\n")) + .pipe(include()) + .pipe(babel({ + presets: [["env", { + "targets": { + "browsers": ["last 4 versions"] + }, + loose: true, + modules: false, + }] + ] + })) + .pipe(concat(file)) + .pipe(gulp.dest('dist/js/modules/')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(insert.prepend(version)) + .pipe(gulp.dest('dist/js/modules/')) + } + }); + + }); + +//make jquery wrapper +gulp.task('jquery', function(){ + return gulp.src('src/js/jquery_wrapper.js') + .pipe(insert.prepend(version + "\n")) + .pipe(include()) + .pipe(babel({ + presets: [["env", { + "targets": { + "browsers": ["last 4 versions"] + }, + loose: true, + modules: false, + }] + ] + })) + .pipe(concat('jquery_wrapper.js')) + .pipe(gulp.dest('dist/js')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(insert.prepend(version)) + .pipe(gulp.dest('dist/js')) + .on('end', function(){ gutil.log('jQuery wrapper complete'); }) + + }); + + +gulp.task('scripts', function() { + gulp.start('tabulator'); + gulp.start('core'); + gulp.start('modules'); + gulp.start('jquery'); + }); + +gulp.task('clean', function() { + return del(['dist/css', 'dist/js']); + }); + + +gulp.task('default', ['clean'], function() { + gulp.start('styles', 'scripts'); + }); + + +gulp.task('watch', function() { + + // Watch .scss files + gulp.watch('src/scss/**/*.scss', ['styles']); + + // Watch .js files + gulp.watch('src/js/**/*.js', ['scripts']); + + }); \ No newline at end of file diff --git a/js/tabulator/package-lock.json b/js/tabulator/package-lock.json new file mode 100644 index 0000000..0478a92 --- /dev/null +++ b/js/tabulator/package-lock.json @@ -0,0 +1,9976 @@ +{ + "name": "tabulator-tables", + "version": "4.2.6", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@gulp-sourcemaps/identity-map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", + "integrity": "sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==", + "dev": true, + "requires": { + "acorn": "^5.0.3", + "css": "^2.2.1", + "normalize-path": "^2.1.1", + "source-map": "^0.6.0", + "through2": "^2.0.3" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "^2.0.1", + "through2": "^2.0.3" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "archive-type": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-3.2.0.tgz", + "integrity": "sha1-nNnABpV+vpX62tW9YJiUKoE3N/Y=", + "dev": true, + "optional": true, + "requires": { + "file-type": "^3.1.0" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true, + "optional": true + } + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-1.1.0.tgz", + "integrity": "sha1-9C/YFV048hpbjqB8KOBj7RcAsTg=", + "dev": true, + "optional": true + }, + "async-foreach": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", + "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "^1.7.6", + "caniuse-db": "^1.0.30000634", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^5.2.16", + "postcss-value-parser": "^3.2.3" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "dev": true, + "requires": { + "babel-helper-bindify-decorators": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", + "dev": true + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "dev": true + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", + "dev": true + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-generators": "^6.5.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "dev": true, + "requires": { + "babel-helper-explode-class": "^6.24.1", + "babel-plugin-syntax-decorators": "^6.13.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "dev": true, + "requires": { + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators": "^6.24.1", + "babel-preset-stage-3": "^6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-plugin-transform-exponentiation-operator": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.22.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "bin-build": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-2.2.0.tgz", + "integrity": "sha1-EfjdYfcP/Por3KpbRvXo/t1CIcw=", + "dev": true, + "optional": true, + "requires": { + "archive-type": "^3.0.1", + "decompress": "^3.0.0", + "download": "^4.1.2", + "exec-series": "^1.0.0", + "rimraf": "^2.2.6", + "tempfile": "^1.0.0", + "url-regex": "^3.0.0" + }, + "dependencies": { + "tempfile": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-1.1.1.tgz", + "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", + "dev": true, + "optional": true, + "requires": { + "os-tmpdir": "^1.0.0", + "uuid": "^2.0.1" + } + }, + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true, + "optional": true + } + } + }, + "bin-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-2.0.0.tgz", + "integrity": "sha1-hvjm9CU4k99g3DFpV/WvAqywWTA=", + "dev": true, + "optional": true, + "requires": { + "executable": "^1.0.0" + } + }, + "bin-version": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-1.0.4.tgz", + "integrity": "sha1-nrSY7m/Xb3q5p8FgQ2+JV5Q1144=", + "dev": true, + "optional": true, + "requires": { + "find-versions": "^1.0.0" + } + }, + "bin-version-check": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-2.1.0.tgz", + "integrity": "sha1-5OXfKQuQaffRETJAMe/BP90RpbA=", + "dev": true, + "optional": true, + "requires": { + "bin-version": "^1.0.0", + "minimist": "^1.1.0", + "semver": "^4.0.3", + "semver-truncate": "^1.0.0" + }, + "dependencies": { + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true, + "optional": true + } + } + }, + "bin-wrapper": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-3.0.2.tgz", + "integrity": "sha1-Z9MwYmLksaXy+I7iNGT2plVneus=", + "dev": true, + "optional": true, + "requires": { + "bin-check": "^2.0.0", + "bin-version-check": "^2.1.0", + "download": "^4.0.0", + "each-async": "^1.1.1", + "lazy-req": "^1.0.0", + "os-filter-obj": "^1.0.0" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "bluebird": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", + "dev": true + }, + "body-parser": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", + "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", + "dev": true, + "requires": { + "bytes": "2.2.0", + "content-type": "~1.0.1", + "debug": "~2.2.0", + "depd": "~1.1.0", + "http-errors": "~1.3.1", + "iconv-lite": "0.4.13", + "on-finished": "~2.3.0", + "qs": "5.2.0", + "raw-body": "~2.1.5", + "type-is": "~1.6.10" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "qs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", + "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=", + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "optional": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true, + "optional": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "optional": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true, + "optional": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-to-vinyl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz", + "integrity": "sha1-APFfruOreh3aLN5tkSG//dB7ImI=", + "dev": true, + "optional": true, + "requires": { + "file-type": "^3.1.0", + "readable-stream": "^2.0.2", + "uuid": "^2.0.1", + "vinyl": "^1.0.0" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true, + "optional": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "optional": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "bytes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", + "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cache-swap": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/cache-swap/-/cache-swap-0.3.0.tgz", + "integrity": "sha1-HFQaoQilAQb2ML3Zj+HeyLoTP1E=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.1", + "object-assign": "^4.0.1", + "rimraf": "^2.4.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + } + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, + "requires": { + "browserslist": "^1.3.6", + "caniuse-db": "^1.0.30000529", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "caniuse-db": { + "version": "1.0.30000984", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000984.tgz", + "integrity": "sha512-1tismk25It1v7bWgRHkHxITa7ySDXVQCwb49iKbn/HeDBTEKOgEqKkJT2Xv5rJSneDqdQRqFvYrzvw5WulLjfQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000984", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", + "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true, + "optional": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "caw": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/caw/-/caw-1.2.0.tgz", + "integrity": "sha1-/7Im/n78VHKI3GLuPpcHPCEtEDQ=", + "dev": true, + "optional": true, + "requires": { + "get-proxy": "^1.0.1", + "is-obj": "^1.0.0", + "object-assign": "^3.0.0", + "tunnel-agent": "^0.4.0" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true, + "optional": true + } + } + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "clap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "dev": true, + "requires": { + "chalk": "^1.1.3" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "^7.1.1" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "co": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", + "integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g=", + "dev": true, + "optional": true + }, + "coa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "dev": true, + "requires": { + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "dev": true, + "requires": { + "color": "^0.11.0", + "css-color-names": "0.0.4", + "has": "^1.0.1" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "dev": true, + "optional": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "optional": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "console-stream": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", + "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", + "dev": true, + "optional": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "optional": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "optional": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "dev": true, + "requires": { + "autoprefixer": "^6.3.1", + "decamelize": "^1.1.2", + "defined": "^1.0.0", + "has": "^1.0.1", + "object-assign": "^4.0.1", + "postcss": "^5.0.14", + "postcss-calc": "^5.2.0", + "postcss-colormin": "^2.1.8", + "postcss-convert-values": "^2.3.4", + "postcss-discard-comments": "^2.0.4", + "postcss-discard-duplicates": "^2.0.1", + "postcss-discard-empty": "^2.0.1", + "postcss-discard-overridden": "^0.1.1", + "postcss-discard-unused": "^2.2.1", + "postcss-filter-plugins": "^2.0.0", + "postcss-merge-idents": "^2.1.5", + "postcss-merge-longhand": "^2.0.1", + "postcss-merge-rules": "^2.0.3", + "postcss-minify-font-values": "^1.0.2", + "postcss-minify-gradients": "^1.0.1", + "postcss-minify-params": "^1.0.4", + "postcss-minify-selectors": "^2.0.4", + "postcss-normalize-charset": "^1.1.0", + "postcss-normalize-url": "^3.0.7", + "postcss-ordered-values": "^2.1.0", + "postcss-reduce-idents": "^2.2.2", + "postcss-reduce-initial": "^1.0.0", + "postcss-reduce-transforms": "^1.0.3", + "postcss-svgo": "^2.1.1", + "postcss-unique-selectors": "^2.0.2", + "postcss-value-parser": "^3.2.3", + "postcss-zindex": "^2.0.1" + } + }, + "csso": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "dev": true, + "requires": { + "clap": "^1.0.9", + "source-map": "^0.5.3" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-fabulous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", + "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "dev": true, + "requires": { + "debug": "3.X", + "memoizee": "0.4.X", + "object-assign": "4.X" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-3.0.0.tgz", + "integrity": "sha1-rx3VDQbjv8QyRh033hGzjA2ZG+0=", + "dev": true, + "optional": true, + "requires": { + "buffer-to-vinyl": "^1.0.0", + "concat-stream": "^1.4.6", + "decompress-tar": "^3.0.0", + "decompress-tarbz2": "^3.0.0", + "decompress-targz": "^3.0.0", + "decompress-unzip": "^3.0.0", + "stream-combiner2": "^1.1.1", + "vinyl-assign": "^1.0.1", + "vinyl-fs": "^2.2.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true, + "optional": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "optional": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "optional": true, + "requires": { + "extend": "^3.0.0", + "glob": "^5.0.3", + "glob-parent": "^3.0.0", + "micromatch": "^2.3.7", + "ordered-read-streams": "^0.3.0", + "through2": "^0.6.0", + "to-absolute-glob": "^0.1.1", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true, + "optional": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true, + "optional": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "optional": true, + "requires": { + "convert-source-map": "^1.1.1", + "graceful-fs": "^4.1.2", + "strip-bom": "^2.0.0", + "through2": "^2.0.0", + "vinyl": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "optional": true, + "requires": { + "is-stream": "^1.0.1", + "readable-stream": "^2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "optional": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "optional": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + }, + "dependencies": { + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "optional": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "optional": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "optional": true, + "requires": { + "duplexify": "^3.2.0", + "glob-stream": "^5.3.2", + "graceful-fs": "^4.0.0", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "^0.3.0", + "lazystream": "^1.0.0", + "lodash.isequal": "^4.0.0", + "merge-stream": "^1.0.0", + "mkdirp": "^0.5.0", + "object-assign": "^4.0.0", + "readable-stream": "^2.0.4", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^1.0.0", + "through2": "^2.0.0", + "through2-filter": "^2.0.0", + "vali-date": "^1.0.0", + "vinyl": "^1.0.0" + } + } + } + }, + "decompress-tar": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-3.1.0.tgz", + "integrity": "sha1-IXx4n5uURQ76rcXF5TeXj8MzxGY=", + "dev": true, + "optional": true, + "requires": { + "is-tar": "^1.0.0", + "object-assign": "^2.0.0", + "strip-dirs": "^1.0.0", + "tar-stream": "^1.1.1", + "through2": "^0.6.1", + "vinyl": "^0.4.3" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "optional": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "decompress-tarbz2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz", + "integrity": "sha1-iyOTVoE1X58YnYclag+L3ZbZZm0=", + "dev": true, + "optional": true, + "requires": { + "is-bzip2": "^1.0.0", + "object-assign": "^2.0.0", + "seek-bzip": "^1.0.3", + "strip-dirs": "^1.0.0", + "tar-stream": "^1.1.1", + "through2": "^0.6.1", + "vinyl": "^0.4.3" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "optional": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "decompress-targz": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-3.1.0.tgz", + "integrity": "sha1-ssE9+YFmJomRtxXWRH9kLpaW9aA=", + "dev": true, + "optional": true, + "requires": { + "is-gzip": "^1.0.0", + "object-assign": "^2.0.0", + "strip-dirs": "^1.0.0", + "tar-stream": "^1.1.1", + "through2": "^0.6.1", + "vinyl": "^0.4.3" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "optional": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "decompress-unzip": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-3.4.0.tgz", + "integrity": "sha1-YUdbQVIGa74/7hL51inRX+ZHjus=", + "dev": true, + "optional": true, + "requires": { + "is-zip": "^1.0.0", + "read-all-stream": "^3.0.0", + "stat-mode": "^0.2.0", + "strip-dirs": "^1.0.0", + "through2": "^2.0.0", + "vinyl": "^1.0.0", + "yauzl": "^2.2.1" + }, + "dependencies": { + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "optional": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "download": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/download/-/download-4.4.3.tgz", + "integrity": "sha1-qlX9rTktldS2jowr4D4MKqIbqaw=", + "dev": true, + "optional": true, + "requires": { + "caw": "^1.0.1", + "concat-stream": "^1.4.7", + "each-async": "^1.0.0", + "filenamify": "^1.0.1", + "got": "^5.0.0", + "gulp-decompress": "^1.2.0", + "gulp-rename": "^1.2.0", + "is-url": "^1.2.0", + "object-assign": "^4.0.1", + "read-all-stream": "^3.0.0", + "readable-stream": "^2.0.2", + "stream-combiner2": "^1.1.1", + "vinyl": "^1.0.0", + "vinyl-fs": "^2.2.0", + "ware": "^1.2.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true, + "optional": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "optional": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "optional": true, + "requires": { + "extend": "^3.0.0", + "glob": "^5.0.3", + "glob-parent": "^3.0.0", + "micromatch": "^2.3.7", + "ordered-read-streams": "^0.3.0", + "through2": "^0.6.0", + "to-absolute-glob": "^0.1.1", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true, + "optional": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true, + "optional": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "optional": true, + "requires": { + "convert-source-map": "^1.1.1", + "graceful-fs": "^4.1.2", + "strip-bom": "^2.0.0", + "through2": "^2.0.0", + "vinyl": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "optional": true, + "requires": { + "is-stream": "^1.0.1", + "readable-stream": "^2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "optional": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "optional": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + }, + "dependencies": { + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "optional": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "optional": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "optional": true, + "requires": { + "duplexify": "^3.2.0", + "glob-stream": "^5.3.2", + "graceful-fs": "^4.0.0", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "^0.3.0", + "lazystream": "^1.0.0", + "lodash.isequal": "^4.0.0", + "merge-stream": "^1.0.0", + "mkdirp": "^0.5.0", + "object-assign": "^4.0.0", + "readable-stream": "^2.0.4", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^1.0.0", + "through2": "^2.0.0", + "through2-filter": "^2.0.0", + "vali-date": "^1.0.0", + "vinyl": "^1.0.0" + } + } + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "optional": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "optional": true, + "requires": { + "once": "^1.4.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "each-async": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", + "integrity": "sha1-3uUim98KtrogEqOV4bhpq/iBNHM=", + "dev": true, + "optional": true, + "requires": { + "onetime": "^1.0.0", + "set-immediate-shim": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.196", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.196.tgz", + "integrity": "sha512-NFGRHzY0x8yIUFnAthKxaOKe5q+c8jjvyQM2pMq2+59QORz8AN5+qXPJBwX05kz2uEtyraX2XxB0LPT+7EE6vw==", + "dev": true + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.50", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", + "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "event-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-4.0.1.tgz", + "integrity": "sha512-qACXdu/9VHPBzcyhdOWR5/IahhGMf0roTeZJfzz077GwylcDd90yOHLouhmv7GJ5XzPi6ekaQWd8AvPP2nOvpA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" + } + }, + "exec-buffer": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", + "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", + "dev": true, + "optional": true, + "requires": { + "execa": "^0.7.0", + "p-finally": "^1.0.0", + "pify": "^3.0.0", + "rimraf": "^2.5.4", + "tempfile": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "optional": true + } + } + }, + "exec-series": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/exec-series/-/exec-series-1.0.3.tgz", + "integrity": "sha1-bSV6m+rEgqhyx3g7yGFYOfx3FDo=", + "dev": true, + "optional": true, + "requires": { + "async-each-series": "^1.1.0", + "object-assign": "^4.1.0" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "optional": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "executable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/executable/-/executable-1.1.0.tgz", + "integrity": "sha1-h3mA6REvM5EGbaNyZd562ENKtNk=", + "dev": true, + "optional": true, + "requires": { + "meow": "^3.1.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "faye-websocket": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz", + "integrity": "sha1-zEB0x/Sk39A69U3WXDVLE1EyzhE=", + "dev": true, + "requires": { + "websocket-driver": ">=0.3.6" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "optional": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "optional": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true, + "optional": true + }, + "filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", + "dev": true, + "optional": true + }, + "filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "dev": true, + "optional": true, + "requires": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "find-versions": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-1.2.1.tgz", + "integrity": "sha1-y96fEuOFdaCvG+G5osXV/Y8Ya2I=", + "dev": true, + "optional": true, + "requires": { + "array-uniq": "^1.0.0", + "get-stdin": "^4.0.1", + "meow": "^3.5.0", + "semver-regex": "^1.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "optional": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-proxy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-1.1.0.tgz", + "integrity": "sha1-iUhUSRvFkbDxR9euVw9cZ4tyVus=", + "dev": true, + "optional": true, + "requires": { + "rc": "^1.1.2" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "optional": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gifsicle": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-3.0.4.tgz", + "integrity": "sha1-9Fy17RAWW2ZdySng6TKLbIId+js=", + "dev": true, + "optional": true, + "requires": { + "bin-build": "^2.0.0", + "bin-wrapper": "^3.0.0", + "logalot": "^2.0.0" + } + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "optional": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "^0.5.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "got": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", + "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", + "dev": true, + "optional": true, + "requires": { + "create-error-class": "^3.0.1", + "duplexer2": "^0.1.4", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "node-status-codes": "^1.0.0", + "object-assign": "^4.0.1", + "parse-json": "^2.1.0", + "pinkie-promise": "^2.0.0", + "read-all-stream": "^3.0.0", + "readable-stream": "^2.0.5", + "timed-out": "^3.0.0", + "unzip-response": "^1.0.2", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "^1.1.0" + } + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true, + "optional": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, + "dependencies": { + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "gulp-autoprefixer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz", + "integrity": "sha1-dSMAUc0NFxND14O36bXREg7u+bA=", + "dev": true, + "requires": { + "autoprefixer": "^6.0.0", + "gulp-util": "^3.0.0", + "postcss": "^5.0.4", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-babel": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/gulp-babel/-/gulp-babel-6.1.3.tgz", + "integrity": "sha512-tm15R3rt4gO59WXCuqrwf4QXJM9VIJC+0J2NPYSC6xZn+cZRD5y5RPGAiHaDxCJq7Rz5BDljlrk3cEjWADF+wQ==", + "dev": true, + "requires": { + "babel-core": "^6.23.1", + "object-assign": "^4.0.1", + "plugin-error": "^1.0.1", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-cache": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/gulp-cache/-/gulp-cache-0.4.6.tgz", + "integrity": "sha1-LQO1LbT2pVOuHVvvAeSD6Qfp95Y=", + "dev": true, + "requires": { + "bluebird": "^3.0.5", + "cache-swap": "^0.3.0", + "gulp-util": "^3.0.7", + "object-assign": "^4.0.1", + "object.omit": "^2.0.0", + "object.pick": "^1.1.1", + "readable-stream": "^2.0.4", + "try-json-parse": "^0.1.1", + "vinyl": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-concat": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", + "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.0.0", + "through2": "^2.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "gulp-cssnano": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz", + "integrity": "sha512-r8qdX5pTXsBb/IRm9loE8Ijz8UiPW/URMC/bKJe4FPNHRaz4aEx8Bev03L0FYHd/7BSGu/ebmfumAkpGuTdenA==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "cssnano": "^3.0.0", + "object-assign": "^4.0.1", + "plugin-error": "^1.0.1", + "vinyl-sourcemaps-apply": "^0.2.1" + } + }, + "gulp-decompress": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gulp-decompress/-/gulp-decompress-1.2.0.tgz", + "integrity": "sha1-jutlpeAV+O2FMsr+KEVJYGJvDcc=", + "dev": true, + "optional": true, + "requires": { + "archive-type": "^3.0.0", + "decompress": "^3.0.0", + "gulp-util": "^3.0.1", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "gulp-imagemin": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/gulp-imagemin/-/gulp-imagemin-3.4.0.tgz", + "integrity": "sha1-I6jUxRM/UKKnCKyofKSy1ut8RAM=", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "gulp-util": "^3.0.8", + "imagemin": "^5.3.1", + "imagemin-gifsicle": "^5.2.0", + "imagemin-jpegtran": "^5.0.2", + "imagemin-optipng": "^5.2.1", + "imagemin-svgo": "^5.2.2", + "plur": "^2.1.2", + "pretty-bytes": "^4.0.2", + "through2-concurrent": "^1.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "gulp-include": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/gulp-include/-/gulp-include-2.4.1.tgz", + "integrity": "sha512-ARF7H6CD/CCavOcvlLhs6sAY+turxI72Gwp+5X/sMNUha8eJXFloDaZ93nnSKIh0K8VR7b7PURHdXrIhFhQ9gg==", + "dev": true, + "requires": { + "ansi-colors": "^3.2.4", + "event-stream": "^4.0.1", + "glob": "^7.1.3", + "plugin-error": "^1.0.1", + "source-map": "^0.7.3", + "strip-bom": "^2.0.0", + "vinyl": "^2.2.0", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "gulp-insert": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/gulp-insert/-/gulp-insert-0.5.0.tgz", + "integrity": "sha1-MjE/E+SiPPWsylzl8MCAkjx3hgI=", + "dev": true, + "requires": { + "readable-stream": "^1.0.26-4", + "streamqueue": "0.0.6" + } + }, + "gulp-jshint": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gulp-jshint/-/gulp-jshint-2.1.0.tgz", + "integrity": "sha512-sP3NK8Y/1e58O0PH9t6s7DAr/lKDSUbIY207oWSeufM6/VclB7jJrIBcPCsyhrFTCDUl9DauePbt6VqP2vPM5w==", + "dev": true, + "requires": { + "lodash": "^4.12.0", + "minimatch": "^3.0.3", + "plugin-error": "^0.1.2", + "rcloader": "^0.2.2", + "through2": "^2.0.0" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-livereload": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz", + "integrity": "sha1-APdEstdJ0+njdGWJyKRKysd5tQ8=", + "dev": true, + "requires": { + "chalk": "^0.5.1", + "debug": "^2.1.0", + "event-stream": "^3.1.7", + "gulp-util": "^3.0.2", + "lodash.assign": "^3.0.0", + "mini-lr": "^0.1.8" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, + "requires": { + "ansi-styles": "^1.1.0", + "escape-string-regexp": "^1.0.0", + "has-ansi": "^0.1.0", + "strip-ansi": "^0.3.0", + "supports-color": "^0.2.0" + } + }, + "event-stream": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.5.tgz", + "integrity": "sha512-vyibDcu5JL20Me1fP734QBH/kenBGLZap2n0+XXM7mvuUPzJ20Ydqj1aKcIeMdri1p+PU+4yAKugjN8KCVst+g==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true, + "requires": { + "ansi-regex": "^0.2.0" + } + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "dev": true, + "requires": { + "lodash._baseassign": "^3.0.0", + "lodash._createassigner": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, + "requires": { + "ansi-regex": "^0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + } + } + }, + "gulp-notify": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-3.2.0.tgz", + "integrity": "sha512-qEocs1UVoDKKUjfsxJNMNwkRla0PbsyJwsqNNXpzYWsLQ29LhxRMY3wnTGZcc4hMHtalnvah/Dwlwb4NijH/0A==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "fancy-log": "^1.3.2", + "lodash.template": "^4.4.0", + "node-notifier": "^5.2.1", + "node.extend": "^2.0.0", + "plugin-error": "^0.1.2", + "through2": "^2.0.3" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-plumber": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/gulp-plumber/-/gulp-plumber-1.2.1.tgz", + "integrity": "sha512-mctAi9msEAG7XzW5ytDVZ9PxWMzzi1pS2rBH7lA095DhMa6KEXjm+St0GOCc567pJKJ/oCvosVAZEpAey0q2eQ==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "fancy-log": "^1.3.2", + "plugin-error": "^0.1.2", + "through2": "^2.0.3" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-rename": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz", + "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==", + "dev": true + }, + "gulp-sass": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/gulp-sass/-/gulp-sass-3.2.1.tgz", + "integrity": "sha512-UATbRpSDsyXCnpYSPBUEvdvtSEzksJs7/oQ0CujIpzKqKrO6vlnYwhX2UTsGrf4rNLwqlSSaM271It0uHYvJ3Q==", + "dev": true, + "requires": { + "gulp-util": "^3.0", + "lodash.clonedeep": "^4.3.2", + "node-sass": "^4.8.3", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-sourcemaps": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz", + "integrity": "sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg==", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "1.X", + "@gulp-sourcemaps/map-sources": "1.X", + "acorn": "5.X", + "convert-source-map": "1.X", + "css": "2.X", + "debug-fabulous": "1.X", + "detect-newline": "2.X", + "graceful-fs": "4.X", + "source-map": "~0.6.0", + "strip-bom-string": "1.X", + "through2": "2.X" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "gulp-uglify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-2.1.2.tgz", + "integrity": "sha1-bbhbHQ7mPRgFhZK2WGSdZcLsRUE=", + "dev": true, + "requires": { + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash": "^4.13.1", + "make-error-cause": "^1.1.1", + "through2": "^2.0.0", + "uglify-js": "~2.8.10", + "uglify-save-license": "^0.4.1", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "http-errors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "statuses": "1" + } + }, + "http-parser-js": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + }, + "imagemin": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-5.3.1.tgz", + "integrity": "sha1-8Zwu7h5xumxlWMUV+fyWaAGJptQ=", + "dev": true, + "requires": { + "file-type": "^4.1.0", + "globby": "^6.1.0", + "make-dir": "^1.0.0", + "p-pipe": "^1.1.0", + "pify": "^2.3.0", + "replace-ext": "^1.0.0" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + } + } + }, + "imagemin-gifsicle": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/imagemin-gifsicle/-/imagemin-gifsicle-5.2.0.tgz", + "integrity": "sha512-K01m5QuPK+0en8oVhiOOAicF7KjrHlCZxS++mfLI2mV/Ksfq/Y9nCXCWDz6jRv13wwlqe5T7hXT+ji2DnLc2yQ==", + "dev": true, + "optional": true, + "requires": { + "exec-buffer": "^3.0.0", + "gifsicle": "^3.0.0", + "is-gif": "^1.0.0" + } + }, + "imagemin-jpegtran": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/imagemin-jpegtran/-/imagemin-jpegtran-5.0.2.tgz", + "integrity": "sha1-5ogiY7j3kW/duABkDPddLpcNKtY=", + "dev": true, + "optional": true, + "requires": { + "exec-buffer": "^3.0.0", + "is-jpg": "^1.0.0", + "jpegtran-bin": "^3.0.0" + } + }, + "imagemin-optipng": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-5.2.1.tgz", + "integrity": "sha1-0i2kEsCfX/AKQzmWC5ioix2+hpU=", + "dev": true, + "optional": true, + "requires": { + "exec-buffer": "^3.0.0", + "is-png": "^1.0.0", + "optipng-bin": "^3.0.0" + } + }, + "imagemin-svgo": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-5.2.4.tgz", + "integrity": "sha512-1bNZdlWVKdfxzu0xDD1pWjwK/G8FLcztUh/GWaI7xLgCFrn0j35o+uBbY7VcdY2AmKgiLYTXhrzrbkQk6xj8aA==", + "dev": true, + "optional": true, + "requires": { + "is-svg": "^2.0.0", + "svgo": "^0.7.0" + } + }, + "in-publish": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", + "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip-regex": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", + "integrity": "sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0=", + "dev": true, + "optional": true + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-bzip2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-bzip2/-/is-bzip2-1.0.0.tgz", + "integrity": "sha1-XuWOqlounIDiFAe+3yOuWsCRs/w=", + "dev": true, + "optional": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true, + "optional": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "optional": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-gif": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-gif/-/is-gif-1.0.0.tgz", + "integrity": "sha1-ptKumIkwB7/6l6HYwB1jIFgyCX4=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-gzip": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-gzip/-/is-gzip-1.0.0.tgz", + "integrity": "sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM=", + "dev": true, + "optional": true + }, + "is-jpg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-jpg/-/is-jpg-1.0.1.tgz", + "integrity": "sha1-KW1X/dmc4BBDSnKD40armhA16XU=", + "dev": true, + "optional": true + }, + "is-natural-number": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-2.1.1.tgz", + "integrity": "sha1-fUxXKDd+84bD4ZSpkRv1fG3DNec=", + "dev": true, + "optional": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true, + "optional": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-png": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz", + "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", + "dev": true, + "optional": true + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true, + "optional": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true, + "optional": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true, + "optional": true + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true, + "optional": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "optional": true + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-tar": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-tar/-/is-tar-1.0.0.tgz", + "integrity": "sha1-L2suF5LB9bs2UZrKqdZcDSb+hT0=", + "dev": true, + "optional": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true, + "optional": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "dev": true, + "optional": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "is-zip": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-zip/-/is-zip-1.0.0.tgz", + "integrity": "sha1-R7Co/004p2QxzP2ZqOFaTIa6IyU=", + "dev": true, + "optional": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jpegtran-bin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz", + "integrity": "sha1-9g7PSumZwL2tLp+83ytvCYHnops=", + "dev": true, + "optional": true, + "requires": { + "bin-build": "^2.0.0", + "bin-wrapper": "^3.0.0", + "logalot": "^2.0.0" + } + }, + "js-base64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", + "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "jshint": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.2.tgz", + "integrity": "sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA==", + "dev": true, + "requires": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.11", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" + }, + "dependencies": { + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + } + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true, + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lazy-req": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz", + "integrity": "sha1-va6+rTD42CQDnODOFJ1Nqge6H6w=", + "dev": true, + "optional": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "livereload-js": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "dev": true, + "requires": { + "lodash._bindcallback": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash.restparam": "^3.0.0" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true, + "optional": true + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "logalot": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", + "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", + "dev": true, + "optional": true, + "requires": { + "figures": "^1.3.5", + "squeak": "^1.0.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "optional": true + }, + "lpad-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", + "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", + "dev": true, + "optional": true, + "requires": { + "get-stdin": "^4.0.1", + "indent-string": "^2.1.0", + "longest": "^1.0.0", + "meow": "^3.3.0" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "requires": { + "make-error": "^1.2.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true, + "optional": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memoizee": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", + "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.45", + "es6-weak-map": "^2.0.2", + "event-emitter": "^0.3.5", + "is-promise": "^2.1", + "lru-queue": "0.1", + "next-tick": "1", + "timers-ext": "^0.1.5" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "dev": true + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "dev": true, + "requires": { + "mime-db": "1.40.0" + } + }, + "mini-lr": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz", + "integrity": "sha1-AhmdJzR5U9H9HW297UJh8Yey0PY=", + "dev": true, + "requires": { + "body-parser": "~1.14.0", + "debug": "^2.2.0", + "faye-websocket": "~0.7.2", + "livereload-js": "^2.2.0", + "parseurl": "~1.3.0", + "qs": "~2.2.3" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natives": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", + "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "node-notifier": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", + "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", + "dev": true, + "requires": { + "growly": "^1.3.0", + "is-wsl": "^1.1.0", + "semver": "^5.5.0", + "shellwords": "^0.1.1", + "which": "^1.3.0" + } + }, + "node-sass": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", + "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "dev": true, + "requires": { + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash": "^4.17.11", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.13.2", + "node-gyp": "^3.8.0", + "npmlog": "^4.0.0", + "request": "^2.88.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "globule": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", + "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "node-status-codes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", + "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=", + "dev": true, + "optional": true + }, + "node.extend": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", + "dev": true, + "requires": { + "has": "^1.0.3", + "is": "^3.2.1" + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "optional": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true, + "optional": true + }, + "optipng-bin": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-3.1.4.tgz", + "integrity": "sha1-ldNPLEiHBPb9cGBr/qDGWfHZXYQ=", + "dev": true, + "optional": true, + "requires": { + "bin-build": "^2.0.0", + "bin-wrapper": "^3.0.0", + "logalot": "^2.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-filter-obj": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-1.0.3.tgz", + "integrity": "sha1-WRUzDZDs7VV9LZOKMcbdIU2cY60=", + "dev": true, + "optional": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "optional": true + }, + "p-pipe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", + "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", + "dev": true + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "optional": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, + "optional": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true, + "optional": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "optional": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "dev": true + } + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true, + "optional": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "^1.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "^5.0.2", + "postcss-message-helpers": "^2.0.0", + "reduce-css-calc": "^1.2.6" + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "^1.0.5", + "postcss": "^5.0.13", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "^5.0.11", + "postcss-value-parser": "^3.1.2" + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "^5.0.16" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz", + "integrity": "sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.10", + "postcss-value-parser": "^3.1.1" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "^1.5.2", + "caniuse-api": "^1.5.2", + "postcss": "^5.0.4", + "postcss-selector-parser": "^2.2.2", + "vendors": "^1.0.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "^5.0.12", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.2", + "postcss-value-parser": "^3.0.2", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.2", + "has": "^1.0.1", + "postcss": "^5.0.14", + "postcss-selector-parser": "^2.0.0" + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "^5.0.5" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^1.4.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.8", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "dev": true, + "requires": { + "is-svg": "^2.0.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3", + "svgo": "^0.7.0" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true, + "optional": true + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz", + "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz", + "integrity": "sha1-EIirr53MCuWuRbcJ5sa1iIsjkjw=", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true, + "optional": true + } + } + }, + "raw-body": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", + "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", + "dev": true, + "requires": { + "bytes": "2.4.0", + "iconv-lite": "0.4.13", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", + "dev": true + } + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "rcfinder": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz", + "integrity": "sha1-8+gPOH3fmugK4wpBADKWQuroERU=", + "dev": true, + "requires": { + "lodash.clonedeep": "^4.3.2" + } + }, + "rcloader": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.2.2.tgz", + "integrity": "sha1-WNIpi0YtC5v9ITPSoex0+9cFxxc=", + "dev": true, + "requires": { + "lodash.assign": "^4.2.0", + "lodash.isobject": "^3.0.2", + "lodash.merge": "^4.6.0", + "rcfinder": "^0.1.6" + } + }, + "read-all-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", + "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", + "dev": true, + "optional": true, + "requires": { + "pinkie-promise": "^2.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "optional": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass-graph": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^7.0.0" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "dev": true, + "requires": { + "js-base64": "^2.1.8", + "source-map": "^0.4.2" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "seek-bzip": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", + "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.8.1" + } + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "semver-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz", + "integrity": "sha1-kqSWkGX5xwxpR1PVUkj8aPj2Usk=", + "dev": true, + "optional": true + }, + "semver-truncate": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", + "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", + "dev": true, + "optional": true, + "requires": { + "semver": "^5.3.0" + } + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true, + "optional": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "optional": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "optional": true + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "squeak": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", + "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^1.0.0", + "console-stream": "^0.1.1", + "lpad-align": "^1.0.1" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stat-mode": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz", + "integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI=", + "dev": true, + "optional": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stdout-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-combiner": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", + "dev": true, + "requires": { + "duplexer": "~0.1.1", + "through": "~2.3.4" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "optional": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "optional": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true, + "optional": true + }, + "streamqueue": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-0.0.6.tgz", + "integrity": "sha1-ZvX17JTpuK8knkrsLdH3Qb/pTeM=", + "dev": true, + "requires": { + "readable-stream": "^1.0.26-2" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "dev": true, + "optional": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "optional": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, + "strip-dirs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz", + "integrity": "sha1-lgu9EoeETzl1pFWKoQOoJV4kVqA=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^1.0.0", + "get-stdin": "^4.0.1", + "is-absolute": "^0.1.5", + "is-natural-number": "^2.0.0", + "minimist": "^1.1.0", + "sum-up": "^1.0.1" + }, + "dependencies": { + "is-absolute": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz", + "integrity": "sha1-hHSREZ/MtftDYhfMc39/qtUPYD8=", + "dev": true, + "optional": true, + "requires": { + "is-relative": "^0.1.0" + } + }, + "is-relative": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz", + "integrity": "sha1-kF/uiuhvRbPsYUvDwVyGnfCHboI=", + "dev": true, + "optional": true + } + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "optional": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "optional": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "sum-up": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sum-up/-/sum-up-1.0.3.tgz", + "integrity": "sha1-HGYfZnBX9jvLeHWqFDi8FiUlFW4=", + "dev": true, + "optional": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "svgo": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "dev": true, + "requires": { + "coa": "~1.0.1", + "colors": "~1.1.2", + "csso": "~2.3.1", + "js-yaml": "~3.7.0", + "mkdirp": "~0.5.1", + "sax": "~1.2.1", + "whet.extend": "~0.9.9" + } + }, + "tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "optional": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "optional": true, + "requires": { + "once": "^1.4.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true, + "optional": true + }, + "tempfile": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", + "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", + "dev": true, + "optional": true, + "requires": { + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "through2-concurrent": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/through2-concurrent/-/through2-concurrent-1.1.1.tgz", + "integrity": "sha1-EctOpMnjG8puTB5tukjRxyjDUks=", + "dev": true, + "requires": { + "through2": "^2.0.0" + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "optional": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timed-out": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", + "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=", + "dev": true, + "optional": true + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true, + "optional": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "optional": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "true-case-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", + "dev": true, + "requires": { + "glob": "^7.1.2" + } + }, + "try-json-parse": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/try-json-parse/-/try-json-parse-0.1.1.tgz", + "integrity": "sha1-jbAWIuh35RuDFAyu58gIZK05DII=", + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz", + "integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw==", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true, + "optional": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-save-license": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/uglify-save-license/-/uglify-save-license-0.4.1.tgz", + "integrity": "sha1-lXJsF8xv0XHDYX479NjYKqjEzOE=", + "dev": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "unzip-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", + "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=", + "dev": true, + "optional": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "optional": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-regex": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", + "integrity": "sha1-260eDJ4p4QXdCx8J9oYvf9tIJyQ=", + "dev": true, + "optional": true, + "requires": { + "ip-regex": "^1.0.1" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vendors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", + "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-assign": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/vinyl-assign/-/vinyl-assign-1.2.1.tgz", + "integrity": "sha1-TRmIkbVRWRHXcajNnFSApGoHSkU=", + "dev": true, + "optional": true, + "requires": { + "object-assign": "^4.0.1", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "ware": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz", + "integrity": "sha1-0bFPOdLiy0q4xAmPdW/ksWTkc9Q=", + "dev": true, + "optional": true, + "requires": { + "wrap-fn": "^0.1.0" + } + }, + "websocket-driver": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", + "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0 <0.4.11", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrap-fn": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/wrap-fn/-/wrap-fn-0.1.5.tgz", + "integrity": "sha1-8htuQQFv9KfjFyDbxjoJAWvfmEU=", + "dev": true, + "optional": true, + "requires": { + "co": "3.1.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "optional": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/js/tabulator/package.json b/js/tabulator/package.json new file mode 100644 index 0000000..23ec185 --- /dev/null +++ b/js/tabulator/package.json @@ -0,0 +1,64 @@ +{ + "name": "tabulator-tables", + "version": "4.4.3", + "description": "Interactive table generation JavaScript library", + "main": "dist/js/tabulator.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/olifolkerd/tabulator.git" + }, + "keywords": [ + "table", + "grid", + "datagrid", + "tabulator", + "editable", + "cookie", + "sort", + "format", + "resizable", + "list", + "scrollable", + "ajax", + "json", + "widget", + "jquery", + "react", + "angular", + "vue" + ], + "author": "Oli Folkerd", + "license": "MIT", + "bugs": { + "url": "https://github.com/olifolkerd/tabulator/issues" + }, + "homepage": "http://tabulator.info/", + "devDependencies": { + "babel-preset-env": "^1.4.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-2": "^6.24.1", + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^3.1.1", + "gulp-babel": "^6.1.2", + "gulp-cache": "^0.4.6", + "gulp-concat": "^2.6.1", + "gulp-cssnano": "^2.1.2", + "gulp-imagemin": "^3.2.0", + "gulp-include": "^2.3.1", + "gulp-insert": "^0.5.0", + "gulp-jshint": "^2.0.4", + "gulp-livereload": "^3.8.1", + "gulp-notify": "^3.0.0", + "gulp-plumber": "^1.1.0", + "gulp-rename": "^1.2.2", + "gulp-sass": "^3.1.0", + "gulp-sourcemaps": "^2.6.0", + "gulp-uglify": "^2.1.2", + "gulp-util": "^3.0.8", + "jshint": "^2.9.4" + } +} diff --git a/js/tabulator/src/js/cell.js b/js/tabulator/src/js/cell.js new file mode 100644 index 0000000..4bfed89 --- /dev/null +++ b/js/tabulator/src/js/cell.js @@ -0,0 +1,737 @@ + +//public row object +var CellComponent = function (cell){ + this._cell = cell; +}; + +CellComponent.prototype.getValue = function(){ + return this._cell.getValue(); +}; + +CellComponent.prototype.getOldValue = function(){ + return this._cell.getOldValue(); +}; + +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.edit = function(force){ + return this._cell.edit(force); +}; + +CellComponent.prototype.cancelEdit = function(){ + this._cell.cancelEdit(); +}; + + +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(column, row){ + + this.table = column.table; + this.column = column; + this.row = row; + this.element = null; + this.value = null; + this.oldValue = null; + + this.height = null; + this.width = null; + this.minWidth = null; + + this.build(); +}; + +//////////////// Setup Functions ///////////////// + +//generate element +Cell.prototype.build = function(){ + this.generateElement(); + + this.setWidth(); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); +}; + +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(); + + //set text alignment + element.style.textAlign = 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){ + 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){ + 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(){ + 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); + } + + this.table.options.cellEdited.call(this.table, component); + + this.table.options.dataEdited.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(); + } + + this._generateContents(); + this._generateTooltip(); + + //set resizable handles + if(this.table.options.resizableColumns && this.table.modExists("resizeColumns")){ + this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + //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.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 = ""; +}; + +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.delete = function(){ + this.element.parentNode.removeChild(this.element); + 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(){ + 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(){ + 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(){ + + nextCell = self.row.findPrevEditableCell(index); + + if(nextCell){ + nextCell.edit(); + return true; + }else{ + return false; + } + }, + right:function(){ + nextCell = self.row.findNextEditableCell(index); + + if(nextCell){ + nextCell.edit(); + return true; + }else{ + return false; + } + }, + up:function(){ + var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); + + if(nextRow){ + nextRow.cells[index].edit(); + } + }, + down:function(){ + 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(){ + return new CellComponent(this); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/column.js b/js/tabulator/src/js/column.js new file mode 100644 index 0000000..987b8c0 --- /dev/null +++ b/js/tabulator/src/js/column.js @@ -0,0 +1,1279 @@ + +//public column object +var ColumnComponent = function (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(){ + 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(){ + 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.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; +}; + + + +var Column = function(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.groupElement = this.createGroupElement(); //column group holder element + this.isGroup = false; + this.tooltip = false; //hold column tooltip + this.hozAlign = ""; //horizontal text alignment + + //multi dimensional filed handling + this.field =""; + this.fieldStructure = ""; + this.getFieldValue = ""; + this.setFieldValue = ""; + + 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.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._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(); +}; + +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(){ + Object.keys(this.definition).forEach((key) => { + if(this.defaultOptionList.indexOf(key) === -1){ + console.warn("Invalid column definition option in '" + (this.field || this.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._setNesteData : 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") + } +}; + +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); + } + + + //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 self = this, + def = self.definition, + table = self.table, + sortable; + + //set column sorter + if(table.modExists("sort")){ + table.modules.sort.initializeColumn(self, self.contentElement); + } + + //set column formatter + if(table.modExists("format")){ + table.modules.format.initializeColumn(self); + } + + //set column editor + if(typeof def.editor != "undefined" && table.modExists("edit")){ + table.modules.edit.initializeColumn(self); + } + + //set colum validator + if(typeof def.validator != "undefined" && table.modExists("validate")){ + table.modules.validate.initializeColumn(self); + } + + + //set column mutator + if(table.modExists("mutator")){ + table.modules.mutator.initializeColumn(self); + } + + //set column accessor + if(table.modExists("accessor")){ + table.modules.accessor.initializeColumn(self); + } + + //set respoviveLayout + if(typeof table.options.responsiveLayout && table.modExists("responsiveLayout")){ + table.modules.responsiveLayout.initializeColumn(self); + } + + //set column visibility + if(typeof def.visible != "undefined"){ + if(def.visible){ + self.show(true); + }else{ + self.hide(true); + } + } + + //asign additional css classes to column header + if(def.cssClass){ + var classeNames = def.cssClass.split(" "); + classeNames.forEach(function(className) { + self.element.classList.add(className) + }); + } + + if(def.field){ + this.element.setAttribute("tabulator-field", def.field); + } + + //set min width if present + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(def.minWidth)); + + self.reinitializeWidth(); + + //set tooltip if present + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; + + //set orizontal text alignment + self.hozAlign = typeof(self.definition.align) == "undefined" ? "" : self.definition.align; +}; + +Column.prototype._buildColumnHeaderContent = function(){ + var self = this, + def = self.definition, + table = self.table; + + var contentElement = document.createElement("div"); + contentElement.classList.add("tabulator-col-content"); + + contentElement.appendChild(self._buildColumnHeaderTitle()); + + 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 formatter, contents, params, mockCell; + + if(this.definition.titleFormatter && this.table.modExists("format")){ + + formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); + + mockCell = { + getValue:function(){ + return title; + }, + getElement:function(){ + return el; + } + }; + + params = this.definition.titleFormatterParams || {}; + + params = typeof params === "function" ? params() : params; + + contents = formatter.call(this.table.modules.format, mockCell, params); + + switch(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(){ + this.element.classList.add("tabulator-col-group"); + this.element.setAttribute("role", "columngroup"); + this.element.setAttribute("aria-title", this.definition.title); + + 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(let 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._setNesteData = function(data, value){ + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for(let i = 0; i < length; i++){ + + if(i == length -1){ + dataObj[structure[i]] = value; + }else{ + if(!dataObj[structure[i]]){ + dataObj[structure[i]] = {}; + } + + 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(); + }); +}; + +//// 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.persistentLayout && this.table.modExists("responsiveLayout", true)){ + 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(); + } + } +}; + +//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.persistentLayout && this.table.modExists("persistence", true)){ + 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(); + } + } +}; + +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"; + } +}; + +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); + + 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(){ + // return this.element.offsetWidth; + return this.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.delete = function(){ + if(this.isGroup){ + this.columns.forEach(function(column){ + column.delete(); + }); + } + + var cellCount = this.cells.length; + + for(let i = 0; i < cellCount; i++){ + this.cells[0].delete(); + } + + this.element.parentNode.removeChild(this.element); + + this.table.columnManager.deregisterColumn(this); +}; + +//////////////// 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.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", +"width", +"minWidth", +"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", +"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", +"editableTitle", +"titleFormatter", +"titleFormatterParams", +"headerFilter", +"headerFilterPlaceholder", +"headerFilterParams", +"headerFilterEmptyCheck", +"headerFilterFunc", +"headerFilterFuncParams", +"headerFilterLiveFilter", +"print", +]; + +//////////////// Event Bindings ///////////////// + +//////////////// Object Generation ///////////////// +Column.prototype.getComponent = function(){ + return new ColumnComponent(this); +}; diff --git a/js/tabulator/src/js/column_manager.js b/js/tabulator/src/js/column_manager.js new file mode 100644 index 0000000..4719c52 --- /dev/null +++ b/js/tabulator/src/js/column_manager.js @@ -0,0 +1,678 @@ +var ColumnManager = function(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 = [], + row, sorter; + + if(data && data.length){ + + row = data[0]; + + for(var key in row){ + let col = { + field:key, + title:key, + }; + + let value = row[key]; + + switch(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); + } + + 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(); + } + + 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()); + } + } + + 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.columnVertAlign, minHeight); + }); + + self.rowManager.adjustTableSize(); +}; + +//////////////// Column Details ///////////////// + +ColumnManager.prototype.findColumn = function(subject){ + var self = this; + + if(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 + let 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 matches = []; + + Object.keys(this.columnsByField).forEach((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){ + + 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.columnMoved){ + this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); + } + + if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ + this.table.modules.persistence.save("columns"); + } +}; + +ColumnManager.prototype._moveColumnInArray = function(columns, from, to, after, updateRows){ + var fromIndex = columns.indexOf(from), + toIndex; + + 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){ + + this.table.rowManager.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 left = 0, + offset = 0, + adjust = 0, + colEl = column.getElement(); + + return new Promise((resolve, reject) => { + + if(typeof position === "undefined"){ + position = this.table.options.scrollToColumnPosition; + } + + if(typeof ifVisible === "undefined"){ + ifVisible = this.table.options.scrollToColumnIfVisible; + } + + if(column.visible){ + + //align to correct position + switch(position){ + case "middle": + case "center": + adjust = -this.element.clientWidth / 2; + break; + + case "right": + adjust = colEl.clientWidth - this.headersElement.clientWidth; + break; + } + + //check column visibility + if(!ifVisible){ + + offset = colEl.offsetLeft; + + if(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){ + return false; + } + } + + //calculate scroll position + left = colEl.offsetLeft + this.element.scrollLeft + adjust; + + left = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0); + + this.table.rowManager.scrollHorizontal(left); + this.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 column = this._addColumn(definition, before, nextToColumn); + + this._reIndexColumns(); + + 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); + } + + this.redraw(); + + if(this.table.modules.layout.getMode() != "fitColumns"){ + column.reinitializeWidth(); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); +}; + +//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.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(this.table.modules.layout.getMode() == "fitColumns"){ + 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.persistentLayout && this.table.modExists("persistence", true)){ + this.table.modules.persistence.save("columns"); + } + + if(this.table.modExists("columnCalcs")){ + this.table.modules.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); + + + +}; diff --git a/js/tabulator/src/js/core.js b/js/tabulator/src/js/core.js new file mode 100644 index 0000000..7fe4c57 --- /dev/null +++ b/js/tabulator/src/js/core.js @@ -0,0 +1,1902 @@ +'use strict'; + +/*=include polyfills.js */ + +/*=include column_manager.js */ +/*=include column.js */ +/*=include row_manager.js */ +/*=include row.js */ +/*=include cell.js */ +/*=include footer_manager.js */ + +var Tabulator = function(element, options){ + + this.options = {}; + + this.columnManager = null; // hold Column Manager + this.rowManager = null; //hold Row Manager + this.footerManager = null; //holder Footer Manager + this.browser = ""; //hold current browser type + this.browserSlow = false; //handle reduced functionality for slower browsers + + this.modules = {}; //hold all modules bound to this table + + 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 + + layout:"fitData", ///layout type "fitColumns" | "fitData" + layoutColumnsOnNewData:false, //update column widths on setData + + columnMinWidth:40, //minimum global width for a column + columnVertAlign:"top", //vertical alignment of column headers + + resizableColumns:true, //resizable columns + resizableRows:false, //resizable rows + autoResize:true, //auto resize table + + columns:[],//store for colum header info + + data:[], //default starting data + + autoColumns:false, //build columns from data row structure + + 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 + + footerElement:false, //hold footer element + + index:"id", //filed for row index + + 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 + clipboardCopySelector:"active", //method of chosing which data is coppied to the clipboard + clipboardCopyFormatter:"table", //convert data to a clipboard string + clipboardPasteParser:"table", //convert pasted clipboard data to rows + clipboardPasteAction:"insert", //how to insert pasted data into the table + clipboardCopyConfig:false, //clipboard config + + clipboardCopied:function(){}, //data has been copied to the clipboard + clipboardPasted:function(){}, //data has been pasted into the table + clipboardPasteError:function(){}, //data has not successfully been pasted into the table + + downloadDataFormatter:false, //function to manipulate table data before it is downloaded + downloadReady:function(data, blob){return blob;}, //function to manipulate download data + downloadComplete:false, //function to manipulate download data + downloadConfig:false, //download config + + dataTree:false, //enable data tree + 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(){}, //row has been expanded + dataTreeRowCollapsed:function(){}, //row has been collapsed + + printAsHtml:false, //enable print as html + printFormatter:false, //printing page formatter + printHeader:false, //page header contents + printFooter:false, //page footer contents + printCopyStyle:true, //enable print as html styling + printVisibleRows:true, //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(data, row){return true;}, //check wheather row is selectable + + 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 + + persistentLayout:false, //store column layout in memory + persistentSort:false, //store sorting in memory + persistentFilter:false, //store filters in memory + persistenceID:"", //key for persistent storage + persistenceMode:true, //mode for storing persistence information + + 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 + 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, + + groupHeader:false, //header generation function + + 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 + movableRowsSender:false, + movableRowsReceiver:"insert", + movableRowsSendingStart:function(){}, + movableRowsSent:function(){}, + movableRowsSentFailed:function(){}, + movableRowsSendingStop:function(){}, + movableRowsReceivingStart:function(){}, + movableRowsReceived:function(){}, + movableRowsReceivedFailed:function(){}, + movableRowsReceivingStop:function(){}, + + scrollToRowPosition:"top", + scrollToRowIfVisible:true, + + scrollToColumnPosition:"left", + scrollToColumnIfVisible:true, + + rowFormatter:false, + + placeholder:false, + + //table building callbacks + tableBuilding:function(){}, + tableBuilt:function(){}, + + //render callbacks + renderStarted:function(){}, + renderComplete:function(){}, + + //row callbacks + rowClick:false, + rowDblClick:false, + rowContext:false, + rowTap:false, + rowDblTap:false, + rowTapHold:false, + rowMouseEnter:false, + rowMouseLeave:false, + rowMouseOver:false, + rowMouseOut:false, + rowMouseMove:false, + rowAdded:function(){}, + rowDeleted:function(){}, + rowMoved:function(){}, + rowUpdated:function(){}, + rowSelectionChanged:function(){}, + rowSelected:function(){}, + rowDeselected:function(){}, + rowResized:function(){}, + + //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(){}, + cellEdited:function(){}, + cellEditCancelled:function(){}, + + //column callbacks + columnMoved:false, + columnResized:function(){}, + columnTitleChanged:function(){}, + columnVisibilityChanged:function(){}, + + //HTML iport callbacks + htmlImporting:function(){}, + htmlImported:function(){}, + + //data callbacks + dataLoading:function(){}, + dataLoaded:function(){}, + dataEdited:function(){}, + + //ajax callbacks + ajaxRequesting:function(){}, + ajaxResponse:false, + ajaxError:function(){}, + + //filtering callbacks + dataFiltering:false, + dataFiltered:false, + + //sorting callbacks + dataSorting:function(){}, + dataSorted:function(){}, + + //grouping callbacks + groupToggleElement:"arrow", + groupClosedShowCalcs:false, + dataGrouping:function(){}, + dataGrouped:false, + groupVisibilityChanged:function(){}, + groupClick:false, + groupDblClick:false, + groupContext:false, + groupTap:false, + groupDblTap:false, + groupTapHold:false, + + columnCalcs:true, + + //pagination callbacks + pageLoaded:function(){}, + + //localization callbacks + localized:function(){}, + + //validation has failed + validationFailed:function(){}, + + //history callbacks + historyUndo:function(){}, + historyRedo:function(){}, + +}; + +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] = []; + }else if(typeof this.defaultOptions[key] === "object"){ + this.options[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; + } + +}; + + +//convert depricated functionality to new functions +Tabulator.prototype._mapDepricatedFunctionality = function(){ + +}; + +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(); + + 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); + + 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 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; + } + + this.columnManager.initialize(); + this.rowManager.initialize(); + + this._detectBrowser(); + + if(this.modExists("layout", true)){ + mod.layout.initialize(options.layout); + } + + //set localization + if(options.headerFilterPlaceholder !== false){ + mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for(let 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.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)){ + mod.persistence.initialize(options.persistenceMode, options.persistenceID); + } + + if(options.persistentLayout && this.modExists("persistence", true)){ + options.columns = mod.persistence.load("columns", options.columns) ; + } + + 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.persistentSort || options.initialSort) && this.modExists("sort", true)){ + var sorters = []; + + if(options.persistentSort && this.modExists("persistence", true)){ + 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.persistentFilter || options.initialFilter) && this.modExists("filter", true)){ + var filters = []; + + + if(options.persistentFilter && this.modExists("persistence", true)){ + 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((item) => { + + var column = this.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); + + if(self.options.pagination == "local"){ + 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().then(()=>{}).catch(()=>{}); + }else{ + self.rowManager.setData(self.options.data); + } + } + }else{ + if(self.options.ajaxURL){ + self.modules.page.setPage(1).then(()=>{}).catch(()=>{}); + }else{ + self.rowManager.setData([]); + } + } + }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().then(()=>{}).catch(()=>{}); + }else{ + self.rowManager.setData(self.options.data); + } + } + } +}; + +//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; + + 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; + } +}; + +////////////////// Data Handling ////////////////// + +//loca data from local file +Tabulator.prototype.setDataFromLocalFile = function(extensions){ + + return new Promise((resolve, reject) => { + var input = document.createElement("input"); + input.type = "file"; + input.accept = extensions || ".json,application/json"; + + input.addEventListener("change", (e) => { + var file = input.files[0], + reader = new FileReader(), + data; + + reader.readAsText(file); + + reader.onload = (e) => { + + try { + data = JSON.parse(reader.result); + } catch(e) { + console.warn("File Load Error - File contents is invalid JSON", e); + reject(e); + return; + } + + this._setData(data) + .then((data) => { + resolve(data); + }) + .catch((err) => { + resolve(err); + }); + }; + + reader.onerror = (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); +}; + +Tabulator.prototype._setData = function(data, params, config, inPosition){ + 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); + }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); + 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); + } + } + } + }else{ + if(data){ + //asume data is already an object + return self.rowManager.setData(data, inPosition); + }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); + return self.modules.page.setPage(1); + }else{ + return self.modules.ajax.loadData(inPosition); + } + + }else{ + //empty data + return self.rowManager.setData([], inPosition); + } + } + } +}; + +//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){ + return this.rowManager.getData(active); +}; + +//get table data array count +Tabulator.prototype.getDataCount = function(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("htmlTableExport", true)){ + return this.modules.htmlTableExport.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 self = this; + var responses = 0; + + return new Promise((resolve, reject) => { + if(this.modExists("ajax")){ + this.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(()=>{ + 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){ + return new Promise((resolve, reject) => { + if(this.modExists("ajax")){ + this.modules.ajax.blockActiveRequest(); + } + + if(typeof data === "string"){ + data = JSON.parse(data); + } + + if(data){ + this.rowManager.addRows(data, pos, index) + .then((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 self = this, + rows = [], + responses = 0; + + return new Promise((resolve, reject) => { + if(this.modExists("ajax")){ + this.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(()=>{ + responses--; + rows.push(row.getComponent()); + + if(!responses){ + resolve(rows); + } + }); + }else{ + self.rowManager.addRows(item) + .then((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){ + return new Promise((resolve, reject) => { + var row = this.rowManager.findRow(index); + + if(row){ + row.delete() + .then(() => { + resolve(); + }) + .catch((err) => { + reject(err); + }); + + }else{ + console.warn("Delete Error - No matching row found:", index); + reject("Delete Error - No matching row found") + } + }); +}; + +//add row to table +Tabulator.prototype.addRow = function(data, pos, index){ + return new Promise((resolve, reject) => { + if(typeof data === "string"){ + data = JSON.parse(data); + } + + this.rowManager.addRows(data, pos, index) + .then((rows)=>{ + //recalc column calculations if present + if(this.modExists("columnCalcs")){ + this.modules.columnCalcs.recalc(this.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }); + }); +}; + +//update a row if it exitsts otherwise create it +Tabulator.prototype.updateOrAddRow = function(index, data){ + return new Promise((resolve, reject) => { + var row = this.rowManager.findRow(index); + + if(typeof data === "string"){ + data = JSON.parse(data); + } + + if(row){ + row.updateData(data) + .then(()=>{ + //recalc column calculations if present + if(this.modExists("columnCalcs")){ + this.modules.columnCalcs.recalc(this.rowManager.activeRows); + } + + resolve(row.getComponent()); + }) + .catch((err)=>{ + reject(err); + }); + }else{ + row = this.rowManager.addRows(data) + .then((rows)=>{ + //recalc column calculations if present + if(this.modExists("columnCalcs")){ + this.modules.columnCalcs.recalc(this.rowManager.activeRows); + } + + resolve(rows[0].getComponent()); + }) + .catch((err)=>{ + reject(err); + }); + } + }); +}; + +//update row data +Tabulator.prototype.updateRow = function(index, data){ + return new Promise((resolve, reject) => { + var row = this.rowManager.findRow(index); + + if(typeof data === "string"){ + data = JSON.parse(data); + } + + if(row){ + row.updateData(data).then(()=>{ + resolve(row.getComponent()); + }) + .catch((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){ + return new Promise((resolve, reject) => { + var row = this.rowManager.findRow(index); + + if(row){ + this.rowManager.scrollToRow(row, position, ifVisible) + .then(()=>{ + resolve(); + }) + .catch((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){ + 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, selectorParams, formatter, formatterParams){ + if(this.modExists("clipboard", true)){ + this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); + } +}; + +/////////////// 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 column = this.columnManager.findColumn(field); + + this.columnManager.addColumn(definition, before, column) +}; + +Tabulator.prototype.deleteColumn = function(field){ + var column = this.columnManager.findColumn(field); + + if(column){ + column.delete(); + }else{ + console.warn("Column Delete Error - No matching column found:", field); + return false; + } +}; + +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){ + + return new Promise((resolve, reject) => { + var column = this.columnManager.findColumn(field); + + if(column){ + this.columnManager.scrollToColumn(column, position, ifVisible) + .then(()=>{ + resolve(); + }) + .catch((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.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){ + if(this.modExists("filter", true)){ + this.modules.filter.setFilter(field, type, value); + this.rowManager.filterRefresh(); + } +}; + +//add filter to array +Tabulator.prototype.addFilter = function(field, type, value){ + if(this.modExists("filter", true)){ + this.modules.filter.addFilter(field, type, value); + 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.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(); + } +}; + +///////////////////// Filtering //////////////////// +Tabulator.prototype.selectRow = function(rows){ + if(this.modExists("selectRow", true)){ + 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(); + } +}; + +//////////// 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((resolve, reject) => { reject() }); + } +}; + +Tabulator.prototype.setPageToRow = function(row){ + return new Promise((resolve, reject) => { + if(this.options.pagination && this.modExists("page")){ + row = this.rowManager.findRow(row); + + if(row){ + this.modules.page.setPageToRow(row) + .then(()=>{ + resolve(); + }) + .catch(()=>{ + 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(()=>{}).catch(()=>{}); + }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"); + }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"); + }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"); + }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() + } +} + +///////////////// Column Calculation Functions /////////////// +Tabulator.prototype.getCalcResults = function(){ + if(this.modExists("columnCalcs", true)){ + return this.modules.columnCalcs.getResults(); + }else{ + return false; + } +}; + +/////////////// 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; + } +}; + +/////////////// Download Management ////////////// + +Tabulator.prototype.download = function(type, filename, options){ + if(this.modExists("download", true)){ + this.modules.download.download(type, filename, options); + } +}; + +Tabulator.prototype.downloadToTab = function(type, filename, options){ + if(this.modExists("download", true)){ + this.modules.download.download(type, filename, options, 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 == "object"){ + for(let 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(el){ + return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); + }, + + elOffset: function(el){ + var box = el.getBoundingClientRect(); + + return { + top: box.top + window.pageYOffset - document.documentElement.clientTop, + left: box.left + window.pageXOffset - document.documentElement.clientLeft + }; + }, + + deepClone: function(obj){ + var clone = Array.isArray(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]); + } + } + else{ + clone[i] = obj[i]; + } + } + return clone; + } +}; + +Tabulator.prototype.comms = { + tables:[], + register:function(table){ + Tabulator.prototype.comms.tables.push(table); + }, + deregister:function(table){ + var index = Tabulator.prototype.comms.tables.indexOf(table); + + if(index > -1){ + Tabulator.prototype.comms.tables.splice(index, 1); + } + }, + lookupTable:function(query){ + 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{ + console.warn("Table Connection Error - Invalid Selector", query); + } + + return results; + }, + matchElement:function(element){ + return Tabulator.prototype.comms.tables.find(function(table){ + return element instanceof Tabulator ? table === element : table.element === element; + }); + } +}; + +/*=include modules/layout.js */ +/*=include modules/localize.js */ +/*=include modules/comms.js */ diff --git a/js/tabulator/src/js/core_modules.js b/js/tabulator/src/js/core_modules.js new file mode 100644 index 0000000..4d2e328 --- /dev/null +++ b/js/tabulator/src/js/core_modules.js @@ -0,0 +1,16 @@ +;(function (global, factory) { + if(typeof exports === 'object' && typeof module !== 'undefined'){ + module.exports = factory(); + }else if(typeof define === 'function' && define.amd){ + define(factory); + }else{ + global.Tabulator = factory(); + } +}(this, (function () { + + /*=include core.js */ + /*=include modules_enabled.js */ + + return Tabulator; + +}))); \ No newline at end of file diff --git a/js/tabulator/src/js/footer_manager.js b/js/tabulator/src/js/footer_manager.js new file mode 100644 index 0000000..d2bd50f --- /dev/null +++ b/js/tabulator/src/js/footer_manager.js @@ -0,0 +1,93 @@ +var FooterManager = function(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(); + }); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/jquery_wrapper.js b/js/tabulator/src/js/jquery_wrapper.js new file mode 100644 index 0000000..1f63d33 --- /dev/null +++ b/js/tabulator/src/js/jquery_wrapper.js @@ -0,0 +1,49 @@ +/* + * 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', 'jquery-ui', 'tabulator'], factory); + } + else if(typeof module !== 'undefined' && module.exports) { + module.exports = factory( + require('jquery'), + require('jquery-ui'), + require('tabulator') + ); + } + else { + factory(jQuery); + } + }(function ($, undefined, Tabulator) { + $.widget("ui.tabulator", { + _create:function(){ + this.table = new Tabulator(this.element[0], this.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(option, value){ + console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); + }, + + _destroy: function(option, value){ + this.table.destroy(); + }, + }); + })); diff --git a/js/tabulator/src/js/modules/accessor.js b/js/tabulator/src/js/modules/accessor.js new file mode 100644 index 0000000..b0cb780 --- /dev/null +++ b/js/tabulator/src/js/modules/accessor.js @@ -0,0 +1,93 @@ +var Accessor = function(table){ + this.table = table; //hold Tabulator object + this.allowedTypes = ["", "data", "download", "clipboard"] //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){ + 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(dataIn, type){ + var self = this, + key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); + + //clone data object with deep copy to isolate internal data from returned result + var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); + + self.table.columnManager.traverse(function(column){ + var value, accessor, params, component; + + if(column.modules.accessor){ + + accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; + + if(accessor){ + value = column.getFieldValue(data); + + if(value != "undefined"){ + component = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); + } + } + } + }); + + return data; +}, + +//default accessors +Accessor.prototype.accessors = {}; + + + +Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/ajax.js b/js/tabulator/src/js/modules/ajax.js new file mode 100644 index 0000000..ebd7bf7 --- /dev/null +++ b/js/tabulator/src/js/modules/ajax.js @@ -0,0 +1,468 @@ +var Ajax = function(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(let 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(let 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(let 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){ + var self = this; + + if(this.progressiveLoad){ + return this._loadDataProgressive(); + }else{ + return this._loadDataStandard(inPosition); + } +}; + +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(()=>{}).catch(()=>{}); + } + } +}; + +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){ + return new Promise((resolve, reject)=>{ + this.sendRequest(inPosition) + .then((data)=>{ + this.table.rowManager.setData(data, inPosition) + .then(()=>{ + resolve(); + }) + .catch((e)=>{ + reject(e) + }); + }) + .catch((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 === "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 self = this, + url = self.url, + requestNo, esc, query; + + self.requestOrder ++; + requestNo = self.requestOrder; + + self._loadDefaultConfig(); + + return new Promise((resolve, reject)=>{ + if(self.table.options.ajaxRequesting.call(this.table, self.url, self.params) !== false){ + + self.loading = true; + + if(!silent){ + self.showLoader(); + } + + this.loaderPromise(url, self.config, self.params).then((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); + }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"); + } + + self.hideLoader(); + + self.loading = false; + }) + .catch((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(); + }); + }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 += "?" + this.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(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((response)=>{ + if(response.ok) { + response.json() + .then((data)=>{ + resolve(data); + }).catch((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((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(url, config, params){ + return JSON.stringify(params); + }, + }, + "form":{ + headers:{ + }, + body:function(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); diff --git a/js/tabulator/src/js/modules/calculation_colums.js b/js/tabulator/src/js/modules/calculation_colums.js new file mode 100644 index 0000000..1f872fd --- /dev/null +++ b/js/tabulator/src/js/modules/calculation_colums.js @@ -0,0 +1,470 @@ +var ColumnCalcs = function(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.headersElement.after(this.topElement); + 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){ + var hozAdjust = 0, + scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; + + if(this.botInitialized){ + 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.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 data = []; + + rows.forEach(function(row){ + data.push(row.getData()); + }); + + 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); + + if(self.table.modExists("mutator")){ + self.table.modules.mutator.enable(); + } + + row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); + row.type = "calc"; + + 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.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(values, data, calcParams){ + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2 + + if(values.length){ + output = values.reduce(function(sum, value){ + value = Number(value); + return sum + value; + }); + + output = output / values.length; + + output = precision !== false ? output.toFixed(precision) : output; + } + + return parseFloat(output).toString(); + }, + "max":function(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(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(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(values, data, calcParams){ + var output = 0; + + if(values.length){ + output = values.reduce(function(sum, value){ + return String(sum) + String(value); + }); + } + + return output; + }, + "count":function(values, data, calcParams){ + var output = 0; + + if(values.length){ + values.forEach(function(value){ + if(value){ + output ++; + } + }); + } + + return output; + }, +}; + + + +Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); diff --git a/js/tabulator/src/js/modules/clipboard.js b/js/tabulator/src/js/modules/clipboard.js new file mode 100644 index 0000000..7079b67 --- /dev/null +++ b/js/tabulator/src/js/modules/clipboard.js @@ -0,0 +1,1004 @@ +var Clipboard = function(table){ + this.table = table; + this.mode = true; + this.copySelector = false; + this.copySelectorParams = {}; + this.copyFormatter = false; + this.copyFormatterParams = {}; + this.pasteParser = function(){}; + this.pasteAction = function(){}; + this.htmlElement = false; + this.config = {}; + + this.blocked = true; //block copy actions not originating from this command +}; + +Clipboard.prototype.initialize = function(){ + var self = this; + + this.mode = this.table.options.clipboard; + + if(this.mode === true || this.mode === "copy"){ + this.table.element.addEventListener("copy", function(e){ + var data; + + self.processConfig(); + + if(!self.blocked){ + e.preventDefault(); + + data = self.generateContent(); + + if (window.clipboardData && window.clipboardData.setData) { + window.clipboardData.setData('Text', data); + } else if (e.clipboardData && e.clipboardData.setData) { + e.clipboardData.setData('text/plain', data); + if(self.htmlElement){ + e.clipboardData.setData('text/html', self.htmlElement.outerHTML); + } + } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { + e.originalEvent.clipboardData.setData('text/plain', data); + if(self.htmlElement){ + e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); + } + } + + self.table.options.clipboardCopied.call(this.table, data); + + self.reset(); + } + }); + } + + if(this.mode === true || this.mode === "paste"){ + this.table.element.addEventListener("paste", function(e){ + self.paste(e); + }); + } + + this.setPasteParser(this.table.options.clipboardPasteParser); + this.setPasteAction(this.table.options.clipboardPasteAction); +}; + +Clipboard.prototype.processConfig = function(){ + var config = { + columnHeaders:"groups", + rowGroups:true, + columnCalcs:true, + }; + + if(typeof this.table.options.clipboardCopyHeader !== "undefined"){ + config.columnHeaders = this.table.options.clipboardCopyHeader; + console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); + } + + if(this.table.options.clipboardCopyConfig){ + for(var key in this.table.options.clipboardCopyConfig){ + config[key] = this.table.options.clipboardCopyConfig[key]; + } + } + + if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ + this.config.rowGroups = true; + } + + if(config.columnHeaders){ + if((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ + this.config.columnHeaders = "groups"; + }else{ + this.config.columnHeaders = "columns"; + } + }else{ + this.config.columnHeaders = false; + } + + if (config.columnCalcs && this.table.modExists("columnCalcs")){ + this.config.columnCalcs = true; + } +}; + + +Clipboard.prototype.reset = function(){ + this.blocked = false; + this.originalSelectionText = ""; +}; + + +Clipboard.prototype.setPasteAction = function(action){ + + switch(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){ + 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.copy = function(selector, selectorParams, formatter, formatterParams, internal){ + var range, sel, textRange; + this.blocked = false; + + if(this.mode === true || this.mode === "copy"){ + + if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { + range = document.createRange(); + range.selectNodeContents(this.table.element); + sel = window.getSelection(); + + if(sel.toString() && internal){ + selector = "userSelection"; + formatter = "raw"; + selectorParams = 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(); + } + + this.setSelector(selector); + this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; + this.setFormatter(formatter); + this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; + + document.execCommand('copy'); + + if(sel){ + sel.removeAllRanges(); + } + } +}; + +Clipboard.prototype.setSelector = function(selector){ + selector = selector || this.table.options.clipboardCopySelector; + + switch(typeof selector){ + case "string": + if(this.copySelectors[selector]){ + this.copySelector = this.copySelectors[selector]; + }else{ + console.warn("Clipboard Error - No such selector found:", selector); + } + break; + + case "function": + this.copySelector = selector; + break; + } +}; + +Clipboard.prototype.setFormatter = function(formatter){ + + formatter = formatter || this.table.options.clipboardCopyFormatter; + + switch(typeof formatter){ + case "string": + if(this.copyFormatters[formatter]){ + this.copyFormatter = this.copyFormatters[formatter]; + }else{ + console.warn("Clipboard Error - No such formatter found:", formatter); + } + break; + + case "function": + this.copyFormatter = formatter; + break; + } +}; + + +Clipboard.prototype.generateContent = function(){ + var data; + + this.htmlElement = false; + data = this.copySelector.call(this, this.config, this.copySelectorParams); + + return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); +}; + +Clipboard.prototype.generateSimpleHeaders = function(columns){ + var headers = []; + + columns.forEach(function(column){ + headers.push(column.definition.title); + }); + + return headers; +}; + +Clipboard.prototype.generateColumnGroupHeaders = function(columns){ + var output = []; + + this.table.columnManager.columns.forEach((column) => { + var colData = this.processColumnGroup(column); + + if(colData){ + output.push(colData); + } + }); + + return output; +}; + +Clipboard.prototype.processColumnGroup = function(column){ + var subGroups = column.columns; + + var groupData = { + type:"group", + title:column.definition.title, + column:column, + }; + + if(subGroups.length){ + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach((subGroup) => { + var subGroupData = this.processColumnGroup(subGroup); + + if(subGroupData){ + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + } + }); + + if(!groupData.width){ + return false; + } + }else{ + if(column.field && (column.definition.clipboard || (column.visible && column.definition.clipboard !== false))){ + groupData.width = 1; + }else{ + return false; + } + } + + return groupData; +}; + +Clipboard.prototype.groupHeadersToRows = function(columns){ + + var headers = []; + + function parseColumnGroup(column, level){ + + if(typeof headers[level] === "undefined"){ + headers[level] = []; + } + + headers[level].push(column.title); + + if(column.subGroups){ + column.subGroups.forEach(function(subGroup){ + parseColumnGroup(subGroup, level+1); + }); + }else{ + padColumnheaders(); + } + } + + function padColumnheaders(){ + var max = 0; + + headers.forEach(function(title){ + var len = title.length; + if(len > max){ + max = len; + } + }); + + headers.forEach(function(title){ + var len = title.length; + if(len < max){ + for(var i = len; i < max; i++){ + title.push(""); + } + } + }); + } + + columns.forEach(function(column){ + parseColumnGroup(column,0); + }); + + return headers; +}; + +Clipboard.prototype.rowsToData = function(rows, columns, config, params){ + var data = []; + + rows.forEach(function(row){ + var rowArray = [], + rowData = row instanceof RowComponent ? row.getData("clipboard") : row; + + columns.forEach(function(column){ + var value = column.getFieldValue(rowData); + + switch(typeof value){ + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + rowArray.push(value); + }); + + data.push(rowArray); + }); + + return data; +}; + +Clipboard.prototype.buildComplexRows = function(config){ + var output = [], + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach((group) => { + output.push(this.processGroupData(group)); + }); + + return output; +}; + + + +Clipboard.prototype.processGroupData = function(group){ + var subGroups = group.getSubGroups(); + + var groupData = { + type:"group", + key:group.key + }; + + if(subGroups.length){ + groupData.subGroups = []; + + subGroups.forEach((subGroup) => { + groupData.subGroups.push(this.processGroupData(subGroup)); + }); + }else{ + groupData.rows = group.getRows(true); + } + + return groupData; +}; + +Clipboard.prototype.getCalcRow = function (calcs, columns, selector, pos){ + var calcData = calcs[selector]; + + if(calcData){ + if(pos){ + calcData = calcData[pos]; + } + + if(Object.keys(calcData).length){ + return this.rowsToData([calcData], columns); + } + } + + return []; +}; + + +Clipboard.prototype.buildOutput = function(rows, config, params){ + var output = [], + calcs, + columns = []; + + if(config.columnHeaders == "groups"){ + columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); + + output = output.concat(this.groupHeadersToRows(columns)); + }else{ + this.table.columnManager.columnsByIndex.forEach(function(column){ + if(column.definition.clipboard || (column.visible && column.definition.clipboard !== false)){ + columns.push(column); + } + }) + + output.push(this.generateSimpleHeaders(columns)); + } + + if(this.config.columnCalcs){ + calcs = this.table.getCalcResults(); + } + + //generate styled content + if(this.table.options.clipboardCopyStyled){ + this.generateHTML(rows, columns, calcs, config, params); + } + + //generate unstyled content + if(config.rowGroups){ + rows.forEach((row) => { + output = output.concat(this.parseRowGroupData(row, columns, config, params, calcs || {})); + }); + }else{ + if(config.columnCalcs){ + output = output.concat(this.getCalcRow(calcs, columns, "top")); + } + + output = output.concat(this.rowsToData(rows, columns, config, params)); + + if(config.columnCalcs){ + output = output.concat(this.getCalcRow(calcs, columns, "bottom")); + } + } + + return output; +}; + + +Clipboard.prototype.parseRowGroupData = function (group, columns, config, params, calcObj){ + var groupData = []; + + groupData.push([group.key]); + + if(group.subGroups){ + group.subGroups.forEach((subGroup) => { + groupData = groupData.concat(this.parseRowGroupData(subGroup, config, params, calcObj[group.key] ? calcObj[group.key].groups || {} : {})); + }); + }else{ + if(config.columnCalcs){ + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "top")); + } + + groupData = groupData.concat(this.rowsToData(group.rows, columns, config, params)); + + if(config.columnCalcs){ + groupData = groupData.concat(this.getCalcRow(calcObj, columns, group.key, "bottom")); + } + } + + return groupData; +}; + + +Clipboard.prototype.generateHTML = function (rows, columns, calcs, config, params){ + var self = this, + data = [], + headers = [], body, oddRow, evenRow, calcRow, firstRow, firstCell, firstGroup, lastCell, styleCells; + + //create table element + this.htmlElement = document.createElement("table"); + self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); + + function generateSimpleHeaders(){ + var headerEl = document.createElement("tr"); + + columns.forEach(function(column){ + var columnEl = document.createElement("th"); + columnEl.innerHTML = column.definition.title; + + self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); + } + + + function generateHeaders(headers){ + + var headerHolderEl = document.createElement("thead"); + + headers.forEach(function(columns){ + var headerEl = document.createElement("tr"); + + columns.forEach(function(column){ + var columnEl = document.createElement("th"); + + if(column.width > 1){ + columnEl.colSpan = column.width; + } + + if(column.height > 1){ + columnEl.rowSpan = column.height; + } + + columnEl.innerHTML = column.title; + + self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerEl.appendChild(columnEl); + }); + + self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + headerHolderEl.appendChild(headerEl); + }); + + self.htmlElement.appendChild(headerHolderEl); + + } + + function parseColumnGroup(column, level){ + + if(typeof headers[level] === "undefined"){ + headers[level] = []; + } + + headers[level].push({ + title:column.title, + width:column.width, + height:1, + children:!!column.subGroups, + element:column.column.getElement(), + }); + + if(column.subGroups){ + column.subGroups.forEach(function(subGroup){ + parseColumnGroup(subGroup, level+1); + }); + } + } + + function padVerticalColumnheaders(){ + headers.forEach(function(row, index){ + row.forEach(function(header){ + if(!header.children){ + header.height = headers.length - index; + } + }); + }); + } + + function addCalcRow(calcs, selector, pos){ + var calcData = calcs[selector]; + + if(calcData){ + if(pos){ + calcData = calcData[pos]; + } + + if(Object.keys(calcData).length){ + // calcRowIndexs.push(body.length); + processRows([calcData]); + } + } + } + + //create headers if needed + if(config.columnHeaders){ + if(config.columnHeaders == "groups"){ + columns.forEach(function(column){ + parseColumnGroup(column,0); + }); + + padVerticalColumnheaders(); + generateHeaders(headers); + }else{ + generateSimpleHeaders(); + } + } + + // columns = this.table.columnManager.columnsByIndex; + + //create table body + body = document.createElement("tbody"); + + //lookup row styles + if(window.getComputedStyle){ + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if(firstRow){ + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + function processRows(rowArray){ + //add rows to table + rowArray.forEach(function(row, i){ + var rowEl = document.createElement("tr"), + styleRow = firstRow, + isCalc = false, + rowData; + + if(row instanceof RowComponent){ + rowData = row.getData("clipboard"); + }else{ + rowData = row; + isCalc = true; + } + + + columns.forEach(function(column, j){ + var cellEl = document.createElement("td"), + value = column.getFieldValue(rowData); + + switch(typeof value){ + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + cellEl.innerHTML = value; + + if(column.definition.align){ + cellEl.style.textAlign = column.definition.align; + } + + if(j < columns.length - 1){ + if(firstCell){ + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + }else{ + if(firstCell){ + self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + } + } + + rowEl.appendChild(cellEl); + }); + + if(isCalc){ + styleRow = calcRow; + }else{ + if(!(i % 2) && oddRow){ + styleRow = oddRow; + } + + if((i % 2) && evenRow){ + styleRow = evenRow; + } + } + + if(styleRow){ + self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + } + + body.appendChild(rowEl); + }); + } + + function processGroup(group, calcObj){ + var groupEl = document.createElement("tr"), + groupCellEl = document.createElement("td"); + + groupCellEl.colSpan = columns.length; + + groupCellEl.innerHTML = group.key; + + groupEl.appendChild(groupCellEl); + body.appendChild(groupEl); + + self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + + if(group.subGroups){ + group.subGroups.forEach((subGroup) => { + processGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + }else{ + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "top"); + } + + processRows(group.rows); + + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "bottom"); + } + } + + } + + if(config.rowGroups){ + rows.forEach((group) => { + processGroup(group, calcs || {}); + }); + }else{ + if(config.columnCalcs){ + addCalcRow(calcs, "top"); + } + + processRows(rows); + + if(config.columnCalcs){ + addCalcRow(calcs, "bottom"); + } + } + + this.htmlElement.appendChild(body); +}; + +Clipboard.prototype.mapElementStyles = function(from, to, props){ + + var lookup = { + "background-color" : "backgroundColor", + "color" : "fontColor", + "font-weight" : "fontWeight", + "font-family" : "fontFamily", + "font-size" : "fontSize", + "border-top" : "borderTop", + "border-left" : "borderLeft", + "border-right" : "borderRight", + "border-bottom" : "borderBottom", + }; + + if(window.getComputedStyle){ + var fromStyle = window.getComputedStyle(from); + + props.forEach(function(prop){ + to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); + }); + } + + // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; +}; + + +Clipboard.prototype.copySelectors = { + userSelection: function(config, params){ + return params; + }, + selected: function(config, params){ + var rows = []; + + if(this.table.modExists("selectRow", true)){ + rows = this.table.modules.selectRow.getSelectedRows(); + } + + if(config.rowGroups){ + console.warn("Clipboard Warning - select coptSelector does not support row groups"); + } + + return this.buildOutput(rows, config, params) + }, + table: function(config, params){ + if(config.rowGroups){ + console.warn("Clipboard Warning - table coptSelector does not support row groups"); + } + + return this.buildOutput(this.table.rowManager.getComponents(), config, params); + }, + active: function(config, params){ + var rows; + + if(config.rowGroups){ + rows = this.buildComplexRows(config); + }else{ + rows = this.table.rowManager.getComponents(true); + } + + return this.buildOutput(rows, config, params); + }, +}; + +Clipboard.prototype.copyFormatters = { + raw: function(data, params){ + return data; + }, + table: function(data, params){ + var output = []; + + data.forEach(function(row){ + row.forEach(function(value){ + if(typeof value == "undefined"){ + value = ""; + } + + value = typeof value == "undefined" || value === null ? "" : value.toString(); + + if(value.match(/\r|\n/)){ + value = value.split('"').join('""'); + value = '"' + value + '"'; + } + }); + + output.push(row.join("\t")); + }); + + return output.join("\n"); + }, +}; + +Clipboard.prototype.pasteParsers = { + table:function(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(rows){ + return this.table.setData(rows); + }, + update:function(rows){ + return this.table.updateOrAddData(rows); + }, + insert:function(rows){ + return this.table.addData(rows); + }, +}; + + + +Tabulator.prototype.registerModule("clipboard", Clipboard); diff --git a/js/tabulator/src/js/modules/comms.js b/js/tabulator/src/js/modules/comms.js new file mode 100644 index 0000000..c5c727e --- /dev/null +++ b/js/tabulator/src/js/modules/comms.js @@ -0,0 +1,45 @@ +var Comms = function(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/js/tabulator/src/js/modules/data_tree.js b/js/tabulator/src/js/modules/data_tree.js new file mode 100644 index 0000000..92b4449 --- /dev/null +++ b/js/tabulator/src/js/modules/data_tree.js @@ -0,0 +1,337 @@ +var DataTree = function(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 === "object" && childArray !== null) ; + + row.modules.dataTree = { + index:0, + open:children ? this.startOpen(row.getComponent(), 0) : false, + controlEl:false, + branchEl:false, + 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){ + config.branchEl.parentNode.removeChild(config.branchEl); + } + + this.generateControlElement(row, el); + + if(config.index){ + if(this.branchEl){ + config.branchEl = this.branchEl.cloneNode(true); + el.insertBefore(config.branchEl, el.firstChild); + config.branchEl.style.marginLeft = (((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1)) + (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 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", (e) => { + e.stopPropagation(); + this.collapseRow(row); + }); + }else{ + config.controlEl = this.expandEl.cloneNode(true); + config.controlEl.addEventListener("click", (e) => { + e.stopPropagation(); + this.expandRow(row); + }); + } + + config.controlEl.addEventListener("mousedown", (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 output = []; + + rows.forEach((row, i) => { + var config, children; + + output.push(row); + + if(row instanceof Row){ + + config = row.modules.dataTree.children; + + if(!config.index && config.children !== false){ + children = this.getChildren(row); + + children.forEach((child) => { + output.push(child); + }); + } + } + }); + + return output; +}; + + +DataTree.prototype.getChildren = function(row){ + 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")){ + children = this.table.modules.filter.filter(config.children); + }else{ + children = config.children; + } + + if(this.table.modExists("sort")){ + this.table.modules.sort.sort(children); + } + + children.forEach((child) => { + output.push(child); + + var subChildren = this.getChildren(child); + + subChildren.forEach((sub) => { + output.push(sub); + }); + }); + } + + return output; +}; + + +DataTree.prototype.generateChildren = function(row){ + var children = []; + + var childArray = row.getData()[this.field]; + + if(!Array.isArray(childArray)){ + childArray = [childArray]; + } + + childArray.forEach((childData) => { + var childRow = new Row(childData || {}, this.table.rowManager); + childRow.modules.dataTree.index = row.modules.dataTree.index + 1; + childRow.modules.dataTree.parent = row; + if(childRow.modules.dataTree.children){ + childRow.modules.dataTree.open = this.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.getTreeChildren = function(row){ + var config = row.modules.dataTree, + output = []; + + if(config.children){ + + if(!Array.isArray(config.children)){ + config.children = this.generateChildren(row); + } + + config.children.forEach((childRow) => { + if(childRow instanceof Row){ + output.push(childRow.getComponent()); + } + }); + } + + return output; +}; + + +DataTree.prototype.checkForRestyle = function(cell){ + if(!cell.row.cells.indexOf(cell)){ + if(cell.row.modules.dataTree.children !== false){ + 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); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/download.js b/js/tabulator/src/js/modules/download.js new file mode 100644 index 0000000..33a3f40 --- /dev/null +++ b/js/tabulator/src/js/modules/download.js @@ -0,0 +1,903 @@ +var Download = function(table){ + this.table = table; //hold Tabulator object + this.fields = {}; //hold filed multi dimension arrays + this.columnsByIndex = []; //hold columns in their order in the table + this.columnsByField = {}; //hold columns with lookup by field name + this.config = {}; +}; + +//trigger file download +Download.prototype.download = function(type, filename, options, interceptCallback){ + var self = this, + downloadFunc = false; + this.processConfig(); + + 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); + } + } + + this.processColumns(); + + if(downloadFunc){ + downloadFunc.call(this, self.processDefinitions(), self.processData() , options || {}, buildLink, this.config); + } +}; + +Download.prototype.processConfig = function(){ + var config = { //download config + columnGroups:true, + rowGroups:true, + columnCalcs:true, + }; + + if(this.table.options.downloadConfig){ + for(var key in this.table.options.downloadConfig){ + config[key] = this.table.options.downloadConfig[key]; + } + } + + if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ + this.config.rowGroups = true; + } + + if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ + this.config.columnGroups = true; + } + + if (config.columnCalcs && this.table.modExists("columnCalcs")){ + this.config.columnCalcs = true; + } +}; + +Download.prototype.processColumns = function () { + var self = this; + + self.columnsByIndex = []; + self.columnsByField = {}; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.field && column.definition.download !== false && (column.visible || (!column.visible && column.definition.download))) { + self.columnsByIndex.push(column); + self.columnsByField[column.field] = column; + } + }); +}; + +Download.prototype.processDefinitions = function(){ + var self = this, + processedDefinitions = []; + + if(this.config.columnGroups){ + self.table.columnManager.columns.forEach(function(column){ + var colData = self.processColumnGroup(column); + + if(colData){ + processedDefinitions.push(colData); + } + }); + }else{ + self.columnsByIndex.forEach(function(column){ + if(column.download !== false){ + //isolate definiton from defintion object + processedDefinitions.push(self.processDefinition(column)); + } + }); + } + + return processedDefinitions; +}; + +Download.prototype.processColumnGroup = function(column){ + var subGroups = column.columns, + maxDepth = 0; + var processedColumn = this.processDefinition(column); + var groupData = { + type:"group", + title:processedColumn.title, + depth:1, + }; + + + if(subGroups.length){ + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach((subGroup) => { + var subGroupData = this.processColumnGroup(subGroup); + + if(subGroupData.depth > maxDepth){ + maxDepth = subGroupData.depth; + } + + if(subGroupData){ + groupData.width += subGroupData.width; + groupData.subGroups.push(subGroupData); + } + }); + + groupData.depth += maxDepth; + + if(!groupData.width){ + return false; + } + }else{ + if(column.field && column.definition.download !== false && (column.visible || (!column.visible && column.definition.download))){ + groupData.width = 1; + groupData.definition = processedColumn; + }else{ + return false; + } + } + + return groupData; +}; + +Download.prototype.processDefinition = function(column){ + var def = {}; + + for(var key in column.definition){ + def[key] = column.definition[key]; + } + + if(typeof column.definition.downloadTitle != "undefined"){ + def.title = column.definition.downloadTitle; + } + + return def; +}; + +Download.prototype.processData = function(){ + var self = this, + data = [], + groups = [], + calcs = {}; + + if(this.config.rowGroups){ + groups = this.table.modules.groupRows.getGroups(); + + groups.forEach((group) => { + data.push(this.processGroupData(group)); + }); + }else{ + data = self.table.rowManager.getData(true, "download"); + } + + if(this.config.columnCalcs){ + calcs = this.table.getCalcResults(); + + data = { + calcs: calcs, + data: data, + }; + } + + //bulk data processing + if(typeof self.table.options.downloadDataFormatter == "function"){ + data = self.table.options.downloadDataFormatter(data); + } + + return data; +}; + +Download.prototype.processGroupData = function(group){ + var subGroups = group.getSubGroups(); + + var groupData = { + type:"group", + key:group.key + }; + + if(subGroups.length){ + groupData.subGroups = []; + + subGroups.forEach((subGroup) => { + groupData.subGroups.push(this.processGroupData(subGroup)); + }); + }else{ + groupData.rows = group.getData(true, "download"); + } + + return groupData; +}; + +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(); + } + } + +}; + +//nested field lookup +Download.prototype.getFieldValue = function(field, data){ + var column = this.columnsByField[field]; + + if(column){ + return column.getFieldValue(data); + } + + return false; +}; + + +Download.prototype.commsReceived = function(table, action, data){ + switch(action){ + case "intercept": + this.download(data.type, "", data.options, data.intercept); + break; + } +}; + + +//downloaders +Download.prototype.downloaders = { + csv:function(columns, data, options, setFileContents, config){ + var self = this, + titles = [], + fields = [], + delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents, output; + + //build column headers + function parseSimpleTitles(){ + columns.forEach(function(column){ + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.field); + }); + } + + function parseColumnGroup(column, level){ + if(column.subGroups){ + column.subGroups.forEach(function(subGroup){ + parseColumnGroup(subGroup, level+1); + }); + }else{ + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.definition.field); + } + } + + if(config.columnGroups){ + console.warn("Download Warning - CSV downloader cannot process column groups"); + + columns.forEach(function(column){ + parseColumnGroup(column,0); + }); + }else{ + parseSimpleTitles(); + } + + + //generate header row + fileContents = [titles.join(delimiter)]; + + function parseRows(data){ + //generate each row of the table + data.forEach(function(row){ + var rowData = []; + + fields.forEach(function(field){ + var value = self.getFieldValue(field, row); + + switch(typeof value){ + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + //escape quotation marks + rowData.push('"' + String(value).split('"').join('""') + '"'); + }); + + fileContents.push(rowData.join(delimiter)); + }); + } + + function parseGroup(group){ + if(group.subGroups){ + group.subGroups.forEach(function(subGroup){ + parseGroup(subGroup); + }); + }else{ + parseRows(group.rows); + } + } + + if(config.columnCalcs){ + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + if(config.rowGroups){ + console.warn("Download Warning - CSV downloader cannot process row groups"); + + data.forEach(function(group){ + parseGroup(group); + }); + }else{ + parseRows(data); + } + + output = fileContents.join("\n"); + + if(options.bom){ + output = "\ufeff" + output; + } + + setFileContents(output, "text/csv"); + }, + + json:function(columns, data, options, setFileContents, config){ + var fileContents; + + if(config.columnCalcs){ + console.warn("Download Warning - CSV downloader cannot process column calculations"); + data = data.data; + } + + fileContents = JSON.stringify(data, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + pdf:function(columns, data, options, setFileContents, config){ + var self = this, + fields = [], + header = [], + body = [], + calcs = {}, + headerDepth = 1, + table = "", + 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(config.columnCalcs){ + calcs = data.calcs; + data = data.data; + } + + if(!jsPDFParams.orientation){ + jsPDFParams.orientation = options.orientation || "landscape"; + } + + if(!jsPDFParams.unit){ + jsPDFParams.unit = "pt"; + } + + //build column headers + function parseSimpleTitles(){ + columns.forEach(function(column){ + if(column.field){ + header.push(column.title || ""); + fields.push(column.field); + } + }); + + header = [header]; + } + + function parseColumnGroup(column, level){ + var colSpan = column.width, + rowSpan = 1, + col = { + content:column.title || "", + }; + + if(column.subGroups){ + column.subGroups.forEach(function(subGroup){ + parseColumnGroup(subGroup, level+1); + }); + rowSpan = 1; + }else{ + fields.push(column.definition.field); + rowSpan = headerDepth - level; + } + + col.rowSpan = rowSpan; + // col.colSpan = colSpan; + + header[level].push(col); + + colSpan--; + + if(rowSpan > 1){ + for(var i = level + 1; i < headerDepth; i++){ + header[i].push(""); + } + } + + for(var i = 0; i < colSpan; i++){ + header[level].push(""); + } + } + + if(config.columnGroups){ + columns.forEach(function(column){ + if(column.depth > headerDepth){ + headerDepth = column.depth; + } + }); + + for(var i=0; i < headerDepth; i++){ + header.push([]); + } + + columns.forEach(function(column){ + parseColumnGroup(column,0); + }); + + }else{ + parseSimpleTitles(); + } + + function parseValue(value){ + switch(typeof value){ + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + return value; + } + + function parseRows(data){ + //build table rows + data.forEach(function(row){ + body.push(parseRow(row)); + }); + } + + function parseRow(row, styles){ + var rowData = []; + + fields.forEach(function(field){ + var value = self.getFieldValue(field, row); + value = parseValue(value); + + if(styles){ + rowData.push({ + content:value, + styles:styles, + }); + }else{ + rowData.push(value); + } + }); + + return rowData; + } + + function parseGroup(group, calcObj){ + var groupData = []; + + groupData.push({content:parseValue(group.key), colSpan:fields.length, styles:rowGroupStyles}); + + body.push(groupData); + + if(group.subGroups){ + group.subGroups.forEach(function(subGroup){ + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + }else{ + + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "bottom"); + } + } + } + + function addCalcRow(calcs, selector, pos){ + var calcData = calcs[selector]; + + if(calcData){ + if(pos){ + calcData = calcData[pos]; + } + + if(Object.keys(calcData).length){ + body.push(parseRow(calcData, rowCalcStyles)); + } + } + } + + if(config.rowGroups){ + data.forEach(function(group){ + parseGroup(group, calcs); + }); + }else{ + if(config.columnCalcs){ + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if(config.columnCalcs){ + addCalcRow(calcs, "bottom"); + } + } + + 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(columns, data, options, setFileContents, config){ + var self = this, + sheetName = options.sheetName || "Sheet1", + workbook = {SheetNames:[], Sheets:{}}, + calcs = {}, + groupRowIndexs = [], + groupColumnIndexs = [], + calcRowIndexs = [], + + output; + + if(config.columnCalcs){ + calcs = data.calcs; + data = data.data; + } + + function generateSheet(){ + var titles = [], + fields = [], + rows = [], + worksheet; + + //convert rows to worksheet + function rowsToSheet(){ + var sheet = {}; + var range = {s: {c:0, r:0}, e: {c:fields.length, r:rows.length }}; + + XLSX.utils.sheet_add_aoa(sheet, rows); + + sheet['!ref'] = XLSX.utils.encode_range(range); + + var merges = generateMerges(); + + if(merges.length){ + sheet["!merges"] = merges; + } + + return sheet; + } + + function parseSimpleTitles(){ + //get field lists + columns.forEach(function(column){ + titles.push(column.title); + fields.push(column.field); + }); + + rows.push(titles); + } + + function parseColumnGroup(column, level){ + + if(typeof titles[level] === "undefined"){ + titles[level] = []; + } + + if(typeof groupColumnIndexs[level] === "undefined"){ + groupColumnIndexs[level] = []; + } + + if(column.width > 1){ + + groupColumnIndexs[level].push({ + type:"hoz", + start:titles[level].length, + end:titles[level].length + column.width - 1, + }); + } + + titles[level].push(column.title); + + if(column.subGroups){ + column.subGroups.forEach(function(subGroup){ + parseColumnGroup(subGroup, level+1); + }); + }else{ + fields.push(column.definition.field); + padColumnTitles(fields.length - 1, level); + + groupColumnIndexs[level].push({ + type:"vert", + start:fields.length - 1, + }); + + } + } + + + function padColumnTitles(){ + var max = 0; + + titles.forEach(function(title){ + var len = title.length; + if(len > max){ + max = len; + } + }); + + titles.forEach(function(title){ + var len = title.length; + if(len < max){ + for(var i = len; i < max; i++){ + title.push(""); + } + } + }); + } + + if(config.columnGroups){ + columns.forEach(function(column){ + parseColumnGroup(column,0); + }); + + titles.forEach(function(title){ + rows.push(title); + }); + }else{ + parseSimpleTitles(); + } + + function generateMerges(){ + var output = []; + + groupRowIndexs.forEach(function(index){ + output.push({s:{r:index,c:0},e:{r:index,c:fields.length - 1}}); + }); + + groupColumnIndexs.forEach(function(merges, level){ + merges.forEach(function(merge){ + if(merge.type === "hoz"){ + output.push({s:{r:level,c:merge.start},e:{r:level,c:merge.end}}); + }else{ + if(level != titles.length - 1){ + output.push({s:{r:level,c:merge.start},e:{r:titles.length - 1,c:merge.start}}); + } + } + }); + }); + + return output; + } + + //generate each row of the table + function parseRows(data){ + data.forEach(function(row){ + rows.push(parseRow(row)); + }); + } + + function parseRow(row){ + var rowData = []; + + fields.forEach(function(field){ + var value = self.getFieldValue(field, row); + rowData.push(!(value instanceof Date) && typeof value === "object" ? JSON.stringify(value) : value); + }); + + return rowData; + } + + + function addCalcRow(calcs, selector, pos){ + var calcData = calcs[selector]; + + if(calcData){ + if(pos){ + calcData = calcData[pos]; + } + + if(Object.keys(calcData).length){ + calcRowIndexs.push(rows.length); + rows.push(parseRow(calcData)); + } + } + } + + function parseGroup(group, calcObj){ + var groupData = []; + + groupData.push(group.key); + + groupRowIndexs.push(rows.length); + + rows.push(groupData); + + if(group.subGroups){ + group.subGroups.forEach(function(subGroup){ + parseGroup(subGroup, calcObj[group.key] ? calcObj[group.key].groups || {} : {}); + }); + }else{ + + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "top"); + } + + parseRows(group.rows); + + if(config.columnCalcs){ + addCalcRow(calcObj, group.key, "bottom"); + } + } + + + } + + if(config.rowGroups){ + data.forEach(function(group){ + parseGroup(group, calcs); + }); + }else{ + if(config.columnCalcs){ + addCalcRow(calcs, "top"); + } + + parseRows(data); + + if(config.columnCalcs){ + addCalcRow(calcs, "bottom"); + } + } + + worksheet = rowsToSheet(); + + 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.table.modules.comms.send(options.sheets[sheet], "download", "intercept",{ + type:"xlsx", + options:{sheetOnly:true}, + intercept:function(data){ + workbook.Sheets[sheet] = data; + } + }); + } + } + }else{ + workbook.SheetNames.push(sheetName); + workbook.Sheets[sheetName] = generateSheet(); + } + + //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"); + }, + +}; + + +Tabulator.prototype.registerModule("download", Download); diff --git a/js/tabulator/src/js/modules/edit.js b/js/tabulator/src/js/modules/edit.js new file mode 100644 index 0000000..ec1e965 --- /dev/null +++ b/js/tabulator/src/js/modules/edit.js @@ -0,0 +1,1716 @@ +var Edit = function(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; +}; + + +//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(){ + var cell = this.currentCell, + cellEl; + + this.invalidEdit = false; + + if(cell){ + this.currentCell = false; + + cellEl = cell.getElement(); + 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(); + cell.setValueActual(cell.getValue()); + + 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(); + + element.setAttribute("tabindex", 0); + + element.addEventListener("click", function(e){ + if(!element.classList.contains("tabulator-editing")){ + element.focus(); + } + }); + + element.addEventListener("mousedown", function(e){ + self.mouseClick = true; + }); + + element.addEventListener("focus", function(e){ + if(!self.recursionBlock){ + self.edit(cell, e, false); + } + }); +}; + +Edit.prototype.focusCellNoEvent = function(cell){ + this.recursionBlock = true; + if(this.table.browser !== "ie"){ + cell.getElement().focus(); + } + this.recursionBlock = false; +}; + +Edit.prototype.editCell = function(cell, forceEdit){ + this.focusCellNoEvent(cell); + this.edit(cell, false, forceEdit); +}; + +Edit.prototype.edit = function(cell, e, forceEdit){ + var self = this, + allowEdit = true, + rendered = function(){}, + 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")){ + valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); + } + + if(valid === true){ + self.clearEditor(); + cell.setValue(value, true); + + if(self.table.options.dataTree && self.table.modExists("dataTree")){ + self.table.modules.dataTree.checkForRestyle(cell); + } + + return true; + }else{ + self.invalidEdit = true; + element.classList.add("tabulator-validation-fail"); + self.focusCellNoEvent(cell); + 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; + + 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; + } +}; + +//default data editors +Edit.prototype.editors = { + + //input element + input:function(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 (let 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(); + 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 13: + onChange(e); + break; + + case 27: + cancel(); + break; + } + }); + + return input; + }, + + //resizable text area element + textarea:function(cell, onRendered, success, cancel, editorParams){ + var self = this, + cellValue = cell.getValue(), + 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 (let 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(); + 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 + } + + 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){ + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, + + //input element with type of number + number:function(cell, onRendered, success, cancel, editorParams){ + + var cellValue = cell.getValue(), + 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 (let 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(e){ + onChange(); + } + + onRendered(function () { + //submit new value on blur + input.removeEventListener("blur", blurFunc); + + input.focus(); + 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; + } + }); + + return input; + }, + + //input element with type of number + range:function(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 (let 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(); + 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(cell, onRendered, success, cancel, editorParams){ + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : (typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : ""), + input = document.createElement("input"), + listEl = document.createElement("div"), + dataItems = [], + displayItems = [], + currentItem = {}, + blurable = true; + + + this.table.rowManager.element.addEventListener("scroll", cancelItem); + + if(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === "object" && !editorParams.values)){ + console.warn("DEPRECATION WANRING - 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; + } + }); + + 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 select lookup list:", field); + } + + return output; + } + + function parseItems(inputValues, curentValue){ + var dataList = []; + var displayList = []; + + function processComplexListItem(item){ + var item = { + label:editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, + value:item.value, + element:false, + }; + + if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + setCurrentItem(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 === "object"){ + + if(value.options){ + item = { + label:value.label, + group:true, + element:false, + }; + + displayList.push(item); + + value.options.forEach(function(item){ + processComplexListItem(item); + }); + }else{ + processComplexListItem(value); + } + + }else{ + + item = { + label:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, + value:value, + element:false, + }; + + if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + setCurrentItem(item); + } + + dataList.push(item); + displayList.push(item); + } + }); + }else{ + for(var key in inputValues){ + var item = { + label:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : 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); + } + + dataList.push(item); + displayList.push(item); + } + } + + dataItems = dataList; + displayItems = displayList; + + fillList(); + } + + function fillList(){ + while(listEl.firstChild) listEl.removeChild(listEl.firstChild); + + displayItems.forEach(function(item){ + var el = item.element; + + if(!el){ + + if(item.group){ + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-group"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + }else{ + el = document.createElement("div"); + el.classList.add("tabulator-edit-select-list-item"); + el.tabIndex = 0; + el.innerHTML = item.label === "" ? " " : item.label; + + el.addEventListener("click", function(){ + setCurrentItem(item); + chooseItem(); + }); + + if(item === currentItem){ + el.classList.add("active"); + } + } + + el.addEventListener("mousedown", function(){ + blurable = false; + + setTimeout(function(){ + blurable = true; + }, 10); + }); + + item.element = el; + + + } + + listEl.appendChild(el); + }); + } + + + function setCurrentItem(item){ + + if(currentItem && currentItem.element){ + currentItem.element.classList.remove("active"); + } + + + currentItem = item; + input.value = item.label === " " ? "" : item.label; + + if(item.element){ + item.element.classList.add("active"); + } + } + + + function chooseItem(){ + hideList(); + + if(initialValue !== currentItem.value){ + initialValue = currentItem.value; + success(currentItem.value); + }else{ + cancel(); + } + } + + function cancelItem(){ + hideList(); + cancel(); + } + + function showList(){ + 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"; + document.body.appendChild(listEl); + } + } + + function hideList(){ + if(listEl.parentNode){ + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //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 (let 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); + } + + //allow key based navigation + input.addEventListener("keydown", function(e){ + var index; + + switch(e.keyCode){ + case 38: //up arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = dataItems.indexOf(currentItem); + + if(index > 0){ + setCurrentItem(dataItems[index - 1]); + } + break; + + case 40: //down arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = dataItems.indexOf(currentItem); + + if(index < dataItems.length - 1){ + if(index == -1){ + setCurrentItem(dataItems[0]); + }else{ + setCurrentItem(dataItems[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; + } + }); + + input.addEventListener("blur", function(e){ + if(blurable){ + cancelItem(); + } + }); + + input.addEventListener("focus", function(e){ + showList(); + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function(){ + input.style.height = "100%"; + input.focus(); + }); + + return input; + }, + + + //autocomplete + autocomplete:function(cell, onRendered, success, cancel, editorParams){ + var self = this, + cellEl = cell.getElement(), + initialValue = cell.getValue(), + 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 = {}, + blurable = true; + + this.table.rowManager.element.addEventListener("scroll", cancelItem); + + 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 parseItems(inputValues, curentValue){ + var itemList = []; + + if(Array.isArray(inputValues)){ + inputValues.forEach(function(value){ + var item = { + title:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, + value:value, + element:false, + }; + + if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ + setCurrentItem(item); + } + + itemList.push(item); + }); + }else{ + for(var key in inputValues){ + var item = { + title:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : 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); + } + + itemList.push(item); + } + } + + if(editorParams.searchFunc){ + itemList.forEach(function(item){ + item.search = { + title:item.title, + value:item.value, + }; + }); + } + + allItems = itemList; + } + + function filterList(term, intialLoad){ + var matches = [], + searchObjs = [], + searchResults = []; + + if(editorParams.searchFunc){ + + allItems.forEach(function(item){ + searchObjs.push(item.search); + }); + + searchResults = editorParams.searchFunc(term, searchObjs); + + searchResults.forEach(function(result){ + var match = allItems.find(function(item){ + return item.search === result; + }); + + if(match){ + matches.push(match); + } + }); + }else{ + if(term === ""){ + + if(editorParams.showListOnEmpty){ + allItems.forEach(function(item){ + matches.push(item); + }); + } + }else{ + allItems.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); + } + } + }); + } + } + + displayItems = matches; + + fillList(intialLoad); + } + + function fillList(intialLoad){ + var current = false; + + while(listEl.firstChild) listEl.removeChild(listEl.firstChild); + + 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(){ + setCurrentItem(item); + chooseItem(); + }); + + el.addEventListener("mousedown", function(){ + 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 setCurrentItem(item, showInputValue){ + if(currentItem && currentItem.element){ + currentItem.element.classList.remove("active"); + } + + currentItem = item; + + if(item && item.element){ + item.element.classList.add("active"); + } + } + + + 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 cancelItem(){ + hideList(); + cancel(); + } + + function showList(){ + if(!listEl.parentNode){ + while(listEl.firstChild) listEl.removeChild(listEl.firstChild); + + if(editorParams.values === true){ + values = getUniqueColumnValues(); + }else if(typeof editorParams.values === "string"){ + values = getUniqueColumnValues(editorParams.values); + }else{ + values = editorParams.values || []; + } + + parseItems(values, initialValue); + + 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 hideList(){ + if(listEl.parentNode){ + listEl.parentNode.removeChild(listEl); + } + + removeScrollListener(); + } + + function removeScrollListener() { + self.table.rowManager.element.removeEventListener("scroll", cancelItem); + } + + //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 (let 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]); + } + } + } + + //allow key based navigation + input.addEventListener("keydown", function(e){ + var index; + + switch(e.keyCode){ + case 38: //up arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = displayItems.indexOf(currentItem); + + if(index > 0){ + setCurrentItem(displayItems[index - 1]); + }else{ + setCurrentItem(false); + } + break; + + case 40: //down arrow + e.stopImmediatePropagation(); + e.stopPropagation(); + e.preventDefault(); + + index = displayItems.indexOf(currentItem); + + 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; + showList(); + input.value = value; + filterList(value, true); + }); + + //style list element + listEl = document.createElement("div"); + listEl.classList.add("tabulator-edit-select-list"); + + onRendered(function(){ + input.style.height = "100%"; + input.focus(); + }); + + return input; + }, + + //start rating + star:function(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); + }); + + 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 (let 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(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 calcVal = (percent * Math.round(bar.offsetWidth / (element.clientWidth/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 (let 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 + bar.style.width = (bar.clientWidth + element.clientWidth/100) + "px"; + break; + + case 37: //left arrow + bar.style.width = (bar.clientWidth - element.clientWidth/100) + "px"; + break; + + case 13: //enter + updateValue(); + break; + + case 27: //escape + cancel(); + break; + + } + }); + + element.addEventListener("blur", function(){ + cancel(); + }); + + return bar; + }, + + //checkbox + tickCross:function(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 (let 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(); + }); + } + + input.checked = value === true || value === "true" || value === "True" || value === 1; + + 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); diff --git a/js/tabulator/src/js/modules/filter.js b/js/tabulator/src/js/modules/filter.js new file mode 100644 index 0000000..75b6e74 --- /dev/null +++ b/js/tabulator/src/js/modules/filter.js @@ -0,0 +1,775 @@ +var Filter = function(table){ + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterElements = []; //hold header filter elements for manipulation + this.headerFilterColumns = []; //hold columns that use header filters + + 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 = "", + 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(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(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(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(data){ + return column.getFieldValue(data) == value; + }; + type = "="; + } + } + + self.headerFilters[field] = {value:value, func:filterFunc, type:type}; + + }else{ + delete self.headerFilters[field]; + } + + 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){ + 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){ + var oldFilterElement = column.modules.filter.headerElement.parentNode; + var oldFilterElementIndex = self.headerFilterElements.indexOf(oldFilterElement); + if (oldFilterElementIndex >= 0) { + self.headerFilterElements.splice(oldFilterElementIndex, 1); + } + + var oldColumnIndex = self.headerFilterColumns.indexOf(oldColumnIndex); + if (oldColumnIndex >= 0) { + self.headerFilterColumns.splice(oldColumnIndex, 1); + } + + column.contentElement.removeChild(oldFilterElement); + } + + 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(){ + return typeof initialValue !== "undefined" ? initialValue : ""; + }, + getField:function(){ + return column.definition.field; + }, + getElement:function(){ + return filterElement; + }, + getColumn:function(){ + return column.getComponent(); + }, + getRow:function(){ + return { + normalizeHeight:function(){ + + } + }; + } + }; + + 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", (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(e){ + if(typingTimer){ + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function(){ + success(editorElement.value); + },300); + }; + + 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); + + self.headerFilterElements.push(editorElement); + 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.headerFilterElements.forEach(function(element){ + element.style.display = 'none'; + }); +}; + +//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) +Filter.prototype.showHeaderFilterElements = function(){ + this.headerFilterElements.forEach(function(element){ + element.style.display = ''; + }); +}; + + +//programatically set value 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()); + } +}; + +//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); + 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); + }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){ + var self = this; + + self.filterList = []; + + if(!Array.isArray(field)){ + field = [{field:field, type:type, value:value}]; + } + + self.addFilter(field); + +}; + +//add filter to array +Filter.prototype.addFilter = function(field, type, value){ + var self = this; + + if(!Array.isArray(field)){ + field = [{field:field, type:type, value:value}]; + } + + field.forEach(function(filter){ + + filter = self.findFilter(filter); + + if(filter){ + self.filterList.push(filter); + + self.changed = true; + } + }); + + if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ + 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(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(data){ + return self.filters[filter.type](filter.value, column.getFieldValue(data)); + } + }else{ + filterFunc = function(data){ + return self.filters[filter.type](filter.value, data[filter.field]); + } + } + + + }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 output = []; + + filterList.forEach((filter) => { + var item; + + if(Array.isArray(filter)){ + output.push(this.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.persistentFilter && this.table.modExists("persistence", true)){ + 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.persistentFilter && this.table.modExists("persistence", true)){ + this.table.modules.persistence.save("filter"); + } +}; + +//clear header filters +Filter.prototype.clearHeaderFilter = function(){ + var self = this; + + this.headerFilters = {}; + + 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(filterVal, rowVal, rowData, filterParams){ + + if(typeof filterVal == "string"){ + filterVal = new RegExp(filterVal); + } + + return filterVal.test(rowVal); + }, + + //contains the string + "like":function(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; + } + } + }, + + //in array + "in":function(filterVal, rowVal, rowData, filterParams){ + if(Array.isArray(filterVal)){ + return filterVal.indexOf(rowVal) > -1; + }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/js/tabulator/src/js/modules/format.js b/js/tabulator/src/js/modules/format.js new file mode 100644 index 0000000..cb88543 --- /dev/null +++ b/js/tabulator/src/js/modules/format.js @@ -0,0 +1,616 @@ +var Format = function(table){ + this.table = table; //hold Tabulator object +}; + +//initialize column formatter +Format.prototype.initializeColumn = function(column){ + var self = this, + config = {params:column.definition.formatterParams || {}}; + + //set column formatter + switch(typeof column.definition.formatter){ + case "string": + + if(column.definition.formatter === "tick"){ + column.definition.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(self.formatters[column.definition.formatter]){ + config.formatter = self.formatters[column.definition.formatter]; + }else{ + console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); + config.formatter = self.formatters.plaintext; + } + break; + + case "function": + config.formatter = column.definition.formatter; + break; + + default: + config.formatter = self.formatters.plaintext; + break; + } + + column.modules.format = config; +}; + +Format.prototype.cellRendered = function(cell){ + if(cell.column.modules.format.renderedCallback){ + cell.column.modules.format.renderedCallback(); + } +}; + +//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){ + cell.column.modules.format.renderedCallback = callback; + } + + return cell.column.modules.format.formatter.call(this, component, params, onRendered); +}; + + +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; +}; + +//get formatter for cell +Format.prototype.getFormatter = function(formatter){ + var formatter; + + switch(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(cell, formatterParams, onRendered){ + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + html:function(cell, formatterParams, onRendered){ + return cell.getValue(); + }, + + //multiline text area + textarea:function(cell, formatterParams, onRendered){ + cell.getElement().style.whiteSpace = "pre-wrap"; + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + money:function(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(cell, formatterParams, onRendered){ + var value = cell.getValue(), + urlPrefix = formatterParams.urlPrefix || "", + 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); + } + + el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); + + return el; + }else{ + return " "; + } + }, + + //image element + image:function(cell, formatterParams, onRendered){ + var el = document.createElement("img"); + el.setAttribute("src", cell.getValue()); + + 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(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(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 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 (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(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(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){ + 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(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); + + return "
" + (legend ? "
" + legend + "
" : ""); + }, + + //background color + color:function(cell, formatterParams, onRendered){ + cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); + return ""; + }, + + //tick icon + buttonTick:function(cell, formatterParams, onRendered){ + return ''; + }, + + //cross icon + buttonCross:function(cell, formatterParams, onRendered){ + return ''; + }, + + //current row number + rownum:function(cell, formatterParams, onRendered){ + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + handle:function(cell, formatterParams, onRendered){ + cell.getElement().classList.add("tabulator-row-handle"); + return "
"; + }, + + responsiveCollapse:function(cell, formatterParams, onRendered){ + var self = this, + open = false, + el = document.createElement("div"); + + function toggleList(isOpen){ + var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; + + open = isOpen; + + if(open){ + el.classList.add("open"); + if(collapse){ + collapse.style.display = ''; + } + }else{ + el.classList.remove("open"); + if(collapse){ + collapse.style.display = 'none'; + } + } + } + + el.classList.add("tabulator-responsive-collapse-toggle"); + el.innerHTML = "+-"; + + cell.getElement().classList.add("tabulator-row-handle"); + + if(self.table.options.responsiveLayoutCollapseStartOpen){ + open = true; + } + + el.addEventListener("click", function(e){ + e.stopImmediatePropagation(); + toggleList(!open); + }); + + toggleList(open); + + return el; + }, + + rowSelection:function(cell){ + var checkbox = document.createElement("input"); + + checkbox.type = 'checkbox'; + + if(this.table.modExists("selectRow", true)){ + + checkbox.addEventListener("click", (e) => { + e.stopPropagation(); + }); + + if(typeof cell.getRow == 'function'){ + var row = cell.getRow(); + + checkbox.addEventListener("change", (e) => { + row.toggleSelect(); + }); + + checkbox.checked = row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); + }else { + checkbox.addEventListener("change", (e) => { + if(this.table.modules.selectRow.selectedRows.length){ + this.table.deselectRow(); + }else { + this.table.selectRow(); + } + }); + + this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); + } + } + return checkbox; + }, +}; + +Tabulator.prototype.registerModule("format", Format); diff --git a/js/tabulator/src/js/modules/frozen_columns.js b/js/tabulator/src/js/modules/frozen_columns.js new file mode 100644 index 0000000..0ced644 --- /dev/null +++ b/js/tabulator/src/js/modules/frozen_columns.js @@ -0,0 +1,238 @@ +var FrozenColumns = function(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.definition.frozen){ + + if(!column.parent.isGroup){ + + + if(!column.isGroup){ + 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{ + console.warn("Frozen Column Error - Column Groups cannot be frozen"); + } + }else{ + console.warn("Frozen Column Error - Grouped columns cannot be frozen"); + } + + }else{ + this.initializationMode = "right"; + } +}; + +//quick layout to smooth horizontal scrolling +FrozenColumns.prototype.scrollHorizontal = function(){ + var rows; + + if(this.active){ + clearTimeout(this.scrollEndTimer); + + //layout all rows after scroll is complete + this.scrollEndTimer = setTimeout(() => { + this.layout(); + }, 100); + + rows = this.table.rowManager.getVisibleRows(); + + this.calcMargins(); + + this.layoutColumnPosition(); + + this.layoutCalcRows(); + + rows.forEach((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){ + this.leftColumns.forEach((column, i) => { + column.modules.frozen.margin = (this._calcSpace(this.leftColumns, i) + this.table.columnManager.scrollLeft) + "px"; + + if(i == this.leftColumns.length - 1){ + column.modules.frozen.edge = true; + }else{ + column.modules.frozen.edge = false; + } + + this.layoutElement(column.getElement(), column); + + if(allCells){ + column.cells.forEach((cell) => { + this.layoutElement(cell.getElement(), column); + }); + } + }); + + this.rightColumns.forEach((column, i) => { + column.modules.frozen.margin = (this.rightPadding - this._calcSpace(this.rightColumns, i + 1)) + "px"; + + if(i == this.rightColumns.length - 1){ + column.modules.frozen.edge = true; + }else{ + column.modules.frozen.edge = false; + } + + this.layoutElement(column.getElement(), column); + + if(allCells){ + column.cells.forEach((cell) => { + this.layoutElement(cell.getElement(), column); + }); + } + }); +} + +//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 rowEl = row.getElement(); + + rowEl.style.paddingLeft = this.leftMargin; + // rowEl.style.paddingRight = this.rightMargin + "px"; + + this.leftColumns.forEach((column) => { + var cell = row.getCell(column); + + if(cell){ + this.layoutElement(cell.getElement(), column); + } + }); + + this.rightColumns.forEach((column) => { + var cell = row.getCell(column); + + if(cell){ + this.layoutElement(cell.getElement(), 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 (let 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/js/tabulator/src/js/modules/frozen_rows.js b/js/tabulator/src/js/modules/frozen_rows.js new file mode 100644 index 0000000..5dbf7cc --- /dev/null +++ b/js/tabulator/src/js/modules/frozen_rows.js @@ -0,0 +1,99 @@ +var FrozenRows = function(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; + + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); + + this.table.rowManager.adjustTableSize(); + + this.rows.splice(index, 1); + + this.table.rowManager.refreshActiveData("display"); + + if(this.rows.length){ + this.styleRows(); + } + + }else{ + console.warn("Freeze Error - Row is already unfrozen"); + } +}; + +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/js/tabulator/src/js/modules/group_rows.js b/js/tabulator/src/js/modules/group_rows.js new file mode 100644 index 0000000..327ce3a --- /dev/null +++ b/js/tabulator/src/js/modules/group_rows.js @@ -0,0 +1,1070 @@ + + +//public group object +var GroupComponent = function (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(){ + 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(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.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(){ + 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-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 level = this.level + 1; + if(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){ + this.groupManager.allowedValues[level].forEach((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(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick){ + self.element.addEventListener("dblclick", function(e){ + self.groupManager.table.options.groupDblClick(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext){ + self.element.addEventListener("contextmenu", function(e){ + self.groupManager.table.options.groupContext(e, self.getComponent()); + }); + } + + 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); +}; + +////////////// 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(){ + return new GroupComponent(this); +}; + +////////////////////////////////////////////////// +////////////// Group Row Extension /////////////// +////////////////////////////////////////////////// + +var GroupRows = function(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(data){ + return column.getFieldValue(data); + }; + }else{ + lookupFunc = function(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.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.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){ + 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/js/tabulator/src/js/modules/history.js b/js/tabulator/src/js/modules/history.js new file mode 100644 index 0000000..8f55c64 --- /dev/null +++ b/js/tabulator/src/js/modules/history.js @@ -0,0 +1,143 @@ +var History = function(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.undo = function(){ + + if(this.index > -1){ + let 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++; + + let 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(action){ + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function(action){ + action.component.deleteActual(); + }, + + rowDelete: function(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(action){ + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); + this.table.rowManager.redraw(); + }, +}; + + +History.prototype.redoers = { + cellEdit: function(action){ + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function(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(action){ + action.component.deleteActual(); + }, + + rowMove: function(action){ + this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); + 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/js/tabulator/src/js/modules/html_table_export.js b/js/tabulator/src/js/modules/html_table_export.js new file mode 100644 index 0000000..9bf5f57 --- /dev/null +++ b/js/tabulator/src/js/modules/html_table_export.js @@ -0,0 +1,371 @@ +var HtmlTableExport = function(table){ + this.table = table; //hold Tabulator object + this.config = {}; + this.cloneTableStyle = true; + this.colVisProp = ""; +}; + +HtmlTableExport.prototype.genereateTable = function(config, style, visible, colVisProp){ + this.cloneTableStyle = style; + this.config = config || {}; + this.colVisProp = colVisProp; + + var headers = this.generateHeaderElements(); + var body = this.generateBodyElements(visible); + + var table = document.createElement("table"); + table.classList.add("tabulator-print-table"); + table.appendChild(headers); + table.appendChild(body); + + this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); + + return table; +}; + + +HtmlTableExport.prototype.generateColumnGroupHeaders = function(){ + var output = []; + + var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; + + columns.forEach((column) => { + var colData = this.processColumnGroup(column); + + if(colData){ + output.push(colData); + } + }); + + return output; +}; + +HtmlTableExport.prototype.processColumnGroup = function(column){ + var subGroups = column.columns, + maxDepth = 0; + + var groupData = { + title:column.definition.title, + column:column, + depth:1, + }; + + if(subGroups.length){ + groupData.subGroups = []; + groupData.width = 0; + + subGroups.forEach((subGroup) => { + var subGroupData = this.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; +}; + + +HtmlTableExport.prototype.groupHeadersToRows = function(columns){ + + var headers = [], headerDepth = 0; + + 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.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); + }); + + return headers; +}; + + +HtmlTableExport.prototype.generateHeaderElements = function(){ + + var headerEl = document.createElement("thead"); + + var rows = this.groupHeadersToRows(this.generateColumnGroupHeaders()); + + rows.forEach((row) => { + var rowEl = document.createElement("tr"); + + this.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + + row.forEach((column) => { + var cellEl = document.createElement("th"); + + cellEl.colSpan = column.width; + cellEl.rowSpan = column.height; + + cellEl.innerHTML = column.column.definition.title; + + if(this.cloneTableStyle){ + cellEl.style.boxSizing = "border-box"; + } + + this.mapElementStyles(column.column.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + this.mapElementStyles(column.column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + + if(column.column.visible){ + this.mapElementStyles(column.column.getElement(), cellEl, ["width"]); + }else{ + if(column.column.definition.width){ + cellEl.style.width = column.column.definition.width + "px"; + } + } + + if(column.column.parent){ + this.mapElementStyles(column.column.parent.groupElement, cellEl, ["border-top"]); + } + + rowEl.appendChild(cellEl); + }); + + headerEl.appendChild(rowEl); + }); + + return headerEl; +}; + +HtmlTableExport.prototype.generateBodyElements = function(visible){ + var oddRow, evenRow, calcRow, firstRow, firstCell, firstGroup, lastCell, styleCells, styleRow; + + //lookup row styles + if(this.cloneTableStyle && window.getComputedStyle){ + oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); + evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); + calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); + firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); + firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; + + if(firstRow){ + styleCells = firstRow.getElementsByClassName("tabulator-cell"); + firstCell = styleCells[0]; + lastCell = styleCells[styleCells.length - 1]; + } + } + + var bodyEl = document.createElement("tbody"); + + var rows = visible ? this.table.rowManager.getVisibleRows(true) : this.table.rowManager.getDisplayRows(); + var columns = []; + + 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); + } + } + + this.table.columnManager.columnsByIndex.forEach((column) => { + if (this.columnVisCheck(column)) { + columns.push(column); + } + }); + + rows = rows.filter((row) => { + switch(row.type){ + case "group": + return this.config.rowGroups !== false; + break; + + case "calc": + return this.config.columnCalcs !== false; + break; + } + + return true; + }); + + if(rows.length > 1000){ + console.warn("It may take a long time to render an HTML table with more than 1000 rows"); + } + + rows.forEach((row, i) => { + var rowData = row.getData(); + + var rowEl = document.createElement("tr"); + rowEl.classList.add("tabulator-print-table-row"); + + switch(row.type){ + case "group": + var cellEl = document.createElement("td"); + cellEl.colSpan = columns.length; + cellEl.innerHTML = row.key; + + rowEl.classList.add("tabulator-print-table-group"); + + this.mapElementStyles(firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + this.mapElementStyles(firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + rowEl.appendChild(cellEl); + break; + + case "calc" : + rowEl.classList.add("tabulator-print-table-calcs"); + + case "row" : + columns.forEach((column) =>{ + var cellEl = document.createElement("td"); + + var value = column.getFieldValue(rowData); + + var cellWrapper = { + getValue:function(){ + return value; + }, + getField:function(){ + return column.defi }, + getElement:function(){ + return cellEl; + }, + getColumn:function(){ + return column.getComponent(); + }, + getData:function(){ + return rowData; + }, + getRow:function(){ + return row.getComponent(); + }, + getComponent:function(){ + return cellWrapper; + }, + column:column, + }; + + if(this.table.modExists("format")){ + value = this.table.modules.format.formatValue(cellWrapper); + }else{ + switch(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(firstCell){ + this.mapElementStyles(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", "text-align"]); + } + + rowEl.appendChild(cellEl); + }); + + + styleRow = row.type == "calc" ? calcRow : (((i % 2) && evenRow) ? evenRow : oddRow); + + this.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + break; + } + + bodyEl.appendChild(rowEl); + }); + + return bodyEl; +}; + +HtmlTableExport.prototype.columnVisCheck = function(column){ + return column.definition[this.colVisProp] !== false && (column.visible || (!column.visible && column.definition[this.colVisProp])); +}; + + +HtmlTableExport.prototype.getHtml = function(visible, style, config){ + var holder = document.createElement("div"); + + holder.appendChild(this.genereateTable(config || this.table.options.htmlOutputConfig, style, visible, "htmlOutput")); + + return holder.innerHTML; +}; + + +HtmlTableExport.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("htmlTableExport", HtmlTableExport); diff --git a/js/tabulator/src/js/modules/html_table_import.js b/js/tabulator/src/js/modules/html_table_import.js new file mode 100644 index 0000000..e60bf0f --- /dev/null +++ b/js/tabulator/src/js/modules/html_table_import.js @@ -0,0 +1,200 @@ +var HtmlTableImport = function(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 == "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); + + for(var i in attributes){ + var attrib = attributes[i], + name; + + if(attrib && typeof attrib == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0){ + + name = attrib.name.replace("tabulator-", ""); + + col[name] = this._attribValue(attrib.value); + } + } + + 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/js/tabulator/src/js/modules/keybindings.js b/js/tabulator/src/js/modules/keybindings.js new file mode 100644 index 0000000..95b6a6c --- /dev/null +++ b/js/tabulator/src/js/modules/keybindings.js @@ -0,0 +1,376 @@ +var Keybindings = function(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(let key in this.bindings){ + mergedBindings[key] = this.bindings[key]; + } + + if(Object.keys(bindings).length){ + + for(let key in bindings){ + mergedBindings[key] = bindings[key]; + } + } + + this.mapBindings(mergedBindings); + this.bindEvents(); + } +}; + +Keybindings.prototype.mapBindings = function(bindings){ + var self = this; + + for(let key in bindings){ + + if(this.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); + } + } +}; + +Keybindings.prototype.mapBinding = function(action, symbolsList){ + var self = this; + + var binding = { + action: this.actions[action], + keys: [], + ctrl: false, + shift: 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; + + 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){ + 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(e){ + e.stopPropagation(); + e.preventDefault(); + }, + scrollPageUp:function(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(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(e){ + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + rowManager.scrollToRow(rowManager.getDisplayRows()[0]); + } + + this.table.element.focus(); + }, + scrollToEnd:function(e){ + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); + } + + this.table.element.focus(); + }, + navPrev:function(e){ + var cell = false; + + if(this.table.modExists("edit")){ + cell = this.table.modules.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().prev(); + } + } + }, + + navNext:function(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){ + 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(newRow) + } + } + + newRow.then(() => { + nav.next(); + }); + } + } + } + } + }, + + navLeft:function(e){ + var cell = false; + + if(this.table.modExists("edit")){ + cell = this.table.modules.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().left(); + } + } + }, + + navRight:function(e){ + var cell = false; + + if(this.table.modExists("edit")){ + cell = this.table.modules.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().right(); + } + } + }, + + navUp:function(e){ + var cell = false; + + if(this.table.modExists("edit")){ + cell = this.table.modules.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().up(); + } + } + }, + + navDown:function(e){ + var cell = false; + + if(this.table.modExists("edit")){ + cell = this.table.modules.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().down(); + } + } + }, + + undo:function(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(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(e){ + if(!this.table.modules.edit.currentCell){ + if(this.table.modExists("clipboard", true)){ + this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); + } + } + }, +}; + + +Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/layout.js b/js/tabulator/src/js/modules/layout.js new file mode 100644 index 0000000..8242659 --- /dev/null +++ b/js/tabulator/src/js/modules/layout.js @@ -0,0 +1,225 @@ +var Layout = function(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); +}; + +//layout render functions +Layout.prototype.modes = { + + //resize columns to fit data the contain + "fitData": function(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 + "fitDataFill": function(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 + "fitColumns": function(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, + 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{ + 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); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/localize.js b/js/tabulator/src/js/modules/localize.js new file mode 100644 index 0000000..833d98c --- /dev/null +++ b/js/tabulator/src/js/modules/localize.js @@ -0,0 +1,197 @@ +var Localize = function(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 +}; + +//set header placehoder +Localize.prototype.setHeaderFilterPlaceholder = function(placeholder){ + this.langs.default.headerFilters.default = placeholder; +}; + +//set header filter placeholder by column +Localize.prototype.setHeaderFilterColumnPlaceholder = function(column, placeholder){ + this.langs.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.langs[locale]){ + this._setLangProp(this.langs[locale], lang); + }else{ + this.langs[locale] = lang; + } +}; + +Localize.prototype._setLangProp = function(lang, values){ + for(let 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.langs[desiredLocale]){ + let prefix = desiredLocale.split("-")[0]; + + if(self.langs[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.langs.default || {}); + + if(desiredLocale != "default"){ + traverseLang(self.langs[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.langs[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; + + for(let path in self.bindings){ + self.bindings[path].forEach(function(binding){ + binding(self.getText(path), self.lang); + }); + } +}; + +//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", + "first":"First", + "first_title":"First Page", + "last":"Last", + "last_title":"Last Page", + "prev":"Prev", + "prev_title":"Prev Page", + "next":"Next", + "next_title":"Next Page", + }, + "headerFilters":{ + "default":"filter column...", + "columns":{} + } + }, +}; + +Tabulator.prototype.registerModule("localize", Localize); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/moveable_columns.js b/js/tabulator/src/js/modules/moveable_columns.js new file mode 100644 index 0000000..45ac75c --- /dev/null +++ b/js/tabulator/src/js/modules/moveable_columns.js @@ -0,0 +1,281 @@ +var MoveColumns = function(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(); + cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); + }); + }else{ + column.getCells().forEach(function(cell, i){ + var cellEl = cell.getElement(); + 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); diff --git a/js/tabulator/src/js/modules/moveable_rows.js b/js/tabulator/src/js/modules/moveable_rows.js new file mode 100644 index 0000000..12107e8 --- /dev/null +++ b/js/tabulator/src/js/modules/moveable_rows.js @@ -0,0 +1,582 @@ +var MoveRows = function(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.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.connection = this.table.options.movableRowsConnectedTables; +}; + +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){ + if(((e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){ + if(self.toRow !== row || !self.toRowAfter){ + var rowEl = row.getElement(); + rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); + self.moveRow(row, true); + } + }else{ + if(self.toRow !== row || self.toRowAfter){ + var rowEl = row.getElement(); + 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(); + + 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, cell.getElement()); +}; + +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"; +}; + + +//establish connection with other tables +MoveRows.prototype.connectToTables = function(row){ + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStart.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "connect", { + row:row, + }); +}; + + +//disconnect from other tables +MoveRows.prototype.disconnectFromTables = function(){ + var self = this, + connections = this.table.modules.comms.getConnections(this.connection); + + this.table.options.movableRowsSendingStop.call(this.table, connections); + + this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); +}; + + +//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; + + 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(fromRow, toRow, fromTable){ + this.table.addRow(fromRow.getData(), undefined, toRow); + return true; + }, + + add:function(fromRow, toRow, fromTable){ + this.table.addRow(fromRow.getData()); + return true; + }, + + update:function(fromRow, toRow, fromTable){ + if(toRow){ + toRow.update(fromRow.getData()); + return true; + } + + return false; + }, + + replace:function(fromRow, toRow, fromTable){ + if(toRow){ + this.table.addRow(fromRow.getData(), undefined, toRow); + toRow.delete(); + return true; + } + + return false; + }, +}; + +MoveRows.prototype.senders = { + delete:function(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/js/tabulator/src/js/modules/mutator.js b/js/tabulator/src/js/modules/mutator.js new file mode 100644 index 0000000..b6044ba --- /dev/null +++ b/js/tabulator/src/js/modules/mutator.js @@ -0,0 +1,110 @@ +var Mutator = function(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){ + 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, update){ + 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(data); + + if(!update || (update && 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; + + if(mutator){ + return mutator.mutator(value, cell.row.getData(), "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/js/tabulator/src/js/modules/page.js b/js/tabulator/src/js/modules/page.js new file mode 100644 index 0000000..b48438f --- /dev/null +++ b/js/tabulator/src/js/modules/page.js @@ -0,0 +1,640 @@ +var Page = function(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.pageSizes = []; + + 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 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 (let 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((item) => { + var itemEl = document.createElement("option"); + itemEl.value = item; + itemEl.innerHTML = item; + + this.pageSizeSelect.appendChild(itemEl); + }); + + this.pageSizeSelect.value = this.size; + } +}; + +//setup pageination +Page.prototype.initialize = function(hidden){ + var self = this, + pageSelectLabel; + + //update param names + for(let key in self.table.options.paginationDataSent){ + self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; + } + + for(let key in self.table.options.paginationDataReceived){ + self.paginationDataReceivedNames[key] = self.table.options.paginationDataReceived[key]; + } + + //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); + }); + + self.prevBut.addEventListener("click", function(){ + self.previousPage(); + }); + + self.nextBut.addEventListener("click", function(){ + self.nextPage().then(()=>{}).catch(()=>{}); + }); + + self.lastBut.addEventListener("click", function(){ + self.setPage(self.max); + }); + + 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) + self.setPage(1).then(()=>{}).catch(()=>{}); + }); + } + + //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; + self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); + 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 = 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){ + if(this.mode == "local" || force){ + this.page = 1; + } + 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){ + return new Promise((resolve, reject)=>{ + + page = parseInt(page); + + if(page > 0 && page <= this.max){ + this.page = page; + this.trigger() + .then(()=>{ + resolve(); + }) + .catch(()=>{ + reject(); + }); + }else{ + console.warn("Pagination Error - Requested page is out of range of 1 - " + this.max + ":", page); + reject(); + } + }); +}; + +Page.prototype.setPageToRow = function(row){ + + return new Promise((resolve, reject)=>{ + + var rows = this.table.rowManager.getDisplayRows(this.displayIndex - 1); + var index = rows.indexOf(row); + + if(index > -1){ + var page = Math.ceil((index + 1) / this.size); + + this.setPage(page) + .then(()=>{ + resolve(); + }) + .catch(()=>{ + reject(); + }); + }else{ + console.warn("Pagination Error - Requested row is not visible"); + reject(); + } + }); +}; + + +Page.prototype.setPageSize = function(size){ + size = parseInt(size); + + if(size > 0){ + this.size = size; + } + + if(this.pageSizeSelect){ + // this.pageSizeSelect.value = size; + this.generatePageSizeSelectList(); + } +}; + + +//setup the pagination buttons +Page.prototype._setPageButtons = function(){ + var self = this; + + let leftSize = Math.floor((this.count-1) / 2); + let rightSize = Math.ceil((this.count-1) / 2); + let min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1); + let 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(let 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"); + button.setAttribute("aria-label", "Show Page " + page); + button.setAttribute("title", "Show Page " + page); + button.setAttribute("data-page", page); + button.textContent = page; + + button.addEventListener("click", function(e){ + self.setPage(page); + }); + + return button; +}; + +//previous page +Page.prototype.previousPage = function(){ + return new Promise((resolve, reject)=>{ + if(this.page > 1){ + this.page--; + this.trigger() + .then(()=>{ + resolve(); + }) + .catch(()=>{ + reject(); + }); + }else{ + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + reject() + } + }); +}; + +//next page +Page.prototype.nextPage = function(){ + return new Promise((resolve, reject)=>{ + if(this.page < this.max){ + this.page++; + this.trigger() + .then(()=>{ + resolve(); + }) + .catch(()=>{ + reject(); + }); + }else{ + if(!this.progressiveLoad){ + console.warn("Pagination Error - Next page would be greater than maximum page of " + this.max + ":", this.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 = []; + start = this.size * (this.page - 1); + end = start + parseInt(this.size); + + this._setPageButtons(); + + for(let 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 left; + + return new Promise((resolve, reject)=>{ + + switch(this.mode){ + case "local": + left = this.table.rowManager.scrollLeft; + + this.table.rowManager.refreshActiveData("page"); + this.table.rowManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + resolve(); + break; + + case "remote": + case "progressive_load": + case "progressive_scroll": + this.table.modules.ajax.blockActiveRequest(); + this._getRemotePage() + .then(()=>{ + resolve(); + }) + .catch(()=>{ + reject(); + }); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", this.mode); + reject(); + } + }); +}; + +Page.prototype._getRemotePage = function(){ + var self = this, + oldParams, pageParams; + + + return new Promise((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[this.paginationDataSentNames.page] = self.page; + + //set page size if defined + if(this.size){ + pageParams[this.paginationDataSentNames.size] = this.size; + } + + //set sort data if defined + if(this.table.options.ajaxSorting && this.table.modExists("sort")){ + let sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function(item){ + delete item.column; + }); + + pageParams[this.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if(this.table.options.ajaxFiltering && this.table.modExists("filter")){ + let filters = self.table.modules.filter.getFilters(true, true); + pageParams[this.paginationDataSentNames.filters] = filters; + } + + self.table.modules.ajax.setParams(pageParams); + + self.table.modules.ajax.sendRequest(this.progressiveLoad) + .then((data)=>{ + self._parseRemoteData(data); + resolve(); + }) + .catch((e)=>{reject()}); + + self.table.modules.ajax.setParams(oldParams); + }); +}; + + + +Page.prototype._parseRemoteData = function(data){ + var self = this, + left, data, margin; + + if(typeof data[this.paginationDataReceivedNames.last_page] === "undefined"){ + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); + } + + if(data[this.paginationDataReceivedNames.data]){ + this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; + + if(this.progressiveLoad){ + switch(this.mode){ + case "progressive_load": + this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); + if(this.page < this.max){ + setTimeout(function(){ + self.nextPage().then(()=>{}).catch(()=>{}); + }, self.table.options.ajaxProgressiveLoadDelay); + } + break; + + case "progressive_scroll": + data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); + + this.table.rowManager.setData(data, true); + + 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(()=>{}).catch(()=>{}); + } + break; + } + }else{ + left = this.table.rowManager.scrollLeft; + + this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); + + this.table.rowManager.scrollHorizontal(left); + + this.table.columnManager.scrollHorizontal(left); + + this.table.options.pageLoaded.call(this.table, this.getPage()); + } + + }else{ + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.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); diff --git a/js/tabulator/src/js/modules/persistence.js b/js/tabulator/src/js/modules/persistence.js new file mode 100644 index 0000000..1fc67ad --- /dev/null +++ b/js/tabulator/src/js/modules/persistence.js @@ -0,0 +1,222 @@ +var Persistence = function(table){ + this.table = table; //hold Tabulator object + this.mode = ""; + this.id = ""; + this.persistProps = ["field", "width", "visible"]; +}; + +// 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(mode, id){ + //determine persistent layout storage type + + this.mode = mode !== true ? mode : (this.localStorageTest() ? "local" : "cookie"); + + //set storage tag + this.id = "tabulator-" + (id || (this.table.element.getAttribute("id") || "")); +}; + +//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){ + var data = "", + id = this.id + (type === "columns" ? "" : "-" + type); + + switch(this.mode){ + case "local": + data = localStorage.getItem(id); + break; + + case "cookie": + + //find cookie + let cookie = document.cookie, + cookiePos = cookie.indexOf(id + "="), + end; + + //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(id + "=", ""); + } + break; + + default: + console.warn("Persistence Load Error - invalid mode selected", this.mode); + } + + return data ? JSON.parse(data) : 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); + + if(from){ + + from.width = column.width; + from.visible = column.visible; + + 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; + } + + var id = this.id + (type === "columns" ? "" : "-" + type); + + this.saveData(id, 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; +}; + +//save data to chosed medium +Persistence.prototype.saveData = function(id, data){ + + data = JSON.stringify(data); + + switch(this.mode){ + case "local": + localStorage.setItem(id, data); + break; + + case "cookie": + let expireDate = new Date(); + expireDate.setDate(expireDate.getDate() + 10000); + + //save cookie + document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); + break; + + default: + console.warn("Persistence Save Error - invalid mode selected", this.mode); + } +}; + +//build permission list +Persistence.prototype.parseColumns = function(columns){ + var self = this, + definitions = []; + + columns.forEach(function(column){ + var def = {}; + + if(column.isGroup){ + def.title = column.getDefinition().title; + def.columns = self.parseColumns(column.getColumns()); + }else{ + def.title = column.getDefinition().title; + def.field = column.getField(); + def.width = column.getWidth(); + def.visible = column.visible; + } + + definitions.push(def); + }); + + return definitions; +}; + +Tabulator.prototype.registerModule("persistence", Persistence); diff --git a/js/tabulator/src/js/modules/print.js b/js/tabulator/src/js/modules/print.js new file mode 100644 index 0000000..8efe81c --- /dev/null +++ b/js/tabulator/src/js/modules/print.js @@ -0,0 +1,94 @@ +var Print = function(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.htmlTableExport.genereateTable(this.table.options.printConfig, this.table.options.printCopyStyle, this.table.options.printVisibleRows, "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.htmlTableExport.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printCopyStyle, 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/js/tabulator/src/js/modules/reactive_data.js b/js/tabulator/src/js/modules/reactive_data.js new file mode 100644 index 0000000..b5efe14 --- /dev/null +++ b/js/tabulator/src/js/modules/reactive_data.js @@ -0,0 +1,237 @@ +var ReactiveData = function(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 () { + 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 () { + 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 () { + 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 () { + 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 () { + 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 self = this, + data = row.getData(); + + this.blocked = true; + + for(var key in data){ + this.watchKey(row, data, key); + } + + this.blocked = false; +}; + +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(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(){ + + 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); + + + diff --git a/js/tabulator/src/js/modules/resize_columns.js b/js/tabulator/src/js/modules/resize_columns.js new file mode 100644 index 0000000..3e64d17 --- /dev/null +++ b/js/tabulator/src/js/modules/resize_columns.js @@ -0,0 +1,162 @@ +var ResizeColumns = function(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(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)){ + col.reinitializeWidth(true); + } + }); + + + prevHandle.addEventListener("click", function(e){ + e.stopPropagation(); + }); + + var prevHandleDown = 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)){ + 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)){ + 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(); + + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); + + 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.persistentLayout && self.table.modExists("persistence", true)){ + 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/js/tabulator/src/js/modules/resize_rows.js b/js/tabulator/src/js/modules/resize_rows.js new file mode 100644 index 0000000..9060188 --- /dev/null +++ b/js/tabulator/src/js/modules/resize_rows.js @@ -0,0 +1,97 @@ +var ResizeRows = function(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(e){ + self.startRow = row; + self._mouseDown(e, row, handle); + }; + + handle.addEventListener("mousedown", handleDown, {passive: true}); + handle.addEventListener("touchstart", handleDown); + + prevHandle.addEventListener("click", function(e){ + e.stopPropagation(); + }); + + + var prevHandleDown = function(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/js/tabulator/src/js/modules/resize_table.js b/js/tabulator/src/js/modules/resize_table.js new file mode 100644 index 0000000..6c019f6 --- /dev/null +++ b/js/tabulator/src/js/modules/resize_table.js @@ -0,0 +1,36 @@ +var ResizeTable = function(table){ + this.table = table; //hold Tabulator object + this.binding = false; + this.observer = false; +}; + +ResizeTable.prototype.initialize = function(row){ + var table = this.table, + observer; + + if(typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual"){ + this.observer = new ResizeObserver(function(entry){ + table.redraw(); + }); + + this.observer.observe(table.element); + }else{ + this.binding = function(){ + 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); + } +}; + +Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/js/tabulator/src/js/modules/responsive_layout.js b/js/tabulator/src/js/modules/responsive_layout.js new file mode 100644 index 0000000..8646598 --- /dev/null +++ b/js/tabulator/src/js/modules/responsive_layout.js @@ -0,0 +1,254 @@ +var ResponsiveLayout = function(table){ + this.table = table; //hold Tabulator object + this.columns = []; + this.hiddenColumns = []; + this.mode = ""; + this.index = 0; + this.collapseFormatter = []; + this.collapseStartOpen = true; +}; + +//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(); + } +}; + +//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.layoutRow = function(row){ + var rowEl = row.getElement(), + el = document.createElement("div"); + + el.classList.add("tabulator-responsive-collapse"); + + if(!rowEl.classList.contains("tabulator-calcs")){ + row.modules.responsiveLayout = { + element:el, + }; + + if(!this.collapseStartOpen){ + el.style.display = 'none'; + } + + rowEl.appendChild(el); + + 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){ + column.hide(false, true); + + if(this.mode === "collapse"){ + this.hiddenColumns.unshift(column); + this.generateCollapsedContent(); + } +}; + +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(); + } +}; + +//redraw columns to fit space +ResponsiveLayout.prototype.update = function(){ + var self = this, + working = true; + + while(working){ + + let width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + let diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width; + + if(diff < 0){ + //table is too wide + let column = self.columns[self.index]; + + if(column){ + self.hideColumn(column); + self.index ++; + }else{ + working = false; + } + + }else{ + + //table has spare space + let 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(){ + return value; + }, + getData:function(){ + return data; + }, + getElement:function(){ + return document.createElement("div"); + }, + getRow:function(){ + return row.getComponent(); + }, + getColumn:function(){ + return column.getComponent(); + }, + }; + + output.push({ + title: column.definition.title, + value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) + }); + }else{ + output.push({ + title: column.definition.title, + value: value + }); + } + } + }); + + return output; +}; + +ResponsiveLayout.prototype.formatCollapsedData = function(data){ + var list = document.createElement("table"), + listContents = ""; + + data.forEach(function(item){ + var div = document.createElement("div"); + + if(item.value instanceof Node){ + div.appendChild(item.value); + item.value = div.innerHTML; + } + + listContents += "" + item.title + "" + item.value + ""; + }); + + list.innerHTML = listContents; + + return Object.keys(data).length ? list : ""; +}; + +Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); diff --git a/js/tabulator/src/js/modules/select_row.js b/js/tabulator/src/js/modules/select_row.js new file mode 100644 index 0000000..51ca2d9 --- /dev/null +++ b/js/tabulator/src/js/modules/select_row.js @@ -0,0 +1,361 @@ +var SelectRow = function(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(){ + + 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){ + + self.table._clearSelection(); + + if(e.shiftKey){ + 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(); + + if(self.table.options.selectable !== true){ + if(toggledRows.length > self.table.options.selectable){ + toggledRows = toggledRows.slice(0, self.table.options.selectable) + } + } + + self.selectRows(toggledRows); + } + } + else if(e.ctrlKey || e.metaKey){ + self.toggleRow(row); + self.lastClickedRow = row; + }else{ + self.deselectRows(); + self.selectRows(row); + self.lastClickedRow = row; + } + + self.table._clearSelection(); + }); + }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 self = this; + + switch(typeof rows){ + case "undefined": + self.table.rowManager.rows.forEach(function(row){ + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + break; + + case "boolean": + if(rows === true){ + self.table.rowManager.activeRows.forEach(function(row){ + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } + break; + + default: + if(Array.isArray(rows)){ + rows.forEach(function(row){ + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + }else{ + self._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(!silent){ + this.table.options.rowSelected.call(this.table, row.getComponent()); + this._rowSelectionChanged(); + } + } + }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){ + var self = this, + rowCount; + + if(typeof rows == "undefined"){ + + rowCount = self.selectedRows.length; + + for(let i = 0; i < rowCount; i++){ + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(); + }else{ + if(Array.isArray(rows)){ + rows.forEach(function(row){ + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(); + }else{ + self._deselectRow(rows); + } + } +}; + +//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(!silent){ + self.table.options.rowDeselected.call(this.table, row.getComponent()); + self._rowSelectionChanged(); + } + } + }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(){ + 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; + } + } + + 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; +} + +Tabulator.prototype.registerModule("selectRow", SelectRow); diff --git a/js/tabulator/src/js/modules/sort.js b/js/tabulator/src/js/modules/sort.js new file mode 100644 index 0000000..f3cb7d9 --- /dev/null +++ b/js/tabulator/src/js/modules/sort.js @@ -0,0 +1,556 @@ +var Sort = function(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-arrow"); + //create sorter arrow + content.appendChild(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.persistentSort && this.table.modExists("persistence", true)){ + 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){ + 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, lastSort, sortList; + + sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; + + if(self.table.options.dataSorting){ + self.table.options.dataSorting.call(self.table, self.getSort()); + } + + self.clearColumnHeaders(); + + if(!self.table.options.ajaxSorting){ + + sortList.forEach(function(item, i){ + + if(item.column && item.column.modules.sort){ + + //if no sorter has been defined, take a guess + if(!item.column.modules.sort.sorter){ + item.column.modules.sort.sorter = self.findSorter(item.column); + } + + self._sortItem(data, item.column, item.dir, sortList, i); + } + + self.setColumnHeader(item.column, item.dir); + }); + }else{ + sortList.forEach(function(item, i){ + self.setColumnHeader(item.column, item.dir); + }); + } + + if(self.table.options.dataSorted){ + self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); + } + +}; + +//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._sortItem = function(data, column, dir, sortList, i){ + var self = this; + + var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; + + data.sort(function(a, b){ + + var result = self._sortRow(a, b, column, dir, params); + + //if results match recurse through previous searchs to be sure + if(result === 0 && i){ + for(var j = i-1; j>= 0; j--){ + result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, 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(a, b, aRow, bRow, column, dir, params){ + var alignEmptyValues = params.alignEmptyValues; + var decimal = params.decimalSeparator || "."; + var thousand = params.thousandSeparator || ","; + var emptyAlign = 0; + + a = parseFloat(String(a).split(thousand).join("").split(decimal).join(".")); + b = parseFloat(String(b).split(thousand).join("").split(decimal).join(".")); + + //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(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(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(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(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(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(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(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(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); diff --git a/js/tabulator/src/js/modules/validate.js b/js/tabulator/src/js/modules/validate.js new file mode 100644 index 0000000..dc97fd2 --- /dev/null +++ b/js/tabulator/src/js/modules/validate.js @@ -0,0 +1,218 @@ +var Validate = function(table){ + this.table = table; +}; + +//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){ + case "string": + pos = value.indexOf(':'); + + if(pos > -1){ + type = value.substring(0,pos); + params = value.substring(pos+1); + }else{ + type = value; + } + + console.log("v", value, type, params) + + 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 = []; + + if(validators){ + validators.forEach(function(item){ + if(!item.func.call(self, cell, value, item.params)){ + valid.push({ + type:item.type, + parameters:item.params + }); + } + }); + } + + return valid.length ? valid : true; +}; + +Validate.prototype.validators = { + + //is integer + integer: function(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(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(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return !isNaN(value); + }, + + //must be a string + string: function(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return isNaN(value); + }, + + //maximum value + max: function(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return parseFloat(value) <= parameters; + }, + + //minimum value + min: function(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return parseFloat(value) >= parameters; + }, + + //minimum string length + minLength: function(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return String(value).length >= parameters; + }, + + //maximum string length + maxLength: function(cell, value, parameters){ + if(value === "" || value === null || typeof value === "undefined"){ + return true; + } + return String(value).length <= parameters; + }, + + //in provided value list + in: function(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(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(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(cell, value, parameters){ + return value !== "" && value !== null && typeof value !== "undefined"; + }, +}; + + +Tabulator.prototype.registerModule("validate", Validate); diff --git a/js/tabulator/src/js/modules_enabled.js b/js/tabulator/src/js/modules_enabled.js new file mode 100644 index 0000000..c56168d --- /dev/null +++ b/js/tabulator/src/js/modules_enabled.js @@ -0,0 +1,30 @@ +/*=include modules/accessor.js */ +/*=include modules/ajax.js */ +/*=include modules/calculation_colums.js */ +/*=include modules/clipboard.js */ +/*=include modules/data_tree.js */ +/*=include modules/download.js */ +/*=include modules/edit.js */ +/*=include modules/filter.js */ +/*=include modules/format.js */ +/*=include modules/frozen_columns.js */ +/*=include modules/frozen_rows.js */ +/*=include modules/group_rows.js */ +/*=include modules/history.js */ +/*=include modules/html_table_import.js */ +/*=include modules/html_table_export.js */ +/*=include modules/keybindings.js */ +/*=include modules/moveable_columns.js */ +/*=include modules/moveable_rows.js */ +/*=include modules/mutator.js */ +/*=include modules/page.js */ +/*=include modules/persistence.js */ +/*=include modules/print.js */ +/*=include modules/reactive_data.js */ +/*=include modules/resize_columns.js */ +/*=include modules/resize_rows.js */ +/*=include modules/resize_table.js */ +/*=include modules/responsive_layout.js */ +/*=include modules/select_row.js */ +/*=include modules/sort.js */ +/*=include modules/validate.js */ \ No newline at end of file diff --git a/js/tabulator/src/js/polyfills.js b/js/tabulator/src/js/polyfills.js new file mode 100644 index 0000000..965d6a4 --- /dev/null +++ b/js/tabulator/src/js/polyfills.js @@ -0,0 +1,92 @@ + + + +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex +if (!Array.prototype.findIndex) { + Object.defineProperty(Array.prototype, 'findIndex', { + value: function(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(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; + } + }); +} \ No newline at end of file diff --git a/js/tabulator/src/js/row.js b/js/tabulator/src/js/row.js new file mode 100644 index 0000000..a811a84 --- /dev/null +++ b/js/tabulator/src/js/row.js @@ -0,0 +1,795 @@ + +//public row object +var RowComponent = function (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.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.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); + } + + 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(data, parent){ + this.table = parent.table; + this.parent = parent; + this.data = {}; + this.type = "row"; //type of element + this.element = this.createElement(); + 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.setData(data); + this.generateElement(); +}; + +Row.prototype.createElement = function (){ + var el = document.createElement("div"); + + el.classList.add("tabulator-row"); + el.setAttribute("role", "row"); + + return el; +}; + +Row.prototype.getElement = function(){ + 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; + + //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); + } + + //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 self = this; + + if(!self.initialized || force){ + + self.deleteCells(); + + while(self.element.firstChild) self.element.removeChild(self.element.firstChild); + + //handle frozen cells + if(this.table.modExists("frozenColumns")){ + this.table.modules.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + self.cells.forEach(function(cell){ + self.element.appendChild(cell.getElement()); + cell.cellRendered(); + }); + + if(force){ + self.normalizeHeight(); + } + + //setup movable rows + if(self.table.options.dataTree && self.table.modExists("dataTree")){ + self.table.modules.dataTree.layoutRow(this); + } + + //setup movable rows + if(self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")){ + self.table.modules.responsiveLayout.layoutRow(this); + } + + if(self.table.options.rowFormatter){ + self.table.options.rowFormatter(self.getComponent()); + } + + //set resizable handles + if(self.table.options.resizableRows && self.table.modExists("resizeRows")){ + self.table.modules.resizeRows.initializeRow(self); + } + + self.initialized = true; + } +}; + +Row.prototype.reinitializeHeight = function(){ + this.heightInitialized = false; + + if(this.element.offsetParent !== null){ + this.normalizeHeight(true); + } +}; + + +Row.prototype.reinitialize = function(){ + this.initialized = false; + this.heightInitialized = false; + + if(!this.manualHeight){ + this.height = 0; + this.heightStyled = ""; + } + + if(this.element.offsetParent !== null){ + this.initialize(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(data){ + var self = this, + visible = Tabulator.prototype.helpers.elVisible(this.element); + + return new Promise((resolve, reject) => { + + if(typeof data === "string"){ + data = JSON.parse(data); + } + + if(this.table.options.reactiveData && this.table.modExists("reactiveData", true)){ + this.table.modules.reactiveData.block(); + } + + //mutate incomming data if needed + if(self.table.modExists("mutator")){ + data = self.table.modules.mutator.transformRow(data, "data", true); + } + + //set data + for (var attrname in data) { + self.data[attrname] = data[attrname]; + } + + if(this.table.options.reactiveData && this.table.modExists("reactiveData", true)){ + this.table.modules.reactiveData.unblock(); + } + + //update affected cells only + for (var attrname in data) { + + let columns = this.table.columnManager.getColumnsByFieldRoot(attrname); + + columns.forEach((column) => { + let cell = this.getCell(column.getField()); + + if(cell){ + let value = column.getFieldValue(data); + if(cell.getValue() != value){ + cell.setValueProcessData(value); + + if(visible){ + cell.cellRendered(); + } + } + } + }); + } + + //Partial reinitialization if visible + if(visible){ + self.normalizeHeight(); + + if(self.table.options.rowFormatter){ + self.table.options.rowFormatter(self.getComponent()); + } + }else{ + this.initialized = false; + this.height = 0; + this.heightStyled = ""; + } + + if(self.table.options.dataTree !== false && self.table.modExists("dataTree") && this.table.modules.dataTree.redrawNeeded(data)){ + this.table.modules.dataTree.initializeRow(this); + this.table.modules.dataTree.layoutRow(this); + this.table.rowManager.refreshActiveData("tree", false, true); + } + + //self.reinitialize(); + + self.table.options.rowUpdated.call(this.table, self.getComponent()); + + resolve(); + }); +}; + +Row.prototype.getData = function(transform){ + var self = this; + + if(transform){ + if(self.table.modExists("accessor")){ + return self.table.modules.accessor.transformRow(self.data, transform); + } + }else{ + 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++){ + let cell = this.cells[i]; + + if(cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())){ + let 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--){ + let 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); + } +}; + + +///////////////////// Actions ///////////////////// + +Row.prototype.delete = function(){ + return new Promise((resolve, reject) => { + var index, rows; + + if(this.table.options.history && this.table.modExists("history")){ + + if(this.table.options.groupBy && this.table.modExists("groupRows")){ + rows = this.getGroup().rows + index = rows.indexOf(this); + + if(index){ + index = rows[index-1]; + } + }else{ + index = this.table.rowManager.getRowIndex(this); + + if(index){ + index = this.table.rowManager.rows[index-1]; + } + } + + this.table.modules.history.action("rowDelete", this, {data:this.getData(), pos:!index, index:index}); + } + + this.deleteActual(); + + + resolve(); + }); +}; + + +Row.prototype.deleteActual = function(blockRedraw){ + var index = this.table.rowManager.getRowIndex(this); + + //deselect row if it is selected + if(this.table.modExists("selectRow")){ + this.table.modules.selectRow._deselectRow(this, true); + } + + // 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; + + //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.deleteCells = function(){ + var cellCount = this.cells.length; + + for(let i = 0; i < cellCount; i++){ + this.cells[0].delete(); + } +}; + +Row.prototype.wipe = function(){ + this.deleteCells(); + + while(this.element.firstChild) this.element.removeChild(this.element.firstChild); + + this.element = false; + this.modules = {}; + + if(this.element.parentNode){ + this.element.parentNode.removeChild(this.element); + } +}; + + +Row.prototype.getGroup = function(){ + return this.modules.group || false; +}; + + +//////////////// Object Generation ///////////////// +Row.prototype.getComponent = function(){ + return new RowComponent(this); +}; diff --git a/js/tabulator/src/js/row_manager.js b/js/tabulator/src/js/row_manager.js new file mode 100644 index 0000000..4569252 --- /dev/null +++ b/js/tabulator/src/js/row_manager.js @@ -0,0 +1,1698 @@ +var RowManager = function(table){ + + this.table = table; + this.element = this.createHolderElement(); //containing element + this.tableElement = 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 = "classic"; //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 +}; + +//////////////// 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.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); + } + }else{ + self.scrollTop = top; + } + + }); + } +}; + + +////////////////// Row Manipulation ////////////////// + +RowManager.prototype.findRow = function(subject){ + var self = this; + + if(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 + let match = self.rows.find(function(row){ + return row.element === subject; + }); + + return match || false; + } + + }else if(typeof subject == "undefined" || subject === null){ + return false; + }else{ + //subject should be treated as the index of the row + let 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 rowIndex = this.getDisplayRows().indexOf(row), + rowEl = row.getElement(), + rowTop, + offset = 0; + + return new Promise((resolve, reject) => { + if(rowIndex > -1){ + + if(typeof position === "undefined"){ + position = this.table.options.scrollToRowPosition; + } + + if(typeof ifVisible === "undefined"){ + ifVisible = this.table.options.scrollToRowIfVisible; + } + + + if(position === "nearest"){ + switch(this.renderMode){ + case"classic": + rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; + position = Math.abs(this.element.scrollTop - rowTop) > Math.abs(this.element.scrollTop + this.element.clientHeight - rowTop) ? "bottom" : "top"; + break; + case"virtual": + position = Math.abs(this.vDomTop - rowIndex) > Math.abs(this.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(this.element).top; + + if(offset > 0 && offset < this.element.clientHeight - rowEl.offsetHeight){ + return false; + } + } + } + + //scroll to row + switch(this.renderMode){ + case"classic": + this.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(this.element).top + this.element.scrollTop; + break; + case"virtual": + this._virtualRenderFill(rowIndex, true); + break; + } + + //align to correct position + switch(position){ + case "middle": + case "center": + + if(this.element.scrollHeight - this.element.scrollTop == this.element.clientHeight){ + this.element.scrollTop = this.element.scrollTop + (rowEl.offsetTop - this.element.scrollTop) - ((this.element.scrollHeight - rowEl.offsetTop) / 2); + }else{ + this.element.scrollTop = this.element.scrollTop - (this.element.clientHeight / 2); + } + + break; + + case "bottom": + + if(this.element.scrollHeight - this.element.scrollTop == this.element.clientHeight){ + this.element.scrollTop = this.element.scrollTop - (this.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + }else{ + this.element.scrollTop = this.element.scrollTop - this.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){ + var self = this; + + return new Promise((resolve, reject)=>{ + if(renderInPosition && this.getDisplayRows().length){ + if(self.table.options.pagination){ + self._setDataActual(data, true); + }else{ + this.reRenderInPosition(function(){ + self._setDataActual(data); + }); + } + }else{ + if(this.table.options.autoColumns){ + this.table.columnManager.generateColumnsFromRowData(data); + } + this.resetScroll(); + this._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 === "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.table.options.dataLoaded.call(this.table, data); + + self.refreshActiveData(false, false, renderInPosition); + }else{ + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", 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 = []; +} + +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.table.options.rowDeleted.call(this.table, row.getComponent()); + + this.table.options.dataEdited.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 self = this, + length = 0, + rows = []; + + return new Promise((resolve, reject) => { + pos = this.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(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{ + this.reRenderInPosition(); + } + + //recalc column calculations if present + if(this.table.modExists("columnCalcs")){ + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } + + 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), + 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(index){ + 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){ + let allIndex = this.rows.indexOf(index), + 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); + } + + if(allIndex > -1){ + 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()); + + this.table.options.dataEdited.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, {pos:this.getRowPosition(from), to:to, after:after}); + } + + this.moveRowActual(from, to, after); + + this.table.options.rowMoved.call(this.table, from.getComponent()); +}; + + +RowManager.prototype.moveRowActual = function(from, to, after){ + var self = this; + this._moveRowInArray(this.rows, from, to, after); + this._moveRowInArray(this.activeRows, from, to, after); + + this.displayRowIterator(function(rows){ + self._moveRowInArray(rows, from, to, after); + }); + + if(this.table.options.groupBy && this.table.modExists("groupRows")){ + 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(let 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(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 self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function(row){ + output.push(row.getData(transform || "data")); + }); + + return output; +}; + +RowManager.prototype.getComponents = function(active){ + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function(row){ + output.push(row.getComponent()); + }); + + return output; +} + +RowManager.prototype.getDataCount = function(active){ + return active ? this.activeRows.length : this.rows.length; +}; + +RowManager.prototype._genRemoteRequest = function(){ + var self = this, + table = self.table, + options = table.options, + params = {}; + + if(table.modExists("page")){ + //set sort data if defined + if(options.ajaxSorting){ + let sorters = self.table.modules.sort.getSort(); + + sorters.forEach(function(item){ + delete item.column; + }); + + params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if(options.ajaxFiltering){ + let filters = self.table.modules.filter.getFilters(true, true); + + params[self.table.modules.page.paginationDataSentNames.filters] = filters; + } + + + self.table.modules.ajax.setParams(params, true); + } + + table.modules.ajax.sendRequest() + .then((data)=>{ + self.setData(data); + }) + .catch((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(()=>{}).catch(()=>{}); + }else if(options.ajaxProgressiveLoad){ + table.modules.ajax.loadData().then(()=>{}).catch(()=>{}); + }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(()=>{}).catch(()=>{}); + }else if(options.ajaxProgressiveLoad){ + table.modules.ajax.loadData().then(()=>{}).catch(()=>{}); + }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, + displayIndex; + + 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; + } + + //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{ + self.renderTable(); + if(table.options.layoutColumnsOnNewData){ + self.table.columnManager.redraw(true); + } + } + } + + if(table.modExists("columnCalcs")){ + table.modules.columnCalcs.recalc(this.activeRows); + } +}; + +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; + } + }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(){ + return this.rows; +}; + +///////////////// Table Rendering ///////////////// + +//trigger rerender of table in current position +RowManager.prototype.reRenderInPosition = function(callback){ + if(this.getRenderMode() == "virtual"){ + + 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.element.clientHeight || this.table.options.height) && this.table.options.virtualDom){ + this.renderMode = "virtual"; + }else{ + this.renderMode = "classic"; + } +}; + + +RowManager.prototype.getRenderMode = function(){ + return this.renderMode; +}; + +RowManager.prototype.renderTable = function(){ + var self = this; + + self.table.options.renderStarted.call(this.table); + + self.element.scrollTop = 0; + + switch(self.renderMode){ + case "classic": + self._simpleRender(); + break; + + case "virtual": + self._virtualRenderFill(); + break; + } + + if(self.firstRender){ + if(self.displayRowsCount){ + self.firstRender = false; + self.table.modules.layout.layout(); + }else{ + self.renderEmptyScroll(); + } + } + + if(self.table.modExists("frozenColumns")){ + self.table.modules.frozenColumns.layout(); + } + + + if(!self.displayRowsCount){ + if(self.table.options.placeholder){ + + if(this.renderMode){ + self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); + } + + self.getElement().appendChild(self.table.options.placeholder); + } + } + + self.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(){ + 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.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 + let 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()); + 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(); + } +}; + +//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{ + //scrolling down + if(topDiff >= 0){ + + //hide top row if needed + if(this.scrollTop > this.vDomWindowBuffer){ + this._removeTopRow(topDiff); + } + } + + if(bottomDiff >= 0){ + this._addBottomRow(bottomDiff); + } + } + } +}; + +RowManager.prototype._addTopRow = function(topDiff, i=0){ + var table = this.tableElement, + rows = this.getDisplayRows(); + + if(this.vDomTop){ + let 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, i=0){ + var table = this.tableElement, + rows = this.getDisplayRows(); + + if(this.vDomBottom < this.displayRowsCount -1){ + let 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(){ + + if(this.renderMode === "virtual"){ + this.height = this.element.clientHeight; + this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; + + let otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); + + this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; + this.element.style.height = "calc(100% - " + otherHeight + "px)"; + this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; + } +}; + +//renitialize all rows +RowManager.prototype.reinitialize = function(){ + this.rows.forEach(function(row){ + row.reinitialize(); + }); +}; + + +//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')); + } +}; diff --git a/js/tabulator/src/scss/bootstrap/functions4.scss b/js/tabulator/src/scss/bootstrap/functions4.scss new file mode 100644 index 0000000..ca2dea3 --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/functions4.scss @@ -0,0 +1,118 @@ +// Bootstrap functions +// +// Utility mixins and functions for evalutating source code across our variables, maps, and mixins. + +// Ascending +// Used to evaluate Sass maps like our grid breakpoints. +@mixin _assert-ascending($map, $map-name) { + $prev-key: null; + $prev-num: null; + @each $key, $num in $map { + @if $prev-num == null { + // Do nothing + } @else if not comparable($prev-num, $num) { + @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } @else if $prev-num >= $num { + @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; + } + $prev-key: $key; + $prev-num: $num; + } +} + +// Starts at zero +// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0. +@mixin _assert-starts-at-zero($map) { + $values: map-values($map); + $first-value: nth($values, 1); + @if $first-value != 0 { + @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; + } +} + +// Replace `$search` with `$replace` in `$string` +// Used on our SVG icon backgrounds for custom forms. +// +// @author Hugo Giraudel +// @param {String} $string - Initial string +// @param {String} $search - Substring to replace +// @param {String} $replace ('') - New value +// @return {String} - Updated string +@function str-replace($string, $search, $replace: "") { + $index: str-index($string, $search); + + @if $index { + @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); + } + + @return $string; +} + +// Color contrast +@function color-yiq($color) { + $r: red($color); + $g: green($color); + $b: blue($color); + + $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + + @if ($yiq >= $yiq-contrasted-threshold) { + @return $yiq-text-dark; + } @else { + @return $yiq-text-light; + } +} + +// Retrieve color Sass maps +@function color($key: "blue") { + @return map-get($colors, $key); +} + +@function theme-color($key: "primary") { + @return map-get($theme-colors, $key); +} + +@function gray($key: "100") { + @return map-get($grays, $key); +} + +// Request a theme color level +@function theme-color-level($color-name: "primary", $level: 0) { + $color: theme-color($color-name); + $color-base: if($level > 0, $black, $white); + $level: abs($level); + + @return mix($color-base, $color, $level * $theme-color-interval); +} + + +// Tables + +@mixin table-row-variant($state, $background) { + // Exact selectors below required to override `.table-striped` and prevent + // inheritance to nested tables. + .table-#{$state} { + &, + > th, + > td { + background-color: $background; + } + } + + // Hover states for `.table-hover` + // Note: this is not available for cells or rows within `thead` or `tfoot`. + .table-hover { + $hover-background: darken($background, 5%); + + .table-#{$state} { + @include hover { + background-color: $hover-background; + + > td, + > th { + background-color: $hover-background; + } + } + } + } +} diff --git a/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss new file mode 100644 index 0000000..4f033f9 --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss @@ -0,0 +1,1061 @@ +@import "variables.scss"; + +// Style conversion file, bootstrap to tabulator + +//Main Theme Variables +$backgroundColor: $table-bg !default; //background color of tabulator +$borderColor:$table-border-color !default; //border to tabulator +$textSize:$font-size-base !default; //table text size + +//header themeing +$headerBackgroundColor:#fff !default; //border to tabulator +$headerSeperatorColor:$table-border-color !default; //header bottom seperator color + +$cellPadding:$table-cell-padding !default; //padding round header +$cellPaddingCondensed:$table-condensed-cell-padding !default; //padding round header + +//column header arrows +$sortArrowActive: #666 !default; +$sortArrowInactive: #bbb !default; + +//row themeing +$rowBackgroundColor:$backgroundColor !default; //table row background color +$rowAltBackgroundColor:$table-bg-accent !default; //table row background color +$rowBorderColor:$table-border-color !default; //table border color +$rowHoverBackground:$table-bg-hover !default; //row background color on hover + +$rowSelectedBackground: #9ABCEA !default; //row background color when selected +$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered + + +$editBoxColor:#1D68CD !default; //border color for edit boxes +$errorColor:#dd0000 !default; //error indication + +//footer themeing +$footerBorderColor:$table-border-color !default; //footer border color +$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color +$footerActiveColor:#d00 !default; //footer bottom active text color + + +//Tabulator Containing Element +.tabulator{ + position: relative; + background-color: $backgroundColor; + overflow:hidden; + font-size:$textSize; + text-align: left; + width: 100%; + max-width: 100%; + margin-bottom: $line-height-computed; + + -webkit-transform: translatez(0); + -moz-transform: translatez(0); + -ms-transform: translatez(0); + -o-transform: translatez(0); + transform: translatez(0); + + &[tabulator-layout="fitDataFill"]{ + .tabulator-tableHolder{ + .tabulator-table{ + min-width:100%; + } + } + } + + &.tabulator-block-select{ + user-select: none; + } + + //column header containing element + .tabulator-header{ + position:relative; + box-sizing: border-box; + + width:100%; + + border-bottom:2px solid $headerSeperatorColor; + background-color: $headerBackgroundColor; + 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-header-hidden{ + display:none; + } + + //individual column header element + .tabulator-col{ + display:inline-block; + position:relative; + box-sizing:border-box; + background-color: $headerBackgroundColor; + text-align:left; + vertical-align: bottom; + overflow: hidden; + + &.tabulator-moving{ + position: absolute; + border:1px solid $headerSeperatorColor; + background:darken($headerBackgroundColor, 10%); + pointer-events: none; + } + + //hold content of column header + .tabulator-col-content{ + box-sizing:border-box; + position: relative; + padding:$cellPadding; + + //hold title of column header + .tabulator-col-title{ + box-sizing:border-box; + width: 100%; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align:bottom; + + //element to hold title editor + .tabulator-title-editor{ + box-sizing: border-box; + width: 100%; + + border:1px solid #999; + + padding:1px; + + background: #fff; + } + } + + //column sorter arrow + .tabulator-arrow{ + display: inline-block; + position: absolute; + top:14px; + right:8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid $sortArrowInactive; + } + + } + + //complex header column group + &.tabulator-col-group{ + + //gelement to hold sub columns in column group + .tabulator-col-group-cols{ + position:relative; + display: flex; + + border-top:1px solid $borderColor; + overflow: hidden; + + .tabulator-col:last-child{ + margin-right:-1px; + } + } + } + + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //placeholder element for sortable columns + &.ui-sortable-helper{ + position: absolute; + background-color:darken($headerBackgroundColor, 10%) !important; + border:1px solid $borderColor; + } + + //header filter containing element + .tabulator-header-filter{ + position: relative; + box-sizing: border-box; + margin-top:2px; + width:100%; + text-align: center; + + //styling adjustment for inbuilt editors + textarea{ + height:auto !important; + } + + svg{ + margin-top: 3px; + } + + input{ + &::-ms-clear { + width : 0; + height: 0; + } + } + } + + + //styling child elements for sortable columns + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:25px; + } + + &:hover{ + cursor:pointer; + background-color:darken($headerBackgroundColor, 10%); + } + + &[aria-sort="none"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowInactive; + } + } + + &[aria-sort="asc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowActive; + } + } + + &[aria-sort="desc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: 6px solid $sortArrowActive; + border-bottom: none; + } + } + } + + &.tabulator-col-vertical{ + .tabulator-col-content{ + .tabulator-col-title{ + writing-mode: vertical-rl; + text-orientation: mixed; + + display:flex; + align-items:center; + justify-content:center; + } + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + transform: rotate(180deg); + } + } + + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:0; + padding-top:20px; + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + padding-right:0; + padding-bottom:20px; + } + + } + + .tabulator-arrow{ + right:calc(50% - 6px); + } + } + } + + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + // background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:100%; + + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $headerSeperatorColor; + + overflow: hidden; + } + + .tabulator-frozen-rows-holder{ + min-width:600%; + + &:empty{ + display: none; + } + } + } + + + + //scrolling element to hold table + .tabulator-tableHolder{ + position:relative; + width:100%; + white-space: nowrap; + overflow:auto; + -webkit-overflow-scrolling: touch; + + &:focus{ + outline: none; + } + + //default placeholder element + .tabulator-placeholder{ + box-sizing:border-box; + display: flex; + align-items:center; + + &[tabulator-render-mode="virtual"]{ + position: absolute; + top:0; + left:0; + height:100%; + } + + width:100%; + + span{ + display: inline-block; + + margin:0 auto; + padding:10px; + + color:#000; + font-weight: bold; + font-size: 20px; + } + } + + //element to hold table rows + .tabulator-table{ + position:relative; + display:inline-block; + background-color:$rowBackgroundColor; + white-space: nowrap; + overflow:visible; + + .tabulator-row{ + &.tabulator-calcs{ + font-weight: bold; + background:darken($rowAltBackgroundColor, 5%) !important; + + &.tabulator-calcs-top{ + border-bottom:2px solid $rowBorderColor; + } + + &.tabulator-calcs-bottom{ + border-top:2px solid $rowBorderColor; + } + } + } + } + } + + + //column resize handles + .tabulator-col-resize-handle{ + position:absolute; + right:0; + top:0; + bottom:0; + width:5px; + + &.prev{ + left:0; + right:auto; + } + + &:hover{ + cursor:ew-resize; + } + } + + + //footer element + .tabulator-footer{ + padding:5px 10px; + border-top:2px solid $footerSeperatorColor; + text-align:right; + font-weight:bold; + white-space:nowrap; + user-select:none; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:calc(100% + 20px); + margin:-5px -10px 5px -10px; + + text-align: left; + + background:lighten($backgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($backgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-bottom:1px solid $rowBorderColor; + border-top:1px solid $rowBorderColor; + + overflow: hidden; + + &:only-child{ + margin-bottom:-5px; + border-bottom:none; + } + } + + //pagination container element + .tabulator-paginator{ + font-family:inherit; + font-weight:inherit; + font-size:inherit; + } + + //page size select element + .tabulator-page-size{ + display:inline-block; + + margin:0 5px; + padding:2px 5px; + + border:1px solid $footerBorderColor; + border-radius:3px; + } + + //pagination container element + .tabulator-pages{ + margin:0 7px; + } + + //pagination button + .tabulator-page{ + display:inline-block; + + margin:0 2px; + padding:2px 5px; + + border:1px solid $footerBorderColor; + border-radius:3px; + + background:rgba(255,255,255,.2); + + &.active{ + color:$footerActiveColor; + } + + &:disabled{ + opacity:.5; + } + + &:not(.disabled){ + &:hover{ + cursor:pointer; + background:rgba(0,0,0,.2); + color:#fff; + } + } + } + } + + //holding div that contains loader and covers tabulator element to prevent interaction + .tabulator-loader{ + position:absolute; + display: flex; + align-items:center; + + top:0; + left:0; + z-index:100; + + height:100%; + width:100%; + background:rgba(0,0,0,.4); + text-align:center; + + //loading message element + .tabulator-loader-msg{ + display:inline-block; + + margin:0 auto; + padding:10px 20px; + + border-radius:10px; + + background:#fff; + font-weight:bold; + font-size:16px; + + //loading message + &.tabulator-loading{ + border:4px solid #333; + color:#000; + } + + //error message + &.tabulator-error{ + border:4px solid #D00; + color:#590000; + } + } + } + + + + //Bootstrap theming classes + + &.table-striped{ + .tabulator-row{ + &:nth-child(even){ + background-color: $rowAltBackgroundColor; + } + } + } + + &.table-bordered{ + border:1px solid $borderColor; + + .tabulator-header{ + .tabulator-col{ + border-right:1px solid $borderColor; + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + .tabulator-cell{ + border-right:1px solid $borderColor; + } + } + } + } + + } + + &.table-condensed{ + .tabulator-header{ + .tabulator-col{ + .tabulator-col-content{ + padding:$cellPaddingCondensed; + } + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + min-height:$textSize + ($cellPaddingCondensed * 2); + + .tabulator-cell{ + padding:$cellPaddingCondensed; + } + } + } + } + } + + + //row colors + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + &.active{ + background:$table-bg-active!important; + } + &.success{ + background:$state-success-bg!important; + } + &.info{ + background: $state-info-bg!important; + } + &.warning{ + background:$state-warning-bg!important; + } + &.danger{ + background:$state-danger-bg!important; + } + } + } + } + +} + +//row element +.tabulator-row{ + position: relative; + box-sizing: border-box; + + min-height:$textSize + ($cellPadding * 2); + background-color: $rowBackgroundColor; + border-bottom:1px solid $rowBorderColor; + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground !important; + cursor: pointer; + } + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + + &.tabulator-moving{ + position: absolute; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + pointer-events: none !important; + z-index:15; + } + + //row resize handles + .tabulator-row-resize-handle{ + position:absolute; + right:0; + bottom:0; + left:0; + height:5px; + + &.prev{ + top:0; + bottom:auto; + } + + &:hover{ + cursor:ns-resize; + } + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + + .tabulator-responsive-collapse{ + box-sizing:border-box; + + padding:5px; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + &:empty{ + display:none; + } + + table{ + font-size:$textSize; + + tr{ + td{ + position: relative; + + &:first-of-type{ + padding-right:10px; + } + } + } + } + } + + + //cell element + .tabulator-cell{ + display:inline-block; + position: relative; + box-sizing:border-box; + padding:$cellPadding; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + + &:last-of-type{ + border-right: none; + } + + &.tabulator-editing{ + border:1px solid $editBoxColor; + padding: 0; + + input, select{ + border:1px; + background:transparent; + } + } + + &.tabulator-validation-fail{ + border:1px solid $errorColor; + input, select{ + border:1px; + background:transparent; + + color: $errorColor; + } + } + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //movable row handle + &.tabulator-row-handle{ + + display: inline-flex; + align-items:center; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //handle holder + .tabulator-row-handle-box{ + width:80%; + + //Hamburger element + .tabulator-row-handle-bar{ + width:100%; + height:3px; + margin-top:2px; + background:#666; + } + } + } + + .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 $rowBorderColor; + border-bottom:2px solid $rowBorderColor; + } + + .tabulator-data-tree-control{ + + display:inline-flex; + justify-content: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; + + &:hover{ + cursor:pointer; + background:rgba(0, 0, 0, .2); + } + + .tabulator-data-tree-control-collapse{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: transparent; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #333; + } + } + + .tabulator-data-tree-control-expand{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: #333; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #333; + } + } + + } + + .tabulator-responsive-collapse-toggle{ + display: inline-flex; + align-items: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:$rowBackgroundColor; + font-weight:bold; + font-size:1.1em; + + &:hover{ + opacity:.7; + } + + &.open{ + .tabulator-responsive-collapse-toggle-close{ + display:initial; + } + + .tabulator-responsive-collapse-toggle-open{ + display:none; + } + } + + .tabulator-responsive-collapse-toggle-close{ + display:none; + } + } + + .tabulator-traffic-light{ + display: inline-block; + height:14px; + width:14px; + + border-radius:14px; + } + } + //row grouping element + &.tabulator-group{ + + box-sizing:border-box; + border-bottom:1px solid #999; + border-right:1px solid $rowBorderColor; + border-top:1px solid #999; + padding:5px; + padding-left:10px; + background:#fafafa; + font-weight:bold; + + min-width: 100%; + + &:hover{ + cursor:pointer; + background-color:rgba(0,0,0,.1); + } + + &.tabulator-group-visible{ + .tabulator-arrow{ + margin-right:10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid $sortArrowActive; + border-bottom: 0; + } + } + + &.tabulator-group-level-1{ + padding-left:30px; + } + + &.tabulator-group-level-2{ + padding-left:50px; + } + + &.tabulator-group-level-3{ + padding-left:70px; + } + + &.tabulator-group-level-4{ + padding-left:90px; + } + + &.tabulator-group-level-5{ + padding-left:110px; + } + + //sorting arrow + .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 $sortArrowActive; + vertical-align:middle; + } + + span{ + margin-left:10px; + color:#666; + } + } +} + +.tabulator-edit-select-list{ + position: absolute; + display:inline-block; + box-sizing:border-box; + + max-height:200px; + + background:$rowBackgroundColor; + border:1px solid $rowBorderColor; + + font-size:$textSize; + + overflow-y:auto; + -webkit-overflow-scrolling: touch; + + z-index: 10000; + + .tabulator-edit-select-list-item{ + padding:4px; + + &.active{ + color:$rowBackgroundColor; + background:$editBoxColor; + } + + &:hover{ + cursor:pointer; + + color:$rowBackgroundColor; + background:$editBoxColor; + } + } + + .tabulator-edit-select-list-group{ + border-bottom:1px solid $rowBorderColor; + + padding:4px; + padding-top:6px; + + font-weight:bold; + } +} + +// Table print styling + +.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; +} + diff --git a/js/tabulator/src/scss/bootstrap/tabulator_bootstrap4.scss b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap4.scss new file mode 100644 index 0000000..ff94d8e --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap4.scss @@ -0,0 +1,1252 @@ +@import "functions4.scss"; +@import "variables4.scss"; + +// Style conversion file, bootstrap to tabulator + +//Main Theme Variables +$backgroundColor: $table-bg !default; //background color of tabulator +$borderColor:$table-border-color !default; //border to tabulator +$textSize:$font-size-base !default; //table text size + +//header themeing +$headerBackgroundColor:#fff !default; //border to tabulator +$headerSeperatorColor:$table-border-color !default; //header bottom seperator color + +$cellPadding:$table-cell-padding !default; //padding round header + +//column header arrows +$sortArrowActive: #666 !default; +$sortArrowInactive: #bbb !default; + +//row themeing +$rowBackgroundColor:$backgroundColor !default; //table row background color +$rowAltBackgroundColor: $table-accent-bg !default; //table row background color +$rowBorderColor:$table-border-color !default; //table border color +$rowHoverBackground:$table-hover-bg !default; //row background color on hover + +$rowSelectedBackground: #9ABCEA !default; //row background color when selected +$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered + + +$editBoxColor:#1D68CD !default; //border color for edit boxes +$errorColor:#dd0000 !default; //error indication + +//footer themeing +$footerBorderColor:$pagination-border-color !default; //footer border color +$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color +$footerActiveColor:$pagination-active-color !default; //footer bottom active text color + + +//Tabulator Containing Element +.tabulator{ + position: relative; + background-color: $backgroundColor; + overflow:hidden; + font-size:$textSize; + text-align: left; + width: 100%; + max-width: 100%; + // margin-bottom: $line-height-computed; + + -webkit-transform: translatez(0); + -moz-transform: translatez(0); + -ms-transform: translatez(0); + -o-transform: translatez(0); + transform: translatez(0); + + &[tabulator-layout="fitDataFill"]{ + .tabulator-tableHolder{ + .tabulator-table{ + min-width:100%; + } + } + } + + &.tabulator-block-select{ + user-select: none; + } + + //column header containing element + .tabulator-header{ + position:relative; + box-sizing: border-box; + + width:100%; + + border-top:1px solid $headerSeperatorColor; + border-bottom:2px solid $headerSeperatorColor; + background-color: $headerBackgroundColor; + 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-header-hidden{ + display:none; + } + + //individual column header element + .tabulator-col{ + display:inline-block; + position:relative; + box-sizing:border-box; + background-color: $headerBackgroundColor; + text-align:left; + vertical-align: bottom; + overflow: hidden; + + &.tabulator-moving{ + position: absolute; + border:1px solid $headerSeperatorColor; + background:darken($headerBackgroundColor, 10%); + pointer-events: none; + } + + //hold content of column header + .tabulator-col-content{ + box-sizing:border-box; + position: relative; + padding:$cellPadding; + + //hold title of column header + .tabulator-col-title{ + box-sizing:border-box; + width: 100%; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align:bottom; + + //element to hold title editor + .tabulator-title-editor{ + box-sizing: border-box; + width: 100%; + + border:1px solid #999; + + padding:1px; + + background: #fff; + } + } + + //column sorter arrow + .tabulator-arrow{ + display: inline-block; + position: absolute; + top:14px; + right:8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid $sortArrowInactive; + } + + } + + //complex header column group + &.tabulator-col-group{ + + //gelement to hold sub columns in column group + .tabulator-col-group-cols{ + position:relative; + display: flex; + + border-top:1px solid $borderColor; + overflow: hidden; + + .tabulator-col:last-child{ + margin-right:-1px; + } + } + } + + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //placeholder element for sortable columns + &.ui-sortable-helper{ + position: absolute; + background-color:darken($headerBackgroundColor, 10%) !important; + border:1px solid $borderColor; + } + + //header filter containing element + .tabulator-header-filter{ + position: relative; + box-sizing: border-box; + margin-top:2px; + width:100%; + text-align: center; + + //styling adjustment for inbuilt editors + textarea{ + height:auto !important; + } + + svg{ + margin-top: 3px; + } + + input{ + &::-ms-clear { + width : 0; + height: 0; + } + } + } + + + //styling child elements for sortable columns + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:25px; + } + + &:hover{ + cursor:pointer; + background-color:darken($headerBackgroundColor, 10%); + } + + &[aria-sort="none"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowInactive; + } + } + + &[aria-sort="asc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowActive; + } + } + + &[aria-sort="desc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: 6px solid $sortArrowActive; + border-bottom: none; + } + } + } + + &.tabulator-col-vertical{ + .tabulator-col-content{ + .tabulator-col-title{ + writing-mode: vertical-rl; + text-orientation: mixed; + + display:flex; + align-items:center; + justify-content:center; + } + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + transform: rotate(180deg); + } + } + + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:0; + padding-top:20px; + } + + &.tabulator-col-vertical-flip{ + .tabulator-col-title{ + padding-right:0; + padding-bottom:20px; + } + + } + + .tabulator-arrow{ + right:calc(50% - 6px); + } + } + } + + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + // background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:100%; + + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $headerSeperatorColor; + + overflow: hidden; + } + + .tabulator-frozen-rows-holder{ + min-width:600%; + + &:empty{ + display: none; + } + } + } + + + + //scrolling element to hold table + .tabulator-tableHolder{ + position:relative; + width:100%; + white-space: nowrap; + overflow:auto; + -webkit-overflow-scrolling: touch; + + &:focus{ + outline: none; + } + + //default placeholder element + .tabulator-placeholder{ + box-sizing:border-box; + display: flex; + align-items:center; + + &[tabulator-render-mode="virtual"]{ + position: absolute; + top:0; + left:0; + height:100%; + } + + width:100%; + + span{ + display: inline-block; + + margin:0 auto; + padding:10px; + + color:#000; + font-weight: bold; + font-size: 20px; + } + } + + //element to hold table rows + .tabulator-table{ + position:relative; + display:inline-block; + background-color:$rowBackgroundColor; + white-space: nowrap; + overflow:visible; + + .tabulator-row{ + &.tabulator-calcs{ + font-weight: bold; + background:darken($rowAltBackgroundColor, 5%) !important; + + &.tabulator-calcs-top{ + border-bottom:2px solid $rowBorderColor; + } + + &.tabulator-calcs-bottom{ + border-top:2px solid $rowBorderColor; + } + } + } + } + } + + + //column resize handles + .tabulator-col-resize-handle{ + position:absolute; + right:0; + top:0; + bottom:0; + width:5px; + + &.prev{ + left:0; + right:auto; + } + + &:hover{ + cursor:ew-resize; + } + } + + + //footer element + .tabulator-footer{ + padding:5px 10px; + border-top:2px solid $footerSeperatorColor; + text-align:right; + font-weight:bold; + white-space:nowrap; + user-select:none; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:calc(100% + 20px); + margin:-5px -10px 5px -10px; + + text-align: left; + + background:lighten($backgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($backgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-bottom:1px solid $rowBorderColor; + border-top:1px solid $rowBorderColor; + + overflow: hidden; + + &:only-child{ + margin-bottom:-5px; + border-bottom:none; + } + } + + //pagination container element + .tabulator-paginator{ + font-family:inherit; + font-weight:inherit; + font-size:inherit; + } + + //page size select element + .tabulator-page-size{ + display:inline-block; + + margin:0 5px; + padding:2px 5px; + + border:1px solid $footerBorderColor; + border-radius:3px; + } + + //pagination container element + .tabulator-pages{ + // margin:0 7px; + } + + //pagination button + .tabulator-page{ + display:inline-block; + + margin:0; + margin-top:5px; + padding:8px 12px; + + border:1px solid $footerBorderColor; + border-right:none; + + background:rgba(255,255,255,.2); + + &[data-page="first"]{ + border-top-left-radius:4px; + border-bottom-left-radius:4px; + } + + &[data-page="last"]{ + border:1px solid $footerBorderColor; + border-top-right-radius:4px; + border-bottom-right-radius:4px; + } + + &.active{ + border-color:$pagination-active-border-color; + background-color:$pagination-active-bg; + color:$footerActiveColor; + } + + &:disabled{ + border-color:$pagination-disabled-border-color; + background:$pagination-disabled-bg; + color:$pagination-disabled-color; + } + + &:not(.disabled){ + &:hover{ + cursor:pointer; + border-color:$pagination-hover-border-color; + background:$pagination-hover-bg; + color:$pagination-hover-color; + } + } + } + } + + //holding div that contains loader and covers tabulator element to prevent interaction + .tabulator-loader{ + position:absolute; + display: flex; + align-items:center; + + top:0; + left:0; + z-index:100; + + height:100%; + width:100%; + background:rgba(0,0,0,.4); + text-align:center; + + //loading message element + .tabulator-loader-msg{ + display:inline-block; + + margin:0 auto; + padding:10px 20px; + + border-radius:10px; + + background:#fff; + font-weight:bold; + font-size:16px; + + //loading message + &.tabulator-loading{ + border:4px solid #333; + color:#000; + } + + //error message + &.tabulator-error{ + border:4px solid #D00; + color:#590000; + } + } + } + + + + //Bootstrap theming classes + + &.thead-dark{ + .tabulator-header{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + + .tabulator-col{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + } + } + } + + &.table-dark{ + background-color: $table-dark-bg; + + &:not(.thead-light) .tabulator-header{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + + .tabulator-col{ + border-color: $table-dark-border-color; + background-color: $table-dark-bg; + color: $table-dark-color; + } + } + + .tabulator-tableHolder{ + color: $table-dark-color; + } + + + .tabulator-row{ + border-color: $table-dark-border-color; + + &:hover{ + background-color: $table-dark-hover-bg !important; + } + } + } + + &.table-striped{ + .tabulator-row{ + &:nth-child(even){ + background-color: $rowAltBackgroundColor; + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground; + cursor: pointer; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + } + } + + &.table-dark{ + .tabulator-row{ + &:nth-child(even){ + background-color: $table-dark-accent-bg; + } + } + } + } + + &.table-bordered{ + border:1px solid $borderColor; + + .tabulator-header{ + .tabulator-col{ + border-right:1px solid $borderColor; + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + .tabulator-cell{ + border-right:1px solid $borderColor; + } + } + } + } + } + + + &.table-borderless{ + .tabulator-header{ + border:none; + } + + .tabulator-row{ + border:none; + } + } + + &.table-sm{ + .tabulator-header{ + .tabulator-col{ + .tabulator-col-content{ + padding:$table-cell-padding-sm !important; + } + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + min-height:$textSize + ($table-cell-padding-sm * 2); + + .tabulator-cell{ + padding:$table-cell-padding-sm !important; + } + } + } + } + } + + + //row colors + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + &.table-primary{ + background:theme-color-level("primary", -9) !important; + } + &.table-secondary{ + background:theme-color-level("secondary", -9) !important; + } + &.table-success{ + background:theme-color-level("success", -9) !important; + } + &.table-info{ + background:theme-color-level("info", -9) !important; + } + &.table-warning{ + background:theme-color-level("warning", -9) !important; + } + &.table-danger{ + background:theme-color-level("danger", -9) !important; + } + &.table-light{ + background:theme-color-level("light", -9) !important; + } + &.table-dark{ + background:theme-color-level("dark", -9) !important; + } + &.table-active{ + background:$table-active-bg !important; + } + + &.bg-primary{ + background:theme-color-level("primary", 0) !important; + } + &.bg-secondary{ + background:theme-color-level("secondary", 0) !important; + } + &.bg-success{ + background:theme-color-level("success", 0) !important; + } + &.bg-info{ + background:theme-color-level("info", 0) !important; + } + &.bg-warning{ + background:theme-color-level("warning", 0) !important; + } + &.bg-danger{ + background:theme-color-level("danger", 0) !important; + } + &.bg-light{ + background:theme-color-level("light", 0) !important; + } + &.bg-dark{ + background:theme-color-level("dark", 0) !important; + } + &.bg-active{ + background:$table-active-bg !important; + } + + .tabulator-cell{ + &.table-primary{ + background:theme-color-level("primary", -9) !important; + } + &.table-secondary{ + background:theme-color-level("secondary", -9) !important; + } + &.table-success{ + background:theme-color-level("success", -9) !important; + } + &.table-info{ + background:theme-color-level("info", -9) !important; + } + &.table-warning{ + background:theme-color-level("warning", -9) !important; + } + &.table-danger{ + background:theme-color-level("danger", -9) !important; + } + &.table-light{ + background:theme-color-level("light", -9) !important; + } + &.table-dark{ + background:theme-color-level("dark", -9) !important; + } + &.table-active{ + background:$table-active-bg !important; + } + + &.bg-primary{ + background:theme-color-level("primary", 0) !important; + } + &.bg-secondary{ + background:theme-color-level("secondary", 0) !important; + } + &.bg-success{ + background:theme-color-level("success", 0) !important; + } + &.bg-info{ + background:theme-color-level("info", 0) !important; + } + &.bg-warning{ + background:theme-color-level("warning", 0) !important; + } + &.bg-danger{ + background:theme-color-level("danger", 0) !important; + } + &.bg-light{ + background:theme-color-level("light", 0) !important; + } + &.bg-dark{ + background:theme-color-level("dark", 0) !important; + } + &.bg-active{ + background:$table-active-bg !important; + } + } + } + } + } + +} + +//row element +.tabulator-row{ + position: relative; + box-sizing: border-box; + + min-height:$textSize + ($cellPadding * 2); + background-color: $rowBackgroundColor; + border-bottom:1px solid $rowBorderColor; + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground; + cursor: pointer; + } + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + + &.tabulator-moving{ + position: absolute; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + pointer-events: none !important; + z-index:15; + } + + //row resize handles + .tabulator-row-resize-handle{ + position:absolute; + right:0; + bottom:0; + left:0; + height:5px; + + &.prev{ + top:0; + bottom:auto; + } + + &:hover{ + cursor:ns-resize; + } + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-responsive-collapse{ + box-sizing:border-box; + + padding:5px; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + &:empty{ + display:none; + } + + table{ + font-size:$textSize; + + tr{ + td{ + position: relative; + + &:first-of-type{ + padding-right:10px; + } + } + } + } + } + + //cell element + .tabulator-cell{ + display:inline-block; + position: relative; + box-sizing:border-box; + padding:$cellPadding; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + + &:last-of-type{ + border-right: none; + } + + &.tabulator-editing{ + border:1px solid $editBoxColor; + padding: 0; + + input, select{ + border:1px; + background:transparent; + } + } + + &.tabulator-validation-fail{ + border:1px solid $errorColor; + input, select{ + border:1px; + background:transparent; + + color: $errorColor; + } + } + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //movable row handle + &.tabulator-row-handle{ + + display: inline-flex; + align-items:center; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //handle holder + .tabulator-row-handle-box{ + width:80%; + + //Hamburger element + .tabulator-row-handle-bar{ + width:100%; + height:3px; + margin-top:2px; + background:#666; + } + } + } + + .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 $rowBorderColor; + border-bottom:2px solid $rowBorderColor; + } + + .tabulator-data-tree-control{ + + display:inline-flex; + justify-content: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; + + &:hover{ + cursor:pointer; + background:rgba(0, 0, 0, .2); + } + + .tabulator-data-tree-control-collapse{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: transparent; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #ccc; + } + } + + .tabulator-data-tree-control-expand{ + display:inline-block; + position: relative; + + height: 7px; + width: 1px; + + background: #ccc; + + &:after { + position: absolute; + content: ""; + left: -3px; + top: 3px; + + height: 1px; + width: 7px; + + background: #ccc; + } + } + + } + + .tabulator-responsive-collapse-toggle{ + display: inline-flex; + align-items: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:$rowBackgroundColor; + font-weight:bold; + font-size:1.1em; + + &:hover{ + opacity:.7; + } + + &.open{ + .tabulator-responsive-collapse-toggle-close{ + display:initial; + } + + .tabulator-responsive-collapse-toggle-open{ + display:none; + } + } + + .tabulator-responsive-collapse-toggle-close{ + display:none; + } + } + + .tabulator-traffic-light{ + display: inline-block; + height:14px; + width:14px; + + border-radius:14px; + } + } + + //row grouping element + &.tabulator-group{ + + box-sizing:border-box; + border-bottom:1px solid #999; + border-right:1px solid $rowBorderColor; + border-top:1px solid #999; + padding:5px; + padding-left:10px; + background:#fafafa; + font-weight:bold; + + min-width: 100%; + + &:hover{ + cursor:pointer; + background-color:rgba(0,0,0,.1); + } + + &.tabulator-group-visible{ + .tabulator-arrow{ + margin-right:10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid $sortArrowActive; + border-bottom: 0; + } + } + + &.tabulator-group-level-1{ + padding-left:30px; + } + + &.tabulator-group-level-2{ + padding-left:50px; + } + + &.tabulator-group-level-3{ + padding-left:70px; + } + + &.tabulator-group-level-4{ + padding-left:90px; + } + + &.tabulator-group-level-5{ + padding-left:110px; + } + + + //sorting arrow + .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 $sortArrowActive; + vertical-align:middle; + } + + span{ + margin-left:10px; + color:#666; + } + } +} + +.tabulator-edit-select-list{ + position: absolute; + display:inline-block; + box-sizing:border-box; + + max-height:200px; + + background:$headerBackgroundColor; + border:1px solid $rowBorderColor; + + font-size:$textSize; + + overflow-y:auto; + -webkit-overflow-scrolling: touch; + + z-index: 10000; + + .tabulator-edit-select-list-item{ + padding:4px; + + &.active{ + color:$headerBackgroundColor; + background:$editBoxColor; + } + + &:hover{ + cursor:pointer; + + color:$headerBackgroundColor; + background:$editBoxColor; + } + } + + .tabulator-edit-select-list-group{ + border-bottom:1px solid $rowBorderColor; + + padding:4px; + padding-top:6px; + + font-weight:bold; + } +} + +// Table print styling + +.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; +} + diff --git a/js/tabulator/src/scss/bootstrap/variables.scss b/js/tabulator/src/scss/bootstrap/variables.scss new file mode 100644 index 0000000..572c983 --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/variables.scss @@ -0,0 +1,870 @@ +// +// Variables +// -------------------------------------------------- + + +//== Colors +// +//## Gray and brand colors for use across Bootstrap. + +$gray-base: #000 !default; +$gray-darker: lighten($gray-base, 13.5%) !default; // #222 +$gray-dark: lighten($gray-base, 20%) !default; // #333 +$gray: lighten($gray-base, 33.5%) !default; // #555 +$gray-light: lighten($gray-base, 46.7%) !default; // #777 +$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee + +$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7 +$brand-success: #5cb85c !default; +$brand-info: #5bc0de !default; +$brand-warning: #f0ad4e !default; +$brand-danger: #d9534f !default; + + +//== Scaffolding +// +//## Settings for some of the most global styles. + +//** Background color for ``. +$body-bg: #fff !default; +//** Global text color on ``. +$text-color: $gray-dark !default; + +//** Global textual link color. +$link-color: $brand-primary !default; +//** Link hover color set via `darken()` function. +$link-hover-color: darken($link-color, 15%) !default; +//** Link hover decoration. +$link-hover-decoration: underline !default; + + +//== Typography +// +//## Font, line-height, and color for body text, headings, and more. + +$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; +$font-family-serif: Georgia, "Times New Roman", Times, serif !default; +//** Default monospace fonts for ``, ``, and `
`.
+$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
+$font-family-base:        $font-family-sans-serif !default;
+
+$font-size-base:          14px !default;
+$font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
+$font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px
+
+$font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
+$font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
+$font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
+$font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
+$font-size-h5:            $font-size-base !default;
+$font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px
+
+//** Unit-less `line-height` for use in components like buttons.
+$line-height-base:        1.428571429 !default; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
+
+//** By default, this inherits from the ``.
+$headings-font-family:    inherit !default;
+$headings-font-weight:    500 !default;
+$headings-line-height:    1.1 !default;
+$headings-color:          inherit !default;
+
+
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+//** Load fonts from this directory.
+$icon-font-path:          "../fonts/" !default;
+//** File name for all font files.
+$icon-font-name:          "glyphicons-halflings-regular" !default;
+//** Element ID within SVG icon file.
+$icon-font-svg-id:        "glyphicons_halflingsregular" !default;
+
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1@mixin 428 line-height (~20px to start).
+
+$padding-base-vertical:     6px !default;
+$padding-base-horizontal:   12px !default;
+
+$padding-large-vertical:    10px !default;
+$padding-large-horizontal:  16px !default;
+
+$padding-small-vertical:    5px !default;
+$padding-small-horizontal:  10px !default;
+
+$padding-xs-vertical:       1px !default;
+$padding-xs-horizontal:     5px !default;
+
+$line-height-large:         1.3333333 !default; // extra decimals for Win 8.1 Chrome
+$line-height-small:         1.5 !default;
+
+$border-radius-base:        4px !default;
+$border-radius-large:       6px !default;
+$border-radius-small:       3px !default;
+
+//** Global color for active items (e.g., navs or dropdowns).
+$component-active-color:    #fff !default;
+//** Global background color for active items (e.g., navs or dropdowns).
+$component-active-bg:       $brand-primary !default;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+$caret-width-base:          4px !default;
+//** Carets increase slightly in size for larger components.
+$caret-width-large:         5px !default;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for ``s and ``s.
+$table-cell-padding:            8px !default;
+//** Padding for cells in `.table-condensed`.
+$table-condensed-cell-padding:  5px !default;
+
+//** Default background color used for all tables.
+// $table-bg:                      transparent !default;
+$table-bg:                      #fff !default;
+//** Background color used for `.table-striped`.
+$table-bg-accent:               #f9f9f9 !default;
+//** Background color used for `.table-hover`.
+$table-bg-hover:                #f5f5f5 !default;
+$table-bg-active:               $table-bg-hover !default;
+
+//** Border color for table and cell borders.
+$table-border-color:            #ddd !default;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+$btn-font-weight:                normal !default;
+
+$btn-default-color:              #333 !default;
+$btn-default-bg:                 #fff !default;
+$btn-default-border:             #ccc !default;
+
+$btn-primary-color:              #fff !default;
+$btn-primary-bg:                 $brand-primary !default;
+$btn-primary-border:             darken($btn-primary-bg, 5%) !default;
+
+$btn-success-color:              #fff !default;
+$btn-success-bg:                 $brand-success !default;
+$btn-success-border:             darken($btn-success-bg, 5%) !default;
+
+$btn-info-color:                 #fff !default;
+$btn-info-bg:                    $brand-info !default;
+$btn-info-border:                darken($btn-info-bg, 5%) !default;
+
+$btn-warning-color:              #fff !default;
+$btn-warning-bg:                 $brand-warning !default;
+$btn-warning-border:             darken($btn-warning-bg, 5%) !default;
+
+$btn-danger-color:               #fff !default;
+$btn-danger-bg:                  $brand-danger !default;
+$btn-danger-border:              darken($btn-danger-bg, 5%) !default;
+
+$btn-link-disabled-color:        $gray-light !default;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius-base:         $border-radius-base !default;
+$btn-border-radius-large:        $border-radius-large !default;
+$btn-border-radius-small:        $border-radius-small !default;
+
+
+//== Forms
+//
+//##
+
+//** `` background color
+$input-bg:                       #fff !default;
+//** `` background color
+$input-bg-disabled:              $gray-lighter !default;
+
+//** Text color for ``s
+$input-color:                    $gray !default;
+//** `` border color
+$input-border:                   #ccc !default;
+
+// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
+//** Default `.form-control` border radius
+// This has no effect on ``s in CSS.
+$input-border-radius:            $border-radius-base !default;
+//** Large `.form-control` border radius
+$input-border-radius-large:      $border-radius-large !default;
+//** Small `.form-control` border radius
+$input-border-radius-small:      $border-radius-small !default;
+
+//** Border color for inputs on focus
+$input-border-focus:             #66afe9 !default;
+
+//** Placeholder text color
+$input-color-placeholder:        #999 !default;
+
+//** Default `.form-control` height
+$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
+//** Large `.form-control` height
+$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
+//** Small `.form-control` height
+$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
+
+//** `.form-group` margin
+$form-group-margin-bottom:       15px !default;
+
+$legend-color:                   $gray-dark !default;
+$legend-border-color:            #e5e5e5 !default;
+
+//** Background color for textual input addons
+$input-group-addon-bg:           $gray-lighter !default;
+//** Border color for textual input addons
+$input-group-addon-border-color: $input-border !default;
+
+//** Disabled cursor for form controls and buttons.
+$cursor-disabled:                not-allowed !default;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+$dropdown-bg:                    #fff !default;
+//** Dropdown menu `border-color`.
+$dropdown-border:                rgba(0,0,0,.15) !default;
+//** Dropdown menu `border-color` **for IE8**.
+$dropdown-fallback-border:       #ccc !default;
+//** Divider color for between dropdown items.
+$dropdown-divider-bg:            #e5e5e5 !default;
+
+//** Dropdown link text color.
+$dropdown-link-color:            $gray-dark !default;
+//** Hover color for dropdown links.
+$dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
+//** Hover background for dropdown links.
+$dropdown-link-hover-bg:         #f5f5f5 !default;
+
+//** Active dropdown menu item text color.
+$dropdown-link-active-color:     $component-active-color !default;
+//** Active dropdown menu item background color.
+$dropdown-link-active-bg:        $component-active-bg !default;
+
+//** Disabled dropdown menu item background color.
+$dropdown-link-disabled-color:   $gray-light !default;
+
+//** Text color for headers within dropdown menus.
+$dropdown-header-color:          $gray-light !default;
+
+//** Deprecated `$dropdown-caret-color` as of v3.1.0
+$dropdown-caret-color:           #000 !default;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+$zindex-navbar:            1000 !default;
+$zindex-dropdown:          1000 !default;
+$zindex-popover:           1060 !default;
+$zindex-tooltip:           1070 !default;
+$zindex-navbar-fixed:      1030 !default;
+$zindex-modal-background:  1040 !default;
+$zindex-modal:             1050 !default;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+//** Deprecated `$screen-xs` as of v3.0.1
+$screen-xs:                  480px !default;
+//** Deprecated `$screen-xs-min` as of v3.2.0
+$screen-xs-min:              $screen-xs !default;
+//** Deprecated `$screen-phone` as of v3.0.1
+$screen-phone:               $screen-xs-min !default;
+
+// Small screen / tablet
+//** Deprecated `$screen-sm` as of v3.0.1
+$screen-sm:                  768px !default;
+$screen-sm-min:              $screen-sm !default;
+//** Deprecated `$screen-tablet` as of v3.0.1
+$screen-tablet:              $screen-sm-min !default;
+
+// Medium screen / desktop
+//** Deprecated `$screen-md` as of v3.0.1
+$screen-md:                  992px !default;
+$screen-md-min:              $screen-md !default;
+//** Deprecated `$screen-desktop` as of v3.0.1
+$screen-desktop:             $screen-md-min !default;
+
+// Large screen / wide desktop
+//** Deprecated `$screen-lg` as of v3.0.1
+$screen-lg:                  1200px !default;
+$screen-lg-min:              $screen-lg !default;
+//** Deprecated `$screen-lg-desktop` as of v3.0.1
+$screen-lg-desktop:          $screen-lg-min !default;
+
+// So media queries don't overlap when required, provide a maximum
+$screen-xs-max:              ($screen-sm-min - 1) !default;
+$screen-sm-max:              ($screen-md-min - 1) !default;
+$screen-md-max:              ($screen-lg-min - 1) !default;
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+$grid-columns:              12 !default;
+//** Padding between columns. Gets divided in half for the left and right.
+$grid-gutter-width:         30px !default;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+$grid-float-breakpoint:     $screen-sm-min !default;
+//** Point at which the navbar begins collapsing.
+$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+$container-tablet:             (720px + $grid-gutter-width) !default;
+//** For `$screen-sm-min` and up.
+$container-sm:                 $container-tablet !default;
+
+// Medium screen / desktop
+$container-desktop:            (940px + $grid-gutter-width) !default;
+//** For `$screen-md-min` and up.
+$container-md:                 $container-desktop !default;
+
+// Large screen / wide desktop
+$container-large-desktop:      (1140px + $grid-gutter-width) !default;
+//** For `$screen-lg-min` and up.
+$container-lg:                 $container-large-desktop !default;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+$navbar-height:                    50px !default;
+$navbar-margin-bottom:             $line-height-computed !default;
+$navbar-border-radius:             $border-radius-base !default;
+$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
+$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
+$navbar-collapse-max-height:       340px !default;
+
+$navbar-default-color:             #777 !default;
+$navbar-default-bg:                #f8f8f8 !default;
+$navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;
+
+// Navbar links
+$navbar-default-link-color:                #777 !default;
+$navbar-default-link-hover-color:          #333 !default;
+$navbar-default-link-hover-bg:             transparent !default;
+$navbar-default-link-active-color:         #555 !default;
+$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
+$navbar-default-link-disabled-color:       #ccc !default;
+$navbar-default-link-disabled-bg:          transparent !default;
+
+// Navbar brand label
+$navbar-default-brand-color:               $navbar-default-link-color !default;
+$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
+$navbar-default-brand-hover-bg:            transparent !default;
+
+// Navbar toggle
+$navbar-default-toggle-hover-bg:           #ddd !default;
+$navbar-default-toggle-icon-bar-bg:        #888 !default;
+$navbar-default-toggle-border-color:       #ddd !default;
+
+
+//=== Inverted navbar
+// Reset inverted navbar basics
+$navbar-inverse-color:                      lighten($gray-light, 15%) !default;
+$navbar-inverse-bg:                         #222 !default;
+$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;
+
+// Inverted navbar links
+$navbar-inverse-link-color:                 lighten($gray-light, 15%) !default;
+$navbar-inverse-link-hover-color:           #fff !default;
+$navbar-inverse-link-hover-bg:              transparent !default;
+$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
+$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
+$navbar-inverse-link-disabled-color:        #444 !default;
+$navbar-inverse-link-disabled-bg:           transparent !default;
+
+// Inverted navbar brand label
+$navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
+$navbar-inverse-brand-hover-color:          #fff !default;
+$navbar-inverse-brand-hover-bg:             transparent !default;
+
+// Inverted navbar toggle
+$navbar-inverse-toggle-hover-bg:            #333 !default;
+$navbar-inverse-toggle-icon-bar-bg:         #fff !default;
+$navbar-inverse-toggle-border-color:        #333 !default;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+$nav-link-padding:                          10px 15px !default;
+$nav-link-hover-bg:                         $gray-lighter !default;
+
+$nav-disabled-link-color:                   $gray-light !default;
+$nav-disabled-link-hover-color:             $gray-light !default;
+
+//== Tabs
+$nav-tabs-border-color:                     #ddd !default;
+
+$nav-tabs-link-hover-border-color:          $gray-lighter !default;
+
+$nav-tabs-active-link-hover-bg:             $body-bg !default;
+$nav-tabs-active-link-hover-color:          $gray !default;
+$nav-tabs-active-link-hover-border-color:   #ddd !default;
+
+$nav-tabs-justified-link-border-color:            #ddd !default;
+$nav-tabs-justified-active-link-border-color:     $body-bg !default;
+
+//== Pills
+$nav-pills-border-radius:                   $border-radius-base !default;
+$nav-pills-active-link-hover-bg:            $component-active-bg !default;
+$nav-pills-active-link-hover-color:         $component-active-color !default;
+
+
+//== Pagination
+//
+//##
+
+$pagination-color:                     $link-color !default;
+$pagination-bg:                        #fff !default;
+$pagination-border:                    #ddd !default;
+
+$pagination-hover-color:               $link-hover-color !default;
+$pagination-hover-bg:                  $gray-lighter !default;
+$pagination-hover-border:              #ddd !default;
+
+$pagination-active-color:              #fff !default;
+$pagination-active-bg:                 $brand-primary !default;
+$pagination-active-border:             $brand-primary !default;
+
+$pagination-disabled-color:            $gray-light !default;
+$pagination-disabled-bg:               #fff !default;
+$pagination-disabled-border:           #ddd !default;
+
+
+//== Pager
+//
+//##
+
+$pager-bg:                             $pagination-bg !default;
+$pager-border:                         $pagination-border !default;
+$pager-border-radius:                  15px !default;
+
+$pager-hover-bg:                       $pagination-hover-bg !default;
+
+$pager-active-bg:                      $pagination-active-bg !default;
+$pager-active-color:                   $pagination-active-color !default;
+
+$pager-disabled-color:                 $pagination-disabled-color !default;
+
+
+//== Jumbotron
+//
+//##
+
+$jumbotron-padding:              30px !default;
+$jumbotron-color:                inherit !default;
+$jumbotron-bg:                   $gray-lighter !default;
+$jumbotron-heading-color:        inherit !default;
+$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
+$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5)) !default;
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+$state-success-text:             #3c763d !default;
+$state-success-bg:               #dff0d8 !default;
+$state-success-border:           darken(adjust-hue($state-success-bg, -10%), 5%) !default;
+
+$state-info-text:                #31708f !default;
+$state-info-bg:                  #d9edf7 !default;
+$state-info-border:              darken(adjust-hue($state-info-bg, -10%), 7%) !default;
+
+$state-warning-text:             #8a6d3b !default;
+$state-warning-bg:               #fcf8e3 !default;
+$state-warning-border:           darken(adjust-hue($state-warning-bg, -10%), 5%) !default;
+
+$state-danger-text:              #a94442 !default;
+$state-danger-bg:                #f2dede !default;
+$state-danger-border:            darken(adjust-hue($state-danger-bg, -10%), 5%) !default;
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+$tooltip-max-width:           200px !default;
+//** Tooltip text color
+$tooltip-color:               #fff !default;
+//** Tooltip background color
+$tooltip-bg:                  #000 !default;
+$tooltip-opacity:             .9 !default;
+
+//** Tooltip arrow width
+$tooltip-arrow-width:         5px !default;
+//** Tooltip arrow color
+$tooltip-arrow-color:         $tooltip-bg !default;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+$popover-bg:                          #fff !default;
+//** Popover maximum width
+$popover-max-width:                   276px !default;
+//** Popover border color
+$popover-border-color:                rgba(0,0,0,.2) !default;
+//** Popover fallback border color
+$popover-fallback-border-color:       #ccc !default;
+
+//** Popover title background color
+$popover-title-bg:                    darken($popover-bg, 3%) !default;
+
+//** Popover arrow width
+$popover-arrow-width:                 10px !default;
+//** Popover arrow color
+$popover-arrow-color:                 $popover-bg !default;
+
+//** Popover outer arrow width
+$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
+//** Popover outer arrow color
+$popover-arrow-outer-color:           fadein($popover-border-color, 5%) !default;
+//** Popover outer arrow fallback color
+$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+$label-default-bg:            $gray-light !default;
+//** Primary label background color
+$label-primary-bg:            $brand-primary !default;
+//** Success label background color
+$label-success-bg:            $brand-success !default;
+//** Info label background color
+$label-info-bg:               $brand-info !default;
+//** Warning label background color
+$label-warning-bg:            $brand-warning !default;
+//** Danger label background color
+$label-danger-bg:             $brand-danger !default;
+
+//** Default label text color
+$label-color:                 #fff !default;
+//** Default text color of a linked label
+$label-link-hover-color:      #fff !default;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+$modal-inner-padding:         15px !default;
+
+//** Padding applied to the modal title
+$modal-title-padding:         15px !default;
+//** Modal title line-height
+$modal-title-line-height:     $line-height-base !default;
+
+//** Background color of modal content area
+$modal-content-bg:                             #fff !default;
+//** Modal content border color
+$modal-content-border-color:                   rgba(0,0,0,.2) !default;
+//** Modal content border color **for IE8**
+$modal-content-fallback-border-color:          #999 !default;
+
+//** Modal backdrop background color
+$modal-backdrop-bg:           #000 !default;
+//** Modal backdrop opacity
+$modal-backdrop-opacity:      .5 !default;
+//** Modal header border color
+$modal-header-border-color:   #e5e5e5 !default;
+//** Modal footer border color
+$modal-footer-border-color:   $modal-header-border-color !default;
+
+$modal-lg:                    900px !default;
+$modal-md:                    600px !default;
+$modal-sm:                    300px !default;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+$alert-padding:               15px !default;
+$alert-border-radius:         $border-radius-base !default;
+$alert-link-font-weight:      bold !default;
+
+$alert-success-bg:            $state-success-bg !default;
+$alert-success-text:          $state-success-text !default;
+$alert-success-border:        $state-success-border !default;
+
+$alert-info-bg:               $state-info-bg !default;
+$alert-info-text:             $state-info-text !default;
+$alert-info-border:           $state-info-border !default;
+
+$alert-warning-bg:            $state-warning-bg !default;
+$alert-warning-text:          $state-warning-text !default;
+$alert-warning-border:        $state-warning-border !default;
+
+$alert-danger-bg:             $state-danger-bg !default;
+$alert-danger-text:           $state-danger-text !default;
+$alert-danger-border:         $state-danger-border !default;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+$progress-bg:                 #f5f5f5 !default;
+//** Progress bar text color
+$progress-bar-color:          #fff !default;
+//** Variable for setting rounded corners on progress bar.
+$progress-border-radius:      $border-radius-base !default;
+
+//** Default progress bar color
+$progress-bar-bg:             $brand-primary !default;
+//** Success progress bar color
+$progress-bar-success-bg:     $brand-success !default;
+//** Warning progress bar color
+$progress-bar-warning-bg:     $brand-warning !default;
+//** Danger progress bar color
+$progress-bar-danger-bg:      $brand-danger !default;
+//** Info progress bar color
+$progress-bar-info-bg:        $brand-info !default;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+$list-group-bg:                 #fff !default;
+//** `.list-group-item` border color
+$list-group-border:             #ddd !default;
+//** List group border radius
+$list-group-border-radius:      $border-radius-base !default;
+
+//** Background color of single list items on hover
+$list-group-hover-bg:           #f5f5f5 !default;
+//** Text color of active list items
+$list-group-active-color:       $component-active-color !default;
+//** Background color of active list items
+$list-group-active-bg:          $component-active-bg !default;
+//** Border color of active list elements
+$list-group-active-border:      $list-group-active-bg !default;
+//** Text color for content within active list items
+$list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;
+
+//** Text color of disabled list items
+$list-group-disabled-color:      $gray-light !default;
+//** Background color of disabled list items
+$list-group-disabled-bg:         $gray-lighter !default;
+//** Text color for content within disabled list items
+$list-group-disabled-text-color: $list-group-disabled-color !default;
+
+$list-group-link-color:         #555 !default;
+$list-group-link-hover-color:   $list-group-link-color !default;
+$list-group-link-heading-color: #333 !default;
+
+
+//== Panels
+//
+//##
+
+$panel-bg:                    #fff !default;
+$panel-body-padding:          15px !default;
+$panel-heading-padding:       10px 15px !default;
+$panel-footer-padding:        $panel-heading-padding !default;
+$panel-border-radius:         $border-radius-base !default;
+
+//** Border color for elements within panels
+$panel-inner-border:          #ddd !default;
+$panel-footer-bg:             #f5f5f5 !default;
+
+$panel-default-text:          $gray-dark !default;
+$panel-default-border:        #ddd !default;
+$panel-default-heading-bg:    #f5f5f5 !default;
+
+$panel-primary-text:          #fff !default;
+$panel-primary-border:        $brand-primary !default;
+$panel-primary-heading-bg:    $brand-primary !default;
+
+$panel-success-text:          $state-success-text !default;
+$panel-success-border:        $state-success-border !default;
+$panel-success-heading-bg:    $state-success-bg !default;
+
+$panel-info-text:             $state-info-text !default;
+$panel-info-border:           $state-info-border !default;
+$panel-info-heading-bg:       $state-info-bg !default;
+
+$panel-warning-text:          $state-warning-text !default;
+$panel-warning-border:        $state-warning-border !default;
+$panel-warning-heading-bg:    $state-warning-bg !default;
+
+$panel-danger-text:           $state-danger-text !default;
+$panel-danger-border:         $state-danger-border !default;
+$panel-danger-heading-bg:     $state-danger-bg !default;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+$thumbnail-padding:           4px !default;
+//** Thumbnail background color
+$thumbnail-bg:                $body-bg !default;
+//** Thumbnail border color
+$thumbnail-border:            #ddd !default;
+//** Thumbnail border radius
+$thumbnail-border-radius:     $border-radius-base !default;
+
+//** Custom text color for thumbnail captions
+$thumbnail-caption-color:     $text-color !default;
+//** Padding around the thumbnail caption
+$thumbnail-caption-padding:   9px !default;
+
+
+//== Wells
+//
+//##
+
+$well-bg:                     #f5f5f5 !default;
+$well-border:                 darken($well-bg, 7%) !default;
+
+
+//== Badges
+//
+//##
+
+$badge-color:                 #fff !default;
+//** Linked badge text color on hover
+$badge-link-hover-color:      #fff !default;
+$badge-bg:                    $gray-light !default;
+
+//** Badge text color in active nav link
+$badge-active-color:          $link-color !default;
+//** Badge background color in active nav link
+$badge-active-bg:             #fff !default;
+
+$badge-font-weight:           bold !default;
+$badge-line-height:           1 !default;
+$badge-border-radius:         10px !default;
+
+
+//== Breadcrumbs
+//
+//##
+
+$breadcrumb-padding-vertical:   8px !default;
+$breadcrumb-padding-horizontal: 15px !default;
+//** Breadcrumb background color
+$breadcrumb-bg:                 #f5f5f5 !default;
+//** Breadcrumb text color
+$breadcrumb-color:              #ccc !default;
+//** Text color of current page in the breadcrumb
+$breadcrumb-active-color:       $gray-light !default;
+//** Textual separator for between breadcrumb elements
+$breadcrumb-separator:          "/" !default;
+
+
+//== Carousel
+//
+//##
+
+$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
+
+$carousel-control-color:                      #fff !default;
+$carousel-control-width:                      15% !default;
+$carousel-control-opacity:                    .5 !default;
+$carousel-control-font-size:                  20px !default;
+
+$carousel-indicator-active-bg:                #fff !default;
+$carousel-indicator-border-color:             #fff !default;
+
+$carousel-caption-color:                      #fff !default;
+
+
+//== Close
+//
+//##
+
+$close-font-weight:           bold !default;
+$close-color:                 #000 !default;
+$close-text-shadow:           0 1px 0 #fff !default;
+
+
+//== Code
+//
+//##
+
+$code-color:                  #c7254e !default;
+$code-bg:                     #f9f2f4 !default;
+
+$kbd-color:                   #fff !default;
+$kbd-bg:                      #333 !default;
+
+$pre-bg:                      #f5f5f5 !default;
+$pre-color:                   $gray-dark !default;
+$pre-border-color:            #ccc !default;
+$pre-scrollable-max-height:   340px !default;
+
+
+//== Type
+//
+//##
+
+//** Horizontal offset for forms and lists.
+$component-offset-horizontal: 180px !default;
+//** Text muted color
+$text-muted:                  $gray-light !default;
+//** Abbreviations and acronyms border color
+$abbr-border-color:           $gray-light !default;
+//** Headings small color
+$headings-small-color:        $gray-light !default;
+//** Blockquote small color
+$blockquote-small-color:      $gray-light !default;
+//** Blockquote font size
+$blockquote-font-size:        ($font-size-base * 1.25) !default;
+//** Blockquote border color
+$blockquote-border-color:     $gray-lighter !default;
+//** Page header border color
+$page-header-border-color:    $gray-lighter !default;
+//** Width of horizontal description list titles
+$dl-horizontal-offset:        $component-offset-horizontal !default;
+//** Point at which .dl-horizontal becomes horizontal
+$dl-horizontal-breakpoint:    $grid-float-breakpoint !default;
+//** Horizontal line color.
+$hr-border:                   $gray-lighter !default;
diff --git a/js/tabulator/src/scss/bootstrap/variables4.scss b/js/tabulator/src/scss/bootstrap/variables4.scss
new file mode 100644
index 0000000..e1718b5
--- /dev/null
+++ b/js/tabulator/src/scss/bootstrap/variables4.scss
@@ -0,0 +1,930 @@
+
+
+// Variables
+//
+// Variables should follow the `$component-state-property-size` formula for
+// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
+
+
+//
+// Color system
+//
+
+// stylelint-disable
+$white:    #fff !default;
+$gray-100: #f8f9fa !default;
+$gray-200: #e9ecef !default;
+$gray-300: #dee2e6 !default;
+$gray-400: #ced4da !default;
+$gray-500: #adb5bd !default;
+$gray-600: #6c757d !default;
+$gray-700: #495057 !default;
+$gray-800: #343a40 !default;
+$gray-900: #212529 !default;
+$black:    #000 !default;
+
+$grays: () !default;
+$grays: map-merge((
+  "100": $gray-100,
+  "200": $gray-200,
+  "300": $gray-300,
+  "400": $gray-400,
+  "500": $gray-500,
+  "600": $gray-600,
+  "700": $gray-700,
+  "800": $gray-800,
+  "900": $gray-900
+), $grays);
+
+$blue:    #007bff !default;
+$indigo:  #6610f2 !default;
+$purple:  #6f42c1 !default;
+$pink:    #e83e8c !default;
+$red:     #dc3545 !default;
+$orange:  #fd7e14 !default;
+$yellow:  #ffc107 !default;
+$green:   #28a745 !default;
+$teal:    #20c997 !default;
+$cyan:    #17a2b8 !default;
+
+$colors: () !default;
+$colors: map-merge((
+  "blue":       $blue,
+  "indigo":     $indigo,
+  "purple":     $purple,
+  "pink":       $pink,
+  "red":        $red,
+  "orange":     $orange,
+  "yellow":     $yellow,
+  "green":      $green,
+  "teal":       $teal,
+  "cyan":       $cyan,
+  "white":      $white,
+  "gray":       $gray-600,
+  "gray-dark":  $gray-800
+), $colors);
+
+$primary:       $blue !default;
+$secondary:     $gray-600 !default;
+$success:       $green !default;
+$info:          $cyan !default;
+$warning:       $yellow !default;
+$danger:        $red !default;
+$light:         $gray-100 !default;
+$dark:          $gray-800 !default;
+
+$theme-colors: () !default;
+$theme-colors: map-merge((
+  "primary":    $primary,
+  "secondary":  $secondary,
+  "success":    $success,
+  "info":       $info,
+  "warning":    $warning,
+  "danger":     $danger,
+  "light":      $light,
+  "dark":       $dark
+), $theme-colors);
+// stylelint-enable
+
+// Set a specific jump point for requesting color jumps
+$theme-color-interval:      8% !default;
+
+// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255.
+$yiq-contrasted-threshold:  150 !default;
+
+// Customize the light and dark text colors for use in our YIQ color contrast function.
+$yiq-text-dark:             $gray-900 !default;
+$yiq-text-light:            $white !default;
+
+// Options
+//
+// Quickly modify global styling by enabling or disabling optional features.
+
+$enable-caret:              true !default;
+$enable-rounded:            true !default;
+$enable-shadows:            false !default;
+$enable-gradients:          false !default;
+$enable-transitions:        true !default;
+$enable-hover-media-query:  false !default; // Deprecated, no longer affects any compiled CSS
+$enable-grid-classes:       true !default;
+$enable-print-styles:       true !default;
+
+
+// Spacing
+//
+// Control the default styling of most Bootstrap elements by modifying these
+// variables. Mostly focused on spacing.
+// You can add more entries to the $spacers map, should you need more variation.
+
+// stylelint-disable
+$spacer: 1rem !default;
+$spacers: () !default;
+$spacers: map-merge((
+  0: 0,
+  1: ($spacer * .25),
+  2: ($spacer * .5),
+  3: $spacer,
+  4: ($spacer * 1.5),
+  5: ($spacer * 3)
+), $spacers);
+
+// This variable affects the `.h-*` and `.w-*` classes.
+$sizes: () !default;
+$sizes: map-merge((
+  25: 25%,
+  50: 50%,
+  75: 75%,
+  100: 100%,
+  auto: auto
+), $sizes);
+// stylelint-enable
+
+// Body
+//
+// Settings for the `` element.
+
+$body-bg:                   $white !default;
+$body-color:                $gray-900 !default;
+
+// Links
+//
+// Style anchor elements.
+
+$link-color:                theme-color("primary") !default;
+$link-decoration:           none !default;
+$link-hover-color:          darken($link-color, 15%) !default;
+$link-hover-decoration:     underline !default;
+
+// Paragraphs
+//
+// Style p element.
+
+$paragraph-margin-bottom:   1rem !default;
+
+
+// Grid breakpoints
+//
+// Define the minimum dimensions at which your layout will change,
+// adapting to different screen sizes, for use in media queries.
+
+$grid-breakpoints: (
+  xs: 0,
+  sm: 576px,
+  md: 768px,
+  lg: 992px,
+  xl: 1200px
+) !default;
+
+@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
+@include _assert-starts-at-zero($grid-breakpoints);
+
+
+// Grid containers
+//
+// Define the maximum width of `.container` for different screen sizes.
+
+$container-max-widths: (
+  sm: 540px,
+  md: 720px,
+  lg: 960px,
+  xl: 1140px
+) !default;
+
+@include _assert-ascending($container-max-widths, "$container-max-widths");
+
+
+// Grid columns
+//
+// Set the number of columns and specify the width of the gutters.
+
+$grid-columns:                12 !default;
+$grid-gutter-width:           30px !default;
+
+// Components
+//
+// Define common padding and border radius sizes and more.
+
+$line-height-lg:              1.5 !default;
+$line-height-sm:              1.5 !default;
+
+$border-width:                1px !default;
+$border-color:                $gray-300 !default;
+
+$border-radius:               .25rem !default;
+$border-radius-lg:            .3rem !default;
+$border-radius-sm:            .2rem !default;
+
+$box-shadow-sm:               0 .125rem .25rem rgba($black, .075) !default;
+$box-shadow:                  0 .5rem 1rem rgba($black, .15) !default;
+$box-shadow-lg:               0 1rem 3rem rgba($black, .175) !default;
+
+$component-active-color:      $white !default;
+$component-active-bg:         theme-color("primary") !default;
+
+$caret-width:                 .3em !default;
+
+$transition-base:             all .2s ease-in-out !default;
+$transition-fade:             opacity .15s linear !default;
+$transition-collapse:         height .35s ease !default;
+
+
+// Fonts
+//
+// Font, line-height, and color for body text, headings, and more.
+
+// stylelint-disable value-keyword-case
+$font-family-sans-serif:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
+$font-family-monospace:       SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
+$font-family-base:            $font-family-sans-serif !default;
+// stylelint-enable value-keyword-case
+
+$font-size-base:              1rem !default; // Assumes the browser default, typically `16px`
+$font-size-lg:                ($font-size-base * 1.25) !default;
+$font-size-sm:                ($font-size-base * .875) !default;
+
+$font-weight-light:           300 !default;
+$font-weight-normal:          400 !default;
+$font-weight-bold:            700 !default;
+
+$font-weight-base:            $font-weight-normal !default;
+$line-height-base:            1.5 !default;
+
+$h1-font-size:                $font-size-base * 2.5 !default;
+$h2-font-size:                $font-size-base * 2 !default;
+$h3-font-size:                $font-size-base * 1.75 !default;
+$h4-font-size:                $font-size-base * 1.5 !default;
+$h5-font-size:                $font-size-base * 1.25 !default;
+$h6-font-size:                $font-size-base !default;
+
+$headings-margin-bottom:      ($spacer / 2) !default;
+$headings-font-family:        inherit !default;
+$headings-font-weight:        500 !default;
+$headings-line-height:        1.2 !default;
+$headings-color:              inherit !default;
+
+$display1-size:               6rem !default;
+$display2-size:               5.5rem !default;
+$display3-size:               4.5rem !default;
+$display4-size:               3.5rem !default;
+
+$display1-weight:             300 !default;
+$display2-weight:             300 !default;
+$display3-weight:             300 !default;
+$display4-weight:             300 !default;
+$display-line-height:         $headings-line-height !default;
+
+$lead-font-size:              ($font-size-base * 1.25) !default;
+$lead-font-weight:            300 !default;
+
+$small-font-size:             80% !default;
+
+$text-muted:                  $gray-600 !default;
+
+$blockquote-small-color:      $gray-600 !default;
+$blockquote-font-size:        ($font-size-base * 1.25) !default;
+
+$hr-border-color:             rgba($black, .1) !default;
+$hr-border-width:             $border-width !default;
+
+$mark-padding:                .2em !default;
+
+$dt-font-weight:              $font-weight-bold !default;
+
+$kbd-box-shadow:              inset 0 -.1rem 0 rgba($black, .25) !default;
+$nested-kbd-font-weight:      $font-weight-bold !default;
+
+$list-inline-padding:         .5rem !default;
+
+$mark-bg:                     #fcf8e3 !default;
+
+$hr-margin-y:                 $spacer !default;
+
+
+// Tables
+//
+// Customizes the `.table` component with basic values, each used across all table variations.
+
+$table-cell-padding:          .75rem !default;
+$table-cell-padding-sm:       .3rem !default;
+
+$table-bg:                    #fff !default;
+$table-accent-bg:             #f9f9f9 !default;
+$table-hover-bg:              #f5f5f5 !default;
+$table-active-bg:             $table-hover-bg !default;
+
+$table-border-width:          $border-width !default;
+$table-border-color:          $gray-300 !default;
+
+$table-head-bg:               $gray-200 !default;
+$table-head-color:            $gray-700 !default;
+
+$table-dark-bg:               $gray-900 !default;
+$table-dark-accent-bg:        rgba($white, .05) !default;
+$table-dark-hover-bg:         rgba($white, .075) !default;
+$table-dark-border-color:     lighten($gray-900, 7.5%) !default;
+$table-dark-color:            $body-bg !default;
+
+$table-striped-order:         odd !default;
+
+$table-caption-color:         $text-muted !default;
+
+// Buttons + Forms
+//
+// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.
+
+$input-btn-padding-y:         .375rem !default;
+$input-btn-padding-x:         .75rem !default;
+$input-btn-line-height:       $line-height-base !default;
+
+$input-btn-focus-width:       .2rem !default;
+$input-btn-focus-color:       rgba($component-active-bg, .25) !default;
+$input-btn-focus-box-shadow:  0 0 0 $input-btn-focus-width $input-btn-focus-color !default;
+
+$input-btn-padding-y-sm:      .25rem !default;
+$input-btn-padding-x-sm:      .5rem !default;
+$input-btn-line-height-sm:    $line-height-sm !default;
+
+$input-btn-padding-y-lg:      .5rem !default;
+$input-btn-padding-x-lg:      1rem !default;
+$input-btn-line-height-lg:    $line-height-lg !default;
+
+$input-btn-border-width:      $border-width !default;
+
+
+// Buttons
+//
+// For each of Bootstrap's buttons, define text, background, and border color.
+
+$btn-padding-y:               $input-btn-padding-y !default;
+$btn-padding-x:               $input-btn-padding-x !default;
+$btn-line-height:             $input-btn-line-height !default;
+
+$btn-padding-y-sm:            $input-btn-padding-y-sm !default;
+$btn-padding-x-sm:            $input-btn-padding-x-sm !default;
+$btn-line-height-sm:          $input-btn-line-height-sm !default;
+
+$btn-padding-y-lg:            $input-btn-padding-y-lg !default;
+$btn-padding-x-lg:            $input-btn-padding-x-lg !default;
+$btn-line-height-lg:          $input-btn-line-height-lg !default;
+
+$btn-border-width:            $input-btn-border-width !default;
+
+$btn-font-weight:             $font-weight-normal !default;
+$btn-box-shadow:              inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;
+$btn-focus-width:             $input-btn-focus-width !default;
+$btn-focus-box-shadow:        $input-btn-focus-box-shadow !default;
+$btn-disabled-opacity:        .65 !default;
+$btn-active-box-shadow:       inset 0 3px 5px rgba($black, .125) !default;
+
+$btn-link-disabled-color:     $gray-600 !default;
+
+$btn-block-spacing-y:         .5rem !default;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius:           $border-radius !default;
+$btn-border-radius-lg:        $border-radius-lg !default;
+$btn-border-radius-sm:        $border-radius-sm !default;
+
+$btn-transition:              color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
+
+
+// Forms
+
+$label-margin-bottom:                   .5rem !default;
+
+$input-padding-y:                       $input-btn-padding-y !default;
+$input-padding-x:                       $input-btn-padding-x !default;
+$input-line-height:                     $input-btn-line-height !default;
+
+$input-padding-y-sm:                    $input-btn-padding-y-sm !default;
+$input-padding-x-sm:                    $input-btn-padding-x-sm !default;
+$input-line-height-sm:                  $input-btn-line-height-sm !default;
+
+$input-padding-y-lg:                    $input-btn-padding-y-lg !default;
+$input-padding-x-lg:                    $input-btn-padding-x-lg !default;
+$input-line-height-lg:                  $input-btn-line-height-lg !default;
+
+$input-bg:                              $white !default;
+$input-disabled-bg:                     $gray-200 !default;
+
+$input-color:                           $gray-700 !default;
+$input-border-color:                    $gray-400 !default;
+$input-border-width:                    $input-btn-border-width !default;
+$input-box-shadow:                      inset 0 1px 1px rgba($black, .075) !default;
+
+$input-border-radius:                   $border-radius !default;
+$input-border-radius-lg:                $border-radius-lg !default;
+$input-border-radius-sm:                $border-radius-sm !default;
+
+$input-focus-bg:                        $input-bg !default;
+$input-focus-border-color:              lighten($component-active-bg, 25%) !default;
+$input-focus-color:                     $input-color !default;
+$input-focus-width:                     $input-btn-focus-width !default;
+$input-focus-box-shadow:                $input-btn-focus-box-shadow !default;
+
+$input-placeholder-color:               $gray-600 !default;
+$input-plaintext-color:                 $body-color !default;
+
+$input-height-border:                   $input-border-width * 2 !default;
+
+$input-height-inner:                    ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
+$input-height:                          calc(#{$input-height-inner} + #{$input-height-border}) !default;
+
+$input-height-inner-sm:                 ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
+$input-height-sm:                       calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
+
+$input-height-inner-lg:                 ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
+$input-height-lg:                       calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
+
+$input-transition:                      border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
+
+$form-text-margin-top:                  .25rem !default;
+
+$form-check-input-gutter:               1.25rem !default;
+$form-check-input-margin-y:             .3rem !default;
+$form-check-input-margin-x:             .25rem !default;
+
+$form-check-inline-margin-x:            .75rem !default;
+$form-check-inline-input-margin-x:      .3125rem !default;
+
+$form-group-margin-bottom:              1rem !default;
+
+$input-group-addon-color:               $input-color !default;
+$input-group-addon-bg:                  $gray-200 !default;
+$input-group-addon-border-color:        $input-border-color !default;
+
+$custom-control-gutter:                 1.5rem !default;
+$custom-control-spacer-x:               1rem !default;
+
+$custom-control-indicator-size:         1rem !default;
+$custom-control-indicator-bg:           $gray-300 !default;
+$custom-control-indicator-bg-size:      50% 50% !default;
+$custom-control-indicator-box-shadow:   inset 0 .25rem .25rem rgba($black, .1) !default;
+
+$custom-control-indicator-disabled-bg:          $gray-200 !default;
+$custom-control-label-disabled-color:           $gray-600 !default;
+
+$custom-control-indicator-checked-color:        $component-active-color !default;
+$custom-control-indicator-checked-bg:           $component-active-bg !default;
+$custom-control-indicator-checked-disabled-bg:  rgba(theme-color("primary"), .5) !default;
+$custom-control-indicator-checked-box-shadow:   none !default;
+
+$custom-control-indicator-focus-box-shadow:     0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
+
+$custom-control-indicator-active-color:         $component-active-color !default;
+$custom-control-indicator-active-bg:            lighten($component-active-bg, 35%) !default;
+$custom-control-indicator-active-box-shadow:    none !default;
+
+$custom-checkbox-indicator-border-radius:       $border-radius !default;
+$custom-checkbox-indicator-icon-checked:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$custom-checkbox-indicator-indeterminate-bg:          $component-active-bg !default;
+$custom-checkbox-indicator-indeterminate-color:       $custom-control-indicator-checked-color !default;
+$custom-checkbox-indicator-icon-indeterminate:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-checkbox-indicator-indeterminate-box-shadow:  none !default;
+
+$custom-radio-indicator-border-radius:          50% !default;
+$custom-radio-indicator-icon-checked:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$custom-select-padding-y:           .375rem !default;
+$custom-select-padding-x:           .75rem !default;
+$custom-select-height:              $input-height !default;
+$custom-select-indicator-padding:   1rem !default; // Extra padding to account for the presence of the background-image based indicator
+$custom-select-line-height:         $input-btn-line-height !default;
+$custom-select-color:               $input-color !default;
+$custom-select-disabled-color:      $gray-600 !default;
+$custom-select-bg:                  $input-bg !default;
+$custom-select-disabled-bg:         $gray-200 !default;
+$custom-select-bg-size:             8px 10px !default; // In pixels because image dimensions
+$custom-select-indicator-color:     $gray-800 !default;
+$custom-select-indicator:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-select-border-width:        $input-btn-border-width !default;
+$custom-select-border-color:        $input-border-color !default;
+$custom-select-border-radius:       $border-radius !default;
+
+$custom-select-focus-border-color:  $input-focus-border-color !default;
+$custom-select-focus-box-shadow:    inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
+
+$custom-select-font-size-sm:        75% !default;
+$custom-select-height-sm:           $input-height-sm !default;
+
+$custom-select-font-size-lg:        125% !default;
+$custom-select-height-lg:           $input-height-lg !default;
+
+$custom-range-track-width:          100% !default;
+$custom-range-track-height:         .5rem !default;
+$custom-range-track-cursor:         pointer !default;
+$custom-range-track-bg:             $gray-300 !default;
+$custom-range-track-border-radius:  1rem !default;
+$custom-range-track-box-shadow:     inset 0 .25rem .25rem rgba($black, .1) !default;
+
+$custom-range-thumb-width:            1rem !default;
+$custom-range-thumb-height:           $custom-range-thumb-width !default;
+$custom-range-thumb-bg:               $component-active-bg !default;
+$custom-range-thumb-border:           0 !default;
+$custom-range-thumb-border-radius:    1rem !default;
+$custom-range-thumb-box-shadow:       0 .1rem .25rem rgba($black, .1) !default;
+$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
+$custom-range-thumb-active-bg:        lighten($component-active-bg, 35%) !default;
+
+$custom-file-height:                $input-height !default;
+$custom-file-focus-border-color:    $input-focus-border-color !default;
+$custom-file-focus-box-shadow:      $input-btn-focus-box-shadow !default;
+
+$custom-file-padding-y:             $input-btn-padding-y !default;
+$custom-file-padding-x:             $input-btn-padding-x !default;
+$custom-file-line-height:           $input-btn-line-height !default;
+$custom-file-color:                 $input-color !default;
+$custom-file-bg:                    $input-bg !default;
+$custom-file-border-width:          $input-btn-border-width !default;
+$custom-file-border-color:          $input-border-color !default;
+$custom-file-border-radius:         $input-border-radius !default;
+$custom-file-box-shadow:            $input-box-shadow !default;
+$custom-file-button-color:          $custom-file-color !default;
+$custom-file-button-bg:             $input-group-addon-bg !default;
+$custom-file-text: (
+  en: "Browse"
+) !default;
+
+
+// Form validation
+$form-feedback-margin-top:          $form-text-margin-top !default;
+$form-feedback-font-size:           $small-font-size !default;
+$form-feedback-valid-color:         theme-color("success") !default;
+$form-feedback-invalid-color:       theme-color("danger") !default;
+
+
+// Dropdowns
+//
+// Dropdown menu container and contents.
+
+$dropdown-min-width:                10rem !default;
+$dropdown-padding-y:                .5rem !default;
+$dropdown-spacer:                   .125rem !default;
+$dropdown-bg:                       $white !default;
+$dropdown-border-color:             rgba($black, .15) !default;
+$dropdown-border-radius:            $border-radius !default;
+$dropdown-border-width:             $border-width !default;
+$dropdown-divider-bg:               $gray-200 !default;
+$dropdown-box-shadow:               0 .5rem 1rem rgba($black, .175) !default;
+
+$dropdown-link-color:               $gray-900 !default;
+$dropdown-link-hover-color:         darken($gray-900, 5%) !default;
+$dropdown-link-hover-bg:            $gray-100 !default;
+
+$dropdown-link-active-color:        $component-active-color !default;
+$dropdown-link-active-bg:           $component-active-bg !default;
+
+$dropdown-link-disabled-color:      $gray-600 !default;
+
+$dropdown-item-padding-y:           .25rem !default;
+$dropdown-item-padding-x:           1.5rem !default;
+
+$dropdown-header-color:             $gray-600 !default;
+
+
+// Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+
+$zindex-dropdown:                   1000 !default;
+$zindex-sticky:                     1020 !default;
+$zindex-fixed:                      1030 !default;
+$zindex-modal-backdrop:             1040 !default;
+$zindex-modal:                      1050 !default;
+$zindex-popover:                    1060 !default;
+$zindex-tooltip:                    1070 !default;
+
+// Navs
+
+$nav-link-padding-y:                .5rem !default;
+$nav-link-padding-x:                1rem !default;
+$nav-link-disabled-color:           $gray-600 !default;
+
+$nav-tabs-border-color:             $gray-300 !default;
+$nav-tabs-border-width:             $border-width !default;
+$nav-tabs-border-radius:            $border-radius !default;
+$nav-tabs-link-hover-border-color:  $gray-200 $gray-200 $nav-tabs-border-color !default;
+$nav-tabs-link-active-color:        $gray-700 !default;
+$nav-tabs-link-active-bg:           $body-bg !default;
+$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;
+
+$nav-pills-border-radius:           $border-radius !default;
+$nav-pills-link-active-color:       $component-active-color !default;
+$nav-pills-link-active-bg:          $component-active-bg !default;
+
+$nav-divider-color:                 $gray-200 !default;
+$nav-divider-margin-y:              ($spacer / 2) !default;
+
+// Navbar
+
+$navbar-padding-y:                  ($spacer / 2) !default;
+$navbar-padding-x:                  $spacer !default;
+
+$navbar-nav-link-padding-x:         .5rem !default;
+
+$navbar-brand-font-size:            $font-size-lg !default;
+// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
+$nav-link-height:                   ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default;
+$navbar-brand-height:               $navbar-brand-font-size * $line-height-base !default;
+$navbar-brand-padding-y:            ($nav-link-height - $navbar-brand-height) / 2 !default;
+
+$navbar-toggler-padding-y:          .25rem !default;
+$navbar-toggler-padding-x:          .75rem !default;
+$navbar-toggler-font-size:          $font-size-lg !default;
+$navbar-toggler-border-radius:      $btn-border-radius !default;
+
+$navbar-dark-color:                 rgba($white, .5) !default;
+$navbar-dark-hover-color:           rgba($white, .75) !default;
+$navbar-dark-active-color:          $white !default;
+$navbar-dark-disabled-color:        rgba($white, .25) !default;
+$navbar-dark-toggler-icon-bg:       str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-dark-toggler-border-color:  rgba($white, .1) !default;
+
+$navbar-light-color:                rgba($black, .5) !default;
+$navbar-light-hover-color:          rgba($black, .7) !default;
+$navbar-light-active-color:         rgba($black, .9) !default;
+$navbar-light-disabled-color:       rgba($black, .3) !default;
+$navbar-light-toggler-icon-bg:      str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-light-toggler-border-color: rgba($black, .1) !default;
+
+// Pagination
+
+$pagination-padding-y:              .5rem !default;
+$pagination-padding-x:              .75rem !default;
+$pagination-padding-y-sm:           .25rem !default;
+$pagination-padding-x-sm:           .5rem !default;
+$pagination-padding-y-lg:           .75rem !default;
+$pagination-padding-x-lg:           1.5rem !default;
+$pagination-line-height:            1.25 !default;
+
+$pagination-color:                  $link-color !default;
+$pagination-bg:                     $white !default;
+$pagination-border-width:           $border-width !default;
+$pagination-border-color:           $gray-300 !default;
+
+$pagination-focus-box-shadow:       $input-btn-focus-box-shadow !default;
+$pagination-focus-outline:          0 !default;
+
+$pagination-hover-color:            $link-hover-color !default;
+$pagination-hover-bg:               $gray-200 !default;
+$pagination-hover-border-color:     $gray-300 !default;
+
+$pagination-active-color:           $component-active-color !default;
+$pagination-active-bg:              $component-active-bg !default;
+$pagination-active-border-color:    $pagination-active-bg !default;
+
+$pagination-disabled-color:         $gray-600 !default;
+$pagination-disabled-bg:            $white !default;
+$pagination-disabled-border-color:  $gray-300 !default;
+
+
+// Jumbotron
+
+$jumbotron-padding:                 2rem !default;
+$jumbotron-bg:                      $gray-200 !default;
+
+
+// Cards
+
+$card-spacer-y:                     .75rem !default;
+$card-spacer-x:                     1.25rem !default;
+$card-border-width:                 $border-width !default;
+$card-border-radius:                $border-radius !default;
+$card-border-color:                 rgba($black, .125) !default;
+$card-inner-border-radius:          calc(#{$card-border-radius} - #{$card-border-width}) !default;
+$card-cap-bg:                       rgba($black, .03) !default;
+$card-bg:                           $white !default;
+
+$card-img-overlay-padding:          1.25rem !default;
+
+$card-group-margin:                 ($grid-gutter-width / 2) !default;
+$card-deck-margin:                  $card-group-margin !default;
+
+$card-columns-count:                3 !default;
+$card-columns-gap:                  1.25rem !default;
+$card-columns-margin:               $card-spacer-y !default;
+
+
+// Tooltips
+
+$tooltip-font-size:                 $font-size-sm !default;
+$tooltip-max-width:                 200px !default;
+$tooltip-color:                     $white !default;
+$tooltip-bg:                        $black !default;
+$tooltip-border-radius:             $border-radius !default;
+$tooltip-opacity:                   .9 !default;
+$tooltip-padding-y:                 .25rem !default;
+$tooltip-padding-x:                 .5rem !default;
+$tooltip-margin:                    0 !default;
+
+$tooltip-arrow-width:               .8rem !default;
+$tooltip-arrow-height:              .4rem !default;
+$tooltip-arrow-color:               $tooltip-bg !default;
+
+
+// Popovers
+
+$popover-font-size:                 $font-size-sm !default;
+$popover-bg:                        $white !default;
+$popover-max-width:                 276px !default;
+$popover-border-width:              $border-width !default;
+$popover-border-color:              rgba($black, .2) !default;
+$popover-border-radius:             $border-radius-lg !default;
+$popover-box-shadow:                0 .25rem .5rem rgba($black, .2) !default;
+
+$popover-header-bg:                 darken($popover-bg, 3%) !default;
+$popover-header-color:              $headings-color !default;
+$popover-header-padding-y:          .5rem !default;
+$popover-header-padding-x:          .75rem !default;
+
+$popover-body-color:                $body-color !default;
+$popover-body-padding-y:            $popover-header-padding-y !default;
+$popover-body-padding-x:            $popover-header-padding-x !default;
+
+$popover-arrow-width:               1rem !default;
+$popover-arrow-height:              .5rem !default;
+$popover-arrow-color:               $popover-bg !default;
+
+$popover-arrow-outer-color:         fade-in($popover-border-color, .05) !default;
+
+
+// Badges
+
+$badge-font-size:                   75% !default;
+$badge-font-weight:                 $font-weight-bold !default;
+$badge-padding-y:                   .25em !default;
+$badge-padding-x:                   .4em !default;
+$badge-border-radius:               $border-radius !default;
+
+$badge-pill-padding-x:              .6em !default;
+// Use a higher than normal value to ensure completely rounded edges when
+// customizing padding or font-size on labels.
+$badge-pill-border-radius:          10rem !default;
+
+
+// Modals
+
+// Padding applied to the modal body
+$modal-inner-padding:               1rem !default;
+
+$modal-dialog-margin:               .5rem !default;
+$modal-dialog-margin-y-sm-up:       1.75rem !default;
+
+$modal-title-line-height:           $line-height-base !default;
+
+$modal-content-bg:                  $white !default;
+$modal-content-border-color:        rgba($black, .2) !default;
+$modal-content-border-width:        $border-width !default;
+$modal-content-border-radius:       $border-radius-lg !default;
+$modal-content-box-shadow-xs:       0 .25rem .5rem rgba($black, .5) !default;
+$modal-content-box-shadow-sm-up:    0 .5rem 1rem rgba($black, .5) !default;
+
+$modal-backdrop-bg:                 $black !default;
+$modal-backdrop-opacity:            .5 !default;
+$modal-header-border-color:         $gray-200 !default;
+$modal-footer-border-color:         $modal-header-border-color !default;
+$modal-header-border-width:         $modal-content-border-width !default;
+$modal-footer-border-width:         $modal-header-border-width !default;
+$modal-header-padding:              1rem !default;
+
+$modal-lg:                          800px !default;
+$modal-md:                          500px !default;
+$modal-sm:                          300px !default;
+
+$modal-transition:                  transform .3s ease-out !default;
+
+
+// Alerts
+//
+// Define alert colors, border radius, and padding.
+
+$alert-padding-y:                   .75rem !default;
+$alert-padding-x:                   1.25rem !default;
+$alert-margin-bottom:               1rem !default;
+$alert-border-radius:               $border-radius !default;
+$alert-link-font-weight:            $font-weight-bold !default;
+$alert-border-width:                $border-width !default;
+
+$alert-bg-level:                    -10 !default;
+$alert-border-level:                -9 !default;
+$alert-color-level:                 6 !default;
+
+
+// Progress bars
+
+$progress-height:                   1rem !default;
+$progress-font-size:                ($font-size-base * .75) !default;
+$progress-bg:                       $gray-200 !default;
+$progress-border-radius:            $border-radius !default;
+$progress-box-shadow:               inset 0 .1rem .1rem rgba($black, .1) !default;
+$progress-bar-color:                $white !default;
+$progress-bar-bg:                   theme-color("primary") !default;
+$progress-bar-animation-timing:     1s linear infinite !default;
+$progress-bar-transition:           width .6s ease !default;
+
+// List group
+
+$list-group-bg:                     $white !default;
+$list-group-border-color:           rgba($black, .125) !default;
+$list-group-border-width:           $border-width !default;
+$list-group-border-radius:          $border-radius !default;
+
+$list-group-item-padding-y:         .75rem !default;
+$list-group-item-padding-x:         1.25rem !default;
+
+$list-group-hover-bg:               $gray-100 !default;
+$list-group-active-color:           $component-active-color !default;
+$list-group-active-bg:              $component-active-bg !default;
+$list-group-active-border-color:    $list-group-active-bg !default;
+
+$list-group-disabled-color:         $gray-600 !default;
+$list-group-disabled-bg:            $list-group-bg !default;
+
+$list-group-action-color:           $gray-700 !default;
+$list-group-action-hover-color:     $list-group-action-color !default;
+
+$list-group-action-active-color:    $body-color !default;
+$list-group-action-active-bg:       $gray-200 !default;
+
+
+// Image thumbnails
+
+$thumbnail-padding:                 .25rem !default;
+$thumbnail-bg:                      $body-bg !default;
+$thumbnail-border-width:            $border-width !default;
+$thumbnail-border-color:            $gray-300 !default;
+$thumbnail-border-radius:           $border-radius !default;
+$thumbnail-box-shadow:              0 1px 2px rgba($black, .075) !default;
+
+
+// Figures
+
+$figure-caption-font-size:          90% !default;
+$figure-caption-color:              $gray-600 !default;
+
+
+// Breadcrumbs
+
+$breadcrumb-padding-y:              .75rem !default;
+$breadcrumb-padding-x:              1rem !default;
+$breadcrumb-item-padding:           .5rem !default;
+
+$breadcrumb-margin-bottom:          1rem !default;
+
+$breadcrumb-bg:                     $gray-200 !default;
+$breadcrumb-divider-color:          $gray-600 !default;
+$breadcrumb-active-color:           $gray-600 !default;
+$breadcrumb-divider:                quote("/") !default;
+
+$breadcrumb-border-radius:          $border-radius !default;
+
+
+// Carousel
+
+$carousel-control-color:            $white !default;
+$carousel-control-width:            15% !default;
+$carousel-control-opacity:          .5 !default;
+
+$carousel-indicator-width:          30px !default;
+$carousel-indicator-height:         3px !default;
+$carousel-indicator-spacer:         3px !default;
+$carousel-indicator-active-bg:      $white !default;
+
+$carousel-caption-width:            70% !default;
+$carousel-caption-color:            $white !default;
+
+$carousel-control-icon-width:       20px !default;
+
+$carousel-control-prev-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$carousel-control-next-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$carousel-transition:               transform .6s ease !default; // Define transform transition first if using multiple transitons (e.g., `transform 2s ease, opacity .5s ease-out`)
+
+
+// Close
+
+$close-font-size:                   $font-size-base * 1.5 !default;
+$close-font-weight:                 $font-weight-bold !default;
+$close-color:                       $black !default;
+$close-text-shadow:                 0 1px 0 $white !default;
+
+// Code
+
+$code-font-size:                    87.5% !default;
+$code-color:                        $pink !default;
+
+$kbd-padding-y:                     .2rem !default;
+$kbd-padding-x:                     .4rem !default;
+$kbd-font-size:                     $code-font-size !default;
+$kbd-color:                         $white !default;
+$kbd-bg:                            $gray-900 !default;
+
+$pre-color:                         $gray-900 !default;
+$pre-scrollable-max-height:         340px !default;
+
+
+// Printing
+$print-page-size:                   a3 !default;
+$print-body-min-width:              map-get($grid-breakpoints, "lg") !default;
diff --git a/js/tabulator/src/scss/bulma/tabulator_bulma.scss b/js/tabulator/src/scss/bulma/tabulator_bulma.scss
new file mode 100644
index 0000000..45e6e24
--- /dev/null
+++ b/js/tabulator/src/scss/bulma/tabulator_bulma.scss
@@ -0,0 +1,1075 @@
+@import "variables.scss";
+
+// Style conversion file, bulma to tabulator
+
+//Main Theme Variables
+$backgroundColor: $table-background-color !default; //background color of tabulator
+// $borderColor:#999 !default; //border to tabulator
+$textSize:$size-normal !default; //table text size
+
+//header themeing
+$headerBackgroundColor:$table-head-background-color !default; //border to tabulator
+$headerTextColor:$table-head-cell-color !default; //header text colour
+$headerBorderColor:#aaa !default;  //header border color
+$headerSeperatorColor:#999 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: $headerTextColor !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBackgroundColor:$table-body-background-color !default; //table row background color
+$rowAltBackgroundColor:$table-striped-row-even-background-color !default; //table row background color
+$rowBorderColor:#aaa !default; //table border color
+$rowTextColor:$table-color !default; //table text color
+$rowHoverBackground:$table-row-hover-background-color !default; //row background color on hover
+
+$rowSelectedBackground: $table-row-active-background-color !default; //row background color when selected
+// $rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:$table-foot-background-color !default; //border to tabulator
+$footerTextColor:$table-foot-cell-color !default; //footer text colour
+$footerBorderColor:$grey-lighter !default; //footer border color
+// $footerSeperatorColor:#999 !default; //footer bottom seperator color
+// $footerActiveColor:#d00 !default; //footer bottom active text color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+
+	background-color: $backgroundColor;
+
+	font-size:$textSize;
+	text-align: left;
+	overflow:hidden;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+		border:$table-cell-border;
+		border-width:$table-head-cell-border-width;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			// border-right:1px solid $headerBorderColor;
+			background:$headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				// border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:$table-cell-padding;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:15px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: $headerBackgroundColor !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+						width : 0;
+						height: 0;
+					}
+
+					border:$button-border-width solid $button-border-color;
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					border-bottom-width:0;
+				}
+			}
+
+			border:$table-cell-border;
+			border-width:$table-foot-cell-border-width;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#ccc;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			//row element
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border:$table-cell-border;
+						border-width:$table-head-cell-border-width;
+					}
+
+					&.tabulator-calcs-bottom{
+						border:$table-cell-border;
+						border-width:$table-foot-cell-border-width;
+					}
+
+					.tabulator-cell{
+						border-bottom-width:0;
+					}
+				}
+			}
+
+		}
+	}
+
+
+
+	//footer element
+	.tabulator-footer{
+		padding:$table-cell-padding;
+		border:$table-cell-border;
+		border-width:$table-foot-cell-border-width;
+		background-color: $footerBackgroundColor;
+		text-align: right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-5px -10px 10px -10px;
+
+			background:lighten($footerBackgroundColor, 5%) !important;
+
+			border:$table-cell-border;
+			border-width:$table-head-cell-border-width;
+
+			text-align: left;
+
+			overflow: hidden;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					border-bottom-width:0;
+				}
+			}
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		.tabulator-paginator{
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+		}
+
+		//pagination container element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 0.1875em;
+			padding:$button-padding-vertical $button-padding-horizontal;
+
+			border:$button-border-width solid $button-border-color;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			font-size: $size-normal;
+
+			&.active{
+				// color:$footerActiveColor;
+				border-color:$button-active-border-color;
+				color:$button-active-color;
+				font-weight:bold;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					border-color:$button-hover-border-color;
+					// background:rgba(0,0,0,.2);
+					// color:#fff;
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+
+
+	//Bulma theming classes
+
+	&.is-striped{
+		.tabulator-row{
+			&:nth-child(even){
+				background-color: $rowAltBackgroundColor;
+			}
+		}
+	}
+
+	&.is-bordered{
+		border:$table-cell-border;
+
+		.tabulator-header{
+			.tabulator-col{
+				border-right:$table-cell-border;
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						border-right:$table-cell-border;
+					}
+				}
+			}
+		}
+	}
+
+	&.is-narrow{
+		.tabulator-header{
+			.tabulator-col{
+				.tabulator-col-content{
+					padding: 0.25em 0.5em
+				}
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						padding: 0.25em 0.5em
+					}
+				}
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+	min-height:14px + ($headerMargin * 2);
+	background-color: $rowBackgroundColor;
+
+
+	// &.tabulator-row-even{
+	// 	background-color: $rowAltBackgroundColor;
+	// }
+
+	&.tabulator-selectable:hover{
+		background-color:$rowHoverBackground;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:darken($rowSelectedBackground, 10%);
+		cursor: pointer;
+	}
+
+	&.tabulator-row-moving{
+		border:1px solid #000;
+		background:#fff;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:$table-cell-padding;
+		// border-right:1px solid $rowBorderColor;
+		border:$table-cell-border;
+		border-width:$table-cell-border-width;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+			display: inline-flex;
+			align-items:center;
+			justify-content:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+		box-sizing:border-box;
+		border-bottom:1px solid #999;
+		// border-right:1px solid $rowBorderColor;
+		border-top:1px solid #999;
+		padding:5px;
+		padding-left:10px;
+		background:#ccc;
+		font-weight:bold;
+		color:$table-cell-heading-color;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+		&.tabulator-group-visible{
+
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:#d00;
+		}
+	}
+
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowBackgroundColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/bulma/variables.scss b/js/tabulator/src/scss/bulma/variables.scss
new file mode 100644
index 0000000..a0cb203
--- /dev/null
+++ b/js/tabulator/src/scss/bulma/variables.scss
@@ -0,0 +1,198 @@
+////////// from utilities/initial-variables.sass //////////
+$black:        hsl(0, 0%, 4%) !default
+$black-bis:    hsl(0, 0%, 7%) !default
+$black-ter:    hsl(0, 0%, 14%) !default
+
+$grey-darker:  hsl(0, 0%, 21%) !default
+$grey-dark:    hsl(0, 0%, 29%) !default
+$grey:         hsl(0, 0%, 48%) !default
+$grey-light:   hsl(0, 0%, 71%) !default
+$grey-lighter: hsl(0, 0%, 86%) !default
+
+$white-ter:    hsl(0, 0%, 96%) !default
+$white-bis:    hsl(0, 0%, 98%) !default
+$white:        hsl(0, 0%, 100%) !default
+
+$orange:       hsl(14,  100%, 53%) !default
+$yellow:       hsl(48,  100%, 67%) !default
+$green:        hsl(141, 71%,  48%) !default
+$turquoise:    hsl(171, 100%, 41%) !default
+$cyan:         hsl(204, 86%,  53%) !default
+$blue:         hsl(217, 71%,  53%) !default
+$purple:       hsl(271, 100%, 71%) !default
+$red:          hsl(348, 100%, 61%) !default
+
+// Typography
+
+$family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default
+$family-monospace: monospace !default
+$render-mode: optimizeLegibility !default
+
+$size-1: 3rem !default
+$size-2: 2.5rem !default
+$size-3: 2rem !default
+$size-4: 1.5rem !default
+$size-5: 1.25rem !default
+$size-6: 1rem !default
+$size-7: 0.75rem !default
+
+$weight-light: 300 !default
+$weight-normal: 400 !default
+$weight-medium: 500 !default
+$weight-semibold: 600 !default
+$weight-bold: 700 !default
+
+////////// from utilities/derived-variables.sass //////////
+
+$primary: $turquoise !default
+
+$info: $cyan !default
+$success: $green !default
+$warning: $yellow !default
+$danger: $red !default
+
+$light: $white-ter !default
+$dark: $grey-darker !default
+
+// Invert colors
+
+$orange-invert: findColorInvert($orange) !default
+$yellow-invert: findColorInvert($yellow) !default
+$green-invert: findColorInvert($green) !default
+$turquoise-invert: findColorInvert($turquoise) !default
+$cyan-invert: findColorInvert($cyan) !default
+$blue-invert: findColorInvert($blue) !default
+$purple-invert: findColorInvert($purple) !default
+$red-invert: findColorInvert($red) !default
+
+$primary-invert: $turquoise-invert !default
+$info-invert: $cyan-invert !default
+$success-invert: $green-invert !default
+$warning-invert: $yellow-invert !default
+$danger-invert: $red-invert !default
+$light-invert: $dark !default
+$dark-invert: $light !default
+
+// General colors
+
+$background: $white-ter !default
+
+$border: $grey-lighter !default
+$border-hover: $grey-light !default
+
+// Text colors
+
+$text: $grey-dark !default
+$text-invert: findColorInvert($text) !default
+$text-light: $grey !default
+$text-strong: $grey-darker !default
+
+// Code colors
+
+$code: $red !default
+$code-background: $background !default
+
+$pre: $text !default
+$pre-background: $background !default
+
+// Link colors
+
+$link: $blue !default
+$link-invert: $blue-invert !default
+$link-visited: $purple !default
+
+$link-hover: $grey-darker !default
+$link-hover-border: $grey-light !default
+
+$link-focus: $grey-darker !default
+$link-focus-border: $blue !default
+
+$link-active: $grey-darker !default
+$link-active-border: $grey-dark !default
+
+// Typography
+
+$family-primary: $family-sans-serif !default
+$family-secondary: $family-sans-serif !default
+$family-code: $family-monospace !default
+
+$size-small: $size-7 !default
+$size-normal: $size-6 !default
+$size-medium: $size-5 !default
+$size-large: $size-4 !default
+
+// Lists and maps
+$custom-colors: null !default
+$custom-shades: null !default
+
+$colors: mergeColorMaps(("white": ($white, $black), "black": ($black, $white), "light": ($light, $light-invert), "dark": ($dark, $dark-invert), "primary": ($primary, $primary-invert), "link": ($link, $link-invert), "info": ($info, $info-invert), "success": ($success, $success-invert), "warning": ($warning, $warning-invert), "danger": ($danger, $danger-invert)), $custom-colors) !default
+$shades: mergeColorMaps(("black-bis": $black-bis, "black-ter": $black-ter, "grey-darker": $grey-darker, "grey-dark": $grey-dark, "grey": $grey, "grey-light": $grey-light, "grey-lighter": $grey-lighter, "white-ter": $white-ter, "white-bis": $white-bis), $custom-shades) !default
+
+$sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 $size-7 !default
+
+
+////////// from elements/button.sass //////////
+
+$control-border-width: 1px !default
+
+$button-color: $grey-darker !default
+$button-background-color: $white !default
+
+$button-border-color: $grey-lighter !default
+$button-border-width: $control-border-width !default
+
+$button-padding-vertical: calc(0.375em - #{$button-border-width}) !default
+$button-padding-horizontal: 0.75em !default
+
+$button-hover-color: $link-hover !default
+$button-hover-border-color: $link-hover-border !default
+
+$button-focus-color: $link-focus !default
+$button-focus-border-color: $link-focus-border !default
+$button-focus-box-shadow-size: 0 0 0 0.125em !default
+$button-focus-box-shadow-color: rgba($link, 0.25) !default
+
+$button-active-color: $link-active !default
+$button-active-border-color: $link-active-border !default
+
+$button-text-color: $text !default
+$button-text-hover-background-color: $background !default
+$button-text-hover-color: $text-strong !default
+
+$button-disabled-background-color: $white !default
+$button-disabled-border-color: $grey-lighter !default
+$button-disabled-shadow: none !default
+$button-disabled-opacity: 0.5 !default
+
+$button-static-color: $grey !default
+$button-static-background-color: $white-ter !default
+$button-static-border-color: $grey-lighter !default
+
+
+
+////////// from elements/table.sass //////////
+
+$table-color: $grey-darker !default
+$table-background-color: $white !default
+
+$table-cell-border: 1px solid $grey-lighter !default
+$table-cell-border-width: 0 0 1px !default
+$table-cell-padding: 0.5em 0.75em !default
+$table-cell-heading-color: $text-strong !default
+
+$table-head-cell-border-width: 0 0 2px !default
+$table-head-cell-color: $text-strong !default
+$table-foot-cell-border-width: 2px 0 0 !default
+$table-foot-cell-color: $text-strong !default
+
+$table-head-background-color: transparent !default
+$table-body-background-color: transparent !default
+$table-foot-background-color: transparent !default
+
+$table-row-hover-background-color: $white-bis !default
+
+$table-row-active-background-color: $primary !default
+$table-row-active-color: $primary-invert !default
+
+$table-striped-row-even-background-color: $white-bis !default
+$table-striped-row-even-hover-background-color: $white-ter !default
\ No newline at end of file
diff --git a/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss b/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss
new file mode 100644
index 0000000..7d04010
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss
@@ -0,0 +1,1374 @@
+
+@import "variables_table.scss";
+
+
+
+//Main Theme Variables
+$backgroundColor: $background !default; //background color of tabulator
+$textSize:14px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:$headerBackground !default; //border to tabulator
+$headerTextColor:$headerColor !default; //header text colour
+$headerBorderColor:#ddd !default;  //header border color
+$headerSeperatorColor:#999 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: #666 !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBorderColor:#ddd !default; //table border color
+$rowTextColor:#333 !default; //table text color
+
+$rowSelectedBackground: #9ABCEA !default; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff !default; //border to tabulator
+$footerTextColor:#555 !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#999 !default; //footer bottom seperator color
+$footerActiveColor:#d00 !default; //footer bottom active text color
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+	width: 100%;
+
+	margin: $margin;
+	border: $border;
+	box-shadow: $boxShadow;
+	border-radius: $borderRadius;
+	color: $color;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom: $headerBorder;
+		background-color: $headerBackgroundColor;
+
+		box-shadow: $headerBoxShadow;
+
+		color: $headerTextColor;
+		font-style: $headerFontStyle;
+		font-weight: $headerFontWeight;
+		text-transform: $headerTextTransform;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		&.tabulator-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+
+			position:relative;
+			box-sizing:border-box;
+			// border-right: $headerDivider;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding: $headerVerticalPadding $headerHorizontalPadding;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:18px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color:darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+					  width : 0;
+					  height: 0;
+					}
+				}
+			}
+
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#000;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($background, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+		}
+	}
+
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding: $footerVerticalPadding $footerHorizontalPadding;
+
+		border-top: $footerBorder;
+		box-shadow: $footerBoxShadow;
+
+		background: $footerBackground;
+
+
+		text-align:right;
+		color: $footerColor;
+
+		font-style: $footerFontStyle;
+		font-weight: $footerFontWeight;
+		text-transform: $footerTextTransform;
+
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:(-$footerVerticalPadding) (-$footerHorizontalPadding) $footerVerticalPadding (-$footerHorizontalPadding);
+
+			text-align: left;
+
+			background:lighten($footerBackground, 5%) !important;
+
+			.tabulator-row{
+				font-weight: bold;
+				background:lighten($footerBackground, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-$footerVerticalPadding;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-paginator{
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+		}
+
+		//page size select element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+
+
+	//Semantic-ui theming classes
+
+	.tabulator-tableHolder{
+		.tabulator-table{
+			.tabulator-row{
+				&.positive, .tabulator-cell.positive{
+					box-shadow: $positiveBoxShadow;
+					background: $positiveBackgroundColor !important;
+					color: $positiveColor !important;
+
+					&:hover{
+						background: $positiveBackgroundHover !important;
+						color: $positiveColorHover !important;
+					}
+				}
+
+				&.negative, .tabulator-cell.negative{
+					box-shadow: $negativeBoxShadow;
+					background: $negativeBackgroundColor !important;
+					color: $negativeColor !important;
+
+					&:hover{
+						background: $negativeBackgroundHover !important;
+						color: $negativeColorHover !important;
+					}
+				}
+
+				&.error, .tabulator-cell.error{
+					box-shadow: $errorBoxShadow;
+					background: $errorBackgroundColor !important;
+					color: $errorColor !important;
+
+					&:hover{
+						background: $errorBackgroundHover !important;
+						color: $errorColorHover !important;
+					}
+				}
+
+				&.warning, .tabulator-cell.warning{
+					box-shadow: $warningBoxShadow;
+					background: $warningBackgroundColor !important;
+					color: $warningColor !important;
+
+					&:hover{
+						background: $warningBackgroundHover !important;
+						color: $warningColorHover !important;
+					}
+				}
+
+				&.active, .tabulator-cell.active{
+					box-shadow: $activeBoxShadow;
+					background: $activeBackgroundColor !important;
+					color: $activeColor !important;
+
+					&:hover{
+						background: $positiveBackgroundHover !important;
+						color: $positiveColorHover !important;
+					}
+				}
+
+				&.active, &.disabled:hover, .tabulator-cell.active{
+					pointer-events: none;
+					color: $disabledTextColor;
+				}
+			}
+		}
+	}
+
+
+	&.inverted{
+
+		background: $invertedBackground;
+		color: $invertedCellColor;
+		border: $invertedBorder;
+
+		.tabulator-header{
+			background-color: $invertedHeaderBackground;
+			border-color: $invertedHeaderBorderColor !important;
+			color: $invertedHeaderColor;
+
+			.tabulator-col{
+				border-color: $invertedCellBorderColor !important;
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					color: $invertedCellColor;
+					border: $invertedBorder;
+
+					.tabulator-cell{
+						border-color: $invertedCellBorderColor !important;
+					}
+				}
+			}
+		}
+
+		.tabulator-footer{
+			background: $definitionPageBackground;
+		}
+	}
+
+	&.striped{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					&:nth-child(even){
+						background-color: $basicTableStripedBackground !important;
+					}
+				}
+			}
+		}
+	}
+
+	&.celled{
+		border:1px solid $borderColor;
+
+		.tabulator-header{
+			.tabulator-col{
+				border-right:$cellBorder;
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						border-right:$cellBorder;
+					}
+				}
+			}
+		}
+
+	}
+
+
+	&[class*="single line"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						border-right:none;
+					}
+				}
+			}
+		}
+	}
+
+	//coloured table varients
+	/* Red */
+	&.red {
+		border-top: $coloredBorderSize solid $red;
+	}
+	&.inverted.red {
+		background-color: $red !important;
+		color: $white !important;
+	}
+
+	/* Orange */
+	&.orange {
+		border-top: $coloredBorderSize solid $orange;
+	}
+	&.inverted.orange {
+		background-color: $orange !important;
+		color: $white !important;
+	}
+
+	/* Yellow */
+	&.yellow {
+		border-top: $coloredBorderSize solid $yellow;
+	}
+	&.inverted.yellow {
+		background-color: $yellow !important;
+		color: $white !important;
+	}
+
+	/* Olive */
+	&.olive {
+		border-top: $coloredBorderSize solid $olive;
+	}
+	&.inverted.olive {
+		background-color: $olive !important;
+		color: $white !important;
+	}
+
+	/* Green */
+	&.green {
+		border-top: $coloredBorderSize solid $green;
+	}
+	&.inverted.green {
+		background-color: $green !important;
+		color: $white !important;
+	}
+
+	/* Teal */
+	&.teal {
+		border-top: $coloredBorderSize solid $teal;
+	}
+	&.inverted.teal {
+		background-color: $teal !important;
+		color: $white !important;
+	}
+
+	/* Blue */
+	&.blue {
+		border-top: $coloredBorderSize solid $blue;
+	}
+	&.inverted.blue {
+		background-color: $blue !important;
+		color: $white !important;
+	}
+
+	/* Violet */
+	&.violet {
+		border-top: $coloredBorderSize solid $violet;
+	}
+	&.inverted.violet {
+		background-color: $violet !important;
+		color: $white !important;
+	}
+
+	/* Purple */
+	&.purple {
+		border-top: $coloredBorderSize solid $purple;
+	}
+	&.inverted.purple {
+		background-color: $purple !important;
+		color: $white !important;
+	}
+
+	/* Pink */
+	&.pink {
+		border-top: $coloredBorderSize solid $pink;
+	}
+	&.inverted.pink {
+		background-color: $pink !important;
+		color: $white !important;
+	}
+
+	/* Brown */
+	&.brown {
+		border-top: $coloredBorderSize solid $brown;
+	}
+	&.inverted.brown {
+		background-color: $brown !important;
+		color: $white !important;
+	}
+
+	/* Grey */
+	&.grey {
+		border-top: $coloredBorderSize solid $grey;
+	}
+	&.inverted.grey {
+		background-color: $grey !important;
+		color: $white !important;
+	}
+
+	/* Black */
+	&.black {
+		border-top: $coloredBorderSize solid $black;
+	}
+	&.inverted.black {
+		background-color: $black !important;
+		color: $white !important;
+	}
+
+	&.padded{
+		.tabulator-header{
+			.tabulator-col{
+				.tabulator-col-content{
+					padding: $paddedVerticalPadding $paddedHorizontalPadding;
+
+					.tabulator-arrow{
+						top:20px;
+					}
+				}
+			}
+		}
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						padding: $paddedVerticalPadding $paddedHorizontalPadding;
+					}
+				}
+			}
+		}
+
+		&.very{
+			.tabulator-header{
+				.tabulator-col{
+					.tabulator-col-content{
+						padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
+
+						.tabulator-arrow{
+							top:26px;
+						}
+					}
+				}
+			}
+			.tabulator-tableHolder{
+				.tabulator-table{
+					.tabulator-row{
+						.tabulator-cell{
+							padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	&.compact{
+		.tabulator-header{
+			.tabulator-col{
+				.tabulator-col-content{
+					padding: $compactVerticalPadding $compactHorizontalPadding;
+
+					.tabulator-arrow{
+						top:12px;
+					}
+				}
+			}
+		}
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						padding: $compactVerticalPadding $compactHorizontalPadding;
+					}
+				}
+			}
+		}
+
+		&.very{
+			.tabulator-header{
+				.tabulator-col{
+					.tabulator-col-content{
+						padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
+
+						.tabulator-arrow{
+							top:10px;
+						}
+					}
+				}
+			}
+			.tabulator-tableHolder{
+				.tabulator-table{
+					.tabulator-row{
+						.tabulator-cell{
+							padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+
+	min-height: $textSize + ($headerMargin * 2);
+	border-bottom: $rowBorder;
+
+	&.tabulator-selectable:hover{
+		box-shadow: $activeBoxShadow;
+		background: $activeBackgroundColor !important;
+		color: $activeColor !important;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:$rowSelectedBackgroundHover;
+		cursor: pointer;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none !important;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding: $cellVerticalPadding $cellHorizontalPadding;
+		// border-right:1px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+		&:last-of-type{
+			border-right: none;
+		}
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+
+			display: inline-flex;
+			align-items:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+
+		box-sizing:border-box;
+		border-bottom:1px solid #999;
+		border-right:1px solid $rowBorderColor;
+		border-top:1px solid #999;
+		padding:5px;
+		padding-left:10px;
+		background:#fafafa;
+		font-weight:bold;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+		&.tabulator-group-visible{
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:#666;
+		}
+	}
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$backgroundColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$backgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$backgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/semantic-ui/variables.scss b/js/tabulator/src/scss/semantic-ui/variables.scss
new file mode 100644
index 0000000..65d71c6
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/variables.scss
@@ -0,0 +1,839 @@
+/// Remove the unit of a length
+/// @param {Number} $number - Number to remove unit from
+/// @author Hugo Giraudel
+/// @return {Number} - Unitless number
+@function strip-unit($number) {
+  @if type-of($number) == 'number' and not unitless($number) {
+    @return $number / ($number * 0 + 1);
+  }
+
+  @return $number;
+}
+
+/*******************************
+         Site Settings
+*******************************/
+
+/*-------------------
+       Fonts
+--------------------*/
+
+$fontName          : 'Lato' !default;
+$fontSmoothing     : antialiased !default;
+
+$headerFont        : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
+$pageFont          : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
+
+$googleFontName    : $fontName !default;
+$importGoogleFonts : true !default;
+$googleFontSizes   : '400,700,400italic,700italic' !default;
+$googleSubset      : 'latin' !default;
+
+$googleProtocol    : 'https://' !default;
+$googleFontRequest : '${googleFontName}:${googleFontSizes}&subset=${googleSubset}' !default;
+
+/*-------------------
+      Base Sizes
+--------------------*/
+
+/* This is the single variable that controls them all */
+$emSize   : 14px !default;
+
+/* The size of page text  */
+$fontSize : 14px !default;
+
+/*-------------------
+  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.
+
+*/
+
+
+$a1px  : strip-unit(1 / $emSize) + rem !default;
+$a4px  : strip-unit(4 / $emSize) + rem !default;
+$a11px  : strip-unit(11 / $emSize) + rem !default;
+$a14px  : strip-unit(14 / $emSize) + rem !default;
+
+$relative1px  : strip-unit(1 / $emSize) + em !default;
+$relative4px  : strip-unit(4 / $emSize) + em !default;
+$relative11px  : strip-unit(11 / $emSize) + em !default;
+$relative14px  : strip-unit(14 / $emSize) + em !default;
+
+
+
+/*-------------------
+    Border Radius
+--------------------*/
+
+/* See Power-user section below
+   for explanation of $px variables
+*/
+$relativeBorderRadius: $relative4px !default;
+$absoluteBorderRadius: $a4px !default;
+
+$defaultBorderRadius: $absoluteBorderRadius !default;
+
+
+
+/*-------------------
+      Site Colors
+--------------------*/
+
+/*---  Colors  ---*/
+$red              : #DB2828 !default;
+$orange           : #F2711C !default;
+$yellow           : #FBBD08 !default;
+$olive            : #B5CC18 !default;
+$green            : #21BA45 !default;
+$teal             : #00B5AD !default;
+$blue             : #2185D0 !default;
+$violet           : #6435C9 !default;
+$purple           : #A333C8 !default;
+$pink             : #E03997 !default;
+$brown            : #A5673F !default;
+$grey             : #767676 !default;
+$black            : #1B1C1D !default;
+
+/*---  Light Colors  ---*/
+$lightRed         : #FF695E !default;
+$lightOrange      : #FF851B !default;
+$lightYellow      : #FFE21F !default;
+$lightOlive       : #D9E778 !default;
+$lightGreen       : #2ECC40 !default;
+$lightTeal        : #6DFFFF !default;
+$lightBlue        : #54C8FF !default;
+$lightViolet      : #A291FB !default;
+$lightPurple      : #DC73FF !default;
+$lightPink        : #FF8EDF !default;
+$lightBrown       : #D67C1C !default;
+$lightGrey        : #DCDDDE !default;
+$lightBlack       : #545454 !default;
+
+/*---   Neutrals  ---*/
+$fullBlack        : #000000 !default;
+$offWhite         : #F9FAFB !default;
+$darkWhite        : #F3F4F5 !default;
+$midWhite         : #DCDDDE !default;
+$white            : #FFFFFF !default;
+
+/*--- Colored Backgrounds ---*/
+$redBackground    : #FFE8E6 !default;
+$orangeBackground : #FFEDDE !default;
+$yellowBackground : #FFF8DB !default;
+$oliveBackground  : #FBFDEF !default;
+$greenBackground  : #E5F9E7 !default;
+$tealBackground   : #E1F7F7 !default;
+$blueBackground   : #DFF0FF !default;
+$violetBackground : #EAE7FF !default;
+$purpleBackground : #F6E7FF !default;
+$pinkBackground   : #FFE3FB !default;
+$brownBackground  : #F1E2D3 !default;
+
+/*--- Colored Text ---*/
+$redTextColor    : $red !default;
+$orangeTextColor : $orange !default;
+$yellowTextColor : #B58105 !default; // Yellow text is difficult to read
+$oliveTextColor  : #8ABC1E !default; // Olive is difficult to read
+$greenTextColor  : #1EBC30 !default; // Green is difficult to read
+$tealTextColor   : #10A3A3 !default; // Teal text is difficult to read
+$blueTextColor   : $blue !default;
+$violetTextColor : $violet !default;
+$purpleTextColor : $purple !default;
+$pinkTextColor   : $pink !default;
+$brownTextColor  : $brown !default;
+
+/*--- Colored Headers ---*/
+$redHeaderColor    : darken($redTextColor, 5) !default;
+$oliveHeaderColor  : darken($oliveTextColor, 5) !default;
+$greenHeaderColor  : darken($greenTextColor, 5) !default;
+$yellowHeaderColor : darken($yellowTextColor, 5) !default;
+$blueHeaderColor   : darken($blueTextColor, 5) !default;
+$tealHeaderColor   : darken($tealTextColor, 5) !default;
+$pinkHeaderColor   : darken($pinkTextColor, 5) !default;
+$violetHeaderColor : darken($violetTextColor, 5) !default;
+$purpleHeaderColor : darken($purpleTextColor, 5) !default;
+$orangeHeaderColor : darken($orangeTextColor, 5) !default;
+$brownHeaderColor  : darken($brownTextColor, 5) !default;
+
+/*--- Colored Border ---*/
+$redBorderColor    : $redTextColor !default;
+$orangeBorderColor : $orangeTextColor !default;
+$yellowBorderColor : $yellowTextColor !default;
+$oliveBorderColor  : $oliveTextColor !default;
+$greenBorderColor  : $greenTextColor !default;
+$tealBorderColor   : $tealTextColor !default;
+$blueBorderColor   : $blueTextColor !default;
+$violetBorderColor : $violetTextColor !default;
+$purpleBorderColor : $purpleTextColor !default;
+$pinkBorderColor   : $pinkTextColor !default;
+$brownBorderColor  : $brownTextColor !default;
+
+/*-------------------
+     Alpha Colors
+--------------------*/
+
+$subtleTransparentBlack     : rgba(0, 0, 0, 0.03) !default;
+$transparentBlack           : rgba(0, 0, 0, 0.05) !default;
+$strongTransparentBlack     : rgba(0, 0, 0, 0.10) !default;
+$veryStrongTransparentBlack : rgba(0, 0, 0, 0.15) !default;
+
+$subtleTransparentWhite     : rgba(255, 255, 255, 0.02) !default;
+$transparentWhite           : rgba(255, 255, 255, 0.08) !default;
+$strongTransparentWhite     : rgba(255, 255, 255, 0.15) !default;
+
+
+
+/*-------------------
+    Brand Colors
+--------------------*/
+
+$primaryColor        : $blue !default;
+$secondaryColor      : $black !default;
+
+$lightPrimaryColor   : $lightBlue !default;
+$lightSecondaryColor : $lightBlack !default;
+
+/*--------------
+  Page Heading
+---------------*/
+
+$headerFontWeight : bold !default;
+$headerLineHeight : (18 / 14) * 1em !default;
+
+$h1 : (28 / 14) * 1rem !default;
+$h2 : (24 / 14) * 1rem !default;
+$h3 : (18 / 14) * 1rem !default;
+$h4 : (15 / 14) * 1rem !default;
+$h5 : (14 / 14) * 1rem !default;
+
+
+/*-------------------
+        Page
+--------------------*/
+
+$pageBackground      : #FFFFFF !default;
+$pageOverflowX       : hidden !default;
+
+$lineHeight          : 1.4285em !default;
+$textColor           : rgba(0, 0, 0, 0.87) !default;
+
+
+/*--------------
+   Form Input
+---------------*/
+
+/* This adjusts the default form input across all elements */
+$inputBackground        : $white !default;
+$inputVerticalPadding   : $relative11px !default;
+$inputHorizontalPadding : $relative14px !default;
+$inputPadding           : $inputVerticalPadding $inputHorizontalPadding !default;
+
+/* Input Text Color */
+$inputColor: $textColor !default;
+$inputPlaceholderColor: lighten($inputColor, 75) !default;
+$inputPlaceholderFocusColor: lighten($inputColor, 45) !default;
+
+/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */
+$inputLineHeight: (17 / 14) * 1em !default;
+
+/*-------------------
+    Focused Input
+--------------------*/
+
+/* Used on inputs, textarea etc */
+$focusedFormBorderColor: #85B7D9 !default;
+
+/* Used on dropdowns, other larger blocks */
+$focusedFormMutedBorderColor: #96C8DA !default;
+
+/*-------------------
+        Sizes
+--------------------*/
+
+/*
+  Sizes are all expressed in terms of 14px/em (default em)
+  This ensures these "ratios" remain constant despite changes in EM
+*/
+
+$miniSize        : (11 / 14) !default;
+$tinySize        : (12 / 14) !default;
+$smallSize       : (13 / 14) !default;
+$mediumSize      : (14 / 14) !default;
+$largeSize       : (16 / 14) !default;
+$bigSize         : (18 / 14) !default;
+$hugeSize        : (20 / 14) !default;
+$massiveSize     : (24 / 14) !default;
+
+
+/*-------------------
+      Paragraph
+--------------------*/
+
+$paragraphMargin     : 0em 0em 1em !default;
+$paragraphLineHeight : $lineHeight !default;
+
+/*-------------------
+       Links
+--------------------*/
+
+$linkColor           : #4183C4 !default;
+$linkUnderline       : none !default;
+$linkHoverColor      : darken(saturate($linkColor, 20), 15) !default;
+$linkHoverUnderline  : $linkUnderline !default;
+
+/*-------------------
+  Highlighted Text
+--------------------*/
+
+$highlightBackground      : #CCE2FF !default;
+$highlightColor           : $textColor !default;
+
+$inputHighlightBackground : rgba(100, 100, 100, 0.4) !default;
+$inputHighlightColor      : $textColor !default;
+
+/*-------------------
+       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
+*/
+$mini            : (round($miniSize * $emSize) / $emSize) * 1rem !default;
+$tiny            : (round($tinySize * $emSize) / $emSize) * 1rem !default;
+$small           : (round($smallSize * $emSize) / $emSize) * 1rem !default;
+$medium          : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
+$large           : (round($largeSize * $emSize) / $emSize) * 1rem !default;
+$big             : (round($bigSize * $emSize) / $emSize) * 1rem !default;
+$huge            : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
+$massive         : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
+
+/* em */
+$relativeMini    : (round($miniSize * $emSize) / $emSize) * 1em !default;
+$relativeTiny    : (round($tinySize * $emSize) / $emSize) * 1em !default;
+$relativeSmall   : (round($smallSize * $emSize) / $emSize) * 1em !default;
+$relativeMedium  : (round($mediumSize * $emSize) / $emSize) * 1em !default;
+$relativeLarge   : (round($largeSize * $emSize) / $emSize) * 1em !default;
+$relativeBig     : (round($bigSize * $emSize) / $emSize) * 1em !default;
+$relativeHuge    : (round($hugeSize * $emSize) / $emSize) * 1em !default;
+$relativeMassive : (round($massiveSize * $emSize) / $emSize) * 1em !default;
+
+/* rem */
+$absoluteMini    : (round($miniSize * $emSize) / $emSize) * 1rem !default;
+$absoluteTiny    : (round($tinySize * $emSize) / $emSize) * 1rem !default;
+$absoluteSmall   : (round($smallSize * $emSize) / $emSize) * 1rem !default;
+$absoluteMedium  : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
+$absoluteLarge   : (round($largeSize * $emSize) / $emSize) * 1rem !default;
+$absoluteBig     : (round($bigSize * $emSize) / $emSize) * 1rem !default;
+$absoluteHuge    : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
+$absoluteMassive : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
+
+
+/*-------------------
+       Loader
+--------------------*/
+
+$loaderSize              : $relativeBig !default;
+$loaderSpeed             : 0.6s !default;
+$loaderLineWidth         : 0.2em !default;
+$loaderFillColor         : rgba(0, 0, 0, 0.1) !default;
+$loaderLineColor         : $grey !default;
+
+$invertedLoaderFillColor : rgba(255, 255, 255, 0.15) !default;
+$invertedLoaderLineColor : $white !default;
+
+/*-------------------
+        Grid
+--------------------*/
+
+$columnCount: 16 !default;
+
+/*-------------------
+     Transitions
+--------------------*/
+
+$defaultDuration : 0.1s !default;
+$defaultEasing   : ease !default;
+
+/*-------------------
+     Breakpoints
+--------------------*/
+
+$mobileBreakpoint            : 320px !default;
+$tabletBreakpoint            : 768px !default;
+$computerBreakpoint          : 992px !default;
+$largeMonitorBreakpoint      : 1200px !default;
+$widescreenMonitorBreakpoint : 1920px !default;
+
+
+
+/* Columns */
+$oneWide        : (1 / $columnCount * 100%) !default;
+$twoWide        : (2 / $columnCount * 100%) !default;
+$threeWide      : (3 / $columnCount * 100%) !default;
+$fourWide       : (4 / $columnCount * 100%) !default;
+$fiveWide       : (5 / $columnCount * 100%) !default;
+$sixWide        : (6 / $columnCount * 100%) !default;
+$sevenWide      : (7 / $columnCount * 100%) !default;
+$eightWide      : (8 / $columnCount * 100%) !default;
+$nineWide       : (9 / $columnCount * 100%) !default;
+$tenWide        : (10 / $columnCount * 100%) !default;
+$elevenWide     : (11 / $columnCount * 100%) !default;
+$twelveWide     : (12 / $columnCount * 100%) !default;
+$thirteenWide   : (13 / $columnCount * 100%) !default;
+$fourteenWide   : (14 / $columnCount * 100%) !default;
+$fifteenWide    : (15 / $columnCount * 100%) !default;
+$sixteenWide    : (16 / $columnCount * 100%) !default;
+
+$oneColumn      : (1 / 1 * 100%) !default;
+$twoColumn      : (1 / 2 * 100%) !default;
+$threeColumn    : (1 / 3 * 100%) !default;
+$fourColumn     : (1 / 4 * 100%) !default;
+$fiveColumn     : (1 / 5 * 100%) !default;
+$sixColumn      : (1 / 6 * 100%) !default;
+$sevenColumn    : (1 / 7 * 100%) !default;
+$eightColumn    : (1 / 8 * 100%) !default;
+$nineColumn     : (1 / 9 * 100%) !default;
+$tenColumn      : (1 / 10 * 100%) !default;
+$elevenColumn   : (1 / 11 * 100%) !default;
+$twelveColumn   : (1 / 12 * 100%) !default;
+$thirteenColumn : (1 / 13 * 100%) !default;
+$fourteenColumn : (1 / 14 * 100%) !default;
+$fifteenColumn  : (1 / 15 * 100%) !default;
+$sixteenColumn  : (1 / 16 * 100%) !default;
+
+
+/*******************************
+           Power-User
+*******************************/
+
+
+/*-------------------
+    Emotive Colors
+--------------------*/
+
+/* Positive */
+$positiveColor           : $green !default;
+$positiveBackgroundColor : #FCFFF5 !default;
+$positiveBorderColor     : #A3C293 !default;
+$positiveHeaderColor     : #1A531B !default;
+$positiveTextColor       : #2C662D !default;
+
+/* Negative */
+$negativeColor           : $red !default;
+$negativeBackgroundColor : #FFF6F6 !default;
+$negativeBorderColor     : #E0B4B4 !default;
+$negativeHeaderColor     : #912D2B !default;
+$negativeTextColor       : #9F3A38 !default;
+
+/* Info */
+$infoColor              : #31CCEC !default;
+$infoBackgroundColor    : #F8FFFF !default;
+$infoBorderColor        : #A9D5DE !default;
+$infoHeaderColor        : #0E566C !default;
+$infoTextColor          : #276F86 !default;
+
+/* Warning */
+$warningColor           : #F2C037 !default;
+$warningBorderColor     : #C9BA9B !default;
+$warningBackgroundColor : #FFFAF3 !default;
+$warningHeaderColor     : #794B02 !default;
+$warningTextColor       : #573A08 !default;
+
+/*-------------------
+        Paths
+--------------------*/
+
+/* For source only. Modified in gulp for dist */
+$imagePath : '../../themes/default/assets/images' !default;
+$fontPath  : '../../themes/default/assets/fonts' !default;
+
+
+/*-------------------
+       Icons
+--------------------*/
+
+/* Maximum Glyph Width of Icon */
+$iconWidth : 1.18em !default;
+
+/*-------------------
+     Neutral Text
+--------------------*/
+
+$darkTextColor               : rgba(0, 0, 0, 0.85) !default;
+$mutedTextColor              : rgba(0, 0, 0, 0.6) !default;
+$lightTextColor              : rgba(0, 0, 0, 0.4) !default;
+
+$unselectedTextColor         : rgba(0, 0, 0, 0.4) !default;
+$hoveredTextColor            : rgba(0, 0, 0, 0.8) !default;
+$pressedTextColor            : rgba(0, 0, 0, 0.9) !default;
+$selectedTextColor           : rgba(0, 0, 0, 0.95) !default;
+$disabledTextColor           : rgba(0, 0, 0, 0.2) !default;
+
+$invertedTextColor           : rgba(255, 255, 255, 0.9) !default;
+$invertedMutedTextColor      : rgba(255, 255, 255, 0.8) !default;
+$invertedLightTextColor      : rgba(255, 255, 255, 0.7) !default;
+$invertedUnselectedTextColor : rgba(255, 255, 255, 0.5) !default;
+$invertedHoveredTextColor    : rgba(255, 255, 255, 1) !default;
+$invertedPressedTextColor    : rgba(255, 255, 255, 1) !default;
+$invertedSelectedTextColor   : rgba(255, 255, 255, 1) !default;
+$invertedDisabledTextColor   : rgba(255, 255, 255, 0.2) !default;
+
+/*-------------------
+     Brand Colors
+--------------------*/
+
+$facebookColor   : #3B5998 !default;
+$twitterColor    : #55ACEE !default;
+$googlePlusColor : #DD4B39 !default;
+$linkedInColor   : #1F88BE !default;
+$youtubeColor    : #CC181E !default;
+$pinterestColor  : #BD081C !default;
+$vkColor         : #4D7198 !default;
+$instagramColor  : #49769C !default;
+
+/*-------------------
+      Borders
+--------------------*/
+
+$circularRadius                : 500rem !default;
+
+$borderColor               : rgba(34, 36, 38, 0.15) !default;
+$strongBorderColor         : rgba(34, 36, 38, 0.22) !default;
+$internalBorderColor       : rgba(34, 36, 38, 0.1) !default;
+$selectedBorderColor       : rgba(34, 36, 38, 0.35) !default;
+$strongSelectedBorderColor : rgba(34, 36, 38, 0.5) !default;
+$disabledBorderColor       : rgba(34, 36, 38, 0.5) !default;
+
+$solidInternalBorderColor  : #FAFAFA !default;
+$solidBorderColor          : #D4D4D5 !default;
+$solidSelectedBorderColor  : #BCBDBD !default;
+
+$whiteBorderColor              : rgba(255, 255, 255, 0.1) !default;
+$selectedWhiteBorderColor      : rgba(255, 255, 255, 0.8) !default;
+
+$solidWhiteBorderColor         : #555555 !default;
+$selectedSolidWhiteBorderColor : #999999 !default;
+
+/*-------------------
+       Accents
+--------------------*/
+
+/* Differentiating Neutrals */
+$subtleGradient: linear-gradient(transparent, $transparentBlack) !default;
+
+/* Differentiating Layers */
+$subtleShadow:
+  0px 1px 2px 0 $borderColor
+ !default;
+$floatingShadow:
+  0px 2px 4px 0px rgba(34, 36, 38, 0.12),
+  0px 2px 10px 0px rgba(34, 36, 38, 0.15)
+ !default;
+
+
+/*-------------------
+    Derived Values
+--------------------*/
+
+/* Loaders Position Offset */
+$loaderOffset : -($loaderSize / 2) !default;
+$loaderMargin : $loaderOffset 0em 0em $loaderOffset !default;
+
+/* Rendered Scrollbar Width */
+$scrollbarWidth: 17px !default;
+
+/* Maximum Single Character Glyph Width, aka Capital "W" */
+$glyphWidth: 1.1em !default;
+
+/* Used to match floats with text */
+$lineHeightOffset       : (($lineHeight - 1em) / 2) !default;
+$headerLineHeightOffset : ($headerLineHeight - 1em) / 2 !default;
+
+/* Header Spacing */
+$headerTopMargin    : calc(2rem - #{$headerLineHeightOffset}) !default;
+$headerBottomMargin : 1rem !default;
+
+/* Minimum Mobile Width */
+$pageMinWidth       : 320px !default;
+
+/* Positive / Negative Dupes */
+$successBackgroundColor : $positiveBackgroundColor !default;
+$successColor           : $positiveColor !default;
+$successBorderColor     : $positiveBorderColor !default;
+$successHeaderColor     : $positiveHeaderColor !default;
+$successTextColor       : $positiveTextColor !default;
+
+$errorBackgroundColor   : $negativeBackgroundColor !default;
+$errorColor             : $negativeColor !default;
+$errorBorderColor       : $negativeBorderColor !default;
+$errorHeaderColor       : $negativeHeaderColor !default;
+$errorTextColor         : $negativeTextColor !default;
+
+
+/* Responsive */
+$largestMobileScreen : ($tabletBreakpoint - 1px) !default;
+$largestTabletScreen : ($computerBreakpoint - 1px) !default;
+$largestSmallMonitor : ($largeMonitorBreakpoint - 1px) !default;
+$largestLargeMonitor : ($widescreenMonitorBreakpoint - 1px) !default;
+
+
+
+/*******************************
+             States
+*******************************/
+
+/*-------------------
+      Disabled
+--------------------*/
+
+$disabledOpacity: 0.45 !default;
+$disabledTextColor: rgba(40, 40, 40, 0.3) !default;
+$invertedDisabledTextColor: rgba(225, 225, 225, 0.3) !default;
+
+/*-------------------
+        Hover
+--------------------*/
+
+/*---  Shadows  ---*/
+$floatingShadowHover:
+  0px 2px 4px 0px rgba(34, 36, 38, 0.15),
+  0px 2px 10px 0px rgba(34, 36, 38, 0.25)
+ !default;
+
+/*---  Colors  ---*/
+$primaryColorHover    : saturate(darken($primaryColor, 5), 10) !default;
+$secondaryColorHover  : saturate(lighten($secondaryColor, 5), 10) !default;
+
+$redHover             : saturate(darken($red, 5), 10) !default;
+$orangeHover          : saturate(darken($orange, 5), 10) !default;
+$yellowHover          : saturate(darken($yellow, 5), 10) !default;
+$oliveHover           : saturate(darken($olive, 5), 10) !default;
+$greenHover           : saturate(darken($green, 5), 10) !default;
+$tealHover            : saturate(darken($teal, 5), 10) !default;
+$blueHover            : saturate(darken($blue, 5), 10) !default;
+$violetHover          : saturate(darken($violet, 5), 10) !default;
+$purpleHover          : saturate(darken($purple, 5), 10) !default;
+$pinkHover            : saturate(darken($pink, 5), 10) !default;
+$brownHover           : saturate(darken($brown, 5), 10) !default;
+
+$lightRedHover        : saturate(darken($lightRed, 5), 10) !default;
+$lightOrangeHover     : saturate(darken($lightOrange, 5), 10) !default;
+$lightYellowHover     : saturate(darken($lightYellow, 5), 10) !default;
+$lightOliveHover      : saturate(darken($lightOlive, 5), 10) !default;
+$lightGreenHover      : saturate(darken($lightGreen, 5), 10) !default;
+$lightTealHover       : saturate(darken($lightTeal, 5), 10) !default;
+$lightBlueHover       : saturate(darken($lightBlue, 5), 10) !default;
+$lightVioletHover     : saturate(darken($lightViolet, 5), 10) !default;
+$lightPurpleHover     : saturate(darken($lightPurple, 5), 10) !default;
+$lightPinkHover       : saturate(darken($lightPink, 5), 10) !default;
+$lightBrownHover      : saturate(darken($lightBrown, 5), 10) !default;
+$lightGreyHover       : saturate(darken($lightGrey, 5), 10) !default;
+$lightBlackHover      : saturate(darken($fullBlack, 5), 10) !default;
+
+/*---  Emotive  ---*/
+$positiveColorHover   : saturate(darken($positiveColor, 5), 10) !default;
+$negativeColorHover   : saturate(darken($negativeColor, 5), 10) !default;
+
+/*---  Brand   ---*/
+$facebookHoverColor   : saturate(darken($facebookColor, 5), 10) !default;
+$twitterHoverColor    : saturate(darken($twitterColor, 5), 10) !default;
+$googlePlusHoverColor : saturate(darken($googlePlusColor, 5), 10) !default;
+$linkedInHoverColor   : saturate(darken($linkedInColor, 5), 10) !default;
+$youtubeHoverColor    : saturate(darken($youtubeColor, 5), 10) !default;
+$instagramHoverColor  : saturate(darken($instagramColor, 5), 10) !default;
+$pinterestHoverColor  : saturate(darken($pinterestColor, 5), 10) !default;
+$vkHoverColor         : saturate(darken($vkColor, 5), 10) !default;
+
+/*---  Dark Tones  ---*/
+$fullBlackHover       : lighten($fullBlack, 5) !default;
+$blackHover           : lighten($black, 5) !default;
+$greyHover            : lighten($grey, 5) !default;
+
+/*---  Light Tones  ---*/
+$whiteHover           : darken($white, 5) !default;
+$offWhiteHover        : darken($offWhite, 5) !default;
+$darkWhiteHover       : darken($darkWhite, 5) !default;
+
+/*-------------------
+        Focus
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorFocus    : saturate(darken($primaryColor, 8), 20) !default;
+$secondaryColorFocus  : saturate(lighten($secondaryColor, 8), 20) !default;
+
+$redFocus             : saturate(darken($red, 8), 20) !default;
+$orangeFocus          : saturate(darken($orange, 8), 20) !default;
+$yellowFocus          : saturate(darken($yellow, 8), 20) !default;
+$oliveFocus           : saturate(darken($olive, 8), 20) !default;
+$greenFocus           : saturate(darken($green, 8), 20) !default;
+$tealFocus            : saturate(darken($teal, 8), 20) !default;
+$blueFocus            : saturate(darken($blue, 8), 20) !default;
+$violetFocus          : saturate(darken($violet, 8), 20) !default;
+$purpleFocus          : saturate(darken($purple, 8), 20) !default;
+$pinkFocus            : saturate(darken($pink, 8), 20) !default;
+$brownFocus           : saturate(darken($brown, 8), 20) !default;
+
+$lightRedFocus        : saturate(darken($lightRed, 8), 20) !default;
+$lightOrangeFocus     : saturate(darken($lightOrange, 8), 20) !default;
+$lightYellowFocus     : saturate(darken($lightYellow, 8), 20) !default;
+$lightOliveFocus      : saturate(darken($lightOlive, 8), 20) !default;
+$lightGreenFocus      : saturate(darken($lightGreen, 8), 20) !default;
+$lightTealFocus       : saturate(darken($lightTeal, 8), 20) !default;
+$lightBlueFocus       : saturate(darken($lightBlue, 8), 20) !default;
+$lightVioletFocus     : saturate(darken($lightViolet, 8), 20) !default;
+$lightPurpleFocus     : saturate(darken($lightPurple, 8), 20) !default;
+$lightPinkFocus       : saturate(darken($lightPink, 8), 20) !default;
+$lightBrownFocus      : saturate(darken($lightBrown, 8), 20) !default;
+$lightGreyFocus       : saturate(darken($lightGrey, 8), 20) !default;
+$lightBlackFocus      : saturate(darken($fullBlack, 8), 20) !default;
+
+/*---  Emotive  ---*/
+$positiveColorFocus   : saturate(darken($positiveColor, 8), 20) !default;
+$negativeColorFocus   : saturate(darken($negativeColor, 8), 20) !default;
+
+/*---  Brand   ---*/
+$facebookFocusColor   : saturate(darken($facebookColor, 8), 20) !default;
+$twitterFocusColor    : saturate(darken($twitterColor, 8), 20) !default;
+$googlePlusFocusColor : saturate(darken($googlePlusColor, 8), 20) !default;
+$linkedInFocusColor   : saturate(darken($linkedInColor, 8), 20) !default;
+$youtubeFocusColor    : saturate(darken($youtubeColor, 8), 20) !default;
+$instagramFocusColor  : saturate(darken($instagramColor, 8), 20) !default;
+$pinterestFocusColor  : saturate(darken($pinterestColor, 8), 20) !default;
+$vkFocusColor         : saturate(darken($vkColor, 8), 20) !default;
+
+/*---  Dark Tones  ---*/
+$fullBlackFocus       : lighten($fullBlack, 8) !default;
+$blackFocus           : lighten($black, 8) !default;
+$greyFocus            : lighten($grey, 8) !default;
+
+/*---  Light Tones  ---*/
+$whiteFocus           : darken($white, 8) !default;
+$offWhiteFocus        : darken($offWhite, 8) !default;
+$darkWhiteFocus       : darken($darkWhite, 8) !default;
+
+
+/*-------------------
+    Down (:active)
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorDown    : darken($primaryColor, 10) !default;
+$secondaryColorDown  : lighten($secondaryColor, 10) !default;
+
+$redDown             : darken($red, 10) !default;
+$orangeDown          : darken($orange, 10) !default;
+$yellowDown          : darken($yellow, 10) !default;
+$oliveDown           : darken($olive, 10) !default;
+$greenDown           : darken($green, 10) !default;
+$tealDown            : darken($teal, 10) !default;
+$blueDown            : darken($blue, 10) !default;
+$violetDown          : darken($violet, 10) !default;
+$purpleDown          : darken($purple, 10) !default;
+$pinkDown            : darken($pink, 10) !default;
+$brownDown           : darken($brown, 10) !default;
+
+$lightRedDown        : darken($lightRed, 10) !default;
+$lightOrangeDown     : darken($lightOrange, 10) !default;
+$lightYellowDown     : darken($lightYellow, 10) !default;
+$lightOliveDown      : darken($lightOlive, 10) !default;
+$lightGreenDown      : darken($lightGreen, 10) !default;
+$lightTealDown       : darken($lightTeal, 10) !default;
+$lightBlueDown       : darken($lightBlue, 10) !default;
+$lightVioletDown     : darken($lightViolet, 10) !default;
+$lightPurpleDown     : darken($lightPurple, 10) !default;
+$lightPinkDown       : darken($lightPink, 10) !default;
+$lightBrownDown      : darken($lightBrown, 10) !default;
+$lightGreyDown       : darken($lightGrey, 10) !default;
+$lightBlackDown      : darken($fullBlack, 10) !default;
+
+/*---  Emotive  ---*/
+$positiveColorDown   : darken($positiveColor, 10) !default;
+$negativeColorDown   : darken($negativeColor, 10) !default;
+
+/*---  Brand   ---*/
+$facebookDownColor   : darken($facebookColor, 10) !default;
+$twitterDownColor    : darken($twitterColor, 10) !default;
+$googlePlusDownColor : darken($googlePlusColor, 10) !default;
+$linkedInDownColor   : darken($linkedInColor, 10) !default;
+$youtubeDownColor    : darken($youtubeColor, 10) !default;
+$instagramDownColor  : darken($instagramColor, 10) !default;
+$pinterestDownColor  : darken($pinterestColor, 10) !default;
+$vkDownColor         : darken($vkColor, 10) !default;
+
+/*---  Dark Tones  ---*/
+$fullBlackDown       : lighten($fullBlack, 10) !default;
+$blackDown           : lighten($black, 10) !default;
+$greyDown            : lighten($grey, 10) !default;
+
+/*---  Light Tones  ---*/
+$whiteDown           : darken($white, 10) !default;
+$offWhiteDown        : darken($offWhite, 10) !default;
+$darkWhiteDown       : darken($darkWhite, 10) !default;
+
+
+/*-------------------
+        Active
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorActive    : saturate(darken($primaryColor, 5), 15) !default;
+$secondaryColorActive  : saturate(lighten($secondaryColor, 5), 15) !default;
+
+$redActive             : saturate(darken($red, 5), 15) !default;
+$orangeActive          : saturate(darken($orange, 5), 15) !default;
+$yellowActive          : saturate(darken($yellow, 5), 15) !default;
+$oliveActive           : saturate(darken($olive, 5), 15) !default;
+$greenActive           : saturate(darken($green, 5), 15) !default;
+$tealActive            : saturate(darken($teal, 5), 15) !default;
+$blueActive            : saturate(darken($blue, 5), 15) !default;
+$violetActive          : saturate(darken($violet, 5), 15) !default;
+$purpleActive          : saturate(darken($purple, 5), 15) !default;
+$pinkActive            : saturate(darken($pink, 5), 15) !default;
+$brownActive           : saturate(darken($brown, 5), 15) !default;
+
+$lightRedActive        : saturate(darken($lightRed, 5), 15) !default;
+$lightOrangeActive     : saturate(darken($lightOrange, 5), 15) !default;
+$lightYellowActive     : saturate(darken($lightYellow, 5), 15) !default;
+$lightOliveActive      : saturate(darken($lightOlive, 5), 15) !default;
+$lightGreenActive      : saturate(darken($lightGreen, 5), 15) !default;
+$lightTealActive       : saturate(darken($lightTeal, 5), 15) !default;
+$lightBlueActive       : saturate(darken($lightBlue, 5), 15) !default;
+$lightVioletActive     : saturate(darken($lightViolet, 5), 15) !default;
+$lightPurpleActive     : saturate(darken($lightPurple, 5), 15) !default;
+$lightPinkActive       : saturate(darken($lightPink, 5), 15) !default;
+$lightBrownActive      : saturate(darken($lightBrown, 5), 15) !default;
+$lightGreyActive       : saturate(darken($lightGrey, 5), 15) !default;
+$lightBlackActive      : saturate(darken($fullBlack, 5), 15) !default;
+
+/*---  Emotive  ---*/
+$positiveColorActive   : saturate(darken($positiveColor, 5), 15) !default;
+$negativeColorActive   : saturate(darken($negativeColor, 5), 15) !default;
+
+/*---  Brand   ---*/
+$facebookActiveColor   : saturate(darken($facebookColor, 5), 15) !default;
+$twitterActiveColor    : saturate(darken($twitterColor, 5), 15) !default;
+$googlePlusActiveColor : saturate(darken($googlePlusColor, 5), 15) !default;
+$linkedInActiveColor   : saturate(darken($linkedInColor, 5), 15) !default;
+$youtubeActiveColor    : saturate(darken($youtubeColor, 5), 15) !default;
+$instagramActiveColor  : saturate(darken($instagramColor, 5), 15) !default;
+$pinterestActiveColor  : saturate(darken($pinterestColor, 5), 15) !default;
+$vkActiveColor         : saturate(darken($vkColor, 5), 15) !default;
+
+/*---  Dark Tones  ---*/
+$fullBlackActive       : darken($fullBlack, 5) !default;
+$blackActive           : darken($black, 5) !default;
+$greyActive            : darken($grey, 5) !default;
+
+/*---  Light Tones  ---*/
+$whiteActive           : darken($white, 5) !default;
+$offWhiteActive        : darken($offWhite, 5) !default;
+$darkWhiteActive       : darken($darkWhite, 5) !default;
diff --git a/js/tabulator/src/scss/semantic-ui/variables_table.scss b/js/tabulator/src/scss/semantic-ui/variables_table.scss
new file mode 100644
index 0000000..ab24445
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/variables_table.scss
@@ -0,0 +1,247 @@
+@import "variables.scss";
+
+/*******************************
+             Table
+*******************************/
+
+/*-------------------
+       Element
+--------------------*/
+
+$verticalMargin: 1em !default;
+$horizontalMargin: 0em !default;
+$margin: $verticalMargin $horizontalMargin !default;
+$borderCollapse: separate !default;
+$borderSpacing: 0px !default;
+$borderRadius: $defaultBorderRadius !default;
+$transition:
+  background $defaultDuration $defaultEasing,
+  color $defaultDuration $defaultEasing !default;
+$background: $white !default;
+$color: $textColor !default;
+$borderWidth: 1px !default;
+$border: $borderWidth solid $borderColor !default;
+$boxShadow: none !default;
+$textAlign: left !default;
+
+/*--------------
+     Parts
+---------------*/
+
+/* Table Row */
+$rowBorder: 1px solid $internalBorderColor !default;
+
+/* Table Cell */
+$cellVerticalPadding: $relativeMini !default;
+$cellHorizontalPadding: $relativeMini !default;
+$cellVerticalAlign: inherit !default;
+$cellTextAlign: inherit !default;
+$cellBorder: 1px solid $internalBorderColor !default;
+
+/* Table Header */
+$headerBorder: 1px solid $internalBorderColor !default;
+$headerDivider: none !default;
+$headerBackground: $offWhite !default;
+$headerAlign: inherit !default;
+$headerVerticalAlign: inherit !default;
+$headerColor: $textColor !default;
+$headerVerticalPadding: $relativeSmall !default;
+$headerHorizontalPadding: $cellHorizontalPadding !default;
+$headerFontStyle: none !default;
+$headerFontWeight: bold !default;
+$headerTextTransform: none !default;
+$headerBoxShadow: none !default;
+
+/* Table Footer */
+$footerBoxShadow: none !default;
+$footerBorder: 1px solid $borderColor !default;
+$footerDivider: none !default;
+$footerBackground: $offWhite !default;
+$footerAlign: inherit !default;
+$footerVerticalAlign: middle !default;
+$footerColor: $textColor !default;
+$footerVerticalPadding: $cellVerticalPadding !default;
+$footerHorizontalPadding: $cellHorizontalPadding !default;
+$footerFontStyle: normal !default;
+$footerFontWeight: normal !default;
+$footerTextTransform: none !default;
+
+/* Responsive Size */
+$responsiveHeaderDisplay: block !default;
+$responsiveFooterDisplay: block !default;
+$responsiveRowVerticalPadding: 1em !default;
+$responsiveRowBoxShadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important !default;
+$responsiveCellVerticalPadding: 0.25em !default;
+$responsiveCellHorizontalPadding: 0.75em !default;
+$responsiveCellBoxShadow: none !important !default;
+
+/*-------------------
+       Types
+--------------------*/
+
+/* Definition */
+$definitionPageBackground: $white !default;
+
+$definitionHeaderBackground: transparent !default;
+$definitionHeaderColor: $unselectedTextColor !default;
+$definitionHeaderFontWeight: normal !default;
+
+$definitionFooterBackground: $definitionHeaderBackground !default;
+$definitionFooterColor: $definitionHeaderColor !default;
+$definitionFooterFontWeight: $definitionHeaderFontWeight !default;
+
+$definitionColumnBackground: $subtleTransparentBlack !default;
+$definitionColumnFontWeight: bold !default;
+$definitionColumnColor: $selectedTextColor !default;
+$definitionColumnFontSize: $relativeMedium !default;
+$definitionColumnTextTransform: '' !default;
+$definitionColumnBoxShadow: '' !default;
+$definitionColumnTextAlign: '' !default;
+$definitionColumnHorizontalPadding: '' !default;
+
+
+/*--------------
+    Couplings
+---------------*/
+
+$iconVerticalAlign: baseline !default;
+
+/*--------------
+     States
+---------------*/
+
+$stateMarkerWidth: 0px !default;
+
+/* Positive */
+$positiveColor: $positiveTextColor !default;
+$positiveBoxShadow: $stateMarkerWidth 0px 0px $positiveBorderColor inset !default;
+$positiveBackgroundHover: darken($positiveBackgroundColor, 3) !default;
+$positiveColorHover: darken($positiveColor, 3) !default;
+
+/* Negative */
+$negativeColor: $negativeTextColor !default;
+$negativeBoxShadow: $stateMarkerWidth 0px 0px $negativeBorderColor inset !default;
+$negativeBackgroundHover: darken($negativeBackgroundColor, 3) !default;
+$negativeColorHover: darken($negativeColor, 3) !default;
+
+/* Error */
+$errorColor: $errorTextColor !default;
+$errorBoxShadow: $stateMarkerWidth 0px 0px $errorBorderColor inset !default;
+$errorBackgroundHover: darken($errorBackgroundColor, 3) !default;
+$errorColorHover: darken($errorColor, 3) !default;
+
+/* Warning */
+$warningColor: $warningTextColor !default;
+$warningBoxShadow: $stateMarkerWidth 0px 0px $warningBorderColor inset !default;
+$warningBackgroundHover: darken($warningBackgroundColor, 3) !default;
+$warningColorHover: darken($warningColor, 3) !default;
+
+/* Active */
+$activeColor: $textColor !default;
+$activeBackgroundColor: #E0E0E0 !default;
+$activeBoxShadow: $stateMarkerWidth 0px 0px $activeColor inset !default;
+
+$activeBackgroundHover: #EFEFEF !default;
+$activeColorHover: $selectedTextColor !default;
+
+/*--------------
+     Types
+---------------*/
+
+/* Attached */
+$attachedTopOffset: 0px !default;
+$attachedBottomOffset: 0px !default;
+$attachedHorizontalOffset: -$borderWidth !default;
+$attachedWidth: calc(100% + #{$attachedHorizontalOffset * -2}) !default;
+$attachedBoxShadow: none !default;
+$attachedBorder: $borderWidth solid $solidBorderColor !default;
+$attachedBottomBoxShadow:
+  $boxShadow,
+  $attachedBoxShadow
+ !default;
+
+/* Striped */
+$stripedBackground: rgba(0, 0, 50, 0.02) !default;
+$invertedStripedBackground: rgba(255, 255, 255, 0.05) !default;
+
+/* Selectable */
+$selectableBackground: $transparentBlack !default;
+$selectableTextColor: $selectedTextColor !default;
+$selectableInvertedBackground: $transparentWhite !default;
+$selectableInvertedTextColor: $invertedSelectedTextColor !default;
+
+/* Sortable */
+$sortableBackground: '' !default;
+$sortableColor: $textColor !default;
+
+$sortableBorder: 1px solid $borderColor !default;
+$sortableIconWidth: auto !default;
+$sortableIconDistance: 0.5em !default;
+$sortableIconOpacity: 0.8 !default;
+$sortableIconFont: 'Icons' !default;
+$sortableIconAscending: '\f0d8' !default;
+$sortableIconDescending: '\f0d7' !default;
+$sortableDisabledColor: $disabledTextColor !default;
+
+$sortableHoverBackground: $transparentBlack !default;
+$sortableHoverColor: $hoveredTextColor !default;
+
+$sortableActiveBackground: $transparentBlack !default;
+$sortableActiveColor: $selectedTextColor !default;
+
+$sortableActiveHoverBackground: $transparentBlack !default;
+$sortableActiveHoverColor: $selectedTextColor !default;
+
+$sortableInvertedBorderColor: transparent !default;
+$sortableInvertedHoverBackground: $transparentWhite $subtleGradient !default;
+$sortableInvertedHoverColor: $invertedHoveredTextColor !default;
+$sortableInvertedActiveBackground: $strongTransparentWhite $subtleGradient !default;
+$sortableInvertedActiveColor: $invertedSelectedTextColor !default;
+
+/* Colors */
+$coloredBorderSize: 0.2em !default;
+$coloredBorderRadius: 0em 0em $borderRadius $borderRadius !default;
+
+/* Inverted */
+$invertedBackground: #333333 !default;
+$invertedBorder: none !default;
+$invertedCellBorderColor: $whiteBorderColor !default;
+$invertedCellColor: $invertedTextColor !default;
+
+$invertedHeaderBackground: $veryStrongTransparentBlack !default;
+$invertedHeaderColor: $invertedTextColor !default;
+$invertedHeaderBorderColor: $invertedCellBorderColor !default;
+
+$invertedDefinitionColumnBackground: $subtleTransparentWhite !default;
+$invertedDefinitionColumnColor: $invertedSelectedTextColor !default;
+$invertedDefinitionColumnFontWeight: bold !default;
+
+/* Basic */
+$basicTableBackground: transparent !default;
+$basicTableBorder: $borderWidth solid $borderColor !default;
+$basicBoxShadow: none !default;
+
+$basicTableHeaderBackground: transparent !default;
+$basicTableCellBackground: transparent !default;
+$basicTableHeaderDivider: none !default;
+$basicTableCellBorder: 1px solid rgba(0, 0, 0, 0.1) !default;
+$basicTableCellPadding: '' !default;
+$basicTableStripedBackground: $transparentBlack !default;
+
+/* Padded */
+$paddedVerticalPadding: 1em !default;
+$paddedHorizontalPadding: 1em !default;
+$veryPaddedVerticalPadding: 1.5em !default;
+$veryPaddedHorizontalPadding: 1.5em !default;
+
+/* Compact */
+$compactVerticalPadding: 0.5em !default;
+$compactHorizontalPadding: 0.7em !default;
+$veryCompactVerticalPadding: 0.4em !default;
+$veryCompactHorizontalPadding: 0.6em !default;
+
+
+/* Sizes */
+$small: 0.9em !default;
+$medium: 1em !default;
+$large: 1.1em !default;
diff --git a/js/tabulator/src/scss/tabulator.scss b/js/tabulator/src/scss/tabulator.scss
new file mode 100644
index 0000000..e9d6d23
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator.scss
@@ -0,0 +1,996 @@
+
+//Main Theme Variables
+$backgroundColor: #888 !default; //background color of tabulator
+$borderColor:#999 !default; //border to tabulator
+$textSize:14px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:#e6e6e6 !default; //border to tabulator
+$headerTextColor:#555 !default; //header text colour
+$headerBorderColor:#aaa !default;  //header border color
+$headerSeperatorColor:#999 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: #666 !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBackgroundColor:#fff !default; //table row background color
+$rowAltBackgroundColor:#EFEFEF !default; //table row background color
+$rowBorderColor:#aaa !default; //table border color
+$rowTextColor:#333 !default; //table text color
+$rowHoverBackground:#bbb !default; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA !default; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#e6e6e6 !default; //border to tabulator
+$footerTextColor:#555 !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#999 !default; //footer bottom seperator color
+$footerActiveColor:#d00 !default; //footer bottom active text color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+
+	border: 1px solid $borderColor;
+
+	background-color: $backgroundColor;
+
+	font-size:$textSize;
+	text-align: left;
+	overflow:hidden;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background:$headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: $headerBackgroundColor !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+						width : 0;
+						height: 0;
+					}
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#ccc;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			//row element
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+
+		}
+	}
+
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align: right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		.tabulator-paginator{
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+		}
+
+		//pagination container element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+	min-height:$textSize + ($headerMargin * 2);
+	background-color: $rowBackgroundColor;
+
+
+	&.tabulator-row-even{
+		background-color: $rowAltBackgroundColor;
+	}
+
+	&.tabulator-selectable:hover{
+		background-color:$rowHoverBackground;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:$rowSelectedBackgroundHover;
+		cursor: pointer;
+	}
+
+	&.tabulator-row-moving{
+		border:1px solid #000;
+		background:#fff;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:4px;
+		border-right:1px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+			display: inline-flex;
+			align-items:center;
+			justify-content:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+		box-sizing:border-box;
+		border-bottom:1px solid #999;
+		border-right:1px solid $rowBorderColor;
+		border-top:1px solid #999;
+		padding:5px;
+		padding-left:10px;
+		background:#ccc;
+		font-weight:bold;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+		&.tabulator-group-visible{
+
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:#d00;
+		}
+	}
+
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowBackgroundColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/tabulator_midnight.scss b/js/tabulator/src/scss/tabulator_midnight.scss
new file mode 100644
index 0000000..fa045db
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_midnight.scss
@@ -0,0 +1,1002 @@
+
+//Main Theme Variables
+$backgroundColor: #222 !default; //background color of tabulator
+$borderColor:#333 !default; //border to tabulator
+$textSize:14px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:#333 !default; //border to tabulator
+$headerTextColor:#fff !default; //header text colour
+$headerBorderColor:#aaa !default;  //header border color
+$headerSeperatorColor:#999 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: #666 !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBackgroundColor:#666 !default; //table row background color
+$rowAltBackgroundColor:#444 !default; //table row background color
+$rowBorderColor:#888 !default; //table border color
+$rowTextColor:#fff !default; //table text color
+$rowHoverBackground:#999 !default; //row background color on hover
+
+$rowSelectedBackground: #000 !default; //row background color when selected
+$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered
+
+$editBoxColor:#999 !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#333 !default; //border to tabulator
+$footerTextColor:#333 !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#999 !default; //footer bottom seperator color
+$footerActiveColor:#fff !default; //footer bottom active text color
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	border: 1px solid $borderColor;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #444;
+						color: #fff;
+					}
+
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input, select{
+					border:1px solid #999;
+					background: #444;
+					color: #fff;
+				}
+
+				input{
+					&::-ms-clear {
+						width : 0;
+						height: 0;
+					}
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:darken($headerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:darken($headerBackgroundColor, 10%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#eee;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:darken($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($footerBackgroundColor, 5%) !important;
+				color:$headerTextColor;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-paginator{
+			label{
+				color:#fff;
+			}
+		}
+
+		//page size select element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+
+	min-height:$textSize + ($headerMargin * 2);
+	background-color: $rowBackgroundColor;
+
+	&:nth-child(even){
+		background-color: $rowAltBackgroundColor;
+	}
+
+	&.tabulator-selectable:hover{
+		background-color:$rowHoverBackground;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:$rowSelectedBackgroundHover;
+		cursor: pointer;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none !important;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:4px;
+		border-right:1px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+
+			display: inline-flex;
+			align-items:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+
+	//row grouping element
+	&.tabulator-group{
+
+		box-sizing:border-box;
+		border-bottom:1px solid #999;
+		border-right:1px solid $rowBorderColor;
+		border-top:1px solid #999;
+		padding:5px;
+		padding-left:10px;
+		background:#ccc;
+		font-weight:bold;
+		color:#333;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+		&.tabulator-group-visible{
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:#666;
+		}
+	}
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowTextColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowBackgroundColor;
+
+		&.active{
+			color:$editBoxColor;
+			background:$rowAltBackgroundColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$editBoxColor;
+			background:$rowBackgroundColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/tabulator_modern.scss b/js/tabulator/src/scss/tabulator_modern.scss
new file mode 100644
index 0000000..5b91a3b
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_modern.scss
@@ -0,0 +1,1039 @@
+
+$primary: #3759D7 !default; //the base text color from which the rest of the theme derives
+
+//Main Theme Variables
+$backgroundColor: #fff !default; //background color of tabulator
+$borderColor:#fff !default; //border to tabulator
+$textSize:16px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:#fff !default; //border to tabulator
+$headerTextColor:$primary !default; //header text colour
+$headerBorderColor:#fff !default;  //header border color
+$headerSeperatorColor:$primary !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: $primary !default;
+$sortArrowInactive: lighten($primary, 30%) !default;
+
+//row themeing
+$rowBackgroundColor:#f3f3f3 !default; //table row background color
+$rowAltBackgroundColor:#fff !default; //table row background color
+$rowBorderColor:#fff !default; //table border color
+$rowTextColor:#333 !default; //table text color
+$rowHoverBackground:#bbb !default; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA !default; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff !default; //border to tabulator
+$footerTextColor:$primary !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#999 !default; //footer bottom seperator color
+$footerActiveColor:$primary !default; //footer bottom active text color
+
+$handleWidth:10px !default; //width of the row handle
+$handleColor: $primary !default; //color for odd numbered rows
+$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	border: 1px solid $borderColor;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:3px solid $headerSeperatorColor;
+		margin-bottom:4px;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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:$handleWidth;
+
+		font-size: 1.1em;
+
+		&.tabulator-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:2px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid $primary;
+
+						padding:1px;
+
+						background: #fff;
+
+						font-size: 1em;
+						color: $primary;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:2px solid $headerSeperatorColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+						width : 0;
+						height: 0;
+					}
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				padding-left: $handleWidth;
+
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			border-top:2px solid $headerSeperatorColor !important;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				padding-left: 0 !important;
+
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					background:none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:$primary;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $headerSeperatorColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $headerSeperatorColor;
+					}
+				}
+			}
+		}
+	}
+
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 5%) !important;
+
+			border-top:3px solid $headerSeperatorColor !important;
+			border-bottom:2px solid $headerSeperatorColor !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					background:none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+				border-bottom:none !important;
+			}
+		}
+
+		//pagination container element
+		.tabulator-paginator{
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+		}
+
+		//page size select element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+
+	box-sizing: border-box;
+	min-height:$textSize + ($headerMargin * 2);
+
+	background-color: $handleColor;
+
+	padding-left: $handleWidth !important;
+
+	margin-bottom: 2px;
+
+	&:nth-child(even){
+		background-color: $handleColorAlt;
+
+		.tabulator-cell{
+			background-color: $rowAltBackgroundColor;
+		}
+	}
+
+	&.tabulator-selectable:hover{
+		cursor: pointer;
+
+		.tabulator-cell{
+			background-color:$rowHoverBackground;
+		}
+	}
+
+	&.tabulator-selected{
+		.tabulator-cell{
+			background-color:$rowSelectedBackground;
+		}
+	}
+
+	&.tabulator-selected:hover{
+		.tabulator-cell{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none !important;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			padding-left: $handleWidth;
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:6px 4px;
+		border-right:2px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+		background-color: $rowBackgroundColor;
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+
+			display: inline-flex;
+			align-items:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+
+		box-sizing:border-box;
+		border-bottom:2px solid $primary;
+		border-top:2px solid $primary;
+		padding:5px;
+		padding-left:10px;
+		background:lighten($primary, 20%);
+		font-weight:bold;
+		color:fff;
+		margin-bottom: 2px;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+
+		&.tabulator-group-visible{
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:$primary;
+		}
+	}
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowBackgroundColor;
+	border:1px solid $editBoxColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/tabulator_simple.scss b/js/tabulator/src/scss/tabulator_simple.scss
new file mode 100644
index 0000000..c6d3851
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_simple.scss
@@ -0,0 +1,993 @@
+
+//Main Theme Variables
+$backgroundColor: #fff !default; //background color of tabulator
+$borderColor:#999 !default; //border to tabulator
+$textSize:14px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:#fff !default; //border to tabulator
+$headerTextColor:#555 !default; //header text colour
+$headerBorderColor:#ddd !default;  //header border color
+$headerSeperatorColor:#999 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: #666 !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBackgroundColor:#fff !default; //table row background color
+$rowAltBackgroundColor:#fff !default; //table row background color
+$rowBorderColor:#ddd !default; //table border color
+$rowTextColor:#333 !default; //table text color
+$rowHoverBackground:#bbb !default; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA !default; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff !default; //border to tabulator
+$footerTextColor:#555 !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#999 !default; //footer bottom seperator color
+$footerActiveColor:#d00 !default; //footer bottom active text color
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color:darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+					  width : 0;
+					  height: 0;
+					}
+				}
+			}
+
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:darken($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerSeperatorColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#000;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:darken($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $footerBackgroundColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-paginator{
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+		}
+
+		//page size select element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+
+	min-height:$textSize + ($headerMargin * 2);
+	background-color: $rowBackgroundColor;
+	border-bottom:1px solid $rowBorderColor;
+
+	&:nth-child(even){
+		background-color: $rowAltBackgroundColor;
+	}
+
+	&.tabulator-selectable:hover{
+		background-color:$rowHoverBackground;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:$rowSelectedBackgroundHover;
+		cursor: pointer;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none !important;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:4px;
+		border-right:1px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+		&:last-of-type{
+			border-right: none;
+		}
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+
+			display: inline-flex;
+			align-items:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:#666;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+
+		box-sizing:border-box;
+		border-bottom:1px solid #999;
+		border-right:1px solid $rowBorderColor;
+		border-top:1px solid #999;
+		padding:5px;
+		padding-left:10px;
+		background:#fafafa;
+		font-weight:bold;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:rgba(0,0,0,.1);
+		}
+
+		&.tabulator-group-visible{
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:#666;
+		}
+	}
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowBackgroundColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/src/scss/tabulator_site.scss b/js/tabulator/src/scss/tabulator_site.scss
new file mode 100644
index 0000000..0767f82
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_site.scss
@@ -0,0 +1,1004 @@
+
+//Main Theme Variables
+$backgroundColor: #fff !default; //background color of tabulator
+$borderColor:#222 !default; //border to tabulator
+$textSize:14px !default; //table text size
+
+//header themeing
+$headerBackgroundColor:#222 !default; //border to tabulator
+$headerTextColor:#fff !default; //header text colour
+$headerBorderColor:#aaa !default;  //header border color
+$headerSeperatorColor:#3FB449 !default; //header bottom seperator color
+$headerMargin:4px !default; //padding round header
+
+//column header arrows
+$sortArrowActive: #3FB449 !default;
+$sortArrowInactive: #bbb !default;
+
+//row themeing
+$rowBackgroundColor:#fff !default; //table row background color
+$rowAltBackgroundColor:#EFEFEF !default; //table row background color
+$rowBorderColor:#aaa !default; //table border color
+$rowTextColor:#333 !default; //table text color
+$rowHoverBackground:#bbb !default; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA !default; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD !default; //border color for edit boxes
+$errorColor:#dd0000 !default; //error indication
+
+//footer themeing
+$footerBackgroundColor:#222 !default; //border to tabulator
+$footerTextColor:#222 !default; //footer text colour
+$footerBorderColor:#aaa !default; //footer border color
+$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color
+$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+
+	border-bottom: 5px solid $borderColor;
+
+	background-color: $backgroundColor;
+
+	font-size:$textSize;
+	text-align: left;
+	overflow:hidden;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&[tabulator-layout="fitColumns"]{
+		.tabulator-row{
+			.tabulator-cell{
+				&:last-of-type{
+					border-right: none;
+				}
+			}
+		}
+	}
+
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:3px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		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-header-hidden{
+			display:none;
+		}
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				box-sizing:border-box;
+				position: relative;
+				padding:8px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:14px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: $headerBackgroundColor !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input{
+					&::-ms-clear {
+					  width : 0;
+					  height: 0;
+					}
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+			&.tabulator-col-vertical{
+				.tabulator-col-content{
+					.tabulator-col-title{
+						writing-mode: vertical-rl;
+						text-orientation: mixed;
+
+						display:flex;
+						align-items:center;
+						justify-content:center;
+					}
+				}
+
+				&.tabulator-col-vertical-flip{
+					.tabulator-col-title{
+						transform: rotate(180deg);
+					}
+				}
+
+				&.tabulator-sortable{
+					.tabulator-col-title{
+						padding-right:0;
+						padding-top:20px;
+					}
+
+					&.tabulator-col-vertical-flip{
+						.tabulator-col-title{
+							padding-right:0;
+							padding-bottom:20px;
+						}
+
+					}
+
+					.tabulator-arrow{
+						right:calc(50% - 6px);
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:600%;
+
+			background:lighten($headerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 10%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			// border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+		.tabulator-frozen-rows-holder{
+			min-width:600%;
+
+			&:empty{
+				display: none;
+			}
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			&[tabulator-render-mode="virtual"]{
+				position: absolute;
+				top:0;
+				left:0;
+				height:100%;
+			}
+
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:$headerSeperatorColor;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:lighten($headerBackgroundColor, 15%) !important;
+					color:$headerTextColor;
+				}
+			}
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		padding-top:8px;
+		border-top:3px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc(100% + 20px);
+			margin:-8px -10px 8px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 10%) !important;
+				color:$headerTextColor !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			// border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-paginator{
+			label{
+				color:#fff;
+			}
+		}
+
+		//page size select element
+		.tabulator-page-size{
+			display:inline-block;
+
+			margin:0 5px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:#fff;
+
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:$footerActiveColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tabulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
+
+//row element
+.tabulator-row{
+	position: relative;
+	box-sizing: border-box;
+	min-height:$textSize + ($headerMargin * 2);
+	background-color: $rowBackgroundColor;
+
+
+	&.tabulator-row-even{
+		background-color: $rowAltBackgroundColor;
+	}
+
+	&.tabulator-selectable:hover{
+		background-color:$rowHoverBackground;
+		cursor: pointer;
+	}
+
+	&.tabulator-selected{
+		background-color:$rowSelectedBackground;
+	}
+
+	&.tabulator-selected:hover{
+		background-color:$rowSelectedBackgroundHover;
+		cursor: pointer;
+	}
+
+	&.tabulator-row-moving{
+		border:1px solid #000;
+		background:#fff;
+	}
+
+	&.tabulator-moving{
+		position: absolute;
+
+		border-top:1px solid  $rowBorderColor;
+		border-bottom:1px solid  $rowBorderColor;
+
+		pointer-events: none !important;
+		z-index:15;
+	}
+
+	//row resize handles
+	.tabulator-row-resize-handle{
+		position:absolute;
+		right:0;
+		bottom:0;
+		left:0;
+		height:5px;
+
+		&.prev{
+			top:0;
+			bottom:auto;
+		}
+
+		&:hover{
+			cursor:ns-resize;
+		}
+	}
+
+	.tabulator-frozen{
+		display: inline-block;
+		position: absolute;
+
+		background-color: inherit;
+
+		z-index: 10;
+
+		&.tabulator-frozen-left{
+			border-right:2px solid $rowBorderColor;
+		}
+
+		&.tabulator-frozen-right{
+			border-left:2px solid $rowBorderColor;
+		}
+	}
+
+	.tabulator-responsive-collapse{
+		box-sizing:border-box;
+
+		padding:5px;
+
+		border-top:1px solid $rowBorderColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:empty{
+			display:none;
+		}
+
+		table{
+			font-size:$textSize;
+
+			tr{
+				td{
+					position: relative;
+
+					&:first-of-type{
+						padding-right:10px;
+					}
+				}
+			}
+		}
+	}
+
+	//cell element
+	.tabulator-cell{
+		display:inline-block;
+		position: relative;
+		box-sizing:border-box;
+		padding:6px;
+		border-right:1px solid $rowBorderColor;
+		vertical-align:middle;
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+
+
+		&.tabulator-editing{
+			border:1px solid  $editBoxColor;
+			padding: 0;
+
+			input, select{
+				border:1px;
+				background:transparent;
+			}
+		}
+
+		&.tabulator-validation-fail{
+			border:1px solid $errorColor;
+			input, select{
+				border:1px;
+				background:transparent;
+
+				color: $errorColor;
+			}
+		}
+
+		//hide left resize handle on first column
+		&:first-child{
+			.tabulator-col-resize-handle.prev{
+				display: none;
+			}
+		}
+
+		//movable row handle
+		&.tabulator-row-handle{
+
+			display: inline-flex;
+			align-items:center;
+
+			-moz-user-select: none;
+			-khtml-user-select: none;
+			-webkit-user-select: none;
+			-o-user-select: none;
+
+			//handle holder
+			.tabulator-row-handle-box{
+				width:80%;
+
+				//Hamburger element
+				.tabulator-row-handle-bar{
+					width:100%;
+					height:3px;
+					margin-top:2px;
+					background:$sortArrowActive;
+				}
+			}
+		}
+
+		.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 $rowBorderColor;
+			border-bottom:2px solid $rowBorderColor;
+		}
+
+		.tabulator-data-tree-control{
+
+			display:inline-flex;
+			justify-content:center;
+			align-items:center;
+			vertical-align:middle;
+
+			height:11px;
+			width:11px;
+
+			margin-right:5px;
+
+			border:1px solid $rowTextColor;
+			border-radius:2px;
+			background:rgba(0, 0, 0, .1);
+
+			overflow:hidden;
+
+			&:hover{
+				cursor:pointer;
+				background:rgba(0, 0, 0, .2);
+			}
+
+			.tabulator-data-tree-control-collapse{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: transparent;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+			.tabulator-data-tree-control-expand{
+				display:inline-block;
+				position: relative;
+
+				height: 7px;
+				width: 1px;
+
+				background: $rowTextColor;
+
+				&:after {
+					position: absolute;
+					content: "";
+					left: -3px;
+					top: 3px;
+
+					height: 1px;
+					width: 7px;
+
+					background: $rowTextColor;
+				}
+			}
+
+		}
+
+		.tabulator-responsive-collapse-toggle{
+			display: inline-flex;
+			align-items: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:$rowBackgroundColor;
+			font-weight:bold;
+			font-size:1.1em;
+
+			&:hover{
+				opacity:.7;
+			}
+
+			&.open{
+				.tabulator-responsive-collapse-toggle-close{
+					display:initial;
+				}
+
+				.tabulator-responsive-collapse-toggle-open{
+					display:none;
+				}
+			}
+
+			.tabulator-responsive-collapse-toggle-close{
+				display:none;
+			}
+		}
+
+		.tabulator-traffic-light{
+			display: inline-block;
+			height:14px;
+			width:14px;
+
+			border-radius:14px;
+		}
+	}
+
+	//row grouping element
+	&.tabulator-group{
+		box-sizing:border-box;
+		border-right:1px solid $rowBorderColor;
+		border-top:1px solid #000;
+		border-bottom:2px solid $headerSeperatorColor;
+		padding:5px;
+		padding-left:10px;
+		background:$headerBackgroundColor;
+		color:$headerTextColor;
+		font-weight:bold;
+
+		min-width: 100%;
+
+		&:hover{
+			cursor:pointer;
+			background-color:darken($headerBackgroundColor, 10%);
+		}
+
+		&.tabulator-group-visible{
+			.tabulator-arrow{
+				margin-right:10px;
+				border-left: 6px solid transparent;
+				border-right: 6px solid transparent;
+				border-top: 6px solid $sortArrowActive;
+				border-bottom: 0;
+			}
+		}
+
+		&.tabulator-group-level-1{
+			padding-left:30px;
+		}
+
+		&.tabulator-group-level-2{
+			padding-left:50px;
+		}
+
+		&.tabulator-group-level-3{
+			padding-left:70px;
+		}
+
+		&.tabulator-group-level-4{
+			padding-left:90px;
+		}
+
+		&.tabulator-group-level-5{
+			padding-left:110px;
+		}
+
+
+		//sorting arrow
+		.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 $sortArrowActive;
+			vertical-align:middle;
+		}
+
+		span{
+			margin-left:10px;
+			color:$headerSeperatorColor;
+		}
+	}
+
+}
+
+.tabulator-edit-select-list{
+	position: absolute;
+	display:inline-block;
+	box-sizing:border-box;
+
+	max-height:200px;
+
+	background:$rowBackgroundColor;
+	border:1px solid $rowBorderColor;
+
+	font-size:$textSize;
+
+	overflow-y:auto;
+	-webkit-overflow-scrolling: touch;
+
+	z-index: 10000;
+
+	.tabulator-edit-select-list-item{
+		padding:4px;
+
+		color:$rowTextColor;
+
+		&.active{
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+
+		&:hover{
+			cursor:pointer;
+
+			color:$rowBackgroundColor;
+			background:$editBoxColor;
+		}
+	}
+
+	.tabulator-edit-select-list-group{
+		border-bottom:1px solid $rowBorderColor;
+
+		padding:4px;
+		padding-top:6px;
+
+		color:$rowTextColor;
+		font-weight:bold;
+	}
+}
+
+// Table print styling
+
+.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;
+}
+
diff --git a/js/tabulator/yarn.lock b/js/tabulator/yarn.lock
new file mode 100644
index 0000000..a6a0bc5
--- /dev/null
+++ b/js/tabulator/yarn.lock
@@ -0,0 +1,5648 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@gulp-sourcemaps/identity-map@1.X":
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9"
+  dependencies:
+    acorn "^5.0.3"
+    css "^2.2.1"
+    normalize-path "^2.1.1"
+    source-map "^0.6.0"
+    through2 "^2.0.3"
+
+"@gulp-sourcemaps/map-sources@1.X":
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
+  dependencies:
+    normalize-path "^2.0.1"
+    through2 "^2.0.3"
+
+abbrev@1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+
+acorn@5.X, acorn@^5.0.3:
+  version "5.7.3"
+  resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
+
+ajv@^6.5.5:
+  version "6.10.2"
+  resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
+  dependencies:
+    fast-deep-equal "^2.0.1"
+    fast-json-stable-stringify "^2.0.0"
+    json-schema-traverse "^0.4.1"
+    uri-js "^4.2.2"
+
+align-text@^0.1.1, align-text@^0.1.3:
+  version "0.1.4"
+  resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+  dependencies:
+    kind-of "^3.0.2"
+    longest "^1.0.1"
+    repeat-string "^1.5.2"
+
+alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
+
+amdefine@>=0.0.4:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ansi-colors@^1.0.1:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9"
+  dependencies:
+    ansi-wrap "^0.1.0"
+
+ansi-colors@^3.2.4:
+  version "3.2.4"
+  resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
+
+ansi-cyan@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873"
+  dependencies:
+    ansi-wrap "0.1.0"
+
+ansi-gray@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
+  dependencies:
+    ansi-wrap "0.1.0"
+
+ansi-red@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c"
+  dependencies:
+    ansi-wrap "0.1.0"
+
+ansi-regex@^0.2.0, ansi-regex@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
+
+ansi-regex@^2.0.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+
+ansi-regex@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+
+ansi-styles@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
+
+ansi-styles@^2.2.1:
+  version "2.2.1"
+  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+ansi-styles@^3.2.1:
+  version "3.2.1"
+  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+  dependencies:
+    color-convert "^1.9.0"
+
+ansi-wrap@0.1.0, ansi-wrap@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
+
+aproba@^1.0.3:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+
+archive-type@^3.0.0, archive-type@^3.0.1:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6"
+  dependencies:
+    file-type "^3.1.0"
+
+archy@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+
+are-we-there-yet@~1.1.2:
+  version "1.1.5"
+  resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
+  dependencies:
+    delegates "^1.0.0"
+    readable-stream "^2.0.6"
+
+argparse@^1.0.7:
+  version "1.0.10"
+  resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+  dependencies:
+    sprintf-js "~1.0.2"
+
+arr-diff@^1.0.1:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
+  dependencies:
+    arr-flatten "^1.0.1"
+    array-slice "^0.2.3"
+
+arr-diff@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+  dependencies:
+    arr-flatten "^1.0.1"
+
+arr-diff@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
+
+arr-flatten@^1.0.1, arr-flatten@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
+
+arr-union@^2.0.1:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d"
+
+arr-union@^3.1.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
+
+array-differ@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
+
+array-each@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
+
+array-find-index@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+
+array-slice@^0.2.3:
+  version "0.2.3"
+  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
+
+array-slice@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4"
+
+array-union@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+  dependencies:
+    array-uniq "^1.0.1"
+
+array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+
+array-unique@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+
+array-unique@^0.3.2:
+  version "0.3.2"
+  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
+
+arrify@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+asn1@~0.2.3:
+  version "0.2.4"
+  resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+  dependencies:
+    safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+
+assign-symbols@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+
+async-each-series@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138"
+
+async-foreach@^0.1.3:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542"
+
+asynckit@^0.4.0:
+  version "0.4.0"
+  resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+
+atob@^2.1.1:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
+
+autoprefixer@^6.0.0, autoprefixer@^6.3.1:
+  version "6.7.7"
+  resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
+  dependencies:
+    browserslist "^1.7.6"
+    caniuse-db "^1.0.30000634"
+    normalize-range "^0.1.2"
+    num2fraction "^1.2.2"
+    postcss "^5.2.16"
+    postcss-value-parser "^3.2.3"
+
+aws-sign2@~0.7.0:
+  version "0.7.0"
+  resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+
+aws4@^1.8.0:
+  version "1.8.0"
+  resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
+
+babel-code-frame@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+  dependencies:
+    chalk "^1.1.3"
+    esutils "^2.0.2"
+    js-tokens "^3.0.2"
+
+babel-core@^6.23.1, babel-core@^6.26.0:
+  version "6.26.3"
+  resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
+  dependencies:
+    babel-code-frame "^6.26.0"
+    babel-generator "^6.26.0"
+    babel-helpers "^6.24.1"
+    babel-messages "^6.23.0"
+    babel-register "^6.26.0"
+    babel-runtime "^6.26.0"
+    babel-template "^6.26.0"
+    babel-traverse "^6.26.0"
+    babel-types "^6.26.0"
+    babylon "^6.18.0"
+    convert-source-map "^1.5.1"
+    debug "^2.6.9"
+    json5 "^0.5.1"
+    lodash "^4.17.4"
+    minimatch "^3.0.4"
+    path-is-absolute "^1.0.1"
+    private "^0.1.8"
+    slash "^1.0.0"
+    source-map "^0.5.7"
+
+babel-generator@^6.26.0:
+  version "6.26.1"
+  resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
+  dependencies:
+    babel-messages "^6.23.0"
+    babel-runtime "^6.26.0"
+    babel-types "^6.26.0"
+    detect-indent "^4.0.0"
+    jsesc "^1.3.0"
+    lodash "^4.17.4"
+    source-map "^0.5.7"
+    trim-right "^1.0.1"
+
+babel-helper-bindify-decorators@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
+  dependencies:
+    babel-helper-explode-assignable-expression "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-helper-call-delegate@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
+  dependencies:
+    babel-helper-hoist-variables "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-define-map@^6.24.1:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f"
+  dependencies:
+    babel-helper-function-name "^6.24.1"
+    babel-runtime "^6.26.0"
+    babel-types "^6.26.0"
+    lodash "^4.17.4"
+
+babel-helper-explode-assignable-expression@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-explode-class@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb"
+  dependencies:
+    babel-helper-bindify-decorators "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-function-name@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
+  dependencies:
+    babel-helper-get-function-arity "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-get-function-arity@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-helper-hoist-variables@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-helper-optimise-call-expression@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-helper-regex@^6.24.1:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72"
+  dependencies:
+    babel-runtime "^6.26.0"
+    babel-types "^6.26.0"
+    lodash "^4.17.4"
+
+babel-helper-remap-async-to-generator@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
+  dependencies:
+    babel-helper-function-name "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helper-replace-supers@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
+  dependencies:
+    babel-helper-optimise-call-expression "^6.24.1"
+    babel-messages "^6.23.0"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-helpers@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-messages@^6.23.0:
+  version "6.23.0"
+  resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-check-es2015-constants@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-syntax-async-functions@^6.8.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
+
+babel-plugin-syntax-async-generators@^6.5.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a"
+
+babel-plugin-syntax-class-properties@^6.8.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
+
+babel-plugin-syntax-decorators@^6.13.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b"
+
+babel-plugin-syntax-dynamic-import@^6.18.0:
+  version "6.18.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
+
+babel-plugin-syntax-exponentiation-operator@^6.8.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
+
+babel-plugin-syntax-object-rest-spread@^6.8.0:
+  version "6.13.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
+
+babel-plugin-syntax-trailing-function-commas@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
+
+babel-plugin-transform-async-generator-functions@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db"
+  dependencies:
+    babel-helper-remap-async-to-generator "^6.24.1"
+    babel-plugin-syntax-async-generators "^6.5.0"
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
+  dependencies:
+    babel-helper-remap-async-to-generator "^6.24.1"
+    babel-plugin-syntax-async-functions "^6.8.0"
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-class-properties@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
+  dependencies:
+    babel-helper-function-name "^6.24.1"
+    babel-plugin-syntax-class-properties "^6.8.0"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-plugin-transform-decorators@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d"
+  dependencies:
+    babel-helper-explode-class "^6.24.1"
+    babel-plugin-syntax-decorators "^6.13.0"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-arrow-functions@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
+  dependencies:
+    babel-runtime "^6.26.0"
+    babel-template "^6.26.0"
+    babel-traverse "^6.26.0"
+    babel-types "^6.26.0"
+    lodash "^4.17.4"
+
+babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
+  dependencies:
+    babel-helper-define-map "^6.24.1"
+    babel-helper-function-name "^6.24.1"
+    babel-helper-optimise-call-expression "^6.24.1"
+    babel-helper-replace-supers "^6.24.1"
+    babel-messages "^6.23.0"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
+  version "6.23.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
+  version "6.23.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
+  dependencies:
+    babel-helper-function-name "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-literals@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
+  dependencies:
+    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
+  version "6.26.2"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
+  dependencies:
+    babel-plugin-transform-strict-mode "^6.24.1"
+    babel-runtime "^6.26.0"
+    babel-template "^6.26.0"
+    babel-types "^6.26.0"
+
+babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
+  dependencies:
+    babel-helper-hoist-variables "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
+  dependencies:
+    babel-plugin-transform-es2015-modules-amd "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+
+babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
+  dependencies:
+    babel-helper-replace-supers "^6.24.1"
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
+  dependencies:
+    babel-helper-call-delegate "^6.24.1"
+    babel-helper-get-function-arity "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-template "^6.24.1"
+    babel-traverse "^6.24.1"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-spread@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
+  dependencies:
+    babel-helper-regex "^6.24.1"
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-plugin-transform-es2015-template-literals@^6.22.0:
+  version "6.22.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
+  version "6.23.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
+  dependencies:
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
+  dependencies:
+    babel-helper-regex "^6.24.1"
+    babel-runtime "^6.22.0"
+    regexpu-core "^2.0.0"
+
+babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
+  dependencies:
+    babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
+    babel-plugin-syntax-exponentiation-operator "^6.8.0"
+    babel-runtime "^6.22.0"
+
+babel-plugin-transform-object-rest-spread@^6.22.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
+  dependencies:
+    babel-plugin-syntax-object-rest-spread "^6.8.0"
+    babel-runtime "^6.26.0"
+
+babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
+  dependencies:
+    regenerator-transform "^0.10.0"
+
+babel-plugin-transform-strict-mode@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
+  dependencies:
+    babel-runtime "^6.22.0"
+    babel-types "^6.24.1"
+
+babel-preset-env@^1.4.0:
+  version "1.7.0"
+  resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
+  dependencies:
+    babel-plugin-check-es2015-constants "^6.22.0"
+    babel-plugin-syntax-trailing-function-commas "^6.22.0"
+    babel-plugin-transform-async-to-generator "^6.22.0"
+    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoping "^6.23.0"
+    babel-plugin-transform-es2015-classes "^6.23.0"
+    babel-plugin-transform-es2015-computed-properties "^6.22.0"
+    babel-plugin-transform-es2015-destructuring "^6.23.0"
+    babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
+    babel-plugin-transform-es2015-for-of "^6.23.0"
+    babel-plugin-transform-es2015-function-name "^6.22.0"
+    babel-plugin-transform-es2015-literals "^6.22.0"
+    babel-plugin-transform-es2015-modules-amd "^6.22.0"
+    babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
+    babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
+    babel-plugin-transform-es2015-modules-umd "^6.23.0"
+    babel-plugin-transform-es2015-object-super "^6.22.0"
+    babel-plugin-transform-es2015-parameters "^6.23.0"
+    babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
+    babel-plugin-transform-es2015-spread "^6.22.0"
+    babel-plugin-transform-es2015-sticky-regex "^6.22.0"
+    babel-plugin-transform-es2015-template-literals "^6.22.0"
+    babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
+    babel-plugin-transform-es2015-unicode-regex "^6.22.0"
+    babel-plugin-transform-exponentiation-operator "^6.22.0"
+    babel-plugin-transform-regenerator "^6.22.0"
+    browserslist "^3.2.6"
+    invariant "^2.2.2"
+    semver "^5.3.0"
+
+babel-preset-es2015@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
+  dependencies:
+    babel-plugin-check-es2015-constants "^6.22.0"
+    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+    babel-plugin-transform-es2015-block-scoping "^6.24.1"
+    babel-plugin-transform-es2015-classes "^6.24.1"
+    babel-plugin-transform-es2015-computed-properties "^6.24.1"
+    babel-plugin-transform-es2015-destructuring "^6.22.0"
+    babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
+    babel-plugin-transform-es2015-for-of "^6.22.0"
+    babel-plugin-transform-es2015-function-name "^6.24.1"
+    babel-plugin-transform-es2015-literals "^6.22.0"
+    babel-plugin-transform-es2015-modules-amd "^6.24.1"
+    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+    babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
+    babel-plugin-transform-es2015-modules-umd "^6.24.1"
+    babel-plugin-transform-es2015-object-super "^6.24.1"
+    babel-plugin-transform-es2015-parameters "^6.24.1"
+    babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
+    babel-plugin-transform-es2015-spread "^6.22.0"
+    babel-plugin-transform-es2015-sticky-regex "^6.24.1"
+    babel-plugin-transform-es2015-template-literals "^6.22.0"
+    babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
+    babel-plugin-transform-es2015-unicode-regex "^6.24.1"
+    babel-plugin-transform-regenerator "^6.24.1"
+
+babel-preset-stage-2@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"
+  dependencies:
+    babel-plugin-syntax-dynamic-import "^6.18.0"
+    babel-plugin-transform-class-properties "^6.24.1"
+    babel-plugin-transform-decorators "^6.24.1"
+    babel-preset-stage-3 "^6.24.1"
+
+babel-preset-stage-3@^6.24.1:
+  version "6.24.1"
+  resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395"
+  dependencies:
+    babel-plugin-syntax-trailing-function-commas "^6.22.0"
+    babel-plugin-transform-async-generator-functions "^6.24.1"
+    babel-plugin-transform-async-to-generator "^6.24.1"
+    babel-plugin-transform-exponentiation-operator "^6.24.1"
+    babel-plugin-transform-object-rest-spread "^6.22.0"
+
+babel-register@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
+  dependencies:
+    babel-core "^6.26.0"
+    babel-runtime "^6.26.0"
+    core-js "^2.5.0"
+    home-or-tmp "^2.0.0"
+    lodash "^4.17.4"
+    mkdirp "^0.5.1"
+    source-map-support "^0.4.15"
+
+babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+  dependencies:
+    core-js "^2.4.0"
+    regenerator-runtime "^0.11.0"
+
+babel-template@^6.24.1, babel-template@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+  dependencies:
+    babel-runtime "^6.26.0"
+    babel-traverse "^6.26.0"
+    babel-types "^6.26.0"
+    babylon "^6.18.0"
+    lodash "^4.17.4"
+
+babel-traverse@^6.24.1, babel-traverse@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+  dependencies:
+    babel-code-frame "^6.26.0"
+    babel-messages "^6.23.0"
+    babel-runtime "^6.26.0"
+    babel-types "^6.26.0"
+    babylon "^6.18.0"
+    debug "^2.6.8"
+    globals "^9.18.0"
+    invariant "^2.2.2"
+    lodash "^4.17.4"
+
+babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
+  version "6.26.0"
+  resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+  dependencies:
+    babel-runtime "^6.26.0"
+    esutils "^2.0.2"
+    lodash "^4.17.4"
+    to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+  version "6.18.0"
+  resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+
+balanced-match@^0.4.2:
+  version "0.4.2"
+  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
+
+balanced-match@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+base@^0.11.1:
+  version "0.11.2"
+  resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
+  dependencies:
+    cache-base "^1.0.1"
+    class-utils "^0.3.5"
+    component-emitter "^1.2.1"
+    define-property "^1.0.0"
+    isobject "^3.0.1"
+    mixin-deep "^1.2.0"
+    pascalcase "^0.1.1"
+
+bcrypt-pbkdf@^1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+  dependencies:
+    tweetnacl "^0.14.3"
+
+beeper@^1.0.0:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
+
+bin-build@^2.0.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc"
+  dependencies:
+    archive-type "^3.0.1"
+    decompress "^3.0.0"
+    download "^4.1.2"
+    exec-series "^1.0.0"
+    rimraf "^2.2.6"
+    tempfile "^1.0.0"
+    url-regex "^3.0.0"
+
+bin-check@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930"
+  dependencies:
+    executable "^1.0.0"
+
+bin-version-check@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0"
+  dependencies:
+    bin-version "^1.0.0"
+    minimist "^1.1.0"
+    semver "^4.0.3"
+    semver-truncate "^1.0.0"
+
+bin-version@^1.0.0:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e"
+  dependencies:
+    find-versions "^1.0.0"
+
+bin-wrapper@^3.0.0:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb"
+  dependencies:
+    bin-check "^2.0.0"
+    bin-version-check "^2.1.0"
+    download "^4.0.0"
+    each-async "^1.1.1"
+    lazy-req "^1.0.0"
+    os-filter-obj "^1.0.0"
+
+bl@^1.0.0:
+  version "1.2.2"
+  resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
+  dependencies:
+    readable-stream "^2.3.5"
+    safe-buffer "^5.1.1"
+
+block-stream@*:
+  version "0.0.9"
+  resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
+  dependencies:
+    inherits "~2.0.0"
+
+bluebird@^3.0.5:
+  version "3.5.5"
+  resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
+
+body-parser@~1.14.0:
+  version "1.14.2"
+  resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9"
+  dependencies:
+    bytes "2.2.0"
+    content-type "~1.0.1"
+    debug "~2.2.0"
+    depd "~1.1.0"
+    http-errors "~1.3.1"
+    iconv-lite "0.4.13"
+    on-finished "~2.3.0"
+    qs "5.2.0"
+    raw-body "~2.1.5"
+    type-is "~1.6.10"
+
+brace-expansion@^1.0.0, brace-expansion@^1.1.7:
+  version "1.1.11"
+  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+  dependencies:
+    balanced-match "^1.0.0"
+    concat-map "0.0.1"
+
+braces@^1.8.2:
+  version "1.8.5"
+  resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+  dependencies:
+    expand-range "^1.8.1"
+    preserve "^0.2.0"
+    repeat-element "^1.1.2"
+
+braces@^2.3.1:
+  version "2.3.2"
+  resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
+  dependencies:
+    arr-flatten "^1.1.0"
+    array-unique "^0.3.2"
+    extend-shallow "^2.0.1"
+    fill-range "^4.0.0"
+    isobject "^3.0.1"
+    repeat-element "^1.1.2"
+    snapdragon "^0.8.1"
+    snapdragon-node "^2.0.1"
+    split-string "^3.0.2"
+    to-regex "^3.0.1"
+
+browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
+  version "1.7.7"
+  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9"
+  dependencies:
+    caniuse-db "^1.0.30000639"
+    electron-to-chromium "^1.2.7"
+
+browserslist@^3.2.6:
+  version "3.2.8"
+  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
+  dependencies:
+    caniuse-lite "^1.0.30000844"
+    electron-to-chromium "^1.3.47"
+
+buffer-alloc-unsafe@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
+
+buffer-alloc@^1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
+  dependencies:
+    buffer-alloc-unsafe "^1.1.0"
+    buffer-fill "^1.0.0"
+
+buffer-crc32@~0.2.3:
+  version "0.2.13"
+  resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+
+buffer-fill@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
+
+buffer-from@^1.0.0:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+
+buffer-to-vinyl@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262"
+  dependencies:
+    file-type "^3.1.0"
+    readable-stream "^2.0.2"
+    uuid "^2.0.1"
+    vinyl "^1.0.0"
+
+bytes@2.2.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588"
+
+bytes@2.4.0:
+  version "2.4.0"
+  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339"
+
+cache-base@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
+  dependencies:
+    collection-visit "^1.0.0"
+    component-emitter "^1.2.1"
+    get-value "^2.0.6"
+    has-value "^1.0.0"
+    isobject "^3.0.1"
+    set-value "^2.0.0"
+    to-object-path "^0.3.0"
+    union-value "^1.0.0"
+    unset-value "^1.0.0"
+
+cache-swap@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/cache-swap/-/cache-swap-0.3.0.tgz#1c541aa108a50106f630bdd98fe1dec8ba133f51"
+  dependencies:
+    graceful-fs "^4.1.2"
+    mkdirp "^0.5.1"
+    object-assign "^4.0.1"
+    rimraf "^2.4.0"
+
+camelcase-keys@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
+  dependencies:
+    camelcase "^2.0.0"
+    map-obj "^1.0.0"
+
+camelcase@^1.0.2:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^2.0.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
+
+camelcase@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
+
+caniuse-api@^1.5.2:
+  version "1.6.1"
+  resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
+  dependencies:
+    browserslist "^1.3.6"
+    caniuse-db "^1.0.30000529"
+    lodash.memoize "^4.1.2"
+    lodash.uniq "^4.5.0"
+
+caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
+  version "1.0.30000984"
+  resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000984.tgz#3e4a53d78f33403e931ef1d2b2db07556d253dff"
+
+caniuse-lite@^1.0.30000844:
+  version "1.0.30000984"
+  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz#dc96c3c469e9bcfc6ad5bdd24c77ec918ea76fe0"
+
+capture-stack-trace@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d"
+
+caseless@~0.12.0:
+  version "0.12.0"
+  resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+
+caw@^1.0.1:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034"
+  dependencies:
+    get-proxy "^1.0.1"
+    is-obj "^1.0.0"
+    object-assign "^3.0.0"
+    tunnel-agent "^0.4.0"
+
+center-align@^0.1.1:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+  dependencies:
+    align-text "^0.1.3"
+    lazy-cache "^1.0.3"
+
+chalk@^0.5.1:
+  version "0.5.1"
+  resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
+  dependencies:
+    ansi-styles "^1.1.0"
+    escape-string-regexp "^1.0.0"
+    has-ansi "^0.1.0"
+    strip-ansi "^0.3.0"
+    supports-color "^0.2.0"
+
+chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+  dependencies:
+    ansi-styles "^2.2.1"
+    escape-string-regexp "^1.0.2"
+    has-ansi "^2.0.0"
+    strip-ansi "^3.0.0"
+    supports-color "^2.0.0"
+
+chalk@^2.1.0:
+  version "2.4.2"
+  resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+  dependencies:
+    ansi-styles "^3.2.1"
+    escape-string-regexp "^1.0.5"
+    supports-color "^5.3.0"
+
+clap@^1.0.9:
+  version "1.2.3"
+  resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51"
+  dependencies:
+    chalk "^1.1.3"
+
+class-utils@^0.3.5:
+  version "0.3.6"
+  resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
+  dependencies:
+    arr-union "^3.1.0"
+    define-property "^0.2.5"
+    isobject "^3.0.0"
+    static-extend "^0.1.1"
+
+cli@~1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14"
+  dependencies:
+    exit "0.1.2"
+    glob "^7.1.1"
+
+cliui@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+  dependencies:
+    center-align "^0.1.1"
+    right-align "^0.1.1"
+    wordwrap "0.0.2"
+
+cliui@^3.2.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
+  dependencies:
+    string-width "^1.0.1"
+    strip-ansi "^3.0.1"
+    wrap-ansi "^2.0.0"
+
+clone-buffer@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
+
+clone-stats@^0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
+
+clone-stats@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
+
+clone@^0.2.0:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
+
+clone@^1.0.0, clone@^1.0.2:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
+
+clone@^2.1.1:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
+
+cloneable-readable@^1.0.0:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec"
+  dependencies:
+    inherits "^2.0.1"
+    process-nextick-args "^2.0.0"
+    readable-stream "^2.3.5"
+
+co@3.1.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78"
+
+coa@~1.0.1:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd"
+  dependencies:
+    q "^1.1.2"
+
+code-point-at@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+
+collection-visit@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
+  dependencies:
+    map-visit "^1.0.0"
+    object-visit "^1.0.0"
+
+color-convert@^1.3.0, color-convert@^1.9.0:
+  version "1.9.3"
+  resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+  dependencies:
+    color-name "1.1.3"
+
+color-name@1.1.3:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+
+color-name@^1.0.0:
+  version "1.1.4"
+  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+
+color-string@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
+  dependencies:
+    color-name "^1.0.0"
+
+color-support@^1.1.3:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
+
+color@^0.11.0:
+  version "0.11.4"
+  resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764"
+  dependencies:
+    clone "^1.0.2"
+    color-convert "^1.3.0"
+    color-string "^0.3.0"
+
+colormin@^1.0.5:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133"
+  dependencies:
+    color "^0.11.0"
+    css-color-names "0.0.4"
+    has "^1.0.1"
+
+colors@~1.1.2:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
+
+combined-stream@^1.0.6, combined-stream@~1.0.6:
+  version "1.0.8"
+  resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+  dependencies:
+    delayed-stream "~1.0.0"
+
+commander@~2.8.1:
+  version "2.8.1"
+  resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
+  dependencies:
+    graceful-readlink ">= 1.0.0"
+
+component-emitter@^1.2.1:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
+
+concat-map@0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+concat-stream@^1.4.6, concat-stream@^1.4.7:
+  version "1.6.2"
+  resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
+  dependencies:
+    buffer-from "^1.0.0"
+    inherits "^2.0.3"
+    readable-stream "^2.2.2"
+    typedarray "^0.0.6"
+
+concat-with-sourcemaps@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e"
+  dependencies:
+    source-map "^0.6.1"
+
+console-browserify@1.1.x:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
+  dependencies:
+    date-now "^0.1.4"
+
+console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
+
+console-stream@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44"
+
+content-type@~1.0.1:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+
+convert-source-map@1.X, convert-source-map@^1.1.1, convert-source-map@^1.5.1:
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
+  dependencies:
+    safe-buffer "~5.1.1"
+
+copy-descriptor@^0.1.0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
+
+core-js@^2.4.0, core-js@^2.5.0:
+  version "2.6.9"
+  resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+
+create-error-class@^3.0.1:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
+  dependencies:
+    capture-stack-trace "^1.0.0"
+
+cross-spawn@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
+  dependencies:
+    lru-cache "^4.0.1"
+    which "^1.2.9"
+
+cross-spawn@^5.0.1:
+  version "5.1.0"
+  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
+  dependencies:
+    lru-cache "^4.0.1"
+    shebang-command "^1.2.0"
+    which "^1.2.9"
+
+css-color-names@0.0.4:
+  version "0.0.4"
+  resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
+
+css@2.X, css@^2.2.1:
+  version "2.2.4"
+  resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
+  dependencies:
+    inherits "^2.0.3"
+    source-map "^0.6.1"
+    source-map-resolve "^0.5.2"
+    urix "^0.1.0"
+
+cssnano@^3.0.0:
+  version "3.10.0"
+  resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38"
+  dependencies:
+    autoprefixer "^6.3.1"
+    decamelize "^1.1.2"
+    defined "^1.0.0"
+    has "^1.0.1"
+    object-assign "^4.0.1"
+    postcss "^5.0.14"
+    postcss-calc "^5.2.0"
+    postcss-colormin "^2.1.8"
+    postcss-convert-values "^2.3.4"
+    postcss-discard-comments "^2.0.4"
+    postcss-discard-duplicates "^2.0.1"
+    postcss-discard-empty "^2.0.1"
+    postcss-discard-overridden "^0.1.1"
+    postcss-discard-unused "^2.2.1"
+    postcss-filter-plugins "^2.0.0"
+    postcss-merge-idents "^2.1.5"
+    postcss-merge-longhand "^2.0.1"
+    postcss-merge-rules "^2.0.3"
+    postcss-minify-font-values "^1.0.2"
+    postcss-minify-gradients "^1.0.1"
+    postcss-minify-params "^1.0.4"
+    postcss-minify-selectors "^2.0.4"
+    postcss-normalize-charset "^1.1.0"
+    postcss-normalize-url "^3.0.7"
+    postcss-ordered-values "^2.1.0"
+    postcss-reduce-idents "^2.2.2"
+    postcss-reduce-initial "^1.0.0"
+    postcss-reduce-transforms "^1.0.3"
+    postcss-svgo "^2.1.1"
+    postcss-unique-selectors "^2.0.2"
+    postcss-value-parser "^3.2.3"
+    postcss-zindex "^2.0.1"
+
+csso@~2.3.1:
+  version "2.3.2"
+  resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85"
+  dependencies:
+    clap "^1.0.9"
+    source-map "^0.5.3"
+
+currently-unhandled@^0.4.1:
+  version "0.4.1"
+  resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+  dependencies:
+    array-find-index "^1.0.1"
+
+d@1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a"
+  dependencies:
+    es5-ext "^0.10.50"
+    type "^1.0.1"
+
+dashdash@^1.12.0:
+  version "1.14.1"
+  resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+  dependencies:
+    assert-plus "^1.0.0"
+
+date-now@^0.1.4:
+  version "0.1.4"
+  resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+
+dateformat@^2.0.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
+
+debug-fabulous@1.X:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e"
+  dependencies:
+    debug "3.X"
+    memoizee "0.4.X"
+    object-assign "4.X"
+
+debug@3.X:
+  version "3.2.6"
+  resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
+  dependencies:
+    ms "^2.1.1"
+
+debug@^2.1.0, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
+  version "2.6.9"
+  resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+  dependencies:
+    ms "2.0.0"
+
+debug@~2.2.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
+  dependencies:
+    ms "0.7.1"
+
+decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+decode-uri-component@^0.2.0:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
+
+decompress-tar@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466"
+  dependencies:
+    is-tar "^1.0.0"
+    object-assign "^2.0.0"
+    strip-dirs "^1.0.0"
+    tar-stream "^1.1.1"
+    through2 "^0.6.1"
+    vinyl "^0.4.3"
+
+decompress-tarbz2@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d"
+  dependencies:
+    is-bzip2 "^1.0.0"
+    object-assign "^2.0.0"
+    seek-bzip "^1.0.3"
+    strip-dirs "^1.0.0"
+    tar-stream "^1.1.1"
+    through2 "^0.6.1"
+    vinyl "^0.4.3"
+
+decompress-targz@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0"
+  dependencies:
+    is-gzip "^1.0.0"
+    object-assign "^2.0.0"
+    strip-dirs "^1.0.0"
+    tar-stream "^1.1.1"
+    through2 "^0.6.1"
+    vinyl "^0.4.3"
+
+decompress-unzip@^3.0.0:
+  version "3.4.0"
+  resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb"
+  dependencies:
+    is-zip "^1.0.0"
+    read-all-stream "^3.0.0"
+    stat-mode "^0.2.0"
+    strip-dirs "^1.0.0"
+    through2 "^2.0.0"
+    vinyl "^1.0.0"
+    yauzl "^2.2.1"
+
+decompress@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed"
+  dependencies:
+    buffer-to-vinyl "^1.0.0"
+    concat-stream "^1.4.6"
+    decompress-tar "^3.0.0"
+    decompress-tarbz2 "^3.0.0"
+    decompress-targz "^3.0.0"
+    decompress-unzip "^3.0.0"
+    stream-combiner2 "^1.1.1"
+    vinyl-assign "^1.0.1"
+    vinyl-fs "^2.2.0"
+
+deep-extend@^0.6.0:
+  version "0.6.0"
+  resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+
+defaults@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
+  dependencies:
+    clone "^1.0.2"
+
+define-property@^0.2.5:
+  version "0.2.5"
+  resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
+  dependencies:
+    is-descriptor "^0.1.0"
+
+define-property@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
+  dependencies:
+    is-descriptor "^1.0.0"
+
+define-property@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
+  dependencies:
+    is-descriptor "^1.0.2"
+    isobject "^3.0.1"
+
+defined@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
+
+del@^2.2.2:
+  version "2.2.2"
+  resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
+  dependencies:
+    globby "^5.0.0"
+    is-path-cwd "^1.0.0"
+    is-path-in-cwd "^1.0.0"
+    object-assign "^4.0.1"
+    pify "^2.0.0"
+    pinkie-promise "^2.0.0"
+    rimraf "^2.2.8"
+
+delayed-stream@~1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+delegates@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+
+depd@~1.1.0:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+
+deprecated@^0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
+
+detect-file@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
+
+detect-indent@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
+  dependencies:
+    repeating "^2.0.0"
+
+detect-newline@2.X:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
+
+dom-serializer@0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0"
+  dependencies:
+    domelementtype "^1.3.0"
+    entities "^1.1.1"
+
+domelementtype@1, domelementtype@^1.3.0:
+  version "1.3.1"
+  resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
+
+domhandler@2.3:
+  version "2.3.0"
+  resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
+  dependencies:
+    domelementtype "1"
+
+domutils@1.5:
+  version "1.5.1"
+  resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
+  dependencies:
+    dom-serializer "0"
+    domelementtype "1"
+
+download@^4.0.0, download@^4.1.2:
+  version "4.4.3"
+  resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac"
+  dependencies:
+    caw "^1.0.1"
+    concat-stream "^1.4.7"
+    each-async "^1.0.0"
+    filenamify "^1.0.1"
+    got "^5.0.0"
+    gulp-decompress "^1.2.0"
+    gulp-rename "^1.2.0"
+    is-url "^1.2.0"
+    object-assign "^4.0.1"
+    read-all-stream "^3.0.0"
+    readable-stream "^2.0.2"
+    stream-combiner2 "^1.1.1"
+    vinyl "^1.0.0"
+    vinyl-fs "^2.2.0"
+    ware "^1.2.0"
+
+duplexer2@0.0.2:
+  version "0.0.2"
+  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
+  dependencies:
+    readable-stream "~1.1.9"
+
+duplexer2@^0.1.4, duplexer2@~0.1.0:
+  version "0.1.4"
+  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+  dependencies:
+    readable-stream "^2.0.2"
+
+duplexer@^0.1.1, duplexer@~0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
+
+duplexify@^3.2.0:
+  version "3.7.1"
+  resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309"
+  dependencies:
+    end-of-stream "^1.0.0"
+    inherits "^2.0.1"
+    readable-stream "^2.0.0"
+    stream-shift "^1.0.0"
+
+each-async@^1.0.0, each-async@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473"
+  dependencies:
+    onetime "^1.0.0"
+    set-immediate-shim "^1.0.0"
+
+ecc-jsbn@~0.1.1:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+  dependencies:
+    jsbn "~0.1.0"
+    safer-buffer "^2.1.0"
+
+ee-first@1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+
+electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47:
+  version "1.3.196"
+  resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.196.tgz#1a7885855880fa3ae7a8908c442757e561eec82b"
+
+end-of-stream@^1.0.0:
+  version "1.4.1"
+  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
+  dependencies:
+    once "^1.4.0"
+
+end-of-stream@~0.1.5:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
+  dependencies:
+    once "~1.3.0"
+
+entities@1.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
+
+entities@^1.1.1:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
+
+error-ex@^1.2.0:
+  version "1.3.2"
+  resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
+  dependencies:
+    is-arrayish "^0.2.1"
+
+es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
+  version "0.10.50"
+  resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778"
+  dependencies:
+    es6-iterator "~2.0.3"
+    es6-symbol "~3.1.1"
+    next-tick "^1.0.0"
+
+es6-iterator@^2.0.3, es6-iterator@~2.0.3:
+  version "2.0.3"
+  resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
+  dependencies:
+    d "1"
+    es5-ext "^0.10.35"
+    es6-symbol "^3.1.1"
+
+es6-symbol@^3.1.1, es6-symbol@~3.1.1:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
+  dependencies:
+    d "1"
+    es5-ext "~0.10.14"
+
+es6-weak-map@^2.0.2:
+  version "2.0.3"
+  resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53"
+  dependencies:
+    d "1"
+    es5-ext "^0.10.46"
+    es6-iterator "^2.0.3"
+    es6-symbol "^3.1.1"
+
+escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
+  version "1.0.5"
+  resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+esprima@^2.6.0:
+  version "2.7.3"
+  resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+
+esutils@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+event-emitter@^0.3.5:
+  version "0.3.5"
+  resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
+  dependencies:
+    d "1"
+    es5-ext "~0.10.14"
+
+event-stream@^3.1.7:
+  version "3.3.5"
+  resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.5.tgz#e5dd8989543630d94c6cf4d657120341fa31636b"
+  dependencies:
+    duplexer "^0.1.1"
+    from "^0.1.7"
+    map-stream "0.0.7"
+    pause-stream "^0.0.11"
+    split "^1.0.1"
+    stream-combiner "^0.2.2"
+    through "^2.3.8"
+
+event-stream@^4.0.1:
+  version "4.0.1"
+  resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-4.0.1.tgz#4092808ec995d0dd75ea4580c1df6a74db2cde65"
+  dependencies:
+    duplexer "^0.1.1"
+    from "^0.1.7"
+    map-stream "0.0.7"
+    pause-stream "^0.0.11"
+    split "^1.0.1"
+    stream-combiner "^0.2.2"
+    through "^2.3.8"
+
+exec-buffer@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b"
+  dependencies:
+    execa "^0.7.0"
+    p-finally "^1.0.0"
+    pify "^3.0.0"
+    rimraf "^2.5.4"
+    tempfile "^2.0.0"
+
+exec-series@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a"
+  dependencies:
+    async-each-series "^1.1.0"
+    object-assign "^4.1.0"
+
+execa@^0.7.0:
+  version "0.7.0"
+  resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
+  dependencies:
+    cross-spawn "^5.0.1"
+    get-stream "^3.0.0"
+    is-stream "^1.1.0"
+    npm-run-path "^2.0.0"
+    p-finally "^1.0.0"
+    signal-exit "^3.0.0"
+    strip-eof "^1.0.0"
+
+executable@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9"
+  dependencies:
+    meow "^3.1.0"
+
+exit@0.1.2, exit@0.1.x:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
+
+expand-brackets@^0.1.4:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+  dependencies:
+    is-posix-bracket "^0.1.0"
+
+expand-brackets@^2.1.4:
+  version "2.1.4"
+  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
+  dependencies:
+    debug "^2.3.3"
+    define-property "^0.2.5"
+    extend-shallow "^2.0.1"
+    posix-character-classes "^0.1.0"
+    regex-not "^1.0.0"
+    snapdragon "^0.8.1"
+    to-regex "^3.0.1"
+
+expand-range@^1.8.1:
+  version "1.8.2"
+  resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+  dependencies:
+    fill-range "^2.1.0"
+
+expand-tilde@^2.0.0, expand-tilde@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
+  dependencies:
+    homedir-polyfill "^1.0.1"
+
+extend-shallow@^1.1.2:
+  version "1.1.4"
+  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071"
+  dependencies:
+    kind-of "^1.1.0"
+
+extend-shallow@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+  dependencies:
+    is-extendable "^0.1.0"
+
+extend-shallow@^3.0.0, extend-shallow@^3.0.2:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
+  dependencies:
+    assign-symbols "^1.0.0"
+    is-extendable "^1.0.1"
+
+extend@^3.0.0, extend@~3.0.2:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+
+extglob@^0.3.1:
+  version "0.3.2"
+  resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+  dependencies:
+    is-extglob "^1.0.0"
+
+extglob@^2.0.4:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
+  dependencies:
+    array-unique "^0.3.2"
+    define-property "^1.0.0"
+    expand-brackets "^2.1.4"
+    extend-shallow "^2.0.1"
+    fragment-cache "^0.2.1"
+    regex-not "^1.0.0"
+    snapdragon "^0.8.1"
+    to-regex "^3.0.1"
+
+extsprintf@1.3.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+
+extsprintf@^1.2.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+
+fancy-log@^1.1.0, fancy-log@^1.3.2:
+  version "1.3.3"
+  resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7"
+  dependencies:
+    ansi-gray "^0.1.1"
+    color-support "^1.1.3"
+    parse-node-version "^1.0.0"
+    time-stamp "^1.0.0"
+
+fast-deep-equal@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
+
+fast-json-stable-stringify@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
+
+faye-websocket@~0.7.2:
+  version "0.7.3"
+  resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.7.3.tgz#cc4074c7f4a4dfd03af54dd65c354b135132ce11"
+  dependencies:
+    websocket-driver ">=0.3.6"
+
+fd-slicer@~1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
+  dependencies:
+    pend "~1.2.0"
+
+figures@^1.3.5:
+  version "1.7.0"
+  resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
+  dependencies:
+    escape-string-regexp "^1.0.5"
+    object-assign "^4.1.0"
+
+file-type@^3.1.0:
+  version "3.9.0"
+  resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
+
+file-type@^4.1.0:
+  version "4.4.0"
+  resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5"
+
+filename-regex@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+
+filename-reserved-regex@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
+
+filenamify@^1.0.1:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
+  dependencies:
+    filename-reserved-regex "^1.0.0"
+    strip-outer "^1.0.0"
+    trim-repeated "^1.0.0"
+
+fill-range@^2.1.0:
+  version "2.2.4"
+  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
+  dependencies:
+    is-number "^2.1.0"
+    isobject "^2.0.0"
+    randomatic "^3.0.0"
+    repeat-element "^1.1.2"
+    repeat-string "^1.5.2"
+
+fill-range@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
+  dependencies:
+    extend-shallow "^2.0.1"
+    is-number "^3.0.0"
+    repeat-string "^1.6.1"
+    to-regex-range "^2.1.0"
+
+find-index@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
+
+find-up@^1.0.0:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+  dependencies:
+    path-exists "^2.0.0"
+    pinkie-promise "^2.0.0"
+
+find-versions@^1.0.0:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62"
+  dependencies:
+    array-uniq "^1.0.0"
+    get-stdin "^4.0.1"
+    meow "^3.5.0"
+    semver-regex "^1.0.0"
+
+findup-sync@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
+  dependencies:
+    detect-file "^1.0.0"
+    is-glob "^3.1.0"
+    micromatch "^3.0.4"
+    resolve-dir "^1.0.1"
+
+fined@^1.0.1:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b"
+  dependencies:
+    expand-tilde "^2.0.2"
+    is-plain-object "^2.0.3"
+    object.defaults "^1.1.0"
+    object.pick "^1.2.0"
+    parse-filepath "^1.0.1"
+
+first-chunk-stream@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
+
+flagged-respawn@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41"
+
+flatten@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
+
+for-in@^1.0.1, for-in@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+
+for-own@^0.1.4:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+  dependencies:
+    for-in "^1.0.1"
+
+for-own@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
+  dependencies:
+    for-in "^1.0.1"
+
+forever-agent@~0.6.1:
+  version "0.6.1"
+  resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+
+form-data@~2.3.2:
+  version "2.3.3"
+  resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+  dependencies:
+    asynckit "^0.4.0"
+    combined-stream "^1.0.6"
+    mime-types "^2.1.12"
+
+fragment-cache@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
+  dependencies:
+    map-cache "^0.2.2"
+
+from@^0.1.7:
+  version "0.1.7"
+  resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
+
+fs-constants@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
+
+fs.realpath@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+fstream@^1.0.0, fstream@^1.0.12:
+  version "1.0.12"
+  resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045"
+  dependencies:
+    graceful-fs "^4.1.2"
+    inherits "~2.0.0"
+    mkdirp ">=0.5 0"
+    rimraf "2"
+
+function-bind@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+
+gauge@~2.7.3:
+  version "2.7.4"
+  resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
+  dependencies:
+    aproba "^1.0.3"
+    console-control-strings "^1.0.0"
+    has-unicode "^2.0.0"
+    object-assign "^4.1.0"
+    signal-exit "^3.0.0"
+    string-width "^1.0.1"
+    strip-ansi "^3.0.1"
+    wide-align "^1.1.0"
+
+gaze@^0.5.1:
+  version "0.5.2"
+  resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
+  dependencies:
+    globule "~0.1.0"
+
+gaze@^1.0.0:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a"
+  dependencies:
+    globule "^1.0.0"
+
+get-caller-file@^1.0.1:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
+
+get-proxy@^1.0.1:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb"
+  dependencies:
+    rc "^1.1.2"
+
+get-stdin@^4.0.1:
+  version "4.0.1"
+  resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
+
+get-stream@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+
+get-value@^2.0.3, get-value@^2.0.6:
+  version "2.0.6"
+  resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
+
+getpass@^0.1.1:
+  version "0.1.7"
+  resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+  dependencies:
+    assert-plus "^1.0.0"
+
+gifsicle@^3.0.0:
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-3.0.4.tgz#f45cb5ed10165b665dc929e0e9328b6c821dfa3b"
+  dependencies:
+    bin-build "^2.0.0"
+    bin-wrapper "^3.0.0"
+    logalot "^2.0.0"
+
+glob-base@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+  dependencies:
+    glob-parent "^2.0.0"
+    is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+  dependencies:
+    is-glob "^2.0.0"
+
+glob-parent@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+  dependencies:
+    is-glob "^3.1.0"
+    path-dirname "^1.0.0"
+
+glob-stream@^3.1.5:
+  version "3.1.18"
+  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
+  dependencies:
+    glob "^4.3.1"
+    glob2base "^0.0.12"
+    minimatch "^2.0.1"
+    ordered-read-streams "^0.1.0"
+    through2 "^0.6.1"
+    unique-stream "^1.0.0"
+
+glob-stream@^5.3.2:
+  version "5.3.5"
+  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22"
+  dependencies:
+    extend "^3.0.0"
+    glob "^5.0.3"
+    glob-parent "^3.0.0"
+    micromatch "^2.3.7"
+    ordered-read-streams "^0.3.0"
+    through2 "^0.6.0"
+    to-absolute-glob "^0.1.1"
+    unique-stream "^2.0.2"
+
+glob-watcher@^0.0.6:
+  version "0.0.6"
+  resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
+  dependencies:
+    gaze "^0.5.1"
+
+glob2base@^0.0.12:
+  version "0.0.12"
+  resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
+  dependencies:
+    find-index "^0.1.1"
+
+glob@^4.3.1:
+  version "4.5.3"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
+  dependencies:
+    inflight "^1.0.4"
+    inherits "2"
+    minimatch "^2.0.1"
+    once "^1.3.0"
+
+glob@^5.0.3:
+  version "5.0.15"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
+  dependencies:
+    inflight "^1.0.4"
+    inherits "2"
+    minimatch "2 || 3"
+    once "^1.3.0"
+    path-is-absolute "^1.0.0"
+
+glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1:
+  version "7.1.4"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+  dependencies:
+    fs.realpath "^1.0.0"
+    inflight "^1.0.4"
+    inherits "2"
+    minimatch "^3.0.4"
+    once "^1.3.0"
+    path-is-absolute "^1.0.0"
+
+glob@~3.1.21:
+  version "3.1.21"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
+  dependencies:
+    graceful-fs "~1.2.0"
+    inherits "1"
+    minimatch "~0.2.11"
+
+global-modules@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
+  dependencies:
+    global-prefix "^1.0.1"
+    is-windows "^1.0.1"
+    resolve-dir "^1.0.0"
+
+global-prefix@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
+  dependencies:
+    expand-tilde "^2.0.2"
+    homedir-polyfill "^1.0.1"
+    ini "^1.3.4"
+    is-windows "^1.0.1"
+    which "^1.2.14"
+
+globals@^9.18.0:
+  version "9.18.0"
+  resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+
+globby@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
+  dependencies:
+    array-union "^1.0.1"
+    arrify "^1.0.0"
+    glob "^7.0.3"
+    object-assign "^4.0.1"
+    pify "^2.0.0"
+    pinkie-promise "^2.0.0"
+
+globby@^6.1.0:
+  version "6.1.0"
+  resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
+  dependencies:
+    array-union "^1.0.1"
+    glob "^7.0.3"
+    object-assign "^4.0.1"
+    pify "^2.0.0"
+    pinkie-promise "^2.0.0"
+
+globule@^1.0.0:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
+  dependencies:
+    glob "~7.1.1"
+    lodash "~4.17.10"
+    minimatch "~3.0.2"
+
+globule@~0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
+  dependencies:
+    glob "~3.1.21"
+    lodash "~1.0.1"
+    minimatch "~0.2.11"
+
+glogg@^1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f"
+  dependencies:
+    sparkles "^1.0.0"
+
+got@^5.0.0:
+  version "5.7.1"
+  resolved "https://registry.yarnpkg.com/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35"
+  dependencies:
+    create-error-class "^3.0.1"
+    duplexer2 "^0.1.4"
+    is-redirect "^1.0.0"
+    is-retry-allowed "^1.0.0"
+    is-stream "^1.0.0"
+    lowercase-keys "^1.0.0"
+    node-status-codes "^1.0.0"
+    object-assign "^4.0.1"
+    parse-json "^2.1.0"
+    pinkie-promise "^2.0.0"
+    read-all-stream "^3.0.0"
+    readable-stream "^2.0.5"
+    timed-out "^3.0.0"
+    unzip-response "^1.0.2"
+    url-parse-lax "^1.0.0"
+
+graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2:
+  version "4.2.0"
+  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
+
+graceful-fs@^3.0.0:
+  version "3.0.11"
+  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
+  dependencies:
+    natives "^1.1.0"
+
+graceful-fs@~1.2.0:
+  version "1.2.3"
+  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
+
+"graceful-readlink@>= 1.0.0":
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+
+growly@^1.3.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
+
+gulp-autoprefixer@^3.1.1:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz#75230051cd0d171343d783b7e9b5d1120eeef9b0"
+  dependencies:
+    autoprefixer "^6.0.0"
+    gulp-util "^3.0.0"
+    postcss "^5.0.4"
+    through2 "^2.0.0"
+    vinyl-sourcemaps-apply "^0.2.0"
+
+gulp-babel@^6.1.2:
+  version "6.1.3"
+  resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.3.tgz#5aad8acb0db6b7f2f0be19eeee9528f2064df631"
+  dependencies:
+    babel-core "^6.23.1"
+    object-assign "^4.0.1"
+    plugin-error "^1.0.1"
+    replace-ext "0.0.1"
+    through2 "^2.0.0"
+    vinyl-sourcemaps-apply "^0.2.0"
+
+gulp-cache@^0.4.6:
+  version "0.4.6"
+  resolved "https://registry.yarnpkg.com/gulp-cache/-/gulp-cache-0.4.6.tgz#2d03b52db4f6a553ae1d5bef01e483e907e9f796"
+  dependencies:
+    bluebird "^3.0.5"
+    cache-swap "^0.3.0"
+    gulp-util "^3.0.7"
+    object-assign "^4.0.1"
+    object.omit "^2.0.0"
+    object.pick "^1.1.1"
+    readable-stream "^2.0.4"
+    try-json-parse "^0.1.1"
+    vinyl "^1.1.0"
+
+gulp-concat@^2.6.1:
+  version "2.6.1"
+  resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353"
+  dependencies:
+    concat-with-sourcemaps "^1.0.0"
+    through2 "^2.0.0"
+    vinyl "^2.0.0"
+
+gulp-cssnano@^2.1.2:
+  version "2.1.3"
+  resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz#02007e2817af09b3688482b430ad7db807aebf72"
+  dependencies:
+    buffer-from "^1.0.0"
+    cssnano "^3.0.0"
+    object-assign "^4.0.1"
+    plugin-error "^1.0.1"
+    vinyl-sourcemaps-apply "^0.2.1"
+
+gulp-decompress@^1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7"
+  dependencies:
+    archive-type "^3.0.0"
+    decompress "^3.0.0"
+    gulp-util "^3.0.1"
+    readable-stream "^2.0.2"
+
+gulp-imagemin@^3.2.0:
+  version "3.4.0"
+  resolved "https://registry.yarnpkg.com/gulp-imagemin/-/gulp-imagemin-3.4.0.tgz#23a8d4c5133f50a2a708aca87ca4b2d6eb7c4403"
+  dependencies:
+    chalk "^2.1.0"
+    gulp-util "^3.0.8"
+    imagemin "^5.3.1"
+    plur "^2.1.2"
+    pretty-bytes "^4.0.2"
+    through2-concurrent "^1.1.1"
+  optionalDependencies:
+    imagemin-gifsicle "^5.2.0"
+    imagemin-jpegtran "^5.0.2"
+    imagemin-optipng "^5.2.1"
+    imagemin-svgo "^5.2.2"
+
+gulp-include@^2.3.1:
+  version "2.4.1"
+  resolved "https://registry.yarnpkg.com/gulp-include/-/gulp-include-2.4.1.tgz#fb96bc0d2303e72d8f862ed7dd6c00b536ae9926"
+  dependencies:
+    ansi-colors "^3.2.4"
+    event-stream "^4.0.1"
+    glob "^7.1.3"
+    plugin-error "^1.0.1"
+    source-map "^0.7.3"
+    strip-bom "^2.0.0"
+    vinyl "^2.2.0"
+    vinyl-sourcemaps-apply "^0.2.1"
+
+gulp-insert@^0.5.0:
+  version "0.5.0"
+  resolved "https://registry.yarnpkg.com/gulp-insert/-/gulp-insert-0.5.0.tgz#32313f13e4a23cf5acca5ce5f0c080923c778602"
+  dependencies:
+    readable-stream "^1.0.26-4"
+    streamqueue "0.0.6"
+
+gulp-jshint@^2.0.4:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/gulp-jshint/-/gulp-jshint-2.1.0.tgz#bfaf927f78eee263c5bbac5f63e314d44a7bd41e"
+  dependencies:
+    lodash "^4.12.0"
+    minimatch "^3.0.3"
+    plugin-error "^0.1.2"
+    rcloader "^0.2.2"
+    through2 "^2.0.0"
+
+gulp-livereload@^3.8.1:
+  version "3.8.1"
+  resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-3.8.1.tgz#00f744b2d749d3e9e3746589c8a44acac779b50f"
+  dependencies:
+    chalk "^0.5.1"
+    debug "^2.1.0"
+    event-stream "^3.1.7"
+    gulp-util "^3.0.2"
+    lodash.assign "^3.0.0"
+    mini-lr "^0.1.8"
+
+gulp-notify@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/gulp-notify/-/gulp-notify-3.2.0.tgz#2ae8225009df881eef59be5dd5a2f1337387764e"
+  dependencies:
+    ansi-colors "^1.0.1"
+    fancy-log "^1.3.2"
+    lodash.template "^4.4.0"
+    node-notifier "^5.2.1"
+    node.extend "^2.0.0"
+    plugin-error "^0.1.2"
+    through2 "^2.0.3"
+
+gulp-plumber@^1.1.0:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.2.1.tgz#d38700755a300b9d372318e4ffb5ff7ced0b2c84"
+  dependencies:
+    chalk "^1.1.3"
+    fancy-log "^1.3.2"
+    plugin-error "^0.1.2"
+    through2 "^2.0.3"
+
+gulp-rename@^1.2.0, gulp-rename@^1.2.2:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
+
+gulp-sass@^3.1.0:
+  version "3.2.1"
+  resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.2.1.tgz#2e3688a96fd8be1c0c01340750c191b2e79fab94"
+  dependencies:
+    gulp-util "^3.0"
+    lodash.clonedeep "^4.3.2"
+    node-sass "^4.8.3"
+    through2 "^2.0.0"
+    vinyl-sourcemaps-apply "^0.2.0"
+
+gulp-sourcemaps@1.6.0:
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c"
+  dependencies:
+    convert-source-map "^1.1.1"
+    graceful-fs "^4.1.2"
+    strip-bom "^2.0.0"
+    through2 "^2.0.0"
+    vinyl "^1.0.0"
+
+gulp-sourcemaps@^2.6.0:
+  version "2.6.5"
+  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz#a3f002d87346d2c0f3aec36af7eb873f23de8ae6"
+  dependencies:
+    "@gulp-sourcemaps/identity-map" "1.X"
+    "@gulp-sourcemaps/map-sources" "1.X"
+    acorn "5.X"
+    convert-source-map "1.X"
+    css "2.X"
+    debug-fabulous "1.X"
+    detect-newline "2.X"
+    graceful-fs "4.X"
+    source-map "~0.6.0"
+    strip-bom-string "1.X"
+    through2 "2.X"
+
+gulp-uglify@^2.1.2:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541"
+  dependencies:
+    gulplog "^1.0.0"
+    has-gulplog "^0.1.0"
+    lodash "^4.13.1"
+    make-error-cause "^1.1.1"
+    through2 "^2.0.0"
+    uglify-js "~2.8.10"
+    uglify-save-license "^0.4.1"
+    vinyl-sourcemaps-apply "^0.2.0"
+
+gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.2, gulp-util@^3.0.7, gulp-util@^3.0.8:
+  version "3.0.8"
+  resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
+  dependencies:
+    array-differ "^1.0.0"
+    array-uniq "^1.0.2"
+    beeper "^1.0.0"
+    chalk "^1.0.0"
+    dateformat "^2.0.0"
+    fancy-log "^1.1.0"
+    gulplog "^1.0.0"
+    has-gulplog "^0.1.0"
+    lodash._reescape "^3.0.0"
+    lodash._reevaluate "^3.0.0"
+    lodash._reinterpolate "^3.0.0"
+    lodash.template "^3.0.0"
+    minimist "^1.1.0"
+    multipipe "^0.1.2"
+    object-assign "^3.0.0"
+    replace-ext "0.0.1"
+    through2 "^2.0.0"
+    vinyl "^0.5.0"
+
+gulp@^3.9.1:
+  version "3.9.1"
+  resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
+  dependencies:
+    archy "^1.0.0"
+    chalk "^1.0.0"
+    deprecated "^0.0.1"
+    gulp-util "^3.0.0"
+    interpret "^1.0.0"
+    liftoff "^2.1.0"
+    minimist "^1.1.0"
+    orchestrator "^0.3.0"
+    pretty-hrtime "^1.0.0"
+    semver "^4.1.0"
+    tildify "^1.0.0"
+    v8flags "^2.0.2"
+    vinyl-fs "^0.3.0"
+
+gulplog@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
+  dependencies:
+    glogg "^1.0.0"
+
+har-schema@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+
+har-validator@~5.1.0:
+  version "5.1.3"
+  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+  dependencies:
+    ajv "^6.5.5"
+    har-schema "^2.0.0"
+
+has-ansi@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e"
+  dependencies:
+    ansi-regex "^0.2.0"
+
+has-ansi@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+  dependencies:
+    ansi-regex "^2.0.0"
+
+has-flag@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-flag@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+
+has-gulplog@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
+  dependencies:
+    sparkles "^1.0.0"
+
+has-unicode@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
+
+has-value@^0.3.1:
+  version "0.3.1"
+  resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
+  dependencies:
+    get-value "^2.0.3"
+    has-values "^0.1.4"
+    isobject "^2.0.0"
+
+has-value@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
+  dependencies:
+    get-value "^2.0.6"
+    has-values "^1.0.0"
+    isobject "^3.0.0"
+
+has-values@^0.1.4:
+  version "0.1.4"
+  resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
+
+has-values@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
+  dependencies:
+    is-number "^3.0.0"
+    kind-of "^4.0.0"
+
+has@^1.0.1, has@^1.0.3:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+  dependencies:
+    function-bind "^1.1.1"
+
+home-or-tmp@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
+  dependencies:
+    os-homedir "^1.0.0"
+    os-tmpdir "^1.0.1"
+
+homedir-polyfill@^1.0.1:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8"
+  dependencies:
+    parse-passwd "^1.0.0"
+
+hosted-git-info@^2.1.4:
+  version "2.7.1"
+  resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
+
+html-comment-regex@^1.1.0:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7"
+
+htmlparser2@3.8.x:
+  version "3.8.3"
+  resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
+  dependencies:
+    domelementtype "1"
+    domhandler "2.3"
+    domutils "1.5"
+    entities "1.0"
+    readable-stream "1.1"
+
+http-errors@~1.3.1:
+  version "1.3.1"
+  resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942"
+  dependencies:
+    inherits "~2.0.1"
+    statuses "1"
+
+"http-parser-js@>=0.4.0 <0.4.11":
+  version "0.4.10"
+  resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4"
+
+http-signature@~1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+  dependencies:
+    assert-plus "^1.0.0"
+    jsprim "^1.2.2"
+    sshpk "^1.7.0"
+
+iconv-lite@0.4.13:
+  version "0.4.13"
+  resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
+
+imagemin-gifsicle@^5.2.0:
+  version "5.2.0"
+  resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-5.2.0.tgz#3781524c457612ef04916af34241a2b42bfcb40a"
+  dependencies:
+    exec-buffer "^3.0.0"
+    gifsicle "^3.0.0"
+    is-gif "^1.0.0"
+
+imagemin-jpegtran@^5.0.2:
+  version "5.0.2"
+  resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-5.0.2.tgz#e6882263b8f7916fddb800640cf75d2e970d2ad6"
+  dependencies:
+    exec-buffer "^3.0.0"
+    is-jpg "^1.0.0"
+    jpegtran-bin "^3.0.0"
+
+imagemin-optipng@^5.2.1:
+  version "5.2.1"
+  resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-5.2.1.tgz#d22da412c09f5ff00a4339960b98a88b1dbe8695"
+  dependencies:
+    exec-buffer "^3.0.0"
+    is-png "^1.0.0"
+    optipng-bin "^3.0.0"
+
+imagemin-svgo@^5.2.2:
+  version "5.2.4"
+  resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-5.2.4.tgz#6cd5d342cae4bcd8b483594e5315695df02b9e9b"
+  dependencies:
+    is-svg "^2.0.0"
+    svgo "^0.7.0"
+
+imagemin@^5.3.1:
+  version "5.3.1"
+  resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-5.3.1.tgz#f19c2eee1e71ba6c6558c515f9fc96680189a6d4"
+  dependencies:
+    file-type "^4.1.0"
+    globby "^6.1.0"
+    make-dir "^1.0.0"
+    p-pipe "^1.1.0"
+    pify "^2.3.0"
+    replace-ext "^1.0.0"
+
+in-publish@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
+
+indent-string@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
+  dependencies:
+    repeating "^2.0.0"
+
+indexes-of@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
+
+inflight@^1.0.4:
+  version "1.0.6"
+  resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+  dependencies:
+    once "^1.3.0"
+    wrappy "1"
+
+inherits@1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
+
+inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+
+ini@^1.3.4, ini@~1.3.0:
+  version "1.3.5"
+  resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+
+interpret@^1.0.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
+
+invariant@^2.2.2:
+  version "2.2.4"
+  resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+  dependencies:
+    loose-envify "^1.0.0"
+
+invert-kv@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
+ip-regex@^1.0.1:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd"
+
+irregular-plurals@^1.0.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766"
+
+is-absolute-url@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
+
+is-absolute@^0.1.5:
+  version "0.1.7"
+  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f"
+  dependencies:
+    is-relative "^0.1.0"
+
+is-absolute@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576"
+  dependencies:
+    is-relative "^1.0.0"
+    is-windows "^1.0.1"
+
+is-accessor-descriptor@^0.1.6:
+  version "0.1.6"
+  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
+  dependencies:
+    kind-of "^3.0.2"
+
+is-accessor-descriptor@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
+  dependencies:
+    kind-of "^6.0.0"
+
+is-arrayish@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
+is-buffer@^1.1.5:
+  version "1.1.6"
+  resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+
+is-bzip2@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc"
+
+is-data-descriptor@^0.1.4:
+  version "0.1.4"
+  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
+  dependencies:
+    kind-of "^3.0.2"
+
+is-data-descriptor@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
+  dependencies:
+    kind-of "^6.0.0"
+
+is-descriptor@^0.1.0:
+  version "0.1.6"
+  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
+  dependencies:
+    is-accessor-descriptor "^0.1.6"
+    is-data-descriptor "^0.1.4"
+    kind-of "^5.0.0"
+
+is-descriptor@^1.0.0, is-descriptor@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
+  dependencies:
+    is-accessor-descriptor "^1.0.0"
+    is-data-descriptor "^1.0.0"
+    kind-of "^6.0.2"
+
+is-dotfile@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+
+is-equal-shallow@^0.1.3:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+  dependencies:
+    is-primitive "^2.0.0"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+
+is-extendable@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
+  dependencies:
+    is-plain-object "^2.0.4"
+
+is-extglob@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+
+is-extglob@^2.1.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+
+is-finite@^1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+  dependencies:
+    number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+  dependencies:
+    number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+
+is-gif@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e"
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+  dependencies:
+    is-extglob "^1.0.0"
+
+is-glob@^3.1.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+  dependencies:
+    is-extglob "^2.1.0"
+
+is-gzip@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83"
+
+is-jpg@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-1.0.1.tgz#296d57fdd99ce010434a7283e346ab9a1035e975"
+
+is-natural-number@^2.0.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7"
+
+is-number@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+  dependencies:
+    kind-of "^3.0.2"
+
+is-number@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+  dependencies:
+    kind-of "^3.0.2"
+
+is-number@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
+
+is-obj@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
+
+is-path-cwd@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
+
+is-path-in-cwd@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
+  dependencies:
+    is-path-inside "^1.0.0"
+
+is-path-inside@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
+  dependencies:
+    path-is-inside "^1.0.1"
+
+is-plain-obj@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
+
+is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+  dependencies:
+    isobject "^3.0.1"
+
+is-png@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce"
+
+is-posix-bracket@^0.1.0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+
+is-primitive@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+
+is-promise@^2.1:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+
+is-redirect@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
+
+is-relative@^0.1.0:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82"
+
+is-relative@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
+  dependencies:
+    is-unc-path "^1.0.0"
+
+is-retry-allowed@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
+
+is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+
+is-svg@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
+  dependencies:
+    html-comment-regex "^1.1.0"
+
+is-tar@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d"
+
+is-typedarray@~1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+
+is-unc-path@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d"
+  dependencies:
+    unc-path-regex "^0.1.2"
+
+is-url@^1.2.0:
+  version "1.2.4"
+  resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
+
+is-utf8@^0.2.0:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+is-valid-glob@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe"
+
+is-windows@^1.0.1, is-windows@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
+
+is-wsl@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
+
+is-zip@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325"
+
+is@^3.2.1:
+  version "3.3.0"
+  resolved "https://registry.yarnpkg.com/is/-/is-3.3.0.tgz#61cff6dd3c4193db94a3d62582072b44e5645d79"
+
+isarray@0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+isarray@1.0.0, isarray@~1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isexe@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+
+isobject@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+  dependencies:
+    isarray "1.0.0"
+
+isobject@^3.0.0, isobject@^3.0.1:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+
+isstream@~0.1.2:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+
+jpegtran-bin@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz#f60ecf4ae999c0bdad2e9fbcdf2b6f0981e7a29b"
+  dependencies:
+    bin-build "^2.0.0"
+    bin-wrapper "^3.0.0"
+    logalot "^2.0.0"
+
+js-base64@^2.1.8, js-base64@^2.1.9:
+  version "2.5.1"
+  resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
+
+"js-tokens@^3.0.0 || ^4.0.0":
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+
+js-tokens@^3.0.2:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+
+js-yaml@~3.7.0:
+  version "3.7.0"
+  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
+  dependencies:
+    argparse "^1.0.7"
+    esprima "^2.6.0"
+
+jsbn@~0.1.0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+
+jsesc@^1.3.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
+
+jsesc@~0.5.0:
+  version "0.5.0"
+  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+
+jshint@^2.9.4:
+  version "2.10.2"
+  resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.10.2.tgz#ed6626c4f8223c98e94aaea62767435427a49a3d"
+  dependencies:
+    cli "~1.0.0"
+    console-browserify "1.1.x"
+    exit "0.1.x"
+    htmlparser2 "3.8.x"
+    lodash "~4.17.11"
+    minimatch "~3.0.2"
+    shelljs "0.3.x"
+    strip-json-comments "1.0.x"
+
+json-schema-traverse@^0.4.1:
+  version "0.4.1"
+  resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+
+json-schema@0.2.3:
+  version "0.2.3"
+  resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+
+json-stable-stringify-without-jsonify@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
+
+json-stringify-safe@~5.0.1:
+  version "5.0.1"
+  resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+
+json5@^0.5.1:
+  version "0.5.1"
+  resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
+
+jsprim@^1.2.2:
+  version "1.4.1"
+  resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+  dependencies:
+    assert-plus "1.0.0"
+    extsprintf "1.3.0"
+    json-schema "0.2.3"
+    verror "1.10.0"
+
+kind-of@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44"
+
+kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
+  version "3.2.2"
+  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+  dependencies:
+    is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+  dependencies:
+    is-buffer "^1.1.5"
+
+kind-of@^5.0.0:
+  version "5.1.0"
+  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
+
+kind-of@^6.0.0, kind-of@^6.0.2:
+  version "6.0.2"
+  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+
+lazy-cache@^1.0.3:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lazy-req@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac"
+
+lazystream@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
+  dependencies:
+    readable-stream "^2.0.5"
+
+lcid@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+  dependencies:
+    invert-kv "^1.0.0"
+
+liftoff@^2.1.0:
+  version "2.5.0"
+  resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec"
+  dependencies:
+    extend "^3.0.0"
+    findup-sync "^2.0.0"
+    fined "^1.0.1"
+    flagged-respawn "^1.0.0"
+    is-plain-object "^2.0.4"
+    object.map "^1.0.0"
+    rechoir "^0.6.2"
+    resolve "^1.1.7"
+
+livereload-js@^2.2.0:
+  version "2.4.0"
+  resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c"
+
+load-json-file@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+  dependencies:
+    graceful-fs "^4.1.2"
+    parse-json "^2.2.0"
+    pify "^2.0.0"
+    pinkie-promise "^2.0.0"
+    strip-bom "^2.0.0"
+
+lodash._baseassign@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
+  dependencies:
+    lodash._basecopy "^3.0.0"
+    lodash.keys "^3.0.0"
+
+lodash._basecopy@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
+
+lodash._basetostring@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
+
+lodash._basevalues@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
+
+lodash._bindcallback@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
+
+lodash._createassigner@^3.0.0:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
+  dependencies:
+    lodash._bindcallback "^3.0.0"
+    lodash._isiterateecall "^3.0.0"
+    lodash.restparam "^3.0.0"
+
+lodash._getnative@^3.0.0:
+  version "3.9.1"
+  resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
+
+lodash._isiterateecall@^3.0.0:
+  version "3.0.9"
+  resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
+
+lodash._reescape@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
+
+lodash._reevaluate@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
+
+lodash._reinterpolate@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
+
+lodash._root@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
+
+lodash.assign@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
+  dependencies:
+    lodash._baseassign "^3.0.0"
+    lodash._createassigner "^3.0.0"
+    lodash.keys "^3.0.0"
+
+lodash.assign@^4.2.0:
+  version "4.2.0"
+  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
+
+lodash.clonedeep@^4.3.2:
+  version "4.5.0"
+  resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
+
+lodash.escape@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
+  dependencies:
+    lodash._root "^3.0.0"
+
+lodash.isarguments@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
+
+lodash.isarray@^3.0.0:
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+
+lodash.isequal@^4.0.0:
+  version "4.5.0"
+  resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
+
+lodash.isobject@^3.0.2:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
+
+lodash.keys@^3.0.0:
+  version "3.1.2"
+  resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
+  dependencies:
+    lodash._getnative "^3.0.0"
+    lodash.isarguments "^3.0.0"
+    lodash.isarray "^3.0.0"
+
+lodash.memoize@^4.1.2:
+  version "4.1.2"
+  resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
+
+lodash.merge@^4.6.0:
+  version "4.6.2"
+  resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+
+lodash.restparam@^3.0.0:
+  version "3.6.1"
+  resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
+
+lodash.template@^3.0.0:
+  version "3.6.2"
+  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
+  dependencies:
+    lodash._basecopy "^3.0.0"
+    lodash._basetostring "^3.0.0"
+    lodash._basevalues "^3.0.0"
+    lodash._isiterateecall "^3.0.0"
+    lodash._reinterpolate "^3.0.0"
+    lodash.escape "^3.0.0"
+    lodash.keys "^3.0.0"
+    lodash.restparam "^3.0.0"
+    lodash.templatesettings "^3.0.0"
+
+lodash.template@^4.4.0:
+  version "4.5.0"
+  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
+  dependencies:
+    lodash._reinterpolate "^3.0.0"
+    lodash.templatesettings "^4.0.0"
+
+lodash.templatesettings@^3.0.0:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
+  dependencies:
+    lodash._reinterpolate "^3.0.0"
+    lodash.escape "^3.0.0"
+
+lodash.templatesettings@^4.0.0:
+  version "4.2.0"
+  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33"
+  dependencies:
+    lodash._reinterpolate "^3.0.0"
+
+lodash.uniq@^4.5.0:
+  version "4.5.0"
+  resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
+
+lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.17.11, lodash@^4.17.4, lodash@~4.17.10, lodash@~4.17.11:
+  version "4.17.15"
+  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+
+lodash@~1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
+
+logalot@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552"
+  dependencies:
+    figures "^1.3.5"
+    squeak "^1.0.0"
+
+longest@^1.0.0, longest@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loose-envify@^1.0.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+  dependencies:
+    js-tokens "^3.0.0 || ^4.0.0"
+
+loud-rejection@^1.0.0:
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+  dependencies:
+    currently-unhandled "^0.4.1"
+    signal-exit "^3.0.0"
+
+lowercase-keys@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
+
+lpad-align@^1.0.1:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e"
+  dependencies:
+    get-stdin "^4.0.1"
+    indent-string "^2.1.0"
+    longest "^1.0.0"
+    meow "^3.3.0"
+
+lru-cache@2:
+  version "2.7.3"
+  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
+
+lru-cache@^4.0.1:
+  version "4.1.5"
+  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
+  dependencies:
+    pseudomap "^1.0.2"
+    yallist "^2.1.2"
+
+lru-queue@0.1:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
+  dependencies:
+    es5-ext "~0.10.2"
+
+make-dir@^1.0.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
+  dependencies:
+    pify "^3.0.0"
+
+make-error-cause@^1.1.1:
+  version "1.2.2"
+  resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d"
+  dependencies:
+    make-error "^1.2.0"
+
+make-error@^1.2.0:
+  version "1.3.5"
+  resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
+
+make-iterator@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
+  dependencies:
+    kind-of "^6.0.2"
+
+map-cache@^0.2.0, map-cache@^0.2.2:
+  version "0.2.2"
+  resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+
+map-obj@^1.0.0, map-obj@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+
+map-stream@0.0.7:
+  version "0.0.7"
+  resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8"
+
+map-visit@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
+  dependencies:
+    object-visit "^1.0.0"
+
+math-expression-evaluator@^1.2.14:
+  version "1.2.17"
+  resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
+
+math-random@^1.0.1:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
+
+media-typer@0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+
+memoizee@0.4.X:
+  version "0.4.14"
+  resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57"
+  dependencies:
+    d "1"
+    es5-ext "^0.10.45"
+    es6-weak-map "^2.0.2"
+    event-emitter "^0.3.5"
+    is-promise "^2.1"
+    lru-queue "0.1"
+    next-tick "1"
+    timers-ext "^0.1.5"
+
+meow@^3.1.0, meow@^3.3.0, meow@^3.5.0, meow@^3.7.0:
+  version "3.7.0"
+  resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
+  dependencies:
+    camelcase-keys "^2.0.0"
+    decamelize "^1.1.2"
+    loud-rejection "^1.0.0"
+    map-obj "^1.0.1"
+    minimist "^1.1.3"
+    normalize-package-data "^2.3.4"
+    object-assign "^4.0.1"
+    read-pkg-up "^1.0.1"
+    redent "^1.0.0"
+    trim-newlines "^1.0.0"
+
+merge-stream@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
+  dependencies:
+    readable-stream "^2.0.1"
+
+micromatch@^2.3.7:
+  version "2.3.11"
+  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+  dependencies:
+    arr-diff "^2.0.0"
+    array-unique "^0.2.1"
+    braces "^1.8.2"
+    expand-brackets "^0.1.4"
+    extglob "^0.3.1"
+    filename-regex "^2.0.0"
+    is-extglob "^1.0.0"
+    is-glob "^2.0.1"
+    kind-of "^3.0.2"
+    normalize-path "^2.0.1"
+    object.omit "^2.0.0"
+    parse-glob "^3.0.4"
+    regex-cache "^0.4.2"
+
+micromatch@^3.0.4:
+  version "3.1.10"
+  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
+  dependencies:
+    arr-diff "^4.0.0"
+    array-unique "^0.3.2"
+    braces "^2.3.1"
+    define-property "^2.0.2"
+    extend-shallow "^3.0.2"
+    extglob "^2.0.4"
+    fragment-cache "^0.2.1"
+    kind-of "^6.0.2"
+    nanomatch "^1.2.9"
+    object.pick "^1.3.0"
+    regex-not "^1.0.0"
+    snapdragon "^0.8.1"
+    to-regex "^3.0.2"
+
+mime-db@1.40.0:
+  version "1.40.0"
+  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32"
+
+mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
+  version "2.1.24"
+  resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
+  dependencies:
+    mime-db "1.40.0"
+
+mini-lr@^0.1.8:
+  version "0.1.9"
+  resolved "https://registry.yarnpkg.com/mini-lr/-/mini-lr-0.1.9.tgz#02199d27347953d1fd1d6dbded4261f187b2d0f6"
+  dependencies:
+    body-parser "~1.14.0"
+    debug "^2.2.0"
+    faye-websocket "~0.7.2"
+    livereload-js "^2.2.0"
+    parseurl "~1.3.0"
+    qs "~2.2.3"
+
+"minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+  dependencies:
+    brace-expansion "^1.1.7"
+
+minimatch@^2.0.1:
+  version "2.0.10"
+  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
+  dependencies:
+    brace-expansion "^1.0.0"
+
+minimatch@~0.2.11:
+  version "0.2.14"
+  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
+  dependencies:
+    lru-cache "2"
+    sigmund "~1.0.0"
+
+minimist@0.0.8:
+  version "0.0.8"
+  resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+mixin-deep@^1.2.0:
+  version "1.3.2"
+  resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
+  dependencies:
+    for-in "^1.0.2"
+    is-extendable "^1.0.1"
+
+"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
+  version "0.5.1"
+  resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+  dependencies:
+    minimist "0.0.8"
+
+ms@0.7.1:
+  version "0.7.1"
+  resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
+
+ms@2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+
+ms@^2.1.1:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+
+multipipe@^0.1.2:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
+  dependencies:
+    duplexer2 "0.0.2"
+
+nan@^2.13.2:
+  version "2.14.0"
+  resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
+
+nanomatch@^1.2.9:
+  version "1.2.13"
+  resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
+  dependencies:
+    arr-diff "^4.0.0"
+    array-unique "^0.3.2"
+    define-property "^2.0.2"
+    extend-shallow "^3.0.2"
+    fragment-cache "^0.2.1"
+    is-windows "^1.0.2"
+    kind-of "^6.0.2"
+    object.pick "^1.3.0"
+    regex-not "^1.0.0"
+    snapdragon "^0.8.1"
+    to-regex "^3.0.1"
+
+natives@^1.1.0:
+  version "1.1.6"
+  resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb"
+
+next-tick@1, next-tick@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
+
+node-gyp@^3.8.0:
+  version "3.8.0"
+  resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c"
+  dependencies:
+    fstream "^1.0.0"
+    glob "^7.0.3"
+    graceful-fs "^4.1.2"
+    mkdirp "^0.5.0"
+    nopt "2 || 3"
+    npmlog "0 || 1 || 2 || 3 || 4"
+    osenv "0"
+    request "^2.87.0"
+    rimraf "2"
+    semver "~5.3.0"
+    tar "^2.0.0"
+    which "1"
+
+node-notifier@^5.2.1:
+  version "5.4.0"
+  resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.0.tgz#7b455fdce9f7de0c63538297354f3db468426e6a"
+  dependencies:
+    growly "^1.3.0"
+    is-wsl "^1.1.0"
+    semver "^5.5.0"
+    shellwords "^0.1.1"
+    which "^1.3.0"
+
+node-sass@^4.8.3:
+  version "4.12.0"
+  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017"
+  dependencies:
+    async-foreach "^0.1.3"
+    chalk "^1.1.1"
+    cross-spawn "^3.0.0"
+    gaze "^1.0.0"
+    get-stdin "^4.0.1"
+    glob "^7.0.3"
+    in-publish "^2.0.0"
+    lodash "^4.17.11"
+    meow "^3.7.0"
+    mkdirp "^0.5.1"
+    nan "^2.13.2"
+    node-gyp "^3.8.0"
+    npmlog "^4.0.0"
+    request "^2.88.0"
+    sass-graph "^2.2.4"
+    stdout-stream "^1.4.0"
+    "true-case-path" "^1.0.2"
+
+node-status-codes@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f"
+
+node.extend@^2.0.0:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-2.0.2.tgz#b4404525494acc99740f3703c496b7d5182cc6cc"
+  dependencies:
+    has "^1.0.3"
+    is "^3.2.1"
+
+"nopt@2 || 3":
+  version "3.0.6"
+  resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
+  dependencies:
+    abbrev "1"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+  version "2.5.0"
+  resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
+  dependencies:
+    hosted-git-info "^2.1.4"
+    resolve "^1.10.0"
+    semver "2 || 3 || 4 || 5"
+    validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.1, normalize-path@^2.1.1:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+  dependencies:
+    remove-trailing-separator "^1.0.1"
+
+normalize-range@^0.1.2:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+
+normalize-url@^1.4.0:
+  version "1.9.1"
+  resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
+  dependencies:
+    object-assign "^4.0.1"
+    prepend-http "^1.0.0"
+    query-string "^4.1.0"
+    sort-keys "^1.0.0"
+
+npm-run-path@^2.0.0:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
+  dependencies:
+    path-key "^2.0.0"
+
+"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0:
+  version "4.1.2"
+  resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
+  dependencies:
+    are-we-there-yet "~1.1.2"
+    console-control-strings "~1.1.0"
+    gauge "~2.7.3"
+    set-blocking "~2.0.0"
+
+num2fraction@^1.2.2:
+  version "1.2.2"
+  resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
+
+number-is-nan@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+oauth-sign@~0.9.0:
+  version "0.9.0"
+  resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+
+object-assign@4.X, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
+  version "4.1.1"
+  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+
+object-assign@^2.0.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa"
+
+object-assign@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
+
+object-copy@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
+  dependencies:
+    copy-descriptor "^0.1.0"
+    define-property "^0.2.5"
+    kind-of "^3.0.3"
+
+object-visit@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
+  dependencies:
+    isobject "^3.0.0"
+
+object.defaults@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf"
+  dependencies:
+    array-each "^1.0.1"
+    array-slice "^1.0.0"
+    for-own "^1.0.0"
+    isobject "^3.0.0"
+
+object.map@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37"
+  dependencies:
+    for-own "^1.0.0"
+    make-iterator "^1.0.0"
+
+object.omit@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+  dependencies:
+    for-own "^0.1.4"
+    is-extendable "^0.1.1"
+
+object.pick@^1.1.1, object.pick@^1.2.0, object.pick@^1.3.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
+  dependencies:
+    isobject "^3.0.1"
+
+on-finished@~2.3.0:
+  version "2.3.0"
+  resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+  dependencies:
+    ee-first "1.1.1"
+
+once@^1.3.0, once@^1.4.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+  dependencies:
+    wrappy "1"
+
+once@~1.3.0:
+  version "1.3.3"
+  resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
+  dependencies:
+    wrappy "1"
+
+onetime@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
+
+optipng-bin@^3.0.0:
+  version "3.1.4"
+  resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-3.1.4.tgz#95d34f2c488704f6fd70606bfea0c659f1d95d84"
+  dependencies:
+    bin-build "^2.0.0"
+    bin-wrapper "^3.0.0"
+    logalot "^2.0.0"
+
+orchestrator@^0.3.0:
+  version "0.3.8"
+  resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
+  dependencies:
+    end-of-stream "~0.1.5"
+    sequencify "~0.0.7"
+    stream-consume "~0.1.0"
+
+ordered-read-streams@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
+
+ordered-read-streams@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b"
+  dependencies:
+    is-stream "^1.0.1"
+    readable-stream "^2.0.1"
+
+os-filter-obj@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad"
+
+os-homedir@^1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+os-locale@^1.4.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
+  dependencies:
+    lcid "^1.0.0"
+
+os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+
+osenv@0:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
+  dependencies:
+    os-homedir "^1.0.0"
+    os-tmpdir "^1.0.0"
+
+p-finally@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+
+p-pipe@^1.1.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9"
+
+parse-filepath@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
+  dependencies:
+    is-absolute "^1.0.0"
+    map-cache "^0.2.0"
+    path-root "^0.1.1"
+
+parse-glob@^3.0.4:
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+  dependencies:
+    glob-base "^0.3.0"
+    is-dotfile "^1.0.0"
+    is-extglob "^1.0.0"
+    is-glob "^2.0.0"
+
+parse-json@^2.1.0, parse-json@^2.2.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+  dependencies:
+    error-ex "^1.2.0"
+
+parse-node-version@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b"
+
+parse-passwd@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
+
+parseurl@~1.3.0:
+  version "1.3.3"
+  resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+
+pascalcase@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
+
+path-dirname@^1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+
+path-exists@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+  dependencies:
+    pinkie-promise "^2.0.0"
+
+path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-is-inside@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+
+path-key@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+
+path-parse@^1.0.6:
+  version "1.0.6"
+  resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
+
+path-root-regex@^0.1.0:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
+
+path-root@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
+  dependencies:
+    path-root-regex "^0.1.0"
+
+path-type@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+  dependencies:
+    graceful-fs "^4.1.2"
+    pify "^2.0.0"
+    pinkie-promise "^2.0.0"
+
+pause-stream@^0.0.11:
+  version "0.0.11"
+  resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
+  dependencies:
+    through "~2.3"
+
+pend@~1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
+
+performance-now@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+
+pify@^2.0.0, pify@^2.3.0:
+  version "2.3.0"
+  resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pify@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+
+pinkie-promise@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+  dependencies:
+    pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+plugin-error@^0.1.2:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace"
+  dependencies:
+    ansi-cyan "^0.1.1"
+    ansi-red "^0.1.1"
+    arr-diff "^1.0.1"
+    arr-union "^2.0.1"
+    extend-shallow "^1.1.2"
+
+plugin-error@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
+  dependencies:
+    ansi-colors "^1.0.1"
+    arr-diff "^4.0.0"
+    arr-union "^3.1.0"
+    extend-shallow "^3.0.2"
+
+plur@^2.1.2:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
+  dependencies:
+    irregular-plurals "^1.0.0"
+
+posix-character-classes@^0.1.0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
+
+postcss-calc@^5.2.0:
+  version "5.3.1"
+  resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
+  dependencies:
+    postcss "^5.0.2"
+    postcss-message-helpers "^2.0.0"
+    reduce-css-calc "^1.2.6"
+
+postcss-colormin@^2.1.8:
+  version "2.2.2"
+  resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b"
+  dependencies:
+    colormin "^1.0.5"
+    postcss "^5.0.13"
+    postcss-value-parser "^3.2.3"
+
+postcss-convert-values@^2.3.4:
+  version "2.6.1"
+  resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d"
+  dependencies:
+    postcss "^5.0.11"
+    postcss-value-parser "^3.1.2"
+
+postcss-discard-comments@^2.0.4:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d"
+  dependencies:
+    postcss "^5.0.14"
+
+postcss-discard-duplicates@^2.0.1:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932"
+  dependencies:
+    postcss "^5.0.4"
+
+postcss-discard-empty@^2.0.1:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5"
+  dependencies:
+    postcss "^5.0.14"
+
+postcss-discard-overridden@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58"
+  dependencies:
+    postcss "^5.0.16"
+
+postcss-discard-unused@^2.2.1:
+  version "2.2.3"
+  resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433"
+  dependencies:
+    postcss "^5.0.14"
+    uniqs "^2.0.0"
+
+postcss-filter-plugins@^2.0.0:
+  version "2.0.3"
+  resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec"
+  dependencies:
+    postcss "^5.0.4"
+
+postcss-merge-idents@^2.1.5:
+  version "2.1.7"
+  resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
+  dependencies:
+    has "^1.0.1"
+    postcss "^5.0.10"
+    postcss-value-parser "^3.1.1"
+
+postcss-merge-longhand@^2.0.1:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658"
+  dependencies:
+    postcss "^5.0.4"
+
+postcss-merge-rules@^2.0.3:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721"
+  dependencies:
+    browserslist "^1.5.2"
+    caniuse-api "^1.5.2"
+    postcss "^5.0.4"
+    postcss-selector-parser "^2.2.2"
+    vendors "^1.0.0"
+
+postcss-message-helpers@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e"
+
+postcss-minify-font-values@^1.0.2:
+  version "1.0.5"
+  resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69"
+  dependencies:
+    object-assign "^4.0.1"
+    postcss "^5.0.4"
+    postcss-value-parser "^3.0.2"
+
+postcss-minify-gradients@^1.0.1:
+  version "1.0.5"
+  resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1"
+  dependencies:
+    postcss "^5.0.12"
+    postcss-value-parser "^3.3.0"
+
+postcss-minify-params@^1.0.4:
+  version "1.2.2"
+  resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3"
+  dependencies:
+    alphanum-sort "^1.0.1"
+    postcss "^5.0.2"
+    postcss-value-parser "^3.0.2"
+    uniqs "^2.0.0"
+
+postcss-minify-selectors@^2.0.4:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf"
+  dependencies:
+    alphanum-sort "^1.0.2"
+    has "^1.0.1"
+    postcss "^5.0.14"
+    postcss-selector-parser "^2.0.0"
+
+postcss-normalize-charset@^1.1.0:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1"
+  dependencies:
+    postcss "^5.0.5"
+
+postcss-normalize-url@^3.0.7:
+  version "3.0.8"
+  resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222"
+  dependencies:
+    is-absolute-url "^2.0.0"
+    normalize-url "^1.4.0"
+    postcss "^5.0.14"
+    postcss-value-parser "^3.2.3"
+
+postcss-ordered-values@^2.1.0:
+  version "2.2.3"
+  resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d"
+  dependencies:
+    postcss "^5.0.4"
+    postcss-value-parser "^3.0.1"
+
+postcss-reduce-idents@^2.2.2:
+  version "2.4.0"
+  resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3"
+  dependencies:
+    postcss "^5.0.4"
+    postcss-value-parser "^3.0.2"
+
+postcss-reduce-initial@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea"
+  dependencies:
+    postcss "^5.0.4"
+
+postcss-reduce-transforms@^1.0.3:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1"
+  dependencies:
+    has "^1.0.1"
+    postcss "^5.0.8"
+    postcss-value-parser "^3.0.1"
+
+postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2:
+  version "2.2.3"
+  resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90"
+  dependencies:
+    flatten "^1.0.2"
+    indexes-of "^1.0.1"
+    uniq "^1.0.1"
+
+postcss-svgo@^2.1.1:
+  version "2.1.6"
+  resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d"
+  dependencies:
+    is-svg "^2.0.0"
+    postcss "^5.0.14"
+    postcss-value-parser "^3.2.3"
+    svgo "^0.7.0"
+
+postcss-unique-selectors@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d"
+  dependencies:
+    alphanum-sort "^1.0.1"
+    postcss "^5.0.4"
+    uniqs "^2.0.0"
+
+postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0:
+  version "3.3.1"
+  resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"
+
+postcss-zindex@^2.0.1:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22"
+  dependencies:
+    has "^1.0.1"
+    postcss "^5.0.4"
+    uniqs "^2.0.0"
+
+postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16:
+  version "5.2.18"
+  resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
+  dependencies:
+    chalk "^1.1.3"
+    js-base64 "^2.1.9"
+    source-map "^0.5.6"
+    supports-color "^3.2.3"
+
+prepend-http@^1.0.0, prepend-http@^1.0.1:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
+
+preserve@^0.2.0:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+
+pretty-bytes@^4.0.2:
+  version "4.0.2"
+  resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
+
+pretty-hrtime@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
+
+private@^0.1.6, private@^0.1.8:
+  version "0.1.8"
+  resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+
+process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+
+pseudomap@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
+psl@^1.1.24:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/psl/-/psl-1.2.0.tgz#df12b5b1b3a30f51c329eacbdef98f3a6e136dc6"
+
+punycode@^1.4.1:
+  version "1.4.1"
+  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+
+punycode@^2.1.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+
+q@^1.1.2:
+  version "1.5.1"
+  resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
+
+qs@5.2.0:
+  version "5.2.0"
+  resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be"
+
+qs@~2.2.3:
+  version "2.2.5"
+  resolved "https://registry.yarnpkg.com/qs/-/qs-2.2.5.tgz#1088abaf9dcc0ae5ae45b709e6c6b5888b23923c"
+
+qs@~6.5.2:
+  version "6.5.2"
+  resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+
+query-string@^4.1.0:
+  version "4.3.4"
+  resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
+  dependencies:
+    object-assign "^4.1.0"
+    strict-uri-encode "^1.0.0"
+
+randomatic@^3.0.0:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
+  dependencies:
+    is-number "^4.0.0"
+    kind-of "^6.0.0"
+    math-random "^1.0.1"
+
+raw-body@~2.1.5:
+  version "2.1.7"
+  resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774"
+  dependencies:
+    bytes "2.4.0"
+    iconv-lite "0.4.13"
+    unpipe "1.0.0"
+
+rc@^1.1.2:
+  version "1.2.8"
+  resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+  dependencies:
+    deep-extend "^0.6.0"
+    ini "~1.3.0"
+    minimist "^1.2.0"
+    strip-json-comments "~2.0.1"
+
+rcfinder@^0.1.6:
+  version "0.1.9"
+  resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115"
+  dependencies:
+    lodash.clonedeep "^4.3.2"
+
+rcloader@^0.2.2:
+  version "0.2.2"
+  resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.2.2.tgz#58d2298b462d0b9bfd2133d2a1ec74fbd705c717"
+  dependencies:
+    lodash.assign "^4.2.0"
+    lodash.isobject "^3.0.2"
+    lodash.merge "^4.6.0"
+    rcfinder "^0.1.6"
+
+read-all-stream@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa"
+  dependencies:
+    pinkie-promise "^2.0.0"
+    readable-stream "^2.0.0"
+
+read-pkg-up@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+  dependencies:
+    find-up "^1.0.0"
+    read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+  dependencies:
+    load-json-file "^1.0.0"
+    normalize-package-data "^2.3.2"
+    path-type "^1.0.0"
+
+readable-stream@1.1:
+  version "1.1.13"
+  resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
+  dependencies:
+    core-util-is "~1.0.0"
+    inherits "~2.0.1"
+    isarray "0.0.1"
+    string_decoder "~0.10.x"
+
+"readable-stream@>=1.0.33-1 <1.1.0-0":
+  version "1.0.34"
+  resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
+  dependencies:
+    core-util-is "~1.0.0"
+    inherits "~2.0.1"
+    isarray "0.0.1"
+    string_decoder "~0.10.x"
+
+readable-stream@^1.0.26-2, readable-stream@^1.0.26-4, readable-stream@~1.1.9:
+  version "1.1.14"
+  resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
+  dependencies:
+    core-util-is "~1.0.0"
+    inherits "~2.0.1"
+    isarray "0.0.1"
+    string_decoder "~0.10.x"
+
+readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6:
+  version "2.3.6"
+  resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
+  dependencies:
+    core-util-is "~1.0.0"
+    inherits "~2.0.3"
+    isarray "~1.0.0"
+    process-nextick-args "~2.0.0"
+    safe-buffer "~5.1.1"
+    string_decoder "~1.1.1"
+    util-deprecate "~1.0.1"
+
+rechoir@^0.6.2:
+  version "0.6.2"
+  resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
+  dependencies:
+    resolve "^1.1.6"
+
+redent@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
+  dependencies:
+    indent-string "^2.1.0"
+    strip-indent "^1.0.1"
+
+reduce-css-calc@^1.2.6:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
+  dependencies:
+    balanced-match "^0.4.2"
+    math-expression-evaluator "^1.2.14"
+    reduce-function-call "^1.0.1"
+
+reduce-function-call@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99"
+  dependencies:
+    balanced-match "^0.4.2"
+
+regenerate@^1.2.1:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
+
+regenerator-runtime@^0.11.0:
+  version "0.11.1"
+  resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+
+regenerator-transform@^0.10.0:
+  version "0.10.1"
+  resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
+  dependencies:
+    babel-runtime "^6.18.0"
+    babel-types "^6.19.0"
+    private "^0.1.6"
+
+regex-cache@^0.4.2:
+  version "0.4.4"
+  resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
+  dependencies:
+    is-equal-shallow "^0.1.3"
+
+regex-not@^1.0.0, regex-not@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
+  dependencies:
+    extend-shallow "^3.0.2"
+    safe-regex "^1.1.0"
+
+regexpu-core@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
+  dependencies:
+    regenerate "^1.2.1"
+    regjsgen "^0.2.0"
+    regjsparser "^0.1.4"
+
+regjsgen@^0.2.0:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
+
+regjsparser@^0.1.4:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
+  dependencies:
+    jsesc "~0.5.0"
+
+remove-trailing-separator@^1.0.1:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
+
+repeat-element@^1.1.2:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
+
+repeat-string@^1.5.2, repeat-string@^1.6.1:
+  version "1.6.1"
+  resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+repeating@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+  dependencies:
+    is-finite "^1.0.0"
+
+replace-ext@0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
+
+replace-ext@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
+
+request@^2.87.0, request@^2.88.0:
+  version "2.88.0"
+  resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
+  dependencies:
+    aws-sign2 "~0.7.0"
+    aws4 "^1.8.0"
+    caseless "~0.12.0"
+    combined-stream "~1.0.6"
+    extend "~3.0.2"
+    forever-agent "~0.6.1"
+    form-data "~2.3.2"
+    har-validator "~5.1.0"
+    http-signature "~1.2.0"
+    is-typedarray "~1.0.0"
+    isstream "~0.1.2"
+    json-stringify-safe "~5.0.1"
+    mime-types "~2.1.19"
+    oauth-sign "~0.9.0"
+    performance-now "^2.1.0"
+    qs "~6.5.2"
+    safe-buffer "^5.1.2"
+    tough-cookie "~2.4.3"
+    tunnel-agent "^0.6.0"
+    uuid "^3.3.2"
+
+require-directory@^2.1.1:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
+
+require-main-filename@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+
+resolve-dir@^1.0.0, resolve-dir@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
+  dependencies:
+    expand-tilde "^2.0.0"
+    global-modules "^1.0.0"
+
+resolve-url@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+
+resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0:
+  version "1.11.1"
+  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e"
+  dependencies:
+    path-parse "^1.0.6"
+
+ret@~0.1.10:
+  version "0.1.15"
+  resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
+
+right-align@^0.1.1:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+  dependencies:
+    align-text "^0.1.1"
+
+rimraf@2, rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.4.0, rimraf@^2.5.4:
+  version "2.6.3"
+  resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+  dependencies:
+    glob "^7.1.3"
+
+safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
+  version "5.2.0"
+  resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
+
+safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+  version "5.1.2"
+  resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+
+safe-regex@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
+  dependencies:
+    ret "~0.1.10"
+
+safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+
+sass-graph@^2.2.4:
+  version "2.2.4"
+  resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
+  dependencies:
+    glob "^7.0.0"
+    lodash "^4.0.0"
+    scss-tokenizer "^0.2.3"
+    yargs "^7.0.0"
+
+sax@~1.2.1:
+  version "1.2.4"
+  resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+
+scss-tokenizer@^0.2.3:
+  version "0.2.3"
+  resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
+  dependencies:
+    js-base64 "^2.1.8"
+    source-map "^0.4.2"
+
+seek-bzip@^1.0.3:
+  version "1.0.5"
+  resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc"
+  dependencies:
+    commander "~2.8.1"
+
+semver-regex@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"
+
+semver-truncate@^1.0.0:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8"
+  dependencies:
+    semver "^5.3.0"
+
+"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0:
+  version "5.7.0"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
+
+semver@^4.0.3, semver@^4.1.0:
+  version "4.3.6"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
+
+semver@~5.3.0:
+  version "5.3.0"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+
+sequencify@~0.0.7:
+  version "0.0.7"
+  resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
+
+set-blocking@^2.0.0, set-blocking@~2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+
+set-immediate-shim@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
+
+set-value@^2.0.0, set-value@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
+  dependencies:
+    extend-shallow "^2.0.1"
+    is-extendable "^0.1.1"
+    is-plain-object "^2.0.3"
+    split-string "^3.0.1"
+
+shebang-command@^1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+  dependencies:
+    shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+
+shelljs@0.3.x:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
+
+shellwords@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
+
+sigmund@~1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
+
+signal-exit@^3.0.0:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+
+slash@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+
+snapdragon-node@^2.0.1:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
+  dependencies:
+    define-property "^1.0.0"
+    isobject "^3.0.0"
+    snapdragon-util "^3.0.1"
+
+snapdragon-util@^3.0.1:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
+  dependencies:
+    kind-of "^3.2.0"
+
+snapdragon@^0.8.1:
+  version "0.8.2"
+  resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
+  dependencies:
+    base "^0.11.1"
+    debug "^2.2.0"
+    define-property "^0.2.5"
+    extend-shallow "^2.0.1"
+    map-cache "^0.2.2"
+    source-map "^0.5.6"
+    source-map-resolve "^0.5.0"
+    use "^3.1.0"
+
+sort-keys@^1.0.0:
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
+  dependencies:
+    is-plain-obj "^1.0.0"
+
+source-map-resolve@^0.5.0, source-map-resolve@^0.5.2:
+  version "0.5.2"
+  resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
+  dependencies:
+    atob "^2.1.1"
+    decode-uri-component "^0.2.0"
+    resolve-url "^0.2.1"
+    source-map-url "^0.4.0"
+    urix "^0.1.0"
+
+source-map-support@^0.4.15:
+  version "0.4.18"
+  resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
+  dependencies:
+    source-map "^0.5.6"
+
+source-map-url@^0.4.0:
+  version "0.4.0"
+  resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
+
+source-map@^0.4.2:
+  version "0.4.4"
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+  dependencies:
+    amdefine ">=0.0.4"
+
+source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
+  version "0.5.7"
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
+  version "0.6.1"
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+
+source-map@^0.7.3:
+  version "0.7.3"
+  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
+
+sparkles@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c"
+
+spdx-correct@^3.0.0:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4"
+  dependencies:
+    spdx-expression-parse "^3.0.0"
+    spdx-license-ids "^3.0.0"
+
+spdx-exceptions@^2.1.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977"
+
+spdx-expression-parse@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
+  dependencies:
+    spdx-exceptions "^2.1.0"
+    spdx-license-ids "^3.0.0"
+
+spdx-license-ids@^3.0.0:
+  version "3.0.5"
+  resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654"
+
+split-string@^3.0.1, split-string@^3.0.2:
+  version "3.1.0"
+  resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
+  dependencies:
+    extend-shallow "^3.0.0"
+
+split@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
+  dependencies:
+    through "2"
+
+sprintf-js@~1.0.2:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+squeak@^1.0.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3"
+  dependencies:
+    chalk "^1.0.0"
+    console-stream "^0.1.1"
+    lpad-align "^1.0.1"
+
+sshpk@^1.7.0:
+  version "1.16.1"
+  resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
+  dependencies:
+    asn1 "~0.2.3"
+    assert-plus "^1.0.0"
+    bcrypt-pbkdf "^1.0.0"
+    dashdash "^1.12.0"
+    ecc-jsbn "~0.1.1"
+    getpass "^0.1.1"
+    jsbn "~0.1.0"
+    safer-buffer "^2.0.2"
+    tweetnacl "~0.14.0"
+
+stat-mode@^0.2.0:
+  version "0.2.2"
+  resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502"
+
+static-extend@^0.1.1:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
+  dependencies:
+    define-property "^0.2.5"
+    object-copy "^0.1.0"
+
+statuses@1:
+  version "1.5.0"
+  resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+
+stdout-stream@^1.4.0:
+  version "1.4.1"
+  resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de"
+  dependencies:
+    readable-stream "^2.0.1"
+
+stream-combiner2@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
+  dependencies:
+    duplexer2 "~0.1.0"
+    readable-stream "^2.0.2"
+
+stream-combiner@^0.2.2:
+  version "0.2.2"
+  resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858"
+  dependencies:
+    duplexer "~0.1.1"
+    through "~2.3.4"
+
+stream-consume@~0.1.0:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.1.tgz#d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48"
+
+stream-shift@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
+
+streamqueue@0.0.6:
+  version "0.0.6"
+  resolved "https://registry.yarnpkg.com/streamqueue/-/streamqueue-0.0.6.tgz#66f5f5ec94e9b8af249e4aec2dd1f741bfe94de3"
+  dependencies:
+    readable-stream "^1.0.26-2"
+
+strict-uri-encode@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
+
+string-width@^1.0.1, string-width@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+  dependencies:
+    code-point-at "^1.0.0"
+    is-fullwidth-code-point "^1.0.0"
+    strip-ansi "^3.0.0"
+
+"string-width@^1.0.2 || 2":
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+  dependencies:
+    is-fullwidth-code-point "^2.0.0"
+    strip-ansi "^4.0.0"
+
+string_decoder@~0.10.x:
+  version "0.10.31"
+  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+
+string_decoder@~1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+  dependencies:
+    safe-buffer "~5.1.0"
+
+strip-ansi@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220"
+  dependencies:
+    ansi-regex "^0.2.1"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+  dependencies:
+    ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+  dependencies:
+    ansi-regex "^3.0.0"
+
+strip-bom-stream@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
+  dependencies:
+    first-chunk-stream "^1.0.0"
+    strip-bom "^2.0.0"
+
+strip-bom-string@1.X:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
+
+strip-bom@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
+  dependencies:
+    first-chunk-stream "^1.0.0"
+    is-utf8 "^0.2.0"
+
+strip-bom@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+  dependencies:
+    is-utf8 "^0.2.0"
+
+strip-dirs@^1.0.0:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0"
+  dependencies:
+    chalk "^1.0.0"
+    get-stdin "^4.0.1"
+    is-absolute "^0.1.5"
+    is-natural-number "^2.0.0"
+    minimist "^1.1.0"
+    sum-up "^1.0.1"
+
+strip-eof@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
+
+strip-indent@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
+  dependencies:
+    get-stdin "^4.0.1"
+
+strip-json-comments@1.0.x:
+  version "1.0.4"
+  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"
+
+strip-json-comments@~2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+
+strip-outer@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
+  dependencies:
+    escape-string-regexp "^1.0.2"
+
+sum-up@^1.0.1:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e"
+  dependencies:
+    chalk "^1.0.0"
+
+supports-color@^0.2.0:
+  version "0.2.0"
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
+
+supports-color@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.2.3:
+  version "3.2.3"
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
+  dependencies:
+    has-flag "^1.0.0"
+
+supports-color@^5.3.0:
+  version "5.5.0"
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+  dependencies:
+    has-flag "^3.0.0"
+
+svgo@^0.7.0:
+  version "0.7.2"
+  resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
+  dependencies:
+    coa "~1.0.1"
+    colors "~1.1.2"
+    csso "~2.3.1"
+    js-yaml "~3.7.0"
+    mkdirp "~0.5.1"
+    sax "~1.2.1"
+    whet.extend "~0.9.9"
+
+tar-stream@^1.1.1:
+  version "1.6.2"
+  resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
+  dependencies:
+    bl "^1.0.0"
+    buffer-alloc "^1.2.0"
+    end-of-stream "^1.0.0"
+    fs-constants "^1.0.0"
+    readable-stream "^2.3.0"
+    to-buffer "^1.1.1"
+    xtend "^4.0.0"
+
+tar@^2.0.0:
+  version "2.2.2"
+  resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40"
+  dependencies:
+    block-stream "*"
+    fstream "^1.0.12"
+    inherits "2"
+
+temp-dir@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
+
+tempfile@^1.0.0:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
+  dependencies:
+    os-tmpdir "^1.0.0"
+    uuid "^2.0.1"
+
+tempfile@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265"
+  dependencies:
+    temp-dir "^1.0.0"
+    uuid "^3.0.1"
+
+through2-concurrent@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-1.1.1.tgz#11cb4ea4c9e31bca6e4c1e6dba48d1c728c3524b"
+  dependencies:
+    through2 "^2.0.0"
+
+through2-filter@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
+  dependencies:
+    through2 "~2.0.0"
+    xtend "~4.0.0"
+
+through2-filter@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254"
+  dependencies:
+    through2 "~2.0.0"
+    xtend "~4.0.0"
+
+through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0:
+  version "2.0.5"
+  resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
+  dependencies:
+    readable-stream "~2.3.6"
+    xtend "~4.0.1"
+
+through2@^0.6.0, through2@^0.6.1:
+  version "0.6.5"
+  resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+  dependencies:
+    readable-stream ">=1.0.33-1 <1.1.0-0"
+    xtend ">=4.0.0 <4.1.0-0"
+
+through@2, through@^2.3.8, through@~2.3, through@~2.3.4:
+  version "2.3.8"
+  resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+
+tildify@^1.0.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
+  dependencies:
+    os-homedir "^1.0.0"
+
+time-stamp@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
+
+timed-out@^3.0.0:
+  version "3.1.3"
+  resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217"
+
+timers-ext@^0.1.5:
+  version "0.1.7"
+  resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6"
+  dependencies:
+    es5-ext "~0.10.46"
+    next-tick "1"
+
+to-absolute-glob@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
+  dependencies:
+    extend-shallow "^2.0.1"
+
+to-buffer@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
+
+to-fast-properties@^1.0.3:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+
+to-object-path@^0.3.0:
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
+  dependencies:
+    kind-of "^3.0.2"
+
+to-regex-range@^2.1.0:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
+  dependencies:
+    is-number "^3.0.0"
+    repeat-string "^1.6.1"
+
+to-regex@^3.0.1, to-regex@^3.0.2:
+  version "3.0.2"
+  resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
+  dependencies:
+    define-property "^2.0.2"
+    extend-shallow "^3.0.2"
+    regex-not "^1.0.2"
+    safe-regex "^1.1.0"
+
+tough-cookie@~2.4.3:
+  version "2.4.3"
+  resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
+  dependencies:
+    psl "^1.1.24"
+    punycode "^1.4.1"
+
+trim-newlines@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
+
+trim-repeated@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
+  dependencies:
+    escape-string-regexp "^1.0.2"
+
+trim-right@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
+
+"true-case-path@^1.0.2":
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d"
+  dependencies:
+    glob "^7.1.2"
+
+try-json-parse@^0.1.1:
+  version "0.1.1"
+  resolved "https://registry.yarnpkg.com/try-json-parse/-/try-json-parse-0.1.1.tgz#8db01622e877e51b83140caee7c80864ad390c82"
+
+tunnel-agent@^0.4.0:
+  version "0.4.3"
+  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
+
+tunnel-agent@^0.6.0:
+  version "0.6.0"
+  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+  dependencies:
+    safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+  version "0.14.5"
+  resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+
+type-is@~1.6.10:
+  version "1.6.18"
+  resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
+  dependencies:
+    media-typer "0.3.0"
+    mime-types "~2.1.24"
+
+type@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/type/-/type-1.0.1.tgz#084c9a17fcc9151a2cdb1459905c2e45e4bb7d61"
+
+typedarray@^0.0.6:
+  version "0.0.6"
+  resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+
+uglify-js@~2.8.10:
+  version "2.8.29"
+  resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+  dependencies:
+    source-map "~0.5.1"
+    yargs "~3.10.0"
+  optionalDependencies:
+    uglify-to-browserify "~1.0.0"
+
+uglify-save-license@^0.4.1:
+  version "0.4.1"
+  resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
+
+uglify-to-browserify@~1.0.0:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+unc-path-regex@^0.1.2:
+  version "0.1.2"
+  resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
+
+union-value@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
+  dependencies:
+    arr-union "^3.1.0"
+    get-value "^2.0.6"
+    is-extendable "^0.1.1"
+    set-value "^2.0.1"
+
+uniq@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
+
+uniqs@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
+
+unique-stream@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
+
+unique-stream@^2.0.2:
+  version "2.3.1"
+  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac"
+  dependencies:
+    json-stable-stringify-without-jsonify "^1.0.1"
+    through2-filter "^3.0.0"
+
+unpipe@1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+
+unset-value@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
+  dependencies:
+    has-value "^0.3.1"
+    isobject "^3.0.0"
+
+unzip-response@^1.0.2:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe"
+
+uri-js@^4.2.2:
+  version "4.2.2"
+  resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+  dependencies:
+    punycode "^2.1.0"
+
+urix@^0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+
+url-parse-lax@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
+  dependencies:
+    prepend-http "^1.0.1"
+
+url-regex@^3.0.0:
+  version "3.2.0"
+  resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724"
+  dependencies:
+    ip-regex "^1.0.1"
+
+use@^3.1.0:
+  version "3.1.1"
+  resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
+
+user-home@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
+
+util-deprecate@~1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+
+uuid@^2.0.1:
+  version "2.0.3"
+  resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
+
+uuid@^3.0.1, uuid@^3.3.2:
+  version "3.3.2"
+  resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
+
+v8flags@^2.0.2:
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
+  dependencies:
+    user-home "^1.1.1"
+
+vali-date@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6"
+
+validate-npm-package-license@^3.0.1:
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
+  dependencies:
+    spdx-correct "^3.0.0"
+    spdx-expression-parse "^3.0.0"
+
+vendors@^1.0.0:
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"
+
+verror@1.10.0:
+  version "1.10.0"
+  resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+  dependencies:
+    assert-plus "^1.0.0"
+    core-util-is "1.0.2"
+    extsprintf "^1.2.0"
+
+vinyl-assign@^1.0.1:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45"
+  dependencies:
+    object-assign "^4.0.1"
+    readable-stream "^2.0.0"
+
+vinyl-fs@^0.3.0:
+  version "0.3.14"
+  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
+  dependencies:
+    defaults "^1.0.0"
+    glob-stream "^3.1.5"
+    glob-watcher "^0.0.6"
+    graceful-fs "^3.0.0"
+    mkdirp "^0.5.0"
+    strip-bom "^1.0.0"
+    through2 "^0.6.1"
+    vinyl "^0.4.0"
+
+vinyl-fs@^2.2.0:
+  version "2.4.4"
+  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239"
+  dependencies:
+    duplexify "^3.2.0"
+    glob-stream "^5.3.2"
+    graceful-fs "^4.0.0"
+    gulp-sourcemaps "1.6.0"
+    is-valid-glob "^0.3.0"
+    lazystream "^1.0.0"
+    lodash.isequal "^4.0.0"
+    merge-stream "^1.0.0"
+    mkdirp "^0.5.0"
+    object-assign "^4.0.0"
+    readable-stream "^2.0.4"
+    strip-bom "^2.0.0"
+    strip-bom-stream "^1.0.0"
+    through2 "^2.0.0"
+    through2-filter "^2.0.0"
+    vali-date "^1.0.0"
+    vinyl "^1.0.0"
+
+vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
+  version "0.2.1"
+  resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
+  dependencies:
+    source-map "^0.5.1"
+
+vinyl@^0.4.0, vinyl@^0.4.3:
+  version "0.4.6"
+  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
+  dependencies:
+    clone "^0.2.0"
+    clone-stats "^0.0.1"
+
+vinyl@^0.5.0:
+  version "0.5.3"
+  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
+  dependencies:
+    clone "^1.0.0"
+    clone-stats "^0.0.1"
+    replace-ext "0.0.1"
+
+vinyl@^1.0.0, vinyl@^1.1.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
+  dependencies:
+    clone "^1.0.0"
+    clone-stats "^0.0.1"
+    replace-ext "0.0.1"
+
+vinyl@^2.0.0, vinyl@^2.2.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
+  dependencies:
+    clone "^2.1.1"
+    clone-buffer "^1.0.0"
+    clone-stats "^1.0.0"
+    cloneable-readable "^1.0.0"
+    remove-trailing-separator "^1.0.1"
+    replace-ext "^1.0.0"
+
+ware@^1.2.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4"
+  dependencies:
+    wrap-fn "^0.1.0"
+
+websocket-driver@>=0.3.6:
+  version "0.7.3"
+  resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9"
+  dependencies:
+    http-parser-js ">=0.4.0 <0.4.11"
+    safe-buffer ">=5.1.0"
+    websocket-extensions ">=0.1.1"
+
+websocket-extensions@>=0.1.1:
+  version "0.1.3"
+  resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
+
+whet.extend@~0.9.9:
+  version "0.9.9"
+  resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
+
+which-module@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
+
+which@1, which@^1.2.14, which@^1.2.9, which@^1.3.0:
+  version "1.3.1"
+  resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+  dependencies:
+    isexe "^2.0.0"
+
+wide-align@^1.1.0:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+  dependencies:
+    string-width "^1.0.2 || 2"
+
+window-size@0.1.0:
+  version "0.1.0"
+  resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@0.0.2:
+  version "0.0.2"
+  resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+wrap-ansi@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
+  dependencies:
+    string-width "^1.0.1"
+    strip-ansi "^3.0.1"
+
+wrap-fn@^0.1.0:
+  version "0.1.5"
+  resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845"
+  dependencies:
+    co "3.1.0"
+
+wrappy@1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
+  version "4.0.2"
+  resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
+
+y18n@^3.2.1:
+  version "3.2.1"
+  resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+
+yallist@^2.1.2:
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+
+yargs-parser@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a"
+  dependencies:
+    camelcase "^3.0.0"
+
+yargs@^7.0.0:
+  version "7.1.0"
+  resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"
+  dependencies:
+    camelcase "^3.0.0"
+    cliui "^3.2.0"
+    decamelize "^1.1.1"
+    get-caller-file "^1.0.1"
+    os-locale "^1.4.0"
+    read-pkg-up "^1.0.1"
+    require-directory "^2.1.1"
+    require-main-filename "^1.0.1"
+    set-blocking "^2.0.0"
+    string-width "^1.0.2"
+    which-module "^1.0.0"
+    y18n "^3.2.1"
+    yargs-parser "^5.0.0"
+
+yargs@~3.10.0:
+  version "3.10.0"
+  resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+  dependencies:
+    camelcase "^1.0.2"
+    cliui "^2.1.0"
+    decamelize "^1.0.0"
+    window-size "0.1.0"
+
+yauzl@^2.2.1:
+  version "2.10.0"
+  resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
+  dependencies:
+    buffer-crc32 "~0.2.3"
+    fd-slicer "~1.1.0"
diff --git a/models/admin/plugins/plugins.php b/models/admin/plugins/plugins.php
index 232ab75..2b278d6 100644
--- a/models/admin/plugins/plugins.php
+++ b/models/admin/plugins/plugins.php
@@ -106,8 +106,11 @@ class GlmMembersAdmin_plugins_plugins extends GlmDataPlugins
         $viewPath = 'admin/plugins/';
 
         // Setup Foundation 6
-        wp_enqueue_style( 'Foundation6', GLM_MEMBERS_PLUGIN_URL . 'css/foundation-6.min.css' );
-        wp_enqueue_script( 'Foundation6', GLM_MEMBERS_PLUGIN_URL . 'js/foundation-6.min.js' );
+        wp_enqueue_style( 'Foundation6', GLM_MEMBERS_PLUGIN_URL . '/css/foundation-6.min.css' );
+        wp_enqueue_script( 'Foundation6', GLM_MEMBERS_PLUGIN_URL . '/js/foundation-6.min.js' );
+
+        // wp_enqueue_style( 'Tabulator', GLM_MEMBERS_PLUGINS_PLUGIN_URL . '/js/tabulator/dist/css/tabulator.min.css' );
+        // wp_enqueue_script( 'Tabulator', GLM_MEMBERS_PLUGINS_PLUGIN_URL . '/js/tabulator/dist/js/tabulator.min.js' );
 
         if ( isset( $_REQUEST['option'] ) ) {
             $option = $_REQUEST['option'];
@@ -223,6 +226,10 @@ class GlmMembersAdmin_plugins_plugins extends GlmDataPlugins
                     ),
                     ARRAY_A
                 );
+            } else {
+                $plugin            = $this->newEntry();
+                $tData['plugin']   = $plugin;
+                $tData['newEntry'] = true;
             }
             break;
 
diff --git a/views/admin/plugins/index.html b/views/admin/plugins/index.html
index f0e5dc9..fc40a39 100644
--- a/views/admin/plugins/index.html
+++ b/views/admin/plugins/index.html
@@ -3,32 +3,47 @@
 

Plugins Dashboard

- - - - - - - - - {foreach $plugins as $plugin} - - - - - - - {/foreach} -
PluginLatest VersionProd Sites needing updatesDev Sites needing updates
{$plugin.name}{$plugin.latest_version}{count($plugin.oldProdVersions)}{count($plugin.oldDevVersions)}
+
+ + + + + {include file='admin/footer.html'} diff --git a/views/admin/plugins/plugin-detail.html b/views/admin/plugins/plugin-detail.html index 79031ce..a1da9d5 100644 --- a/views/admin/plugins/plugin-detail.html +++ b/views/admin/plugins/plugin-detail.html @@ -25,8 +25,14 @@ {include file='ui/f6/form-start.html'} - - + {if $newEntry} + + {else} + + {/if} + {if !$newEntry} + + {/if} {$data = $plugin} @@ -67,7 +73,7 @@ {* GLMA *} {$ui = [ - 'value' => $data.fieldData.glm_associate.value, + 'value' => $data.fieldData.glm_associate.value|default:'', 'field' => 'glm_associate', 'label' => 'GLMA', 'required' => $data.fieldRequired.glm_associate, @@ -99,12 +105,15 @@ } -{$baseUrl = "{$thisUrl}?page={$thisPage}&glm_action={$thisAction}&option=view&plugin_id={$plugin.fieldData.id}"} -{$SitePluginUrl = "{$thisUrl}?page={$thisPage}&glm_action={$thisAction}plugin_id={$plugin.fieldData.id}"} +{if $newEntry} + {$baseUrl = "{$thisUrl}?page={$thisPage}&glm_action={$thisAction}&option=view"} +{else} + {$baseUrl = "{$thisUrl}?page={$thisPage}&glm_action={$thisAction}&option=view&plugin_id={$plugin.fieldData.id}"} +{/if} Add Site -{if !empty($sites)} +{if !empty($sites) && !$newEntry}
Site Name