- * Create a in-memory div, set it's inner text(which jQuery automatically encodes)
+ * HTML encode using a plain
+ * Create a in-memory div, set it's inner text(which a div can encode)
* then grab the encoded contents back out. The div never exists on the page.
*/
export function htmlEncode(inputValue: string): string {
diff --git a/packages/common/src/services/filter.service.ts b/packages/common/src/services/filter.service.ts
index c0e5f76d7..32cba288f 100644
--- a/packages/common/src/services/filter.service.ts
+++ b/packages/common/src/services/filter.service.ts
@@ -1154,7 +1154,7 @@ export class FilterService {
// event might have been created as a CustomEvent (e.g. CompoundDateFilter), without being a valid Slick.EventData,
// if so we will create a new Slick.EventData and merge it with that CustomEvent to avoid having SlickGrid errors
- const eventData = ((event && typeof (event as SlickEventData).isPropagationStopped !== 'function') ? $.extend({}, new Slick.EventData(), event) : event) as SlickEventData;
+ const eventData = ((event && typeof (event as SlickEventData).isPropagationStopped !== 'function') ? Slick.Utils.extend({}, new Slick.EventData(), event) : event) as SlickEventData;
// trigger an event only if Filters changed or if ENTER key was pressed
const eventKey = (event as KeyboardEvent)?.key;
diff --git a/packages/common/src/services/resizer.service.ts b/packages/common/src/services/resizer.service.ts
index 679aba581..b280f8617 100644
--- a/packages/common/src/services/resizer.service.ts
+++ b/packages/common/src/services/resizer.service.ts
@@ -12,7 +12,7 @@ import type {
SlickGrid,
SlickNamespace,
} from '../interfaces/index';
-import { getHtmlElementOffset, sanitizeHtmlToText, } from '../services/index';
+import { BindingEventService, getInnerSize, getHtmlElementOffset, sanitizeHtmlToText, } from '../services/index';
import { parseFormatterWhenExist } from '../formatters/formatterUtilities';
// using external non-typed js libraries
@@ -26,14 +26,14 @@ const DEFAULT_INTERVAL_RETRY_DELAY = 200;
export class ResizerService {
protected _autoResizeOptions!: AutoResizeOption;
+ protected _bindingEventService: BindingEventService;
protected _grid!: SlickGrid;
protected _eventHandler: SlickEventHandler;
protected _fixedHeight?: number | string;
protected _fixedWidth?: number | string;
- protected _gridDomElm!: any;
- protected _gridContainerElm!: any;
- protected _pageContainerElm!: JQuery;
- protected _gridParentContainerElm!: HTMLElement;
+ protected _gridDomElm!: HTMLElement;
+ protected _gridContainerElm!: HTMLElement;
+ protected _pageContainerElm!: HTMLElement;
protected _intervalId!: NodeJS.Timeout;
protected _intervalRetryDelay = DEFAULT_INTERVAL_RETRY_DELAY;
protected _isStopResizeIntervalRequested = false;
@@ -80,6 +80,7 @@ export class ResizerService {
constructor(protected readonly pubSubService: BasePubSubService) {
this._eventHandler = new Slick.EventHandler();
+ this._bindingEventService = new BindingEventService();
}
/** Dispose function when service is destroyed */
@@ -92,24 +93,21 @@ export class ResizerService {
}
clearTimeout(this._timer);
- if (this.gridOptions.autoResize?.resizeDetection === 'container') {
- if (this._resizeObserver) {
- this._resizeObserver.disconnect();
- }
- } else {
- $(window).off(`resize.grid${this.gridUidSelector}`);
+ if (this.gridOptions.autoResize?.resizeDetection === 'container' && this._resizeObserver) {
+ this._resizeObserver.disconnect();
}
+ this._bindingEventService.unbindAll();
}
init(grid: SlickGrid, gridParentContainerElm: HTMLElement) {
if (!grid || !this.gridOptions || !gridParentContainerElm) {
throw new Error(`
[Slickgrid-Universal] Resizer Service requires a valid Grid object and DOM Element Container to be provided.
- You can fix this by setting your gridOption to use "enableAutoResize" or create an instance of the ResizerService by calling bindAutoResizeDataGrid()`);
+ You can fix this by setting your gridOption to use "enableAutoResize" or create an instance of the ResizerService by calling bindAutoResizeDataGrid() once.`);
}
this._grid = grid;
- this._gridParentContainerElm = gridParentContainerElm;
+ this._gridContainerElm = gridParentContainerElm;
const fixedGridSizes = (this.gridOptions?.gridHeight || this.gridOptions?.gridWidth) ? { height: this.gridOptions?.gridHeight, width: this.gridOptions?.gridWidth } : undefined;
this._autoResizeOptions = this.gridOptions?.autoResize ?? { container: 'grid1', bottomPadding: 0 };
@@ -117,16 +115,14 @@ export class ResizerService {
gridParentContainerElm.style.width = typeof fixedGridSizes.width === 'string' ? fixedGridSizes.width : `${fixedGridSizes.width}px`;
}
- const containerNode = grid?.getContainerNode?.() as HTMLDivElement;
- this._gridDomElm = $(containerNode);
+ this._gridDomElm = grid?.getContainerNode?.() as HTMLDivElement;
if (typeof this._autoResizeOptions.container === 'string') {
- this._pageContainerElm = $(this._autoResizeOptions.container);
+ this._pageContainerElm = typeof this._autoResizeOptions.container === 'string' ? document.querySelector(this._autoResizeOptions.container) as HTMLElement : this._autoResizeOptions.container;
} else {
- this._pageContainerElm = $(this._autoResizeOptions.container!);
+ this._pageContainerElm = this._autoResizeOptions.container!;
}
- this._gridContainerElm = $(gridParentContainerElm);
if (fixedGridSizes) {
this._fixedHeight = fixedGridSizes.height;
@@ -165,7 +161,7 @@ export class ResizerService {
*/
bindAutoResizeDataGrid(newSizes?: GridSize): null | void {
if (this.gridOptions.autoResize?.resizeDetection === 'container') {
- if (!this._pageContainerElm || !this._pageContainerElm[0]) {
+ if (!this._pageContainerElm || !this._pageContainerElm) {
throw new Error(`
[Slickgrid-Universal] Resizer Service requires a container when gridOption.autoResize.resizeDetection="container"
You can fix this by setting your gridOption.autoResize.container`);
@@ -173,10 +169,10 @@ export class ResizerService {
if (!this._resizeObserver) {
this._resizeObserver = new ResizeObserver(() => this.resizeObserverCallback());
}
- this._resizeObserver.observe(this._pageContainerElm[0]);
+ this._resizeObserver.observe(this._pageContainerElm);
} else {
// if we can't find the grid to resize, return without binding anything
- if (this._gridDomElm === undefined || this._gridDomElm.offset() === undefined) {
+ if (this._gridDomElm === undefined || getHtmlElementOffset(this._gridDomElm) === undefined) {
return null;
}
@@ -190,7 +186,7 @@ export class ResizerService {
// -- 2nd bind a trigger on the Window DOM element, so that it happens also when resizing after first load
// -- bind auto-resize to Window object only if it exist
- $(window).on(`resize.grid${this.gridUidSelector}`, this.handleResizeGrid.bind(this, newSizes));
+ this._bindingEventService.bind(window as any, 'resize', this.handleResizeGrid.bind(this, newSizes));
}
}
@@ -216,7 +212,9 @@ export class ResizerService {
*/
calculateGridNewDimensions(gridOptions: GridOption): GridSize | null {
const autoResizeOptions = gridOptions?.autoResize ?? {};
- if (!window || this._pageContainerElm === undefined || this._gridDomElm.offset() === undefined) {
+ const gridElmOffset = getHtmlElementOffset(this._gridDomElm);
+
+ if (!window || this._pageContainerElm === undefined || gridElmOffset === undefined) {
return null;
}
@@ -239,16 +237,15 @@ export class ResizerService {
// which DOM element are we using to calculate the available size for the grid?
if (autoResizeOptions.calculateAvailableSizeBy === 'container') {
// uses the container's height to calculate grid height without any top offset
- gridHeight = this._pageContainerElm.height() || 0;
+ gridHeight = getInnerSize(this._pageContainerElm, 'height') || 0;
} else {
// uses the browser's window height with its top offset to calculate grid height
gridHeight = window.innerHeight || 0;
- const coordOffsetTop = this._gridDomElm.offset();
- gridOffsetTop = (coordOffsetTop !== undefined) ? coordOffsetTop.top : 0;
+ gridOffsetTop = gridElmOffset?.top ?? 0;
}
const availableHeight = gridHeight - gridOffsetTop - bottomPadding;
- const availableWidth = this._pageContainerElm.width() || window.innerWidth || 0;
+ const availableWidth = getInnerSize(this._pageContainerElm, 'width') || window.innerWidth || 0;
const maxHeight = autoResizeOptions?.maxHeight;
const minHeight = autoResizeOptions?.minHeight ?? DATAGRID_MIN_HEIGHT;
const maxWidth = autoResizeOptions?.maxWidth;
@@ -333,7 +330,7 @@ export class ResizerService {
// calculate the available sizes with minimum height defined as a constant
const availableDimensions = this.calculateGridNewDimensions(this.gridOptions);
- if ((newSizes || availableDimensions) && this._gridDomElm.length > 0) {
+ if ((newSizes || availableDimensions) && this._gridDomElm) {
// get the new sizes, if new sizes are passed (not 0), we will use them else use available space
// basically if user passes 1 of the dimension, let say he passes just the height,
// we will use the height as a fixed height but the width will be resized by it's available space
@@ -342,22 +339,24 @@ export class ResizerService {
// apply these new height/width to the datagrid
if (!this.gridOptions.autoHeight) {
- this._gridDomElm.height(newHeight as string);
+ this._gridDomElm.style.height = `${newHeight}px`;
+ }
+ this._gridDomElm.style.width = `${newWidth}px`;
+ if (this._gridContainerElm) {
+ this._gridContainerElm.style.width = `${newWidth}px`;
}
- this._gridDomElm.width(newWidth as string);
- this._gridContainerElm.width(newWidth as string);
// resize the slickgrid canvas on all browser except some IE versions
// exclude all IE below IE11
// IE11 wants to be a better standard (W3C) follower (finally) they even changed their appName output to also have 'Netscape'
- if (new RegExp('MSIE [6-8]').exec(navigator.userAgent) === null && this._grid?.resizeCanvas && $(this._gridContainerElm)) {
+ if (new RegExp('MSIE [6-8]').exec(navigator.userAgent) === null && this._grid?.resizeCanvas && this._gridContainerElm) {
this._grid.resizeCanvas();
}
// also call the grid auto-size columns so that it takes available space when going bigger
if (this.gridOptions?.enableAutoSizeColumns && this._grid.autosizeColumns) {
// make sure that the grid still exist (by looking if the Grid UID is found in the DOM tree) to avoid SlickGrid error "missing stylesheet"
- if (this.gridUid && $(`${this.gridUidSelector}`).length > 0) {
+ if (this.gridUid && document.querySelector(this.gridUidSelector)) {
this._grid.autosizeColumns();
}
} else if (this.gridOptions.enableAutoResizeColumnsByCellContent && (!this._lastDimensions?.width || newWidth !== this._lastDimensions?.width)) {
@@ -394,7 +393,7 @@ export class ResizerService {
const columnWidths: { [columnId in string | number]: number; } = {};
let reRender = false;
let readItemCount = 0;
- const viewportWidth = this._gridParentContainerElm?.offsetWidth ?? 0;
+ const viewportWidth = this._gridContainerElm?.offsetWidth ?? 0;
// if our columns total width is smaller than the grid viewport, we can call the column autosize directly without the need to recalculate all column widths
if ((!Array.isArray(dataset) || dataset.length === 0) || (!recalculateColumnsTotalWidth && this._totalColumnsWidthByContent > 0 && this._totalColumnsWidthByContent < viewportWidth)) {
@@ -642,8 +641,8 @@ export class ResizerService {
const autoFixResizeTimeout = this.gridOptions?.autoFixResizeTimeout ?? (5 * 60 * 60); // interval is 200ms, so 4x is 1sec, so (4 * 60 * 60 = 60min)
const autoFixResizeRequiredGoodCount = this.gridOptions?.autoFixResizeRequiredGoodCount ?? 5;
- const headerElm = this._gridParentContainerElm.querySelector(`${this.gridUidSelector} .slick-header`);
- const viewportElm = this._gridParentContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);
+ const headerElm = this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-header`);
+ const viewportElm = this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);
let intervalExecutionCounter = 0;
let resizeGoodCount = 0;
@@ -669,7 +668,7 @@ export class ResizerService {
// if header row is Y coordinate 0 (happens when user is not in current Tab) or when header titles are lower than the viewport of dataset (this can happen when user change Tab and DOM is not shown)
// another resize condition could be that if the grid location is at coordinate x/y 0/0, we assume that it's in a hidden tab and we'll need to resize whenever that tab becomes active
// for these cases we'll resize until it's no longer true or until we reach a max time limit (70min)
- const containerElmOffset = getHtmlElementOffset(this._gridParentContainerElm);
+ const containerElmOffset = getHtmlElementOffset(this._gridContainerElm);
let isResizeRequired = (headerPos?.top === 0 || ((headerOffsetTop - viewportOffsetTop) > 2) || (containerElmOffset?.left === 0 && containerElmOffset?.top === 0)) ? true : false;
// another condition for a required resize is when the grid is hidden (not in current tab) then its "rightPx" rendered range will be 0px
diff --git a/packages/common/src/styles/_variables.scss b/packages/common/src/styles/_variables.scss
index 81c6defcb..82871096c 100644
--- a/packages/common/src/styles/_variables.scss
+++ b/packages/common/src/styles/_variables.scss
@@ -713,6 +713,7 @@ $slick-multiselect-input-filter-font-size: 12px !default;
$slick-multiselect-input-focus-border-color: $slick-input-focus-border-color !default;
$slick-multiselect-input-focus-box-shadow: $slick-input-focus-box-shadow !default;
$slick-multiselect-dropdown-border: 1px solid #bbb !default;
+$slick-multiselect-dropdown-list-padding: 4px 6px !default;
$slick-multiselect-dropdown-max-width: 250px !default;
$slick-multiselect-dropdown-z-index: 9999 !default;
$slick-multiselect-checkbox-margin-left: 0px !default;
@@ -743,13 +744,13 @@ $slick-multiselect-item-height: 26px !default;
$slick-multiselect-item-border: 1px solid transparent !default;
$slick-multiselect-item-hover-border: 1px solid #d5d5d5 !default;
$slick-multiselect-item-line-height: calc(#{$slick-multiselect-icon-font-size} + 2px) !default;
-$slick-multiselect-item-padding: 2px 6px !default;
+$slick-multiselect-item-padding: 2px 4px !default;
$slick-multiselect-unchecked-opacity: 0.6 !default;
$slick-multiselect-placeholder-bg-color: transparent !default;
$slick-multiselect-placeholder-color: $slick-editor-placeholder-color !default;
$slick-multiselect-placeholder-font-family: $slick-filter-placeholder-font-family !default;
$slick-multiselect-ok-button-bg-color: #fff !default;
-$slick-multiselect-ok-button-bg-hover-color: darken($slick-row-mouse-hover-color, 3%) !default;
+$slick-multiselect-ok-button-bg-hover-color: #f9f9f9 !default;
$slick-multiselect-ok-button-border-color: #ccc !default;
$slick-multiselect-ok-button-border-radius: 0 0 4px 4px !default;
$slick-multiselect-ok-button-border-width: 1px 0 0 0 !default;
@@ -765,10 +766,26 @@ $slick-multiselect-select-all-label-hover-border: $slick-multiselect-i
$slick-multiselect-select-all-label-hover-bg-color: $slick-multiselect-checkbox-hover-bg-color !default;
$slick-multiselect-select-all-label-padding: 4px !default;
$slick-multiselect-select-all-line-height: calc(#{$slick-multiselect-icon-font-size} + 2px) !default;
-$slick-multiselect-select-all-padding: 8px !default;
+$slick-multiselect-select-all-padding: 4px 6px !default;
$slick-multiselect-select-all-text-color: darken($slick-primary-color, 5%) !default;
$slick-multiselect-select-all-text-hover-color: transparent !default;
+// override some multiple-select SASS variables
+$ms-drop-list-padding: $slick-multiselect-dropdown-list-padding;
+$ms-drop-list-item-align-items: center;
+$ms-drop-list-item-display: flex;
+$ms-drop-list-item-padding: $slick-multiselect-item-padding;
+$ms-drop-hide-radio-selected-color: unset;
+$ms-drop-hide-radio-selected-bgcolor: unset;
+$ms-label-padding: $slick-multiselect-item-padding;
+$ms-ok-button-bg-hover-color: $slick-multiselect-ok-button-bg-hover-color;
+$ms-ok-button-text-color: $slick-multiselect-ok-button-text-color;
+$ms-ok-button-text-hover-color: $slick-multiselect-ok-button-text-hover-color;
+$ms-select-all-label-hover-border: $slick-multiselect-select-all-label-hover-border;
+$ms-select-all-label-padding: $slick-multiselect-select-all-padding;
+$ms-select-all-label-span-padding: $slick-multiselect-select-all-label-padding;
+$ms-select-all-text-color: $slick-multiselect-select-all-text-color;
+
/* pagination variables */
$slick-pagination-border-color: #ddd !default;
$slick-pagination-button-border-color: #acacac !default;
@@ -887,4 +904,7 @@ $slick-empty-data-warning-font-style: italic !default;
$slick-empty-data-warning-line-height: 18px !default;
$slick-empty-data-warning-margin: 0px !default;
$slick-empty-data-warning-padding: 8px !default;
-$slick-empty-data-warning-z-index: 10 !default;
\ No newline at end of file
+$slick-empty-data-warning-z-index: 10 !default;
+
+// import multiple-select SASS variables in order to override them
+@import 'multiple-select-vanilla/dist/styles/sass/multiple-select.scss';
\ No newline at end of file
diff --git a/packages/common/src/styles/multiple-select.png b/packages/common/src/styles/multiple-select.png
deleted file mode 100644
index b1282ce42..000000000
Binary files a/packages/common/src/styles/multiple-select.png and /dev/null differ
diff --git a/packages/common/src/styles/multiple-select.scss b/packages/common/src/styles/multiple-select.scss
deleted file mode 100644
index a2dcbd6f2..000000000
--- a/packages/common/src/styles/multiple-select.scss
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * @author zhixin wen
- */
-
-.ms-parent {
- display: inline-block;
- position: relative;
- vertical-align: middle;
-}
-
-.ms-choice {
- display: block;
- width: 100%;
- height: 26px;
- padding: 0;
- overflow: hidden;
- cursor: pointer;
- border: 1px solid #aaa;
- text-align: left;
- white-space: nowrap;
- line-height: 26px;
- color: #444;
- text-decoration: none;
- border-radius: 4px;
- background-color: #fff;
-}
-
-.ms-choice.disabled {
- background-color: #f4f4f4;
- background-image: none;
- border: 1px solid #ddd;
- cursor: default;
-}
-
-.ms-choice > span {
- position: absolute;
- top: 0;
- left: 0;
- right: 20px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: block;
- padding-left: 8px;
-}
-
-.ms-choice > span.placeholder {
- color: #999;
-}
-
-.ms-choice > div {
- position: absolute;
- top: 0;
- right: 0;
- width: 20px;
- height: 25px;
- background: url('multiple-select.png') left top no-repeat;
-}
-
-.ms-choice > div.open {
- background: url('multiple-select.png') right top no-repeat;
-}
-
-.ms-drop {
- width: 100%;
- overflow: hidden;
- display: none;
- margin-top: -1px;
- padding: 0;
- position: absolute;
- z-index: 1000;
- background: #fff;
- color: #000;
- border: 1px solid #aaa;
- border-radius: 4px;
-}
-
-.ms-drop.bottom {
- top: 100%;
- box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
-}
-
-.ms-drop.top {
- bottom: 100%;
- box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
-}
-
-.ms-search {
- display: inline-block;
- margin: 0;
- min-height: 26px;
- padding: 4px;
- position: relative;
- white-space: nowrap;
- width: 100%;
- z-index: 10000;
-}
-
-.ms-search input {
- width: 100%;
- height: auto !important;
- min-height: 24px;
- padding: 0 20px 0 5px;
- margin: 0;
- outline: 0;
- font-family: sans-serif;
- font-size: 1em;
- border: 1px solid #aaa;
- border-radius: 0;
- box-shadow: none;
- background: #fff url('multiple-select.png') no-repeat 100% -22px;
- background: url('multiple-select.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
- background: url('multiple-select.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
- background: url('multiple-select.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
- background: url('multiple-select.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
- background: url('multiple-select.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
- background: url('multiple-select.png') no-repeat 100% -22px, linear-gradient(to top, #ffffff 85%, #eeeeee 99%);
-}
-
-.ms-search, .ms-search input {
- box-sizing: border-box;
-}
-
-.ms-drop ul {
- overflow: auto;
- margin: 0;
- padding: 5px 8px;
-}
-
-.ms-drop ul > li {
- list-style: none;
- display: flex;
- align-items: center;
- background-image: none;
- position: static;
-}
-
-.ms-drop ul > li .disabled {
- opacity: .35;
- filter: Alpha(Opacity=35);
-}
-
-.ms-drop ul > li.multiple {
- display: block;
- float: left;
-}
-
-.ms-drop ul > li.group {
- clear: both;
-}
-
-.ms-drop ul > li.multiple label {
- width: 100%;
- display: block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.ms-drop ul > li label {
- font-weight: normal;
- display: block;
- white-space: nowrap;
-}
-
-.ms-drop ul > li label.optgroup {
- font-weight: bold;
-}
-
-.ms-drop input[type="checkbox"] {
- vertical-align: middle;
-}
-
-.ms-drop .ms-no-results {
- display: none;
-}
diff --git a/packages/common/src/styles/slick-plugins.scss b/packages/common/src/styles/slick-plugins.scss
index 590823538..e8d0e9f3d 100644
--- a/packages/common/src/styles/slick-plugins.scss
+++ b/packages/common/src/styles/slick-plugins.scss
@@ -1,5 +1,6 @@
/* sass variables */
@import './variables';
+@import 'multiple-select-vanilla/dist/styles/sass/multiple-select.scss';
// ----------------------------------------------
// Column Picker & Grid Menu Controls
diff --git a/packages/common/src/styles/slickgrid-theme-material.scss b/packages/common/src/styles/slickgrid-theme-material.scss
index e59e0a067..6dba99544 100644
--- a/packages/common/src/styles/slickgrid-theme-material.scss
+++ b/packages/common/src/styles/slickgrid-theme-material.scss
@@ -11,7 +11,6 @@
@import './roboto-font';
@import './flatpickr.min';
- @import './multiple-select';
@import './variables-theme-material';
@import './slick-without-bootstrap-min-styling';
diff --git a/packages/common/src/styles/slickgrid-theme-salesforce.scss b/packages/common/src/styles/slickgrid-theme-salesforce.scss
index b4494e8c2..cdbfc508c 100644
--- a/packages/common/src/styles/slickgrid-theme-salesforce.scss
+++ b/packages/common/src/styles/slickgrid-theme-salesforce.scss
@@ -10,7 +10,6 @@
*/
@import './flatpickr.min';
-@import './multiple-select';
@import './sass-utilities';
@import './variables-theme-salesforce';
diff --git a/packages/common/tsconfig.bundle.json b/packages/common/tsconfig.bundle.json
index 15c93b97b..511a0a712 100644
--- a/packages/common/tsconfig.bundle.json
+++ b/packages/common/tsconfig.bundle.json
@@ -9,7 +9,6 @@
"types": [
"jest",
"jest-extended",
- "jquery",
"node"
]
},
diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json
index 2958b3615..551249880 100644
--- a/packages/common/tsconfig.json
+++ b/packages/common/tsconfig.json
@@ -11,7 +11,6 @@
"types": [
"jest",
"jest-extended",
- "jquery",
"node"
]
},
diff --git a/packages/common/typings/typings.d.ts b/packages/common/typings/typings.d.ts
index 65ed24ef9..a4cfd3cc3 100644
--- a/packages/common/typings/typings.d.ts
+++ b/packages/common/typings/typings.d.ts
@@ -3,10 +3,6 @@ declare const module: NodeModule;
interface NodeModule {
id: string;
}
-interface jquery {
- tooltip(options?: any): any;
- tipsy(options?: any): any;
-}
interface window {
Slicker: any;
}
diff --git a/packages/composite-editor-component/CHANGELOG.md b/packages/composite-editor-component/CHANGELOG.md
index f3d069740..d96d30ee8 100644
--- a/packages/composite-editor-component/CHANGELOG.md
+++ b/packages/composite-editor-component/CHANGELOG.md
@@ -4,6 +4,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+### ⚠ BREAKING CHANGES
+
+* drop jQuery requirement (#962)
+
+### Features
+
+* drop jQuery requirement ([#962](https://github.com/ghiscoding/slickgrid-universal/issues/962)) ([3da21da](https://github.com/ghiscoding/slickgrid-universal/commit/3da21daacc391a0fb309fcddd78442642c5269f6)) - by @ghiscoding
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/composite-editor-component
diff --git a/packages/composite-editor-component/package.json b/packages/composite-editor-component/package.json
index cb6191ec5..37eee601c 100644
--- a/packages/composite-editor-component/package.json
+++ b/packages/composite-editor-component/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/composite-editor-component",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Slick Composite Editor Component - Vanilla Implementation of a Composite Editor Modal Window Component",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/composite-editor-component/src/slick-composite-editor.component.ts b/packages/composite-editor-component/src/slick-composite-editor.component.ts
index 3a64fad00..d72aee3ea 100644
--- a/packages/composite-editor-component/src/slick-composite-editor.component.ts
+++ b/packages/composite-editor-component/src/slick-composite-editor.component.ts
@@ -771,7 +771,7 @@ export class SlickCompositeEditorComponent implements ExternalResource {
const col = columns[colIndex];
if (col.editor && (!isWithMassUpdate || (isWithMassUpdate && col.internalColumnEditor?.massUpdate))) {
// we can check that the cell is really editable by checking the onBeforeEditCell event not returning false (returning undefined, null also mean it is editable)
- const isCellEditable = this.grid.onBeforeEditCell.notify({ row: rowIndex, cell: colIndex, item: dataContext, column: col, grid: this.grid, target: 'composite', compositeEditorOptions: this._compositeOptions });
+ const isCellEditable = this.grid.onBeforeEditCell.notify({ row: rowIndex, cell: colIndex, item: dataContext, column: col, grid: this.grid, target: 'composite', compositeEditorOptions: this._compositeOptions }).getReturnValue();
this.grid.setActiveCell(rowIndex, colIndex, false);
if (isCellEditable !== false) {
columnIndexWithEditor = colIndex;
diff --git a/packages/custom-footer-component/CHANGELOG.md b/packages/custom-footer-component/CHANGELOG.md
index f1de72cf2..456250d9c 100644
--- a/packages/custom-footer-component/CHANGELOG.md
+++ b/packages/custom-footer-component/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/custom-footer-component
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/custom-footer-component
diff --git a/packages/custom-footer-component/package.json b/packages/custom-footer-component/package.json
index e78958bcf..4e4f5b2d8 100644
--- a/packages/custom-footer-component/package.json
+++ b/packages/custom-footer-component/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/custom-footer-component",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Slick Custom Footer Component - Vanilla Implementation of a Custom Footer Component",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/custom-tooltip-plugin/CHANGELOG.md b/packages/custom-tooltip-plugin/CHANGELOG.md
index 2573d5eb8..562f074de 100644
--- a/packages/custom-tooltip-plugin/CHANGELOG.md
+++ b/packages/custom-tooltip-plugin/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/custom-tooltip-plugin
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/custom-tooltip-plugin
diff --git a/packages/custom-tooltip-plugin/package.json b/packages/custom-tooltip-plugin/package.json
index c9dba5aeb..aadd45fa3 100644
--- a/packages/custom-tooltip-plugin/package.json
+++ b/packages/custom-tooltip-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/custom-tooltip-plugin",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "A plugin to add Custom Tooltip when hovering a cell, it subscribes to the cell",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/empty-warning-component/CHANGELOG.md b/packages/empty-warning-component/CHANGELOG.md
index a5937ced7..b952cd614 100644
--- a/packages/empty-warning-component/CHANGELOG.md
+++ b/packages/empty-warning-component/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/empty-warning-component
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/empty-warning-component
diff --git a/packages/empty-warning-component/package.json b/packages/empty-warning-component/package.json
index f7a03344e..38ee67556 100644
--- a/packages/empty-warning-component/package.json
+++ b/packages/empty-warning-component/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/empty-warning-component",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Slick Empty Warning Component - Vanilla Implementation of an Empty Dataset Warning Component",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/event-pub-sub/CHANGELOG.md b/packages/event-pub-sub/CHANGELOG.md
index 0348060bc..38506e304 100644
--- a/packages/event-pub-sub/CHANGELOG.md
+++ b/packages/event-pub-sub/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/event-pub-sub
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/event-pub-sub
diff --git a/packages/event-pub-sub/package.json b/packages/event-pub-sub/package.json
index 643755c71..e7387c9c4 100644
--- a/packages/event-pub-sub/package.json
+++ b/packages/event-pub-sub/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/event-pub-sub",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Simple Vanilla Implementation of an Event PubSub Service to do simply publish/subscribe inter-communication while optionally providing data in the event",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/excel-export/CHANGELOG.md b/packages/excel-export/CHANGELOG.md
index 75bdae9ef..4ab877000 100644
--- a/packages/excel-export/CHANGELOG.md
+++ b/packages/excel-export/CHANGELOG.md
@@ -4,6 +4,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+### ⚠ BREAKING CHANGES
+
+* drop jQuery requirement (#962)
+
+### Features
+
+* drop jQuery requirement ([#962](https://github.com/ghiscoding/slickgrid-universal/issues/962)) ([3da21da](https://github.com/ghiscoding/slickgrid-universal/commit/3da21daacc391a0fb309fcddd78442642c5269f6)) - by @ghiscoding
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
### Bug Fixes
diff --git a/packages/excel-export/package.json b/packages/excel-export/package.json
index 763ab91ab..dabd1683b 100644
--- a/packages/excel-export/package.json
+++ b/packages/excel-export/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/excel-export",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Excel Export (xls/xlsx) Service.",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/excel-export/src/typings/typings.d.ts b/packages/excel-export/src/typings/typings.d.ts
index 65ed24ef9..a4cfd3cc3 100644
--- a/packages/excel-export/src/typings/typings.d.ts
+++ b/packages/excel-export/src/typings/typings.d.ts
@@ -3,10 +3,6 @@ declare const module: NodeModule;
interface NodeModule {
id: string;
}
-interface jquery {
- tooltip(options?: any): any;
- tipsy(options?: any): any;
-}
interface window {
Slicker: any;
}
diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md
index abda46347..f0a2398fa 100644
--- a/packages/graphql/CHANGELOG.md
+++ b/packages/graphql/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/graphql
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/graphql
diff --git a/packages/graphql/package.json b/packages/graphql/package.json
index bedc6bb1f..7f8131879 100644
--- a/packages/graphql/package.json
+++ b/packages/graphql/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/graphql",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "GraphQL Service to sync a grid with a GraphQL backend server",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/odata/CHANGELOG.md b/packages/odata/CHANGELOG.md
index 6436bdb8b..983ca686e 100644
--- a/packages/odata/CHANGELOG.md
+++ b/packages/odata/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/odata
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/odata
diff --git a/packages/odata/package.json b/packages/odata/package.json
index 84e5af185..f8e6b057f 100644
--- a/packages/odata/package.json
+++ b/packages/odata/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/odata",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Grid OData Service to sync a grid with an OData backend server",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/pagination-component/CHANGELOG.md b/packages/pagination-component/CHANGELOG.md
index 9735d58c4..a2fac6b38 100644
--- a/packages/pagination-component/CHANGELOG.md
+++ b/packages/pagination-component/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/pagination-component
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
### Bug Fixes
diff --git a/packages/pagination-component/package.json b/packages/pagination-component/package.json
index cd2d04fe6..3a165c9b2 100644
--- a/packages/pagination-component/package.json
+++ b/packages/pagination-component/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/pagination-component",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Slick Pagination Component - Vanilla Implementation of a Pagination Component",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/row-detail-view-plugin/CHANGELOG.md b/packages/row-detail-view-plugin/CHANGELOG.md
index 532f2f79f..daa0bcc52 100644
--- a/packages/row-detail-view-plugin/CHANGELOG.md
+++ b/packages/row-detail-view-plugin/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/row-detail-view-plugin
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/row-detail-view-plugin
diff --git a/packages/row-detail-view-plugin/package.json b/packages/row-detail-view-plugin/package.json
index f852ce61c..fc70d5aad 100644
--- a/packages/row-detail-view-plugin/package.json
+++ b/packages/row-detail-view-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/row-detail-view-plugin",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "SlickRowDetail plugin - A plugin to add Row Detail Panel",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/rxjs-observable/CHANGELOG.md b/packages/rxjs-observable/CHANGELOG.md
index 3f5b83099..092edde06 100644
--- a/packages/rxjs-observable/CHANGELOG.md
+++ b/packages/rxjs-observable/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
diff --git a/packages/rxjs-observable/package.json b/packages/rxjs-observable/package.json
index 37d8b402e..8bfbe441b 100644
--- a/packages/rxjs-observable/package.json
+++ b/packages/rxjs-observable/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/rxjs-observable",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "RxJS Observable Wrapper",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
@@ -55,10 +55,10 @@
],
"dependencies": {
"@slickgrid-universal/common": "workspace:~",
- "rxjs": ">=7.5.0"
+ "rxjs": "^7.8.1"
},
"devDependencies": {
"cross-env": "^7.0.3",
"npm-run-all2": "^6.0.5"
}
-}
+}
\ No newline at end of file
diff --git a/packages/text-export/CHANGELOG.md b/packages/text-export/CHANGELOG.md
index afe264390..965a93724 100644
--- a/packages/text-export/CHANGELOG.md
+++ b/packages/text-export/CHANGELOG.md
@@ -4,6 +4,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+**Note:** Version bump only for package @slickgrid-universal/text-export
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/text-export
diff --git a/packages/text-export/package.json b/packages/text-export/package.json
index 00c2509f6..108d80096 100644
--- a/packages/text-export/package.json
+++ b/packages/text-export/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/text-export",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Export to Text File (csv/txt) Service.",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md
index e7576c813..2eca18cfc 100644
--- a/packages/utils/CHANGELOG.md
+++ b/packages/utils/CHANGELOG.md
@@ -4,6 +4,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+### ⚠ BREAKING CHANGES
+
+* drop jQuery requirement (#962)
+* **common:** migrate to multiple-select-vanilla (#919)
+
+### Features
+
+* **common:** migrate to multiple-select-vanilla ([#919](https://github.com/ghiscoding/slickgrid-universal/issues/919)) ([bc74207](https://github.com/ghiscoding/slickgrid-universal/commit/bc74207e9b2ec46209e87b126e1fcff596c162af)) - by @ghiscoding
+* drop jQuery requirement ([#962](https://github.com/ghiscoding/slickgrid-universal/issues/962)) ([3da21da](https://github.com/ghiscoding/slickgrid-universal/commit/3da21daacc391a0fb309fcddd78442642c5269f6)) - by @ghiscoding
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/utils
diff --git a/packages/utils/package.json b/packages/utils/package.json
index cf74e9468..0f46e0a19 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/utils",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Common set of small utilities",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
@@ -54,7 +54,6 @@
"not dead"
],
"devDependencies": {
- "@types/jquery": "^3.5.16",
"cross-env": "^7.0.3",
"npm-run-all2": "^6.0.5"
}
diff --git a/packages/utils/src/utils.spec.ts b/packages/utils/src/utils.spec.ts
index 301385a18..e7b94d901 100644
--- a/packages/utils/src/utils.spec.ts
+++ b/packages/utils/src/utils.spec.ts
@@ -11,7 +11,7 @@ import {
hasData,
isEmptyObject,
isNumber,
- isPrimmitive,
+ isPrimitiveValue,
isObject,
isObjectEmpty,
parseBoolean,
@@ -171,34 +171,34 @@ describe('Service/Utilies', () => {
});
});
- describe('isPrimmitive method', () => {
+ describe('isPrimitiveValue method', () => {
it('should return True when input is undefined', () => {
- const result = isPrimmitive(undefined);
+ const result = isPrimitiveValue(undefined);
expect(result).toBeTrue();
});
it('should return True when input is null', () => {
- const result = isPrimmitive(null);
+ const result = isPrimitiveValue(null);
expect(result).toBeTrue();
});
it('should return True when input is a number', () => {
- const result = isPrimmitive(0);
+ const result = isPrimitiveValue(0);
expect(result).toBeTrue();
});
it('should return True when input is a string', () => {
- const result = isPrimmitive('');
+ const result = isPrimitiveValue('');
expect(result).toBeTrue();
});
it('should return False when input is an empty object', () => {
- const result = isPrimmitive({});
+ const result = isPrimitiveValue({});
expect(result).toBeFalsy();
});
it('should return False when input is a function', () => {
- const result = isPrimmitive(() => true);
+ const result = isPrimitiveValue(() => true);
expect(result).toBeFalsy();
});
});
diff --git a/packages/utils/src/utils.ts b/packages/utils/src/utils.ts
index df2e54b69..786cb64d6 100644
--- a/packages/utils/src/utils.ts
+++ b/packages/utils/src/utils.ts
@@ -209,7 +209,7 @@ export function isObject(item: any) {
* @param val
* @returns {boolean}
*/
-export function isPrimmitive(val: any) {
+export function isPrimitiveValue(val: any) {
return val === null || val === undefined || typeof val === 'boolean' || typeof val === 'number' || typeof val === 'string';
}
diff --git a/packages/vanilla-bundle/CHANGELOG.md b/packages/vanilla-bundle/CHANGELOG.md
index 965a8363a..c9d50574d 100644
--- a/packages/vanilla-bundle/CHANGELOG.md
+++ b/packages/vanilla-bundle/CHANGELOG.md
@@ -4,6 +4,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+### ⚠ BREAKING CHANGES
+
+* drop jQuery requirement (#962)
+
+### Features
+
+* drop jQuery requirement ([#962](https://github.com/ghiscoding/slickgrid-universal/issues/962)) ([3da21da](https://github.com/ghiscoding/slickgrid-universal/commit/3da21daacc391a0fb309fcddd78442642c5269f6)) - by @ghiscoding
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
**Note:** Version bump only for package @slickgrid-universal/vanilla-bundle
diff --git a/packages/vanilla-bundle/package.json b/packages/vanilla-bundle/package.json
index 6ab660f1c..1687f678e 100644
--- a/packages/vanilla-bundle/package.json
+++ b/packages/vanilla-bundle/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/vanilla-bundle",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Vanilla Slick Grid Bundle - Framework agnostic the output is to be used in vanilla JS/TS - Written in TypeScript and we also use Vite to bundle everything into a single JS file.",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
@@ -65,14 +65,12 @@
"@slickgrid-universal/utils": "workspace:~",
"dequal": "^2.0.3",
"flatpickr": "^4.6.13",
- "jquery": "^3.7.0",
- "slickgrid": "^3.0.4",
+ "slickgrid": "^4.0.0",
"sortablejs": "^1.15.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@slickgrid-universal/graphql": "workspace:~",
- "@types/jquery": "^3.5.16",
"@types/sortablejs": "^1.15.1",
"cross-env": "^7.0.3",
"npm-run-all2": "^6.0.5"
diff --git a/packages/vanilla-bundle/src/components/__tests__/slick-vanilla-grid.spec.ts b/packages/vanilla-bundle/src/components/__tests__/slick-vanilla-grid.spec.ts
index d87a5b9c3..52223279c 100644
--- a/packages/vanilla-bundle/src/components/__tests__/slick-vanilla-grid.spec.ts
+++ b/packages/vanilla-bundle/src/components/__tests__/slick-vanilla-grid.spec.ts
@@ -345,7 +345,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
expect(component.isGridInitialized).toBeTruthy();
});
- it('should load enable jquery mousewheel scrolling when using a frozen grid', () => {
+ it('should load enabled mousewheel scrolling when using a frozen grid', () => {
component.gridOptions.enableMouseWheelScrollHandler = undefined;
component.gridOptions.frozenRow = 3;
component.initialization(divContainer, slickEventHandler);
diff --git a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts
index 02c06d27d..26b7f089c 100644
--- a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts
+++ b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts
@@ -1,5 +1,4 @@
import { dequal } from 'dequal/lite';
-import 'jquery';
import 'flatpickr/dist/l10n/fr';
import 'slickgrid/slick.core';
import 'slickgrid/slick.interactions';
@@ -57,6 +56,7 @@ import {
TreeDataService,
// utilities
+ deepCopy,
emptyElement,
unsubscribeAll,
} from '@slickgrid-universal/common';
@@ -160,7 +160,7 @@ export class SlickVanillaGridBundle {
const prevDatasetLn = this._currentDatasetLength;
const isDatasetEqual = dequal(newDataset, this.dataset || []);
const isDeepCopyDataOnPageLoadEnabled = !!(this._gridOptions?.enableDeepCopyDatasetOnPageLoad);
- let data = isDeepCopyDataOnPageLoadEnabled ? $.extend(true, [], newDataset) : newDataset;
+ let data = isDeepCopyDataOnPageLoadEnabled ? deepCopy(newDataset || []) : newDataset;
// when Tree Data is enabled and we don't yet have the hierarchical dataset filled, we can force a convert+sort of the array
if (this.slickGrid && this.gridOptions?.enableTreeData && Array.isArray(newDataset) && (newDataset.length > 0 || newDataset.length !== prevDatasetLn || !isDatasetEqual)) {
@@ -223,7 +223,7 @@ export class SlickVanillaGridBundle {
// if we already have grid options, when grid was already initialized, we'll merge with those options
// else we'll merge with global grid options
if (this.slickGrid?.getOptions) {
- mergedOptions = $.extend(true, {}, this.slickGrid.getOptions(), options);
+ mergedOptions = Slick.Utils.extend(true, {}, this.slickGrid.getOptions(), options);
} else {
mergedOptions = this.mergeGridOptions(options);
}
@@ -366,7 +366,7 @@ export class SlickVanillaGridBundle {
this.groupingService = services?.groupingAndColspanService ?? new GroupingAndColspanService(this.extensionUtility, this._eventPubSubService);
if (hierarchicalDataset) {
- this.sharedService.hierarchicalDataset = (isDeepCopyDataOnPageLoadEnabled ? $.extend(true, [], hierarchicalDataset) : hierarchicalDataset) || [];
+ this.sharedService.hierarchicalDataset = (isDeepCopyDataOnPageLoadEnabled ? deepCopy(hierarchicalDataset || []) : hierarchicalDataset) || [];
}
const eventHandler = new Slick.EventHandler();
@@ -676,14 +676,14 @@ export class SlickVanillaGridBundle {
}
mergeGridOptions(gridOptions: GridOption) {
- const options = $.extend(true, {}, GlobalGridOptions, gridOptions);
+ const options = Slick.Utils.extend(true, {}, GlobalGridOptions, gridOptions);
// also make sure to show the header row if user have enabled filtering
if (options.enableFiltering && !options.showHeaderRow) {
options.showHeaderRow = options.enableFiltering;
}
- // using jQuery extend to do a deep clone has an unwanted side on objects and pageSizes but ES6 spread has other worst side effects
+ // using copy extend to do a deep clone has an unwanted side on objects and pageSizes but ES6 spread has other worst side effects
// so we will just overwrite the pageSizes when needed, this is the only one causing issues so far.
// jQuery wrote this on their docs:: On a deep extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not.
if (options?.pagination && (gridOptions.enablePagination || gridOptions.backendServiceApi) && gridOptions.pagination && Array.isArray(gridOptions.pagination.pageSizes)) {
diff --git a/packages/vanilla-force-bundle/CHANGELOG.md b/packages/vanilla-force-bundle/CHANGELOG.md
index d0c77c087..08e46b59a 100644
--- a/packages/vanilla-force-bundle/CHANGELOG.md
+++ b/packages/vanilla-force-bundle/CHANGELOG.md
@@ -4,6 +4,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [3.0.0-beta.0](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.4...v3.0.0-beta.0) (2023-05-20)
+
+### ⚠ BREAKING CHANGES
+
+* drop jQuery requirement (#962)
+
+### Features
+
+* drop jQuery requirement ([#962](https://github.com/ghiscoding/slickgrid-universal/issues/962)) ([3da21da](https://github.com/ghiscoding/slickgrid-universal/commit/3da21daacc391a0fb309fcddd78442642c5269f6)) - by @ghiscoding
+
## [2.6.4](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.3...v2.6.4) (2023-05-20)
### Bug Fixes
diff --git a/packages/vanilla-force-bundle/package.json b/packages/vanilla-force-bundle/package.json
index 8e7c0e677..f90683557 100644
--- a/packages/vanilla-force-bundle/package.json
+++ b/packages/vanilla-force-bundle/package.json
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/vanilla-force-bundle",
- "version": "2.6.4",
+ "version": "3.0.0-beta.0",
"description": "Vanilla Slick Grid Bundle (mostly exist for our Salesforce implementation) - Similar to Vanilla Bundle, the only difference is that it adds extra packages within its bundle (CustomTooltip, CompositeEditor & TextExport)",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
@@ -74,11 +74,9 @@
"@slickgrid-universal/text-export": "workspace:~",
"@slickgrid-universal/utils": "workspace:~",
"@slickgrid-universal/vanilla-bundle": "workspace:~",
- "jquery": "^3.7.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
- "@types/jquery": "^3.5.16",
"archiver": "^5.3.1",
"cross-env": "^7.0.3",
"esbuild": "^0.17.19",
diff --git a/packages/vanilla-force-bundle/src/vanilla-force-bundle.ts b/packages/vanilla-force-bundle/src/vanilla-force-bundle.ts
index e4d743e66..be13d26b5 100644
--- a/packages/vanilla-force-bundle/src/vanilla-force-bundle.ts
+++ b/packages/vanilla-force-bundle/src/vanilla-force-bundle.ts
@@ -1,6 +1,5 @@
-import {
+import type {
Column,
- GlobalGridOptions,
GridOption,
// services
BackendUtilityService,
@@ -16,10 +15,12 @@ import {
ResizerService,
RxJsFacade,
SharedService,
+ SlickNamespace,
SortService,
TranslaterService,
TreeDataService,
} from '@slickgrid-universal/common';
+import { GlobalGridOptions } from '@slickgrid-universal/common';
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
import { ExcelExportService } from '@slickgrid-universal/excel-export';
import { SlickCompositeEditorComponent } from '@slickgrid-universal/composite-editor-component';
@@ -30,6 +31,9 @@ import { SlickVanillaGridBundle, UniversalContainerService } from '@slickgrid-un
import { SalesforceGlobalGridOptions } from './salesforce-global-grid-options';
+// using external non-typed js libraries
+declare const Slick: SlickNamespace;
+
export class VanillaForceGridBundle extends SlickVanillaGridBundle {
slickCompositeEditor: SlickCompositeEditorComponent | undefined;
@@ -74,7 +78,7 @@ export class VanillaForceGridBundle extends SlickVanillaGridBundle {
mergeGridOptions(gridOptions: GridOption) {
const extraOptions = (gridOptions.useSalesforceDefaultGridOptions || (this._gridOptions?.useSalesforceDefaultGridOptions)) ? SalesforceGlobalGridOptions : {};
- const options = $.extend(true, {}, GlobalGridOptions, extraOptions, gridOptions);
+ const options = Slick.Utils.extend(true, {}, GlobalGridOptions, extraOptions, gridOptions);
// also make sure to show the header row if user have enabled filtering
if (options.enableFiltering && !options.showHeaderRow) {
diff --git a/packages/vanilla-force-bundle/vite.config.ts b/packages/vanilla-force-bundle/vite.config.ts
index c4dce0220..cccef2b66 100644
--- a/packages/vanilla-force-bundle/vite.config.ts
+++ b/packages/vanilla-force-bundle/vite.config.ts
@@ -13,14 +13,9 @@ export default defineConfig({
fileName: () => 'bundle/slickgrid-vanilla-bundle.js'
},
rollupOptions: {
- // external: ['jquery'],
output: {
minifyInternalExports: false,
// chunkFileNames: 'dist/bundle/[name].js',
- globals: {
- $: 'jquery',
- jQuery: 'jquery',
- },
},
},
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2b8b54368..c8c976f2a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -7,6 +7,10 @@ overrides:
importers:
.:
+ dependencies:
+ conventional-changelog-conventionalcommits:
+ specifier: ^5.0.0
+ version: 5.0.0
devDependencies:
'@4tw/cypress-drag-drop':
specifier: ^2.2.3
@@ -68,9 +72,6 @@ importers:
jest-extended:
specifier: ^3.2.4
version: 3.2.4(jest@29.5.0)
- jquery:
- specifier: ^3.7.0
- version: 3.7.0
jsdom:
specifier: ^22.0.0
version: 22.0.0
@@ -96,8 +97,8 @@ importers:
specifier: ^4.0.2
version: 4.0.2
slickgrid:
- specifier: ^3.0.4
- version: 3.0.4
+ specifier: ^4.0.0
+ version: 4.0.0
sortablejs:
specifier: ^1.15.0
version: 1.15.0
@@ -158,18 +159,18 @@ importers:
dompurify:
specifier: ^3.0.3
version: 3.0.3
+ fetch-jsonp:
+ specifier: ^1.2.3
+ version: 1.2.3
flatpickr:
specifier: ^4.6.13
version: 4.6.13
- jquery:
- specifier: ^3.7.0
- version: 3.7.0
moment-mini:
specifier: ^2.29.4
version: 2.29.4
- multiple-select-modified:
- specifier: ^1.3.17
- version: 1.3.17
+ multiple-select-vanilla:
+ specifier: ^0.3.1
+ version: 0.3.1
rxjs:
specifier: ^7.8.1
version: 7.8.1
@@ -183,9 +184,6 @@ importers:
'@types/fnando__sparkline':
specifier: ^0.3.4
version: 0.3.4
- '@types/jquery':
- specifier: ^3.5.16
- version: 3.5.16
'@types/moment':
specifier: ^2.13.0
version: 2.13.0
@@ -237,18 +235,15 @@ importers:
flatpickr:
specifier: ^4.6.13
version: 4.6.13
- jquery:
- specifier: ^3.7.0
- version: 3.7.0
moment-mini:
specifier: ^2.29.4
version: 2.29.4
- multiple-select-modified:
- specifier: ^1.3.17
- version: 1.3.17
+ multiple-select-vanilla:
+ specifier: ^0.3.1
+ version: 0.3.1
slickgrid:
- specifier: ^3.0.4
- version: 3.0.4
+ specifier: ^4.0.0
+ version: 4.0.0
sortablejs:
specifier: ^1.15.0
version: 1.15.0
@@ -259,9 +254,6 @@ importers:
'@types/dompurify':
specifier: ^3.0.2
version: 3.0.2
- '@types/jquery':
- specifier: ^3.5.16
- version: 3.5.16
'@types/sortablejs':
specifier: ^1.15.1
version: 1.15.1
@@ -471,8 +463,8 @@ importers:
specifier: workspace:~
version: link:../common
rxjs:
- specifier: '>=7.5.0'
- version: 7.5.6
+ specifier: ^7.8.1
+ version: 7.8.1
devDependencies:
cross-env:
specifier: ^7.0.3
@@ -505,9 +497,6 @@ importers:
packages/utils:
devDependencies:
- '@types/jquery':
- specifier: ^3.5.16
- version: 3.5.16
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -544,12 +533,9 @@ importers:
flatpickr:
specifier: ^4.6.13
version: 4.6.13
- jquery:
- specifier: ^3.7.0
- version: 3.7.0
slickgrid:
- specifier: ^3.0.4
- version: 3.0.4
+ specifier: ^4.0.0
+ version: 4.0.0
sortablejs:
specifier: ^1.15.0
version: 1.15.0
@@ -560,9 +546,6 @@ importers:
'@slickgrid-universal/graphql':
specifier: workspace:~
version: link:../graphql
- '@types/jquery':
- specifier: ^3.5.16
- version: 3.5.16
'@types/sortablejs':
specifier: ^1.15.1
version: 1.15.1
@@ -611,16 +594,10 @@ importers:
'@slickgrid-universal/vanilla-bundle':
specifier: workspace:~
version: link:../vanilla-bundle
- jquery:
- specifier: ^3.7.0
- version: 3.7.0
whatwg-fetch:
specifier: ^3.6.2
version: 3.6.2
devDependencies:
- '@types/jquery':
- specifier: ^3.5.16
- version: 3.5.16
archiver:
specifier: ^5.3.1
version: 5.3.1
@@ -2307,12 +2284,6 @@ packages:
pretty-format: 29.5.0
dev: true
- /@types/jquery@3.5.16:
- resolution: {integrity: sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==}
- dependencies:
- '@types/sizzle': 2.3.3
- dev: true
-
/@types/jsdom@20.0.0:
resolution: {integrity: sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==}
dependencies:
@@ -2773,7 +2744,6 @@ packages:
/array-ify@1.0.0:
resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==}
- dev: true
/array-includes@3.1.6:
resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==}
@@ -3415,7 +3385,6 @@ packages:
dependencies:
array-ify: 1.0.0
dot-prop: 5.3.0
- dev: true
/compress-commons@4.1.1:
resolution: {integrity: sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==}
@@ -3460,6 +3429,15 @@ packages:
q: 1.5.1
dev: true
+ /conventional-changelog-conventionalcommits@5.0.0:
+ resolution: {integrity: sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==}
+ engines: {node: '>=10'}
+ dependencies:
+ compare-func: 2.0.0
+ lodash: 4.17.21
+ q: 1.5.1
+ dev: false
+
/conventional-changelog-core@4.2.4:
resolution: {integrity: sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==}
engines: {node: '>=10'}
@@ -4027,7 +4005,6 @@ packages:
engines: {node: '>=8'}
dependencies:
is-obj: 2.0.0
- dev: true
/dotenv@16.0.3:
resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==}
@@ -4602,6 +4579,10 @@ packages:
web-streams-polyfill: 3.2.1
dev: true
+ /fetch-jsonp@1.2.3:
+ resolution: {integrity: sha512-C13k1o7R9JTN1wmhKkrW5bU/00LwixXnkufQUR6Rbf4KCS0i8mycQaovt4WVbHnA2NKgi7Ryp9Whpy/CGcij6Q==}
+ dev: false
+
/figures@3.2.0:
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
engines: {node: '>=8'}
@@ -5469,7 +5450,6 @@ packages:
/is-obj@2.0.0:
resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
engines: {node: '>=8'}
- dev: true
/is-path-inside@3.0.3:
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
@@ -6116,9 +6096,6 @@ packages:
- ts-node
dev: true
- /jquery@3.7.0:
- resolution: {integrity: sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==}
-
/js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
dev: true
@@ -6868,10 +6845,8 @@ packages:
minimatch: 3.1.2
dev: true
- /multiple-select-modified@1.3.17:
- resolution: {integrity: sha512-PbF++gNu4gIT0gYrlX82NXOVnw/Xz0M8ilVHVWRRDZgTsX/FBNeHg94pIM4mbsQ4JKO4ggSGLoYG4GheuUG2/Q==}
- dependencies:
- jquery: 3.7.0
+ /multiple-select-vanilla@0.3.1:
+ resolution: {integrity: sha512-HJy4bYAcSSYcvGei82lhjxvch4y3/ypC5J5+shss5Hnwnpumw/+Rz4jEHl805XnmqME2/WCa0rwxnQnvmDSurA==}
dev: false
/mute-stream@1.0.0:
@@ -8256,12 +8231,6 @@ packages:
queue-microtask: 1.2.3
dev: true
- /rxjs@7.5.6:
- resolution: {integrity: sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==}
- dependencies:
- tslib: 2.4.0
- dev: false
-
/rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
dependencies:
@@ -8445,10 +8414,9 @@ packages:
is-fullwidth-code-point: 3.0.0
dev: true
- /slickgrid@3.0.4:
- resolution: {integrity: sha512-0CY57mxZWJ5Y9XI29ogC4kIMQmyOIHSbmCefOnFFvVUsaI0yqKHfOC84TtGwCScxQfYWFM4AhvWBrae3ff3YZA==}
+ /slickgrid@4.0.0:
+ resolution: {integrity: sha512-Z3TMxPys1Ant60qtnD7aKRU9PtzPld8/KOSfZu3Wgb1IbxCu4so1XB3XTzQH8F5/9jc7iNQefaprQ5fkAYS36w==}
dependencies:
- jquery: 3.7.0
sortablejs: 1.15.0
/smart-buffer@4.2.0:
diff --git a/test/cypress/e2e/example02.cy.ts b/test/cypress/e2e/example02.cy.ts
index d7d0139a8..399496a82 100644
--- a/test/cypress/e2e/example02.cy.ts
+++ b/test/cypress/e2e/example02.cy.ts
@@ -84,11 +84,37 @@ describe('Example 02 - Grouping & Aggregators', { retries: 1 }, () => {
});
});
+ it('should change filter "Effort-Driven" to the null option and expect 176 items shown in the footer and also no label to show in the drop parent', () => {
+ cy.get('div.ms-filter.filter-effortDriven')
+ .trigger('click');
+
+ cy.get('.ms-drop')
+ .find('span:nth(0)')
+ .click();
+
+ cy.get('.grid2')
+ .find('.slick-custom-footer')
+ .find('.right-footer')
+ .should($span => {
+ const text = removeExtraSpaces($span.text()); // remove all white spaces
+ expect(text).to.eq(`Last Update ${moment().format('YYYY-MM-DD, hh:mm a')} | 176 of 500 items`);
+ });
+
+ cy.get('.ms-drop').should('contain', '');
+ });
+
it('should clear filters of grid2 using the Grid Menu "Clear all Filters" command', () => {
cy.get('.grid2')
.find('button.slick-grid-menu-button')
.trigger('click')
.click({ force: true });
+
+ cy.get(`.slick-grid-menu:visible`)
+ .find('.slick-menu-item')
+ .first()
+ .find('span')
+ .contains('Clear all Filters')
+ .click();
});
describe('Grouping Tests', () => {
@@ -121,6 +147,13 @@ describe('Example 02 - Grouping & Aggregators', { retries: 1 }, () => {
it('should "Group by Duration then Effort-Driven" and expect 1st row to be expanded, 2nd row to be collapsed and 3rd row to have group totals', () => {
cy.get('[data-test="group-duration-effort-btn"]').click();
+ cy.get('div.ms-filter.filter-effortDriven')
+ .trigger('click');
+
+ cy.get('.ms-drop')
+ .find('span:nth(2)')
+ .click();
+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"].slick-group-level-0 > .slick-cell:nth(0) .slick-group-toggle.expanded`).should('have.length', 1);
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"].slick-group-level-0 > .slick-cell:nth(0) .slick-group-title`).should('contain', 'Duration: 0');
diff --git a/test/cypress/e2e/example07.cy.ts b/test/cypress/e2e/example07.cy.ts
index ebb70df7e..24d87fb5b 100644
--- a/test/cypress/e2e/example07.cy.ts
+++ b/test/cypress/e2e/example07.cy.ts
@@ -658,7 +658,7 @@ describe('Example 07 - Row Move & Checkbox Selector Selector Plugins', { retries
.find('span:nth(2)')
.contains('Task 500');
- cy.get('[name=editor-prerequisites].ms-drop ul > li:nth(0)')
+ cy.get('[data-name=editor-prerequisites].ms-drop ul > li:nth(0)')
.click();
cy.get('.ms-ok-button')
@@ -688,6 +688,9 @@ describe('Example 07 - Row Move & Checkbox Selector Selector Plugins', { retries
cy.get('div.ms-filter.filter-prerequisites')
.trigger('click');
+ cy.get('.ms-drop > ul:visible')
+ .scrollTo('bottom');
+
cy.get('.ms-drop')
.contains(/^Task 3$/) // use regexp to avoid finding first Task 3 which is in fact Task 399
.click();
diff --git a/test/cypress/e2e/example09.cy.ts b/test/cypress/e2e/example09.cy.ts
index 52f473630..5ba906385 100644
--- a/test/cypress/e2e/example09.cy.ts
+++ b/test/cypress/e2e/example09.cy.ts
@@ -685,7 +685,7 @@ describe('Example 09 - OData Grid', { retries: 1 }, () => {
it('should change Gender filter to "female" and still expect previous sort (before the error) to still be in query', () => {
cy.get('.ms-filter.filter-gender:visible').click();
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible:nth(2)')
.contains('female')
.click();
diff --git a/test/cypress/e2e/example11.cy.ts b/test/cypress/e2e/example11.cy.ts
index c5ac54293..9ccaa14c2 100644
--- a/test/cypress/e2e/example11.cy.ts
+++ b/test/cypress/e2e/example11.cy.ts
@@ -310,6 +310,14 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
cy.get(`[style="top:${GRID_ROW_HEIGHT * 1}px"] > .slick-cell:nth(4)`).should($elm => expect(+$elm.text()).to.be.greaterThan(50));
cy.get(`[style="top:${GRID_ROW_HEIGHT * 2}px"] > .slick-cell:nth(4)`).should($elm => expect(+$elm.text()).to.be.greaterThan(50));
+ cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(7)`).click();
+ cy.get('[data-name="editor-completed"]')
+ .find('li.hide-radio.selected')
+ .find('input[data-name=selectItemeditor-completed][value=true]')
+ .should('exist');
+
+ cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(7)`).click();
+
cy.get('.selected-view').should('have.value', 'CustomViewTest');
});
@@ -782,4 +790,41 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
cy.get('[style="top:0px"]').should('have.length', 1);
cy.get('.grid-canvas-left > [style="top:0px"]').children().should('have.length', 11);
});
+
+ it('should filter the "Completed" column to True and expect only completed rows to be displayed', () => {
+ cy.get('div.ms-filter.filter-completed')
+ .trigger('click');
+
+ cy.get('.ms-drop')
+ .find('span:nth(1)')
+ .click();
+
+ cy.get('.grid11')
+ .find('.slick-custom-footer')
+ .find('.right-footer .item-count')
+ .should($span => {
+ expect(Number($span.text())).to.lt(50);
+ });
+ });
+
+ it('should filter the "Completed" column to the null option and expect 50 rows displayed', () => {
+ cy.get('div.ms-filter.filter-completed')
+ .trigger('click');
+
+ cy.get('.ms-drop')
+ .find('span:nth(0)')
+ .click();
+
+ cy.get('.filter-title.filled').should('exist');
+ cy.get('.filter-countryOfOrigin.filled').should('exist');
+ cy.get('.filter-completed.filled').should('not.exist');
+ cy.get('.search-filter.filter-completed .ms-choice').should('contain', '');
+
+ cy.get('.grid11')
+ .find('.slick-custom-footer')
+ .find('.right-footer .item-count')
+ .should($span => {
+ expect(Number($span.text())).to.eq(50);
+ });
+ });
});
diff --git a/test/cypress/e2e/example12.cy.ts b/test/cypress/e2e/example12.cy.ts
index d089090a1..24bf13f6c 100644
--- a/test/cypress/e2e/example12.cy.ts
+++ b/test/cypress/e2e/example12.cy.ts
@@ -334,7 +334,7 @@ describe('Example 12 - Composite Editor Modal', { retries: 1 }, () => {
cy.get('.item-details-container.editor-completed .modified').should('have.length', 1);
cy.get('.item-details-editor-container div.editor-complexity').click();
- cy.get('[name=editor-complexity].ms-drop > ul > li > label:nth(2)').contains('Straightforward').click();
+ cy.get('[data-name=editor-complexity].ms-drop > ul > li > label:nth(2)').contains('Straightforward').click();
cy.get('.item-details-container.editor-complexity .modified').should('have.length', 1);
cy.get('.item-details-container.editor-finish > .item-details-validation').contains('* You must provide a "Finish" date when "Completed" is checked.');
@@ -394,7 +394,7 @@ describe('Example 12 - Composite Editor Modal', { retries: 1 }, () => {
cy.get('.item-details-container.editor-completed .modified').should('have.length', 1);
cy.get('.item-details-editor-container div.editor-complexity').click();
- cy.get('[name=editor-complexity].ms-drop > ul > li > label:nth(2)').contains('Straightforward').click();
+ cy.get('[data-name=editor-complexity].ms-drop > ul > li > label:nth(2)').contains('Straightforward').click();
cy.get('.item-details-container.editor-complexity .modified').should('have.length', 1);
cy.get('.item-details-container.editor-finish > .item-details-validation').contains('* You must provide a "Finish" date when "Completed" is checked.');
diff --git a/test/cypress/e2e/example15.cy.ts b/test/cypress/e2e/example15.cy.ts
index f009ed051..b4afd196d 100644
--- a/test/cypress/e2e/example15.cy.ts
+++ b/test/cypress/e2e/example15.cy.ts
@@ -631,12 +631,12 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
const expectedOptions = ['', 'male', 'female'];
cy.get('.ms-filter.filter-gender:visible').click();
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible')
.should('have.length', 3);
- cy.get('[name="filter-gender"].ms-drop')
- .find('li:visible')
+ cy.get('[data-name="filter-gender"].ms-drop')
+ .find('li:visible span')
.each(($li, index) => expect($li.text()).to.eq(expectedOptions[index]));
cy.get('.grid15')
@@ -645,7 +645,7 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
});
it('should select "male" Gender and expect only 4 rows left in the grid', () => {
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible:nth(1)')
.contains('male')
.click();
@@ -655,20 +655,28 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
.should('have.length', 4);
});
- it('should be able to open "Gender" on the first row and expect to find 2 options the editor list (male, female)', () => {
+ it('should be able to open "Gender" on the first row and expect to find 2 options the editor list (male, female) and expect male to be selected', () => {
const expectedOptions = ['male', 'female'];
+ cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(0)`)
+ .click();
+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(2)`)
.should('contain', 'male')
.dblclick(); // use double-click since the 1st click will be catch by the row selection because we changed row
- cy.get('[name="editor-gender"].ms-drop')
+ cy.get('[data-name="editor-gender"].ms-drop')
.find('li:visible')
.should('have.length', 2);
- cy.get('[name="editor-gender"].ms-drop')
- .find('li:visible')
+ cy.get('[data-name="editor-gender"].ms-drop')
+ .find('li:visible span')
.each(($li, index) => expect($li.text()).to.eq(expectedOptions[index]));
+
+ cy.get('[data-name="editor-gender"]')
+ .find('li.hide-radio.selected')
+ .find('input[data-name=selectItemeditor-gender][value=male]')
+ .should('exist');
});
it('should click on "Add Other Gender via RxJS" button', () => {
@@ -684,17 +692,22 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
.should('contain', 'male')
.click();
- cy.get('[name="editor-gender"].ms-drop')
+ cy.get('[data-name="editor-gender"].ms-drop')
.find('li:visible')
.should('have.length', 3);
- cy.get('[name="editor-gender"].ms-drop')
- .find('li:visible')
+ cy.get('[data-name="editor-gender"].ms-drop')
+ .find('li:visible span')
.each(($li, index) => expect($li.text()).to.eq(expectedOptions[index]));
+
+ cy.get('[data-name="editor-gender"]')
+ .find('li.hide-radio.selected')
+ .find('input[data-name=selectItemeditor-gender][value=male]')
+ .should('exist');
});
it('should be able to change the Gender editor on the first row to the new option "other"', () => {
- cy.get('[name="editor-gender"].ms-drop')
+ cy.get('[data-name="editor-gender"].ms-drop')
.find('li:visible:nth(2)')
.contains('other')
.click();
@@ -704,17 +717,17 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
const expectedOptions = ['', 'male', 'female', 'other'];
cy.get('.ms-filter.filter-gender:visible').click();
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible')
.should('have.length', 4);
- cy.get('[name="filter-gender"].ms-drop')
- .find('li:visible')
+ cy.get('[data-name="filter-gender"].ms-drop')
+ .find('li:visible span')
.each(($li, index) => expect($li.text()).to.eq(expectedOptions[index]));
});
it('should choose "other" form the Gender filter and expect 1 row left in the grid', () => {
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible:nth(3)')
.contains('other')
.click();
@@ -752,7 +765,7 @@ describe('Example 15 - OData Grid using RxJS', { retries: 1 }, () => {
it('should change Gender filter to "female" and still expect previous sort (before the error) to still be in query', () => {
cy.get('.ms-filter.filter-gender:visible').click();
- cy.get('[name="filter-gender"].ms-drop')
+ cy.get('[data-name="filter-gender"].ms-drop')
.find('li:visible:nth(2)')
.contains('female')
.click();
diff --git a/test/cypress/e2e/example16.cy.ts b/test/cypress/e2e/example16.cy.ts
index 1e48b7af5..ee2424bf6 100644
--- a/test/cypress/e2e/example16.cy.ts
+++ b/test/cypress/e2e/example16.cy.ts
@@ -24,7 +24,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('@checkbox0-cell').trigger('mouseover');
cy.get('.slick-custom-tooltip').should('not.exist');
- cy.get('@checkbox0-cell').trigger('mouseleave');
+ cy.get('@checkbox0-cell').trigger('mouseout');
});
it('should mouse over Task 2 cell and expect async tooltip to show', () => {
@@ -43,7 +43,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(0)').contains('Ratio:');
cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(1)').contains(/\d+$/); // use regexp to make sure it's a number
- cy.get('@task1-cell').trigger('mouseleave');
+ cy.get('@task1-cell').trigger('mouseout');
});
it('should mouse over Task 6 cell and expect async tooltip to show', () => {
@@ -62,7 +62,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(0)').contains('Ratio:');
cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(1)').contains(/\d+$/); // use regexp to make sure it's a number
- cy.get('@task6-cell').trigger('mouseleave');
+ cy.get('@task6-cell').trigger('mouseout');
});
it('should mouse over Task 6 cell on "Start" column and expect a delayed tooltip opening via async process', () => {
@@ -87,7 +87,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(3)').find('div:nth(0)').contains('Completion:');
cy.get('.tooltip-2cols-row:nth(3)').find('div:nth(1)').find('.mdi-check-circle-outline').should('exist');
- cy.get('@start6-cell').trigger('mouseleave');
+ cy.get('@start6-cell').trigger('mouseout');
});
it('should mouse over 6th row Description and expect full cell content to show in a tooltip because cell has ellipsis and is too long for the cell itself', () => {
@@ -99,7 +99,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.slick-custom-tooltip').should('not.contain', `regular tooltip (from title attribute)\nTask 6 cell value:\n\nThis is a sample task description.\nIt can be multiline\n\nAnother line...`);
cy.get('.slick-custom-tooltip').should('contain', `This is a sample task description.\nIt can be multiline\n\nAnother line...`);
- cy.get('@desc6-cell').trigger('mouseleave');
+ cy.get('@desc6-cell').trigger('mouseout');
});
it('should mouse over 6th row Description 2 and expect regular tooltip title + concatenated full cell content when using "useRegularTooltipFromFormatterOnly: true"', () => {
@@ -110,7 +110,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').should('contain', `regular tooltip (from title attribute)\nTask 6 cell value:\n\nThis is a sample task description.\nIt can be multiline\n\nAnother line...`);
- cy.get('@desc2-5-cell').trigger('mouseleave');
+ cy.get('@desc2-5-cell').trigger('mouseout');
});
it('should mouse over 2nd row Duration and expect a custom tooltip shown with 4 label/value pairs displayed', () => {
@@ -133,7 +133,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(3)').find('div:nth(0)').contains('Completion:');
cy.get('.tooltip-2cols-row:nth(3)').find('div:nth(1)').find('.mdi-check-circle-outline').should('exist');
- cy.get('@duration2-cell').trigger('mouseleave');
+ cy.get('@duration2-cell').trigger('mouseout');
});
it('should mouse over % Complete cell of Task 6 and expect regular tooltip to show with content "x %" where x is a number', () => {
@@ -144,7 +144,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').contains(/\d+\%$/);
- cy.get('@percentage-cell').trigger('mouseleave');
+ cy.get('@percentage-cell').trigger('mouseout');
});
it('should mouse over Prerequisite cell of Task 6 and expect regular tooltip to show with content "Task 6, Task 5"', () => {
@@ -155,7 +155,7 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').should('contain', 'Task 6, Task 5');
- cy.get('@prereq-cell').trigger('mouseleave');
+ cy.get('@prereq-cell').trigger('mouseout');
});
it('should mouse over header-row (filter) 1st column checkbox and NOT expect any tooltip to show since it is disabled on that column', () => {
@@ -163,12 +163,12 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('@checkbox0-filter').trigger('mouseover');
cy.get('.slick-custom-tooltip').should('not.exist');
- cy.get('@checkbox0-filter').trigger('mouseleave');
+ cy.get('@checkbox0-filter').trigger('mouseout');
});
it('should mouse over header-row (filter) 2nd column Title and expect a tooltip to show rendered from an headerRowFormatter', () => {
cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(1)`).as('checkbox0-filter');
- cy.get('@checkbox0-filter').trigger('mouseover');
+ cy.get('@checkbox0-filter').trigger('mouseenter');
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').contains('Custom Tooltip - Header Row (filter)');
@@ -176,39 +176,39 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(0)').find('div:nth(0)').contains('Column:');
cy.get('.tooltip-2cols-row:nth(0)').find('div:nth(1)').contains('title');
- cy.get('@checkbox0-filter').trigger('mouseleave');
+ cy.get('@checkbox0-filter').trigger('mouseout');
});
it('should mouse over header-row (filter) Finish column and NOT expect any tooltip to show since it is disabled on that column', () => {
cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(8)`).as('finish-filter');
- cy.get('@finish-filter').trigger('mouseover');
+ cy.get('@finish-filter').trigger('mouseenter');
cy.get('.slick-custom-tooltip').should('not.exist');
- cy.get('@finish-filter').trigger('mouseleave');
+ cy.get('@finish-filter').trigger('mouseout');
});
it('should mouse over header-row (filter) Prerequisite column and expect to see tooltip of selected filter options', () => {
cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(10)`).as('checkbox10-header');
- cy.get('@checkbox10-header').trigger('mouseover');
+ cy.get('@checkbox10-header').trigger('mouseenter');
cy.get('.filter-prerequisites .ms-choice span').contains('15 of 500 selected');
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').contains('Task 1, Task 3, Task 5, Task 7, Task 9, Task 12, Task 15, Task 18, Task 21, Task 25, Task 28, Task 29, Task 30, Task 32, Task 34');
- cy.get('@checkbox10-header').trigger('mouseleave');
+ cy.get('@checkbox10-header').trigger('mouseout');
});
it('should mouse over header title on 1st column with checkbox and NOT expect any tooltip to show since it is disabled on that column', () => {
cy.get(`.slick-header-columns .slick-header-column:nth(0)`).as('checkbox-header');
- cy.get('@checkbox-header').trigger('mouseover');
+ cy.get('@checkbox-header').trigger('mouseenter');
cy.get('.slick-custom-tooltip').should('not.exist');
- cy.get('@checkbox-header').trigger('mouseleave');
+ cy.get('@checkbox-header').trigger('mouseout');
});
it('should mouse over header title on 2nd column with Title name and expect a tooltip to show rendered from an headerFormatter', () => {
cy.get(`.slick-header-columns .slick-header-column:nth(1)`).as('checkbox0-header');
- cy.get('@checkbox0-header').trigger('mouseover');
+ cy.get('@checkbox0-header').trigger('mouseenter');
cy.get('.slick-custom-tooltip').should('be.visible');
cy.get('.slick-custom-tooltip').contains('Custom Tooltip - Header');
@@ -216,14 +216,40 @@ describe('Example 16 - Regular & Custom Tooltips', { retries: 1 }, () => {
cy.get('.tooltip-2cols-row:nth(0)').find('div:nth(0)').contains('Column:');
cy.get('.tooltip-2cols-row:nth(0)').find('div:nth(1)').contains('Title');
- cy.get('@checkbox0-header').trigger('mouseleave');
+ cy.get('@checkbox0-header').trigger('mouseout');
});
it('should mouse over header title on 2nd column with Finish name and NOT expect any tooltip to show since it is disabled on that column', () => {
cy.get(`.slick-header-columns .slick-header-column:nth(8)`).as('finish-header');
- cy.get('@finish-header').trigger('mouseover');
+ cy.get('@finish-header').trigger('mouseenter');
cy.get('.slick-custom-tooltip').should('not.exist');
- cy.get('@finish-header').trigger('mouseleave');
+ cy.get('@finish-header').trigger('mouseout');
+ });
+
+ it('should click Prerequisite editor of 1st row (Task 2) and expect Task1 & 2 to be selected in the multiple-select drop', () => {
+ cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(10)`).as('prereq-cell');
+ cy.get('@prereq-cell')
+ .should('contain', 'Task 2, Task 1')
+ .click();
+
+ cy.get('div.ms-drop[data-name=editor-prerequisites]')
+ .find('li.selected')
+ .should('have.length', 2);
+
+ cy.get('div.ms-drop[data-name=editor-prerequisites]')
+ .find('li.selected:nth(0) span')
+ .should('contain', 'Task 1');
+
+ cy.get('div.ms-drop[data-name=editor-prerequisites]')
+ .find('li.selected:nth(1) span')
+ .should('contain', 'Task 2');
+
+ cy.get('div.ms-drop[data-name=editor-prerequisites]')
+ .find('.ms-ok-button')
+ .click();
+
+ cy.get('div.ms-drop[data-name=editor-prerequisites]')
+ .should('not.exist');
});
});
diff --git a/test/cypress/support/commands.ts b/test/cypress/support/commands.ts
index 4319c3793..968ee5a8b 100644
--- a/test/cypress/support/commands.ts
+++ b/test/cypress/support/commands.ts
@@ -31,8 +31,8 @@ declare global {
namespace Cypress {
interface Chainable {
// triggerHover: (elements: NodeListOf) => void;
- convertPosition(viewport: string): Chainable>;
- getCell(row: number, col: number, viewport?: string, options?: { parentSelector?: string, rowHeight?: number; }): Chainable>;
+ convertPosition(viewport: string): Chainable;
+ getCell(row: number, col: number, viewport?: string, options?: { parentSelector?: string, rowHeight?: number; }): Chainable;
}
}
}
diff --git a/test/cypress/support/drag.ts b/test/cypress/support/drag.ts
index e6cfa0ec4..329676524 100644
--- a/test/cypress/support/drag.ts
+++ b/test/cypress/support/drag.ts
@@ -5,10 +5,10 @@ declare global {
namespace Cypress {
interface Chainable {
// triggerHover: (elements: NodeListOf) => void;
- dragOutside(viewport?: string, ms?: number, px?: number, options?: { parentSelector?: string, scrollbarDimension?: number; }): Chainable>;
- dragStart(options?: { cellWidth?: number; cellHeight?: number; }): Chainable>;
- dragCell(addRow: number, addCell: number, options?: { cellWidth?: number; cellHeight?: number; }): Chainable>;
- dragEnd(gridSelector?: string): Chainable>;
+ dragOutside(viewport?: string, ms?: number, px?: number, options?: { parentSelector?: string, scrollbarDimension?: number; }): Chainable;
+ dragStart(options?: { cellWidth?: number; cellHeight?: number; }): Chainable;
+ dragCell(addRow: number, addCell: number, options?: { cellWidth?: number; cellHeight?: number; }): Chainable;
+ dragEnd(gridSelector?: string): Chainable;
}
}
}
@@ -54,8 +54,8 @@ Cypress.Commands.add('dragEnd', { prevSubject: 'optional' }, (_subject, gridSele
return;
});
-export function getScrollDistanceWhenDragOutsideGrid(selector :string, viewport: string, dragDirection: string, fromRow: number, fromCol: number, px = 140) {
- return (cy as any).convertPosition(viewport).then((_viewportPosition: { x: number; y: number;}) => {
+export function getScrollDistanceWhenDragOutsideGrid(selector: string, viewport: string, dragDirection: string, fromRow: number, fromCol: number, px = 140) {
+ return (cy as any).convertPosition(viewport).then((_viewportPosition: { x: number; y: number; }) => {
const viewportSelector = `${selector} .slick-viewport-${_viewportPosition.x}.slick-viewport-${_viewportPosition.y}`;
(cy as any).getCell(fromRow, fromCol, viewport, { parentSelector: selector })
.dragStart();
diff --git a/test/jest-pretest.ts b/test/jest-pretest.ts
index 98e38b137..d06dd3707 100644
--- a/test/jest-pretest.ts
+++ b/test/jest-pretest.ts
@@ -1,10 +1,7 @@
import 'jsdom-global/register';
import Sortable from 'sortablejs';
import 'whatwg-fetch';
-import * as jQuery from 'jquery';
-(global as any).$ = (global as any).jQuery = jQuery;
-(window as any).$ = (window as any).jQuery = jQuery;
// (global as any).Storage = window.localStorage;
(global as any).navigator = { userAgent: 'node.js' };
(global as any).Slick = (window as any).Slick = {};
@@ -13,4 +10,4 @@ import * as jQuery from 'jquery';
require('slickgrid/slick.core');
require('slickgrid/slick.dataview');
require('slickgrid/slick.interactions');
-require('slickgrid/slick.grid');
+require('slickgrid/slick.grid');
\ No newline at end of file
diff --git a/test/tsconfig.spec.json b/test/tsconfig.spec.json
index 475d0d127..16d21f4dd 100644
--- a/test/tsconfig.spec.json
+++ b/test/tsconfig.spec.json
@@ -12,7 +12,6 @@
"cypress",
"jest",
"jest-extended",
- "jquery",
"node"
]
},