Skip to content

Commit

Permalink
CHANGESET: lovely-balloons-develop. Fix multiple grouping and NumberF…
Browse files Browse the repository at this point in the history
…ilterForm
  • Loading branch information
apuntovanini committed Dec 10, 2019
1 parent 8ebcb00 commit 074c822
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 55 deletions.
14 changes: 14 additions & 0 deletions .changeset/lovely-balloons-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@uidu/webpack-config': patch
'@uidu/banner': patch
'@uidu/section-message': patch
'@uidu/data-controls': patch
'@uidu/data-fields': patch
'@uidu/data-manager': patch
'@uidu/table': patch
'@uidu/adf-schema': patch
'@uidu/status': patch
'@uidu/guidu-website': patch
---

Fix multiple grouping and NumberFilterForm
18 changes: 17 additions & 1 deletion build/webpack-config/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ function getOptimizations({ isProduction, noMinimizeFlag }) {
return undefined;
}
const terserPlugin = new TerserPlugin({
// parallel: Math.max(os.cpus().length - 1, 1),
parallel: Math.max(os.cpus().length - 1, 1),
terserOptions: {
compress: {
// Disabling following options speeds up minimization by 20 – 30s
Expand Down Expand Up @@ -399,6 +399,22 @@ function getOptimizations({ isProduction, noMinimizeFlag }) {
// "Maximum number of parallel requests when on-demand loading. (default in production: 5)"
// The default value of 5 causes the webpack process to crash, reason currently unknown
maxAsyncRequests: Infinity,
cacheGroups: {
vendors: {
name: 'vendors',
enforce: true,
chunks: 'all',
test: (module /*: { context: string | null } */) => {
if (!module.context) {
return false;
}
return /node_modules\/(react|react-dom|styled-components|prop-types|@emotion|@babel\/runtime)($|\/)/.test(
module.context,
);
},
priority: 1,
},
},
},
};
}
5 changes: 4 additions & 1 deletion packages/core/banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"dependencies": {
"@uidu/theme": "^0.1.18"
},
"devDependencies": {},
"devDependencies": {
"@uidu/button": "^0.1.48",
"@uidu/docs": "^0.1.38"
},
"peerDependencies": {
"react": "^16.8.3",
"styled-components": "^4.0.3"
Expand Down
8 changes: 1 addition & 7 deletions packages/core/section-message/src/components/styled.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
borderRadius,
colors,
gridSize,
math,
typography,
} from '@uidu/theme/constants';
import { borderRadius, colors, gridSize, math, typography } from '@uidu/theme';
import styled from 'styled-components';

const { N500 } = colors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Grouper extends Component<GrouperProps> {
};

handleSubmit = async model => {
this.groupBy(model.groupers);
this.groupBy(model.groupers || []);
};

render() {
Expand Down
2 changes: 1 addition & 1 deletion packages/data/data-fields/src/filters/NumberFilterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function NumberFilterForm({ onChange, filter = {} as any, index = 0, intl }) {
<FieldNumber
layout="elementOnly"
name={`filters[${index}][filter]`}
value={filter.filter || ''}
value={filter.filter}
onChange={(name, value) => {
if (value !== '') {
onChange(name, value);
Expand Down
2 changes: 1 addition & 1 deletion packages/data/data-manager/examples/Basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class Basic extends Component<any, any> {
super(props);
this.state = {
dataViews,
currentView: dataViews[3],
currentView: dataViews[0],
loaded: false,
rendered: false,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/data/data-manager/src/components/DataManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class DataManager extends PureComponent<DataManagerProps, any> {
filterModel: props.currentView.filterModel || {},
groupers: props.currentView.groupers || [],
rowHeight: 64,
columnCount: props.currentView.columCount || 5,
columnCount: props.currentView.columCount || 4,
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { groupRenderer } from '../../groups';

export default params => {
// create the cell
if (params.node && params.node.group) {
return params.value;
return groupRenderer(params);
}

if (params.value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { groupRenderer } from '../../groups';

export default params => {
if (params.node && params.node.group) {
return params.value;
return groupRenderer(params);
}

if (!params) {
Expand Down
17 changes: 9 additions & 8 deletions packages/data/table/src/components/groups/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ export const groupRenderer = ({ api, value, node }) => {
return null;
}

console.log(node);

const eDiv = document.createElement('div');
eDiv.innerHTML = `
<div class="d-flex justify-content-between">
<span style="line-height: initial;display: flex; align-items: center; flex-grow: 1;">
<span class="d-flex flex-column justify-content-center" style="line-height: initial">
<span class="small text-muted">${node.rowGroupColumn.colDef.headerName}</span>
<span>${value}</span>
<div class="d-flex justify-content-between" style="padding-left: ${node.level *
1}rem;">
<span style="line-height: initial; display: flex; align-items: center; flex-grow: 1; white-space: normal; min-width: 0;">
<span class="d-flex flex-column justify-content-center" style="line-height: initial; min-width: 0;">
<span class="small text-muted text-truncate">${
node.rowGroupColumn.colDef.headerName
}</span>
<span class="text-truncate">${value}</span>
</span>
</span>
<span>
<span class="ml-2">
<span class="badge badge-pill py-1 ag-group-child-count">
${node.allChildrenCount}
</span>
Expand Down
4 changes: 1 addition & 3 deletions packages/editor/adf-schema/src/schema/marks/alignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export const alignment: MarkSpec = {
return [
'div',
{
class: `fabric-editor-block-mark fabric-editor-align-${
mark.attrs.align
}`,
class: `fabric-editor-block-mark fabric-editor-align-${mark.attrs.align}`,
'data-align': mark.attrs.align,
},
0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import * as React from 'react';
import { IntlProvider } from 'react-intl';
import ManagedStatusPicker from '../example-helpers/ManagedStatusPicker';
import { IntlProvider, addLocaleData } from 'react-intl';
import * as frLocaleData from 'react-intl/locale-data/fr';
import fr from '../src/i18n/fr';

addLocaleData(frLocaleData);

export default () => (
<IntlProvider locale="fr" messages={fr}>
<ManagedStatusPicker
Expand Down
1 change: 0 additions & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": "../tsconfig.json",
"moduleResolution": "node",
"compilerOptions": {
"baseUrl": "./"
},
Expand Down
48 changes: 24 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2275,9 +2275,9 @@
"@types/babel__traverse" "*"

"@types/babel__generator@*":
version "7.6.0"
resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.0.tgz#f1ec1c104d1bb463556ecb724018ab788d0c172a"
integrity sha512-c1mZUu4up5cp9KROs/QAw0gTeHrw/x7m52LcnvMxxOZ03DmLwPV0MlGmlgzV3cnSdjhJOZsj7E7FHeioai+egw==
version "7.6.1"
resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04"
integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==
dependencies:
"@babel/types" "^7.0.0"

Expand Down Expand Up @@ -2307,9 +2307,9 @@
integrity sha512-5YG1AiIC8HPPXRvYAIa7ehK3YMAwd0DWiPCtpuL9sgKceWLyWsVtLRA+lT4NkoanDNF9slwQ66lPizWDpgRlWA==

"@types/chai@^4.0.4":
version "4.2.6"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.6.tgz#a55625d151d9c7c7a0a95920632131d66480bce9"
integrity sha512-HF8faEUA4JurIm+68VaA2KedtZf5LYdXpQEAbIAN79DwWQbO82BNTksZgCH3UMqbZHXex9C6TrBfg7OUInRISQ==
version "4.2.7"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.7.tgz#1c8c25cbf6e59ffa7d6b9652c78e547d9a41692d"
integrity sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==

"@types/classnames@^2.2.7":
version "2.2.9"
Expand Down Expand Up @@ -2553,9 +2553,9 @@
"@types/node" "*"

"@types/node@*", "@types/node@>= 8":
version "12.12.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.16.tgz#3ebcbd7bf978fa4c5120fee8be57083271a8b3ac"
integrity sha512-vRuMyoOr5yfNf8QWxXegOjeyjpWJxFePzHzmBOIzDIzo+rSqF94RW0PkS6y4T2+VjAWLXHWrfbIJY3E3aS7lUw==
version "12.12.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.17.tgz#191b71e7f4c325ee0fb23bc4a996477d92b8c39b"
integrity sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down Expand Up @@ -2710,9 +2710,9 @@
"@types/react" "*"

"@types/react-native@*":
version "0.60.24"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.24.tgz#0648aff3a910f29b8a892cecd0ec3199697bd31f"
integrity sha512-wI4C39mrEWpnx2JHCGsDKKcB22CNCKUWjLO6Mwt2yzgKD7crawuTjeHpBej/OiD/3df2X8rluuSmJ1xRcOZNAg==
version "0.60.25"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.25.tgz#65cb0bf5dd0631079215b63525458e4123c1c90e"
integrity sha512-827dIVvSTxSH5uTpsJJH7O4wpRuw0rm3yIzRL3a2yKawA0nyhgC1GPKTXHFIn2GfSdXn1Gty2dJ+k6uDZF3MWQ==
dependencies:
"@types/prop-types" "*"
"@types/react" "*"
Expand Down Expand Up @@ -11733,14 +11733,14 @@ intl-locales-supported@^1.8.4:
resolved "https://registry.yarnpkg.com/intl-locales-supported/-/intl-locales-supported-1.8.4.tgz#e1d19812afa50dc2e2a2b4741ceb4030522d45b1"
integrity sha512-wO0JhDqhshhkq8Pa9CLcstqd1aCXjfMgfMzjD6mDreS3mTSDbjGiMU+07O8BdJGxed7Q0Wf3TFVjGq0W3Y0n1w==

intl-messageformat-parser@^3.5.0, intl-messageformat-parser@^3.5.1:
intl-messageformat-parser@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-3.5.1.tgz#523a17bd2ef4a92209956b7cc953a0170bcf5b76"
integrity sha512-aCUjbLCZYhWJzC5gJiXKYR+OCE8rIegRBsjm1irJSH0AmeC7dIOp3nzOCc84BcyFX5baoXJfijV6SWqYUrN27w==
dependencies:
"@formatjs/intl-unified-numberformat" "^2.2.0"

intl-messageformat@^7.7.0:
intl-messageformat@^7.7.2:
version "7.7.2"
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-7.7.2.tgz#99839c4fde020523c4a66c10a4cc28060ac2fd3f"
integrity sha512-dcZxYh1laXLrv3VVb/Ke4lGee/NJmBcmA5ATPtX51dEL+aePs5GuQXD/MepxTv9M8kKqEt6KauGUwz6+X/tqBQ==
Expand Down Expand Up @@ -14668,9 +14668,9 @@ netlify-cli-logo@^1.0.0:
chalk "^2.4.2"

netlify-cli@^2.8.1:
version "2.24.0"
resolved "https://registry.yarnpkg.com/netlify-cli/-/netlify-cli-2.24.0.tgz#68350e2495fd5fe3a863e263799d176aa8ac087e"
integrity sha512-EP26ar1leyl3VB36Edu08v3G2jdhI2koOrjsz2Hp0pxOy5zUubxpBZPipyS65fBZYQx8LMUfmXIoyYhd7l3tJQ==
version "2.25.0"
resolved "https://registry.yarnpkg.com/netlify-cli/-/netlify-cli-2.25.0.tgz#f31373309bf1f77a03f8cc23b25beed0f2434077"
integrity sha512-jblYmk9Pv12r2YpUSfNhck1S2It+KkYpT1/+5H1a7+6Dk7Dil+94BaxS52437G8RYczHc9Y1YRpopOo9+8FwQw==
dependencies:
"@iarna/toml" "^2.2.3"
"@netlify/build" "^0.1.7"
Expand Down Expand Up @@ -17951,9 +17951,9 @@ react-intersection-observer@^8.24.1:
tiny-invariant "^1.0.6"

react-intl@^3.1.7:
version "3.9.1"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-3.9.1.tgz#6bbb3492ff1e789bd4bd97d1d9398a75844ac005"
integrity sha512-F9nc8FD1Fuc14f921LnW+tvFHzI4vU8yrd95Hm4d1iYopt8KEa/Y3+Tg1QDysrRNXXC9+APwwfF0u34bLWF6LA==
version "3.9.2"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-3.9.2.tgz#24d479877e43fb953bc8af494927ae57d6a6421a"
integrity sha512-QuiY90qO1mGRJ21Lpe1jL3NxAexmhYBrv/9Rw8dcrytv6M1FfVcGVYsruU8PUFYdFhFvQd2BMcw1uu0nomTIHg==
dependencies:
"@formatjs/intl-listformat" "^1.3.1"
"@formatjs/intl-relativetimeformat" "^4.5.1"
Expand All @@ -17964,10 +17964,10 @@ react-intl@^3.1.7:
hoist-non-react-statics "^3.3.1"
intl-format-cache "^4.2.13"
intl-locales-supported "^1.8.4"
intl-messageformat "^7.7.0"
intl-messageformat-parser "^3.5.0"
intl-messageformat "^7.7.2"
intl-messageformat-parser "^3.5.1"
invariant "^2.1.1"
shallow-equal "^1.1.0"
shallow-equal "^1.2.1"

react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0:
version "16.12.0"
Expand Down Expand Up @@ -19709,7 +19709,7 @@ shallow-clone@^3.0.0:
dependencies:
kind-of "^6.0.2"

shallow-equal@^1.0.0, shallow-equal@^1.1.0:
shallow-equal@^1.0.0, shallow-equal@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da"
integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==
Expand Down

0 comments on commit 074c822

Please sign in to comment.