Skip to content

Commit 3164bfd

Browse files
jassmithchknhkang1lukasmasuchv-genn
authored
5.3.0 (#758)
* 5.2.2-beta1 * Fix unable to select last col * Find better react-laag fix * Fix build error * Prevent crash * Ensure click off container properly supports touches * 5.2.2-beta2 * Improve error messages * Offer increased control over search * Add dumb filter example * Fix import * Export GetRowThemeCallback * Ensure canvas is in proper ltr/rtl mode * Don't accidentally exclude final col when copying rows * Make sure to support RTL in column headers * Load up testing framework * Fix build * Add row marker stories * Add more type exports * Fix padding with wrapped text * 5.2.2-beta3 * Fix copy pasta discovered during merge * Bump to 5.2.2-beta5 * feat: pass through middle mouse click event to onCellClicked (#693) * pass through middle mouse click event to onCellClicked * Add tests and prevent werid behavior * Add more tests and fixes * Oops * Fix build --------- Co-authored-by: Jason Smith <[email protected]> * Fix issue with missing ts distribution (#673) * feat: expose the cell location in keyboard event (#664) * feat: expose the cell location in keyboard event * Add test * Fix API --------- Co-authored-by: Alex Corrado <[email protected]> Co-authored-by: Jason Smith <[email protected]> * DatePickerCell Implementation (#627) * DatePickerCell Implementation with prettier * Suggestions. Note, I do need to add more unit tests * Actually remove the unit test beacuse infra does not support this as of yet. * Rename variable to dateKind * Add support.ts duplicate method into cells packagea and refactor import * Put back try and catch. oops * readd format parameter to support backwards compat and incorporate Lukas Feedback * Adding basic unit test * Add todos for myself * lint * Add max, min, step, readonly, and change cached displayDate behavior to undefined behavior * Add more tests and dataid for date-picker-cell * Add tests * Add date, time, datetime tests * cleanup * Remove console.log * Add more test cases for onPaste * Add time test case for onPaste * Add implementation for time in onPaste * Cleanup tests a bit * Add additional columns to storybook * Apply correct formatting * Apply correct formatting * Clean up with correct prettier file * Remove need for support functions * Clean imports * Revert "Clean up with correct prettier file" This reverts commit 32e5b93. * Add assert method * Fix paste issue * Delete support ts * Fix cell stories display * Add styling to apply gdg theme * Fix tests * Use outside read-only * Remove theme * Add cell tests to CI workflow * Fix tests and remove extra test * Remove tests because they're failing based on timezone * Update date picker cell (#5) * Fix unit tests * Fix tests * Remove min / max * Add support for Date as min / max value (#6) * Fix unit tests * Fix tests * Remove min / max * Add support for date in min/max --------- Co-authored-by: lukasmasuch <[email protected]> Co-authored-by: Jason Smith <[email protected]> * 5.2.2-beta6 * Add obstructed playground * Cleanup events a little more * Bump to 5.3.0 --------- Co-authored-by: Alex Corrado <[email protected]> Co-authored-by: Caleb Hoyoul Kang <[email protected]> Co-authored-by: Lukas Masuch <[email protected]> Co-authored-by: Vigen <[email protected]> Co-authored-by: willhuang1997 <[email protected]>
1 parent 7beb65d commit 3164bfd

33 files changed

+1287
-163
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- run: npm run build
1919
- run: npm run test -- --coverage
2020
- run: npm run test-source
21+
- run: npm run test-cells
2122
- run: npm run test-projects
2223
- name: Coveralls
2324
uses: coverallsapp/github-action@master

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"eslint.workingDirectories": ["packages/core", "packages/cells", "packages/source"]
2+
"eslint.workingDirectories": ["packages/core", "packages/cells", "packages/source"],
3+
"typescript.tsdk": "node_modules/typescript/lib"
34
}

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "root",
3-
"version": "5.2.1",
3+
"version": "5.3.0",
44
"scripts": {
55
"start": "npm run storybook",
66
"version": "./update-version.sh",
@@ -13,6 +13,7 @@
1313
"test": "cd packages/core && npm run test --",
1414
"test-18": "./setup-react-18-test.sh && cd packages/core && npm run test --",
1515
"test-source": "cd packages/source && npm run test",
16+
"test-cells": "cd packages/cells && npm run test",
1617
"test-projects": "cd test-projects/ && ./bootstrap-projects.sh"
1718
},
1819
"author": "Glide",

packages/cells/jest.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export default {
2+
preset: "ts-jest",
3+
roots: ["<rootDir>/"],
4+
testEnvironment: "jsdom",
5+
moduleDirectories: ["node_modules", "../node_modules"],
6+
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
7+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
8+
transform: {
9+
"^.+\\.(ts|tsx)?$": "ts-jest",
10+
"^.+\\.(js|jsx)$": "babel-jest",
11+
},
12+
globals: {
13+
__PATH_PREFIX__: ``,
14+
"ts-jest": {
15+
babelConfig: {
16+
presets: [
17+
["@babel/preset-env", { targets: { node: "current" } }],
18+
"@babel/preset-react",
19+
["@linaria/babel-preset", { evaluate: true, displayName: true }],
20+
],
21+
},
22+
},
23+
},
24+
};

packages/cells/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@glideapps/glide-data-grid-cells",
3-
"version": "5.2.1",
3+
"version": "5.3.0",
44
"description": "Extra cells for glide-data-grid",
55
"sideEffects": [
66
"**/*.css"
@@ -27,7 +27,8 @@
2727
"build": "npm run build-js && npm run build-types",
2828
"build-js": "node build.cjs && tsc-esm-fix --target='dist/js'",
2929
"build-types": "tsc -p tsconfig.types.json",
30-
"lint": "eslint src --ext .ts,.tsx"
30+
"lint": "eslint src --ext .ts,.tsx",
31+
"test": "jest"
3132
},
3233
"repository": {
3334
"type": "git",
@@ -50,7 +51,7 @@
5051
"canvas"
5152
],
5253
"dependencies": {
53-
"@glideapps/glide-data-grid": "5.2.1",
54+
"@glideapps/glide-data-grid": "5.3.0",
5455
"@toast-ui/editor": "3.1.10",
5556
"@toast-ui/react-editor": "3.1.10",
5657
"react-select": "^5.2.2"

packages/cells/src/cell.stories.tsx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,41 @@ export const CustomCells: React.VFC = () => {
324324
kind: "date-picker-cell",
325325
date: new Date(),
326326
displayDate: new Date().toISOString(),
327-
format: "date",
327+
format: "datetime-local",
328328
},
329329
};
330330
return d;
331331
} else if (col === 10) {
332+
num = row + 1;
333+
rand();
334+
const d: DatePickerCell = {
335+
kind: GridCellKind.Custom,
336+
allowOverlay: true,
337+
copyData: "4",
338+
data: {
339+
kind: "date-picker-cell",
340+
date: new Date(),
341+
displayDate: new Date().toISOString().split("T")[0],
342+
format: "date",
343+
},
344+
};
345+
return d;
346+
} else if (col === 11) {
347+
num = row + 1;
348+
rand();
349+
const d: DatePickerCell = {
350+
kind: GridCellKind.Custom,
351+
allowOverlay: true,
352+
copyData: "4",
353+
data: {
354+
kind: "date-picker-cell",
355+
date: new Date(),
356+
displayDate: new Date().toISOString().split("T")[1].replace("Z", ""),
357+
format: "time",
358+
},
359+
};
360+
return d;
361+
} else if (col === 12) {
332362
num = row + 1;
333363
rand();
334364
const d: LinksCell = {
@@ -351,7 +381,7 @@ export const CustomCells: React.VFC = () => {
351381
},
352382
};
353383
return d;
354-
} else if (col === 11) {
384+
} else if (col === 13) {
355385
num = row + 1;
356386
rand();
357387
const d: ButtonCell = {
@@ -415,8 +445,16 @@ export const CustomCells: React.VFC = () => {
415445
width: 150,
416446
},
417447
{
448+
id: "datetime-picker",
449+
title: "Datetime Picker",
450+
},
451+
{
452+
id: "date-picker",
418453
title: "Date Picker",
419-
width: 150,
454+
},
455+
{
456+
id: "time-picker",
457+
title: "Time Picker",
420458
},
421459
{
422460
title: "Links",

0 commit comments

Comments
 (0)