Skip to content

Commit

Permalink
Merge pull request #8 from agentlab/fix-splitpane-layout
Browse files Browse the repository at this point in the history
GH-7 ViewKind's Coll extension with ViewDescr did not work
  • Loading branch information
amivanoff authored Sep 4, 2021
2 parents 95be563 + 731ec96 commit e0fa8b7
Show file tree
Hide file tree
Showing 28 changed files with 1,728 additions and 1,131 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/coverage

# production
/dist
/es
/lib

Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"request": "launch",
"name": "Launch Storybook in Chrome",
"breakOnLoad": true,
"url": "http://localhost:6006/?path=/story/several-controls-treeandform-cards--empty",
"url": "http://localhost:6006/?path=/story/form-artifactformoverride--remote-data",
"sourceMaps": true,
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
Expand Down
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,48 +50,49 @@
"lint-staged": "lint-staged"
},
"peerDependencies": {
"@agentlab/sparql-jsld-client": ">=5.0.0-rc.10",
"@ant-design/icons": ">=4.6.2",
"@agentlab/sparql-jsld-client": ">=5.0.0-rc.11",
"@ant-design/icons": ">=4.6.4",
"@tinymce/tinymce-react": ">=3.12.6",
"antd": ">=4.16.11",
"antd": ">=4.16.13",
"history": ">=5.0.1",
"lodash-es": ">=4.17.21",
"mobx": ">=6.3.2",
"mobx-react-lite": ">=3.2.0",
"mobx": ">=6.3.3",
"mobx-react-lite": ">=3.2.1",
"mobx-state-tree": ">=5.0.2",
"moment": ">=2.29.1",
"react": ">=17.0.2",
"react-dom": ">=17.0.2",
"react-error-boundary": ">=3.1.3",
"react-router": ">=6.0.0-beta.0",
"react-router-dom": ">=6.0.0-beta.0",
"react-router": ">=6.0.0-beta.3",
"react-router-dom": ">=6.0.0-beta.3",
"react-virtualized": ">=9.22.3",
"rc-util": ">=5.13.2",
"react-split-pane": ">=2.0.3",
"tinymce": ">=5.5.1",
"uri-js": ">=4.4.1"
"uri-js": ">=4.4.1",
"uuid62": ">=1.0.1"
},
"dependencies": {
"@agentlab/sparql-jsld-client": "^5.0.0-rc.10",
"@ant-design/icons": "^4.6.2",
"@agentlab/sparql-jsld-client": "^5.0.0-rc.11",
"@ant-design/icons": "^4.6.4",
"@tinymce/tinymce-react": "^3.12.6",
"@types/react": "^17.0.18",
"@types/react": "^17.0.19",
"@types/react-dom": "^17.0.9",
"@types/react-router": "^5.1.16",
"@types/react-router-dom": "^5.1.8",
"@types/react-virtualized": "^9.21.13",
"@types/tinymce": "^4.6.4",
"antd": "^4.16.11",
"antd": "^4.16.13",
"history": "^5.0.1",
"mobx-react-lite": "^3.2.0",
"mobx-react-lite": "^3.2.1",
"mst-middlewares": "^5.0.2",
"react": "^17.0.2",
"react-is": "^17.0.2",
"react-dom": "^17.0.2",
"react-error-boundary": "^3.1.3",
"react-redux": "^7.2.4",
"react-router": "^6.0.0-beta.0",
"react-router-dom": "^6.0.0-beta.0",
"react-router": "^6.0.0-beta.3",
"react-router-dom": "^6.0.0-beta.3",
"react-virtualized": "^9.22.3",
"redux": "^4.1.1",
"remotedev": "^0.2.9",
Expand All @@ -100,46 +101,46 @@
"uri-js": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/core": "^7.15.5",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-typescript": "^8.2.5",
"@storybook/addon-actions": "^6.3.7",
"@storybook/addon-essentials": "^6.3.7",
"@storybook/addon-links": "^6.3.7",
"@storybook/addons": "^6.3.7",
"@storybook/node-logger": "^6.3.7",
"@storybook/addon-actions": "^6.3.8",
"@storybook/addon-essentials": "^6.3.8",
"@storybook/addon-links": "^6.3.8",
"@storybook/addons": "^6.3.8",
"@storybook/node-logger": "^6.3.8",
"@storybook/preset-ant-design": "^0.0.2",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "^6.3.7",
"@storybook/react": "^6.3.8",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"autoprefixer": "^10.3.1",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"autoprefixer": "^10.3.4",
"babel-loader": "^8.2.2",
"cross-env": "^7.0.3",
"cssnano": "^5.0.7",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-flowtype": "^5.9.2",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.4.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.1",
"jest": "^27.0.6",
"husky": "^7.0.2",
"jest": "^27.1.0",
"jest-watch-typeahead": "^0.6.4",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"postcss": "^8.3.6",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"rollup": "^2.56.2",
"rollup": "^2.56.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.1",
Expand All @@ -148,7 +149,7 @@
"sass-loader": "10.1.1",
"storybook-css-modules-preset": "^1.1.1",
"style-loader": "^2.0.0",
"ts-jest": "^27.0.4",
"ts-jest": "^27.0.5",
"tslib": "^2.3.1",
"typescript": "4.3.5",
"typescript-plugin-css-modules": "^3.4.0"
Expand Down
24 changes: 20 additions & 4 deletions src/DispatchCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@ import { MstContext } from './MstContext';
* Dispatch renderer component for cells.
*/
export const DispatchCell: React.FC<DispatchCellProps> = React.memo(
({ data, onMeasureChange, uri, schema, viewKindElement, viewKind, enabled, id, CKey, rowData, ...rest }) => {
({
viewKind,
viewKindElement,
viewDescr,
viewDescrElement,
schema,
data,
onMeasureChange,
uri,
enabled,
id,
CKey,
rowData,
...rest
}) => {
const { cells } = useContext(MstContext);
const renderer = maxBy(cells, (r) => r.tester(viewKindElement, schema));
if (renderer === undefined || renderer.tester(viewKindElement, schema) === -1) {
Expand All @@ -37,15 +51,17 @@ export const DispatchCell: React.FC<DispatchCellProps> = React.memo(
return (
<ErrorBoundary FallbackComponent={ErrorFallback} onReset={() => {}}>
<Render
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
schema={schema}
CKey={CKey}
data={data}
rowData={rowData}
onMeasureChange={onMeasureChange}
schema={schema}
viewKindElement={viewKindElement}
uri={uri}
enabled={enabled}
viewKind={viewKind}
id={id}
{...rest}
/>
Expand Down
Loading

0 comments on commit e0fa8b7

Please sign in to comment.