Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common)!: migrate to multiple-select-vanilla #919

Merged
merged 28 commits into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5d6db5f
chore: use simpler gh-pages Vite config deployment [refresh gh-pages]
ghiscoding Mar 13, 2023
472a711
chore(deps): update dependency @types/dompurify to v3 (#934)
renovate-bot Mar 16, 2023
64be371
chore(deps): update all non-major dependencies (#933)
renovate-bot Mar 16, 2023
0d6bfed
chore(deps): update all non-major dependencies (#935)
renovate-bot Mar 16, 2023
8aa10e7
chore(deps): update dependency typescript to v5 (#936)
renovate-bot Mar 16, 2023
7033fbf
chore(styling): lower amount of lines in slick-plugins sass file (#937)
ghiscoding Mar 19, 2023
1f9c1c4
fix(presets): dynamic columns should be auto-inserted with Grid Prese…
ghiscoding Mar 22, 2023
790d76e
chore(deps): update all non-major dependencies (#939)
renovate-bot Mar 23, 2023
dfd0eaa
feat(common)!: migrate to multiple-select-vanilla
ghiscoding Feb 26, 2023
0f62c64
chore: fix scss file not found from node_modules package
ghiscoding Feb 26, 2023
865bcf1
chore: fix multiple-select-vanilla import path and remove unused scss
ghiscoding Feb 26, 2023
dbefa01
chore: fix all unit tests & some issues found w/select editor & filter
ghiscoding Mar 4, 2023
4dd7ad4
chore(deps): update to latest version of multiple-select-vanille
ghiscoding Mar 4, 2023
db76793
chore: add missing unit tests
ghiscoding Mar 4, 2023
ec52b92
chore: add more unit tests coverage
ghiscoding Mar 4, 2023
1e502f8
chore: add more unit test coverage
ghiscoding Mar 4, 2023
e42517b
chore: fix dropdown position & add more E2E tests
ghiscoding Mar 5, 2023
6269aab
chore: fix failing unit tests
ghiscoding Mar 5, 2023
973681f
chore: add back Cypress single retries to all test suite
ghiscoding Mar 5, 2023
a7b74bf
chore: use new multiple-select-vanilla in Vite new demo
ghiscoding Mar 9, 2023
8ec4d86
chore: update ms-select-vanilla with fix & empty label option
ghiscoding Mar 11, 2023
a37cdc1
chore: update to latest ms-select-vanilla version
ghiscoding Mar 11, 2023
45b6906
chore: update to latest ms-select-vanilla version w/Virtual Scroll fix
ghiscoding Mar 11, 2023
ec41bbc
chore: update to latest ms-select-vanilla version
ghiscoding Mar 23, 2023
31fda0f
chore(release): publish new version 2.6.3
ghiscoding Mar 23, 2023
26864a4
Merge branch 'master' into feat/multiple-select-vanilla
ghiscoding Mar 23, 2023
21faf88
chore: fix failing unit tests
ghiscoding Mar 23, 2023
ab5f802
chore(deps): update ms-select-vanilla to latest
ghiscoding Apr 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"type": "msedge",
"request": "launch",
"name": "Vite - Edge Debugger",
"url": "http://localhost:8888",
"resolveSourceMapLocations": [
"${workspaceFolder}/",
"!/node_modules/**"
]
"url": "http://localhost:8888"
// "resolveSourceMapLocations": [
// "${workspaceFolder}/",
// "!/node_modules/**"
// ]
},
{
"type": "node",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.6.3](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.2...v2.6.3) (2023-03-23)

### Bug Fixes

* **presets:** dynamic columns should be auto-inserted with Grid Presets ([#938](https://github.com/ghiscoding/slickgrid-universal/issues/938)) ([1f9c1c4](https://github.com/ghiscoding/slickgrid-universal/commit/1f9c1c492586f4a0a6582ece4b44bc747e6990c8)) - by @ghiscoding

## [2.6.2](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.1...v2.6.2) (2023-03-03)

### Bug Fixes
Expand Down
9 changes: 9 additions & 0 deletions examples/vite-demo-vanilla-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log
## All-in-One SlickGrid framework agnostic wrapper, visit [Slickgrid-Universal](https://github.com/ghiscoding/slickgrid-universal) 📦🚀

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.6.3](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.2...v2.6.3) (2023-03-23)

**Note:** Version bump only for package slickgrid-universal-vite-demo
12 changes: 6 additions & 6 deletions examples/vite-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slickgrid-universal-vite-demo",
"private": true,
"version": "0.0.0",
"version": "2.6.3",
"scripts": {
"dev": "vite --mode development",
"build": "tsc && vite build",
Expand All @@ -28,7 +28,7 @@
"flatpickr": "^4.6.13",
"jquery": "^3.6.4",
"moment-mini": "^2.29.4",
"multiple-select-modified": "^1.3.17",
"multiple-select-vanilla": "^0.2.9",
"rxjs": "^7.8.0",
"whatwg-fetch": "^3.6.2"
},
Expand All @@ -37,10 +37,10 @@
"@types/fnando__sparkline": "^0.3.4",
"@types/jquery": "^3.5.16",
"@types/moment": "^2.13.0",
"@types/node": "^18.15.0",
"@types/node": "^18.15.5",
"@types/whatwg-fetch": "^0.0.33",
"sass": "^1.58.3",
"typescript": "^4.9.5",
"vite": "^4.1.4"
"sass": "^1.59.3",
"typescript": "^5.0.2",
"vite": "^4.2.1"
}
}
Binary file not shown.
1 change: 1 addition & 0 deletions examples/vite-demo-vanilla-bundle/public/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"NOT_CONTAINS": "Not contains",
"NOT_EQUAL_TO": "Not equal to",
"NOT_IN_COLLECTION_SEPERATED_BY_COMMA": "Search items not in a collection, must be separated by a comma (a,b)",
"NO_MATCHES_FOUND": "No matches found",
"OF": "of",
"OK": "OK",
"PAGE": "Page",
Expand Down
1 change: 1 addition & 0 deletions examples/vite-demo-vanilla-bundle/public/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"NOT_CONTAINS": "Ne contient pas",
"NOT_EQUAL_TO": "Non égal à",
"NOT_IN_COLLECTION_SEPERATED_BY_COMMA": "Recherche excluant certain éléments d'une collection, doit être séparé par une virgule (a,b)",
"NO_MATCHES_FOUND": "Aucun résultat",
"OF": "de",
"OK": "Terminé",
"PAGE": "Page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class Example4 {
editorOptions: {
filter: true // adds a filter on top of the multi-select dropdown
},
model: Editors.multipleSelect,
model: Editors.singleSelect,
},
},
{
Expand Down
6 changes: 4 additions & 2 deletions examples/vite-demo-vanilla-bundle/src/examples/example12.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ export default class Example12 {
};

if (!(i % 8)) {
delete tmpArray[i].finish; // also test with undefined properties
delete tmpArray[i].percentComplete; // also test with undefined properties
// also test with undefined properties
delete tmpArray[i].finish;
delete tmpArray[i].percentComplete;
delete tmpArray[i].analysis.percentComplete;
}
}
return tmpArray;
Expand Down
1 change: 0 additions & 1 deletion examples/vite-demo-vanilla-bundle/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'jquery';
import './jQuery'; // define jQuery on the global window to make it available in Vite since @rollup/plugin-inject causes conflict with SASS variables prefixed with $var

// import all CSS required by Slickgrid-Universal
import 'multiple-select-modified/src/multiple-select.css';
import 'flatpickr/dist/flatpickr.min.css';
import './styles.scss';

Expand Down
6 changes: 2 additions & 4 deletions examples/vite-demo-vanilla-bundle/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { defineConfig } from 'vite';

dns.setDefaultResultOrder('verbatim');

export default defineConfig(({ mode }) => {
console.log('Vite mode: ', mode);

export default defineConfig(() => {
return {
base: mode === 'production' ? '/slickgrid-universal/' : './',
base: './',
build: {
chunkSizeWarningLimit: 6000,
emptyOutDir: true,
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
"version": "2.6.2",
"version": "2.6.3",
"npmClient": "pnpm",
"loglevel": "info",
"command": {
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,40 +54,40 @@
"devDependencies": {
"@4tw/cypress-drag-drop": "^2.2.3",
"@jest/types": "^29.5.0",
"@lerna-lite/cli": "^1.16.0",
"@lerna-lite/run": "^1.16.0",
"@lerna-lite/watch": "^1.16.0",
"@types/jest": "^29.4.0",
"@types/node": "^18.15.0",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/parser": "^5.54.1",
"@lerna-lite/cli": "^1.17.0",
"@lerna-lite/run": "^1.17.0",
"@lerna-lite/watch": "^1.17.0",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.5",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"cross-env": "^7.0.3",
"cypress": "^12.7.0",
"cypress": "^12.8.1",
"dotenv": "^16.0.3",
"eslint": "^8.35.0",
"eslint": "^8.36.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jest": "^29.5.0",
"jest-cli": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-extended": "^3.2.4",
"jquery": "^3.6.4",
"jsdom": "^21.1.0",
"jsdom": "^21.1.1",
"jsdom-global": "^3.0.2",
"moment-mini": "^2.29.4",
"npm-run-all2": "^6.0.4",
"pnpm": "^7.29.1",
"rimraf": "^4.4.0",
"pnpm": "^7.30.0",
"rimraf": "^4.4.1",
"rxjs": "^7.8.0",
"servor": "^4.0.2",
"slickgrid": "^3.0.4",
"sortablejs": "^1.15.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "5.0.1-rc",
"typescript": "5.0.2",
"whatwg-fetch": "^3.6.2"
},
"packageManager": "pnpm@7.29.1",
"packageManager": "pnpm@7.30.0",
"engines": {
"node": ">=14.17.0",
"npm": ">=6.14.13"
Expand Down
4 changes: 4 additions & 0 deletions packages/binding/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

## [2.6.3](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.2...v2.6.3) (2023-03-23)

**Note:** Version bump only for package @slickgrid-universal/binding

## [2.6.2](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.1...v2.6.2) (2023-03-03)

**Note:** Version bump only for package @slickgrid-universal/binding
Expand Down
4 changes: 2 additions & 2 deletions packages/binding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/binding",
"version": "2.6.2",
"version": "2.6.3",
"description": "Simple Vanilla Implementation of a Binding Engine & Helper to add properties/events 2 way bindings",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -57,7 +57,7 @@
"dompurify": "^3.0.1"
},
"devDependencies": {
"@types/dompurify": "^2.4.0",
"@types/dompurify": "^3.0.0",
"cross-env": "^7.0.3",
"npm-run-all2": "^6.0.4"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.6.3](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.2...v2.6.3) (2023-03-23)

### Bug Fixes

* **presets:** dynamic columns should be auto-inserted with Grid Presets ([#938](https://github.com/ghiscoding/slickgrid-universal/issues/938)) ([1f9c1c4](https://github.com/ghiscoding/slickgrid-universal/commit/1f9c1c492586f4a0a6582ece4b44bc747e6990c8)) - by @ghiscoding

## [2.6.2](https://github.com/ghiscoding/slickgrid-universal/compare/v2.6.1...v2.6.2) (2023-03-03)

### Bug Fixes
Expand Down
26 changes: 12 additions & 14 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slickgrid-universal/common",
"version": "2.6.2",
"version": "2.6.3",
"description": "SlickGrid-Universal Common Code",
"main": "dist/commonjs/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -49,18 +49,16 @@
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
"bundle:types": "tsc --emitDeclarationOnly --declarationMap --outDir dist/types",
"sass-build-task:scss-compile:bootstrap": "sass src/styles/slickgrid-theme-bootstrap.scss dist/styles/css/slickgrid-theme-bootstrap.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:material": "sass src/styles/slickgrid-theme-material.scss dist/styles/css/slickgrid-theme-material.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:material-bare": "sass src/styles/slickgrid-theme-material.bare.scss dist/styles/css/slickgrid-theme-material.bare.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:material-lite": "sass src/styles/slickgrid-theme-material.lite.scss dist/styles/css/slickgrid-theme-material.lite.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:salesforce": "sass src/styles/slickgrid-theme-salesforce.scss dist/styles/css/slickgrid-theme-salesforce.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:salesforce-bare": "sass src/styles/slickgrid-theme-salesforce.bare.scss dist/styles/css/slickgrid-theme-salesforce.bare.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:salesforce-lite": "sass src/styles/slickgrid-theme-salesforce.lite.scss dist/styles/css/slickgrid-theme-salesforce.lite.css --style=compressed --quiet-deps --no-source-map",
"sass-build-task:scss-compile:bootstrap": "sass src/styles/slickgrid-theme-bootstrap.scss dist/styles/css/slickgrid-theme-bootstrap.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:material": "sass src/styles/slickgrid-theme-material.scss dist/styles/css/slickgrid-theme-material.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:material-bare": "sass src/styles/slickgrid-theme-material.bare.scss dist/styles/css/slickgrid-theme-material.bare.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:material-lite": "sass src/styles/slickgrid-theme-material.lite.scss dist/styles/css/slickgrid-theme-material.lite.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:salesforce": "sass src/styles/slickgrid-theme-salesforce.scss dist/styles/css/slickgrid-theme-salesforce.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:salesforce-bare": "sass src/styles/slickgrid-theme-salesforce.bare.scss dist/styles/css/slickgrid-theme-salesforce.bare.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass-build-task:scss-compile:salesforce-lite": "sass src/styles/slickgrid-theme-salesforce.lite.scss dist/styles/css/slickgrid-theme-salesforce.lite.css --style=compressed --quiet-deps --no-source-map --load-path=node_modules",
"sass:build": "run-p sass-build-task:scss-compile:*",
"postsass:build": "postcss --no-map --use cssnano --use autoprefixer --dir dist/styles/css dist/styles/css --style=compressed --quiet-deps --no-source-map",
"presass:copy": "cross-env copyfiles -f src/styles/*.png dist/styles/css",
"sass:copy": "cross-env copyfiles -f src/styles/*.scss dist/styles/sass",
"postsass:copy": "cross-env copyfiles -f src/styles/*.png dist/styles/sass",
"sass:watch:bootstrap": "npm run sass-build-task:scss-compile:bootstrap -- --watch",
"sass:watch:material": "npm run sass-build-task:scss-compile:material -- --watch",
"sass:watch:salesforce": "npm run sass-build-task:scss-compile:salesforce -- --watch",
Expand All @@ -81,23 +79,23 @@
"flatpickr": "^4.6.13",
"jquery": "^3.6.4",
"moment-mini": "^2.29.4",
"multiple-select-modified": "^1.3.17",
"multiple-select-vanilla": "^0.2.9",
"slickgrid": "^3.0.4",
"sortablejs": "^1.15.0",
"un-flatten-tree": "^2.0.12"
},
"devDependencies": {
"@types/dompurify": "^2.4.0",
"@types/dompurify": "^3.0.0",
"@types/jquery": "^3.5.16",
"@types/sortablejs": "^1.15.0",
"@types/sortablejs": "^1.15.1",
"autoprefixer": "^10.4.14",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"cssnano": "^5.1.15",
"npm-run-all2": "^6.0.4",
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
"sass": "^1.58.3"
"sass": "^1.59.3"
},
"engines": {
"node": ">=14.17.0",
Expand Down
18 changes: 10 additions & 8 deletions packages/common/src/editors/__tests__/multipleSelectEditor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import 3rd party lib multiple-select for the tests
import 'multiple-select-modified';
import 'multiple-select-vanilla';

import { Editors } from '../index';
import { MultipleSelectEditor } from '../multipleSelectEditor';
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('MultipleSelectEditor', () => {
it('should initialize the editor', () => {
(mockColumn.internalColumnEditor as ColumnEditor).collection = [{ value: 'male', label: 'male' }, { value: 'female', label: 'female' }];
gridOptionMock.translater = translateService;
editor = new MultipleSelectEditor(editorArguments);
editor = new MultipleSelectEditor(editorArguments, 0);
const editorCount = document.body.querySelectorAll('select.ms-filter.editor-gender').length;
const spy = jest.spyOn(editor, 'show');
jest.runAllTimers(); // fast-forward timer
Expand All @@ -111,24 +111,26 @@ describe('MultipleSelectEditor', () => {

it('should hide the DOM element div wrapper when the "hide" method is called', () => {
editor = new MultipleSelectEditor(editorArguments);
const editorElm = document.body.querySelector('[name=editor-gender].ms-drop') as HTMLDivElement;
const editorElm = document.body.querySelector('[data-name=editor-gender].ms-drop') as HTMLDivElement;
expect(editorElm).toBeTruthy();

editor.show();
expect(editorElm.style.display).toBe('');
editor.show(null);
expect(editorElm.style.display).toBe('block');

editor.hide();
expect(editorElm.style.display).toBe('none');
});

it('should show the DOM element div wrapper when the "show" method is called', () => {
editor = new MultipleSelectEditor(editorArguments);
const editorElm = document.body.querySelector('[name=editor-gender].ms-drop') as HTMLDivElement;
const editorElm = document.body.querySelector('[data-name=editor-gender].ms-drop') as HTMLDivElement;
expect(editorElm).toBeTruthy();

editor.hide();
expect(editorElm.style.display).toBe('none');

editor.show();
expect(editorElm.style.display).toBe('');
editor.show(null);
expect(editorElm.style.display).toBe('block');
});
});
});
Loading