From 9e49d715b4fb5608a73aaf4213330c7c814b827f Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Thu, 18 May 2023 06:50:52 -0400 Subject: [PATCH] feat!: prepare official v4.0.0 release (#777) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat!: Drop jQuery requirement (#734) * feat!: Drop jQuery requirement * fix: addresses all issues found in jQuery removal previous PR #734 (#742) - fixes some errors that came up while testing the whole thing in Slickgrid-Universal * feat(plugins): convert slick.draggablegrouping to vanillaJS (#744) - fix ESLint for Cypress - also remove jQuery from package.json list of dependencies * show tooltip if the cell content is taller than the cell height - fixes #740 (#741) * show tooltip if the cell content is taller than the cell height The current code does not show a tooltip when word wrap is turned on and the text is taller than the cell height. * combined height check with width check * fix: enable AutoScroll with SortableJS for column reordering, fixes #735 (#736) * fix: enable AutoScroll with SortableJS for column reordering, fixes #735 * chore: add auto-scroll comment for clarity * chore(ci): run Cypress on the `next` branch as well as `main` * feat(plugin): convert slick.autotooltips to vanillaJS (#745) - remove jQuery from plugin and also in the autotooltip example as well * chore: fix some UI issues in draggable grouping plugin * feat(plugins): convert copy manager plugins to vanillaJS (#746) * feat(plugins): remove jQuery from slick.customtooltip plugin (#747) * feat(plugins): remove jQuery from header buttons/menus plugins (#748) * chore: apply better code styling to few core files (#749) * chore: apply better code styling to few core files * feat(plugins): remove jQuery from ColumnPicker & GridMenu controls (#752) * feat(plugins): remove jQuery from ColumnPicker & GridMenu controls * tests: use input checked property instead of attr checked - the previous code with `attr('checked')` was jQuery oriented and we are going away from jQuery * feat(plugins): remove jQuery from CellMenu & ContextMenu plugins (#753) * feat(plugins): remove jQuery from range decorator selection model (#754) * feat(plugins): remove jQuery from range decorator selection model * feat(plugins): remove jQuery from CheckboxSelectColumn plugins (#755) * feat(plugins): remove jQuery from RowMove plugins (#756) * feat(plugins): remove jQuery from Grid State plugin (#757) * feat(plugins): remove jQuery from Grid Resizer plugin (#758) * chore: remove Map polyfill since we will target ES6 (#759) - Slick.Map polyfill is no longer required since Map is included in ES6 browsers * feat(plugins): remove jQuery from Row Detail plugin (#760) * Correct some instances of migration from $.each() to iteration (return needs to become continue) * chore: remove eval & grep utils and replace with simple ES6 filter * fix: filter header row should follow grid scroll * feat(controls): remove jQuery from Slick Pager control (#762) * fix: scrolling for all containers should work for regular & frozen grids * fix: add missing aria accessibility (#764) - closes #586, #587, #588 and #678 * chore: filling the window should be used with slick.resizer, closes #515 * chore: migrate more examples to vanilla JS with DOMContentLoaded * chore: convert html template to pure DOM create element with JS (#766) * chore: remove jQuery from all possible examples (#767) * chore: fix html code showing up in column picker & grid menu picker (#768) * fix(core): set wheel/touch listeners to passive for better perf (#769) - this fixes warnings shown in Chrome and other browser console mentioning that we should consider using `passive` event listeners - also uses a polyfill in case the `passive` option is not supported (for example IE) * chore: better use of DOM element creation and innerHTML (#770) - also remove `passive` mode to certain events that use preventDefault since that is not compatible with `passive` mode * chore: remove jQuery from lib folder, replace with CDN (#771) * Bugfix/example issues fixes (#772) * fix: found a few small issues while testing examples with jQuery CDN * fix: throw error when freezing columns are wider than canvas (#773) - closes #667 - freezing columns cannot be wider than the actual grid canvas because when that happens, the viewport scroll becomes hidden behind the canvas... so let's throw an error advising the user to make adjustments * fix: toggling frozen rows should recalc scroll height, closes #737 (#774) - when changing frozen rows via `setOptions`, it should recalculate each viewports (top/bottom) - the previous code skipped scroll height recalculation and that caused the issue identified in #737 * feat: Enable hidden property for column. Adds example-column-hidden, method… (#765) * Enable hidden property for column. Adds example-column-hidden, method getVisibleColumns() and alternate method updateColumns() calling event onBeforeUpdateColumns() for when a hidden property has changed but the column list itself has not changed. * remove jQuery from example and add frozen rows/hidden cols example * final changes: add frozen columns example, fix issue with hidden columns on frozen grid boundary, fix gridmenu control to work with .hidden flag on columns) * changes as suggested in #765 * feat: remove legacy TreeColumns code - now unused (#775) * remove legacy treecolumns code - now unused * fix typo and add back apparently unnecessary call to setcolumns() which does in fact do crucial refreshing of grid structure * chore: fix a small editor problem with percent editor * chore(release): publish version 4.0.0-beta.0 * chore: add migration guide to v4.0 link in changelog * chore: remove jQuery from Example 4 --------- Co-authored-by: Marko B. Ludolph Co-authored-by: tr4npt Co-authored-by: Ben McIntyre --- .editorconfig | 10 + .eslintrc | 17 +- CHANGELOG.md | 35 + controls/slick.columnpicker.js | 201 +- controls/slick.gridmenu.js | 413 +- controls/slick.pager.js | 285 +- .../example-0070-plugin-state.spec.js | 114 + .../example-checkbox-row-select.spec.js | 100 + .../example-draggable-grouping.spec.js | 371 +- ...le-frozen-columns-and-column-group.spec.js | 18 - cypress/integration/example-grid-menu.spec.js | 6 +- .../example-multi-grid-basic.spec.js | 16 +- .../example-plugin-contextmenu.spec.js | 15 +- .../example-plugin-custom-tooltip.spec.js | 26 +- .../example-plugin-headerbuttons.spec.js | 35 +- .../integration/example15-auto-resize.spec.js | 47 + cypress/support/commands.js | 16 +- dist/controls/slick.columnpicker.min.js | 6 +- dist/controls/slick.gridmenu.min.js | 6 +- dist/controls/slick.pager.min.js | 6 +- dist/plugins/slick.autotooltips.min.js | 6 +- dist/plugins/slick.cellcopymanager.min.js | 6 +- .../slick.cellexternalcopymanager.min.js | 6 +- dist/plugins/slick.cellmenu.min.js | 6 +- dist/plugins/slick.cellrangedecorator.min.js | 6 +- dist/plugins/slick.cellrangeselector.min.js | 6 +- dist/plugins/slick.cellselectionmodel.min.js | 6 +- .../plugins/slick.checkboxselectcolumn.min.js | 6 +- dist/plugins/slick.contextmenu.min.js | 6 +- .../slick.crossgridrowmovemanager.min.js | 6 +- dist/plugins/slick.customtooltip.min.js | 6 +- dist/plugins/slick.draggablegrouping.min.css | 2 +- dist/plugins/slick.draggablegrouping.min.js | 6 +- dist/plugins/slick.headerbuttons.min.js | 6 +- dist/plugins/slick.headermenu.min.js | 6 +- dist/plugins/slick.resizer.min.js | 6 +- dist/plugins/slick.rowdetailview.min.js | 6 +- dist/plugins/slick.rowmovemanager.min.js | 6 +- dist/plugins/slick.rowselectionmodel.min.js | 6 +- dist/plugins/slick.state.min.js | 6 +- dist/slick-default-theme.min.css | 2 +- dist/slick.compositeeditor.min.js | 6 +- dist/slick.core.min.js | 6 +- dist/slick.dataview.min.js | 6 +- dist/slick.editors.min.js | 6 +- dist/slick.formatters.min.js | 6 +- dist/slick.grid.min.js | 6 +- dist/slick.groupitemmetadataprovider.min.js | 6 +- dist/slick.interactions.min.js | 6 +- dist/slick.remotemodel-yahoo.min.js | 4 +- dist/slick.remotemodel.min.js | 4 +- examples/example-0070-plugin-state.html | 18 +- .../example-auto-scroll-when-dragging.html | 31 +- examples/example-autocomplete-editor.html | 6 +- examples/example-autotooltips.html | 54 +- examples/example-bootstrap-3-header.html | 7 +- examples/example-checkbox-header-row.html | 70 +- examples/example-checkbox-row-select.html | 23 +- examples/example-colspan.html | 5 +- examples/example-column-group.html | 100 +- examples/example-column-hidden.html | 307 + ...example-composite-editor-item-details.html | 8 +- ...example-composite-editor-modal-dialog.html | 204 +- ...example-custom-column-value-extractor.html | 5 +- examples/example-drag-row-between-grids.html | 15 +- examples/example-draggable-grouping.html | 51 +- ...ple-dynamic-filtered-with-jquery-tabs.html | 62 +- .../example-dynamic-with-jquery-tabs.html | 20 +- ...excel-compatible-spreadsheet-dataview.html | 30 +- .../example-excel-compatible-spreadsheet.html | 30 +- examples/example-explicit-initialization.html | 16 +- examples/example-external-headersort.html | 77 +- examples/example-footer-totals.html | 11 +- ...n-columns-and-column-group-hidden-col.html | 230 + ...ample-frozen-columns-and-column-group.html | 48 +- ...e-frozen-columns-and-rows-spreadsheet.html | 9 +- examples/example-frozen-columns-and-rows.html | 146 +- .../example-frozen-columns-autoheight.html | 1 - examples/example-frozen-columns-large.html | 58 +- examples/example-frozen-columns-tabs.html | 6 +- examples/example-frozen-columns.html | 61 +- examples/example-frozen-row-reordering.html | 2 +- examples/example-frozen-rows.html | 97 +- examples/example-grid-menu.html | 37 +- .../example-grouping-checkbox-row-select.html | 20 +- examples/example-grouping-groupcolumn.html | 23 +- examples/example-grouping.html | 29 +- examples/example-header-row.html | 30 +- examples/example-html-sanitizer.html | 7 +- examples/example-jquery-accordion.html | 10 +- examples/example-multi-column-sort.html | 3 +- ...e-multi-column-tristate-numbered-sort.html | 5 +- examples/example-multi-grid-basic.html | 11 +- examples/example-multiselect-editor.html | 28 +- examples/example-optimizing-dataview.html | 10 +- examples/example-optimizing-updates.html | 45 +- examples/example-plugin-contextmenu.html | 16 +- examples/example-plugin-custom-tooltip.html | 52 +- examples/example-plugin-headerbuttons.html | 43 +- examples/example-plugin-headermenu.html | 8 +- ...example-row-detail-selection-and-move.html | 11 +- examples/example-select2-editor.html | 14 +- .../example-select2-multiselect-editor.html | 14 +- examples/example-size-to-content.html | 169 +- examples/example-spreadsheet.html | 7 +- .../example-totals-via-data-provider.html | 7 +- examples/example1-simple.html | 28 +- examples/example10-async-post-render.html | 4 +- .../example10a-async-post-render-cleanup.html | 2 +- examples/example11-autoheight.html | 1 - examples/example12-fillbrowser.html | 7 +- examples/example13-getItem-sorting.html | 3 +- examples/example14-highlighting.html | 5 +- examples/example15-auto-resize.html | 7 +- examples/example16-row-detail.html | 45 +- .../example17-row-detail-many-columns.html | 64 +- examples/example2-formatters-event.html | 27 +- examples/example2-formatters.html | 6 +- examples/example3-editing.html | 11 +- examples/example3a-compound-editors.html | 45 +- examples/example3b-editing-with-undo.html | 3 - examples/example4-model.html | 57 +- .../example5-collapsing-treeGrid-sort.html | 50 +- examples/example5-collapsing.html | 209 +- examples/example6-ajax-loading-yahoo.html | 6 +- examples/example6-ajax-loading.html | 6 +- examples/example7-events.html | 27 +- examples/example8-alternative-display.html | 5 +- examples/example9-row-reordering-simple.html | 11 +- examples/example9-row-reordering.html | 2 +- lib/jquery-3.1.0.js | 10074 ---------- lib/jquery-migrate-1.2.1.min.js | 2 - lib/jquery-ui-1.11.3.js | 16608 ---------------- lib/jquery-ui-1.11.3.min.js | 13 - lib/jquery-ui.min.js | 13 - lib/jquery.jsonp-license.txt | 20 + lib/jquery.sparkline-license.txt | 2 + package-lock.json | 2303 ++- package.json | 30 +- plugins/slick.autotooltips.js | 56 +- plugins/slick.cellcopymanager.js | 10 +- plugins/slick.cellexternalcopymanager.js | 74 +- plugins/slick.cellmenu.js | 427 +- plugins/slick.cellrangedecorator.js | 42 +- plugins/slick.cellrangeselector.js | 76 +- plugins/slick.cellselectionmodel.js | 17 +- plugins/slick.checkboxselectcolumn.js | 161 +- plugins/slick.contextmenu.js | 407 +- plugins/slick.crossgridrowmovemanager.js | 86 +- plugins/slick.customtooltip.js | 23 +- plugins/slick.draggablegrouping.css | 1 + plugins/slick.draggablegrouping.js | 385 +- plugins/slick.headerbuttons.js | 55 +- plugins/slick.headermenu.js | 181 +- plugins/slick.resizer.js | 124 +- plugins/slick.rowdetailview.js | 28 +- plugins/slick.rowmovemanager.js | 85 +- plugins/slick.rowselectionmodel.js | 20 +- plugins/slick.state.js | 73 +- slick.compositeeditor.js | 74 +- slick.core.js | 804 +- slick.dataview.js | 66 +- slick.editors.js | 570 +- slick.formatters.js | 20 +- slick.grid.js | 2872 ++- slick.groupitemmetadataprovider.js | 29 +- slick.interactions.js | 34 +- tests/40 grids on a page test.html | 10 +- tests/dataview/index.html | 6 +- tests/grid/index.html | 10 +- tests/init benchmark.html | 4 +- tests/model benchmarks.html | 2 +- tests/plugins/autotooltips.html | 8 +- tests/plugins/cellrangedecorator.html | 2 +- tests/plugins/cellrangeselector.html | 2 +- tests/plugins/cellselectionmodel.html | 2 +- tests/scrolling benchmark raf.html | 6 +- tests/scrolling benchmarks.html | 4 +- tests/test-4-rows-paging.html | 4 +- 179 files changed, 7731 insertions(+), 33149 deletions(-) create mode 100644 .editorconfig create mode 100644 cypress/integration/example-0070-plugin-state.spec.js create mode 100644 cypress/integration/example-checkbox-row-select.spec.js create mode 100644 cypress/integration/example15-auto-resize.spec.js create mode 100644 examples/example-column-hidden.html create mode 100644 examples/example-frozen-columns-and-column-group-hidden-col.html delete mode 100644 lib/jquery-3.1.0.js delete mode 100644 lib/jquery-migrate-1.2.1.min.js delete mode 100644 lib/jquery-ui-1.11.3.js delete mode 100644 lib/jquery-ui-1.11.3.min.js delete mode 100644 lib/jquery-ui.min.js create mode 100644 lib/jquery.jsonp-license.txt create mode 100644 lib/jquery.sparkline-license.txt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..d805659f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = false +trim_trailing_whitespace = true diff --git a/.eslintrc b/.eslintrc index 053432d7..0f2940f2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,13 +1,22 @@ { - "extends": "eslint:recommended", + "extends": [ + "eslint:recommended", + "plugin:cypress/recommended" + ], "env": { - "browser": true + "browser": true, + "es6": true, + "node": true }, "globals": { - "jQuery": true, - "Slick": true + "flatpickr": true, + "Slick": true, + "Sortable": true }, "rules": { + "cypress/no-unnecessary-waiting": "off", + "cypress/unsafe-to-chain-command": "off", + "no-cond-assign": "off", "no-prototype-builtins": [0] } } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e245b983..88d486db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.0](https://github.com/6pac/SlickGrid/compare/3.0.4...4.0.0-beta.0) (2023-05-17) + +### Please read the [Migration Guide v4.0](https://github.com/6pac/SlickGrid/wiki/Major-version-4.0---Removal-of-jQuery-requirement) +--- +### Bug Fixes + +* add missing aria accessibility ([#764](https://github.com/6pac/SlickGrid/issues/764)) ([897cc55](https://github.com/6pac/SlickGrid/commit/897cc55441625ab1bd3dd556c7c54d4796ce5f1d)), closes [#586](https://github.com/6pac/SlickGrid/issues/586) [#587](https://github.com/6pac/SlickGrid/issues/587) [#588](https://github.com/6pac/SlickGrid/issues/588) [#678](https://github.com/6pac/SlickGrid/issues/678) +* addresses all issues found in jQuery removal previous PR [#734](https://github.com/6pac/SlickGrid/issues/734) ([#742](https://github.com/6pac/SlickGrid/issues/742)) ([b3a6575](https://github.com/6pac/SlickGrid/commit/b3a6575bd913f5b8aa0c81dfe88b71519a7a846e)) +* **core:** set wheel/touch listeners to passive for better perf ([#769](https://github.com/6pac/SlickGrid/issues/769)) ([b62e25d](https://github.com/6pac/SlickGrid/commit/b62e25d537c9a6cfb8b2004ad898b6bb0635dfd8)) +* dist source map file naming was incorrect ([#730](https://github.com/6pac/SlickGrid/issues/730)) ([aa4093a](https://github.com/6pac/SlickGrid/commit/aa4093a2b1d2afa791a645c65518fb2c35f50204)) +* enable AutoScroll with SortableJS for column reordering, fixes [#735](https://github.com/6pac/SlickGrid/issues/735) ([#736](https://github.com/6pac/SlickGrid/issues/736)) ([2c56433](https://github.com/6pac/SlickGrid/commit/2c5643313f7379877d4e4320bbe7b9de9585438c)) +* filter header row should follow grid scroll ([98aeb9b](https://github.com/6pac/SlickGrid/commit/98aeb9b9b19ca2972af214629c62efc20330b5a0)) +* scrolling for all containers should work for regular & frozen grids ([2405fe6](https://github.com/6pac/SlickGrid/commit/2405fe62b970eb84e5f24f7f5fbcb3f7b3469c78)) +* throw error when freezing columns are wider than canvas ([#773](https://github.com/6pac/SlickGrid/issues/773)) ([bc60d8a](https://github.com/6pac/SlickGrid/commit/bc60d8ac4c9ab7fffbc38420e8a6c5b7234830dd)), closes [#667](https://github.com/6pac/SlickGrid/issues/667) +* toggling frozen rows should recalc scroll height, closes [#737](https://github.com/6pac/SlickGrid/issues/737) ([#774](https://github.com/6pac/SlickGrid/issues/774)) ([46db491](https://github.com/6pac/SlickGrid/commit/46db4914c19dd3c6789aaeed22cda91664a415fa)) + +### Features + +* **controls:** remove jQuery from Slick Pager control ([#762](https://github.com/6pac/SlickGrid/issues/762)) ([ed0507b](https://github.com/6pac/SlickGrid/commit/ed0507bff30dc28f6e8b3f3ee7bf0f7339fd2282)) +* Enable hidden property for column. Adds example-column-hidden, method… ([#765](https://github.com/6pac/SlickGrid/issues/765)) ([78540ef](https://github.com/6pac/SlickGrid/commit/78540ef2339dc3d47ca2faba78b7be3963e14ad0)) +* **plugin:** convert slick.autotooltips to vanillaJS ([#745](https://github.com/6pac/SlickGrid/issues/745)) ([133d783](https://github.com/6pac/SlickGrid/commit/133d783d508e8c55d0b8196b90725079164e986d)) +* **plugins:** convert copy manager plugins to vanillaJS ([#746](https://github.com/6pac/SlickGrid/issues/746)) ([47b571d](https://github.com/6pac/SlickGrid/commit/47b571d1fc376af01cb895d19f42205c8a34ddca)) +* **plugins:** convert slick.draggablegrouping to vanillaJS ([#744](https://github.com/6pac/SlickGrid/issues/744)) ([59b0d2e](https://github.com/6pac/SlickGrid/commit/59b0d2e9f2ad549bb67982289b6c27862bab9ee1)) +* **plugins:** remove jQuery from CellMenu & ContextMenu plugins ([#753](https://github.com/6pac/SlickGrid/issues/753)) ([c4671be](https://github.com/6pac/SlickGrid/commit/c4671be7385b8bac8fdfb82769f726bf8705bf84)) +* **plugins:** remove jQuery from CheckboxSelectColumn plugins ([#755](https://github.com/6pac/SlickGrid/issues/755)) ([57160af](https://github.com/6pac/SlickGrid/commit/57160af7e5290730c0528f1cfebcaadae86820c3)) +* **plugins:** remove jQuery from ColumnPicker & GridMenu controls ([#752](https://github.com/6pac/SlickGrid/issues/752)) ([9ea0d9a](https://github.com/6pac/SlickGrid/commit/9ea0d9a7fa5a1c453e737a60cd0f1292f822ac3b)) +* **plugins:** remove jQuery from Grid Resizer plugin ([#758](https://github.com/6pac/SlickGrid/issues/758)) ([5deb818](https://github.com/6pac/SlickGrid/commit/5deb8188424f6cbc0876f4053c0dc5400212c70b)) +* **plugins:** remove jQuery from Grid State plugin ([#757](https://github.com/6pac/SlickGrid/issues/757)) ([aa8dc63](https://github.com/6pac/SlickGrid/commit/aa8dc63b3e6e635c6a6419d79a5a2a29e2b29762)) +* **plugins:** remove jQuery from header buttons/menus plugins ([#748](https://github.com/6pac/SlickGrid/issues/748)) ([58701c4](https://github.com/6pac/SlickGrid/commit/58701c4288744a1288b8cddbd9432b0d709ead30)) +* **plugins:** remove jQuery from range decorator selection model ([#754](https://github.com/6pac/SlickGrid/issues/754)) ([6724f1d](https://github.com/6pac/SlickGrid/commit/6724f1db8d2a013d999e563ffab9a35897a72afb)) +* **plugins:** remove jQuery from Row Detail plugin ([#760](https://github.com/6pac/SlickGrid/issues/760)) ([72e6139](https://github.com/6pac/SlickGrid/commit/72e61391147656151e22bc25abb583a0cba5cc89)) +* **plugins:** remove jQuery from RowMove plugins ([#756](https://github.com/6pac/SlickGrid/issues/756)) ([8c72373](https://github.com/6pac/SlickGrid/commit/8c72373e6bcab2f1972de9a774ec89bc0ed8c187)) +* **plugins:** remove jQuery from slick.customtooltip plugin ([#747](https://github.com/6pac/SlickGrid/issues/747)) ([aac6eec](https://github.com/6pac/SlickGrid/commit/aac6eecf99cfbbad7787cdbdfd95935955148fc2)) +* remove legacy TreeColumns code - now unused ([#775](https://github.com/6pac/SlickGrid/issues/775)) ([af82a57](https://github.com/6pac/SlickGrid/commit/af82a570ba79e796400fc1e2ba265ffe2dafd480)) + ## [3.0.4](https://github.com/6pac/SlickGrid/compare/3.0.3...3.0.4) (2023-02-15) ### Features diff --git a/controls/slick.columnpicker.js b/controls/slick.columnpicker.js index 124bc9b6..24049c9f 100644 --- a/controls/slick.columnpicker.js +++ b/controls/slick.columnpicker.js @@ -25,17 +25,18 @@ * @constructor */ -(function ($) { +(function (window) { 'use strict'; function SlickColumnPicker(columns, grid, options) { var _grid = grid; var _options = options; var _gridUid = (grid && grid.getUID) ? grid.getUID() : ''; - var $columnTitleElm; - var $list; - var $menu; + var _columnTitleElm; + var _listElm; + var _menuElm; var columnCheckboxes; var onColumnsChanged = new Slick.Event(); + var _bindingEventService = new Slick.BindingEventService(); var defaults = { fadeSpeed: 250, @@ -54,68 +55,94 @@ function init(grid) { grid.onHeaderContextMenu.subscribe(handleHeaderContextMenu); grid.onColumnsReordered.subscribe(updateColumnOrder); - _options = $.extend({}, defaults, options); - - $menu = $("