Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release #118

Merged
merged 12 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.64](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.64) (2020-07-27)

**Note:** Version bump only for package material-ui-x





## [0.1.63](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.63) (2020-07-27)

**Note:** Version bump only for package material-ui-x





## [0.1.62](https://github.com/mui-org/material-ui-x/compare/v0.1.61...v0.1.62) (2020-07-22)

**Note:** Version bump only for package material-ui-x
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"packages": ["!packages/grid", "packages/*", "packages/grid/*"],
"version": "0.1.62",
"version": "0.1.64",
"npmClient": "yarn",
"useWorkspaces": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^7.4.0",
"eslint-config-airbnb-typescript": "^8.0.2",
"eslint-config-airbnb-typescript": "^9.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
Expand Down
16 changes: 16 additions & 0 deletions packages/demo-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.64](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.64) (2020-07-27)

**Note:** Version bump only for package demo-app





## [0.1.63](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.63) (2020-07-27)

**Note:** Version bump only for package demo-app





## [0.1.62](https://github.com/mui-org/material-ui-x/compare/v0.1.61...v0.1.62) (2020-07-22)

**Note:** Version bump only for package demo-app
Expand Down
4 changes: 2 additions & 2 deletions packages/demo-app/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "demo-app",
"version": "0.1.62",
"version": "0.1.64",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.12",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.54",
"@material-ui/x-grid": "^0.1.62",
"@material-ui/x-grid": "^0.1.64",
"@material-ui/x-grid-data-generator": "^0.1.62",
"@trendmicro/react-interpolate": "^0.5.5",
"react": "^16.13.1",
Expand Down
Binary file modified packages/demo-app/public/ag-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/aggrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/android-icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/ms-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/demo-app/public/ms-icon-150x150.png
Binary file modified packages/demo-app/public/ms-icon-310x310.png
Binary file modified packages/demo-app/public/ms-icon-70x70.png
Binary file modified packages/demo-app/public/storybook.png
31 changes: 15 additions & 16 deletions packages/demo-app/src/app/demos/grid/components/settings-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Button from '@material-ui/core/Button';
import FormLabel from '@material-ui/core/FormLabel';
import MenuItem from '@material-ui/core/MenuItem';
import Select from '@material-ui/core/Select';
import { useContext } from 'react';
import { darkThemeId, lightThemeId, ThemeContext } from '../../theme';
import { StyledPanels } from './styled-panel';

Expand All @@ -24,7 +23,7 @@ export interface SettingsPanelProps {
export const SettingsPanel: React.FC<SettingsPanelProps> = ({ onApply, type, size }) => {
const [sizeState, setSize] = React.useState<number>(size);
const [typeState, setType] = React.useState<string>(type);
const currentTheme = useContext(ThemeContext);
const currentTheme = React.useContext(ThemeContext);
const [selectedTheme, setSelectedTheme] = React.useState<string>(currentTheme.theme);
const [selectedPaginationValue, setSelectedPaginationValue] = React.useState<number>(-1);

Expand Down Expand Up @@ -61,17 +60,17 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({ onApply, type, siz

return (
<StyledPanels>
{/* <Panel title={'Settings'}> */}
<div className={'panel'}>
<FormGroup row className={'center'}>
<FormControl className={'dataset-control input-text'} size={'small'} component="fieldset">
{/* <Panel title="Settings"> */}
<div className="panel">
<FormGroup row className="center">
<FormControl className="dataset-control input-text" size="small" component="fieldset">
<FormLabel component="legend">Dataset</FormLabel>
<Select value={typeState} onChange={onDatasetChange}>
<MenuItem value={'employee'}>Employee</MenuItem>
<MenuItem value={'commodity'}>Commodity</MenuItem>
<MenuItem value="employee">Employee</MenuItem>
<MenuItem value="commodity">Commodity</MenuItem>
</Select>
</FormControl>
<FormControl className={'dataset-control input-text'} size={'small'} component="fieldset">
<FormControl className="dataset-control input-text" size="small" component="fieldset">
<FormLabel component="legend">Rows</FormLabel>
<Select value={sizeState} onChange={onSizeChange}>
<MenuItem value={100}>100</MenuItem>
Expand All @@ -80,7 +79,7 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({ onApply, type, siz
<MenuItem value={100000}>{Number(100000).toLocaleString()}</MenuItem>
</Select>
</FormControl>
<FormControl className={'dataset-control input-text'} size={'small'} component="fieldset">
<FormControl className="dataset-control input-text" size="small" component="fieldset">
<FormLabel component="legend">Page Size</FormLabel>
<Select value={selectedPaginationValue} onChange={onPaginationChange}>
<MenuItem value={-1}>off</MenuItem>
Expand All @@ -91,8 +90,8 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({ onApply, type, siz
</Select>
</FormControl>
<FormControl
className={'dataset-control input-text'}
size={'small'}
className="dataset-control input-text"
size="small"
component="fieldset"
style={{ display: 'none' }}
>
Expand All @@ -105,12 +104,12 @@ export const SettingsPanel: React.FC<SettingsPanelProps> = ({ onApply, type, siz
<div>
<Button
size="small"
className={'apply-btn'}
variant={'outlined'}
color={'primary'}
className="apply-btn"
variant="outlined"
color="primary"
onClick={applyChanges}
>
<KeyboardArrowRightIcon fontSize={'small'} /> Apply
<KeyboardArrowRightIcon fontSize="small" /> Apply
</Button>
</div>
</FormGroup>
Expand Down
14 changes: 7 additions & 7 deletions packages/demo-app/src/app/demos/grid/real-data-grid.demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ export const RealDataGridDemo: React.FC<{ toggleTheme: () => void; themeId: stri

const newPagination: Partial<GridOptions> = {
pagination: settings.pagesize !== -1,
paginationAutoPageSize: settings.pagesize === 0,
paginationPageSize: settings.pagesize > 0 ? settings.pagesize : undefined,
autoPageSize: settings.pagesize === 0,
pageSize: settings.pagesize > 0 ? settings.pagesize : undefined,
};

setPagination((p) => {
if (
p.pagination === newPagination.pagination &&
p.paginationAutoPageSize === newPagination.paginationAutoPageSize &&
p.paginationPageSize === newPagination.paginationPageSize
p.autoPageSize === newPagination.autoPageSize &&
p.pageSize === newPagination.pageSize
) {
return p;
}
Expand All @@ -118,12 +118,12 @@ export const RealDataGridDemo: React.FC<{ toggleTheme: () => void; themeId: stri

return (
<React.Fragment>
<AppBreadcrumbs name={'NEW* Material-UI X Grid'} />
<AppBreadcrumbs name="NEW* Material-UI X Grid" />
<SettingsPanel onApply={onApplyClick} size={size} type={type} />

<MainContainer>
<div style={{ display: 'flex', boxSizing: 'border-box' }} className={'fill-space'}>
<div className={'grow'}>
<div style={{ display: 'flex', boxSizing: 'border-box' }} className="fill-space">
<div className="grow">
<XGrid
rows={rows as any}
columns={cols as any}
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-app/src/app/demos/theme/useTheme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import * as React from 'react';
import { useLocalStorage } from '../utils/useLocalStorage';
import { DEFAULT_THEME, STORAGE_THEME_KEY, ThemeValuePair } from './themeProvider';
import { darkTheme } from './dark';
Expand All @@ -15,10 +15,10 @@ type ReturnType = {
export function useTheme(): ReturnType {
const [selectedThemeId, setSelectedTheme] = useLocalStorage(STORAGE_THEME_KEY, DEFAULT_THEME);

const [theme, setTheme] = useState(ThemeValuePair[selectedThemeId]);
const [isDark, setIsDark] = useState(theme.id === darkTheme.id);
const [theme, setTheme] = React.useState(ThemeValuePair[selectedThemeId]);
const [isDark, setIsDark] = React.useState(theme.id === darkTheme.id);

useEffect(() => {
React.useEffect(() => {
setIsDark(theme === darkTheme);
}, [theme]);

Expand Down
16 changes: 16 additions & 0 deletions packages/grid/data-grid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.64](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.64) (2020-07-27)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.63](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.63) (2020-07-27)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.62](https://github.com/mui-org/material-ui-x/compare/v0.1.61...v0.1.62) (2020-07-22)

**Note:** Version bump only for package @material-ui/data-grid
Expand Down
11 changes: 7 additions & 4 deletions packages/grid/data-grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@material-ui/data-grid",
"version": "0.1.62",
"version": "0.1.64",
"description": "The Material-UI community edition of the data grid component.",
"author": "Material-UI Team",
"main": "dist/index-cjs.js",
Expand All @@ -13,16 +13,19 @@
"publishConfig": {
"access": "public"
},
"dependencies": {
"tslib": "^2.0.0"
},
"devDependencies": {
"@material-ui/x-grid-modules": "^0.1.62",
"@material-ui/x-grid-modules": "^0.1.64",
"@rollup/plugin-node-resolve": "^8.0.1",
"rollup": "^2.6.1",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-command": "^1.1.3",
"rollup-plugin-dts": "^1.4.7",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-typescript2": "^0.27.1",
"tslib": "^2.0.0"
"rollup-plugin-typescript2": "^0.27.1"
},
"peerDependencies": {
"@material-ui/core": "^4.9.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/data-grid/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default [
cleaner({
targets: ['./dist/'],
}),
typescript(),
typescript({ build: true }),
!production && sourceMaps(),
production && terser(),
],
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/data-grid/src/data-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export const DataGrid: React.FC<DataGridProps> = React.memo(function DataGrid(
props: DataGridProps,
) {
const validateOptions = React.useCallback((options: DataGridOptionsProp) => {
if (options && options.paginationPageSize && options.paginationPageSize > MAX_PAGE_SIZE) {
if (options && options.pageSize && options.pageSize > MAX_PAGE_SIZE) {
throw new Error(
`Material-UI: Option 'paginationPageSize' cannot be above ${MAX_PAGE_SIZE}. Use the @material-ui/x-grid to unlock this feature`,
`Material-UI: Option 'pageSize' cannot be above ${MAX_PAGE_SIZE}. Use the @material-ui/x-grid to unlock this feature`,
);
}
return options;
Expand Down
3 changes: 0 additions & 3 deletions packages/grid/data-grid/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
import { DataGrid } from './data-grid';

export * from '@material-ui/x-grid-modules';
export * from './data-grid';
export const Grid = DataGrid;
16 changes: 16 additions & 0 deletions packages/grid/x-grid-modules/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.64](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.64) (2020-07-27)

**Note:** Version bump only for package @material-ui/x-grid-modules





## [0.1.63](https://github.com/dtassone/material-ui-x/compare/v0.1.62...v0.1.63) (2020-07-27)

**Note:** Version bump only for package @material-ui/x-grid-modules





## [0.1.62](https://github.com/mui-org/material-ui-x/compare/v0.1.61...v0.1.62) (2020-07-22)

**Note:** Version bump only for package @material-ui/x-grid-modules
Expand Down
6 changes: 3 additions & 3 deletions packages/grid/x-grid-modules/lib/autosizer/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createElement, PureComponent } from 'react';
import * as React from 'react';

/**
* Detect Element Resize.
Expand Down Expand Up @@ -378,7 +378,7 @@ var AutoSizer = function (_React$PureComponent) {
childParams.width = width;
}

return createElement(
return React.createElement(
'div',
{
className: className,
Expand All @@ -389,7 +389,7 @@ var AutoSizer = function (_React$PureComponent) {
}
}]);
return AutoSizer;
}(PureComponent);
}(React.PureComponent);

AutoSizer.defaultProps = {
onResize: function onResize() {},
Expand Down
Loading