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

fix(grid-core): - Generate .d.ts files for grid and scheduler core packages #3667

Merged
merged 7 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"yarn": ">=1.22.0"
},
"resolutions": {
"@types/react": "16.9.35",
"@types/react-test-renderer": "^16.9.3"
"@types/react": "^17.0.30",
"@types/react-test-renderer": "^17.0.9"
}
}
6 changes: 6 additions & 0 deletions packages/dx-grid-core/merge-dts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { fileURLToPath } from 'url';
import { dirname } from 'path';

import buildDefinitions from '../../scripts/merge-dts.js';

buildDefinitions(dirname(fileURLToPath(import.meta.url)));
2 changes: 2 additions & 0 deletions packages/dx-grid-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"main": "dist/dx-grid-core.umd.cjs",
"module": "dist/dx-grid-core.es.js",
"types": "dist/dx-grid-core.d.ts",
"typings": "dist/dx-grid-core.d.ts",
"globalName": "DevExpress.DXGridCore",
"files": [
"dist"
Expand All @@ -50,6 +51,7 @@
"test:coverage": "jest --coverage",
"build": "rollup -c rollup.config.js",
"build:watch": "rollup -c rollup.config.js -w",
"dts": "tsc -p tsconfig.dts.json && node ./merge-dts.js",
"lint": "tslint -p tsconfig.lint.json",
"lint:fix": "yarn lint -- --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export const generateChains = (
.sort((a, b) => a - b)
.filter(p => p < columns.length);

const chain = [];
const chain: {
bandTitle: string[],
columns: typeof columns,
start: number,
}[] = [];
for (let i = 0; i < indexes.length - 1; i += 2) {
const start = indexes[i];
const end = indexes[i + 1];
Expand Down
8 changes: 8 additions & 0 deletions packages/dx-grid-core/tsconfig.dts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist/dts",
"emitDeclarationOnly": true,
}
}
2 changes: 1 addition & 1 deletion packages/dx-grid-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "./dist",
"downlevelIteration": true,
"noImplicitAny": true,
"noImplicitAny": false,
},
"include": [
"./src"
Expand Down
4 changes: 2 additions & 2 deletions packages/dx-react-grid/api/dx-react-grid.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1558,9 +1558,9 @@ export class TableSummaryRowBase extends React_2.PureComponent<TableSummaryRowPr
// (undocumented)
static GROUP_ROW_TYPE: symbol;
// (undocumented)
render(): JSX.Element;
render(): React_2.JSX.Element;
// (undocumented)
renderContent(column: any, columnSummaries: any): JSX.Element;
renderContent(column: any, columnSummaries: any): React_2.JSX.Element;
timbset marked this conversation as resolved.
Show resolved Hide resolved
// (undocumented)
static TOTAL_ROW_TYPE: symbol;
// (undocumented)
Expand Down
6 changes: 6 additions & 0 deletions packages/dx-scheduler-core/merge-dts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { fileURLToPath } from 'url';
import { dirname } from 'path';

import buildDefinitions from '../../scripts/merge-dts.js';

buildDefinitions(dirname(fileURLToPath(import.meta.url)));
3 changes: 3 additions & 0 deletions packages/dx-scheduler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@
"files": [
"dist"
],
"types": "dist/dx-scheduler-core.d.ts",
"typings": "dist/dx-scheduler-core.d.ts",
"scripts": {
"test": "jest",
"test:pacific": "TZ=US/Pacific jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"build": "rollup -c rollup.config.js",
"build:watch": "rollup -c rollup.config.js -w",
"dts": "tsc -p tsconfig.dts.json && node ./merge-dts.js",
"lint": "tslint -p tsconfig.lint.json",
"lint:fix": "yarn lint -- --fix"
},
Expand Down
19 changes: 11 additions & 8 deletions packages/dx-scheduler-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ export const getAppointmentStyle: PureComputed<
> = ({
top, left,
width, height,
}) => ({
height,
width: `${width}%`,
transform: `translateY(${top}px)`,
msTransform: `translateY(${top}px)`,
left: `${left}%`,
position: 'absolute',
});
}) => {
const transform = `translateY(${top}px)` as any;
timbset marked this conversation as resolved.
Show resolved Hide resolved
return ({
height,
width: `${width}%`,
transform,
msTransform: transform,
left: `${left}%`,
position: 'absolute',
});
};

const expandRecurrenceAppointment = (
appointment: AppointmentMoment, leftBound: Date, rightBound: Date,
Expand Down
8 changes: 8 additions & 0 deletions packages/dx-scheduler-core/tsconfig.dts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist/dts",
"emitDeclarationOnly": true,
}
}
2 changes: 1 addition & 1 deletion packages/dx-scheduler-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "./dist",
"downlevelIteration": true,
"noImplicitAny": true,
"noImplicitAny": false,
timbset marked this conversation as resolved.
Show resolved Hide resolved
"esModuleInterop": true
},
"include": [
Expand Down
37 changes: 19 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4043,12 +4043,12 @@
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"

"@types/react-test-renderer@^16.0.0", "@types/react-test-renderer@^16.9.3":
version "16.9.5"
resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-16.9.5.tgz#edab67da470f7c3e997f58d55dcfe2643cc30a68"
integrity sha512-C4cN7C2uSSGOYelp2XfdtJb5TsCP+QiZ+0Bm4U3ZfUswN8oN9O/l86XO/OvBSFCmWY7w75fzsQvZ50eGkFN34A==
"@types/react-test-renderer@^16.0.0", "@types/react-test-renderer@^17.0.9":
version "17.0.9"
resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-17.0.9.tgz#da6d06f3f37eefab39386c390140374dc5db5b33"
integrity sha512-bOfxcu5oZ+KxvACScbkTwZ4eGCtZFTz4VZCOVAIfGbThxqiXSIGipKVG8ubaYBXquUSQROzNIUzviWdSnnAlzg==
dependencies:
"@types/react" "^16"
"@types/react" "^17"

"@types/react-transition-group@^4.4.5":
version "4.4.5"
Expand All @@ -4057,13 +4057,14 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/[email protected].35", "@types/react@>=16.9.11", "@types/react@^16", "@types/react@^17.0.30":
version "16.9.35"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.35.tgz#a0830d172e8aadd9bd41709ba2281a3124bbd368"
integrity sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ==
"@types/react@*", "@types/react@>=16.9.11", "@types/react@^16", "@types/react@^17", "@types/react@^17.0.30":
version "17.0.75"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.75.tgz#cffbc76840a12fcadaf5a3cf14878bb06efcf73d"
integrity sha512-MSA+NzEzXnQKrqpO63CYqNstFjsESgvJAdAyyJ1n6ZQq/GLgf6nOfIKwk+Twuz0L1N6xPe+qz5xRCJrbhMaLsw==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/readable-stream@^2.3.9":
version "2.3.10"
Expand Down Expand Up @@ -4095,6 +4096,11 @@
"@types/glob" "*"
"@types/node" "*"

"@types/scheduler@*":
version "0.16.8"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff"
integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==

"@types/stack-utils@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
Expand Down Expand Up @@ -8438,15 +8444,10 @@ cssstyle@^2.3.0:
dependencies:
cssom "~0.3.6"

csstype@^2.2.0:
version "2.6.17"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.17.tgz#4cf30eb87e1d1a005d8b6510f95292413f6a1c0e"
integrity sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A==

csstype@^3.0.2:
version "3.0.8"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340"
integrity sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==
version "3.1.3"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

csstype@^3.1.1:
version "3.1.1"
Expand Down
Loading