code_before
stringlengths 16
1.81M
| edits
stringlengths 4
328k
| next_edit
stringlengths 0
76.5k
| code_after
stringlengths 3
49.9M
| label_window
sequencelengths 4
1.81k
| instruction
stringlengths 20
51.9k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|---|---|---|
"@blueprintjs/core": "^3.19.0",
"@blueprintjs/datetime": "^3.14.0",
"@blueprintjs/docs-data": "^3.16.0",
"@blueprintjs/docs-theme": "^3.4.0",
"@blueprintjs/icons": "^3.11.0",
"@blueprintjs/select": "^3.11.0",
"@blueprintjs/table": "^3.8.0",
"@blueprintjs/test-commons": "^0.10.0",
"@blueprintjs/timezone": "^3.6.0",
"@types/downloadjs": "^1.4.1",
"chroma-js": "^2.0.4",
"classnames": "^2.2.6",
"dom4": "^2.1.5",
| </s> remove "@blueprintjs/core": "^3.19.0",
"@blueprintjs/datetime": "^3.14.0",
</s> add "@blueprintjs/core": "^3.20.0",
"@blueprintjs/datetime": "^3.15.0", </s> remove "@blueprintjs/icons": "^3.11.0",
</s> add "@blueprintjs/icons": "^3.12.0", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", | "@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1", | "@blueprintjs/core": "^3.19.0",
"@blueprintjs/datetime": "^3.14.0",
"@blueprintjs/docs-data": "^3.16.0",
"@blueprintjs/docs-theme": "^3.4.0",
"@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1",
"@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1",
"@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1",
"@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1",
"@blueprintjs/timezone": "^3.6.0",
"@types/downloadjs": "^1.4.1",
"chroma-js": "^2.0.4",
"classnames": "^2.2.6",
"dom4": "^2.1.5", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/docs-app/package.json |
{
"name": "@blueprintjs/icons",
"version": "3.11.0",
"description": "Components, fonts, icons, and css files for creating and displaying icons.",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
| </s> remove "version": "3.14.0",
</s> add "version": "3.15.0", </s> remove "version": "3.19.1",
</s> add "version": "3.20.0", </s> remove "version": "3.8.1",
</s> add "version": "3.8.2", </s> remove "version": "3.11.1",
</s> add "version": "3.11.2", </s> remove "version": "0.10.0",
</s> add "version": "0.10.1", | "version": "3.12.0", | {
"name": "@blueprintjs/icons",
"version": "3.12.0",
"description": "Components, fonts, icons, and css files for creating and displaying icons.",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts", | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/icons/package.json |
"tslib": "~1.9.0"
},
"devDependencies": {
"@blueprintjs/node-build-scripts": "^0.11.0",
"@blueprintjs/test-commons": "^0.10.0",
"enzyme": "^3.10.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.5",
"react": "^16.8.6",
"react-dom": "^16.8.6",
| </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", | "@blueprintjs/test-commons": "^0.10.1", | "tslib": "~1.9.0"
},
"devDependencies": {
"@blueprintjs/node-build-scripts": "^0.11.0",
"@blueprintjs/test-commons": "^0.10.1",
"enzyme": "^3.10.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.5",
"react": "^16.8.6",
"react-dom": "^16.8.6", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/icons/package.json |
{
"name": "@blueprintjs/select",
"version": "3.11.1",
"description": "Components related to selecting items from a list",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
| </s> remove "version": "3.14.0",
</s> add "version": "3.15.0", </s> remove "version": "3.19.1",
</s> add "version": "3.20.0", </s> remove "version": "3.8.1",
</s> add "version": "3.8.2", </s> remove "version": "3.11.0",
</s> add "version": "3.12.0", </s> remove "version": "0.10.0",
</s> add "version": "0.10.1", | "version": "3.11.2", | {
"name": "@blueprintjs/select",
"version": "3.11.2",
"description": "Components related to selecting items from a list",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts", | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/select/package.json |
"test:karma:debug": "karma start --single-run=false --reporters=mocha --debug",
"verify": "npm-run-all compile -p dist test lint"
},
"dependencies": {
"@blueprintjs/core": "^3.19.0",
"classnames": "^2.2",
"tslib": "~1.9.0"
},
"peerDependencies": {
"react": "^15.3.0 || 16",
| </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/core": "^3.19.1",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/icons": "^3.11.0",
</s> add "@blueprintjs/icons": "^3.12.0", </s> remove "@blueprintjs/core": "^3.19.0",
"@blueprintjs/datetime": "^3.14.0",
</s> add "@blueprintjs/core": "^3.20.0",
"@blueprintjs/datetime": "^3.15.0", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", | "@blueprintjs/core": "^3.20.0", | "test:karma:debug": "karma start --single-run=false --reporters=mocha --debug",
"verify": "npm-run-all compile -p dist test lint"
},
"dependencies": {
"@blueprintjs/core": "^3.20.0",
"classnames": "^2.2",
"tslib": "~1.9.0"
},
"peerDependencies": {
"react": "^15.3.0 || 16", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/select/package.json |
{
"name": "@blueprintjs/table",
"version": "3.8.1",
"description": "Scalable interactive table component",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts",
| </s> remove "version": "3.19.1",
</s> add "version": "3.20.0", </s> remove "version": "3.14.0",
</s> add "version": "3.15.0", </s> remove "version": "3.11.1",
</s> add "version": "3.11.2", </s> remove "version": "3.11.0",
</s> add "version": "3.12.0", </s> remove "version": "0.10.0",
</s> add "version": "0.10.1", | "version": "3.8.2", | {
"name": "@blueprintjs/table",
"version": "3.8.2",
"description": "Scalable interactive table component",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"esnext": "lib/esnext/index.js",
"typings": "lib/esm/index.d.ts", | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/table/package.json |
"test:karma:debug": "karma start --single-run=false --reporters=mocha --debug",
"verify": "npm-run-all compile -p dist test lint"
},
"dependencies": {
"@blueprintjs/core": "^3.19.1",
"classnames": "^2.2",
"prop-types": "^15.6.0",
"react-lifecycles-compat": "^3.0.4",
"tslib": "~1.9.0"
},
| </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/icons": "^3.11.0",
</s> add "@blueprintjs/icons": "^3.12.0", </s> remove "@blueprintjs/core": "^3.19.0",
"@blueprintjs/datetime": "^3.14.0",
</s> add "@blueprintjs/core": "^3.20.0",
"@blueprintjs/datetime": "^3.15.0", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", | "@blueprintjs/core": "^3.20.0", | "test:karma:debug": "karma start --single-run=false --reporters=mocha --debug",
"verify": "npm-run-all compile -p dist test lint"
},
"dependencies": {
"@blueprintjs/core": "^3.20.0",
"classnames": "^2.2",
"prop-types": "^15.6.0",
"react-lifecycles-compat": "^3.0.4",
"tslib": "~1.9.0"
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/table/package.json |
"react-dom": "^15.3.0 || 16"
},
"devDependencies": {
"@blueprintjs/node-build-scripts": "^0.11.0",
"@blueprintjs/test-commons": "^0.10.0",
"@types/lodash": "^4.14.136",
"enzyme": "^3.10.0",
"karma": "^4.2.0",
"lodash": "^4.17.15",
"mocha": "^6.2.0",
| </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/test-commons": "^0.10.1", </s> remove "@blueprintjs/core": "^3.19.0",
</s> add "@blueprintjs/core": "^3.20.0", </s> remove "@blueprintjs/icons": "^3.11.0",
"@blueprintjs/select": "^3.11.0",
"@blueprintjs/table": "^3.8.0",
"@blueprintjs/test-commons": "^0.10.0",
</s> add "@blueprintjs/icons": "^3.12.0",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"@blueprintjs/test-commons": "^0.10.1", | "@blueprintjs/test-commons": "^0.10.1", | "react-dom": "^15.3.0 || 16"
},
"devDependencies": {
"@blueprintjs/node-build-scripts": "^0.11.0",
"@blueprintjs/test-commons": "^0.10.1",
"@types/lodash": "^4.14.136",
"enzyme": "^3.10.0",
"karma": "^4.2.0",
"lodash": "^4.17.15",
"mocha": "^6.2.0", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/table/package.json |
{
"name": "@blueprintjs/test-commons",
"version": "0.10.0",
"description": "Common utilities for tests in @blueprintjs packages",
"main": "lib/cjs/index.js",
"typings": "lib/cjs/index.d.ts",
"scripts": {
"compile": "tsc -p ./src",
| </s> remove "version": "3.14.0",
</s> add "version": "3.15.0", </s> remove "version": "3.11.0",
</s> add "version": "3.12.0", </s> remove "version": "3.19.0",
</s> add "version": "3.20.0", </s> remove "version": "3.19.1",
</s> add "version": "3.20.0", </s> remove "version": "3.8.1",
</s> add "version": "3.8.2", | "version": "0.10.1", | {
"name": "@blueprintjs/test-commons",
"version": "0.10.1",
"description": "Common utilities for tests in @blueprintjs packages",
"main": "lib/cjs/index.js",
"typings": "lib/cjs/index.d.ts",
"scripts": {
"compile": "tsc -p ./src", | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Publish
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected]
- @blueprintjs/[email protected] | https://github.com/palantir/blueprint/commit/abcfe1d450be522c0a0d469ab751b99f5776a2e1 | packages/test-commons/package.json |
import * as classNames from "classnames";
import * as React from "react";
import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
import { Classes, IIntentProps, IProps } from "../../common";
export { IconName };
export interface IIconProps extends IIntentProps, IProps {
| </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove iconName?: LegacyIconName;
</s> add iconName?: IconName; </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove const normalizedIconName = iconName.replace("pt-icon-", "") as IconName;
</s> add | import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; |
import * as classNames from "classnames";
import * as React from "react";
import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons";
import { Classes, IIntentProps, IProps } from "../../common";
export { IconName };
export interface IIconProps extends IIntentProps, IProps { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
/**
* Name of the icon (with or without `"pt-icon-"` prefix).
* If omitted or `undefined`, this component will render nothing.
*/
iconName?: LegacyIconName;
/**
* Size of the icon, in pixels.
* Blueprint contains 16px and 20px SVG icon images,
* and chooses the appropriate resolution based on this prop.
| </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; </s> remove import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
</s> add import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); | iconName?: IconName; | /**
* Name of the icon (with or without `"pt-icon-"` prefix).
* If omitted or `undefined`, this component will render nothing.
*/
iconName?: IconName;
/**
* Size of the icon, in pixels.
* Blueprint contains 16px and 20px SVG icon images,
* and chooses the appropriate resolution based on this prop. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
if (this.props.iconName == null) {
return null;
}
const { className, iconName, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
const normalizedIconName = iconName.replace("pt-icon-", "") as IconName;
// choose which pixel grid is most appropriate for given icon size
const pixelGridSize = iconSize >= Icon.SIZE_LARGE ? Icon.SIZE_LARGE : Icon.SIZE_STANDARD;
const classes = classNames(Classes.ICON, Classes.intentClass(intent), className);
const viewBox = `0 0 ${pixelGridSize} ${pixelGridSize}`;
| </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
</s> add import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | if (this.props.iconName == null) {
return null;
}
const { className, iconName, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
// choose which pixel grid is most appropriate for given icon size
const pixelGridSize = iconSize >= Icon.SIZE_LARGE ? Icon.SIZE_LARGE : Icon.SIZE_STANDARD;
const classes = classNames(Classes.ICON, Classes.intentClass(intent), className);
const viewBox = `0 0 ${pixelGridSize} ${pixelGridSize}`; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
|
// choose which pixel grid is most appropriate for given icon size
const pixelGridSize = iconSize >= Icon.SIZE_LARGE ? Icon.SIZE_LARGE : Icon.SIZE_STANDARD;
const classes = classNames(Classes.ICON, Classes.intentClass(intent), className);
const viewBox = `0 0 ${pixelGridSize} ${pixelGridSize}`;
return (
<svg
| </s> remove const normalizedIconName = iconName.replace("pt-icon-", "") as IconName;
</s> add </s> remove data-icon={normalizedIconName}
</s> add data-icon={iconName} </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove iconName?: LegacyIconName;
</s> add iconName?: IconName; | const paths = this.renderSvgPaths(pixelGridSize, iconName);
if (paths == null) {
return null;
}
|
// choose which pixel grid is most appropriate for given icon size
const pixelGridSize = iconSize >= Icon.SIZE_LARGE ? Icon.SIZE_LARGE : Icon.SIZE_STANDARD;
const paths = this.renderSvgPaths(pixelGridSize, iconName);
if (paths == null) {
return null;
}
const classes = classNames(Classes.ICON, Classes.intentClass(intent), className);
const viewBox = `0 0 ${pixelGridSize} ${pixelGridSize}`;
return (
<svg | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
return (
<svg
{...svgProps}
className={classes}
data-icon={normalizedIconName}
width={iconSize}
height={iconSize}
viewBox={viewBox}
>
<title>{normalizedIconName}</title>
| </s> remove <title>{normalizedIconName}</title>
{this.renderSvgPaths(pixelGridSize, normalizedIconName)}
</s> add <title>{iconName}</title>
{paths} </s> remove const normalizedIconName = iconName.replace("pt-icon-", "") as IconName;
</s> add </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); | data-icon={iconName} | return (
<svg
{...svgProps}
className={classes}
data-icon={iconName}
width={iconSize}
height={iconSize}
viewBox={viewBox}
>
<title>{normalizedIconName}</title> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
width={iconSize}
height={iconSize}
viewBox={viewBox}
>
<title>{normalizedIconName}</title>
{this.renderSvgPaths(pixelGridSize, normalizedIconName)}
</svg>
);
}
private renderSvgPaths(pathsSize: number, iconName: IconName) {
| </s> remove data-icon={normalizedIconName}
</s> add data-icon={iconName} </s> remove ...ICONS_METADATA.map(i => ` "${i.className.replace("pt-icon-", "")}": $${i.className},`),
</s> add ...ICONS_METADATA.map(icon => ` "${toShortName(icon)}": $${icon.className},`), </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
</s> add import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | <title>{iconName}</title>
{paths} | width={iconSize}
height={iconSize}
viewBox={viewBox}
>
<title>{iconName}</title>
{paths}
<title>{iconName}</title>
{paths}
</svg>
);
}
private renderSvgPaths(pathsSize: number, iconName: IconName) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/src/components/icon/icon.tsx |
assert.isTrue(shallow(<Icon iconName="add" intent={Intent.DANGER} />).hasClass(Classes.INTENT_DANGER)));
it("renders iconName class", () => assertIcon(<Icon iconName="calendar" />, "calendar"));
it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
it("iconName=undefined renders nothing", () => {
const icon = shallow(<Icon iconName={undefined} />);
assert.isTrue(icon.isEmptyRender());
});
| </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove const normalizedIconName = iconName.replace("pt-icon-", "") as IconName;
</s> add | it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); | assert.isTrue(shallow(<Icon iconName="add" intent={Intent.DANGER} />).hasClass(Classes.INTENT_DANGER)));
it("renders iconName class", () => assertIcon(<Icon iconName="calendar" />, "calendar"));
it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
});
it("iconName=undefined renders nothing", () => {
const icon = shallow(<Icon iconName={undefined} />);
assert.isTrue(icon.isEmptyRender());
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/core/test/icon/iconTests.tsx |
*
* Licensed under the terms of the LICENSE file distributed with this project.
*/
export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
| </s> remove import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
</s> add import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; </s> remove iconName?: LegacyIconName;
</s> add iconName?: IconName; </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove <title>{normalizedIconName}</title>
{this.renderSvgPaths(pixelGridSize, normalizedIconName)}
</s> add <title>{iconName}</title>
{paths} </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); | import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | *
* Licensed under the terms of the LICENSE file distributed with this project.
*/
import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName";
import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName";
import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName";
import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/icons/src/index.ts |
writeLinesToFile(
"_icon-map.scss",
'@import "icon-variables";',
"$icons: (",
...ICONS_METADATA.map(i => ` "${i.className.replace("pt-icon-", "")}": $${i.className},`),
");",
);
// simple variable definitions
writeLinesToFile("_icon-variables.scss", ...ICONS_METADATA.map(icon => `$${icon.className}: "${icon.content}";`));
| </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove <title>{normalizedIconName}</title>
{this.renderSvgPaths(pixelGridSize, normalizedIconName)}
</s> add <title>{iconName}</title>
{paths} </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); | ...ICONS_METADATA.map(icon => ` "${toShortName(icon)}": $${icon.className},`), | writeLinesToFile(
"_icon-map.scss",
'@import "icon-variables";',
"$icons: (",
...ICONS_METADATA.map(icon => ` "${toShortName(icon)}": $${icon.className},`),
");",
);
// simple variable definitions
writeLinesToFile("_icon-variables.scss", ...ICONS_METADATA.map(icon => `$${icon.className}: "${icon.content}";`)); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/node-build-scripts/generate-icons-source |
// simple variable definitions
writeLinesToFile("_icon-variables.scss", ...ICONS_METADATA.map(icon => `$${icon.className}: "${icon.content}";`));
// map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
// map ENUM_NAME to unicode character
writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
(async () => {
| </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); </s> remove ...ICONS_METADATA.map(i => ` "${i.className.replace("pt-icon-", "")}": $${i.className},`),
</s> add ...ICONS_METADATA.map(icon => ` "${toShortName(icon)}": $${icon.className},`), </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); |
// simple variable definitions
writeLinesToFile("_icon-variables.scss", ...ICONS_METADATA.map(icon => `$${icon.className}: "${icon.content}";`));
// map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className));
// map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className));
// map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className));
// map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className));
// map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className));
// map ENUM_NAME to unicode character
writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
(async () => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/node-build-scripts/generate-icons-source |
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
// map ENUM_NAME to unicode character
writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
(async () => {
// SVG path strings. IIFE to unwrap async.
writeLinesToFile(
"iconSvgPaths.ts",
| </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove 'import { IconName } from "./iconName";',
</s> add 'import { IconName } from "../iconName";', </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); </s> remove ...ICONS_METADATA.map(i => ` "${i.className.replace("pt-icon-", "")}": $${i.className},`),
</s> add ...ICONS_METADATA.map(icon => ` "${toShortName(icon)}": $${icon.className},`), </s> remove iconName?: LegacyIconName;
</s> add iconName?: IconName; | writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); | // union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
// map ENUM_NAME to unicode character
writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName));
(async () => {
// SVG path strings. IIFE to unwrap async.
writeLinesToFile(
"iconSvgPaths.ts", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/node-build-scripts/generate-icons-source |
(async () => {
// SVG path strings. IIFE to unwrap async.
writeLinesToFile(
"iconSvgPaths.ts",
'import { IconName } from "./iconName";',
"",
"export const IconSvgPaths16: Record<IconName, string[]> = {",
...(await buildPathsObject("IconSvgPaths", 16)),
"};",
"",
| </s> remove writeLinesToFile("iconStrings.ts", ...buildTSObject("IconContents", icon => icon.content.replace("\\", "\\u")));
</s> add writeLinesToFile("iconContents.ts", ...exportIconConsts(icon => icon.content.replace("\\", "\\u")));
// map ENUM_NAME to icon-name
writeLinesToFile("iconNames.ts", ...exportIconConsts(toShortName)); </s> remove it("supports prefixed iconName", () => assertIcon(<Icon iconName={IconClasses.AIRPLANE} />, "airplane"));
</s> add it("prefixed iconName renders nothing", () => {
// @ts-ignore invalid iconName
const icon = shallow(<Icon iconName={IconClasses.AIRPLANE} />);
assert.isTrue(icon.isEmptyRender());
}); </s> remove // map ENUM_NAME to className (cast as string constant so it can be used as IconName)
writeLinesToFile("iconClasses.ts", ...buildTSObject("IconClasses", icon => `${icon.className}" as "${icon.className}`));
// union type of all valid string names
writeLinesToFile("iconName.ts", ...buildUnionType());
</s> add // map ENUM_NAME to pt-icon-class-name
writeLinesToFile("iconClasses.ts", ...exportIconConsts(icon => icon.className)); </s> remove import { IconName, IconSvgPaths16, IconSvgPaths20, LegacyIconName } from "@blueprintjs/icons";
</s> add import { IconName, IconSvgPaths16, IconSvgPaths20 } from "@blueprintjs/icons"; </s> remove export { IconClasses } from "./generated/iconClasses";
export { IconName, LegacyIconName } from "./generated/iconName";
export { IconContents } from "./generated/iconStrings";
export { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
</s> add import * as IconClasses from "./generated/iconClasses";
import * as IconContents from "./generated/iconContents";
import * as IconNames from "./generated/iconNames";
import { IconSvgPaths16, IconSvgPaths20 } from "./generated/iconSvgPaths";
export { IconClasses, IconContents, IconNames, IconSvgPaths16, IconSvgPaths20 };
export { IconName } from "./iconName"; | 'import { IconName } from "../iconName";', | (async () => {
// SVG path strings. IIFE to unwrap async.
writeLinesToFile(
"iconSvgPaths.ts",
'import { IconName } from "../iconName";',
"",
"export const IconSvgPaths16: Record<IconName, string[]> = {",
...(await buildPathsObject("IconSvgPaths", 16)),
"};",
"", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | short icon names only (#2072)
* generate-icons-source produces files that export many consts instead of one object. upside is they're all string literals without the `as` cast.
* use `import * as` to glob generated consts into objects.
IconName becomes derived type from shape of IconNames
* :fire: remove LegacyIconName usage
* remove normalizedIconName, ts-ignore test compiler error | https://github.com/palantir/blueprint/commit/ac0103b6f27d369b8eeb77e8bcd0bdfcf07c0c3d | packages/node-build-scripts/generate-icons-source |
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import "../common/configureDom4";
export * from "./alert/alert";
export { Breadcrumb, BreadcrumbProps } from "./breadcrumbs/breadcrumb";
export { Breadcrumbs, BreadcrumbsProps } from "./breadcrumbs/breadcrumbs";
export * from "./button/buttons";
export * from "./button/buttonGroup";
| </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); | * See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from "./alert/alert";
export { Breadcrumb, BreadcrumbProps } from "./breadcrumbs/breadcrumb";
export { Breadcrumbs, BreadcrumbsProps } from "./breadcrumbs/breadcrumbs";
export * from "./button/buttons";
export * from "./button/buttonGroup"; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/src/components/index.ts |
|
// popper innerRef gives us a handle on the transition container, since that's what we render as the overlay child,
// so if we want to look at our actual popover element, we need to reach inside a bit
private getPopoverElement() {
return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
}
private getIsOpen(props: PopoverProps<T>) {
// disabled popovers should never be allowed to open.
if (props.disabled) {
| </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); | return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); |
// popper innerRef gives us a handle on the transition container, since that's what we render as the overlay child,
// so if we want to look at our actual popover element, we need to reach inside a bit
private getPopoverElement() {
return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`);
}
private getIsOpen(props: PopoverProps<T>) {
// disabled popovers should never be allowed to open.
if (props.disabled) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/src/components/popover/popover.tsx |
return;
}
const tabIdSelector = `${TAB_SELECTOR}[data-tab-id="${this.state.selectedTabId}"]`;
const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
let indicatorWrapperStyle: React.CSSProperties = { display: "none" };
if (selectedTabElement != null) {
const { clientHeight, clientWidth, offsetLeft, offsetTop } = selectedTabElement;
indicatorWrapperStyle = {
| </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove bodyElement = containerElement.querySelector(".body") as HTMLElement;
</s> add bodyElement = containerElement.querySelector<HTMLElement>(".body")!; </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); | const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); | return;
}
const tabIdSelector = `${TAB_SELECTOR}[data-tab-id="${this.state.selectedTabId}"]`;
const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector);
let indicatorWrapperStyle: React.CSSProperties = { display: "none" };
if (selectedTabElement != null) {
const { clientHeight, clientWidth, offsetLeft, offsetTop } = selectedTabElement;
indicatorWrapperStyle = { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/src/components/tabs/tabs.tsx |
const VALUE = "12345678";
describe("selectAllOnFocus", () => {
it("if false (the default), does not select any text on focus", () => {
const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
input.focus();
expect(input.selectionStart).to.equal(input.selectionEnd);
| </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; | const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); | const VALUE = "12345678";
describe("selectAllOnFocus", () => {
it("if false (the default), does not select any text on focus", () => {
const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement });
const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement });
const input = attachTo.querySelector("input") as HTMLInputElement;
input.focus();
expect(input.selectionStart).to.equal(input.selectionEnd); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/controls/numericInputTests.tsx |
it("if false (the default), does not select any text on focus", () => {
const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
input.focus();
expect(input.selectionStart).to.equal(input.selectionEnd);
});
| </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; | const input = containerElement.querySelector("input")!; | it("if false (the default), does not select any text on focus", () => {
const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
const input = containerElement.querySelector("input")!;
input.focus();
expect(input.selectionStart).to.equal(input.selectionEnd);
});
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/controls/numericInputTests.tsx |
const input = mount(<NumericInput value={VALUE} selectAllOnFocus={true} />, {
attachTo,
}).find("input");
input.simulate("focus");
const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
expect(selectionStart).to.equal(0);
expect(selectionEnd).to.equal(VALUE.length);
});
});
| </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; | const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); | const input = mount(<NumericInput value={VALUE} selectAllOnFocus={true} />, {
attachTo,
}).find("input");
input.simulate("focus");
const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>();
expect(selectionStart).to.equal(0);
expect(selectionEnd).to.equal(VALUE.length);
});
});
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/controls/numericInputTests.tsx |
const wrappedInput = component.find(InputGroup).find("input");
wrappedInput.simulate("keyDown", INCREMENT_KEYSTROKE);
const input = attachTo.querySelector("input") as HTMLInputElement;
expect(input.selectionStart).to.equal(input.selectionEnd);
});
it("if true, selects all text on increment", () => {
const attachTo = document.createElement("div");
| </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); | const input = attachTo.querySelector<HTMLInputElement>("input")!; |
const wrappedInput = component.find(InputGroup).find("input");
wrappedInput.simulate("keyDown", INCREMENT_KEYSTROKE);
const input = attachTo.querySelector<HTMLInputElement>("input")!;
expect(input.selectionStart).to.equal(input.selectionEnd);
});
it("if true, selects all text on increment", () => {
const attachTo = document.createElement("div"); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/controls/numericInputTests.tsx |
const wrappedInput = component.find(InputGroup).find("input");
wrappedInput.simulate("keyDown", INCREMENT_KEYSTROKE);
const input = attachTo.querySelector("input") as HTMLInputElement;
expect(input.selectionStart).to.equal(0);
expect(input.selectionEnd).to.equal(VALUE.length);
});
});
});
| </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; | const input = attachTo.querySelector<HTMLInputElement>("input")!; |
const wrappedInput = component.find(InputGroup).find("input");
wrappedInput.simulate("keyDown", INCREMENT_KEYSTROKE);
const input = attachTo.querySelector<HTMLInputElement>("input")!;
expect(input.selectionStart).to.equal(0);
expect(input.selectionEnd).to.equal(VALUE.length);
});
});
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/controls/numericInputTests.tsx |
});
it("caret is placed at the end of the input box", () => {
// mount into a DOM element so we can get the input to inspect its HTML props
const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
assert.strictEqual(input.selectionStart, 8);
assert.strictEqual(input.selectionEnd, 8);
});
it("controlled mode can only change value via props", () => {
| </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); | const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; | });
it("caret is placed at the end of the input box", () => {
// mount into a DOM element so we can get the input to inspect its HTML props
const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!;
const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!;
const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!;
assert.strictEqual(input.selectionStart, 8);
assert.strictEqual(input.selectionEnd, 8);
});
it("controlled mode can only change value via props", () => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/core/test/editable-text/editableTextTests.tsx |
entry: {
"docs-app": [
// environment polyfills
"dom4",
"./polyfill.js",
// bundle entry points
"./src/index.tsx",
"./src/index.scss",
],
| </s> remove mainQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_MAIN}`) as HTMLElement,
leftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_LEFT}`) as HTMLElement,
topQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP}`) as HTMLElement,
topLeftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`) as HTMLElement,
</s> add mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!, </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; |
entry: {
"docs-app": [
// environment polyfills
"./polyfill.js",
// bundle entry points
"./src/index.tsx",
"./src/index.scss",
], | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/docs-app/webpack.config.mjs |
|
private maybeScrollToActivePageMenuItem() {
const { activeSectionId } = this.state;
// only scroll nav menu if active item is not visible in viewport.
// using activeSectionId so you can see the page title in nav (may not be visible in document).
const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
const scrollOffset = navItemElement.offsetTop - this.navElement.scrollTop;
if (scrollOffset < 0 || scrollOffset > this.navElement.offsetHeight) {
// reveal two items above this item in list
this.navElement.scrollTop = navItemElement.offsetTop - navItemElement.offsetHeight * 2;
}
| </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); | const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); | private maybeScrollToActivePageMenuItem() {
const { activeSectionId } = this.state;
// only scroll nav menu if active item is not visible in viewport.
// using activeSectionId so you can see the page title in nav (may not be visible in document).
const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`);
const scrollOffset = navItemElement.offsetTop - this.navElement.scrollTop;
if (scrollOffset < 0 || scrollOffset > this.navElement.offsetHeight) {
// reveal two items above this item in list
this.navElement.scrollTop = navItemElement.offsetTop - navItemElement.offsetHeight * 2;
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/docs-theme/src/components/documentation.tsx |
"dependencies": {
"@blueprintjs/core": "^4.18.0",
"@blueprintjs/table": "^4.10.1",
"classnames": "^2.3.1",
"dom4": "^2.1.5",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"react": "^16.14.0",
"react-dom": "^16.14.0"
},
| </s> remove dom4: "window",
</s> add </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove return element.querySelector(
`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
) as HTMLElement;
</s> add return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!; </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); | "dependencies": {
"@blueprintjs/core": "^4.18.0",
"@blueprintjs/table": "^4.10.1",
"classnames": "^2.3.1",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"react": "^16.14.0",
"react-dom": "^16.14.0"
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table-dev-app/package.json |
|
containerElement,
);
locator = new LocatorImpl(
containerElement.querySelector(".table-wrapper") as HTMLElement,
containerElement.querySelector(".body") as HTMLElement,
containerElement.querySelector(".body-client") as HTMLElement,
);
locator.setGrid(grid);
});
afterEach(() => {
| </s> remove mainQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_MAIN}`) as HTMLElement,
leftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_LEFT}`) as HTMLElement,
topQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP}`) as HTMLElement,
topLeftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`) as HTMLElement,
</s> add mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!, </s> remove return element.querySelector(
`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
) as HTMLElement;
</s> add return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!; </s> remove bodyElement = containerElement.querySelector(".body") as HTMLElement;
</s> add bodyElement = containerElement.querySelector<HTMLElement>(".body")!; </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); | containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!, | containerElement,
);
locator = new LocatorImpl(
containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!,
containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!,
containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!,
);
locator.setGrid(grid);
});
afterEach(() => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/locatorTests.tsx |
const NUM_COLUMNS_SCROLLED_OUT_OF_VIEW = 1;
const NUM_ROWS_SCROLLED_OUT_OF_VIEW = 1;
beforeEach(() => {
bodyElement = containerElement.querySelector(".body") as HTMLElement;
originalOverflow = bodyElement.style.overflow;
originalHeight = bodyElement.style.height;
originalWidth = bodyElement.style.width;
originalScrollLeft = bodyElement.scrollLeft;
| </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = attachTo.querySelector<HTMLInputElement>("input")!; </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); </s> remove const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const input = containerElement.querySelector("input")!; </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); | bodyElement = containerElement.querySelector<HTMLElement>(".body")!; | const NUM_COLUMNS_SCROLLED_OUT_OF_VIEW = 1;
const NUM_ROWS_SCROLLED_OUT_OF_VIEW = 1;
beforeEach(() => {
bodyElement = containerElement.querySelector<HTMLElement>(".body")!;
originalOverflow = bodyElement.style.overflow;
originalHeight = bodyElement.style.height;
originalWidth = bodyElement.style.width;
originalScrollLeft = bodyElement.scrollLeft; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/locatorTests.tsx |
const { mainQuadrant, topQuadrant, leftQuadrant } = findQuadrants(container);
// measure the scrollbar size for our test environment.
// we assume this utility works, because it's unit-tested elsewhere.
const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
const { width: mainWidth, height: mainHeight } = mainQuadrant.getBoundingClientRect();
expect(mainWidth).to.equal(containerWidth);
expect(mainHeight).to.equal(containerHeight);
| </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove mainQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_MAIN}`) as HTMLElement,
leftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_LEFT}`) as HTMLElement,
topQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP}`) as HTMLElement,
topLeftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`) as HTMLElement,
</s> add mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!, </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); | const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); | const { mainQuadrant, topQuadrant, leftQuadrant } = findQuadrants(container);
// measure the scrollbar size for our test environment.
// we assume this utility works, because it's unit-tested elsewhere.
const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical");
const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical");
const { width: mainWidth, height: mainHeight } = mainQuadrant.getBoundingClientRect();
expect(mainWidth).to.equal(containerWidth);
expect(mainHeight).to.equal(containerHeight);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/quadrants/tableQuadrantStackTests.tsx |
}
function findQuadrantScrollContainer(element: HTMLElement, quadrantType: QuadrantType) {
const quadrantClass = getQuadrantCssClass(quadrantType);
return element.querySelector(
`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
) as HTMLElement;
}
function getQuadrantCssClass(quadrantType: QuadrantType) {
switch (quadrantType) {
case QuadrantType.MAIN:
| </s> remove mainQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_MAIN}`) as HTMLElement,
leftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_LEFT}`) as HTMLElement,
topQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP}`) as HTMLElement,
topLeftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`) as HTMLElement,
</s> add mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!, </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove const { selectionStart, selectionEnd } = input.getDOMNode() as HTMLInputElement;
</s> add const { selectionStart, selectionEnd } = input.getDOMNode<HTMLInputElement>(); </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove containerElement.querySelector(".table-wrapper") as HTMLElement,
containerElement.querySelector(".body") as HTMLElement,
containerElement.querySelector(".body-client") as HTMLElement,
</s> add containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!, | return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!; | }
function findQuadrantScrollContainer(element: HTMLElement, quadrantType: QuadrantType) {
const quadrantClass = getQuadrantCssClass(quadrantType);
return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!;
return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!;
return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!;
}
function getQuadrantCssClass(quadrantType: QuadrantType) {
switch (quadrantType) {
case QuadrantType.MAIN: | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/quadrants/tableQuadrantStackTests.tsx |
const htmlElement = element as HTMLElement;
// this order is clearer than alphabetical order
// tslint:disable:object-literal-sort-keys
return {
mainQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_MAIN}`) as HTMLElement,
leftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_LEFT}`) as HTMLElement,
topQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP}`) as HTMLElement,
topLeftQuadrant: htmlElement.querySelector(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`) as HTMLElement,
};
// tslint:enable:object-literal-sort-keys
}
function renderIntoDom(element: JSX.Element) {
| </s> remove return element.querySelector(
`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
) as HTMLElement;
</s> add return element.querySelector<HTMLElement>(`.${quadrantClass} .${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`)!; </s> remove containerElement.querySelector(".table-wrapper") as HTMLElement,
containerElement.querySelector(".body") as HTMLElement,
containerElement.querySelector(".body-client") as HTMLElement,
</s> add containerElement.querySelector<HTMLElement>(".table-wrapper")!,
containerElement.querySelector<HTMLElement>(".body")!,
containerElement.querySelector<HTMLElement>(".body-client")!, </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); | mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!, | const htmlElement = element as HTMLElement;
// this order is clearer than alphabetical order
// tslint:disable:object-literal-sort-keys
return {
mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!,
mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!,
mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!,
mainQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_MAIN}`)!,
leftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_LEFT}`)!,
topQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP}`)!,
topLeftQuadrant: htmlElement.querySelector<HTMLElement>(`.${Classes.TABLE_QUADRANT_TOP_LEFT}`)!,
};
// tslint:enable:object-literal-sort-keys
}
function renderIntoDom(element: JSX.Element) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/quadrants/tableQuadrantStackTests.tsx |
scrollLeft,
scrollTop,
};
const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
const rowHeaderWidth = rowHeadersElement == null ? 0 : parseInt(rowHeadersElement.style.width, 10);
// the scrollContainerElement *contains* the cellContainerElement, so
// when we scroll the former, the latter's bounding rect offsets change
// commensurately.
| </s> remove const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
</s> add const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); </s> remove const navItemElement = this.navElement.querySelector(`a[href="#${activeSectionId}"]`) as HTMLElement;
</s> add const navItemElement = this.navElement.querySelector<HTMLElement>(`a[href="#${activeSectionId}"]`); </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove const mainScrollContainer = mainQuadrant.querySelector(`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`);
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer as HTMLElement, "vertical");
</s> add const mainScrollContainer = mainQuadrant.querySelector<HTMLElement>(
`.${Classes.TABLE_QUADRANT_SCROLL_CONTAINER}`,
)!;
const scrollbarSize = ScrollUtils.measureScrollBarThickness(mainScrollContainer, "vertical"); </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); | const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); | scrollLeft,
scrollTop,
};
const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`);
const rowHeaderWidth = rowHeadersElement == null ? 0 : parseInt(rowHeadersElement.style.width, 10);
// the scrollContainerElement *contains* the cellContainerElement, so
// when we scroll the former, the latter's bounding rect offsets change
// commensurately. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/table2Tests.tsx |
scrollLeft,
scrollTop,
};
const rowHeadersElement = table.getDOMNode().querySelector(`.${Classes.TABLE_ROW_HEADERS}`) as HTMLElement;
const rowHeaderWidth = rowHeadersElement == null ? 0 : parseInt(rowHeadersElement.style.width, 10);
// the scrollContainerElement *contains* the cellContainerElement, so
// when we scroll the former, the latter's bounding rect offsets change
// commensurately.
| </s> | const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`); | scrollLeft,
scrollTop,
};
const rowHeadersElement = table.getDOMNode().querySelector<HTMLElement>(`.${Classes.TABLE_ROW_HEADERS}`);
const rowHeaderWidth = rowHeadersElement == null ? 0 : parseInt(rowHeadersElement.style.width, 10);
// the scrollContainerElement *contains* the cellContainerElement, so
// when we scroll the former, the latter's bounding rect offsets change
// commensurately. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/table/test/tableTests.tsx |
"@blueprintjs/datetime": ["Blueprint", "Datetime"],
"@blueprintjs/select": ["Blueprint", "Select"],
"@blueprintjs/table": ["Blueprint", "Table"],
classnames: "classNames",
dom4: "window",
"popper.js": "Popper",
react: "React",
"react-day-picker": "DayPicker",
"react-dom": "ReactDOM",
"react-popper": "ReactPopper",
| </s> remove "dom4": "^2.1.5",
</s> add </s> remove const attachTo = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo });
const input = attachTo.querySelector("input") as HTMLInputElement;
</s> add const containerElement = document.createElement("div");
mount(<EditableText isEditing={true} value="alphabet" />, { attachTo: containerElement });
const input = containerElement.querySelector<HTMLInputElement>("input")!; </s> remove return this.popoverElement?.querySelector(`.${Classes.POPOVER}`);
</s> add return this.popoverElement?.querySelector<HTMLElement>(`.${Classes.POPOVER}`); </s> remove const selectedTabElement = this.tablistElement.querySelector(tabIdSelector) as HTMLElement;
</s> add const selectedTabElement = this.tablistElement.querySelector<HTMLElement>(tabIdSelector); </s> remove const attachTo = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo });
</s> add const containerElement = document.createElement("div");
mount(<NumericInput value="12345678" />, { attachTo: containerElement }); | "@blueprintjs/datetime": ["Blueprint", "Datetime"],
"@blueprintjs/select": ["Blueprint", "Select"],
"@blueprintjs/table": ["Blueprint", "Table"],
classnames: "classNames",
"popper.js": "Popper",
react: "React",
"react-day-picker": "DayPicker",
"react-dom": "ReactDOM",
"react-popper": "ReactPopper", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [v5] break: remove dom4 dependency (#6099) | https://github.com/palantir/blueprint/commit/ac07ac17d08b473e6625213197652754b2d8a48d | packages/webpack-build-scripts/externals.mjs |
|
"@types/react-addons-css-transition-group": "0.14.17",
"@types/react-addons-test-utils": "0.14.15",
"@types/react-addons-transition-group": "0.14.17",
"@types/react-dom": "0.14.17",
"@types/tether": "1.1.27",
"autoprefixer": "6.5.2",
"better-handlebars": "github:wmeldon/better-handlebars",
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove /// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add | "@types/react-day-picker": "1.2.33", | "@types/react-addons-css-transition-group": "0.14.17",
"@types/react-addons-test-utils": "0.14.15",
"@types/react-addons-transition-group": "0.14.17",
"@types/react-day-picker": "1.2.33",
"@types/react-dom": "0.14.17",
"@types/tether": "1.1.27",
"autoprefixer": "6.5.2",
"better-handlebars": "github:wmeldon/better-handlebars", | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | package.json |
/**
* Whether to show arrows buttons for changing the time.
* @default false
*/
showArrowButtons?: Boolean;
/**
* The currently set time.
* If this prop is present, the component acts in a controlled manner.
*/
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove /// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add | showArrowButtons?: boolean; | /**
* Whether to show arrows buttons for changing the time.
* @default false
*/
showArrowButtons?: boolean;
/**
* The currently set time.
* If this prop is present, the component acts in a controlled manner.
*/ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/datetime/src/timePicker.tsx |
"stripInternal": true,
"target": "es5"
},
"include": [
"typings/tsd.d.ts",
"src/**/*"
],
"exclude": [
"node_modules",
"dist",
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add | "stripInternal": true,
"target": "es5"
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/datetime/tsconfig.json |
|
"declaration": false,
"experimentalDecorators": true,
"jsx": "react",
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "typings/tsd.d.ts",
</s> add </s> remove /// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
</s> add | "lib": [
"dom",
"es2015.core",
"es2015.collection",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.reflect",
"es2015.symbol",
"es5"
], | "declaration": false,
"experimentalDecorators": true,
"jsx": "react",
"lib": [
"dom",
"es2015.core",
"es2015.collection",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.reflect",
"es2015.symbol",
"es5"
],
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/docs/tsconfig.json |
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
"chroma-js/chroma-js.d.ts": {
"commit": "3abf7a7bd48328caa63a30c0b26467f8c17bff12"
}
}
}
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "typings/tsd.d.ts",
</s> add </s> remove /// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
</s> add | "ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"chroma-js/chroma-js.d.ts": {
"commit": "3abf7a7bd48328caa63a30c0b26467f8c17bff12"
}
}
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/docs/tsd.json |
|
/// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
/// <reference path="chroma-js/chroma-js.d.ts" />
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add |
/// <reference path="chroma-js/chroma-js.d.ts" /> | [
"replace",
"replace",
"replace",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/docs/typings/tsd.d.ts |
|
* and https://github.com/palantir/blueprint/blob/master/PATENTS
*/
import { IRegion, RegionCardinality, Regions } from "../regions";
import { Rect } from "./rect";
import { Utils } from "./utils";
export type ICellMapper<T> = (rowIndex: number, columnIndex: number) => T;
| </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add </s> remove showArrowButtons?: Boolean;
</s> add showArrowButtons?: boolean; </s> remove "typings/tsd.d.ts",
</s> add </s> remove /// <reference path="es6-shim/es6-shim.d.ts" />
/// <reference path="react-day-picker/react-day-picker.d.ts" />
/// <reference path="whatwg-fetch/whatwg-fetch.d.ts" />
</s> add | import * as React from "react";
| * and https://github.com/palantir/blueprint/blob/master/PATENTS
*/
import * as React from "react";
import { IRegion, RegionCardinality, Regions } from "../regions";
import { Rect } from "./rect";
import { Utils } from "./utils";
export type ICellMapper<T> = (rowIndex: number, columnIndex: number) => T; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/table/src/common/grid.ts |
"compilerOptions": {
"declaration": true,
"experimentalDecorators": true,
"jsx": "react",
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "dist",
"removeComments": false,
"sourceMap": false,
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "typings/tsd.d.ts",
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add | "lib": [
"dom",
"es2015.core",
"es2015.collection",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.reflect",
"es2015.symbol",
"es5"
], | "compilerOptions": {
"declaration": true,
"experimentalDecorators": true,
"jsx": "react",
"lib": [
"dom",
"es2015.core",
"es2015.collection",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.reflect",
"es2015.symbol",
"es5"
],
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "dist",
"removeComments": false,
"sourceMap": false, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/table/tsconfig.json |
"stripInternal": false,
"target": "es5"
},
"include": [
"typings/tsd.d.ts",
"preview/*.d.ts",
"src/**/*"
],
"exclude": [
"dist",
| </s> remove "typings/tsd.d.ts",
</s> add </s> remove "es6-shim/es6-shim.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"whatwg-fetch/whatwg-fetch.d.ts": {
"commit": "e4503bad7d13c243c38201cc0b6a15981297226d"
},
"react-day-picker/react-day-picker.d.ts": {
"commit": "35b24575255b09ecdfdf80094b51165407790cbc"
},
</s> add | "stripInternal": false,
"target": "es5"
},
"include": [
"preview/*.d.ts",
"src/**/*"
],
"exclude": [
"dist", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Migrate es6-shim whatwg-fetch react-day-picker typings (#475)
Move typings to @types and typescript lib | https://github.com/palantir/blueprint/commit/ac82797060cc24f5603511f4e952655f26a5fbe2 | packages/table/tsconfig.json |
|
setWidth(span.current.offsetWidth);
}
}, [content]);
const { onChange, ...otherProps } = props;
const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = evt => {
onChange?.(evt);
setContent(evt?.target?.value ?? "");
};
| </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} | const { onChange, style, ...otherProps } = props; | setWidth(span.current.offsetWidth);
}
}, [content]);
const { onChange, style, ...otherProps } = props;
const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = evt => {
onChange?.(evt);
setContent(evt?.target?.value ?? "");
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/resizableInput.tsx |
};
return (
<>
<span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
{/* Need to replace spaces with the html character for them to be preserved */}
{content.replace(/ /g, "\u00a0")}
</span>
<input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</>
| </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> </s> remove <H5>Props</H5>
</s> add <H5>Appearance props</H5> </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} | <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> | };
return (
<>
<span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}>
{/* Need to replace spaces with the html character for them to be preserved */}
{content.replace(/ /g, "\u00a0")}
</span>
<input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/resizableInput.tsx |
<span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
{/* Need to replace spaces with the html character for them to be preserved */}
{content.replace(/ /g, "\u00a0")}
</span>
<input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</>
);
});
ResizableInput.displayName = `${DISPLAYNAME_PREFIX}.ResizableInput`;
| </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} | <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> | <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
{/* Need to replace spaces with the html character for them to be preserved */}
{content.replace(/ /g, "\u00a0")}
</span>
<input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} />
</>
);
});
ResizableInput.displayName = `${DISPLAYNAME_PREFIX}.ResizableInput`; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/resizableInput.tsx |
* @default true
*/
addOnPaste?: boolean;
children?: React.ReactNode;
/**
* Whether the component is non-interactive.
| </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> | /**
* Whether the component should automatically resize as a user types in the text input.
* This will have no effect when `fill={true}`.
*
* @default false
*/
autoResize?: boolean;
/**
* Optional child elements which will be rendered between the selected tags and
* the text input. Rendering children is usually unnecessary.
*
* @default undefined
*/ | * @default true
*/
addOnPaste?: boolean;
/**
* Whether the component should automatically resize as a user types in the text input.
* This will have no effect when `fill={true}`.
*
* @default false
*/
autoResize?: boolean;
/**
* Optional child elements which will be rendered between the selected tags and
* the text input. Rendering children is usually unnecessary.
*
* @default undefined
*/
children?: React.ReactNode;
/**
* Whether the component is non-interactive. | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
/**
* React props to pass to the `<input>` element.
* Note that `ref` and `key` are not supported here; use `inputRef` below.
*/
inputProps?: HTMLInputProps;
/** Ref handler for the `<input>` element. */
| </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> | * Also note that `inputProps.style.width` will be overriden if `autoResize={true}`. |
/**
* React props to pass to the `<input>` element.
* Note that `ref` and `key` are not supported here; use `inputRef` below.
* Also note that `inputProps.style.width` will be overriden if `autoResize={true}`.
*/
inputProps?: HTMLInputProps;
/** Ref handler for the `<input>` element. */ | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
public static defaultProps: Partial<TagInputProps> = {
addOnBlur: false,
addOnPaste: true,
inputProps: {},
separator: /[,\n\r]/,
tagProps: {},
};
| </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; | autoResize: false, |
public static defaultProps: Partial<TagInputProps> = {
addOnBlur: false,
addOnPaste: true,
autoResize: false,
inputProps: {},
separator: /[,\n\r]/,
tagProps: {},
};
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
private handleRef: React.Ref<HTMLInputElement> = refHandler(this, "inputElement", this.props.inputRef);
public render() {
const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
const classes = classNames(
Classes.INPUT,
Classes.TAG_INPUT,
{
| </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; | const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; |
private handleRef: React.Ref<HTMLInputElement> = refHandler(this, "inputElement", this.props.inputRef);
public render() {
const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props;
const classes = classNames(
Classes.INPUT,
Classes.TAG_INPUT,
{ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
const isSomeValueDefined = values.some(val => !!val);
const resolvedPlaceholder = placeholder == null || isSomeValueDefined ? inputProps?.placeholder : placeholder;
return (
<div className={classes} onBlur={this.handleContainerBlur} onClick={this.handleContainerClick}>
<Icon
className={Classes.TAG_INPUT_ICON}
icon={leftIcon}
size={isLarge ? IconSize.LARGE : IconSize.STANDARD}
| </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove <H5>Props</H5>
</s> add <H5>Appearance props</H5> | // final props that may be sent to <input> or <ResizableInput>
const resolvedInputProps = {
value: this.state.inputValue,
...inputProps,
className: classNames(Classes.INPUT_GHOST, inputProps?.className),
disabled,
onChange: this.handleInputChange,
onFocus: this.handleInputFocus,
onKeyDown: this.handleInputKeyDown,
onKeyUp: this.handleInputKeyUp,
onPaste: this.handleInputPaste,
placeholder: resolvedPlaceholder,
ref: this.handleRef,
};
| const isSomeValueDefined = values.some(val => !!val);
const resolvedPlaceholder = placeholder == null || isSomeValueDefined ? inputProps?.placeholder : placeholder;
// final props that may be sent to <input> or <ResizableInput>
const resolvedInputProps = {
value: this.state.inputValue,
...inputProps,
className: classNames(Classes.INPUT_GHOST, inputProps?.className),
disabled,
onChange: this.handleInputChange,
onFocus: this.handleInputFocus,
onKeyDown: this.handleInputKeyDown,
onKeyUp: this.handleInputKeyUp,
onPaste: this.handleInputPaste,
placeholder: resolvedPlaceholder,
ref: this.handleRef,
};
return (
<div className={classes} onBlur={this.handleContainerBlur} onClick={this.handleContainerClick}>
<Icon
className={Classes.TAG_INPUT_ICON}
icon={leftIcon}
size={isLarge ? IconSize.LARGE : IconSize.STANDARD} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
/>
<div className={Classes.TAG_INPUT_VALUES}>
{values.map(this.maybeRenderTag)}
{this.props.children}
<ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</div>
{this.props.rightElement}
</div>
);
}
| </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove <Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
</s> add | {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} | />
<div className={Classes.TAG_INPUT_VALUES}>
{values.map(this.maybeRenderTag)}
{this.props.children}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
{autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />}
</div>
{this.props.rightElement}
</div>
);
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/core/src/components/tag-input/tagInput.tsx |
export interface ITagInputExampleState {
addOnBlur: boolean;
addOnPaste: boolean;
disabled: boolean;
fill: boolean;
intent: Intent;
large: boolean;
leftIcon: boolean;
| </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; | autoResize: boolean; |
export interface ITagInputExampleState {
addOnBlur: boolean;
addOnPaste: boolean;
autoResize: boolean;
disabled: boolean;
fill: boolean;
intent: Intent;
large: boolean;
leftIcon: boolean; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
public state: ITagInputExampleState = {
addOnBlur: false,
addOnPaste: true,
disabled: false,
fill: false,
intent: "none",
large: false,
leftIcon: true,
tagIntents: false,
| </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; | autoResize: false, | public state: ITagInputExampleState = {
addOnBlur: false,
addOnPaste: true,
autoResize: false,
disabled: false,
fill: false,
intent: "none",
large: false,
leftIcon: true,
tagIntents: false, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
private handleAddOnBlurChange = handleBooleanChange(addOnBlur => this.setState({ addOnBlur }));
private handleAddOnPasteChange = handleBooleanChange(addOnPaste => this.setState({ addOnPaste }));
private handleDisabledChange = handleBooleanChange(disabled => this.setState({ disabled }));
private handleFillChange = handleBooleanChange(fill => this.setState({ fill }));
| </s> remove const { onChange, ...otherProps } = props;
</s> add const { onChange, style, ...otherProps } = props; </s> remove const { className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } = this.props;
</s> add const { autoResize, className, disabled, fill, inputProps, intent, large, leftIcon, placeholder, values } =
this.props; </s> remove <H5>Props</H5>
</s> add <H5>Appearance props</H5> | private handleAutoResizeChange = handleBooleanChange(autoResize => this.setState({ autoResize }));
| private handleAddOnBlurChange = handleBooleanChange(addOnBlur => this.setState({ addOnBlur }));
private handleAddOnPasteChange = handleBooleanChange(addOnPaste => this.setState({ addOnPaste }));
private handleAutoResizeChange = handleBooleanChange(autoResize => this.setState({ autoResize }));
private handleDisabledChange = handleBooleanChange(disabled => this.setState({ disabled }));
private handleFillChange = handleBooleanChange(fill => this.setState({ fill }));
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
private renderOptions() {
return (
<>
<H5>Props</H5>
<Switch label="Large" checked={this.state.large} onChange={this.handleLargeChange} />
<Switch label="Disabled" checked={this.state.disabled} onChange={this.handleDisabledChange} />
<Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
| </s> remove <Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
</s> add </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> | <H5>Appearance props</H5> |
private renderOptions() {
return (
<>
<H5>Appearance props</H5>
<Switch label="Large" checked={this.state.large} onChange={this.handleLargeChange} />
<Switch label="Disabled" checked={this.state.disabled} onChange={this.handleDisabledChange} />
<Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
<H5>Props</H5>
<Switch label="Large" checked={this.state.large} onChange={this.handleLargeChange} />
<Switch label="Disabled" checked={this.state.disabled} onChange={this.handleDisabledChange} />
<Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
<Switch label="Fill container width" checked={this.state.fill} onChange={this.handleFillChange} />
<IntentSelect intent={this.state.intent} onChange={this.handleIntentChange} />
<H5>Tag props</H5>
<Switch
label="Use minimal tags"
| </s> remove <H5>Props</H5>
</s> add <H5>Appearance props</H5> </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> | <H5>Props</H5>
<Switch label="Large" checked={this.state.large} onChange={this.handleLargeChange} />
<Switch label="Disabled" checked={this.state.disabled} onChange={this.handleDisabledChange} />
<Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Fill container width" checked={this.state.fill} onChange={this.handleFillChange} />
<IntentSelect intent={this.state.intent} onChange={this.handleIntentChange} />
<H5>Tag props</H5>
<Switch
label="Use minimal tags" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
|
<Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Fill container width" checked={this.state.fill} onChange={this.handleFillChange} />
<IntentSelect intent={this.state.intent} onChange={this.handleIntentChange} />
<H5>Tag props</H5>
<Switch
label="Use minimal tags"
checked={this.state.tagMinimal}
onChange={this.handleTagMinimalChange}
/>
| </s> remove <Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
</s> add </s> remove <H5>Props</H5>
</s> add <H5>Appearance props</H5> </s> remove <ResizableInput
value={this.state.inputValue}
{...inputProps}
onFocus={this.handleInputFocus}
onChange={this.handleInputChange}
onKeyDown={this.handleInputKeyDown}
onKeyUp={this.handleInputKeyUp}
onPaste={this.handleInputPaste}
placeholder={resolvedPlaceholder}
ref={this.handleRef}
className={classNames(Classes.INPUT_GHOST, inputProps?.className)}
disabled={disabled}
/>
</s> add {autoResize ? <ResizableInput {...resolvedInputProps} /> : <input {...resolvedInputProps} />} </s> remove <input {...otherProps} type="text" style={{ width }} onChange={handleInputChange} ref={ref} />
</s> add <input {...otherProps} type="text" style={{ ...style, width }} onChange={handleInputChange} ref={ref} /> </s> remove <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN}>
</s> add <span ref={span} className={Classes.RESIZABLE_INPUT_SPAN} aria-hidden={true}> | <H5>Behavior props</H5>
<Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
<Switch label="Auto resize" checked={this.state.autoResize} onChange={this.handleAutoResizeChange} /> | <Switch label="Left icon" checked={this.state.leftIcon} onChange={this.handleLeftIconChange} />
<Switch label="Fill container width" checked={this.state.fill} onChange={this.handleFillChange} />
<IntentSelect intent={this.state.intent} onChange={this.handleIntentChange} />
<H5>Behavior props</H5>
<Switch label="Add on blur" checked={this.state.addOnBlur} onChange={this.handleAddOnBlurChange} />
<Switch label="Add on paste" checked={this.state.addOnPaste} onChange={this.handleAddOnPasteChange} />
<Switch label="Auto resize" checked={this.state.autoResize} onChange={this.handleAutoResizeChange} />
<H5>Tag props</H5>
<Switch
label="Use minimal tags"
checked={this.state.tagMinimal}
onChange={this.handleTagMinimalChange}
/> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] fix(TagInput): disable new autoResize behavior by default (#6004) | https://github.com/palantir/blueprint/commit/ad1ed584f6f48e470817e143c0dabdd42ff70ebb | packages/docs-app/src/examples/core-examples/tagInputExample.tsx |
/** CSS style properties. */
style?: React.CSSProperties;
}
export class Icon extends React.PureComponent<IIconProps & React.SVGAttributes<SVGElement>> {
public static displayName = "Blueprint2.Icon";
| </s> remove const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
</s> add const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, title = icon, ...svgProps } = this.props; </s> remove <title>{icon}</title>
</s> add {title ? <title>{title}</title> : null} | /**
* Description string.
* Browsers usually render this as a tooltip on hover, whereas screen
* readers will use it for aural feedback.
* By default, this is set to the icon's name for accessibility.
*/
title?: string | false | null; |
/** CSS style properties. */
style?: React.CSSProperties;
/**
* Description string.
* Browsers usually render this as a tooltip on hover, whereas screen
* readers will use it for aural feedback.
* By default, this is set to the icon's name for accessibility.
*/
title?: string | false | null;
}
export class Icon extends React.PureComponent<IIconProps & React.SVGAttributes<SVGElement>> {
public static displayName = "Blueprint2.Icon"; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | [core] Add Icon `title` prop (#2182) | https://github.com/palantir/blueprint/commit/ada588c6aad9162125da35a272f0c45fdb76f20f | packages/core/src/components/icon/icon.tsx |
public static readonly SIZE_STANDARD = 16;
public static readonly SIZE_LARGE = 20;
public render() {
const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
if (icon == null) {
return null;
} else if (typeof icon !== "string") {
return icon;
}
| </s> remove <title>{icon}</title>
</s> add {title ? <title>{title}</title> : null} | const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, title = icon, ...svgProps } = this.props; | public static readonly SIZE_STANDARD = 16;
public static readonly SIZE_LARGE = 20;
public render() {
const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, title = icon, ...svgProps } = this.props;
if (icon == null) {
return null;
} else if (typeof icon !== "string") {
return icon;
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] Add Icon `title` prop (#2182) | https://github.com/palantir/blueprint/commit/ada588c6aad9162125da35a272f0c45fdb76f20f | packages/core/src/components/icon/icon.tsx |
width={iconSize}
height={iconSize}
viewBox={viewBox}
>
<title>{icon}</title>
{paths}
</svg>
);
}
| </s> remove const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
</s> add const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, title = icon, ...svgProps } = this.props; | {title ? <title>{title}</title> : null} | width={iconSize}
height={iconSize}
viewBox={viewBox}
>
{title ? <title>{title}</title> : null}
{paths}
</svg>
);
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] Add Icon `title` prop (#2182) | https://github.com/palantir/blueprint/commit/ada588c6aad9162125da35a272f0c45fdb76f20f | packages/core/src/components/icon/icon.tsx |
assert.isTrue(icon.isEmptyRender());
});
/** Asserts that rendered icon has given className. */
function assertIcon(icon: React.ReactElement<IIconProps>, iconName: IconName) {
assert.strictEqual(shallow(icon).text(), iconName);
}
| </s> remove const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, ...svgProps } = this.props;
</s> add const { className, icon, iconSize = Icon.SIZE_STANDARD, intent, title = icon, ...svgProps } = this.props; </s> remove <title>{icon}</title>
</s> add {title ? <title>{title}</title> : null} | it("title sets content of <title> element", () => {
const icon = shallow(<Icon icon="airplane" title="bird" />);
assert.equal(icon.find("title").text(), "bird");
});
it("title defaults to icon name", () => {
const icon = shallow(<Icon icon="airplane" />);
assert.equal(icon.find("title").text(), "airplane");
});
| assert.isTrue(icon.isEmptyRender());
});
it("title sets content of <title> element", () => {
const icon = shallow(<Icon icon="airplane" title="bird" />);
assert.equal(icon.find("title").text(), "bird");
});
it("title defaults to icon name", () => {
const icon = shallow(<Icon icon="airplane" />);
assert.equal(icon.find("title").text(), "airplane");
});
/** Asserts that rendered icon has given className. */
function assertIcon(icon: React.ReactElement<IIconProps>, iconName: IconName) {
assert.strictEqual(shallow(icon).text(), iconName);
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | [core] Add Icon `title` prop (#2182) | https://github.com/palantir/blueprint/commit/ada588c6aad9162125da35a272f0c45fdb76f20f | packages/core/test/icon/iconTests.tsx |
"declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"jsx": "react",
"module": "commonjs",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
| </s> remove /* istanbul ignore next */
</s> add </s> remove /* istanbul ignore next */
</s> add </s> remove use: "istanbul-instrumenter-loader",
</s> add loader: "istanbul-instrumenter-loader",
options: {
esModules: true,
}, </s> remove "declaration": false,
</s> add | "module": "es2015", | "declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"jsx": "react",
"module": "es2015",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | config/tsconfig.base.json |
const fs = require("fs");
const path = require("path");
module.exports = function (config) {
const baseConfig = createKarmaConfig(__dirname);
config.set(baseConfig);
config.set({
webpack: Object.assign({}, baseConfig.webpack, {
entry: {
core: [
| </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageOverrides: {
"src/cell/cell*": {
lines: 70,
},
"src/common/clipboard*": {
lines: 60,
statements: 60,
},
"src/headers/headerCell*": {
lines: 70,
statements: 70,
},
},
}); </s> remove "core.bundle": [
</s> add core: [ </s> remove "datetime.bundle": [
</s> add datetime: [ | const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); | const fs = require("fs");
const path = require("path");
module.exports = function (config) {
const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
});
config.set(baseConfig);
config.set({
webpack: Object.assign({}, baseConfig.webpack, {
entry: {
core: [ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/karma.conf.js |
"version": "1.33.0",
"description": "Core styles & components",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/index.d.ts",
"style": "dist/blueprint.css",
"unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
"compile:pre": "generate-icons-source",
| </s> remove "typings": "dist/index.d.ts",
</s> add "module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
</s> add "compile": "npm-run-all -s compile:pre -p 'compile:*'", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", | "typings": "dist/esm/index.d.ts", | "version": "1.33.0",
"description": "Core styles & components",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts",
"style": "dist/blueprint.css",
"unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
"compile:pre": "generate-icons-source", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
"typings": "dist/index.d.ts",
"style": "dist/blueprint.css",
"unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
"compile:pre": "generate-icons-source",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
| </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "compile": "npm-run-all -s compile:pre -p 'compile:*'", | "typings": "dist/index.d.ts",
"style": "dist/blueprint.css",
"unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p 'compile:*'",
"compile:pre": "generate-icons-source",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
"unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
"compile:pre": "generate-icons-source",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
| </s> remove "compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
</s> add "compile": "npm-run-all -s compile:pre -p 'compile:*'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "unpkg": "dist/core.bundle.js",
"scripts": {
"compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
"compile:pre": "generate-icons-source",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
"compile:pre": "generate-icons-source",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:variables": "generate-css-variables",
"dist:verify": "assert-package-layout",
| </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", | "compile:pre": "generate-icons-source",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:variables": "generate-css-variables",
"dist:verify": "assert-package-layout", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:variables": "generate-css-variables",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
| </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", | "clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:variables": "generate-css-variables",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
|
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix",
"test": "npm-run-all -s compile:pre compile:typescript test:pre -p test:karma test:iso",
"test:pre": "tsc -p ./test",
"test:karma": "karma start",
"test:iso": "mocha test/isotest.js",
"verify": "npm-run-all compile -p dist test lint"
},
| </s> remove "test": "npm-run-all -s compile:typescript test:pre -p test:karma test:iso",
</s> add "test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", </s> remove "test": "npm-run-all -s compile:typescript test:pre -p test:karma test:iso",
</s> add "test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add | "test": "npm-run-all -s compile:pre compile:cjs test:pre -p test:karma test:iso", | "lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix",
"test": "npm-run-all -s compile:pre compile:cjs test:pre -p test:karma test:iso",
"test:pre": "tsc -p ./test",
"test:karma": "karma start",
"test:iso": "mocha test/isotest.js",
"verify": "npm-run-all compile -p dist test lint"
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/package.json |
import { InteractionModeEngine } from "../common/interactionMode";
export const FOCUS_DISABLED_CLASS = "pt-focus-disabled";
/* istanbul ignore next */
const fakeFocusEngine = {
isActive: () => true,
start: () => true,
stop: () => true,
};
| </s> remove /* istanbul ignore next */
</s> add </s> remove // this is basically meaningless to unit test; it requires manual UI testing
/* istanbul ignore next */
</s> add </s> remove import { Browser } from "@blueprintjs/core/dist/compatibility";
</s> add import { Browser } from "@blueprintjs/core/dist/esm/compatibility"; </s> remove import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/dist/timePicker";
</s> add import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/dist/esm/timePicker"; </s> remove "module": "commonjs",
</s> add "module": "es2015", | import { InteractionModeEngine } from "../common/interactionMode";
export const FOCUS_DISABLED_CLASS = "pt-focus-disabled";
const fakeFocusEngine = {
isActive: () => true,
start: () => true,
stop: () => true,
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/src/accessibility/focusStyleManager.ts |
|
start: () => true,
stop: () => true,
};
/* istanbul ignore next */
const focusEngine =
typeof document !== "undefined"
? new InteractionModeEngine(document.documentElement, FOCUS_DISABLED_CLASS)
: fakeFocusEngine;
| </s> remove // this is basically meaningless to unit test; it requires manual UI testing
/* istanbul ignore next */
</s> add </s> remove /* istanbul ignore next */
</s> add </s> remove "module": "commonjs",
</s> add "module": "es2015", | start: () => true,
stop: () => true,
};
const focusEngine =
typeof document !== "undefined"
? new InteractionModeEngine(document.documentElement, FOCUS_DISABLED_CLASS)
: fakeFocusEngine;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/src/accessibility/focusStyleManager.ts |
|
typeof document !== "undefined"
? new InteractionModeEngine(document.documentElement, FOCUS_DISABLED_CLASS)
: fakeFocusEngine;
// this is basically meaningless to unit test; it requires manual UI testing
/* istanbul ignore next */
export const FocusStyleManager = {
alwaysShowFocus: () => focusEngine.stop(),
isActive: () => focusEngine.isActive(),
onlyShowFocusOnTabs: () => focusEngine.start(),
};
| </s> remove /* istanbul ignore next */
</s> add </s> remove /* istanbul ignore next */
</s> add </s> remove import { Browser } from "@blueprintjs/core/dist/compatibility";
</s> add import { Browser } from "@blueprintjs/core/dist/esm/compatibility"; </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); | typeof document !== "undefined"
? new InteractionModeEngine(document.documentElement, FOCUS_DISABLED_CLASS)
: fakeFocusEngine;
export const FocusStyleManager = {
alwaysShowFocus: () => focusEngine.stop(),
isActive: () => focusEngine.isActive(),
onlyShowFocusOnTabs: () => focusEngine.start(),
}; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/src/accessibility/focusStyleManager.ts |
|
{
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist"
}
}
| </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "declaration": false,
</s> add | "outDir": "../dist/esm" | {
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist/esm"
}
} | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/src/tsconfig.json |
const { generateIsomorphicTests } = require("@blueprintjs/node-build-scripts");
const React = require("react");
const Core = require("../dist");
const tooltipContent = { content: React.createElement("h1", {}, "content") };
const customProps = {
| </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageOverrides: {
"src/cell/cell*": {
lines: 70,
},
"src/common/clipboard*": {
lines: 60,
statements: 60,
},
"src/headers/headerCell*": {
lines: 70,
statements: 70,
},
},
}); </s> remove /* istanbul ignore next */
</s> add | // TODO: get this to work with require("@std/esm")(module)("../dist/esm") |
const { generateIsomorphicTests } = require("@blueprintjs/node-build-scripts");
const React = require("react");
// TODO: get this to work with require("@std/esm")(module)("../dist/esm")
const Core = require("../dist");
const tooltipContent = { content: React.createElement("h1", {}, "content") };
const customProps = { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/test/isotest.js |
const path = require("path");
module.exports = Object.assign({}, baseConfig, {
entry: {
"core.bundle": [
"./src/index.ts"
],
},
externals: COMMON_EXTERNALS,
| </s> remove "labs.bundle": [
</s> add labs: [ </s> remove "table.bundle": [
</s> add table: [ </s> remove "datetime.bundle": [
</s> add datetime: [ </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); | core: [ | const path = require("path");
module.exports = Object.assign({}, baseConfig, {
entry: {
core: [
"./src/index.ts"
],
},
externals: COMMON_EXTERNALS, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/webpack.config.js |
externals: COMMON_EXTERNALS,
output: {
filename: "[name].js",
library: ["Blueprint", "Core"],
libraryTarget: "umd",
path: path.resolve(__dirname, "./dist")
},
});
| </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove "table.bundle": [
</s> add table: [ </s> remove "core.bundle": [
</s> add core: [ | filename: "[name].bundle.js", |
externals: COMMON_EXTERNALS,
output: {
filename: "[name].bundle.js",
library: ["Blueprint", "Core"],
libraryTarget: "umd",
path: path.resolve(__dirname, "./dist")
},
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/core/webpack.config.js |
const { createKarmaConfig } = require("@blueprintjs/karma-build-scripts");
const path = require("path");
module.exports = function (config) {
const baseConfig = createKarmaConfig(__dirname);
config.set(baseConfig);
config.set({
webpack: Object.assign({}, baseConfig.webpack, {
entry: {
core: path.resolve(__dirname, "test/index.ts"),
| </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageOverrides: {
"src/cell/cell*": {
lines: 70,
},
"src/common/clipboard*": {
lines: 60,
statements: 60,
},
"src/headers/headerCell*": {
lines: 70,
statements: 70,
},
},
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); </s> remove "core.bundle": [
</s> add core: [ </s> remove "table.bundle": [
</s> add table: [ | const baseConfig = createKarmaConfig({
dirname: __dirname,
}); | const { createKarmaConfig } = require("@blueprintjs/karma-build-scripts");
const path = require("path");
module.exports = function (config) {
const baseConfig = createKarmaConfig({
dirname: __dirname,
});
config.set(baseConfig);
config.set({
webpack: Object.assign({}, baseConfig.webpack, {
entry: {
core: path.resolve(__dirname, "test/index.ts"), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/karma.conf.js |
"version": "1.24.0",
"description": "Components for interacting with dates and times",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/index.d.ts",
"style": "dist/blueprint-datetime.css",
"unpkg": "dist/datetime.bundle.js",
"scripts": {
"compile": "npm-run-all -p 'compile:*'",
"compile:typescript": "tsc -p ./src",
| </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "typings": "dist/esm/index.d.ts", | "version": "1.24.0",
"description": "Components for interacting with dates and times",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts",
"style": "dist/blueprint-datetime.css",
"unpkg": "dist/datetime.bundle.js",
"scripts": {
"compile": "npm-run-all -p 'compile:*'",
"compile:typescript": "tsc -p ./src", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/package.json |
"style": "dist/blueprint-datetime.css",
"unpkg": "dist/datetime.bundle.js",
"scripts": {
"compile": "npm-run-all -p 'compile:*'",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
| </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", | "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "style": "dist/blueprint-datetime.css",
"unpkg": "dist/datetime.bundle.js",
"scripts": {
"compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/package.json |
"compile": "npm-run-all -p 'compile:*'",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
| </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", | "compile": "npm-run-all -p 'compile:*'",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/package.json |
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:esm": "tsc -p ./src/tsconfig.esm.json",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix",
| </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "test": "npm-run-all -s compile:typescript test:pre -p test:karma test:iso",
</s> add "test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", | "clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/package.json |
|
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix",
"test": "npm-run-all -s compile:typescript test:pre -p test:karma test:iso",
"test:pre": "tsc -p ./test",
"test:karma": "karma start",
"test:iso": "mocha test/isotest.js",
"verify": "npm-run-all compile -p dist test lint"
},
| </s> remove "test": "npm-run-all -s compile:typescript test:pre -p test:karma test:iso",
</s> add "test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", </s> remove "test": "npm-run-all -s compile:pre compile:typescript test:pre -p test:karma test:iso",
</s> add "test": "npm-run-all -s compile:pre compile:cjs test:pre -p test:karma test:iso", </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add </s> remove "dist:esm": "tsc -p ./src/tsconfig.esm.json",
</s> add | "test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", | "lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
"lint:tslint": "tslint '{src,test}/**/*.{ts,tsx}' -c ../tslint-config",
"lint-fix": "yarn lint:tslint --fix",
"test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso",
"test:pre": "tsc -p ./test",
"test:karma": "karma start",
"test:iso": "mocha test/isotest.js",
"verify": "npm-run-all compile -p dist test lint"
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/package.json |
{
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist"
}
}
| </s> | "outDir": "../dist/esm" | {
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist/esm"
}
} | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/src/tsconfig.json |
const path = require("path");
module.exports = Object.assign({}, baseConfig, {
entry: {
"datetime.bundle": [
"./src/index.ts"
],
},
externals: COMMON_EXTERNALS,
| </s> remove "labs.bundle": [
</s> add labs: [ </s> remove "table.bundle": [
</s> add table: [ </s> remove "core.bundle": [
</s> add core: [ </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); | datetime: [ | const path = require("path");
module.exports = Object.assign({}, baseConfig, {
entry: {
datetime: [
"./src/index.ts"
],
},
externals: COMMON_EXTERNALS, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/webpack.config.js |
externals: COMMON_EXTERNALS,
output: {
filename: "[name].js",
library: ["Blueprint", "Datetime"],
libraryTarget: "umd",
path: path.resolve(__dirname, "./dist")
},
});
| </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove filename: "[name].js",
</s> add filename: "[name].bundle.js", </s> remove "table.bundle": [
</s> add table: [ </s> remove "core.bundle": [
</s> add core: [ | filename: "[name].bundle.js", |
externals: COMMON_EXTERNALS,
output: {
filename: "[name].bundle.js",
library: ["Blueprint", "Datetime"],
libraryTarget: "umd",
path: path.resolve(__dirname, "./dist")
},
}); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/datetime/webpack.config.js |
import { PrecisionSelect } from "./common/precisionSelect";
import { TimePicker, TimePickerPrecision } from "@blueprintjs/datetime";
// tslint:disable-next-line:no-submodule-imports
import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/dist/timePicker";
export interface ITimePickerExampleState {
precision?: TimePickerPrecision;
selectAllOnFocus?: boolean;
showArrowButtons?: boolean;
| </s> remove import { Browser } from "@blueprintjs/core/dist/compatibility";
</s> add import { Browser } from "@blueprintjs/core/dist/esm/compatibility"; </s> remove /* istanbul ignore next */
</s> add </s> remove import defaults = require("lodash/defaults");
</s> add import { defaults } from "lodash"; </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" | import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/dist/esm/timePicker"; | import { PrecisionSelect } from "./common/precisionSelect";
import { TimePicker, TimePickerPrecision } from "@blueprintjs/datetime";
// tslint:disable-next-line:no-submodule-imports
import { getDefaultMaxTime, getDefaultMinTime } from "@blueprintjs/datetime/dist/esm/timePicker";
export interface ITimePickerExampleState {
precision?: TimePickerPrecision;
selectAllOnFocus?: boolean;
showArrowButtons?: boolean; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs-app/src/examples/datetime-examples/timePickerExample.tsx |
{
"extends": "../../../config/tsconfig.base.json",
"compilerOptions": {
"declaration": false,
"lib": ["dom", "es5", "es6"],
"outDir": "../dist"
}
}
| </s> remove "declaration": false,
"lib": ["dom", "es5", "es6"]
</s> add "lib": ["dom", "es5", "es6"],
"outDir": "../dist" </s> remove "declaration": false,
</s> add </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" </s> remove "outDir": "../dist"
</s> add "outDir": "../dist/esm" | {
"extends": "../../../config/tsconfig.base.json",
"compilerOptions": {
"lib": ["dom", "es5", "es6"],
"outDir": "../dist"
}
} | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs-app/src/tsconfig.json |
|
"name": "@blueprintjs/docs",
"version": "1.2.0",
"description": "Blueprint theme for documentalist",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"style": "dist/docs.css",
"unpkg": "dist/docs.bundle.js",
"scripts": {
"compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
| </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "typings": "dist/index.d.ts",
</s> add "typings": "dist/esm/index.d.ts", </s> remove "compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts", | "name": "@blueprintjs/docs",
"version": "1.2.0",
"description": "Blueprint theme for documentalist",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/esm/index.d.ts",
"style": "dist/docs.css",
"unpkg": "dist/docs.bundle.js",
"scripts": {
"compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs/package.json |
"typings": "dist/index.d.ts",
"style": "dist/docs.css",
"unpkg": "dist/docs.bundle.js",
"scripts": {
"compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:verify": "assert-package-layout",
| </s> remove "compile": "npm-run-all -s compile:pre -p compile:typescript compile:sass",
</s> add "compile": "npm-run-all -s compile:pre -p 'compile:*'", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "typings": "dist/index.d.ts",
"style": "dist/docs.css",
"unpkg": "dist/docs.bundle.js",
"scripts": {
"compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:verify": "assert-package-layout", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs/package.json |
"compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'",
| </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "dev": "npm-run-all -p 'compile:typescript -- --watch' 'compile:sass -- --watch'",
</s> add "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", </s> remove "compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile": "npm-run-all -p 'compile:*'",
"compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", </s> remove "compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
</s> add "compile:esm": "tsc -p ./src",
"compile:cjs": "tsc -p ./src/tsconfig.cjs.json",
"compile:css": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true", | "dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'", | "compile": "npm-run-all -p compile:typescript compile:sass",
"compile:typescript": "tsc -p ./src",
"compile:sass": "node-sass --importer ../../node_modules/node-sass-package-importer/dist/cli.js --recursive src --output dist/ --source-map true",
"clean": "rm -rf dist/*",
"dev": "npm-run-all -p 'compile:esm -- --watch' 'compile:css -- --watch'",
"dist": "npm-run-all -s 'dist:*'",
"dist:bundle": "NODE_ENV=production webpack",
"dist:verify": "assert-package-layout",
"lint": "npm-run-all -p lint:stylelint lint:tslint",
"lint:stylelint": "stylelint -s scss 'src/**/*.scss'", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs/package.json |
{
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist"
}
}
| </s> | "outDir": "../dist/esm" | {
"extends": "../../../config/tsconfig.base",
"compilerOptions": {
"outDir": "../dist/esm"
}
} | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/docs/src/tsconfig.json |
const COVERAGE_PERCENT = 80;
const COVERAGE_PERCENT_HIGH = 90;
const KARMA_SERVER_PORT = 9876;
module.exports = function createKarmaConfig(dirname) {
return {
basePath: dirname,
browserNoActivityTimeout: 100000,
browsers: ["PhantomJS"],
client: {
| </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageExcludes: [
"src/accessibility/*",
],
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
}); </s> remove const baseConfig = createKarmaConfig(__dirname);
</s> add const baseConfig = createKarmaConfig({
dirname: __dirname,
coverageOverrides: {
"src/cell/cell*": {
lines: 70,
},
"src/common/clipboard*": {
lines: 60,
statements: 60,
},
"src/headers/headerCell*": {
lines: 70,
statements: 70,
},
},
}); | /**
* @param dirname string
* @param coverageExcludes string[]
* @param coverageOverrides { [glob: string]: object }
*/
module.exports = function createKarmaConfig({ dirname, coverageExcludes, coverageOverrides }) { | const COVERAGE_PERCENT = 80;
const COVERAGE_PERCENT_HIGH = 90;
const KARMA_SERVER_PORT = 9876;
/**
* @param dirname string
* @param coverageExcludes string[]
* @param coverageOverrides { [glob: string]: object }
*/
module.exports = function createKarmaConfig({ dirname, coverageExcludes, coverageOverrides }) {
return {
basePath: dirname,
browserNoActivityTimeout: 100000,
browsers: ["PhantomJS"],
client: { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | Emit ES modules in dev scripts, CJS in CI scripts (#1867) | https://github.com/palantir/blueprint/commit/ade126aca2b94adc1504f3d00f6586bb58e205ba | packages/karma-build-scripts/createKarmaConfig.js |
Subsets and Splits