From 2dd796ce09e44888bb0b66c6a6899fdf178ae33d Mon Sep 17 00:00:00 2001 From: Alexey Date: Sun, 8 Aug 2021 22:58:34 +0300 Subject: [PATCH 01/10] [chore, deps] GH-5 Spellchecker, GH extension --- .vscode/extensions.json | 6 +- .vscode/launch.json | 2 +- .vscode/settings.json | 39 +- package.json | 91 ++-- yarn.lock | 891 ++++++++++++++++++++++++++-------------- 5 files changed, 670 insertions(+), 359 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7ab70ea..b4bd097 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -14,7 +14,11 @@ "dbaeumer.vscode-eslint", "eamodio.gitlens", "ryu1kn.partial-diff", - "vscode-icons-team.vscode-icons" + "vscode-icons-team.vscode-icons", + "syler.sass-indented", + "streetsidesoftware.code-spell-checker", + "streetsidesoftware.code-spell-checker-russian", + "github.vscode-pull-request-github" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] diff --git a/.vscode/launch.json b/.vscode/launch.json index 3cfa450..f5ed755 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -16,7 +16,7 @@ "request": "launch", "name": "Launch Storybook in Chrome", "breakOnLoad": true, - "url": "http://localhost:6006/?path=/story/several-controls-treeandform-mktp--empty", + "url": "http://localhost:6006/?path=/story/several-controls-treeandform-cards--empty", "sourceMaps": true, "webRoot": "${workspaceFolder}", "sourceMapPathOverrides": { diff --git a/.vscode/settings.json b/.vscode/settings.json index e670bfd..c24dad8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,42 @@ }, "editor.defaultFormatter": "esbenp.prettier-vscode", "prettier.endOfLine": "lf", - "jest.autoRun": "off" + "jest.autoRun": "off", + "cSpell.words": [ + "Constrs", + "Descr", + "Descrs", + "Individ", + "Interp", + "Intrnl", + "Modifiability", + "Rubberband", + "SHACL", + "SPDX", + "Scroller", + "Subcat", + "agentlab", + "aldkg", + "antd", + "antv", + "collapsable", + "colls", + "dcterms", + "dryrun", + "jsld", + "jumpover", + "ldkg", + "middlewares", + "mktp", + "oslc", + "pannable", + "plotly", + "pporoles", + "remotedev", + "sider", + "sparql", + "undelegate", + "uuidv" + ], + "cSpell.language": "en,ru" } \ No newline at end of file diff --git a/package.json b/package.json index 27e94c1..d6a0f57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agentlab/ldkg-ui-react", - "version": "0.1.11", + "version": "0.1.12", "description": "LDKG Forms UI Components", "license": "GPL-3.0", "author": "Alexey Ivanov ", @@ -8,6 +8,23 @@ "Alexey Ivanov ", "Artkrygin" ], + "keywords": [ + "react", + "antd", + "forms", + "ui", + "sparql", + "json-ld", + "json-schema" + ], + "homepage": "https://github.com/agentlab/ldkg-ui-react#README.md", + "repository": { + "type": "git", + "url": "git+https://github.com/agentlab/ldkg-ui-react.git" + }, + "bugs": { + "url": "https://github.com/agentlab/ldkg-ui-react/issues" + }, "main": "es/index.js", "module": "es/index.js", "typings": "es/index.d.ts", @@ -36,7 +53,7 @@ "@agentlab/sparql-jsld-client": ">=5.0.0-rc.9", "@ant-design/icons": ">=4.6.2", "@tinymce/tinymce-react": ">=3.12.6", - "antd": ">=4.16.5", + "antd": ">=4.16.10", "history": ">=5.0.0", "lodash-es": ">=4.17.21", "mobx": ">=6.3.2", @@ -49,7 +66,7 @@ "react-router": ">=6.0.0-beta.0", "react-router-dom": ">=6.0.0-beta.0", "react-virtualized": ">=9.22.3", - "rc-util": ">=5.13.1", + "rc-util": ">=5.13.2", "react-split-pane": ">=2.0.3", "tinymce": ">=5.5.1", "uri-js": ">=4.4.1" @@ -58,13 +75,13 @@ "@agentlab/sparql-jsld-client": "^5.0.0-rc.9", "@ant-design/icons": "^4.6.2", "@tinymce/tinymce-react": "^3.12.6", - "@types/react": "^17.0.11", - "@types/react-dom": "^17.0.8", - "@types/react-router": "^5.1.15", - "@types/react-router-dom": "^5.1.7", - "@types/react-virtualized": "^9.21.11", - "@types/tinymce": "^4.6.2", - "antd": "^4.16.5", + "@types/react": "^17.0.16", + "@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.10", "history": "^5.0.0", "mobx-react-lite": "^3.2.0", "mst-middlewares": "^5.0.2", @@ -76,7 +93,7 @@ "react-router": "^6.0.0-beta.0", "react-router-dom": "^6.0.0-beta.0", "react-virtualized": "^9.22.3", - "redux": "^4.1.0", + "redux": "^4.1.1", "remotedev": "^0.2.9", "react-split-pane": "^2.0.3", "tinymce": "5.5.1", @@ -84,45 +101,45 @@ }, "devDependencies": { "@babel/core": "^7.14.6", - "@rollup/plugin-commonjs": "^19.0.0", - "@rollup/plugin-node-resolve": "^13.0.0", - "@rollup/plugin-typescript": "^8.2.1", - "@storybook/addon-actions": "^6.3.0", - "@storybook/addon-essentials": "^6.3.0", - "@storybook/addon-links": "^6.3.0", - "@storybook/addons": "^6.3.0", - "@storybook/node-logger": "^6.3.0", + "@rollup/plugin-commonjs": "^20.0.0", + "@rollup/plugin-node-resolve": "^13.0.4", + "@rollup/plugin-typescript": "^8.2.5", + "@storybook/addon-actions": "^6.3.6", + "@storybook/addon-essentials": "^6.3.6", + "@storybook/addon-links": "^6.3.6", + "@storybook/addons": "^6.3.6", + "@storybook/node-logger": "^6.3.6", "@storybook/preset-ant-design": "^0.0.2", "@storybook/preset-scss": "^1.0.3", - "@storybook/react": "^6.3.0", + "@storybook/react": "^6.3.6", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^12.0.0", - "@testing-library/user-event": "^13.1.9", - "@types/jest": "^26.0.23", - "@typescript-eslint/eslint-plugin": "^4.28.0", - "@typescript-eslint/parser": "^4.28.0", - "autoprefixer": "^10.2.6", + "@testing-library/user-event": "^13.2.1", + "@types/jest": "^26.0.24", + "@typescript-eslint/eslint-plugin": "^4.29.0", + "@typescript-eslint/parser": "^4.29.0", + "autoprefixer": "^10.3.1", "babel-loader": "^8.2.2", "cross-env": "^7.0.3", - "cssnano": "^5.0.4", - "eslint": "^7.29.0", + "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.7.2", + "eslint-plugin-flowtype": "^5.9.0", "eslint-plugin-import": "^2.23.4", - "eslint-plugin-jest": "^24.3.6", + "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-react-hooks": "^4.2.0", - "husky": "^6.0.0", - "jest": "^27.0.5", + "husky": "^7.0.1", + "jest": "^27.0.6", "jest-watch-typeahead": "^0.6.4", - "lint-staged": "^11.0.0", - "prettier": "^2.3.1", - "postcss": "^8.3.0", + "lint-staged": "^11.1.2", + "prettier": "^2.3.2", + "postcss": "^8.3.6", "rimraf": "^3.0.2", - "rollup": "^2.52.3", + "rollup": "^2.56.0", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-postcss": "^4.0.0", @@ -131,9 +148,9 @@ "sass-loader": "10.1.1", "storybook-css-modules-preset": "^1.1.1", "style-loader": "^2.0.0", - "ts-jest": "^27.0.3", + "ts-jest": "^27.0.4", "tslib": "^2.3.0", - "typescript": "4.2.4", + "typescript": "4.3.5", "typescript-plugin-css-modules": "^3.4.0" }, "lint-staged": { diff --git a/yarn.lock b/yarn.lock index 15de756..dc9571a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1294,10 +1294,10 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@eslint/eslintrc@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" - integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg== +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1309,6 +1309,20 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1653,10 +1667,10 @@ prop-types "^15.6.1" react-lifecycles-compat "^3.0.4" -"@rollup/plugin-commonjs@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.0.tgz#8c3e71f9a66908e60d70cc1be205834ef3e45f71" - integrity sha512-adTpD6ATGbehdaQoZQ6ipDFhdjqsTgpOAhFiPwl+dzre4pPshsecptDPyEFb61JMJ1+mGljktaC4jI8ARMSNyw== +"@rollup/plugin-commonjs@^20.0.0": + version "20.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-20.0.0.tgz#3246872dcbcb18a54aaa6277a8c7d7f1b155b745" + integrity sha512-5K0g5W2Ol8hAcTHqcTBHiA7M58tfmYi1o9KxeJuuRNpGaTa5iLjcyemBitCBcKXaHamOBBEH2dGom6v6Unmqjg== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" @@ -1666,10 +1680,10 @@ magic-string "^0.25.7" resolve "^1.17.0" -"@rollup/plugin-node-resolve@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.0.tgz#352f07e430ff377809ec8ec8a6fd636547162dc4" - integrity sha512-41X411HJ3oikIDivT5OKe9EZ6ud6DXudtfNrGbC4nniaxx2esiWjkLOzgnZsWq1IM8YIeL2rzRGLZLBjlhnZtQ== +"@rollup/plugin-node-resolve@^13.0.4": + version "13.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz#b10222f4145a019740acb7738402130d848660c0" + integrity sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w== dependencies: "@rollup/pluginutils" "^3.1.0" "@types/resolve" "1.17.1" @@ -1678,10 +1692,10 @@ is-module "^1.0.0" resolve "^1.19.0" -"@rollup/plugin-typescript@^8.2.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.1.tgz#f1a32d4030cc83432ce36a80a922280f0f0b5d44" - integrity sha512-Qd2E1pleDR4bwyFxqbjt4eJf+wB0UKVMLc7/BAFDGVdAXQMCsD4DUv5/7/ww47BZCYxWtJqe1Lo0KVNswBJlRw== +"@rollup/plugin-typescript@^8.2.5": + version "8.2.5" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz#e0319761b2b5105615e5a0c371ae05bc2984b7de" + integrity sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ== dependencies: "@rollup/pluginutils" "^3.1.0" resolve "^1.17.0" @@ -1709,17 +1723,17 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@storybook/addon-actions@6.3.2", "@storybook/addon-actions@^6.3.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.3.2.tgz#0671a6ca17d9199239f2763398eda04e99bd1724" - integrity sha512-kGengy5+RrBFjRaBmtlblltLaS4GtQEDnXV3g3Geeg9+PYSVKOvh2AgdPdQrjHSJFzpOBwUr3zMhXhdWrizyiQ== - dependencies: - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core-events" "6.3.2" - "@storybook/theming" "6.3.2" +"@storybook/addon-actions@6.3.6", "@storybook/addon-actions@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.3.6.tgz#691d61d6aca9c4b3edba50c531cbe4d4139ed451" + integrity sha512-1MBqCbFiupGEDyIXqFkzF4iR8AduuB7qSNduqtsFauvIkrG5bnlbg5JC7WjnixkCaaWlufgbpasEHioXO9EXGw== + dependencies: + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/theming" "6.3.6" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" @@ -1732,17 +1746,17 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" -"@storybook/addon-backgrounds@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.3.2.tgz#a69775f02d33378988db8c8211697764ebea1d25" - integrity sha512-phn9kx/rmw6fD3Xqew31YPrAEQqUernQthKghSMgqNTR13ZMQ3NPzmcWOsnRq+ngqxB4XTSFya/BtgV7Od0XQQ== - dependencies: - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core-events" "6.3.2" - "@storybook/theming" "6.3.2" +"@storybook/addon-backgrounds@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.3.6.tgz#93128e6ebfcb953a83cc2165056dd5815d32cef2" + integrity sha512-1lBVAem2M+ggb1UNVgB7/56LaQAor9lI8q0xtQdAzAkt9K4RbbOsLGRhyUm3QH5OiB3qHHG5WQBujWUD6Qfy4g== + dependencies: + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/theming" "6.3.6" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" @@ -1750,24 +1764,24 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-controls@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.3.2.tgz#2e0cdc7fcc326524c5858188d4b9d45bc5473c48" - integrity sha512-GJzggGZVKNr1p3s/1u83JgstHEQg5+H/1LoJELiYSIrhcs+mfsRr2ULpfHRTrpUSaC3qTL7HzYkPy+FoAd+6qQ== - dependencies: - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/node-logger" "6.3.2" - "@storybook/theming" "6.3.2" +"@storybook/addon-controls@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.3.6.tgz#2f8071e5b521375aace60af96e33a19f016581c9" + integrity sha512-wTWmnZl2qEAUqgLh8a7TL5f6w37Q51lAoJNlwxFFBSKtGS7xFUnou4qTUArNy5iKu1cWoVvofJ9RnP1maGByYA== + dependencies: + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/node-logger" "6.3.6" + "@storybook/theming" "6.3.6" core-js "^3.8.2" ts-dedent "^2.0.0" -"@storybook/addon-docs@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.3.2.tgz#3499f82ed073c326eac5e24772161b1c715a7fab" - integrity sha512-y9+umLi22ow3qAivxqkDeCtqzkIhlDIFOA7HH3Wd2yDo96UAzUiGozelCycijtfcyFuzwL8cvoKB6nIiVyuWsw== +"@storybook/addon-docs@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.3.6.tgz#85b8a72b91f9c43edfaf21c416a9b01ad0e06ea4" + integrity sha512-/ZPB9u3lfc6ZUrgt9HENU1BxAHNfTbh9r2LictQ8o9gYE/BqvZutl2zqilTpVuutQtTgQ6JycVhxtpk9+TDcuA== dependencies: "@babel/core" "^7.12.10" "@babel/generator" "^7.12.11" @@ -1778,20 +1792,20 @@ "@mdx-js/loader" "^1.6.22" "@mdx-js/mdx" "^1.6.22" "@mdx-js/react" "^1.6.22" - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/builder-webpack4" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core" "6.3.2" - "@storybook/core-events" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/builder-webpack4" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core" "6.3.6" + "@storybook/core-events" "6.3.6" "@storybook/csf" "0.0.1" - "@storybook/csf-tools" "6.3.2" - "@storybook/node-logger" "6.3.2" - "@storybook/postinstall" "6.3.2" - "@storybook/source-loader" "6.3.2" - "@storybook/theming" "6.3.2" + "@storybook/csf-tools" "6.3.6" + "@storybook/node-logger" "6.3.6" + "@storybook/postinstall" "6.3.6" + "@storybook/source-loader" "6.3.6" + "@storybook/theming" "6.3.6" acorn "^7.4.1" acorn-jsx "^5.3.1" acorn-walk "^7.2.0" @@ -1814,36 +1828,36 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-essentials@^6.3.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.3.2.tgz#2182fcdbc3138fd17e10e680d6e9b182be73e3ec" - integrity sha512-upOMqx/66aAhr262L4oe5JS1wG2W7ZHIKQBgxMDfzrY26KcRRZVCm+omOlLJ2l4b0Gc7iZmUHkfmOhI9SPMNbw== +"@storybook/addon-essentials@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.3.6.tgz#29f5249daee086fe2d14c899ae61712b8c8fbcbd" + integrity sha512-FUrpCeINaN4L9L81FswtQFEq2xLwj3W7EyhmqsZcYSr64nscpQyjlPVjs5zhrEanOGIf+4E+mBmWafxbYufXwQ== dependencies: - "@storybook/addon-actions" "6.3.2" - "@storybook/addon-backgrounds" "6.3.2" - "@storybook/addon-controls" "6.3.2" - "@storybook/addon-docs" "6.3.2" + "@storybook/addon-actions" "6.3.6" + "@storybook/addon-backgrounds" "6.3.6" + "@storybook/addon-controls" "6.3.6" + "@storybook/addon-docs" "6.3.6" "@storybook/addon-measure" "^2.0.0" - "@storybook/addon-toolbars" "6.3.2" - "@storybook/addon-viewport" "6.3.2" - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/node-logger" "6.3.2" + "@storybook/addon-toolbars" "6.3.6" + "@storybook/addon-viewport" "6.3.6" + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/node-logger" "6.3.6" core-js "^3.8.2" regenerator-runtime "^0.13.7" storybook-addon-outline "^1.4.1" ts-dedent "^2.0.0" -"@storybook/addon-links@^6.3.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.3.2.tgz#4db9d63d0e195f5887fe74dab09ae5bb0c64275c" - integrity sha512-JT7HLIZRvUJ0dDkhz4daL/GdpS/JPhuRaKPonRbtLW6RFAbBjLolqALVfxRJzOsYMwStUMtnxzzgKmeLOjtPIA== +"@storybook/addon-links@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.3.6.tgz#dc410d5b4a0d222b6b8d0ef03da7a4c16919c092" + integrity sha512-PaeAJTjwtPlhrLZlaSQ1YIFA8V0C1yI0dc351lPbTiE7fJ7DwTE03K6xIF/jEdTo+xzhi2PM1Fgvi/SsSecI8w== dependencies: - "@storybook/addons" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/core-events" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" "@storybook/csf" "0.0.1" - "@storybook/router" "6.3.2" + "@storybook/router" "6.3.6" "@types/qs" "^6.9.5" core-js "^3.8.2" global "^4.4.0" @@ -1857,37 +1871,52 @@ resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-2.0.0.tgz#c40bbe91bacd3f795963dc1ee6ff86be87deeda9" integrity sha512-ZhdT++cX+L9LwjhGYggvYUUVQH/MGn2rwbrAwCMzA/f2QTFvkjxzX8nDgMxIhaLCDC+gHIxfJG2wrWN0jkBr3g== -"@storybook/addon-toolbars@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.3.2.tgz#bad5185c764179200594d9a6dd86c9e43556962a" - integrity sha512-Gc2nak1MaCbC5h67TSXIvg65llidHngGHQCE2Ru6cPnTFqAtLs2QdsA72ScAOSLmwSeliVxkcoOXL9wN1vlXsg== +"@storybook/addon-toolbars@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.3.6.tgz#41f5f29988260d2aad9431b7a91f57e848c3e0bf" + integrity sha512-VpwkMtvT/4KNjqdO2SCkFw4koMgYN2k8hckbTGRzuUYYTHBvl9yK4q0A7RELEnkm/tsmDI1TjenV/MBifp2Aiw== dependencies: - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/theming" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/theming" "6.3.6" core-js "^3.8.2" regenerator-runtime "^0.13.7" -"@storybook/addon-viewport@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.3.2.tgz#7a8f6b91ba7d8aab3f24611e4962b317eecc17d4" - integrity sha512-npmD2kpXyc7zPFgxOu2JBg8U702P4c2B+OvFa53jQJIKyUdjXNzGatG2FSshQmY+UpiDJyKScPJ7W/9oU7HAfw== - dependencies: - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core-events" "6.3.2" - "@storybook/theming" "6.3.2" +"@storybook/addon-viewport@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.3.6.tgz#9117316e918559d389a19571166579858b25b09b" + integrity sha512-Z5eztFFGd6vd+38sDurfTkIr9lY6EYWtMJzr5efedRZGg2IZLXZxQCoyjKEB29VB/IIjHEYHhHSh4SFsHT/m6g== + dependencies: + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/theming" "6.3.6" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" prop-types "^15.7.2" regenerator-runtime "^0.13.7" -"@storybook/addons@6.3.2", "@storybook/addons@^6.3.0": +"@storybook/addons@6.3.6", "@storybook/addons@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.3.6.tgz#330fd722bdae8abefeb029583e89e51e62c20b60" + integrity sha512-tVV0vqaEEN9Md4bgScwfrnZYkN8iKZarpkIOFheLev+PHjSp8lgWMK5SNWDlbBYqfQfzrz9xbs+F07bMjfx9jQ== + dependencies: + "@storybook/api" "6.3.6" + "@storybook/channels" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/router" "6.3.6" + "@storybook/theming" "6.3.6" + core-js "^3.8.2" + global "^4.4.0" + regenerator-runtime "^0.13.7" + +"@storybook/addons@^6.3.0": version "6.3.2" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.3.2.tgz#a116f71e07e2ca17f2c59accff8aebd0d01e3a3e" integrity sha512-fzpTLKyweD0yPXnfjaOrLpKRm4AVHdGRmfJb1p6KyUTXoNRWGYHsXN3EvAdsWjTamhbL2JoQy38kvu7SmkTEug== @@ -1928,10 +1957,36 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/builder-webpack4@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.3.2.tgz#c0b285ae38f0973fb38e378defe13e99afcadfa4" - integrity sha512-0xKMy/9Zp+Z1EK9R2Oq4kmd2Za9OlzXoLNBHdGuwe3lqoCsXvEQHsrGdc7V5uT4HwP1KBEhn9Yl+Y7yuMDZJ0Q== +"@storybook/api@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.3.6.tgz#b110688ae0a970c9443d47b87616a09456f3708e" + integrity sha512-F5VuR1FrEwD51OO/EDDAZXNfF5XmJedYHJLwwCB4az2ZMrzG45TxGRmiEohrSTO6wAHGkAvjlEoX5jWOCqQ4pw== + dependencies: + "@reach/router" "^1.3.4" + "@storybook/channels" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/csf" "0.0.1" + "@storybook/router" "6.3.6" + "@storybook/semver" "^7.3.2" + "@storybook/theming" "6.3.6" + "@types/reach__router" "^1.3.7" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.20" + memoizerific "^1.11.3" + qs "^6.10.0" + regenerator-runtime "^0.13.7" + store2 "^2.12.0" + telejson "^5.3.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/builder-webpack4@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.3.6.tgz#fe444abfc178e005ea077e2bcfd6ae7509522908" + integrity sha512-LhTPQQowS2t6BRnyfusWZLbhjjf54/HiQyovJTTDnqrCiO6QoCMbVnp79LeO1aSkpQCKoeqOZ7TzH87fCytnZA== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -1954,20 +2009,20 @@ "@babel/preset-env" "^7.12.11" "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/channel-postmessage" "6.3.2" - "@storybook/channels" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core-common" "6.3.2" - "@storybook/core-events" "6.3.2" - "@storybook/node-logger" "6.3.2" - "@storybook/router" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/channel-postmessage" "6.3.6" + "@storybook/channels" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core-common" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/node-logger" "6.3.6" + "@storybook/router" "6.3.6" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.3.2" - "@storybook/ui" "6.3.2" + "@storybook/theming" "6.3.6" + "@storybook/ui" "6.3.6" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" autoprefixer "^9.8.6" @@ -2004,14 +2059,14 @@ webpack-hot-middleware "^2.25.0" webpack-virtual-modules "^0.2.2" -"@storybook/channel-postmessage@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.3.2.tgz#7fe94d128b03eefbb1b6637dfa417f95bdced30e" - integrity sha512-6ne51RmZ7Ye9TDhPy/y5NuyQGNJ6VJcEch5E8D0nrFfNwJ5djKzkg1xatADjdhlCfQ9zPfseQVPM5IovEzEb/A== +"@storybook/channel-postmessage@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.3.6.tgz#f29c3678161462428e78c9cfed2da11ffca4acb0" + integrity sha512-GK7hXnaa+1pxEeMpREDzAZ3+2+k1KN1lbrZf+V7Kc1JZv1/Ji/vxk8AgxwiuzPAMx5J0yh/FduPscIPZ87Pibw== dependencies: - "@storybook/channels" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/core-events" "6.3.2" + "@storybook/channels" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" core-js "^3.8.2" global "^4.4.0" qs "^6.10.0" @@ -2026,16 +2081,25 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.3.2.tgz#2180bd4e3ae903a1f5199651644335a1abfddcff" - integrity sha512-vYPTaROdmBtzKckGAbZAi8gpD2OgDB0FlsjTTe7rz8jcN1ecGRBBXlb/CJndLlAKgZqF+sramtIY3GZp0wdpPA== +"@storybook/channels@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.3.6.tgz#a258764ed78fd836ff90489ae74ac055312bf056" + integrity sha512-gCIQVr+dS/tg3AyCxIvkOXMVAs08BCIHXsaa2+XzmacnJBSP+CEHtI6IZ8WEv7tzZuXOiKLVg+wugeIh4j2I4g== dependencies: - "@storybook/addons" "6.3.2" - "@storybook/channel-postmessage" "6.3.2" - "@storybook/channels" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/core-events" "6.3.2" + core-js "^3.8.2" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/client-api@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.3.6.tgz#4826ce366ae109f608da6ade24b29efeb9b7f7dd" + integrity sha512-Q/bWuH691L6k7xkiKtBmZo8C+ijgmQ+vc2Fz8pzIRZuMV8ROL74qhrS4BMKV4LhiYm4f8todtWfaQPBjawZMIA== + dependencies: + "@storybook/addons" "6.3.6" + "@storybook/channel-postmessage" "6.3.6" + "@storybook/channels" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" "@storybook/csf" "0.0.1" "@types/qs" "^6.9.5" "@types/webpack-env" "^1.16.0" @@ -2058,7 +2122,45 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.3.2", "@storybook/components@^6.3.0": +"@storybook/client-logger@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.3.6.tgz#020ba518ab8286194ce103a6ff91767042e296c0" + integrity sha512-qpXQ52ylxPm7l3+WAteV42NmqWA+L1FaJhMOvm2gwl3PxRd2cNXn2BwEhw++eA6qmJH/7mfOKXG+K+QQwOTpRA== + dependencies: + core-js "^3.8.2" + global "^4.4.0" + +"@storybook/components@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.3.6.tgz#bc2fa1dbe59f42b5b2aeb9f84424072835d4ce8b" + integrity sha512-aZkmtAY8b+LFXG6dVp6cTS6zGJuxkHRHcesRSWRQPxtgitaz1G58clRHxbKPRokfjPHNgYA3snogyeqxSA7YNQ== + dependencies: + "@popperjs/core" "^2.6.0" + "@storybook/client-logger" "6.3.6" + "@storybook/csf" "0.0.1" + "@storybook/theming" "6.3.6" + "@types/color-convert" "^2.0.0" + "@types/overlayscrollbars" "^1.12.0" + "@types/react-syntax-highlighter" "11.0.5" + color-convert "^2.0.1" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.20" + markdown-to-jsx "^7.1.3" + memoizerific "^1.11.3" + overlayscrollbars "^1.13.1" + polished "^4.0.5" + prop-types "^15.7.2" + react-colorful "^5.1.2" + react-popper-tooltip "^3.1.1" + react-syntax-highlighter "^13.5.3" + react-textarea-autosize "^8.3.0" + regenerator-runtime "^0.13.7" + ts-dedent "^2.0.0" + util-deprecate "^1.0.2" + +"@storybook/components@^6.3.0": version "6.3.2" resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.3.2.tgz#fa8970fdfe76246a020f757a7059f312ae2420ce" integrity sha512-lwzqY7CLbo+4PxBiN9DMwtMRPG1jN9Ih6SAdB4fJdCj3bZQ7ef9peme70RvpDEIOD3MX6vu/9AKQj2wxAaHrDA== @@ -2088,18 +2190,18 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/core-client@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.3.2.tgz#847426c4141b10d03a1515374315bfa48b6f5bf8" - integrity sha512-A354DrsBQgtfKRSNVM0WpepNZwZfb8QxBKB86LR5crfbLIAs9fxJnYmAVBF1ju1EasrIxX6kGDryH4pQYaJPXw== +"@storybook/core-client@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.3.6.tgz#7def721aa15d4faaff574780d30b92055db7261c" + integrity sha512-Bq86flEdXdMNbdHrGMNQ6OT1tcBQU8ym56d+nG46Ctjf5GN+Dl+rPtRWuu7cIZs10KgqJH+86DXp+tvpQIDidg== dependencies: - "@storybook/addons" "6.3.2" - "@storybook/channel-postmessage" "6.3.2" - "@storybook/client-api" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/core-events" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/channel-postmessage" "6.3.6" + "@storybook/client-api" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/core-events" "6.3.6" "@storybook/csf" "0.0.1" - "@storybook/ui" "6.3.2" + "@storybook/ui" "6.3.6" airbnb-js-shims "^2.2.1" ansi-to-html "^0.6.11" core-js "^3.8.2" @@ -2111,10 +2213,10 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" -"@storybook/core-common@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.3.2.tgz#d1d9f14361296437983006ecea963e6af599bc34" - integrity sha512-draeHXXWTn1u3YzLMZdtCOy1UOXsPBQz6q5f64o8Qjkr8Htqf2IiFYPmswOq7eo9yPQZu7+nsfRcx7M1GNAQlg== +"@storybook/core-common@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.3.6.tgz#da8eed703b609968e15177446f0f1609d1d6d0d0" + integrity sha512-nHolFOmTPymI50j180bCtcf1UJZ2eOnYaECRtHvVrCUod5KFF7wh2EHrgWoKqrKrsn84UOY/LkX2C2WkbYtWRg== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -2137,7 +2239,7 @@ "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" "@babel/register" "^7.12.1" - "@storybook/node-logger" "6.3.2" + "@storybook/node-logger" "6.3.6" "@storybook/semver" "^7.3.2" "@types/glob-base" "^0.3.0" "@types/micromatch" "^4.0.1" @@ -2172,17 +2274,24 @@ dependencies: core-js "^3.8.2" -"@storybook/core-server@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.3.2.tgz#76392f835baea2a30122d66b3fed506f8171a955" - integrity sha512-ceBKdLYlhKygBOJyIWR+9i4bLVOOadsLxM9ITAIzaSqSfZiuFxoP+irnEZrZUfFA0zcLYFEW5MH2vtCCPH+fhg== - dependencies: - "@storybook/builder-webpack4" "6.3.2" - "@storybook/core-client" "6.3.2" - "@storybook/core-common" "6.3.2" - "@storybook/csf-tools" "6.3.2" - "@storybook/manager-webpack4" "6.3.2" - "@storybook/node-logger" "6.3.2" +"@storybook/core-events@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.3.6.tgz#c4a09e2c703170995604d63e46e45adc3c9cd759" + integrity sha512-Ut1dz96bJ939oSn5t1ckPXd3WcFejK96Sb3+R/z23vEHUWGBFtygGyw8r/SX/WNDVzGmQU8c+mzJJTZwCBJz8A== + dependencies: + core-js "^3.8.2" + +"@storybook/core-server@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.3.6.tgz#43c1415573c3b72ec6b9ae48d68e1bb446722f7c" + integrity sha512-47ZcfxYn7t891oAMG98iH1BQIgQT9Yk/2BBNVCWY43Ong+ME1xJ6j4C/jkRUOseP7URlfLUQsUYKAYJNVijDvg== + dependencies: + "@storybook/builder-webpack4" "6.3.6" + "@storybook/core-client" "6.3.6" + "@storybook/core-common" "6.3.6" + "@storybook/csf-tools" "6.3.6" + "@storybook/manager-webpack4" "6.3.6" + "@storybook/node-logger" "6.3.6" "@storybook/semver" "^7.3.2" "@types/node" "^14.0.10" "@types/node-fetch" "^2.5.7" @@ -2211,18 +2320,18 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.3.2.tgz#8c3bd78fef26395059d3710bd69ce438cdf71193" - integrity sha512-EPyGqTu2f2184FfZ7o1IMWbVKWkdhbIeLSnNfl5CA5ZVMFQwV8XhEJXpzWI0VopZK0hE0+ooU4M+if8JeSWulQ== +"@storybook/core@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.3.6.tgz#604419d346433103675901b3736bfa1ed9bc534f" + integrity sha512-y71VvVEbqCpG28fDBnfNg3RnUPnicwFYq9yuoFVRF0LYcJCy5cYhkIfW3JG8mN2m0P+LzH80mt2Rj6xlSXrkdQ== dependencies: - "@storybook/core-client" "6.3.2" - "@storybook/core-server" "6.3.2" + "@storybook/core-client" "6.3.6" + "@storybook/core-server" "6.3.6" -"@storybook/csf-tools@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.3.2.tgz#93bffc555a8a8535c3ee99e21f131860fc78e251" - integrity sha512-CGj4HsKwYBwp2zWmrG1RJedwrnakfxkptp/4HQ0mE9ajw28GndNZus2+IgnBsxdbzv8LYwz/rHpXRbvfDbgPFg== +"@storybook/csf-tools@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.3.6.tgz#603d9e832f946998b75ff8368fe862375d6cb52c" + integrity sha512-MQevelkEUVNCSjKMXLNc/G8q/BB5babPnSeI0IcJq4k+kLUSHtviimLNpPowMgGJBPx/y9VihH8N7vdJUWVj9w== dependencies: "@babel/generator" "^7.12.11" "@babel/parser" "^7.12.11" @@ -2246,20 +2355,20 @@ dependencies: lodash "^4.17.15" -"@storybook/manager-webpack4@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.3.2.tgz#4c2621e0f6e2be2e248cf93d796bc705de34c670" - integrity sha512-MeYXK2H65y08meKM477PT0ygMMiHYGo9e8vl8oIXY3pp/24iiE5W+yCHH3HP5PEsKCXMml6gWM7ba44lpkuutQ== +"@storybook/manager-webpack4@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.3.6.tgz#a5334aa7ae1e048bca8f4daf868925d7054fb715" + integrity sha512-qh/jV4b6mFRpRFfhk1JSyO2gKRz8PLPvDt2AD52/bTAtNRzypKoiWqyZNR2CJ9hgNQtDrk2CO3eKPrcdKYGizQ== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.3.2" - "@storybook/core-client" "6.3.2" - "@storybook/core-common" "6.3.2" - "@storybook/node-logger" "6.3.2" - "@storybook/theming" "6.3.2" - "@storybook/ui" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/core-client" "6.3.6" + "@storybook/core-common" "6.3.6" + "@storybook/node-logger" "6.3.6" + "@storybook/theming" "6.3.6" + "@storybook/ui" "6.3.6" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" babel-loader "^8.2.2" @@ -2289,10 +2398,10 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" -"@storybook/node-logger@6.3.2", "@storybook/node-logger@^6.3.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.3.2.tgz#fc4c6f707030e04f8bc559bc188802d549b0507c" - integrity sha512-TJvJpysIIP3EWoyfFDmXCRC/yTReu0jIFUPdldh4FjhADjQU+JTbLwJmtcJyHoMSqfIHgUc1TB6D/B4PjYqElA== +"@storybook/node-logger@6.3.6", "@storybook/node-logger@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.3.6.tgz#10356608593440a8e3acf2aababef40333a3401b" + integrity sha512-XMDkMN7nVRojjiezrURlkI57+nz3OoH4UBV6qJZICKclxtdKAy0wwOlUSYEUq+axcJ4nvdfzPPoDfGoj37SW7A== dependencies: "@types/npmlog" "^4.1.2" chalk "^4.1.0" @@ -2300,10 +2409,10 @@ npmlog "^4.1.2" pretty-hrtime "^1.0.3" -"@storybook/postinstall@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.3.2.tgz#6abe1093fd3f12614bbcd9bc90d65abaaf311587" - integrity sha512-RkzrEr5GyBKFEPwOJw6JFRqkCtexvqZbyQeDuQ8K5AxRoJOcdXfxtb2Qkq06wfUnexxhZ9R0ktzepdtzk89ALw== +"@storybook/postinstall@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.3.6.tgz#fd79a6c109b38ced4b9b40db2d27b88ee184d449" + integrity sha512-90Izr8/GwLiXvdF2A3v1PCpWoxUBgqA0TrWGuiWXfJnfFRVlVrX9A/ClGUPSh80L3oE01E6raaOG4wW4JTRKfw== dependencies: core-js "^3.8.2" @@ -2336,18 +2445,18 @@ react-docgen-typescript "^2.0.0" tslib "^2.0.0" -"@storybook/react@^6.3.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.3.2.tgz#6c9b2e010874ccc991a511cfed87b134ef02bc6d" - integrity sha512-AwuXzvu6zKSZnWFgYWxvP1QumnJ/8VChZJ1/pCEW3IGqxtSBd7KAF7EjlmS6CqAnWP+zp9jUr7It1P9631CwNQ== +"@storybook/react@^6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.3.6.tgz#593bc0743ad22ed5e6e072e6157c20c704864fc3" + integrity sha512-2c30XTe7WzKnvgHBGOp1dzBVlhcbc3oEX0SIeVE9ZYkLvRPF+J1jG948a26iqOCOgRAW13Bele37mG1gbl4tiw== dependencies: "@babel/preset-flow" "^7.12.1" "@babel/preset-react" "^7.12.10" "@pmmmwh/react-refresh-webpack-plugin" "^0.4.3" - "@storybook/addons" "6.3.2" - "@storybook/core" "6.3.2" - "@storybook/core-common" "6.3.2" - "@storybook/node-logger" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/core" "6.3.6" + "@storybook/core-common" "6.3.6" + "@storybook/node-logger" "6.3.6" "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.253f8c1.0" "@storybook/semver" "^7.3.2" "@types/webpack-env" "^1.16.0" @@ -2381,6 +2490,22 @@ qs "^6.10.0" ts-dedent "^2.0.0" +"@storybook/router@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.3.6.tgz#cea20d64bae17397dc9e1689a656b80a98674c34" + integrity sha512-fQ1n7cm7lPFav7I+fStQciSVMlNdU+yLY6Fue252rpV5Q68bMTjwKpjO9P2/Y3CCj4QD3dPqwEkn4s0qUn5tNA== + dependencies: + "@reach/router" "^1.3.4" + "@storybook/client-logger" "6.3.6" + "@types/reach__router" "^1.3.7" + core-js "^3.8.2" + fast-deep-equal "^3.1.3" + global "^4.4.0" + lodash "^4.17.20" + memoizerific "^1.11.3" + qs "^6.10.0" + ts-dedent "^2.0.0" + "@storybook/semver@^7.3.2": version "7.3.2" resolved "https://registry.yarnpkg.com/@storybook/semver/-/semver-7.3.2.tgz#f3b9c44a1c9a0b933c04e66d0048fcf2fa10dac0" @@ -2389,13 +2514,13 @@ core-js "^3.6.5" find-up "^4.1.0" -"@storybook/source-loader@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.3.2.tgz#2f2132b9743c95e4f40d26a28b5255bb762e16fc" - integrity sha512-tg8VDBoVRrazDdvFJBtAp0ChztaF3cxmXsbWCOxYkP8u4sYDXBikJCllSGzkuSx6GUuU0kyQ0JV94Bd2ECTdOw== +"@storybook/source-loader@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.3.6.tgz#2d3d01919baad7a40f67d1150c74e41dea5f1d4c" + integrity sha512-om3iS3a+D287FzBrbXB/IXB6Z5Ql2yc4dFKTy6FPe5v4N3U0p5puWOKUYWWbTX1JbcpRj0IXXo7952G68tcC1g== dependencies: - "@storybook/addons" "6.3.2" - "@storybook/client-logger" "6.3.2" + "@storybook/addons" "6.3.6" + "@storybook/client-logger" "6.3.6" "@storybook/csf" "0.0.1" core-js "^3.8.2" estraverse "^5.2.0" @@ -2423,21 +2548,39 @@ resolve-from "^5.0.0" ts-dedent "^2.0.0" -"@storybook/ui@6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.3.2.tgz#af6d793a22d0e127fed7e2b041133792bf1646b6" - integrity sha512-Aqzr5vQsr67iDwg41CmHr/NlcNayld8PPGWqtxJ/+/fSScnKZ8KdwGoqpj64dizowoggpCCeYVZCanHhxS47Vg== +"@storybook/theming@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.3.6.tgz#75624f6d4e01530b87afca3eab9996a16c0370ab" + integrity sha512-mPrQrMUREajNEWxzgR8t0YIZsI9avPv25VNA08fANnwVsc887p4OL5eCTL2dFIlD34YDzAwiyRKYoLj2vDW4nw== dependencies: "@emotion/core" "^10.1.1" - "@storybook/addons" "6.3.2" - "@storybook/api" "6.3.2" - "@storybook/channels" "6.3.2" - "@storybook/client-logger" "6.3.2" - "@storybook/components" "6.3.2" - "@storybook/core-events" "6.3.2" - "@storybook/router" "6.3.2" + "@emotion/is-prop-valid" "^0.8.6" + "@emotion/styled" "^10.0.27" + "@storybook/client-logger" "6.3.6" + core-js "^3.8.2" + deep-object-diff "^1.1.0" + emotion-theming "^10.0.27" + global "^4.4.0" + memoizerific "^1.11.3" + polished "^4.0.5" + resolve-from "^5.0.0" + ts-dedent "^2.0.0" + +"@storybook/ui@6.3.6": + version "6.3.6" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.3.6.tgz#a9ed8265e34bb8ef9f0dd08f40170b3dcf8a8931" + integrity sha512-S9FjISUiAmbBR7d6ubUEcELQdffDfRxerloxkXs5Ou7n8fEPqpgQB01Hw5MLRUwTEpxPzHn+xtIGYritAGxt/Q== + dependencies: + "@emotion/core" "^10.1.1" + "@storybook/addons" "6.3.6" + "@storybook/api" "6.3.6" + "@storybook/channels" "6.3.6" + "@storybook/client-logger" "6.3.6" + "@storybook/components" "6.3.6" + "@storybook/core-events" "6.3.6" + "@storybook/router" "6.3.6" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.3.2" + "@storybook/theming" "6.3.6" "@types/markdown-to-jsx" "^6.11.3" copy-to-clipboard "^3.3.1" core-js "^3.8.2" @@ -2495,10 +2638,10 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^8.0.0" -"@testing-library/user-event@^13.1.9": - version "13.1.9" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.1.9.tgz#29e49a42659ac3c1023565ff56819e0153a82e99" - integrity sha512-NZr0zL2TMOs2qk+dNlqrAdbaRW5dAmYwd1yuQ4r7HpkVEOj0MWuUjDWwKhcLd/atdBy8ZSMHSKp+kXSQe47ezg== +"@testing-library/user-event@^13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.2.1.tgz#7a71a39e50b4a733afbe2916fa2b99966e941f98" + integrity sha512-cczlgVl+krjOb3j1625usarNEibI0IFRJrSWX9UsJ1HKYFgCQv9Nb7QAipUDXl3Xdz8NDTsiS78eAkPSxlzTlw== dependencies: "@babel/runtime" "^7.12.5" @@ -2654,7 +2797,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@*", "@types/jest@^26.0.23": +"@types/jest@*": version "26.0.23" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== @@ -2662,6 +2805,14 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" +"@types/jest@^26.0.24": + version "26.0.24" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" + integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== + dependencies: + jest-diff "^26.0.0" + pretty-format "^26.0.0" + "@types/jquery@*": version "3.5.5" resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.5.tgz#2c63f47c9c8d96693d272f5453602afd8338c903" @@ -2799,10 +2950,10 @@ dependencies: "@types/react" "*" -"@types/react-dom@^17.0.8": - version "17.0.8" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.8.tgz#3180de6d79bf53762001ad854e3ce49f36dd71fc" - integrity sha512-0ohAiJAx1DAUEcY9UopnfwCE9sSMDGnY/oXjWMax6g3RpzmTt2GMyMVAXcbn0mo8XAff0SbQJl2/SBU+hjSZ1A== +"@types/react-dom@^17.0.9": + version "17.0.9" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.9.tgz#441a981da9d7be117042e1a6fd3dac4b30f55add" + integrity sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg== dependencies: "@types/react" "*" @@ -2816,16 +2967,16 @@ hoist-non-react-statics "^3.3.0" redux "^4.0.0" -"@types/react-router-dom@^5.1.7": - version "5.1.7" - resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.7.tgz#a126d9ea76079ffbbdb0d9225073eb5797ab7271" - integrity sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg== +"@types/react-router-dom@^5.1.8": + version "5.1.8" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.8.tgz#bf3e1c8149b3d62eaa206d58599de82df0241192" + integrity sha512-03xHyncBzG0PmDmf8pf3rehtjY0NpUj7TIN46FrT5n1ZWHPZvXz32gUyNboJ+xsL8cpg8bQVLcllptcQHvocrw== dependencies: "@types/history" "*" "@types/react" "*" "@types/react-router" "*" -"@types/react-router@*", "@types/react-router@^5.1.15": +"@types/react-router@*": version "5.1.15" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.15.tgz#c1069e0da4617fd315e381b56b18b89490e14e2a" integrity sha512-z3UlMG/x91SFEVmmvykk9FLTliDvfdIUky4k2rCfXWQ0NKbrP8o9BTCaCTPuYsB8gDkUnUmkcA2vYlm2DR+HAA== @@ -2833,6 +2984,14 @@ "@types/history" "*" "@types/react" "*" +"@types/react-router@^5.1.16": + version "5.1.16" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.16.tgz#f3ba045fb96634e38b21531c482f9aeb37608a99" + integrity sha512-8d7nR/fNSqlTFGHti0R3F9WwIertOaaA1UEB8/jr5l5mDMOs4CidEgvvYMw4ivqrBK+vtVLxyTj2P+Pr/dtgzg== + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react-syntax-highlighter@11.0.5": version "11.0.5" resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-11.0.5.tgz#0d546261b4021e1f9d85b50401c0a42acb106087" @@ -2840,15 +2999,15 @@ dependencies: "@types/react" "*" -"@types/react-virtualized@^9.21.11": - version "9.21.11" - resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.21.11.tgz#8eb60ed12ef0b2625769819f9fd10ad4bb1bdce0" - integrity sha512-ngNe2AY/2CHuZQstOS0Jo5jnSjeyKTdSgqrXCQEltRMXLp9rwPUpJdgkoWzES6wn427Z8zo8dkBN8Sx7hlRmig== +"@types/react-virtualized@^9.21.13": + version "9.21.13" + resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.21.13.tgz#4222173abe7c9ed7504c75886c8367502ac7b9f1" + integrity sha512-tCIQ5wDKj+QJ3sMzjPKSLY0AXsznt+ovAUcq+JCLjPBOcAHbPt4FraGT9HKYEFfmp9E6+ELuN49i5bWtuBmi3w== dependencies: "@types/prop-types" "*" "@types/react" "*" -"@types/react@*", "@types/react@^17.0.11": +"@types/react@*": version "17.0.11" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.11.tgz#67fcd0ddbf5a0b083a0f94e926c7d63f3b836451" integrity sha512-yFRQbD+whVonItSk7ZzP/L+gPTJVBkL/7shLEF+i9GC/1cV3JmUxEQz6+9ylhUpWSDuqo1N9qEvqS6vTj4USUA== @@ -2857,6 +3016,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^17.0.16": + version "17.0.16" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.16.tgz#056f40c45645761527baeb7d89d842a6abdf285a" + integrity sha512-3kCUiOOlQTwUUvjNFkbBTWMTxdTGybz/PfjCw9JmaRGcEDBQh+nGMg7/E9P2rklhJuYVd25IYLNcvqgSPCPksg== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -2903,10 +3071,10 @@ dependencies: "@types/jest" "*" -"@types/tinymce@^4.6.2": - version "4.6.3" - resolved "https://registry.yarnpkg.com/@types/tinymce/-/tinymce-4.6.3.tgz#98c3ece2efc95df9523d586111d82fa20cbda043" - integrity sha512-055OQOwpAz3CU72gBXKdrani/RWi0ENtEILrSJZ5aKAoLmi3TLaWFqVqutrgUmZz64H5YJJvolGvsxb7MMw4QA== +"@types/tinymce@^4.6.4": + version "4.6.4" + resolved "https://registry.yarnpkg.com/@types/tinymce/-/tinymce-4.6.4.tgz#c31d72ba55147233e2b8fa8ebb81960f23d74c32" + integrity sha512-7xo9AnZO9DXdS41zxmKHDzOEo+yxdj9KaZXokSLDYeZ9KcbzIHJJBppRrCoDA8PH2+k79Qj68B+Yj/ye2xQzow== dependencies: "@types/jquery" "*" @@ -2967,20 +3135,32 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.28.0": - version "4.28.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.1.tgz#c045e440196ae45464e08e20c38aff5c3a825947" - integrity sha512-9yfcNpDaNGQ6/LQOX/KhUFTR1sCKH+PBr234k6hI9XJ0VP5UqGxap0AnNwBnWFk1MNyWBylJH9ZkzBXC+5akZQ== +"@typescript-eslint/eslint-plugin@^4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996" + integrity sha512-eiREtqWRZ8aVJcNru7cT/AMVnYd9a2UHsfZT8MR1dW3UUEg6jDv9EQ9Cq4CUPZesyQ58YUpoAADGv71jY8RwgA== dependencies: - "@typescript-eslint/experimental-utils" "4.28.1" - "@typescript-eslint/scope-manager" "4.28.1" + "@typescript-eslint/experimental-utils" "4.29.0" + "@typescript-eslint/scope-manager" "4.29.0" debug "^4.3.1" functional-red-black-tree "^1.0.1" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.28.1", "@typescript-eslint/experimental-utils@^4.0.1": +"@typescript-eslint/experimental-utils@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.0.tgz#19b1417602d0e1ef325b3312ee95f61220542df5" + integrity sha512-FpNVKykfeaIxlArLUP/yQfv/5/3rhl1ov6RWgud4OgbqWLkEq7lqgQU9iiavZRzpzCRQV4XddyFz3wFXdkiX9w== + dependencies: + "@types/json-schema" "^7.0.7" + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/experimental-utils@^4.0.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.1.tgz#3869489dcca3c18523c46018b8996e15948dbadc" integrity sha512-n8/ggadrZ+uyrfrSEchx3jgODdmcx7MzVM2sI3cTpI/YlfSm0+9HEUaWw3aQn2urL2KYlWYMDgn45iLfjDYB+Q== @@ -2992,14 +3172,14 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.28.0": - version "4.28.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.1.tgz#5181b81658414f47291452c15bf6cd44a32f85bd" - integrity sha512-UjrMsgnhQIIK82hXGaD+MCN8IfORS1CbMdu7VlZbYa8LCZtbZjJA26De4IPQB7XYZbL8gJ99KWNj0l6WD0guJg== +"@typescript-eslint/parser@^4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.0.tgz#e5367ca3c63636bb5d8e0748fcbab7a4f4a04289" + integrity sha512-+92YRNHFdXgq+GhWQPT2bmjX09X7EH36JfgN2/4wmhtwV/HPxozpCNst8jrWcngLtEVd/4zAwA6BKojAlf+YqA== dependencies: - "@typescript-eslint/scope-manager" "4.28.1" - "@typescript-eslint/types" "4.28.1" - "@typescript-eslint/typescript-estree" "4.28.1" + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" debug "^4.3.1" "@typescript-eslint/scope-manager@4.28.1": @@ -3010,11 +3190,24 @@ "@typescript-eslint/types" "4.28.1" "@typescript-eslint/visitor-keys" "4.28.1" +"@typescript-eslint/scope-manager@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.0.tgz#cf5474f87321bedf416ef65839b693bddd838599" + integrity sha512-HPq7XAaDMM3DpmuijxLV9Io8/6pQnliiXMQUcAdjpJJSR+fdmbD/zHCd7hMkjJn04UQtCQBtshgxClzg6NIS2w== + dependencies: + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" + "@typescript-eslint/types@4.28.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.1.tgz#d0f2ecbef3684634db357b9bbfc97b94b828f83f" integrity sha512-4z+knEihcyX7blAGi7O3Fm3O6YRCP+r56NJFMNGsmtdw+NCdpG5SgNz427LS9nQkRVTswZLhz484hakQwB8RRg== +"@typescript-eslint/types@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.0.tgz#c8f1a1e4441ea4aca9b3109241adbc145f7f8a4e" + integrity sha512-2YJM6XfWfi8pgU2HRhTp7WgRw78TCRO3dOmSpAvIQ8MOv4B46JD2chnhpNT7Jq8j0APlIbzO1Bach734xxUl4A== + "@typescript-eslint/typescript-estree@4.28.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.1.tgz#af882ae41740d1f268e38b4d0fad21e7e8d86a81" @@ -3028,6 +3221,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.0.tgz#af7ab547757b86c91bfdbc54ff86845410856256" + integrity sha512-8ZpNHDIOyqzzgZrQW9+xQ4k5hM62Xy2R4RPO3DQxMc5Rq5QkCdSpk/drka+DL9w6sXNzV5nrdlBmf8+x495QXQ== + dependencies: + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" + debug "^4.3.1" + globby "^11.0.3" + is-glob "^4.0.1" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/visitor-keys@4.28.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.1.tgz#162a515ee255f18a6068edc26df793cdc1ec9157" @@ -3036,6 +3242,14 @@ "@typescript-eslint/types" "4.28.1" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.0.tgz#1ff60f240def4d85ea68d4fd2e4e9759b7850c04" + integrity sha512-LoaofO1C/jAJYs0uEpYMXfHboGXzOJeV118X4OsZu9f7rG7Pr9B3+4HTU8+err81rADa4xfQmAxnRnPAI2jp+Q== + dependencies: + "@typescript-eslint/types" "4.29.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -3397,10 +3611,10 @@ ansi-to-html@^0.6.11: dependencies: entities "^2.0.0" -antd@^4.16.5: - version "4.16.6" - resolved "https://registry.yarnpkg.com/antd/-/antd-4.16.6.tgz#5f79fa103bbd8be30fac74142ef1bbf8bc872491" - integrity sha512-E7T+GClZPGjPUfmiuTbQK4+OfvsQ/Ksi5C71Bm4dwz1wlbJ4CqfxhIlpBypod9fe8mCI+bVAjtBoUpR1q/6Sow== +antd@^4.16.10: + version "4.16.10" + resolved "https://registry.yarnpkg.com/antd/-/antd-4.16.10.tgz#d785741413a1875d9e526a09b8f5388cc29677e9" + integrity sha512-l1A6AiIXJPvJL9EXxF6nIEr44tcNFcx73u5+sSAU/heHQjC3wWUey6bY3nn9StdHcP8HuJOIs8vpev4cp6ty/w== dependencies: "@ant-design/colors" "^6.0.0" "@ant-design/icons" "^4.6.2" @@ -3414,7 +3628,7 @@ antd@^4.16.5: rc-cascader "~1.4.0" rc-checkbox "~2.3.0" rc-collapse "~3.1.0" - rc-dialog "~8.5.1" + rc-dialog "~8.6.0" rc-drawer "~4.3.0" rc-dropdown "~3.2.0" rc-field-form "~1.20.0" @@ -3434,7 +3648,7 @@ antd@^4.16.5: rc-steps "~4.1.0" rc-switch "~3.2.0" rc-table "~7.15.1" - rc-tabs "~11.9.1" + rc-tabs "~11.10.0" rc-textarea "~0.3.0" rc-tooltip "~5.1.1" rc-tree "~4.2.1" @@ -3662,13 +3876,13 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^10.2.6: - version "10.2.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.2.6.tgz#aadd9ec34e1c98d403e01950038049f0eb252949" - integrity sha512-8lChSmdU6dCNMCQopIf4Pe5kipkAGj/fvTMslCsih0uHpOrXOPUEVOmYMMqmw3cekQkSD7EhIeuYl5y0BLdKqg== +autoprefixer@^10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.1.tgz#954214821d3aa06692406c6a0a9e9d401eafbed2" + integrity sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A== dependencies: browserslist "^4.16.6" - caniuse-lite "^1.0.30001230" + caniuse-lite "^1.0.30001243" colorette "^1.2.2" fraction.js "^4.1.1" normalize-range "^0.1.2" @@ -4378,11 +4592,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001230: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219: version "1.0.30001241" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001241.tgz#cd3fae47eb3d7691692b406568d7a3e5b23c7598" integrity sha512-1uoSZ1Pq1VpH0WerIMqwptXHNNGfdl7d1cJUFs80CwQ/lVzdhTvsFZCeNFslze7AjsQnb4C85tzclPa1VShbeQ== +caniuse-lite@^1.0.30001243: + version "1.0.30001249" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz#90a330057f8ff75bfe97a94d047d5e14fabb2ee8" + integrity sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw== + canonicalize@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.5.tgz#b43b390ce981d397908bb847c3a8d9614323a47b" @@ -5327,14 +5546,15 @@ cssnano@^4.1.10: is-resolvable "^1.0.0" postcss "^7.0.0" -cssnano@^5.0.4: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.6.tgz#2a91ad34c6521ae31eab3da9c90108ea3093535d" - integrity sha512-NiaLH/7yqGksFGsFNvSRe2IV/qmEBAeDE64dYeD8OBrgp6lE8YoMeQJMtsv5ijo6MPyhuoOvFhI94reahBRDkw== +cssnano@^5.0.7: + version "5.0.7" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" + integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== dependencies: - cosmiconfig "^7.0.0" cssnano-preset-default "^5.1.3" is-resolvable "^1.1.0" + lilconfig "^2.0.3" + yaml "^1.10.2" csso@^4.0.2, csso@^4.2.0: version "4.2.0" @@ -6025,10 +6245,10 @@ eslint-module-utils@^2.6.1: debug "^3.2.7" pkg-dir "^2.0.0" -eslint-plugin-flowtype@^5.7.2: - version "5.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.8.0.tgz#35b55e4ce559b90efbe913ed33630e391e301481" - integrity sha512-feK1xnUTsMSNTOw9jFw7aVgZl7Ep+ghpta/YEoaV6jbXU6Yso30B7BIj9ObHLzZ5TFJL7D98az080wfykLCrcw== +eslint-plugin-flowtype@^5.9.0: + version "5.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.9.0.tgz#8d2d81d3d79bb53470ed62b97409b31684757e30" + integrity sha512-aBUVPA5Wt0XyuV3Wg8flfVqYJR6yR2nRLuyPwoTjCg5VTk4G1X1zQpInr39tUGgRxqrA+d+B9GYK4+/d1i0Rfw== dependencies: lodash "^4.17.15" string-natural-compare "^3.0.1" @@ -6054,10 +6274,10 @@ eslint-plugin-import@^2.23.4: resolve "^1.20.0" tsconfig-paths "^3.9.0" -eslint-plugin-jest@^24.3.6: - version "24.3.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" - integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== +eslint-plugin-jest@^24.4.0: + version "24.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262" + integrity sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" @@ -6148,13 +6368,14 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.29.0: - version "7.29.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.29.0.tgz#ee2a7648f2e729485e4d0bd6383ec1deabc8b3c0" - integrity sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA== +eslint@^7.32.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.2" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -7452,10 +7673,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" - integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== +husky@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c" + integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA== hyphenate-style-name@^1.0.2: version "1.0.4" @@ -8686,7 +8907,7 @@ jest-worker@^27.0.6: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.0.5: +jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505" integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA== @@ -8990,17 +9211,16 @@ linked-list@0.1.0: resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz#798b0ff97d1b92a4fd08480f55aea4e9d49d37bf" integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= -lint-staged@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.0.0.tgz#24d0a95aa316ba28e257f5c4613369a75a10c712" - integrity sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw== +lint-staged@^11.1.2: + version "11.1.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.2.tgz#4dd78782ae43ee6ebf2969cad9af67a46b33cd90" + integrity sha512-6lYpNoA9wGqkL6Hew/4n1H6lRqF3qCsujVT0Oq5Z4hiSAM7S6NksPJ3gnr7A7R52xCtiZMcEUNNQ6d6X5Bvh9w== dependencies: chalk "^4.1.1" cli-truncate "^2.1.0" commander "^7.2.0" cosmiconfig "^7.0.0" debug "^4.3.1" - dedent "^0.7.0" enquirer "^2.3.6" execa "^5.0.0" listr2 "^3.8.2" @@ -11035,6 +11255,15 @@ postcss@^8.2.15, postcss@^8.3.0: nanoid "^3.1.23" source-map-js "^0.6.2" +postcss@^8.3.6: + version "8.3.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" + integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== + dependencies: + colorette "^1.2.2" + nanoid "^3.1.23" + source-map-js "^0.6.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -11052,7 +11281,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.3.1: +prettier@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== @@ -11376,7 +11605,7 @@ rc-collapse@~3.1.0: rc-util "^5.2.1" shallowequal "^1.1.0" -rc-dialog@~8.5.0, rc-dialog@~8.5.1: +rc-dialog@~8.5.0: version "8.5.2" resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-8.5.2.tgz#530e289c25a31c15c85a0e8a4ba3f33414bff418" integrity sha512-3n4taFcjqhTE9uNuzjB+nPDeqgRBTEGBfe46mb1e7r88DgDo0lL4NnxY/PZ6PJKd2tsCt+RrgF/+YeTvJ/Thsw== @@ -11386,6 +11615,16 @@ rc-dialog@~8.5.0, rc-dialog@~8.5.1: rc-motion "^2.3.0" rc-util "^5.6.1" +rc-dialog@~8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-8.6.0.tgz#3b228dac085de5eed8c6237f31162104687442e7" + integrity sha512-GSbkfqjqxpZC5/zc+8H332+q5l/DKUhpQr0vdX2uDsxo5K0PhvaMEVjyoJUTkZ3+JstEADQji1PVLVb/2bJeOQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-motion "^2.3.0" + rc-util "^5.6.1" + rc-drawer@~4.3.0: version "4.3.1" resolved "https://registry.yarnpkg.com/rc-drawer/-/rc-drawer-4.3.1.tgz#356333a7af01b777abd685c96c2ce62efb44f3f3" @@ -11587,10 +11826,10 @@ rc-table@~7.15.1: rc-util "^5.13.0" shallowequal "^1.1.0" -rc-tabs@~11.9.1: - version "11.9.1" - resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-11.9.1.tgz#5b2e74da9a276978c2172ef9a05ae8af14da74cb" - integrity sha512-CLNx3qaWnO8KBWPd+7r52Pfk0MoPyKtlr+2ltWq2I9iqAjd1nZu6iBpQP7wbWBwIomyeFNw/WjHdRN7VcX5Qtw== +rc-tabs@~11.10.0: + version "11.10.1" + resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-11.10.1.tgz#7b112f78bac998480c777ae160adc425e3fdb7cb" + integrity sha512-ey1i2uMyfnRNYbViLcUYGH+Y7hueJbdCVSLaXnXki9hxBcGqxJMPy9t5xR0n/3QFQspj7Tf6+2VTXVtmO7Yaug== dependencies: "@babel/runtime" "^7.11.2" classnames "2.x" @@ -12067,13 +12306,20 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -redux@^4.0.0, redux@^4.1.0: +redux@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.0.tgz#eb049679f2f523c379f1aff345c8612f294c88d4" integrity sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g== dependencies: "@babel/runtime" "^7.9.2" +redux@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.1.tgz#76f1c439bb42043f985fbd9bf21990e60bd67f47" + integrity sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw== + dependencies: + "@babel/runtime" "^7.9.2" + refractor@^3.1.0: version "3.4.0" resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.4.0.tgz#62bd274b06c942041f390c371b676eb67cb0a678" @@ -12428,10 +12674,10 @@ rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: dependencies: estree-walker "^0.6.1" -rollup@^2.52.3: - version "2.52.6" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.52.6.tgz#7c7546d170dead0e7db0b6c709f7f34398498a8e" - integrity sha512-H+Xudmwf8KO+xji8njQNoIQRp8l+iQge/NdUR20JngTxVYdEEnlpkMvQ71YGLl3+xZcPecmdj4q2lrClKaPdRA== +rollup@^2.56.0: + version "2.56.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.0.tgz#daa832955d2b58f1ed52a3c4c85b7d1adaf076d0" + integrity sha512-weEafgbjbHCnrtJPNyCrhYnjP62AkF04P0BcV/1mofy1+gytWln4VVB1OK462cq2EAyWzRDpTMheSP/o+quoiA== optionalDependencies: fsevents "~2.3.2" @@ -12519,7 +12765,14 @@ sass-loader@10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sass@^1.32.12, sass@^1.32.13: +sass@^1.32.12: + version "1.37.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.37.5.tgz#f6838351f7cc814c4fcfe1d9a20e0cabbd1e7b3c" + integrity sha512-Cx3ewxz9QB/ErnVIiWg2cH0kiYZ0FPvheDTVC6BsiEGBTZKKZJ1Gq5Kq6jy3PKtL6+EJ8NIoaBW/RSd2R6cZOA== + dependencies: + chokidar ">=3.0.0 <4.0.0" + +sass@^1.32.13: version "1.35.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.35.1.tgz#90ecf774dfe68f07b6193077e3b42fb154b9e1cd" integrity sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ== @@ -13711,10 +13964,10 @@ ts-essentials@^2.0.3: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== -ts-jest@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.3.tgz#808492f022296cde19390bb6ad627c8126bf93f8" - integrity sha512-U5rdMjnYam9Ucw+h0QvtNDbc5+88nxt7tbIvqaZUhFrfG4+SkWhMXjejCLVGcpILTPuV+H3W/GZDZrnZFpPeXw== +ts-jest@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.4.tgz#df49683535831560ccb58f94c023d831b1b80df0" + integrity sha512-c4E1ECy9Xz2WGfTMyHbSaArlIva7Wi2p43QOMmCqjSSjHP06KXv+aT+eSY+yZMuqsMi3k7pyGsGj2q5oSl5WfQ== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -13842,10 +14095,10 @@ typescript-plugin-css-modules@^3.4.0: stylus "^0.54.8" tsconfig-paths "^3.9.0" -typescript@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" - integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@4.3.5: + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== ua-parser-js@^0.7.18: version "0.7.28" From 81e421ddc2e36dfd3c9b7e141d917fabf5c30d65 Mon Sep 17 00:00:00 2001 From: Alexey Date: Sun, 8 Aug 2021 23:18:14 +0300 Subject: [PATCH 02/10] [refactor] GH-5 Move ViewDescr here, add aldkg ns --- src/Form.tsx | 7 +- src/stores/ViewCollConstrs.ts | 28 +++ src/stores/ViewDescr.ts | 88 +++++++++ src/stores/ViewShapeSchema.ts | 62 ++++++ src/util/ContextToProps.tsx | 8 +- stories/AntdCardCell.stories.tsx | 243 +++++++++++++++++++++--- stories/Form.stories.tsx | 28 +-- stories/TreeAndForm.stories.tsx | 36 ++-- stories/TreeAndFormArtifact.stories.tsx | 36 ++-- stories/TreeAndFormColumns.stories.tsx | 32 ++-- test/schema/TestSchemas.ts | 26 --- 11 files changed, 470 insertions(+), 124 deletions(-) create mode 100644 src/stores/ViewCollConstrs.ts create mode 100644 src/stores/ViewDescr.ts create mode 100644 src/stores/ViewShapeSchema.ts diff --git a/src/Form.tsx b/src/Form.tsx index f4de30c..8cebe37 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -164,12 +164,13 @@ export const Form: React.FC = observer //const collSS = getSnapshot(coll); const views = coll?.data; const viewObs: any = coll?.dataByIri(viewIri); - + if (!viewObs) { + return ; + } const view = getSnapshot(viewObs); - const viewElement = view; return ( {}}> - + ); }); diff --git a/src/stores/ViewCollConstrs.ts b/src/stores/ViewCollConstrs.ts new file mode 100644 index 0000000..fe98988 --- /dev/null +++ b/src/stores/ViewCollConstrs.ts @@ -0,0 +1,28 @@ +/******************************************************************************** + * Copyright (c) 2021 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +export const viewDescrCollConstr = { + '@id': 'rm:Views_Coll', + entConstrs: [ + { + '@id': 'rm:Views_EntConstr0', + schema: 'rm:ViewShape', + }, + ], +}; + +export const viewKindCollConstr = { + '@id': 'aldkg:ViewKinds_Coll', + entConstrs: [ + { + '@id': 'aldkg:ViewKinds_EntConstr0', + schema: 'aldkg:ViewKindShape', + }, + ], +}; diff --git a/src/stores/ViewDescr.ts b/src/stores/ViewDescr.ts new file mode 100644 index 0000000..3d85a0d --- /dev/null +++ b/src/stores/ViewDescr.ts @@ -0,0 +1,88 @@ +/******************************************************************************** + * Copyright (c) 2020 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +import { reaction } from 'mobx'; +import { getParent, getRoot, IAnyModelType, IAnyStateTreeNode, SnapshotIn, types } from 'mobx-state-tree'; + +import { arrDiff, CollConstr, JsObject } from '@agentlab/sparql-jsld-client'; + +export const ViewElement = types.model('ViewElement', { + '@id': types.maybe(types.string), // JSON-LD object id of a view + '@type': types.maybe(types.string), // JSON-LD class id of a View + title: types.maybe(types.string), + description: types.maybe(types.string), + viewKind: types.maybe(types.string), + + type: types.string, + scope: types.maybe(types.string), + resultsScope: types.maybe(types.string), + options: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.maybe(types.array(types.late((): IAnyModelType => ViewElement))), +}); + +/** + * View Description, which could be persisted in DB + */ +export const ViewDescr = types + .model('ViewDescr', { + '@id': types.identifier, // JSON-LD object id of a view + '@type': types.string, // JSON-LD class id of a View + viewKind: types.maybe(types.string), + + title: types.maybe(types.string), // mandatory title + description: types.maybe(types.string), + + type: types.string, + scope: types.maybe(types.string), + resultsScope: types.maybe(types.string), + options: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.array(ViewElement), + + collsConstrs: types.array(CollConstr), // former 'queries' + }) + .actions((self) => { + const rep: IAnyStateTreeNode = getRoot(self); + const coll: IAnyStateTreeNode = getParent(self, 2); + let disp: any; + return { + afterAttach() { + console.log('ViewDescr afterAttach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + disp = reaction( + () => self.collsConstrs, + (newArr: any[], oldArr: any[]) => { + console.log('ViewDescr reaction, add coll ref, @id=', self['@id']); + const { deleted, added } = arrDiff(newArr, oldArr); + console.log('ViewDescr reaction, add coll ref, {deleted,added}=', { deleted, added }); + deleted.forEach((e: any) => rep.colls.delete(e['@id'])); + added.forEach((e: any) => rep.addCollByConstrRef(e)); + }, + { fireImmediately: true }, + ); + } + }, + beforeDetach() { + console.log('ViewDescr beforeDetach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + if (disp) disp(); + self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); + } + }, + setCollConstrs(collsConstrs: any[]) { + const ccso = collsConstrs.map((cc) => CollConstr.create(cc)); + self.collsConstrs.push(...ccso); + }, + }; + }); + +export type IViewDescrSnapshotIn = SnapshotIn; diff --git a/src/stores/ViewShapeSchema.ts b/src/stores/ViewShapeSchema.ts new file mode 100644 index 0000000..376e181 --- /dev/null +++ b/src/stores/ViewShapeSchema.ts @@ -0,0 +1,62 @@ +/******************************************************************************** + * Copyright (c) 2020 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +import { JSONSchema6forRdf } from '@agentlab/sparql-jsld-client'; + +export const ViewShapeSchema: JSONSchema6forRdf = { + $schema: 'http://json-schema.org/draft-07/schema#', + '@id': 'rm:ViewShape', + '@type': 'sh:NodeShape', + title: 'View Shape', + description: 'Artifact Shape', + targetClass: 'aldkg:ViewDescr', + type: 'object', + '@context': { + '@type': 'rdf:type', + }, + properties: { + '@id': { + title: 'URI', + type: 'string', + format: 'iri', + }, + '@type': { + title: 'Тип', + type: 'string', + format: 'iri', + }, + }, + required: ['@id', '@type'], +}; + +export const ViewKindShapeSchema: JSONSchema6forRdf = { + $schema: 'http://json-schema.org/draft-07/schema#', + '@id': 'rm:ViewShape', + '@type': 'sh:NodeShape', + title: 'View Shape', + description: 'Artifact Shape', + targetClass: 'aldkg:ViewDescr', + type: 'object', + '@context': { + '@type': 'rdf:type', + }, + properties: { + '@id': { + title: 'URI', + type: 'string', + format: 'iri', + }, + '@type': { + title: 'Тип', + type: 'string', + format: 'iri', + }, + }, + required: ['@id', '@type'], +}; diff --git a/src/util/ContextToProps.tsx b/src/util/ContextToProps.tsx index db366d1..bc3ae0c 100644 --- a/src/util/ContextToProps.tsx +++ b/src/util/ContextToProps.tsx @@ -52,15 +52,15 @@ export interface ButtonComponent { export const withStoreToControlProps = (Component: React.FC): React.FC => observer((props) => { - const succesValidation = { - validateStatus: 'succes', + const successValidation = { + validateStatus: 'success', }; const { form, viewElement } = props; const id = viewElement.resultsScope; const [validateObj, setValidateObj] = useState<{ validateStatus: string; help?: string; - }>(succesValidation); + }>(successValidation); const [req] = id?.split('/') || []; const [testReq, testUri] = viewElement.resultsScope?.split('/') || []; const { store } = useContext(MstContext); @@ -86,7 +86,7 @@ export const withStoreToControlProps = (Component: React.FC): help, }); } else { - setValidateObj(succesValidation); + setValidateObj(successValidation); store.setOnValidate(form, viewElement.resultsScope, true); } } diff --git a/stories/AntdCardCell.stories.tsx b/stories/AntdCardCell.stories.tsx index 319a580..c58393e 100644 --- a/stories/AntdCardCell.stories.tsx +++ b/stories/AntdCardCell.stories.tsx @@ -13,7 +13,13 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { SparqlClientImpl, rootModelInitialState, createModelFromState, CollState } from '@agentlab/sparql-jsld-client'; +import { + SparqlClientImpl, + rootModelInitialState, + createModelFromState, + CollState, + mstSchemas, +} from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -24,6 +30,8 @@ import { MstContextProvider, RendererRegistryEntry, } from '../src'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; +import { ViewDescr } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -31,27 +39,220 @@ const antdRenderers: RendererRegistryEntry[] = [ ...antdDataControlRenderers, ]; +const viewKinds = [ + { + '@id': 'rm:CardCellGridViewKind', + '@type': 'aldkg:ViewKind', + type: 'VerticalLayout', + collsConstrs: [ + { + '@id': 'rm:Cards_Coll', + '@type': 'aldkg:CollConstr', + entConstrs: [ + { + '@id': 'rm:Cards_Coll_Shape0', + '@type': 'aldkg:EntConstr', + schema: 'hs:ProductCardShape', + }, + ], + }, + ], + options: { + //width: 'all-empty-space', + }, + // child ui elements configs + elements: [ + { + type: 'DataControl', + resultsScope: 'rm:Cards_Coll', + options: { + renderType: 'grid', + grid: { + gutter: 16, + xs: 2, + sm: 2, + md: 3, + lg: 3, + xl: 4, + xxl: 7, + }, + elementTemplate: [ + { + type: 'CardLayout', + elements: [ + { + type: 'ImageCell', + scope: 'imageUrl', + }, + { + type: 'Control', + scope: 'name', + options: { + editable: false, + style: { + height: '3.5em', + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, + }, + }, + }, + { + type: 'Rate', + scope: 'starsValue', + options: { + editable: false, + }, + }, + { + type: 'CellHorizontalLayout', + options: { + justify: 'space-between', + }, + elements: [ + { + type: 'Control', + scope: 'price', + options: { + formater: 'labeledValue', + editable: false, + label: 'Цена', + specialChar: '₽', + style: { + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + { + type: 'Control', + scope: 'totalSales', + options: { + formater: 'labeledValue', + editable: false, + label: 'Всего продано', + style: { + textAlign: 'right', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + ], + }, + { + type: 'Control', + scope: 'lastMonthSalesAmount', + options: { + editable: false, + formater: 'сomparison', + dataToFormater: { + prevValue: 'prevMonthSalesAmount', + }, + label: 'Продажи за месяц', + style: { + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + { + type: 'Control', + scope: 'lastMonthSalesValue', + options: { + formater: 'сomparison', + editable: false, + dataToFormater: { + prevValue: 'prevMonthSalesValue', + }, + label: 'Объем продаж', + style: { + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + { + type: 'G2', + }, + { + type: 'CellHorizontalLayout', + options: { + justify: 'space-around', + }, + elements: [ + { + type: 'Control', + scope: '@id', + options: { + style: { + border: '1.5px solid black', + borderRadius: '2px', + height: '2em', + textAlign: 'center', + fontWeight: 500, + width: '90px', + color: 'black', + }, + specialImage: 'https://www.meme-arsenal.com/memes/f8e9bfb9fdf368272b21a5dac8f01ec1.jpg', + editable: false, + formater: 'link', + dataToFormater: { + link: '@id', + }, + label: 'Wildberries', + }, + }, + { + type: 'Button', + options: { + label: 'Добавить', + style: { + border: '1.5px solid black', + borderRadius: '2px', + width: '90px', + fontWeight: 500, + color: 'black', + }, + }, + }, + ], + }, + ], + }, + ], + }, + }, + ], + }, +]; + const viewDescrs = [ { '@id': 'mktp:CardCellViewDescr', - '@type': 'rm:View', + '@type': 'aldkg:ViewDescr', + viewKind: 'rm:CardCellGridViewKind', + type: 'VerticalLayout', title: 'CardCellGrid', description: 'CardCellGrid', - viewKind: 'rm:CardCellGridViewKind', collsConstrs: [ { '@id': 'rm:Cards_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Cards_Coll_Shape0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'hs:ProductCardShape', }, ], }, ], - type: 'VerticalLayout', options: { //width: 'all-empty-space', }, @@ -227,27 +428,17 @@ const viewDescrs = [ }, ]; -const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', - entConstrs: [ - { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', - }, - ], -}; - const additionalColls: CollState[] = [ // ViewKinds Collection - /*{ - constr: viewKindCollConstr, - data: viewKinds, - opt: { - updPeriod: undefined, - lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs - }, - },*/ + { + constr: viewKindCollConstr, + data: viewKinds, + opt: { + updPeriod: undefined, + lastSynced: moment.now(), + resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + }, + }, // ViewDescrs Collection { constr: viewDescrCollConstr, @@ -261,6 +452,8 @@ const additionalColls: CollState[] = [ }, ]; +mstSchemas['aldkg:ViewDescr'] = ViewDescr; + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); console.log('rootStore', rootStore); diff --git a/stories/Form.stories.tsx b/stories/Form.stories.tsx index 21e26cf..2fd172b 100644 --- a/stories/Form.stories.tsx +++ b/stories/Form.stories.tsx @@ -14,7 +14,13 @@ import { Meta, Story } from '@storybook/react'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { SparqlClientImpl, rootModelInitialState, createModelFromState, CollState } from '@agentlab/sparql-jsld-client'; +import { + SparqlClientImpl, + rootModelInitialState, + createModelFromState, + CollState, + mstSchemas, +} from '@agentlab/sparql-jsld-client'; import { RendererRegistryEntry, @@ -24,13 +30,15 @@ import { antdControlRenderers, antdLayoutRenderers, } from '../src'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; +import { ViewDescr } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [...antdControlRenderers, ...antdLayoutRenderers]; const viewDescrs = [ { '@id': 'rm:FormView', - '@type': 'rm:View', + '@type': 'aldkg:ViewDescr', //'viewKind': 'rm:FormViewClass', title: 'Малая форма', description: 'Small form', @@ -38,11 +46,11 @@ const viewDescrs = [ collsConstrs: [ { '@id': 'rm:FormView_Artifacts_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:FormView_Artifacts_Coll_Ent0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'rm:ArtifactShape', }, ], @@ -78,16 +86,6 @@ const viewDescrs = [ }, ]; -const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', - entConstrs: [ - { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', - }, - ], -}; - const additionalColls: CollState[] = [ // ViewKinds Collection /*{ @@ -112,6 +110,8 @@ const additionalColls: CollState[] = [ }, ]; +mstSchemas['aldkg:ViewDescr'] = ViewDescr; + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createModelFromState('reqs2', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); diff --git a/stories/TreeAndForm.stories.tsx b/stories/TreeAndForm.stories.tsx index e18766e..cfbd53e 100644 --- a/stories/TreeAndForm.stories.tsx +++ b/stories/TreeAndForm.stories.tsx @@ -13,7 +13,13 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { SparqlClientImpl, rootModelInitialState, createModelFromState, CollState } from '@agentlab/sparql-jsld-client'; +import { + SparqlClientImpl, + rootModelInitialState, + createModelFromState, + CollState, + mstSchemas, +} from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -24,6 +30,8 @@ import { MstContextProvider, RendererRegistryEntry, } from '../src'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; +import { ViewDescr } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -34,29 +42,29 @@ const antdRenderers: RendererRegistryEntry[] = [ const viewDescrs = [ { '@id': 'mktp:TreeAndFormViewDescr', - '@type': 'rm:View', + '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Categories_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Categories_Coll_Shape0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'hs:CategoryShape', }, ], }, { '@id': 'rm:Category_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Cards_Coll_Ent0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'hs:CategoryShape', conditions: { '_@id': 'https://www.wildberries.ru/catalog/zdorove/ozdorovlenie', @@ -67,11 +75,11 @@ const viewDescrs = [ }, { '@id': 'rm:Cards_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Cards_Coll_Ent0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'hs:ProductCardShape', }, ], @@ -279,16 +287,6 @@ const viewDescrs = [ }, ]; -const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', - entConstrs: [ - { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', - }, - ], -}; - const additionalColls: CollState[] = [ // ViewKinds Collection /*{ @@ -313,6 +311,8 @@ const additionalColls: CollState[] = [ }, ]; +mstSchemas['aldkg:ViewDescr'] = ViewDescr; + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); diff --git a/stories/TreeAndFormArtifact.stories.tsx b/stories/TreeAndFormArtifact.stories.tsx index 5ef0696..9707522 100644 --- a/stories/TreeAndFormArtifact.stories.tsx +++ b/stories/TreeAndFormArtifact.stories.tsx @@ -13,50 +13,58 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { SparqlClientImpl, rootModelInitialState, createModelFromState, CollState } from '@agentlab/sparql-jsld-client'; +import { + SparqlClientImpl, + rootModelInitialState, + createModelFromState, + CollState, + mstSchemas, +} from '@agentlab/sparql-jsld-client'; import { antdCells, antdControlRenderers, antdLayoutRenderers, - antdRataControlRenderers, + antdDataControlRenderers, Form, MstContextProvider, RendererRegistryEntry, } from '../src'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; +import { ViewDescr } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, ...antdLayoutRenderers, - ...antdRataControlRenderers, + ...antdDataControlRenderers, ]; const viewDescrs = [ { '@id': 'mktp:TreeAndFormViewDescr', - '@type': 'rm:View', + '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Folders_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Folders_Coll_Shape0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'nav:folderShape', }, ], }, { '@id': 'rm:Artifacts_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Artifacts_Coll_Ent0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'rm:ArtifactShape', }, ], @@ -118,16 +126,6 @@ const viewDescrs = [ }, ]; -const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', - entConstrs: [ - { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', - }, - ], -}; - const additionalColls: CollState[] = [ // ViewKinds Collection /*{ @@ -152,6 +150,8 @@ const additionalColls: CollState[] = [ }, ]; +mstSchemas['aldkg:ViewDescr'] = ViewDescr; + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createModelFromState('reqs2', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); diff --git a/stories/TreeAndFormColumns.stories.tsx b/stories/TreeAndFormColumns.stories.tsx index e060d79..947f020 100644 --- a/stories/TreeAndFormColumns.stories.tsx +++ b/stories/TreeAndFormColumns.stories.tsx @@ -13,39 +13,47 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { SparqlClientImpl, rootModelInitialState, createModelFromState, CollState } from '@agentlab/sparql-jsld-client'; +import { + SparqlClientImpl, + rootModelInitialState, + createModelFromState, + CollState, + mstSchemas, +} from '@agentlab/sparql-jsld-client'; import { antdCells, antdControlRenderers, antdLayoutRenderers, - antdRataControlRenderers, + antdDataControlRenderers, Form, MstContextProvider, RendererRegistryEntry, } from '../src'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; +import { ViewDescr } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, ...antdLayoutRenderers, - ...antdRataControlRenderers, + ...antdDataControlRenderers, ]; const viewDescrs = [ { '@id': 'mktp:TreeAndFormViewDescr', - '@type': 'rm:View', + '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Cards_Coll', - '@type': 'rm:CollConstr', + '@type': 'aldkg:CollConstr', entConstrs: [ { '@id': 'rm:Cards_Coll_Ent0', - '@type': 'rm:EntConstr', + '@type': 'aldkg:EntConstr', schema: 'hs:ProductCardShape', }, ], @@ -223,16 +231,6 @@ const viewDescrs = [ }, ]; -const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', - entConstrs: [ - { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', - }, - ], -}; - const additionalColls: CollState[] = [ // ViewKinds Collection /*{ @@ -257,6 +255,8 @@ const additionalColls: CollState[] = [ }, ]; +mstSchemas['aldkg:ViewDescr'] = ViewDescr; + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); diff --git a/test/schema/TestSchemas.ts b/test/schema/TestSchemas.ts index 2c18905..dc43a9d 100644 --- a/test/schema/TestSchemas.ts +++ b/test/schema/TestSchemas.ts @@ -601,30 +601,4 @@ export const usedInModuleSchema: JSONSchema6forRdf = { required: [...(usedInSchema.required || []), 'parentBinding', 'depth', 'bookOrder', 'sectionNumber'], }; -export const ViewShapeSchema: JSONSchema6forRdf = { - $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'rm:ViewShape', - '@type': 'sh:NodeShape', - title: 'View Shape', - description: 'Artifact Shape', - targetClass: 'rm:View', - type: 'object', - '@context': { - '@type': 'rdf:type', - }, - properties: { - '@id': { - title: 'URI', - type: 'string', - format: 'iri', - }, - '@type': { - title: 'Тип', - type: 'string', - format: 'iri', - }, - }, - required: ['@id', '@type'], -}; - export const { property: artifactShapeProperty, ...artifactShapeNoProperty } = artifactShape; From d759b0226ff559f6b9c7c6fc1ba2ca88340adb14 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 9 Aug 2021 23:14:34 +0300 Subject: [PATCH 03/10] [refactor] GH-5 Introduce ViewKind, del UiSchema --- src/DispatchCell.tsx | 17 +- src/Form.tsx | 110 +++++++------ src/antd-controls/AntdSelect.tsx | 4 +- src/cells/AntdCellCardLayout.tsx | 3 +- src/cells/AntdCellHorizontalLayout.tsx | 20 +-- src/data-controls/DataControl.tsx | 2 - src/data-controls/GridRenderer.tsx | 4 +- src/data-controls/TableRenderer.tsx | 3 +- src/data-controls/TreeRenderer.tsx | 1 - src/layouts/AntdFormLayout.tsx | 2 - src/layouts/AntdHorizontalLayout.tsx | 14 +- src/layouts/AntdVerticalLayout.tsx | 14 +- src/layouts/SplitPaneLayout.tsx | 28 +--- src/layouts/TabsLayout.tsx | 10 +- src/models/uischema.ts | 26 +-- src/stores/ViewCollConstrs.ts | 6 +- src/stores/ViewDescr.ts | 81 +++++++++- src/stores/ViewShapeSchema.ts | 4 +- src/testers.ts | 12 +- src/util/AntdModal.tsx | 3 +- src/util/ContextToProps.tsx | 54 +++---- src/util/layout.tsx | 4 +- stories/AntdCardCell.stories.tsx | 205 ++---------------------- stories/Form.stories.tsx | 49 +++--- stories/Tree.stories.tsx | 1 - stories/TreeAndForm.stories.tsx | 48 +++--- stories/TreeAndFormArtifact.stories.tsx | 48 +++--- stories/TreeAndFormColumns.stories.tsx | 48 +++--- 28 files changed, 342 insertions(+), 479 deletions(-) diff --git a/src/DispatchCell.tsx b/src/DispatchCell.tsx index 8250082..0f9eaca 100644 --- a/src/DispatchCell.tsx +++ b/src/DispatchCell.tsx @@ -19,21 +19,7 @@ import { MstContext } from './MstContext'; * Dispatch renderer component for cells. */ export const DispatchCell: React.FC = React.memo( - ({ - data, - uischema, - onMeasureChange, - uri, - schema, - viewElement, - view, - enabled, - id, - parent, - CKey, - rowData, - ...rest - }) => { + ({ data, onMeasureChange, uri, schema, viewElement, view, enabled, id, parent, CKey, rowData, ...rest }) => { const { cells } = useContext(MstContext); const renderer = maxBy(cells, (r) => r.tester(viewElement, schema)); if (renderer === undefined || renderer.tester(viewElement, schema) === -1) { @@ -51,7 +37,6 @@ export const DispatchCell: React.FC = React.memo( data={data} rowData={rowData} onMeasureChange={onMeasureChange} - uischema={uischema} schema={schema} viewElement={viewElement} uri={uri} diff --git a/src/Form.tsx b/src/Form.tsx index 8cebe37..59e3d08 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -19,7 +19,7 @@ import { JsonSchema7 } from './models/jsonSchema7'; import { MstContext } from './MstContext'; import { UnknownRenderer } from './UnknownRenderer'; import { RankedTester } from './testers'; -import { UISchema, View, ViewElement } from './models/uischema'; +import { View, ViewElement } from './models/uischema'; export interface ControlComponent { data: any; @@ -52,13 +52,13 @@ export interface FormsCell { cell: React.FC; } export interface InitStateProps { - uischema: UISchema; viewElement: ViewElement; view: View; } export interface FormsInitStateProps { - viewIri: string; - viewsResultsScope: string; + viewDescrCollId: string; + viewDescrId: string; + viewKindCollId: string; } export interface FormsDispatchProps extends InitStateProps { enabled?: boolean; @@ -66,8 +66,8 @@ export interface FormsDispatchProps extends InitStateProps { form?: string; } export interface FormDispatchProps extends FormsDispatchProps { - schema: any; - uri: string; + schema?: any; + uri?: string; } export interface RenderProps extends FormsDispatchProps { schema: JsonSchema7; @@ -86,12 +86,31 @@ export interface DispatchCellProps extends RenderProps { [key: string]: any; } -const FormDispatch: React.FC = observer( - ({ uischema, schema, uri, viewElement, view, enabled, parent, form }) => { - const { renderers } = useContext(MstContext); +export const FormsDispatch: React.FC = observer( + ({ view, viewElement, parent, form, uri, enabled }: any) => { + const { store, renderers } = useContext(MstContext); + + const shapes = viewElement.resultsScope ? viewElement.resultsScope.split('/') : []; + const iri = shapes.length === 2 ? shapes[0] : viewElement.resultsScope; + let schema: any; + if (iri) { + const coll = store.getColl(iri); + schema = coll?.collConstr.entConstrs[0]?.schemaJs; + //if (store.schemas[iri]) { + // schema = store.schemas[iri]; + //} else { + // if (iri !== 'client:views' && iri !== 'rm:viewPick' && iri !== 'data:Tabs') { + //store.getSchemaByUri(iri); + // return ; + // } + //} + if (!schema) return ; + } + schema = shapes.length === 2 ? schema.properties[shapes[1]] : schema; + const id = uri ? /*createId(uri)*/ uri : ''; const renderer = maxBy(renderers, (r) => r.tester(viewElement, schema)); - const isModal = viewElement.options && viewElement.options.modal; + //const isModal = viewElement.options && viewElement.options.modal; if (renderer === undefined || renderer.tester(viewElement, schema) === -1) { return ; } else { @@ -99,7 +118,6 @@ const FormDispatch: React.FC = observer( return ( {}}> = observer( }, ); -const withStoreToFormDispatch = (Component: any): any => - observer(({ ...props }: any) => { - const { view, viewElement, parent, form, uischema } = props; - const { store } = useContext(MstContext); - - const shapes = viewElement.resultsScope ? viewElement.resultsScope.split('/') : []; - const iri = shapes.length === 2 ? shapes[0] : viewElement.resultsScope; - let schema: any; - if (iri) { - const coll = store.getColl(iri); - schema = coll?.collConstr.entConstrs[0]?.schemaJs; - //if (store.schemas[iri]) { - // schema = store.schemas[iri]; - //} else { - // if (iri !== 'client:views' && iri !== 'rm:viewPick' && iri !== 'data:Tabs') { - //store.getSchemaByUri(iri); - // return ; - // } - //} - if (!schema) return ; - } - const s = shapes.length === 2 ? schema.properties[shapes[1]] : schema; - return ( - - ); - }); -export const FormsDispatch = withStoreToFormDispatch(FormDispatch); - export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { return (
@@ -154,23 +144,45 @@ export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { export const Form: React.FC = observer((props) => { const { store } = useContext(MstContext); - console.log('inForm', { store }); - if (Object.keys(store.ns.currentJs).length < 5) { + if (!store) { + console.log('!store', store); + return ; + } + if (Object.keys(store.ns.currentJs).length < 6) { + console.log('!ns'); + return ; + } + + const { viewDescrId, viewDescrCollId, viewKindCollId } = props; + + const collWithViewDescrsObs = store.getColl(viewDescrCollId); + if (!collWithViewDescrsObs) { + console.log('!collWithViewDescrsObs', viewDescrCollId); + return ; + } + + const viewDescrObs = collWithViewDescrsObs?.dataByIri(viewDescrId); + if (!viewDescrObs) { + console.log('!viewDescrObs', viewDescrId); return ; } - const { viewIri, viewsResultsScope } = props; - const coll = store.getColl(viewsResultsScope); - //const collSS = getSnapshot(coll); - const views = coll?.data; - const viewObs: any = coll?.dataByIri(viewIri); - if (!viewObs) { + const collWithViewKindsObs = store.getColl(viewKindCollId); + if (!collWithViewKindsObs) { + console.log('!collWithViewKindsObs', viewKindCollId); + return ; + } + const viewKindId = viewDescrObs.viewKind; + const viewKindObs = collWithViewKindsObs.dataByIri(viewKindId); + if (!viewKindObs) { + console.log('!viewKindObs', viewKindId); return ; } - const view = getSnapshot(viewObs); + const viewKind: any = getSnapshot(viewKindObs); + const view: any = getSnapshot(viewDescrObs); return ( {}}> - + ); }); diff --git a/src/antd-controls/AntdSelect.tsx b/src/antd-controls/AntdSelect.tsx index 6536ab8..975629a 100644 --- a/src/antd-controls/AntdSelect.tsx +++ b/src/antd-controls/AntdSelect.tsx @@ -14,8 +14,8 @@ import { Select } from 'antd'; import { areEqual } from '../util/ContextToProps'; export const AntdSelect = React.memo((props: any /*EnumCellProps & WithClassname*/) => { - const { data, className, id, enabled, uischema, path, handleChange, options = [], config } = props; - const appliedUiSchemaOptions = merge({}, config, uischema.options); + const { data, className, id, enabled, path, handleChange, options = [], config } = props; + const appliedUiSchemaOptions = merge({}, config); console.log('OPTIONS', options); return ( diff --git a/src/cells/AntdCellCardLayout.tsx b/src/cells/AntdCellCardLayout.tsx index 23ef3a9..c6d768b 100644 --- a/src/cells/AntdCellCardLayout.tsx +++ b/src/cells/AntdCellCardLayout.tsx @@ -18,7 +18,7 @@ import { DispatchCell } from '../DispatchCell'; import './cell.css'; export const AntdCellCardLayout = (props: any) => { - const { viewElement, view, schema, uischema, data, id } = props; + const { viewElement, view, schema, data, id } = props; const createCardChilds = () => viewElement.elements ? viewElement.elements.map((e: ViewElement, idx: number) => { @@ -32,7 +32,6 @@ export const AntdCellCardLayout = (props: any) => { rowData={data} schema={newSchema || schema} viewElement={e} - uischema={uischema} /> ); }) diff --git a/src/cells/AntdCellHorizontalLayout.tsx b/src/cells/AntdCellHorizontalLayout.tsx index df63382..1582edd 100644 --- a/src/cells/AntdCellHorizontalLayout.tsx +++ b/src/cells/AntdCellHorizontalLayout.tsx @@ -18,18 +18,11 @@ import { get } from 'lodash-es'; import { Idx } from '../util/layout'; -export const AntdHorizontalLayoutRenderer: React.FC = ({ - uischema, - viewElement, - view, - data, - schema, -}) => { +export const AntdHorizontalLayoutRenderer: React.FC = ({ viewElement, view, data, schema }) => { //const layout = viewElement as Layout; const Render: React.FC = ({ idx, schema, - uischema, viewElement, view, data, @@ -52,7 +45,6 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ view={view} rowData={data} schema={newSchema || schema} - uischema={uischema} enabled={enabled} parent={parent} form={form} @@ -66,15 +58,7 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ return ( {(viewElement.elements || []).map((e: ViewElement, idx: number) => ( - + ))} ); diff --git a/src/data-controls/DataControl.tsx b/src/data-controls/DataControl.tsx index 24a379e..7cb2c5e 100644 --- a/src/data-controls/DataControl.tsx +++ b/src/data-controls/DataControl.tsx @@ -28,7 +28,6 @@ export const AntdDataLayout: React.FC = (props) => { handleChange = () => {}, dataSource, view, - uischema, schema, editing, getData, @@ -53,7 +52,6 @@ export const AntdDataLayout: React.FC = (props) => { onDnD={onDnD} viewElement={viewElement} view={view} - uischema={uischema} onCreateFolder={onCreateFolder} onDeleteFolder={onDeleteFolder} onRename={onRename} diff --git a/src/data-controls/GridRenderer.tsx b/src/data-controls/GridRenderer.tsx index f60c5db..92b700b 100644 --- a/src/data-controls/GridRenderer.tsx +++ b/src/data-controls/GridRenderer.tsx @@ -20,9 +20,8 @@ const divStyle: React.CSSProperties = { }; export const GridRenderer: React.FC = (props) => { - const { child, onSelect, viewElement, uischema, view, schema } = props; + const { child, onSelect, viewElement, view, schema } = props; const grid = viewElement?.options?.grid || { gutter: 16, column: 4 }; - console.log('UISCEMA', uischema); const template = viewElement?.options?.elementTemplate || null; const createCell = (data: any, id: string | number) => template ? ( @@ -35,7 +34,6 @@ export const GridRenderer: React.FC = (props) => { rowData={data} schema={schema} viewElement={e} - uischema={uischema} /> )) ) : ( diff --git a/src/data-controls/TableRenderer.tsx b/src/data-controls/TableRenderer.tsx index cfc7472..00f9bee 100644 --- a/src/data-controls/TableRenderer.tsx +++ b/src/data-controls/TableRenderer.tsx @@ -22,7 +22,7 @@ const divStyle: React.CSSProperties = { export const TableRenderer: React.FC = React.memo( (props) => { - const { schema, enabled, child, onSelect, viewElement, uischema, view, editing } = props; + const { schema, enabled, child, onSelect, viewElement, view, editing } = props; const [selected, setSelected] = useState(child[0]); const [cacheSelect, setCacheSelect] = useState(); const [dataSource, setDataSource] = useState(child); @@ -82,7 +82,6 @@ export const TableRenderer: React.FC = React.memo(
diff --git a/src/data-controls/TreeRenderer.tsx b/src/data-controls/TreeRenderer.tsx index 16c9c89..1c6680b 100644 --- a/src/data-controls/TreeRenderer.tsx +++ b/src/data-controls/TreeRenderer.tsx @@ -30,7 +30,6 @@ export const TreeRenderer: React.FC = (props) => { onSelect, viewElement, dataSource, - uischema, view, editing, onDnD, diff --git a/src/layouts/AntdFormLayout.tsx b/src/layouts/AntdFormLayout.tsx index 4b52d0a..da8524c 100644 --- a/src/layouts/AntdFormLayout.tsx +++ b/src/layouts/AntdFormLayout.tsx @@ -74,7 +74,6 @@ export const LogicalButton: React.FC = observer(({ form, onCancel, onS }); export const AntdFormLayout: React.FC = ({ - uischema, viewElement, view, enabled, @@ -98,7 +97,6 @@ export const AntdFormLayout: React.FC = ({
= ({ - uischema, viewElement, view, enabled, @@ -27,20 +26,13 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ parent, }) => { //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, uischema, viewElement, view, enabled, parent, form }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled, parent, form }) => { const options = viewElement.options || {}; const style: any = options.style; const span = options.contentSize || !viewElement.elements ? undefined : Math.ceil(24 / viewElement.elements.length); return ( - + ); }; @@ -49,7 +41,7 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ if (viewElement.options && viewElement.options.width === 'all-empty-space') rowStyle.width = '100%'; return ( - {renderLayoutElements({ uischema, viewElement, view, enabled, Render, parent })} + {renderLayoutElements({ viewElement, view, enabled, Render, parent })} ); }; diff --git a/src/layouts/AntdVerticalLayout.tsx b/src/layouts/AntdVerticalLayout.tsx index 8c8b70f..5e9ff35 100644 --- a/src/layouts/AntdVerticalLayout.tsx +++ b/src/layouts/AntdVerticalLayout.tsx @@ -19,7 +19,6 @@ import { Idx } from '../util/layout'; import { LayoutComponent } from './LayoutComponent'; export const AntdVerticalLayoutRenderer: React.FC = ({ - uischema, viewElement, view, enabled, @@ -27,7 +26,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ parent, form, }) => { - const Render: React.FC = ({ idx, uischema, viewElement, view, enabled, parent }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled, parent }) => { const options = viewElement.options || {}; const style: any = options.style; return ( @@ -37,14 +36,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ flex: viewElement.options && viewElement.options.height === 'all-empty-space' ? '1 1 auto' : '', }}> - + ); @@ -52,7 +44,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ return (
- {renderLayoutElements({ uischema, viewElement, view, enabled, Render, parent })} + {renderLayoutElements({ viewElement, view, enabled, Render, parent })}
); diff --git a/src/layouts/SplitPaneLayout.tsx b/src/layouts/SplitPaneLayout.tsx index 0ba1127..e789719 100644 --- a/src/layouts/SplitPaneLayout.tsx +++ b/src/layouts/SplitPaneLayout.tsx @@ -26,7 +26,7 @@ const divStyle: React.CSSProperties = { margin: '1px', }; -const renderSplitElements = ({ viewElement, uischema, view, enabled, Render, parent, form }: RenderLayoutProps) => { +const renderSplitElements = ({ viewElement, view, enabled, Render, parent, form }: RenderLayoutProps) => { const elements = viewElement.elements; const defaultSize = viewElement.options && viewElement.options.defaultSize; const id = viewElement['@id']; @@ -42,14 +42,7 @@ const renderSplitElements = ({ viewElement, uischema, view, enabled, Render, par const style = childView.options && childView.options.style; res.push( - + , ); } @@ -62,7 +55,7 @@ const renderSplitElements = ({ viewElement, uischema, view, enabled, Render, par return (
- +
); @@ -72,26 +65,19 @@ const renderSplitElements = ({ viewElement, uischema, view, enabled, Render, par ); }; -export const SplitPaneLayoutRenderer: React.FC = ({ - uischema, - viewElement, - view, - enabled, - visible, - parent, -}) => { +export const SplitPaneLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible, parent }) => { //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, uischema, viewElement, view, enabled, parent }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled, parent }) => { return (
- +
); }; return ( - {renderSplitElements({ uischema, viewElement, view, enabled, Render, parent })} + {renderSplitElements({ viewElement, view, enabled, Render, parent })} ); diff --git a/src/layouts/TabsLayout.tsx b/src/layouts/TabsLayout.tsx index 0674b6e..0d3ee5d 100644 --- a/src/layouts/TabsLayout.tsx +++ b/src/layouts/TabsLayout.tsx @@ -15,20 +15,14 @@ import { rankWith, RankedTester, uiTypeIs } from '../testers'; import { withLayoutProps } from '../util/ContextToProps'; export const TabsLayout: React.FC = (props) => { - const { enabled, onSelect = () => {}, uischema, viewElement, view } = props; + const { enabled, onSelect = () => {}, viewElement, view } = props; const elements = viewElement.elements; const viewTabs = elements ? elements.map((e: any, index: number) => { const title = e.options && e.options.title; return ( - + ); }) diff --git a/src/models/uischema.ts b/src/models/uischema.ts index 83d639f..40b123a 100644 --- a/src/models/uischema.ts +++ b/src/models/uischema.ts @@ -7,30 +7,16 @@ * * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ -export interface UISchemaElement { - type: string; - editable?: boolean; - visible?: boolean; - properties?: { - [key: string]: UISchemaElement; - }; -} - -export interface UISchema { - [key: string]: UISchemaElement; -} - -export interface ViewElement extends UISchemaElement { - //customReq?: any; - order?: string[]; - properties?: { - [key: string]: ViewElement; - }; +export interface ViewElement { '@id': string; '@type': string; title?: string; description?: string; - queries?: any[]; + viewKind?: string; + + type: string; + //order?: string[]; + //queries?: any[]; scope?: string; resultsScope?: string; options?: { diff --git a/src/stores/ViewCollConstrs.ts b/src/stores/ViewCollConstrs.ts index fe98988..b238d43 100644 --- a/src/stores/ViewCollConstrs.ts +++ b/src/stores/ViewCollConstrs.ts @@ -8,11 +8,11 @@ * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ export const viewDescrCollConstr = { - '@id': 'rm:Views_Coll', + '@id': 'aldkg:Views_Coll', entConstrs: [ { - '@id': 'rm:Views_EntConstr0', - schema: 'rm:ViewShape', + '@id': 'aldkg:Views_EntConstr0', + schema: 'aldkg:ViewShape', }, ], }; diff --git a/src/stores/ViewDescr.ts b/src/stores/ViewDescr.ts index 3d85a0d..fd83b37 100644 --- a/src/stores/ViewDescr.ts +++ b/src/stores/ViewDescr.ts @@ -10,14 +10,22 @@ import { reaction } from 'mobx'; import { getParent, getRoot, IAnyModelType, IAnyStateTreeNode, SnapshotIn, types } from 'mobx-state-tree'; -import { arrDiff, CollConstr, JsObject } from '@agentlab/sparql-jsld-client'; +import { + arrDiff, + CollConstr, + CollState, + JsObject, + SparqlClient, + registerMstSchema, + createModelFromState, +} from '@agentlab/sparql-jsld-client'; export const ViewElement = types.model('ViewElement', { '@id': types.maybe(types.string), // JSON-LD object id of a view '@type': types.maybe(types.string), // JSON-LD class id of a View title: types.maybe(types.string), description: types.maybe(types.string), - viewKind: types.maybe(types.string), + //viewKind: types.maybe(types.string), type: types.string, scope: types.maybe(types.string), @@ -28,6 +36,64 @@ export const ViewElement = types.model('ViewElement', { elements: types.maybe(types.array(types.late((): IAnyModelType => ViewElement))), }); +/** + * View Kind, which could be persisted in DB + */ +export const ViewKind = types + .model('ViewKind', { + '@id': types.identifier, // JSON-LD object id of a view + '@type': types.string, // JSON-LD class id of a View + + title: types.maybe(types.string), // mandatory title + description: types.maybe(types.string), + + type: types.string, + scope: types.maybe(types.string), + resultsScope: types.maybe(types.string), + options: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.array(ViewElement), + + collsConstrs: types.array(CollConstr), // former 'queries' + }) + .actions((self) => { + const rep: IAnyStateTreeNode = getRoot(self); + const coll: IAnyStateTreeNode = getParent(self, 2); + let disp: any; + return { + afterAttach() { + console.log('ViewKind afterAttach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + disp = reaction( + () => self.collsConstrs, + (newArr: any[], oldArr: any[]) => { + console.log('ViewKind reaction, add coll ref, @id=', self['@id']); + const { deleted, added } = arrDiff(newArr, oldArr); + console.log('ViewKind reaction, add coll ref, {deleted,added}=', { deleted, added }); + deleted.forEach((e: any) => rep.colls.delete(e['@id'])); + added.forEach((e: any) => rep.addCollByConstrRef(e)); + }, + { fireImmediately: true }, + ); + } + }, + beforeDetach() { + console.log('ViewKind beforeDetach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + if (disp) disp(); + self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); + } + }, + setCollConstrs(collsConstrs: any[]) { + const ccso = collsConstrs.map((cc) => CollConstr.create(cc)); + self.collsConstrs.push(...ccso); + }, + }; + }); + +export type IViewKindSnapshotIn = SnapshotIn; + /** * View Description, which could be persisted in DB */ @@ -86,3 +152,14 @@ export const ViewDescr = types }); export type IViewDescrSnapshotIn = SnapshotIn; + +export const createUiModelFromState = ( + repId: string, + client: SparqlClient, + initialState: any, + additionalColls: CollState[] | undefined = undefined, +): any => { + registerMstSchema('aldkg:ViewKind', ViewKind); + registerMstSchema('aldkg:ViewDescr', ViewDescr); + return createModelFromState(repId, client, initialState, additionalColls); +}; diff --git a/src/stores/ViewShapeSchema.ts b/src/stores/ViewShapeSchema.ts index 376e181..a738a81 100644 --- a/src/stores/ViewShapeSchema.ts +++ b/src/stores/ViewShapeSchema.ts @@ -11,7 +11,7 @@ import { JSONSchema6forRdf } from '@agentlab/sparql-jsld-client'; export const ViewShapeSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'rm:ViewShape', + '@id': 'aldkg:ViewShape', '@type': 'sh:NodeShape', title: 'View Shape', description: 'Artifact Shape', @@ -37,7 +37,7 @@ export const ViewShapeSchema: JSONSchema6forRdf = { export const ViewKindShapeSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'rm:ViewShape', + '@id': 'aldkg:ViewShape', '@type': 'sh:NodeShape', title: 'View Shape', description: 'Artifact Shape', diff --git a/src/testers.ts b/src/testers.ts index 313d2c1..9cb4b88 100644 --- a/src/testers.ts +++ b/src/testers.ts @@ -9,7 +9,7 @@ ********************************************************************************/ import { find, includes, isArray, isEmpty } from 'lodash-es'; import { JsonSchema7 } from './models/jsonSchema7'; -import { UISchemaElement, ViewElement } from './models/uischema'; +import { ViewElement } from './models/uischema'; /* eslint-disable @typescript-eslint/naming-convention */ @@ -68,8 +68,8 @@ export const rankWith = */ export const uiTypeIs = (expected: string): Tester => - (uischema: UISchemaElement): boolean => - !isEmpty(uischema) && uischema.type === expected; + (viewElement: ViewElement): boolean => + !isEmpty(viewElement) && viewElement.type === expected; /** * Checks whether the given UI schema has an option with the given @@ -81,12 +81,12 @@ export const uiTypeIs = */ export const optionIs = (optionName: string, optionValue: any): Tester => - (uischema: UISchemaElement): boolean => { - if (isEmpty(uischema)) { + (viewElement: ViewElement): boolean => { + if (isEmpty(viewElement)) { return false; } - const options = (uischema as any).options; + const options = (viewElement as any).options; return !isEmpty(options) && options[optionName] === optionValue; }; diff --git a/src/util/AntdModal.tsx b/src/util/AntdModal.tsx index 397a6ae..1747f04 100644 --- a/src/util/AntdModal.tsx +++ b/src/util/AntdModal.tsx @@ -15,7 +15,7 @@ import { SaveReqDialog } from './OnSaveDialog'; import { MstContext } from '../MstContext'; export const AntdModal: React.FC = observer( - ({ id, uischema, schema, viewElement, enabled, view, cells, childrenId, Render }) => { + ({ id, schema, viewElement, enabled, view, cells, childrenId, Render }) => { const [visible, setVisible] = useState(false); const { store } = useContext(MstContext); @@ -42,7 +42,6 @@ export const AntdModal: React.FC = observer( width={1200} okText='Сохранить'> ): ); }); export const withStoreToFormProps = (Component: React.FC): React.FC => - observer(({ uischema, viewElement, view, enabled, parent, form }) => { + observer(({ viewElement, view, enabled, parent, form }) => { if (!view['@id']) { return null; } const title = viewElement.options ? viewElement.options.title : ''; const id = viewElement['@id']; - const enabledLayout = enabled && checkProperty('editable', id, uischema, viewElement, view); - const visible = checkProperty('visible', id, uischema, viewElement, view); + const enabledLayout = enabled && checkProperty('editable', id, viewElement, view); + const visible = checkProperty('visible', id, viewElement, view); const { store } = useContext(MstContext); return ( ): React.FC observer(({ ...props }: any) => { - const { uischema, viewElement, view } = props; + const { viewElement, view } = props; const { store } = useContext(MstContext); const scope = viewElement.resultsScope; if (!store.getSelectedDataJs(scope)) { return ; } //const id = store.getSelectedDataJs(scope).type; - return ; + return ; }); export const withStoreToViewProps = (Component: any): any => observer(({ ...props }: any) => { - const { uischema, view, viewElement, parent } = props; + const { view, viewElement, parent } = props; const { store } = useContext(MstContext); const scope = viewElement.resultsScope; const coll = store.getColl(scope); @@ -178,7 +174,6 @@ export const withStoreToViewProps = (Component: any): any => return ( store.setEditing(viewElement.resultsScope, state)} @@ -366,7 +361,7 @@ export const withStoreToTabProps = (Component: any): any => export const withStoreToMenuProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, uischema, viewElement, view, parent } = props; + const { schema, viewElement, view, parent } = props; const { store } = useContext(MstContext); //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { // store.setSaveLogic(parent, viewElement.resultsScope); @@ -387,7 +382,6 @@ export const withStoreToMenuProps = (Component: any): any => modals={viewElement.elements ? viewElement.elements.filter((e: any) => e.options && e.options.modal) : []} schema={schema} view={view} - uischema={uischema} uri={scope} tabs={data} handleChange={(data: JsObject) => store.setSelectedData(scope, data)} @@ -399,10 +393,10 @@ export const withStoreToMenuProps = (Component: any): any => export const withStoreToCollapseProps = (Component: any): any => observer(({ ...props }: any) => { - const { uischema, viewElement, view } = props; + const { viewElement, view } = props; const options = viewElement.options || {}; - return ; + return ; }); export const withStoreToArrayProps = (Component: any): any => @@ -460,17 +454,16 @@ export const withStoreToArrayProps = (Component: any): any => }); export const withLayoutProps = (Component: React.FC): React.FC => - observer(({ uischema, viewElement, view, enabled, form, parent }) => { + observer(({ viewElement, view, enabled, form, parent }) => { const id = viewElement['@id'] || ''; - const enabledLayout = enabled && checkProperty('editable', id, uischema, viewElement, view); - const visible = checkProperty('visible', id, uischema, viewElement, view); + const enabledLayout = enabled && checkProperty('editable', id, viewElement, view); + const visible = checkProperty('visible', id, viewElement, view); const { store } = useContext(MstContext); if (viewElement.options && viewElement.options.connections) { viewElement.options.connections.forEach((e: any) => store.setSaveLogic(e.from, e.to)); } return ( ): React.FC< }); export const withStoreToSaveButtonProps = (Component: React.FC): React.FC => - observer(({ uischema, viewElement, view, enabled, parent }) => { + observer(({ viewElement, view, enabled, parent }) => { const { store } = useContext(MstContext); if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { store.setSaveLogic(parent, viewElement.resultsScope); } - const key = (viewElement as Control).resultsScope; + const key = viewElement.resultsScope; return ( ): Rea return ; }); -const mapStateToControlProps = ({ id, uischema, schema, viewElement, view, enabled }: ToControlProps) => { +const mapStateToControlProps = ({ id, schema, viewElement, view, enabled }: ToControlProps) => { const pathSegments = id.split('/'); const path = pathSegments.join('.properties.'); - const visible = checkProperty('visible', path, uischema, viewElement, view); + const visible = checkProperty('visible', path, viewElement, view); const editable = viewElement.options && 'editable' in viewElement.options ? viewElement.options.editable : true; const required = true; const uiOptions = viewElement.options; @@ -533,13 +526,10 @@ const mapStateToControlProps = ({ id, uischema, schema, viewElement, view, enabl }; }; -const checkProperty = (property: Property, path: string, uischema: UISchema, viewElement: ViewElement, view: View) => { - const uiProp = get(uischema, path); +const checkProperty = (property: Property, path: string, viewElement: ViewElement, view: View) => { const viewClassProp = viewElement.options; const viewProp = get(view, path); - if (uiProp && uiProp[property]) { - return uiProp[property]; - } else if (viewClassProp && viewClassProp[property]) { + if (viewClassProp && viewClassProp[property]) { return viewClassProp[property]; } else if (viewProp && viewProp[property]) { return viewProp[property]; @@ -638,7 +628,7 @@ export const withContextFormsSaveControlProps = //type FormsPropTypes = ControlProps | CombinatorProps | LayoutProps | CellProps | ArrayLayoutProps | StatePropsOfControlWithDetail | OwnPropsOfRenderer; export const areEqual = (prevProps: any /*FormsPropTypes*/, nextProps: any /*FormsPropTypes*/) => { - const prev = omit(prevProps, ['handleChange', 'uischemas']); - const next = omit(nextProps, ['handleChange', 'uischemas']); - return isEqual(prev, next) && get(prevProps, 'uischemas.length') === get(nextProps, 'uischemas.length'); + const prev = omit(prevProps, ['handleChange']); + const next = omit(nextProps, ['handleChange']); + return isEqual(prev, next); }; diff --git a/src/util/layout.tsx b/src/util/layout.tsx index fb72925..b94dc13 100644 --- a/src/util/layout.tsx +++ b/src/util/layout.tsx @@ -21,12 +21,12 @@ export interface RenderLayoutProps extends FormsDispatchProps { Render: React.FC; } -export const renderLayoutElements = ({ viewElement, uischema, view, enabled, Render, parent }: RenderLayoutProps) => { +export const renderLayoutElements = ({ viewElement, view, enabled, Render, parent }: RenderLayoutProps) => { const elements = viewElement.elements; //const id = view['@id']; //const sort = id ? view.properties && view.properties[id] && view.properties[id].order : undefined; if (!elements || elements.length === 0) return <>; return elements.map((el: ViewElement, idx: number) => ( - + )); }; diff --git a/stories/AntdCardCell.stories.tsx b/stories/AntdCardCell.stories.tsx index c58393e..e388215 100644 --- a/stories/AntdCardCell.stories.tsx +++ b/stories/AntdCardCell.stories.tsx @@ -13,13 +13,7 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { - SparqlClientImpl, - rootModelInitialState, - createModelFromState, - CollState, - mstSchemas, -} from '@agentlab/sparql-jsld-client'; +import { SparqlClientImpl, rootModelInitialState, CollState } from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -31,7 +25,7 @@ import { RendererRegistryEntry, } from '../src'; import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { ViewDescr } from '../src/stores/ViewDescr'; +import { createUiModelFromState } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -41,16 +35,16 @@ const antdRenderers: RendererRegistryEntry[] = [ const viewKinds = [ { - '@id': 'rm:CardCellGridViewKind', + '@id': 'mktp:CardCellGridViewKind', '@type': 'aldkg:ViewKind', type: 'VerticalLayout', collsConstrs: [ { - '@id': 'rm:Cards_Coll', + '@id': 'mktp:ViewKind_Cards_Coll', '@type': 'aldkg:CollConstr', entConstrs: [ { - '@id': 'rm:Cards_Coll_Shape0', + '@id': 'mktp:ViewKind_Cards_Coll_Shape0', '@type': 'aldkg:EntConstr', schema: 'hs:ProductCardShape', }, @@ -64,7 +58,7 @@ const viewKinds = [ elements: [ { type: 'DataControl', - resultsScope: 'rm:Cards_Coll', + resultsScope: 'mktp:ViewKind_Cards_Coll', options: { renderType: 'grid', grid: { @@ -236,17 +230,17 @@ const viewDescrs = [ { '@id': 'mktp:CardCellViewDescr', '@type': 'aldkg:ViewDescr', - viewKind: 'rm:CardCellGridViewKind', + viewKind: 'mktp:CardCellGridViewKind', type: 'VerticalLayout', title: 'CardCellGrid', description: 'CardCellGrid', collsConstrs: [ { - '@id': 'rm:Cards_Coll', + '@id': 'mktp:ViewDescr_Cards_Coll', '@type': 'aldkg:CollConstr', entConstrs: [ { - '@id': 'rm:Cards_Coll_Shape0', + '@id': 'mktp:ViewDescr_Cards_Coll_Shape0', '@type': 'aldkg:EntConstr', schema: 'hs:ProductCardShape', }, @@ -257,174 +251,7 @@ const viewDescrs = [ //width: 'all-empty-space', }, // child ui elements configs - elements: [ - { - type: 'DataControl', - resultsScope: 'rm:Cards_Coll', - options: { - renderType: 'grid', - grid: { - gutter: 16, - xs: 2, - sm: 2, - md: 3, - lg: 3, - xl: 4, - xxl: 7, - }, - elementTemplate: [ - { - type: 'CardLayout', - elements: [ - { - type: 'ImageCell', - scope: 'imageUrl', - }, - { - type: 'Control', - scope: 'name', - options: { - editable: false, - style: { - height: '3.5em', - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - overflow: 'hidden', - textOverflow: 'ellipsis', - margin: 0, - }, - }, - }, - { - type: 'Rate', - scope: 'starsValue', - options: { - editable: false, - }, - }, - { - type: 'CellHorizontalLayout', - options: { - justify: 'space-between', - }, - elements: [ - { - type: 'Control', - scope: 'price', - options: { - formater: 'labeledValue', - editable: false, - label: 'Цена', - specialChar: '₽', - style: { - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - { - type: 'Control', - scope: 'totalSales', - options: { - formater: 'labeledValue', - editable: false, - label: 'Всего продано', - style: { - textAlign: 'right', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - ], - }, - { - type: 'Control', - scope: 'lastMonthSalesAmount', - options: { - editable: false, - formater: 'сomparison', - dataToFormater: { - prevValue: 'prevMonthSalesAmount', - }, - label: 'Продажи за месяц', - style: { - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - { - type: 'Control', - scope: 'lastMonthSalesValue', - options: { - formater: 'сomparison', - editable: false, - dataToFormater: { - prevValue: 'prevMonthSalesValue', - }, - label: 'Объем продаж', - style: { - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - { - type: 'G2', - }, - { - type: 'CellHorizontalLayout', - options: { - justify: 'space-around', - }, - elements: [ - { - type: 'Control', - scope: '@id', - options: { - style: { - border: '1.5px solid black', - borderRadius: '2px', - height: '2em', - textAlign: 'center', - fontWeight: 500, - width: '90px', - color: 'black', - }, - specialImage: 'https://www.meme-arsenal.com/memes/f8e9bfb9fdf368272b21a5dac8f01ec1.jpg', - editable: false, - formater: 'link', - dataToFormater: { - link: '@id', - }, - label: 'Wildberries', - }, - }, - { - type: 'Button', - options: { - label: 'Добавить', - style: { - border: '1.5px solid black', - borderRadius: '2px', - width: '90px', - fontWeight: 500, - color: 'black', - }, - }, - }, - ], - }, - ], - }, - ], - }, - }, - ], + elements: [], }, ]; @@ -436,7 +263,7 @@ const additionalColls: CollState[] = [ opt: { updPeriod: undefined, lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + //resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs }, }, // ViewDescrs Collection @@ -452,10 +279,8 @@ const additionalColls: CollState[] = [ }, ]; -mstSchemas['aldkg:ViewDescr'] = ViewDescr; - const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); -const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); +const rootStore = createUiModelFromState('mktp', client, rootModelInitialState, additionalColls); console.log('rootStore', rootStore); const store: any = asReduxStore(rootStore); // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -480,7 +305,11 @@ export const Empty: Story<{}> = () => ( margin: '0 auto', padding: '5px', }}> - + diff --git a/stories/Form.stories.tsx b/stories/Form.stories.tsx index 2fd172b..2396acf 100644 --- a/stories/Form.stories.tsx +++ b/stories/Form.stories.tsx @@ -8,19 +8,12 @@ * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ import moment from 'moment'; -import { variable } from '@rdfjs/data-model'; import React from 'react'; import { Meta, Story } from '@storybook/react'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { - SparqlClientImpl, - rootModelInitialState, - createModelFromState, - CollState, - mstSchemas, -} from '@agentlab/sparql-jsld-client'; +import { SparqlClientImpl, rootModelInitialState, CollState } from '@agentlab/sparql-jsld-client'; import { RendererRegistryEntry, @@ -31,15 +24,14 @@ import { antdLayoutRenderers, } from '../src'; import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { ViewDescr } from '../src/stores/ViewDescr'; +import { createUiModelFromState } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [...antdControlRenderers, ...antdLayoutRenderers]; -const viewDescrs = [ +const viewKinds = [ { - '@id': 'rm:FormView', + '@id': 'rm:FormViewKind', '@type': 'aldkg:ViewDescr', - //'viewKind': 'rm:FormViewClass', title: 'Малая форма', description: 'Small form', type: 'FormLayout', @@ -86,17 +78,34 @@ const viewDescrs = [ }, ]; +const viewDescrs = [ + { + '@id': 'rm:FormViewDescr', + '@type': 'aldkg:ViewDescr', + viewKind: 'rm:FormViewKind', + type: 'VerticalLayout', + title: 'CardCellGrid', + description: 'CardCellGrid', + collsConstrs: [], + options: { + //width: 'all-empty-space', + }, + // child ui elements configs + elements: [], + }, +]; + const additionalColls: CollState[] = [ // ViewKinds Collection - /*{ + { constr: viewKindCollConstr, data: viewKinds, opt: { updPeriod: undefined, lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + //resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs }, - },*/ + }, // ViewDescrs Collection { constr: viewDescrCollConstr, @@ -110,10 +119,8 @@ const additionalColls: CollState[] = [ }, ]; -mstSchemas['aldkg:ViewDescr'] = ViewDescr; - const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); -const rootStore = createModelFromState('reqs2', client, rootModelInitialState, additionalColls); +const rootStore = createUiModelFromState('reqs2', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); // eslint-disable-next-line @typescript-eslint/no-var-requires connectReduxDevtools(require('remotedev'), rootStore); @@ -130,7 +137,11 @@ const Template: Story = (args: any) => (
- +
diff --git a/stories/Tree.stories.tsx b/stories/Tree.stories.tsx index 072e455..7b7fbae 100644 --- a/stories/Tree.stories.tsx +++ b/stories/Tree.stories.tsx @@ -146,7 +146,6 @@ export const Empty: Story<{}> = () => ( schema={artifactSchema} view={{} as any} id={'test'} - uischema={{}} enabled={true} dataSource={data} /> diff --git a/stories/TreeAndForm.stories.tsx b/stories/TreeAndForm.stories.tsx index cfbd53e..a86314c 100644 --- a/stories/TreeAndForm.stories.tsx +++ b/stories/TreeAndForm.stories.tsx @@ -13,13 +13,7 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { - SparqlClientImpl, - rootModelInitialState, - createModelFromState, - CollState, - mstSchemas, -} from '@agentlab/sparql-jsld-client'; +import { SparqlClientImpl, rootModelInitialState, CollState } from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -31,7 +25,7 @@ import { RendererRegistryEntry, } from '../src'; import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { ViewDescr } from '../src/stores/ViewDescr'; +import { createUiModelFromState } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -39,13 +33,12 @@ const antdRenderers: RendererRegistryEntry[] = [ ...antdDataControlRenderers, ]; -const viewDescrs = [ +const viewKinds = [ { - '@id': 'mktp:TreeAndFormViewDescr', + '@id': 'mktp:TreeAndFormViewKind', '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', - viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Categories_Coll', @@ -287,17 +280,34 @@ const viewDescrs = [ }, ]; +const viewDescrs = [ + { + '@id': 'mktp:TreeAndFormViewDescr', + '@type': 'aldkg:ViewDescr', + viewKind: 'mktp:TreeAndFormViewKind', + type: 'VerticalLayout', + title: 'CardCellGrid', + description: 'CardCellGrid', + collsConstrs: [], + options: { + //width: 'all-empty-space', + }, + // child ui elements configs + elements: [], + }, +]; + const additionalColls: CollState[] = [ // ViewKinds Collection - /*{ + { constr: viewKindCollConstr, data: viewKinds, opt: { updPeriod: undefined, lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + //resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs }, - },*/ + }, // ViewDescrs Collection { constr: viewDescrCollConstr, @@ -311,10 +321,8 @@ const additionalColls: CollState[] = [ }, ]; -mstSchemas['aldkg:ViewDescr'] = ViewDescr; - const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); -const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); +const rootStore = createUiModelFromState('mktp', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); // eslint-disable-next-line @typescript-eslint/no-var-requires connectReduxDevtools(require('remotedev'), rootStore); @@ -331,7 +339,11 @@ export const Empty: Story<{}> = () => (
- +
diff --git a/stories/TreeAndFormArtifact.stories.tsx b/stories/TreeAndFormArtifact.stories.tsx index 9707522..924c5aa 100644 --- a/stories/TreeAndFormArtifact.stories.tsx +++ b/stories/TreeAndFormArtifact.stories.tsx @@ -13,13 +13,7 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { - SparqlClientImpl, - rootModelInitialState, - createModelFromState, - CollState, - mstSchemas, -} from '@agentlab/sparql-jsld-client'; +import { SparqlClientImpl, rootModelInitialState, CollState } from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -31,7 +25,7 @@ import { RendererRegistryEntry, } from '../src'; import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { ViewDescr } from '../src/stores/ViewDescr'; +import { createUiModelFromState } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -39,13 +33,12 @@ const antdRenderers: RendererRegistryEntry[] = [ ...antdDataControlRenderers, ]; -const viewDescrs = [ +const viewKinds = [ { - '@id': 'mktp:TreeAndFormViewDescr', + '@id': 'mktp:TreeAndFormArtifactViewKind', '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', - viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Folders_Coll', @@ -126,17 +119,34 @@ const viewDescrs = [ }, ]; +const viewDescrs = [ + { + '@id': 'mktp:TreeAndFormArtifactViewDescr', + '@type': 'aldkg:ViewDescr', + viewKind: 'mktp:TreeAndFormArtifactViewKind', + type: 'VerticalLayout', + title: 'CardCellGrid', + description: 'CardCellGrid', + collsConstrs: [], + options: { + //width: 'all-empty-space', + }, + // child ui elements configs + elements: [], + }, +]; + const additionalColls: CollState[] = [ // ViewKinds Collection - /*{ + { constr: viewKindCollConstr, data: viewKinds, opt: { updPeriod: undefined, lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + //resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs }, - },*/ + }, // ViewDescrs Collection { constr: viewDescrCollConstr, @@ -150,10 +160,8 @@ const additionalColls: CollState[] = [ }, ]; -mstSchemas['aldkg:ViewDescr'] = ViewDescr; - const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); -const rootStore = createModelFromState('reqs2', client, rootModelInitialState, additionalColls); +const rootStore = createUiModelFromState('reqs2', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); // eslint-disable-next-line @typescript-eslint/no-var-requires connectReduxDevtools(require('remotedev'), rootStore); @@ -170,7 +178,11 @@ export const Empty: Story<{}> = () => (
- +
diff --git a/stories/TreeAndFormColumns.stories.tsx b/stories/TreeAndFormColumns.stories.tsx index 947f020..3847a6b 100644 --- a/stories/TreeAndFormColumns.stories.tsx +++ b/stories/TreeAndFormColumns.stories.tsx @@ -13,13 +13,7 @@ import { Story, Meta } from '@storybook/react/types-6-0'; import { Provider } from 'react-redux'; import { asReduxStore, connectReduxDevtools } from 'mst-middlewares'; -import { - SparqlClientImpl, - rootModelInitialState, - createModelFromState, - CollState, - mstSchemas, -} from '@agentlab/sparql-jsld-client'; +import { SparqlClientImpl, rootModelInitialState, CollState } from '@agentlab/sparql-jsld-client'; import { antdCells, @@ -31,7 +25,7 @@ import { RendererRegistryEntry, } from '../src'; import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { ViewDescr } from '../src/stores/ViewDescr'; +import { createUiModelFromState } from '../src/stores/ViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -39,13 +33,12 @@ const antdRenderers: RendererRegistryEntry[] = [ ...antdDataControlRenderers, ]; -const viewDescrs = [ +const viewKinds = [ { - '@id': 'mktp:TreeAndFormViewDescr', + '@id': 'mktp:TreeAndFormViewKind', '@type': 'aldkg:ViewDescr', title: 'TreeAndForm', description: 'TreeAndForm', - viewKind: 'rm:TreeAndFormViewKind', collsConstrs: [ { '@id': 'rm:Cards_Coll', @@ -231,17 +224,34 @@ const viewDescrs = [ }, ]; +const viewDescrs = [ + { + '@id': 'mktp:TreeAndFormViewDescr', + '@type': 'aldkg:ViewDescr', + viewKind: 'mktp:TreeAndFormViewKind', + type: 'VerticalLayout', + title: 'CardCellGrid', + description: 'CardCellGrid', + collsConstrs: [], + options: { + //width: 'all-empty-space', + }, + // child ui elements configs + elements: [], + }, +]; + const additionalColls: CollState[] = [ // ViewKinds Collection - /*{ + { constr: viewKindCollConstr, data: viewKinds, opt: { updPeriod: undefined, lastSynced: moment.now(), - resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs + //resolveCollConstrs: false, // disable data loading from the server for viewKinds.collConstrs }, - },*/ + }, // ViewDescrs Collection { constr: viewDescrCollConstr, @@ -255,10 +265,8 @@ const additionalColls: CollState[] = [ }, ]; -mstSchemas['aldkg:ViewDescr'] = ViewDescr; - const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); -const rootStore = createModelFromState('mktp', client, rootModelInitialState, additionalColls); +const rootStore = createUiModelFromState('mktp', client, rootModelInitialState, additionalColls); const store: any = asReduxStore(rootStore); // eslint-disable-next-line @typescript-eslint/no-var-requires connectReduxDevtools(require('remotedev'), rootStore); @@ -275,7 +283,11 @@ export const Empty: Story<{}> = () => (
- +
From 1a161ed4cd00f442894ec3b8387848cb9033497b Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 10 Aug 2021 13:11:51 +0300 Subject: [PATCH 04/10] [refactor] GH-5 Remove parent --- src/DispatchCell.tsx | 3 +- src/Form.tsx | 13 +----- src/cells/AntdCellHorizontalLayout.tsx | 12 +----- src/layouts/AntdFormLayout.tsx | 2 - src/layouts/AntdHorizontalLayout.tsx | 14 ++----- src/layouts/AntdVerticalLayout.tsx | 7 ++-- src/layouts/SplitPaneLayout.tsx | 33 ++++----------- src/layouts/TabsLayout.tsx | 2 +- src/util/AntdModal.tsx | 10 +---- src/util/ContextToProps.tsx | 58 +++++++++++--------------- src/util/layout.tsx | 4 +- 11 files changed, 46 insertions(+), 112 deletions(-) diff --git a/src/DispatchCell.tsx b/src/DispatchCell.tsx index 0f9eaca..fbec2b1 100644 --- a/src/DispatchCell.tsx +++ b/src/DispatchCell.tsx @@ -19,7 +19,7 @@ import { MstContext } from './MstContext'; * Dispatch renderer component for cells. */ export const DispatchCell: React.FC = React.memo( - ({ data, onMeasureChange, uri, schema, viewElement, view, enabled, id, parent, CKey, rowData, ...rest }) => { + ({ data, onMeasureChange, uri, schema, viewElement, view, enabled, id, CKey, rowData, ...rest }) => { const { cells } = useContext(MstContext); const renderer = maxBy(cells, (r) => r.tester(viewElement, schema)); if (renderer === undefined || renderer.tester(viewElement, schema) === -1) { @@ -43,7 +43,6 @@ export const DispatchCell: React.FC = React.memo( enabled={enabled} view={view} id={id} - parent={parent} {...rest} /> diff --git a/src/Form.tsx b/src/Form.tsx index 59e3d08..ef64456 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -62,7 +62,6 @@ export interface FormsInitStateProps { } export interface FormsDispatchProps extends InitStateProps { enabled?: boolean; - parent?: string; form?: string; } export interface FormDispatchProps extends FormsDispatchProps { @@ -87,7 +86,7 @@ export interface DispatchCellProps extends RenderProps { } export const FormsDispatch: React.FC = observer( - ({ view, viewElement, parent, form, uri, enabled }: any) => { + ({ view, viewElement, form, uri, enabled }: any) => { const { store, renderers } = useContext(MstContext); const shapes = viewElement.resultsScope ? viewElement.resultsScope.split('/') : []; @@ -117,15 +116,7 @@ export const FormsDispatch: React.FC = observer = renderer.renderer; return ( {}}> - + ); } diff --git a/src/cells/AntdCellHorizontalLayout.tsx b/src/cells/AntdCellHorizontalLayout.tsx index 1582edd..e3a6f50 100644 --- a/src/cells/AntdCellHorizontalLayout.tsx +++ b/src/cells/AntdCellHorizontalLayout.tsx @@ -20,16 +20,7 @@ import { Idx } from '../util/layout'; export const AntdHorizontalLayoutRenderer: React.FC = ({ viewElement, view, data, schema }) => { //const layout = viewElement as Layout; - const Render: React.FC = ({ - idx, - schema, - viewElement, - view, - data, - enabled, - parent, - form, - }) => { + const Render: React.FC = ({ idx, schema, viewElement, view, data, enabled, form }) => { const options = viewElement.options || {}; //const style: any = options.style; const span = options.contentSize || !viewElement.elements ? undefined : Math.ceil(24 / viewElement.elements.length); @@ -46,7 +37,6 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ view rowData={data} schema={newSchema || schema} enabled={enabled} - parent={parent} form={form} /> diff --git a/src/layouts/AntdFormLayout.tsx b/src/layouts/AntdFormLayout.tsx index da8524c..825a789 100644 --- a/src/layouts/AntdFormLayout.tsx +++ b/src/layouts/AntdFormLayout.tsx @@ -79,7 +79,6 @@ export const AntdFormLayout: React.FC = ({ enabled, title, visible, - parent, formId, validation, editable, @@ -101,7 +100,6 @@ export const AntdFormLayout: React.FC = ({ viewElement={viewElement} enabled={enabled} view={view} - parent={parent} form={formId} /> diff --git a/src/layouts/AntdHorizontalLayout.tsx b/src/layouts/AntdHorizontalLayout.tsx index d908da3..3d18769 100644 --- a/src/layouts/AntdHorizontalLayout.tsx +++ b/src/layouts/AntdHorizontalLayout.tsx @@ -18,21 +18,15 @@ import { renderLayoutElements } from '../util/layout'; import { Idx } from '../util/layout'; import { LayoutComponent } from './LayoutComponent'; -export const AntdHorizontalLayoutRenderer: React.FC = ({ - viewElement, - view, - enabled, - visible, - parent, -}) => { +export const AntdHorizontalLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible }) => { //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, viewElement, view, enabled, parent, form }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled, form }) => { const options = viewElement.options || {}; const style: any = options.style; const span = options.contentSize || !viewElement.elements ? undefined : Math.ceil(24 / viewElement.elements.length); return ( - + ); }; @@ -41,7 +35,7 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ if (viewElement.options && viewElement.options.width === 'all-empty-space') rowStyle.width = '100%'; return ( - {renderLayoutElements({ viewElement, view, enabled, Render, parent })} + {renderLayoutElements({ viewElement, view, enabled, Render })} ); }; diff --git a/src/layouts/AntdVerticalLayout.tsx b/src/layouts/AntdVerticalLayout.tsx index 5e9ff35..a21a64e 100644 --- a/src/layouts/AntdVerticalLayout.tsx +++ b/src/layouts/AntdVerticalLayout.tsx @@ -23,10 +23,9 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ view, enabled, visible, - parent, form, }) => { - const Render: React.FC = ({ idx, viewElement, view, enabled, parent }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled }) => { const options = viewElement.options || {}; const style: any = options.style; return ( @@ -36,7 +35,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ flex: viewElement.options && viewElement.options.height === 'all-empty-space' ? '1 1 auto' : '', }}> - + ); @@ -44,7 +43,7 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ return (
- {renderLayoutElements({ viewElement, view, enabled, Render, parent })} + {renderLayoutElements({ viewElement, view, enabled, Render })}
); diff --git a/src/layouts/SplitPaneLayout.tsx b/src/layouts/SplitPaneLayout.tsx index e789719..9df3a42 100644 --- a/src/layouts/SplitPaneLayout.tsx +++ b/src/layouts/SplitPaneLayout.tsx @@ -26,36 +26,17 @@ const divStyle: React.CSSProperties = { margin: '1px', }; -const renderSplitElements = ({ viewElement, view, enabled, Render, parent, form }: RenderLayoutProps) => { +const renderSplitElements = ({ viewElement, view, enabled, Render, form }: RenderLayoutProps) => { const elements = viewElement.elements; const defaultSize = viewElement.options && viewElement.options.defaultSize; - const id = viewElement['@id']; - const sort = id - ? viewElement.properties && viewElement.properties[id] && viewElement.properties[id].order - : undefined; - return sort ? ( - sort.reduce((res: ReactElement[], e: string, idx: number) => { - const key = elements ? elements.findIndex((el: ViewElement) => el['@id'] === e || el.scope === e) : -1; - if (key !== -1 && elements) { - const childView = elements[key]; - const id = childView['@id'] || childView.scope || ''; - const style = childView.options && childView.options.style; - res.push( - - - , - ); - } - return res; - }, []) - ) : elements ? ( + return elements ? ( elements.map((el: ViewElement, idx: number) => { const id = el['@id'] || el.resultsScope || ''; const style = el.options && el.options.style; return (
- +
); @@ -65,19 +46,19 @@ const renderSplitElements = ({ viewElement, view, enabled, Render, parent, form ); }; -export const SplitPaneLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible, parent }) => { +export const SplitPaneLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible }) => { //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, viewElement, view, enabled, parent }) => { + const Render: React.FC = ({ idx, viewElement, view, enabled }) => { return (
- +
); }; return ( - {renderSplitElements({ viewElement, view, enabled, Render, parent })} + {renderSplitElements({ viewElement, view, enabled, Render })} ); diff --git a/src/layouts/TabsLayout.tsx b/src/layouts/TabsLayout.tsx index 0d3ee5d..bbd9552 100644 --- a/src/layouts/TabsLayout.tsx +++ b/src/layouts/TabsLayout.tsx @@ -22,7 +22,7 @@ export const TabsLayout: React.FC = (props) => { const title = e.options && e.options.title; return ( - + ); }) diff --git a/src/util/AntdModal.tsx b/src/util/AntdModal.tsx index 1747f04..18c22b2 100644 --- a/src/util/AntdModal.tsx +++ b/src/util/AntdModal.tsx @@ -41,15 +41,7 @@ export const AntdModal: React.FC = observer( cancelText='Отмена' width={1200} okText='Сохранить'> - + { diff --git a/src/util/ContextToProps.tsx b/src/util/ContextToProps.tsx index a9319f9..f3da76b 100644 --- a/src/util/ContextToProps.tsx +++ b/src/util/ContextToProps.tsx @@ -107,7 +107,7 @@ export const withStoreToControlProps = (Component: React.FC): ); }); export const withStoreToFormProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled, parent, form }) => { + observer(({ viewElement, view, enabled, form }) => { if (!view['@id']) { return null; } @@ -124,7 +124,6 @@ export const withStoreToFormProps = (Component: React.FC): React.FC store.onSaveFormData(id)} editing={store.editingData.get(id)} onEdit={() => store.setEditing(id, true)} @@ -148,7 +147,7 @@ export const withStoreToViewClassProps = (Component: any): any => export const withStoreToViewProps = (Component: any): any => observer(({ ...props }: any) => { - const { view, viewElement, parent } = props; + const { view, viewElement } = props; const { store } = useContext(MstContext); const scope = viewElement.resultsScope; const coll = store.getColl(scope); @@ -160,8 +159,8 @@ export const withStoreToViewProps = (Component: any): any => return ; } data = getSnapshot(data); - //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(parent, viewElement.resultsScope); + //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + // store.setSaveLogic(viewElement.resultsScope); //} //const id = store.getSelectedDataJs(scope)['@type']; //const selection = getSnapshot(store.selectedData); @@ -187,10 +186,10 @@ export const withStoreToModalProps = (Component: any): any => }); export const withStoreToButtonProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, parent } = props; + const { schema, viewElement } = props; const { store } = useContext(MstContext); - if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - store.setSaveLogic(parent, viewElement.resultsScope); + if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + store.setSaveLogic(viewElement.resultsScope); } const options = viewElement.options || {}; @@ -224,10 +223,10 @@ export const withStoreToCellProps = (Component: React.FC): React.FC => export const withStoreToDataControlProps = (Component: any): any => observer(({ ...props }: any) => { - const { viewElement, view, parent } = props; + const { viewElement, view } = props; const { store } = useContext(MstContext); - //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(parent, viewElement.resultsScope); + //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + // store.setSaveLogic(viewElement.resultsScope); //} const custom = view[viewElement.resultsScope.split('/')[0]] ? view[view.resultsScope.split('/')[0]].customReq @@ -328,10 +327,10 @@ export const withStoreToSelectControlProps = (Component: any): any => export const withStoreToTabProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view, parent } = props; + const { schema, viewElement, view } = props; const { store } = useContext(MstContext); - //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(parent, viewElement.resultsScope); + //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + // store.setSaveLogic(viewElement.resultsScope); //} const options = viewElement.options || {}; const custom = view[viewElement.resultsScope.split('/')[0]] @@ -361,10 +360,10 @@ export const withStoreToTabProps = (Component: any): any => export const withStoreToMenuProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view, parent } = props; + const { schema, viewElement, view } = props; const { store } = useContext(MstContext); - //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(parent, viewElement.resultsScope); + //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + // store.setSaveLogic(viewElement.resultsScope); //} const options = viewElement.options || {}; const custom = view[viewElement.resultsScope.split('/')[0]] @@ -401,10 +400,10 @@ export const withStoreToCollapseProps = (Component: any): any => export const withStoreToArrayProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view, parent } = props; + const { schema, viewElement, view } = props; const { store } = useContext(MstContext); - //if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(parent, viewElement.resultsScope); + //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + // store.setSaveLogic(viewElement.resultsScope); //} const options = viewElement.options || {}; const custom = view[viewElement.resultsScope.split('/')[0]] @@ -454,7 +453,7 @@ export const withStoreToArrayProps = (Component: any): any => }); export const withLayoutProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled, form, parent }) => { + observer(({ viewElement, view, enabled, form }) => { const id = viewElement['@id'] || ''; const enabledLayout = enabled && checkProperty('editable', id, viewElement, view); const visible = checkProperty('visible', id, viewElement, view); @@ -462,23 +461,14 @@ export const withLayoutProps = (Component: React.FC): React.FC< if (viewElement.options && viewElement.options.connections) { viewElement.options.connections.forEach((e: any) => store.setSaveLogic(e.from, e.to)); } - return ( - - ); + return ; }); export const withStoreToSaveButtonProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled, parent }) => { + observer(({ viewElement, view, enabled }) => { const { store } = useContext(MstContext); - if (parent && viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - store.setSaveLogic(parent, viewElement.resultsScope); + if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { + store.setSaveLogic(viewElement.resultsScope); } const key = viewElement.resultsScope; return ( diff --git a/src/util/layout.tsx b/src/util/layout.tsx index b94dc13..f918a6d 100644 --- a/src/util/layout.tsx +++ b/src/util/layout.tsx @@ -21,12 +21,12 @@ export interface RenderLayoutProps extends FormsDispatchProps { Render: React.FC; } -export const renderLayoutElements = ({ viewElement, view, enabled, Render, parent }: RenderLayoutProps) => { +export const renderLayoutElements = ({ viewElement, view, enabled, Render }: RenderLayoutProps) => { const elements = viewElement.elements; //const id = view['@id']; //const sort = id ? view.properties && view.properties[id] && view.properties[id].order : undefined; if (!elements || elements.length === 0) return <>; return elements.map((el: ViewElement, idx: number) => ( - + )); }; From deaeb5433c7a53f739efe7674e2ff5fb660cd78a Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 10 Aug 2021 15:52:22 +0300 Subject: [PATCH 05/10] [refactor] GH-5 Cells renderers in a single file --- src/cells/AntdBooleanCell.tsx | 28 ------ src/cells/AntdButtonCell.tsx | 22 ----- src/cells/AntdCellHorizontalLayout.tsx | 4 +- src/cells/AntdCellRateWidget.tsx | 28 ------ src/cells/AntdEnumCell.tsx | 25 ----- src/cells/AntdImageCell.tsx | 20 ---- src/cells/AntdNumberCell.tsx | 26 ----- src/cells/AntdSimpleCells.tsx | 125 +++++++++++++++++++++++++ src/cells/AntdTextCell.tsx | 28 ------ src/cells/AntdTimeCell.tsx | 28 ------ src/cells/index.ts | 38 ++++---- 11 files changed, 149 insertions(+), 223 deletions(-) delete mode 100644 src/cells/AntdBooleanCell.tsx delete mode 100644 src/cells/AntdButtonCell.tsx delete mode 100644 src/cells/AntdCellRateWidget.tsx delete mode 100644 src/cells/AntdEnumCell.tsx delete mode 100644 src/cells/AntdImageCell.tsx delete mode 100644 src/cells/AntdNumberCell.tsx create mode 100644 src/cells/AntdSimpleCells.tsx delete mode 100644 src/cells/AntdTextCell.tsx delete mode 100644 src/cells/AntdTimeCell.tsx diff --git a/src/cells/AntdBooleanCell.tsx b/src/cells/AntdBooleanCell.tsx deleted file mode 100644 index 95f8493..0000000 --- a/src/cells/AntdBooleanCell.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import React from 'react'; - -import { rankWith, RankedTester, isBooleanControl } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; - -import { AntdCheckbox } from '../antd-controls/AntdCheckbox'; -import { CellRenderer } from './CellRenderer'; - -export const AntdBooleanCell = (props: any) => { - return ; -}; - -/** - * Default tester for text-based/string controls. - * @type {RankedTester} - */ -export const antdBooleanCellTester: RankedTester = rankWith(2, isBooleanControl); - -export const AntdBooleanCellWithStore = withStoreToCellProps(AntdBooleanCell); diff --git a/src/cells/AntdButtonCell.tsx b/src/cells/AntdButtonCell.tsx deleted file mode 100644 index e29e607..0000000 --- a/src/cells/AntdButtonCell.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; - -import { uiTypeIs, rankWith, RankedTester } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; -import { Button } from 'antd'; - -export const AntdButtonCell = (props: any) => { - const options = props.uiOptions; - return ( - - ); -}; - -/** - * Default tester for text-based/string controls. - * @type {RankedTester} - */ -export const antdButtonCellTester: RankedTester = rankWith(2, uiTypeIs('Button')); - -export const AntdButtonCellWithStore = withStoreToCellProps(AntdButtonCell); diff --git a/src/cells/AntdCellHorizontalLayout.tsx b/src/cells/AntdCellHorizontalLayout.tsx index e3a6f50..00df6c4 100644 --- a/src/cells/AntdCellHorizontalLayout.tsx +++ b/src/cells/AntdCellHorizontalLayout.tsx @@ -18,7 +18,7 @@ import { get } from 'lodash-es'; import { Idx } from '../util/layout'; -export const AntdHorizontalLayoutRenderer: React.FC = ({ viewElement, view, data, schema }) => { +export const AntdCellHorizontalLayoutRenderer: React.FC = ({ viewElement, view, data, schema }) => { //const layout = viewElement as Layout; const Render: React.FC = ({ idx, schema, viewElement, view, data, enabled, form }) => { const options = viewElement.options || {}; @@ -54,4 +54,4 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ view ); }; -export const antdHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('CellHorizontalLayout')); +export const antdCellHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('CellHorizontalLayout')); diff --git a/src/cells/AntdCellRateWidget.tsx b/src/cells/AntdCellRateWidget.tsx deleted file mode 100644 index 897b4ef..0000000 --- a/src/cells/AntdCellRateWidget.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; - -import { withStoreToCellProps } from '../util/ContextToProps'; -import { Rate } from 'antd'; - -import { uiTypeIs, rankWith, RankedTester } from '../testers'; - -export const AntdCellRateWidget = (props: any /*: EnumCellProps & WithClassname*/) => { - return ( - - - {`(${props.data})`} - - ); -}; - -/** - * Default tester for enum controls. - * @type {RankedTester} - */ -export const antdCellRateWidgetTester: RankedTester = rankWith(5, uiTypeIs('Rate')); - -export const AntdCellRateWidgetWithStore = withStoreToCellProps(AntdCellRateWidget); diff --git a/src/cells/AntdEnumCell.tsx b/src/cells/AntdEnumCell.tsx deleted file mode 100644 index 975b72a..0000000 --- a/src/cells/AntdEnumCell.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import React from 'react'; - -import { rankWith, RankedTester, isEnumControl } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; - -import { AntdSelect } from '../antd-controls/AntdSelect'; - -export const AntdEnumCell = (props: any /*: EnumCellProps & WithClassname*/) => ; - -/** - * Default tester for enum controls. - * @type {RankedTester} - */ -export const antdEnumCellTester: RankedTester = rankWith(2, isEnumControl); - -export const AntdEnumCellWithStore = withStoreToCellProps(AntdEnumCell); diff --git a/src/cells/AntdImageCell.tsx b/src/cells/AntdImageCell.tsx deleted file mode 100644 index 4037633..0000000 --- a/src/cells/AntdImageCell.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; - -import { uiTypeIs, rankWith, RankedTester } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; -import { Image } from 'antd'; -import { useEffect } from '@storybook/addons'; -import './cell.css'; - -export const AntdImageCell = (props: any) => { - const { data } = props; - return ; -}; - -/** - * Default tester for text-based/string controls. - * @type {RankedTester} - */ -export const antdImageCellTester: RankedTester = rankWith(2, uiTypeIs('ImageCell')); - -export const AntdImageCellWithStore = withStoreToCellProps(AntdImageCell); diff --git a/src/cells/AntdNumberCell.tsx b/src/cells/AntdNumberCell.tsx deleted file mode 100644 index e743770..0000000 --- a/src/cells/AntdNumberCell.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import React from 'react'; - -import { rankWith, RankedTester, isIntegerControl, isNumberControl } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; - -import { AntdInputNumber } from '../antd-controls/AntdInputNumber'; -import { CellRenderer } from './CellRenderer'; - -export const AntdNumberCell = (props: any) => { - return ; -}; - -export const antdIntegerCellTester: RankedTester = rankWith(2, isIntegerControl); -export const AntdIntegerCellWithStore = withStoreToCellProps(AntdNumberCell); - -export const antdNumberCellTester: RankedTester = rankWith(2, isNumberControl); -export const AntdNumberCellWithStore = withStoreToCellProps(AntdNumberCell); diff --git a/src/cells/AntdSimpleCells.tsx b/src/cells/AntdSimpleCells.tsx new file mode 100644 index 0000000..a575f42 --- /dev/null +++ b/src/cells/AntdSimpleCells.tsx @@ -0,0 +1,125 @@ +/******************************************************************************** + * Copyright (c) 2020 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +import { get } from 'lodash-es'; + +import React from 'react'; +import { Button, Card, Image, Row, Col, Rate } from 'antd'; + +import { + rankWith, + RankedTester, + isBooleanControl, + isDateTimeControl, + isEnumControl, + isIntegerControl, + isNumberControl, + isStringControl, + uiTypeIs, +} from '../testers'; +import { withStoreToCellProps } from '../util/ContextToProps'; + +import { AntdCheckbox } from '../antd-controls/AntdCheckbox'; +import { AntdInputDate } from '../antd-controls/AntdInputDate'; +import { AntdInputNumber } from '../antd-controls/AntdInputNumber'; +import { AntdInputText } from '../antd-controls/AntdInputText'; +import { AntdSelect } from '../antd-controls/AntdSelect'; +import { CellRenderer } from './CellRenderer'; + +import './cell.css'; + +/** + * AntdBooleanCell + */ +export const AntdBooleanCell = (props: any) => { + return ; +}; +export const antdBooleanCellTester: RankedTester = rankWith(2, isBooleanControl); +export const AntdBooleanCellWithStore = withStoreToCellProps(AntdBooleanCell); + +/** + * AntdButtonCell + */ +export const AntdButtonCell = (props: any) => { + const options = props.uiOptions; + return ( + + ); +}; +export const antdButtonCellTester: RankedTester = rankWith(2, uiTypeIs('Button')); +export const AntdButtonCellWithStore = withStoreToCellProps(AntdButtonCell); + +/** + * AntdEnumCell + */ +export const AntdEnumCell = (props: any /*: EnumCellProps & WithClassname*/) => ; +export const antdEnumCellTester: RankedTester = rankWith(2, isEnumControl); +export const AntdEnumCellWithStore = withStoreToCellProps(AntdEnumCell); + +/** + * AntdNumberCell & AntdIntegerCell + */ +export const AntdNumberCell = (props: any) => { + return ; +}; + +export const antdIntegerCellTester: RankedTester = rankWith(2, isIntegerControl); +export const AntdIntegerCellWithStore = withStoreToCellProps(AntdNumberCell); + +export const antdNumberCellTester: RankedTester = rankWith(2, isNumberControl); +export const AntdNumberCellWithStore = withStoreToCellProps(AntdNumberCell); + +/** + * AntdImageCell + */ +export const AntdImageCell = (props: any) => { + const { data } = props; + return ; +}; +export const antdImageCellTester: RankedTester = rankWith(2, uiTypeIs('ImageCell')); +export const AntdImageCellWithStore = withStoreToCellProps(AntdImageCell); + +/** + * AntdRateCell + */ +export const AntdRateCell = (props: any /*: EnumCellProps & WithClassname*/) => { + return ( + + + {`(${props.data})`} + + ); +}; +export const antdRateCellTester: RankedTester = rankWith(5, uiTypeIs('Rate')); +export const AntdRateCellWithStore = withStoreToCellProps(AntdRateCell); + +/** + * AntdTextCell + */ +export const AntdTextCell = (props: any) => { + return ; +}; +export const antdTextCellTester: RankedTester = rankWith(1, isStringControl); +export const AntdTextCellWithStore = withStoreToCellProps(AntdTextCell); + +/** + * AntdTimeCell + */ +export const AntdTimeCell = (props: any) => { + return ; +}; +export const antdTimeCellTester: RankedTester = rankWith(2, isDateTimeControl); +export const AntdTimeCellWithStore = withStoreToCellProps(AntdTimeCell); diff --git a/src/cells/AntdTextCell.tsx b/src/cells/AntdTextCell.tsx deleted file mode 100644 index 2cda88c..0000000 --- a/src/cells/AntdTextCell.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import React from 'react'; - -import { rankWith, RankedTester, isStringControl } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; - -import { AntdInputText } from '../antd-controls/AntdInputText'; -import { CellRenderer } from './CellRenderer'; - -export const AntdTextCell = (props: any) => { - return ; -}; - -/** - * Default tester for text-based/string controls. - * @type {RankedTester} - */ -export const antdTextCellTester: RankedTester = rankWith(1, isStringControl); - -export const AntdTextCellWithStore = withStoreToCellProps(AntdTextCell); diff --git a/src/cells/AntdTimeCell.tsx b/src/cells/AntdTimeCell.tsx deleted file mode 100644 index 111dda1..0000000 --- a/src/cells/AntdTimeCell.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import React from 'react'; - -import { rankWith, RankedTester, isDateTimeControl } from '../testers'; -import { withStoreToCellProps } from '../util/ContextToProps'; - -import { AntdInputDate } from '../antd-controls/AntdInputDate'; -import { CellRenderer } from './CellRenderer'; - -export const AntdTimeCell = (props: any) => { - return ; -}; - -/** - * Default tester for text-based/string controls. - * @type {RankedTester} - */ -export const antdTimeCellTester: RankedTester = rankWith(2, isDateTimeControl); - -export const AntdTimeCellWithStore = withStoreToCellProps(AntdTimeCell); diff --git a/src/cells/index.ts b/src/cells/index.ts index a85ba56..99c8aff 100644 --- a/src/cells/index.ts +++ b/src/cells/index.ts @@ -8,23 +8,30 @@ * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ import { CellRendererRegistryEntry } from '../renderers'; -import { antdBooleanCellTester, AntdBooleanCellWithStore } from './AntdBooleanCell'; -import { antdEnumCellTester, AntdEnumCellWithStore } from './AntdEnumCell'; import { + antdBooleanCellTester, + AntdBooleanCellWithStore, + antdButtonCellTester, + AntdButtonCellWithStore, + antdEnumCellTester, + AntdEnumCellWithStore, antdIntegerCellTester, AntdIntegerCellWithStore, + antdImageCellTester, + AntdImageCellWithStore, antdNumberCellTester, AntdNumberCellWithStore, -} from './AntdNumberCell'; -import { antdTextCellTester, AntdTextCellWithStore } from './AntdTextCell'; -import { antdTimeCellTester, AntdTimeCellWithStore } from './AntdTimeCell'; + antdRateCellTester, + AntdRateCellWithStore, + antdTextCellTester, + AntdTextCellWithStore, + antdTimeCellTester, + AntdTimeCellWithStore, +} from './AntdSimpleCells'; import { tinyMCECellTester, TinyMCECellWithStore } from './TinyMCECell'; -import { antdImageCellTester, AntdImageCellWithStore } from './AntdImageCell'; import { antdCellCardLayoutTester, AntdCellCardLayout } from './AntdCellCardLayout'; -import { antdHorizontalLayoutTester, AntdHorizontalLayoutRenderer } from './AntdCellHorizontalLayout'; -import { antdCellRateWidgetTester, AntdCellRateWidgetWithStore } from './AntdCellRateWidget'; +import { antdCellHorizontalLayoutTester, AntdCellHorizontalLayoutRenderer } from './AntdCellHorizontalLayout'; import { antdCellG2Tester, AntdCellG2 } from './AntdCellG2'; -import { antdButtonCellTester, AntdButtonCellWithStore } from './AntdButtonCell'; export const antdCells: CellRendererRegistryEntry[] = [ { tester: antdBooleanCellTester, cell: AntdBooleanCellWithStore }, @@ -36,15 +43,14 @@ export const antdCells: CellRendererRegistryEntry[] = [ { tester: tinyMCECellTester, cell: TinyMCECellWithStore }, { tester: antdImageCellTester, cell: AntdImageCellWithStore }, { tester: antdCellCardLayoutTester, cell: AntdCellCardLayout }, - { tester: antdHorizontalLayoutTester, cell: AntdHorizontalLayoutRenderer }, - { tester: antdCellRateWidgetTester, cell: AntdCellRateWidgetWithStore }, + { tester: antdCellHorizontalLayoutTester, cell: AntdCellHorizontalLayoutRenderer }, + { tester: antdRateCellTester, cell: AntdRateCellWithStore }, { tester: antdCellG2Tester, cell: AntdCellG2 }, { tester: antdButtonCellTester, cell: AntdButtonCellWithStore }, ]; -export * from './AntdBooleanCell'; -export * from './AntdEnumCell'; -export * from './AntdNumberCell'; -export * from './AntdTextCell'; -export * from './AntdTimeCell'; +export * from './AntdSimpleCells'; export * from './TinyMCECell'; +export * from './AntdCellCardLayout'; +export * from './AntdCellHorizontalLayout'; +export * from './AntdCellG2'; From 59b386fa16bbbb62bfc63536271cf3a1d84df3f0 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 10 Aug 2021 17:07:53 +0300 Subject: [PATCH 06/10] [refactor] GH-5 formatter spelling --- src/cells/CellRenderer.tsx | 18 +++++++++--------- src/cells/TinyMCECell.tsx | 2 +- src/controls/AntdInputControl.tsx | 14 +++++++------- ...DataFormater.tsx => StoreDataFormatter.tsx} | 2 +- src/formatters/index.ts | 4 ++-- stories/AntdCardCell.stories.tsx | 16 ++++++++-------- 6 files changed, 28 insertions(+), 28 deletions(-) rename src/formatters/{StoreDataFormater.tsx => StoreDataFormatter.tsx} (91%) diff --git a/src/cells/CellRenderer.tsx b/src/cells/CellRenderer.tsx index ea02f95..e2e82ff 100644 --- a/src/cells/CellRenderer.tsx +++ b/src/cells/CellRenderer.tsx @@ -31,17 +31,17 @@ export const CellRenderer: React.FC = ({ const [editing, setEditing] = useState(false); const [currentData, setCurrentData] = useState(props.data); const inputRef = useRef(null); - const formaterId = uiOptions.formater || 'base'; + const formatterId = uiOptions.formatter || 'base'; const query = uiOptions.query; let width = 'auto'; let editable = true; if (uiOptions.editable !== undefined) { editable = uiOptions.editable; } - if (uiOptions && formaterId === 'tinyMCE') { + if (uiOptions && formatterId === 'tinyMCE') { width = uiOptions.tinyWidth === 'emptySpace' ? '100%' : uiOptions.tinyWidth === 'content' ? 'auto' : 'auto'; } - const Formater = formatters[formaterId] || formatters['base']; + const Formatter = formatters[formatterId] || formatters['base']; useEffect(() => { if (editing && inputRef && inputRef.current) { inputRef.current.focus(); @@ -58,10 +58,10 @@ export const CellRenderer: React.FC = ({ toggleEdit(); }; const specialProps: any = {}; - if (uiOptions.dataToFormater) { - const formaterProps = uiOptions.dataToFormater; - for (const key in formaterProps) { - specialProps[key] = rowData[formaterProps[key]]; + if (uiOptions.dataToFormatter) { + const formatterProps = uiOptions.dataToFormatter; + for (const key in formatterProps) { + specialProps[key] = rowData[formatterProps[key]]; } } //console.log('RENDER', props.data); @@ -72,7 +72,7 @@ export const CellRenderer: React.FC = ({ ) : (
- = ({
) ) : ( - { */ export const tinyMCECellTester: RankedTester = rankWith( 10, - (viewElement, schema) => viewElement.options !== undefined && viewElement.options.formater === 'tinyMCE', + (viewElement, schema) => viewElement.options !== undefined && viewElement.options.formatter === 'tinyMCE', ); export const TinyMCECellWithStore = withStoreToCellProps(TinyMCECell); diff --git a/src/controls/AntdInputControl.tsx b/src/controls/AntdInputControl.tsx index b46dcd2..0464039 100644 --- a/src/controls/AntdInputControl.tsx +++ b/src/controls/AntdInputControl.tsx @@ -37,16 +37,16 @@ export const AntdInputControl: React.FC = (props) const appliedUiSchemaOptions: any = {}; const InnerComponent = input; - const formaterId = uiOptions.formater || 'base'; + const formatterId = uiOptions.formatter || 'base'; const query = uiOptions.query; const specialProps: any = {}; - if (uiOptions.dataToFormater) { - const formaterProps = uiOptions.dataToFormater; - for (const key in formaterProps) { - specialProps[key] = formData[formaterProps[key]]; + if (uiOptions.dataToFormatter) { + const formatterProps = uiOptions.dataToFormatter; + for (const key in formatterProps) { + specialProps[key] = formData[formatterProps[key]]; } } - const Formater = formatters[formaterId] || formatters['base']; + const Formatter = formatters[formatterId] || formatters['base']; return form ? ( = (props) visible={visible} /> ) : ( - + )} ) : ( diff --git a/src/formatters/StoreDataFormater.tsx b/src/formatters/StoreDataFormatter.tsx similarity index 91% rename from src/formatters/StoreDataFormater.tsx rename to src/formatters/StoreDataFormatter.tsx index 98b8796..0a97dd6 100644 --- a/src/formatters/StoreDataFormater.tsx +++ b/src/formatters/StoreDataFormatter.tsx @@ -13,7 +13,7 @@ import { observer } from 'mobx-react-lite'; import { MstContext } from '../MstContext'; -export const StoreDataFormater: any = observer(({ value, query, propKey }: any) => { +export const StoreDataFormatter: any = observer(({ value, query, propKey }: any) => { const { store } = useContext(MstContext); const coll = store.getColl(query); let data = coll?.data; diff --git a/src/formatters/index.ts b/src/formatters/index.ts index a02a5aa..9649871 100644 --- a/src/formatters/index.ts +++ b/src/formatters/index.ts @@ -20,7 +20,7 @@ import { labeledValue, сomparison, } from './baseFormatters'; -import { StoreDataFormater } from './StoreDataFormater'; +import { StoreDataFormatter } from './StoreDataFormatter'; import { TinyMCE } from './tinyMCE'; export const formatters: JsObject = { @@ -32,7 +32,7 @@ export const formatters: JsObject = { integer, link, tinyMCE: TinyMCE, - dataFormater: StoreDataFormater, + dataFormatter: StoreDataFormatter, labeledValue, сomparison, }; diff --git a/stories/AntdCardCell.stories.tsx b/stories/AntdCardCell.stories.tsx index e388215..4358d1f 100644 --- a/stories/AntdCardCell.stories.tsx +++ b/stories/AntdCardCell.stories.tsx @@ -110,7 +110,7 @@ const viewKinds = [ type: 'Control', scope: 'price', options: { - formater: 'labeledValue', + formatter: 'labeledValue', editable: false, label: 'Цена', specialChar: '₽', @@ -125,7 +125,7 @@ const viewKinds = [ type: 'Control', scope: 'totalSales', options: { - formater: 'labeledValue', + formatter: 'labeledValue', editable: false, label: 'Всего продано', style: { @@ -142,8 +142,8 @@ const viewKinds = [ scope: 'lastMonthSalesAmount', options: { editable: false, - formater: 'сomparison', - dataToFormater: { + formatter: 'сomparison', + dataToFormatter: { prevValue: 'prevMonthSalesAmount', }, label: 'Продажи за месяц', @@ -158,9 +158,9 @@ const viewKinds = [ type: 'Control', scope: 'lastMonthSalesValue', options: { - formater: 'сomparison', + formatter: 'сomparison', editable: false, - dataToFormater: { + dataToFormatter: { prevValue: 'prevMonthSalesValue', }, label: 'Объем продаж', @@ -195,8 +195,8 @@ const viewKinds = [ }, specialImage: 'https://www.meme-arsenal.com/memes/f8e9bfb9fdf368272b21a5dac8f01ec1.jpg', editable: false, - formater: 'link', - dataToFormater: { + formatter: 'link', + dataToFormatter: { link: '@id', }, label: 'Wildberries', From 1b48f468b559735f83d4a310031a3efdd6144fd6 Mon Sep 17 00:00:00 2001 From: Alexey Date: Sat, 14 Aug 2021 16:29:39 +0300 Subject: [PATCH 07/10] [deps] GH-5 Update deps --- .vscode/settings.json | 2 + package.json | 32 +- yarn.lock | 1300 ++++++++++++----------------------------- 3 files changed, 387 insertions(+), 947 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c24dad8..af97640 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,8 @@ "prettier.endOfLine": "lf", "jest.autoRun": "off", "cSpell.words": [ + "A", + "Aртефакт", "Constrs", "Descr", "Descrs", diff --git a/package.json b/package.json index d6a0f57..5677cff 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@agentlab/sparql-jsld-client": ">=5.0.0-rc.9", "@ant-design/icons": ">=4.6.2", "@tinymce/tinymce-react": ">=3.12.6", - "antd": ">=4.16.10", + "antd": ">=4.16.11", "history": ">=5.0.0", "lodash-es": ">=4.17.21", "mobx": ">=6.3.2", @@ -75,13 +75,13 @@ "@agentlab/sparql-jsld-client": "^5.0.0-rc.9", "@ant-design/icons": "^4.6.2", "@tinymce/tinymce-react": "^3.12.6", - "@types/react": "^17.0.16", + "@types/react": "^17.0.17", "@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.10", + "antd": "^4.16.11", "history": "^5.0.0", "mobx-react-lite": "^3.2.0", "mst-middlewares": "^5.0.2", @@ -104,20 +104,20 @@ "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-typescript": "^8.2.5", - "@storybook/addon-actions": "^6.3.6", - "@storybook/addon-essentials": "^6.3.6", - "@storybook/addon-links": "^6.3.6", - "@storybook/addons": "^6.3.6", - "@storybook/node-logger": "^6.3.6", + "@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/preset-ant-design": "^0.0.2", "@storybook/preset-scss": "^1.0.3", - "@storybook/react": "^6.3.6", + "@storybook/react": "^6.3.7", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^12.0.0", "@testing-library/user-event": "^13.2.1", - "@types/jest": "^26.0.24", - "@typescript-eslint/eslint-plugin": "^4.29.0", - "@typescript-eslint/parser": "^4.29.0", + "@types/jest": "^27.0.1", + "@typescript-eslint/eslint-plugin": "^4.29.1", + "@typescript-eslint/parser": "^4.29.1", "autoprefixer": "^10.3.1", "babel-loader": "^8.2.2", "cross-env": "^7.0.3", @@ -126,7 +126,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-config-react-app": "^6.0.0", "eslint-plugin-flowtype": "^5.9.0", - "eslint-plugin-import": "^2.23.4", + "eslint-plugin-import": "^2.24.0", "eslint-plugin-jest": "^24.4.0", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-prettier": "^3.4.0", @@ -139,17 +139,17 @@ "prettier": "^2.3.2", "postcss": "^8.3.6", "rimraf": "^3.0.2", - "rollup": "^2.56.0", + "rollup": "^2.56.2", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-peer-deps-external": "^2.2.4", - "rollup-plugin-postcss": "^4.0.0", + "rollup-plugin-postcss": "^4.0.1", "rollup-plugin-terser": "^7.0.2", "sass": "^1.32.12", "sass-loader": "10.1.1", "storybook-css-modules-preset": "^1.1.1", "style-loader": "^2.0.0", "ts-jest": "^27.0.4", - "tslib": "^2.3.0", + "tslib": "^2.3.1", "typescript": "4.3.5", "typescript-plugin-css-modules": "^3.4.0" }, diff --git a/yarn.lock b/yarn.lock index dc9571a..7b9a4f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1723,17 +1723,17 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@storybook/addon-actions@6.3.6", "@storybook/addon-actions@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.3.6.tgz#691d61d6aca9c4b3edba50c531cbe4d4139ed451" - integrity sha512-1MBqCbFiupGEDyIXqFkzF4iR8AduuB7qSNduqtsFauvIkrG5bnlbg5JC7WjnixkCaaWlufgbpasEHioXO9EXGw== - dependencies: - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/theming" "6.3.6" +"@storybook/addon-actions@6.3.7", "@storybook/addon-actions@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.3.7.tgz#b25434972bef351aceb3f7ec6fd66e210f256aac" + integrity sha512-CEAmztbVt47Gw1o6Iw0VP20tuvISCEKk9CS/rCjHtb4ubby6+j/bkp3pkEUQIbyLdHiLWFMz0ZJdyA/U6T6jCw== + dependencies: + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" @@ -1746,17 +1746,17 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" -"@storybook/addon-backgrounds@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.3.6.tgz#93128e6ebfcb953a83cc2165056dd5815d32cef2" - integrity sha512-1lBVAem2M+ggb1UNVgB7/56LaQAor9lI8q0xtQdAzAkt9K4RbbOsLGRhyUm3QH5OiB3qHHG5WQBujWUD6Qfy4g== - dependencies: - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/theming" "6.3.6" +"@storybook/addon-backgrounds@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.3.7.tgz#b8ed464cf1000f77678570912640972c74129a2e" + integrity sha512-NH95pDNILgCXeegbckG+P3zxT5SPmgkAq29P+e3gX7YBOTc6885YCFMJLFpuDMwW4lA0ovXosp4PaUHLsBnLDg== + dependencies: + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" @@ -1764,24 +1764,24 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-controls@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.3.6.tgz#2f8071e5b521375aace60af96e33a19f016581c9" - integrity sha512-wTWmnZl2qEAUqgLh8a7TL5f6w37Q51lAoJNlwxFFBSKtGS7xFUnou4qTUArNy5iKu1cWoVvofJ9RnP1maGByYA== - dependencies: - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/node-logger" "6.3.6" - "@storybook/theming" "6.3.6" +"@storybook/addon-controls@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.3.7.tgz#ac8fa5ec055f09fd5187998358b5188fed54a528" + integrity sha512-VHOv5XZ0MQ45k6X7AUrMIxGkm7sgIiPwsvajnoeMe7UwS3ngbTb0Q0raLqI/L5jLM/jyQwfpUO9isA6cztGTEQ== + dependencies: + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/node-logger" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" ts-dedent "^2.0.0" -"@storybook/addon-docs@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.3.6.tgz#85b8a72b91f9c43edfaf21c416a9b01ad0e06ea4" - integrity sha512-/ZPB9u3lfc6ZUrgt9HENU1BxAHNfTbh9r2LictQ8o9gYE/BqvZutl2zqilTpVuutQtTgQ6JycVhxtpk9+TDcuA== +"@storybook/addon-docs@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.3.7.tgz#a7b8ff2c0baf85fc9cc1b3d71f481ec40499f3cc" + integrity sha512-cyuyoLuB5ELhbrXgnZneDCHqNq1wSdWZ4dzdHy1E5WwLPEhLlD6INfEsm8gnDIb4IncYuzMhK3XYBDd7d3ijOg== dependencies: "@babel/core" "^7.12.10" "@babel/generator" "^7.12.11" @@ -1792,20 +1792,20 @@ "@mdx-js/loader" "^1.6.22" "@mdx-js/mdx" "^1.6.22" "@mdx-js/react" "^1.6.22" - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/builder-webpack4" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/builder-webpack4" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core" "6.3.7" + "@storybook/core-events" "6.3.7" "@storybook/csf" "0.0.1" - "@storybook/csf-tools" "6.3.6" - "@storybook/node-logger" "6.3.6" - "@storybook/postinstall" "6.3.6" - "@storybook/source-loader" "6.3.6" - "@storybook/theming" "6.3.6" + "@storybook/csf-tools" "6.3.7" + "@storybook/node-logger" "6.3.7" + "@storybook/postinstall" "6.3.7" + "@storybook/source-loader" "6.3.7" + "@storybook/theming" "6.3.7" acorn "^7.4.1" acorn-jsx "^5.3.1" acorn-walk "^7.2.0" @@ -1828,36 +1828,36 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-essentials@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.3.6.tgz#29f5249daee086fe2d14c899ae61712b8c8fbcbd" - integrity sha512-FUrpCeINaN4L9L81FswtQFEq2xLwj3W7EyhmqsZcYSr64nscpQyjlPVjs5zhrEanOGIf+4E+mBmWafxbYufXwQ== +"@storybook/addon-essentials@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.3.7.tgz#5af605ab705e938c5b25a7e19daa26e5924fd4e4" + integrity sha512-ZWAW3qMFrrpfSekmCZibp/ivnohFLJdJweiIA0CLnuCNuuK9kQdpFahWdvyBy5NlCj3UJwB7epTZYZyHqYW7UQ== dependencies: - "@storybook/addon-actions" "6.3.6" - "@storybook/addon-backgrounds" "6.3.6" - "@storybook/addon-controls" "6.3.6" - "@storybook/addon-docs" "6.3.6" + "@storybook/addon-actions" "6.3.7" + "@storybook/addon-backgrounds" "6.3.7" + "@storybook/addon-controls" "6.3.7" + "@storybook/addon-docs" "6.3.7" "@storybook/addon-measure" "^2.0.0" - "@storybook/addon-toolbars" "6.3.6" - "@storybook/addon-viewport" "6.3.6" - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/node-logger" "6.3.6" + "@storybook/addon-toolbars" "6.3.7" + "@storybook/addon-viewport" "6.3.7" + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/node-logger" "6.3.7" core-js "^3.8.2" regenerator-runtime "^0.13.7" storybook-addon-outline "^1.4.1" ts-dedent "^2.0.0" -"@storybook/addon-links@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.3.6.tgz#dc410d5b4a0d222b6b8d0ef03da7a4c16919c092" - integrity sha512-PaeAJTjwtPlhrLZlaSQ1YIFA8V0C1yI0dc351lPbTiE7fJ7DwTE03K6xIF/jEdTo+xzhi2PM1Fgvi/SsSecI8w== +"@storybook/addon-links@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.3.7.tgz#f273abba6d056794a4aa920b2fa9639136e6747f" + integrity sha512-/8Gq18o1DejP3Om0ZOJRkMzW5FoHqoAmR0pFx4DipmNu5lYy7V3krLw4jW4qja1MuQkZ53MGh08FJOoAc2RZvQ== dependencies: - "@storybook/addons" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" "@storybook/csf" "0.0.1" - "@storybook/router" "6.3.6" + "@storybook/router" "6.3.7" "@types/qs" "^6.9.5" core-js "^3.8.2" global "^4.4.0" @@ -1871,47 +1871,47 @@ resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-2.0.0.tgz#c40bbe91bacd3f795963dc1ee6ff86be87deeda9" integrity sha512-ZhdT++cX+L9LwjhGYggvYUUVQH/MGn2rwbrAwCMzA/f2QTFvkjxzX8nDgMxIhaLCDC+gHIxfJG2wrWN0jkBr3g== -"@storybook/addon-toolbars@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.3.6.tgz#41f5f29988260d2aad9431b7a91f57e848c3e0bf" - integrity sha512-VpwkMtvT/4KNjqdO2SCkFw4koMgYN2k8hckbTGRzuUYYTHBvl9yK4q0A7RELEnkm/tsmDI1TjenV/MBifp2Aiw== +"@storybook/addon-toolbars@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.3.7.tgz#acd0c9eea7fad056d995a821e34abddd5b065b9b" + integrity sha512-UTIurbl2WXj/jSOj7ndqQ/WtG7kSpGp62T7gwEZTZ+h/3sJn+bixofBD/7+sXa4hWW07YgTXV547DMhzp5bygg== dependencies: - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/theming" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" regenerator-runtime "^0.13.7" -"@storybook/addon-viewport@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.3.6.tgz#9117316e918559d389a19571166579858b25b09b" - integrity sha512-Z5eztFFGd6vd+38sDurfTkIr9lY6EYWtMJzr5efedRZGg2IZLXZxQCoyjKEB29VB/IIjHEYHhHSh4SFsHT/m6g== - dependencies: - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/theming" "6.3.6" +"@storybook/addon-viewport@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.3.7.tgz#4dc5007e6c8e4d095814c34234429fe889e4014d" + integrity sha512-Hdv2QoVVfe/YuMVQKVVnfCCuEoTqTa8Ck7AOKz31VSAliBFhXewP51oKhw9F6mTyvCozMHX6EBtBzN06KyrPyw== + dependencies: + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" prop-types "^15.7.2" regenerator-runtime "^0.13.7" -"@storybook/addons@6.3.6", "@storybook/addons@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.3.6.tgz#330fd722bdae8abefeb029583e89e51e62c20b60" - integrity sha512-tVV0vqaEEN9Md4bgScwfrnZYkN8iKZarpkIOFheLev+PHjSp8lgWMK5SNWDlbBYqfQfzrz9xbs+F07bMjfx9jQ== - dependencies: - "@storybook/api" "6.3.6" - "@storybook/channels" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/router" "6.3.6" - "@storybook/theming" "6.3.6" +"@storybook/addons@6.3.7", "@storybook/addons@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.3.7.tgz#7c6b8d11b65f67b1884f6140437fe996dc39537a" + integrity sha512-9stVjTcc52bqqh7YQex/LpSjJ4e2Czm4/ZYDjIiNy0p4OZEx+yLhL5mZzMWh2NQd6vv+pHASBSxf2IeaR5511A== + dependencies: + "@storybook/api" "6.3.7" + "@storybook/channels" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/router" "6.3.7" + "@storybook/theming" "6.3.7" core-js "^3.8.2" global "^4.4.0" regenerator-runtime "^0.13.7" @@ -1957,19 +1957,19 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/api@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.3.6.tgz#b110688ae0a970c9443d47b87616a09456f3708e" - integrity sha512-F5VuR1FrEwD51OO/EDDAZXNfF5XmJedYHJLwwCB4az2ZMrzG45TxGRmiEohrSTO6wAHGkAvjlEoX5jWOCqQ4pw== +"@storybook/api@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.3.7.tgz#88b8a51422cd0739c91bde0b1d65fb6d8a8485d0" + integrity sha512-57al8mxmE9agXZGo8syRQ8UhvGnDC9zkuwkBPXchESYYVkm3Mc54RTvdAOYDiy85VS4JxiGOywHayCaRwgUddQ== dependencies: "@reach/router" "^1.3.4" - "@storybook/channels" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/channels" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" "@storybook/csf" "0.0.1" - "@storybook/router" "6.3.6" + "@storybook/router" "6.3.7" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.3.6" + "@storybook/theming" "6.3.7" "@types/reach__router" "^1.3.7" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -1983,10 +1983,10 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/builder-webpack4@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.3.6.tgz#fe444abfc178e005ea077e2bcfd6ae7509522908" - integrity sha512-LhTPQQowS2t6BRnyfusWZLbhjjf54/HiQyovJTTDnqrCiO6QoCMbVnp79LeO1aSkpQCKoeqOZ7TzH87fCytnZA== +"@storybook/builder-webpack4@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.3.7.tgz#1cc1a1184043be3f6ef840d0b43ba91a803105e2" + integrity sha512-M5envblMzAUrNqP1+ouKiL8iSIW/90+kBRU2QeWlZoZl1ib+fiFoKk06cgbaC70Bx1lU8nOnI/VBvB5pLhXLaw== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -2009,20 +2009,20 @@ "@babel/preset-env" "^7.12.11" "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/channel-postmessage" "6.3.6" - "@storybook/channels" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core-common" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/node-logger" "6.3.6" - "@storybook/router" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/channel-postmessage" "6.3.7" + "@storybook/channels" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core-common" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/node-logger" "6.3.7" + "@storybook/router" "6.3.7" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.3.6" - "@storybook/ui" "6.3.6" + "@storybook/theming" "6.3.7" + "@storybook/ui" "6.3.7" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" autoprefixer "^9.8.6" @@ -2059,14 +2059,14 @@ webpack-hot-middleware "^2.25.0" webpack-virtual-modules "^0.2.2" -"@storybook/channel-postmessage@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.3.6.tgz#f29c3678161462428e78c9cfed2da11ffca4acb0" - integrity sha512-GK7hXnaa+1pxEeMpREDzAZ3+2+k1KN1lbrZf+V7Kc1JZv1/Ji/vxk8AgxwiuzPAMx5J0yh/FduPscIPZ87Pibw== +"@storybook/channel-postmessage@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.3.7.tgz#bd4edf84a29aa2cd4a22d26115c60194d289a840" + integrity sha512-Cmw8HRkeSF1yUFLfEIUIkUICyCXX8x5Ol/5QPbiW9HPE2hbZtYROCcg4bmWqdq59N0Tp9FQNSn+9ZygPgqQtNw== dependencies: - "@storybook/channels" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/channels" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" core-js "^3.8.2" global "^4.4.0" qs "^6.10.0" @@ -2081,25 +2081,25 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/channels@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.3.6.tgz#a258764ed78fd836ff90489ae74ac055312bf056" - integrity sha512-gCIQVr+dS/tg3AyCxIvkOXMVAs08BCIHXsaa2+XzmacnJBSP+CEHtI6IZ8WEv7tzZuXOiKLVg+wugeIh4j2I4g== +"@storybook/channels@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.3.7.tgz#85ed5925522b802d959810f78d37aacde7fea66e" + integrity sha512-aErXO+SRO8MPp2wOkT2n9d0fby+8yM35tq1tI633B4eQsM74EykbXPv7EamrYPqp1AI4BdiloyEpr0hmr2zlvg== dependencies: core-js "^3.8.2" ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.3.6.tgz#4826ce366ae109f608da6ade24b29efeb9b7f7dd" - integrity sha512-Q/bWuH691L6k7xkiKtBmZo8C+ijgmQ+vc2Fz8pzIRZuMV8ROL74qhrS4BMKV4LhiYm4f8todtWfaQPBjawZMIA== +"@storybook/client-api@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.3.7.tgz#cb1dca05467d777bd09aadbbdd1dd22ca537ce14" + integrity sha512-8wOH19cMIwIIYhZy5O5Wl8JT1QOL5kNuamp9GPmg5ff4DtnG+/uUslskRvsnKyjPvl+WbIlZtBVWBiawVdd/yQ== dependencies: - "@storybook/addons" "6.3.6" - "@storybook/channel-postmessage" "6.3.6" - "@storybook/channels" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/channel-postmessage" "6.3.7" + "@storybook/channels" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" "@storybook/csf" "0.0.1" "@types/qs" "^6.9.5" "@types/webpack-env" "^1.16.0" @@ -2122,23 +2122,23 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/client-logger@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.3.6.tgz#020ba518ab8286194ce103a6ff91767042e296c0" - integrity sha512-qpXQ52ylxPm7l3+WAteV42NmqWA+L1FaJhMOvm2gwl3PxRd2cNXn2BwEhw++eA6qmJH/7mfOKXG+K+QQwOTpRA== +"@storybook/client-logger@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.3.7.tgz#ff17b7494e7e9e23089b0d5c5364c371c726bdd1" + integrity sha512-BQRErHE3nIEuUJN/3S3dO1LzxAknOgrFeZLd4UVcH/fvjtS1F4EkhcbH+jNyUWvcWGv66PZYN0oFPEn/g3Savg== dependencies: core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.3.6.tgz#bc2fa1dbe59f42b5b2aeb9f84424072835d4ce8b" - integrity sha512-aZkmtAY8b+LFXG6dVp6cTS6zGJuxkHRHcesRSWRQPxtgitaz1G58clRHxbKPRokfjPHNgYA3snogyeqxSA7YNQ== +"@storybook/components@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.3.7.tgz#42b1ca6d24e388e02eab82aa9ed3365db2266ecc" + integrity sha512-O7LIg9Z18G0AJqXX7Shcj0uHqwXlSA5UkHgaz9A7mqqqJNl6m6FwwTWcxR1acUfYVNkO+czgpqZHNrOF6rky1A== dependencies: "@popperjs/core" "^2.6.0" - "@storybook/client-logger" "6.3.6" + "@storybook/client-logger" "6.3.7" "@storybook/csf" "0.0.1" - "@storybook/theming" "6.3.6" + "@storybook/theming" "6.3.7" "@types/color-convert" "^2.0.0" "@types/overlayscrollbars" "^1.12.0" "@types/react-syntax-highlighter" "11.0.5" @@ -2190,18 +2190,18 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/core-client@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.3.6.tgz#7def721aa15d4faaff574780d30b92055db7261c" - integrity sha512-Bq86flEdXdMNbdHrGMNQ6OT1tcBQU8ym56d+nG46Ctjf5GN+Dl+rPtRWuu7cIZs10KgqJH+86DXp+tvpQIDidg== +"@storybook/core-client@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.3.7.tgz#cfb75952e0e1d32f2aca92bca2786334ab589c40" + integrity sha512-M/4A65yV+Y4lsCQXX4BtQO/i3BcMPrU5FkDG8qJd3dkcx2fUlFvGWqQPkcTZE+MPVvMEGl/AsEZSADzah9+dAg== dependencies: - "@storybook/addons" "6.3.6" - "@storybook/channel-postmessage" "6.3.6" - "@storybook/client-api" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/core-events" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/channel-postmessage" "6.3.7" + "@storybook/client-api" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/core-events" "6.3.7" "@storybook/csf" "0.0.1" - "@storybook/ui" "6.3.6" + "@storybook/ui" "6.3.7" airbnb-js-shims "^2.2.1" ansi-to-html "^0.6.11" core-js "^3.8.2" @@ -2213,10 +2213,10 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" -"@storybook/core-common@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.3.6.tgz#da8eed703b609968e15177446f0f1609d1d6d0d0" - integrity sha512-nHolFOmTPymI50j180bCtcf1UJZ2eOnYaECRtHvVrCUod5KFF7wh2EHrgWoKqrKrsn84UOY/LkX2C2WkbYtWRg== +"@storybook/core-common@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.3.7.tgz#9eedf3ff16aff870950e3372ab71ef846fa3ac52" + integrity sha512-exLoqRPPsAefwyjbsQBLNFrlPCcv69Q/pclqmIm7FqAPR7f3CKP1rqsHY0PnemizTL/+cLX5S7mY90gI6wpNug== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -2239,7 +2239,7 @@ "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" "@babel/register" "^7.12.1" - "@storybook/node-logger" "6.3.6" + "@storybook/node-logger" "6.3.7" "@storybook/semver" "^7.3.2" "@types/glob-base" "^0.3.0" "@types/micromatch" "^4.0.1" @@ -2274,24 +2274,24 @@ dependencies: core-js "^3.8.2" -"@storybook/core-events@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.3.6.tgz#c4a09e2c703170995604d63e46e45adc3c9cd759" - integrity sha512-Ut1dz96bJ939oSn5t1ckPXd3WcFejK96Sb3+R/z23vEHUWGBFtygGyw8r/SX/WNDVzGmQU8c+mzJJTZwCBJz8A== +"@storybook/core-events@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.3.7.tgz#c5bc7cae7dc295de73b6b9f671ecbe582582e9bd" + integrity sha512-l5Hlhe+C/dqxjobemZ6DWBhTOhQoFF3F1Y4kjFGE7pGZl/mas4M72I5I/FUcYCmbk2fbLfZX8hzKkUqS1hdyLA== dependencies: core-js "^3.8.2" -"@storybook/core-server@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.3.6.tgz#43c1415573c3b72ec6b9ae48d68e1bb446722f7c" - integrity sha512-47ZcfxYn7t891oAMG98iH1BQIgQT9Yk/2BBNVCWY43Ong+ME1xJ6j4C/jkRUOseP7URlfLUQsUYKAYJNVijDvg== - dependencies: - "@storybook/builder-webpack4" "6.3.6" - "@storybook/core-client" "6.3.6" - "@storybook/core-common" "6.3.6" - "@storybook/csf-tools" "6.3.6" - "@storybook/manager-webpack4" "6.3.6" - "@storybook/node-logger" "6.3.6" +"@storybook/core-server@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.3.7.tgz#6f29ad720aafe4a97247b5e306eac4174d0931f2" + integrity sha512-m5OPD/rmZA7KFewkXzXD46/i1ngUoFO4LWOiAY/wR6RQGjYXGMhSa5UYFF6MNwSbiGS5YieHkR5crB1HP47AhQ== + dependencies: + "@storybook/builder-webpack4" "6.3.7" + "@storybook/core-client" "6.3.7" + "@storybook/core-common" "6.3.7" + "@storybook/csf-tools" "6.3.7" + "@storybook/manager-webpack4" "6.3.7" + "@storybook/node-logger" "6.3.7" "@storybook/semver" "^7.3.2" "@types/node" "^14.0.10" "@types/node-fetch" "^2.5.7" @@ -2320,18 +2320,18 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.3.6.tgz#604419d346433103675901b3736bfa1ed9bc534f" - integrity sha512-y71VvVEbqCpG28fDBnfNg3RnUPnicwFYq9yuoFVRF0LYcJCy5cYhkIfW3JG8mN2m0P+LzH80mt2Rj6xlSXrkdQ== +"@storybook/core@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.3.7.tgz#482228a270abc3e23fed10c7bc4df674da22ca19" + integrity sha512-YTVLPXqgyBg7TALNxQ+cd+GtCm/NFjxr/qQ1mss1T9GCMR0IjE0d0trgOVHHLAO8jCVlK8DeuqZCCgZFTXulRw== dependencies: - "@storybook/core-client" "6.3.6" - "@storybook/core-server" "6.3.6" + "@storybook/core-client" "6.3.7" + "@storybook/core-server" "6.3.7" -"@storybook/csf-tools@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.3.6.tgz#603d9e832f946998b75ff8368fe862375d6cb52c" - integrity sha512-MQevelkEUVNCSjKMXLNc/G8q/BB5babPnSeI0IcJq4k+kLUSHtviimLNpPowMgGJBPx/y9VihH8N7vdJUWVj9w== +"@storybook/csf-tools@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.3.7.tgz#505514d211f8698c47ddb15662442098b4b00156" + integrity sha512-A7yGsrYwh+vwVpmG8dHpEimX021RbZd9VzoREcILH56u8atssdh/rseljyWlRes3Sr4QgtLvDB7ggoJ+XDZH7w== dependencies: "@babel/generator" "^7.12.11" "@babel/parser" "^7.12.11" @@ -2355,20 +2355,20 @@ dependencies: lodash "^4.17.15" -"@storybook/manager-webpack4@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.3.6.tgz#a5334aa7ae1e048bca8f4daf868925d7054fb715" - integrity sha512-qh/jV4b6mFRpRFfhk1JSyO2gKRz8PLPvDt2AD52/bTAtNRzypKoiWqyZNR2CJ9hgNQtDrk2CO3eKPrcdKYGizQ== +"@storybook/manager-webpack4@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.3.7.tgz#9ca604dea38d3c47eb38bf485ca6107861280aa8" + integrity sha512-cwUdO3oklEtx6y+ZOl2zHvflICK85emiXBQGgRcCsnwWQRBZOMh+tCgOSZj4jmISVpT52RtT9woG4jKe15KBig== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.3.6" - "@storybook/core-client" "6.3.6" - "@storybook/core-common" "6.3.6" - "@storybook/node-logger" "6.3.6" - "@storybook/theming" "6.3.6" - "@storybook/ui" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/core-client" "6.3.7" + "@storybook/core-common" "6.3.7" + "@storybook/node-logger" "6.3.7" + "@storybook/theming" "6.3.7" + "@storybook/ui" "6.3.7" "@types/node" "^14.0.10" "@types/webpack" "^4.41.26" babel-loader "^8.2.2" @@ -2398,10 +2398,10 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" -"@storybook/node-logger@6.3.6", "@storybook/node-logger@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.3.6.tgz#10356608593440a8e3acf2aababef40333a3401b" - integrity sha512-XMDkMN7nVRojjiezrURlkI57+nz3OoH4UBV6qJZICKclxtdKAy0wwOlUSYEUq+axcJ4nvdfzPPoDfGoj37SW7A== +"@storybook/node-logger@6.3.7", "@storybook/node-logger@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.3.7.tgz#492469ea4749de8d984af144976961589a1ac382" + integrity sha512-YXHCblruRe6HcNefDOpuXJoaybHnnSryIVP9Z+gDv6OgLAMkyxccTIaQL9dbc/eI4ywgzAz4kD8t1RfVwXNVXw== dependencies: "@types/npmlog" "^4.1.2" chalk "^4.1.0" @@ -2409,10 +2409,10 @@ npmlog "^4.1.2" pretty-hrtime "^1.0.3" -"@storybook/postinstall@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.3.6.tgz#fd79a6c109b38ced4b9b40db2d27b88ee184d449" - integrity sha512-90Izr8/GwLiXvdF2A3v1PCpWoxUBgqA0TrWGuiWXfJnfFRVlVrX9A/ClGUPSh80L3oE01E6raaOG4wW4JTRKfw== +"@storybook/postinstall@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.3.7.tgz#7d90c06131382a3cf1550a1f2c70df13b220d9d3" + integrity sha512-HgTj7WdWo2cXrGfEhi5XYZA+G4vIzECtJHK22GEL9QxJth60Ah/dE94VqpTlyhSpzP74ZFUgr92+pP9o+j3CCw== dependencies: core-js "^3.8.2" @@ -2445,18 +2445,18 @@ react-docgen-typescript "^2.0.0" tslib "^2.0.0" -"@storybook/react@^6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.3.6.tgz#593bc0743ad22ed5e6e072e6157c20c704864fc3" - integrity sha512-2c30XTe7WzKnvgHBGOp1dzBVlhcbc3oEX0SIeVE9ZYkLvRPF+J1jG948a26iqOCOgRAW13Bele37mG1gbl4tiw== +"@storybook/react@^6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.3.7.tgz#b15259aeb4cdeef99cc7f09d21db42e3ecd7a01a" + integrity sha512-4S0iCQIzgi6PdAtV2sYw4uL57yIwbMInNFSux9CxPnVdlxOxCJ+U8IgTxD4tjkTvR4boYSEvEle46ns/bwg5iQ== dependencies: "@babel/preset-flow" "^7.12.1" "@babel/preset-react" "^7.12.10" "@pmmmwh/react-refresh-webpack-plugin" "^0.4.3" - "@storybook/addons" "6.3.6" - "@storybook/core" "6.3.6" - "@storybook/core-common" "6.3.6" - "@storybook/node-logger" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/core" "6.3.7" + "@storybook/core-common" "6.3.7" + "@storybook/node-logger" "6.3.7" "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.253f8c1.0" "@storybook/semver" "^7.3.2" "@types/webpack-env" "^1.16.0" @@ -2490,13 +2490,13 @@ qs "^6.10.0" ts-dedent "^2.0.0" -"@storybook/router@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.3.6.tgz#cea20d64bae17397dc9e1689a656b80a98674c34" - integrity sha512-fQ1n7cm7lPFav7I+fStQciSVMlNdU+yLY6Fue252rpV5Q68bMTjwKpjO9P2/Y3CCj4QD3dPqwEkn4s0qUn5tNA== +"@storybook/router@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.3.7.tgz#1714a99a58a7b9f08b6fcfe2b678dad6ca896736" + integrity sha512-6tthN8op7H0NoYoE1SkQFJKC42pC4tGaoPn7kEql8XGeUJnxPtVFjrnywlTrRnKuxZKIvbilQBAwDml97XH23Q== dependencies: "@reach/router" "^1.3.4" - "@storybook/client-logger" "6.3.6" + "@storybook/client-logger" "6.3.7" "@types/reach__router" "^1.3.7" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -2514,13 +2514,13 @@ core-js "^3.6.5" find-up "^4.1.0" -"@storybook/source-loader@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.3.6.tgz#2d3d01919baad7a40f67d1150c74e41dea5f1d4c" - integrity sha512-om3iS3a+D287FzBrbXB/IXB6Z5Ql2yc4dFKTy6FPe5v4N3U0p5puWOKUYWWbTX1JbcpRj0IXXo7952G68tcC1g== +"@storybook/source-loader@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.3.7.tgz#cc348305df3c2d8d716c0bab7830c9f537b859ff" + integrity sha512-0xQTq90jwx7W7MJn/idEBCGPOyxi/3No5j+5YdfJsSGJRuMFH3jt6pGgdeZ4XA01cmmIX6bZ+fB9al6yAzs91w== dependencies: - "@storybook/addons" "6.3.6" - "@storybook/client-logger" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/client-logger" "6.3.7" "@storybook/csf" "0.0.1" core-js "^3.8.2" estraverse "^5.2.0" @@ -2548,15 +2548,15 @@ resolve-from "^5.0.0" ts-dedent "^2.0.0" -"@storybook/theming@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.3.6.tgz#75624f6d4e01530b87afca3eab9996a16c0370ab" - integrity sha512-mPrQrMUREajNEWxzgR8t0YIZsI9avPv25VNA08fANnwVsc887p4OL5eCTL2dFIlD34YDzAwiyRKYoLj2vDW4nw== +"@storybook/theming@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.3.7.tgz#6daf9a21b26ed607f3c28a82acd90c0248e76d8b" + integrity sha512-GXBdw18JJd5jLLcRonAZWvGGdwEXByxF1IFNDSOYCcpHWsMgTk4XoLjceu9MpXET04pVX51LbVPLCvMdggoohg== dependencies: "@emotion/core" "^10.1.1" "@emotion/is-prop-valid" "^0.8.6" "@emotion/styled" "^10.0.27" - "@storybook/client-logger" "6.3.6" + "@storybook/client-logger" "6.3.7" core-js "^3.8.2" deep-object-diff "^1.1.0" emotion-theming "^10.0.27" @@ -2566,21 +2566,21 @@ resolve-from "^5.0.0" ts-dedent "^2.0.0" -"@storybook/ui@6.3.6": - version "6.3.6" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.3.6.tgz#a9ed8265e34bb8ef9f0dd08f40170b3dcf8a8931" - integrity sha512-S9FjISUiAmbBR7d6ubUEcELQdffDfRxerloxkXs5Ou7n8fEPqpgQB01Hw5MLRUwTEpxPzHn+xtIGYritAGxt/Q== +"@storybook/ui@6.3.7": + version "6.3.7" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.3.7.tgz#d0caea50640670da3189bbbb67c43da30c90455a" + integrity sha512-PBeRO8qtwAbtHvxUgNtz/ChUR6qnN+R37dMaIs3Y96jbks1fS2K9Mt7W5s1HnUbWbg2KsZMv9D4VYPBasY+Isw== dependencies: "@emotion/core" "^10.1.1" - "@storybook/addons" "6.3.6" - "@storybook/api" "6.3.6" - "@storybook/channels" "6.3.6" - "@storybook/client-logger" "6.3.6" - "@storybook/components" "6.3.6" - "@storybook/core-events" "6.3.6" - "@storybook/router" "6.3.6" + "@storybook/addons" "6.3.7" + "@storybook/api" "6.3.7" + "@storybook/channels" "6.3.7" + "@storybook/client-logger" "6.3.7" + "@storybook/components" "6.3.7" + "@storybook/core-events" "6.3.7" + "@storybook/router" "6.3.7" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.3.6" + "@storybook/theming" "6.3.7" "@types/markdown-to-jsx" "^6.11.3" copy-to-clipboard "^3.3.1" core-js "^3.8.2" @@ -2805,13 +2805,13 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/jest@^26.0.24": - version "26.0.24" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" - integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== +"@types/jest@^27.0.1": + version "27.0.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.1.tgz#fafcc997da0135865311bb1215ba16dba6bdf4ca" + integrity sha512-HTLpVXHrY69556ozYkcq47TtQJXpcWAWfkoqz+ZGz2JnmZhzlRjprCIyFnetSy8gpDWwTTGBcRVv1J1I1vBrHw== dependencies: - jest-diff "^26.0.0" - pretty-format "^26.0.0" + jest-diff "^27.0.0" + pretty-format "^27.0.0" "@types/jquery@*": version "3.5.5" @@ -2926,11 +2926,6 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== -"@types/q@^1.5.1": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" - integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== - "@types/qs@^6.9.5": version "6.9.6" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.6.tgz#df9c3c8b31a247ec315e6996566be3171df4b3b1" @@ -3016,10 +3011,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17.0.16": - version "17.0.16" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.16.tgz#056f40c45645761527baeb7d89d842a6abdf285a" - integrity sha512-3kCUiOOlQTwUUvjNFkbBTWMTxdTGybz/PfjCw9JmaRGcEDBQh+nGMg7/E9P2rklhJuYVd25IYLNcvqgSPCPksg== +"@types/react@^17.0.17": + version "17.0.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.17.tgz#1772d3d5425128e0635a716f49ef57c2955df055" + integrity sha512-nrfi7I13cAmrd0wje8czYpf5SFbryczCtPzFc6ijqvdjKcyA3tCvGxwchOUlxb2ucBPuJ9Y3oUqKrRqZvrz0lw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -3135,28 +3130,28 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996" - integrity sha512-eiREtqWRZ8aVJcNru7cT/AMVnYd9a2UHsfZT8MR1dW3UUEg6jDv9EQ9Cq4CUPZesyQ58YUpoAADGv71jY8RwgA== +"@typescript-eslint/eslint-plugin@^4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz#808d206e2278e809292b5de752a91105da85860b" + integrity sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw== dependencies: - "@typescript-eslint/experimental-utils" "4.29.0" - "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/experimental-utils" "4.29.1" + "@typescript-eslint/scope-manager" "4.29.1" debug "^4.3.1" functional-red-black-tree "^1.0.1" regexpp "^3.1.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.0.tgz#19b1417602d0e1ef325b3312ee95f61220542df5" - integrity sha512-FpNVKykfeaIxlArLUP/yQfv/5/3rhl1ov6RWgud4OgbqWLkEq7lqgQU9iiavZRzpzCRQV4XddyFz3wFXdkiX9w== +"@typescript-eslint/experimental-utils@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz#0af2b17b0296b60c6b207f11062119fa9c5a8994" + integrity sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.29.0" - "@typescript-eslint/types" "4.29.0" - "@typescript-eslint/typescript-estree" "4.29.0" + "@typescript-eslint/scope-manager" "4.29.1" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/typescript-estree" "4.29.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -3172,14 +3167,14 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.0.tgz#e5367ca3c63636bb5d8e0748fcbab7a4f4a04289" - integrity sha512-+92YRNHFdXgq+GhWQPT2bmjX09X7EH36JfgN2/4wmhtwV/HPxozpCNst8jrWcngLtEVd/4zAwA6BKojAlf+YqA== +"@typescript-eslint/parser@^4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d" + integrity sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg== dependencies: - "@typescript-eslint/scope-manager" "4.29.0" - "@typescript-eslint/types" "4.29.0" - "@typescript-eslint/typescript-estree" "4.29.0" + "@typescript-eslint/scope-manager" "4.29.1" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/typescript-estree" "4.29.1" debug "^4.3.1" "@typescript-eslint/scope-manager@4.28.1": @@ -3190,23 +3185,23 @@ "@typescript-eslint/types" "4.28.1" "@typescript-eslint/visitor-keys" "4.28.1" -"@typescript-eslint/scope-manager@4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.0.tgz#cf5474f87321bedf416ef65839b693bddd838599" - integrity sha512-HPq7XAaDMM3DpmuijxLV9Io8/6pQnliiXMQUcAdjpJJSR+fdmbD/zHCd7hMkjJn04UQtCQBtshgxClzg6NIS2w== +"@typescript-eslint/scope-manager@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz#f25da25bc6512812efa2ce5ebd36619d68e61358" + integrity sha512-Hzv/uZOa9zrD/W5mftZa54Jd5Fed3tL6b4HeaOpwVSabJK8CJ+2MkDasnX/XK4rqP5ZTWngK1ZDeCi6EnxPQ7A== dependencies: - "@typescript-eslint/types" "4.29.0" - "@typescript-eslint/visitor-keys" "4.29.0" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/visitor-keys" "4.29.1" "@typescript-eslint/types@4.28.1": version "4.28.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.1.tgz#d0f2ecbef3684634db357b9bbfc97b94b828f83f" integrity sha512-4z+knEihcyX7blAGi7O3Fm3O6YRCP+r56NJFMNGsmtdw+NCdpG5SgNz427LS9nQkRVTswZLhz484hakQwB8RRg== -"@typescript-eslint/types@4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.0.tgz#c8f1a1e4441ea4aca9b3109241adbc145f7f8a4e" - integrity sha512-2YJM6XfWfi8pgU2HRhTp7WgRw78TCRO3dOmSpAvIQ8MOv4B46JD2chnhpNT7Jq8j0APlIbzO1Bach734xxUl4A== +"@typescript-eslint/types@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5" + integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA== "@typescript-eslint/typescript-estree@4.28.1": version "4.28.1" @@ -3221,13 +3216,13 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.0.tgz#af7ab547757b86c91bfdbc54ff86845410856256" - integrity sha512-8ZpNHDIOyqzzgZrQW9+xQ4k5hM62Xy2R4RPO3DQxMc5Rq5QkCdSpk/drka+DL9w6sXNzV5nrdlBmf8+x495QXQ== +"@typescript-eslint/typescript-estree@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f" + integrity sha512-lIkkrR9E4lwZkzPiRDNq0xdC3f2iVCUjw/7WPJ4S2Sl6C3nRWkeE1YXCQ0+KsiaQRbpY16jNaokdWnm9aUIsfw== dependencies: - "@typescript-eslint/types" "4.29.0" - "@typescript-eslint/visitor-keys" "4.29.0" + "@typescript-eslint/types" "4.29.1" + "@typescript-eslint/visitor-keys" "4.29.1" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" @@ -3242,12 +3237,12 @@ "@typescript-eslint/types" "4.28.1" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.29.0": - version "4.29.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.0.tgz#1ff60f240def4d85ea68d4fd2e4e9759b7850c04" - integrity sha512-LoaofO1C/jAJYs0uEpYMXfHboGXzOJeV118X4OsZu9f7rG7Pr9B3+4HTU8+err81rADa4xfQmAxnRnPAI2jp+Q== +"@typescript-eslint/visitor-keys@4.29.1": + version "4.29.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d" + integrity sha512-zLqtjMoXvgdZY/PG6gqA73V8BjqPs4af1v2kiiETBObp+uC6gRYnJLmJHxC0QyUrrHDLJPIWNYxoBV3wbcRlag== dependencies: - "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/types" "4.29.1" eslint-visitor-keys "^2.0.0" "@webassemblyjs/ast@1.9.0": @@ -3531,7 +3526,7 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" -alphanum-sort@^1.0.0, alphanum-sort@^1.0.2: +alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= @@ -3611,10 +3606,10 @@ ansi-to-html@^0.6.11: dependencies: entities "^2.0.0" -antd@^4.16.10: - version "4.16.10" - resolved "https://registry.yarnpkg.com/antd/-/antd-4.16.10.tgz#d785741413a1875d9e526a09b8f5388cc29677e9" - integrity sha512-l1A6AiIXJPvJL9EXxF6nIEr44tcNFcx73u5+sSAU/heHQjC3wWUey6bY3nn9StdHcP8HuJOIs8vpev4cp6ty/w== +antd@^4.16.11: + version "4.16.11" + resolved "https://registry.yarnpkg.com/antd/-/antd-4.16.11.tgz#924116b0de7370f914e9de6c8c5a4bf019b3d668" + integrity sha512-7Tsx0sTjpSpgRqnXIRbuerqf4pu8+V1OPY4oZXXqTzuYPwKHdnbfXMg/L35IfeLtK1QcwgF4lfTR7bChJIcWSw== dependencies: "@ant-design/colors" "^6.0.0" "@ant-design/icons" "^4.6.2" @@ -3632,13 +3627,13 @@ antd@^4.16.10: rc-drawer "~4.3.0" rc-dropdown "~3.2.0" rc-field-form "~1.20.0" - rc-image "~5.2.4" + rc-image "~5.2.5" rc-input-number "~7.1.0" rc-mentions "~1.6.1" rc-menu "~9.0.12" rc-motion "^2.4.0" rc-notification "~4.5.7" - rc-pagination "~3.1.6" + rc-pagination "~3.1.9" rc-picker "~2.5.10" rc-progress "~3.1.0" rc-rate "~2.9.0" @@ -3657,7 +3652,6 @@ antd@^4.16.10: rc-upload "~4.3.0" rc-util "^5.13.1" scroll-into-view-if-needed "^2.2.25" - warning "^4.0.3" anymatch@^2.0.0: version "2.0.0" @@ -4219,7 +4213,7 @@ body-parser@1.19.0: raw-body "2.4.0" type-is "~1.6.17" -boolbase@^1.0.0, boolbase@~1.0.0: +boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= @@ -4530,25 +4524,6 @@ call-me-maybe@^1.0.1: resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -4831,15 +4806,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -4863,7 +4829,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -4882,27 +4848,11 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0, color-name@~1.1.4: +color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-string@^1.5.4: - version "1.5.5" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014" - integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@^3.0.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" - integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== - dependencies: - color-convert "^1.9.1" - color-string "^1.5.4" - colord@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/colord/-/colord-2.1.0.tgz#28cd9d6ac874dff97ef5ec1432c5c0b4e58e49c7" @@ -5120,16 +5070,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -5265,7 +5205,7 @@ css-color-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= -css-color-names@0.0.4, css-color-names@^0.0.4: +css-color-names@^0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= @@ -5275,14 +5215,6 @@ css-color-names@^1.0.1: resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67" integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== -css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== - dependencies: - postcss "^7.0.1" - timsort "^0.3.0" - css-declaration-sorter@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.3.tgz#9dfd8ea0df4cc7846827876fafb52314890c21a9" @@ -5340,21 +5272,6 @@ css-parse@~2.0.0: dependencies: css "^2.0.0" -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - css-select@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" @@ -5383,14 +5300,6 @@ css-to-react-native@^2.0.3: css-color-keywords "^1.0.0" postcss-value-parser "^3.3.0" -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - css-tree@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" @@ -5399,11 +5308,6 @@ css-tree@^1.1.2: mdn-data "2.0.14" source-map "^0.6.1" -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - css-what@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" @@ -5438,42 +5342,6 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-default@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" - integrity sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ== - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.3" - postcss-unique-selectors "^4.0.1" - cssnano-preset-default@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" @@ -5509,44 +5377,12 @@ cssnano-preset-default@^5.1.3: postcss-svgo "^5.0.2" postcss-unique-selectors "^5.0.1" -cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= - -cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" - integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= - -cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - dependencies: - postcss "^7.0.0" - -cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - cssnano-utils@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2" integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== -cssnano@^4.1.10: - version "4.1.11" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.11.tgz#c7b5f5b81da269cb1fd982cb960c1200910c9a99" - integrity sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g== - dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.8" - is-resolvable "^1.0.0" - postcss "^7.0.0" - -cssnano@^5.0.7: +cssnano@^5.0.1, cssnano@^5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== @@ -5556,7 +5392,7 @@ cssnano@^5.0.7: lilconfig "^2.0.3" yaml "^1.10.2" -csso@^4.0.2, csso@^4.2.0: +csso@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== @@ -5834,14 +5670,6 @@ dom-helpers@^5.1.3: "@babel/runtime" "^7.8.7" csstype "^3.0.2" -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - dom-serializer@^1.0.1: version "1.3.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" @@ -5861,11 +5689,6 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domelementtype@1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" @@ -5885,14 +5708,6 @@ domhandler@^4.0.0, domhandler@^4.2.0: dependencies: domelementtype "^2.2.0" -domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - domutils@^2.5.2, domutils@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442" @@ -5910,13 +5725,6 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - dotenv-defaults@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz#032c024f4b5906d9990eb06d722dc74cc60ec1bd" @@ -6120,7 +5928,7 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.1.1" -es-abstract@^1.17.0-next.0, es-abstract@^1.17.2, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.17.0-next.0, es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: version "1.18.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== @@ -6229,18 +6037,18 @@ eslint-config-react-app@^6.0.0: dependencies: confusing-browser-globals "^1.0.10" -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== +eslint-import-resolver-node@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz#939bbb0f74e179e757ca87f7a4a890dabed18ac4" + integrity sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg== dependencies: - debug "^2.6.9" - resolve "^1.13.1" + debug "^3.2.7" + resolve "^1.20.0" -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== +eslint-module-utils@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" + integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q== dependencies: debug "^3.2.7" pkg-dir "^2.0.0" @@ -6253,17 +6061,17 @@ eslint-plugin-flowtype@^5.9.0: lodash "^4.17.15" string-natural-compare "^3.0.1" -eslint-plugin-import@^2.23.4: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== +eslint-plugin-import@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz#697ffd263e24da5e84e03b282f5fb62251777177" + integrity sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg== dependencies: array-includes "^3.1.3" array.prototype.flat "^1.2.4" debug "^2.6.9" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" + eslint-import-resolver-node "^0.3.5" + eslint-module-utils "^2.6.2" find-up "^2.0.0" has "^1.0.3" is-core-module "^2.4.0" @@ -7399,7 +7207,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.0, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -7758,14 +7566,6 @@ import-cwd@^3.0.0: dependencies: import-from "^3.0.0" -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -7799,11 +7599,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -7889,11 +7684,6 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= - is-absolute-url@^3.0.0, is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" @@ -7938,11 +7728,6 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - is-bigint@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" @@ -7998,7 +7783,7 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-color-stop@^1.0.0, is-color-stop@^1.1.0: +is-color-stop@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= @@ -8059,11 +7844,6 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -8189,11 +7969,6 @@ is-obj@^1.0.1: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - is-object@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" @@ -8241,7 +8016,7 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-resolvable@^1.0.0, is-resolvable@^1.1.0: +is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== @@ -8513,7 +8288,7 @@ jest-diff@^26.0.0: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.0.6: +jest-diff@^27.0.0, jest-diff@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== @@ -9537,11 +9312,6 @@ mdn-data@2.0.14: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - mdurl@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -9768,7 +9538,7 @@ mkdirp@1.x, mkdirp@^1.0.3, mkdirp@^1.0.4, mkdirp@~1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: +mkdirp@^0.5.1, mkdirp@^0.5.3: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -10007,11 +9777,6 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - normalize-url@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" @@ -10046,13 +9811,6 @@ npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" -nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - nth-check@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" @@ -10135,7 +9893,7 @@ object.entries@^1.1.0, object.entries@^1.1.4: es-abstract "^1.18.0-next.2" has "^1.0.3" -object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0, object.getownpropertydescriptors@^2.1.2: +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== @@ -10618,15 +10376,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss-calc@^7.0.1: - version "7.0.5" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" - integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== - dependencies: - postcss "^7.0.27" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" - postcss-calc@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a" @@ -10635,17 +10384,6 @@ postcss-calc@^8.0.0: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.2" -postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== - dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-colormin@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.2.0.tgz#2b620b88c0ff19683f3349f4cf9e24ebdafb2c88" @@ -10656,14 +10394,6 @@ postcss-colormin@^5.2.0: colord "^2.0.1" postcss-value-parser "^4.1.0" -postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-convert-values@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz#4ec19d6016534e30e3102fdf414e753398645232" @@ -10671,49 +10401,21 @@ postcss-convert-values@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - dependencies: - postcss "^7.0.0" - postcss-discard-comments@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz#9eae4b747cf760d31f2447c27f0619d5718901fe" integrity sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg== -postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - dependencies: - postcss "^7.0.0" - postcss-discard-duplicates@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz#68f7cc6458fe6bab2e46c9f55ae52869f680e66d" integrity sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA== -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" - postcss-discard-empty@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz#ee136c39e27d5d2ed4da0ee5ed02bc8a9f8bf6d8" integrity sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw== -postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - dependencies: - postcss "^7.0.0" - postcss-discard-overridden@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz#454b41f707300b98109a75005ca4ab0ff2743ac6" @@ -10773,16 +10475,6 @@ postcss-loader@^4.2.0: schema-utils "^3.0.0" semver "^7.3.4" -postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== - dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" - postcss-merge-longhand@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz#277ada51d9a7958e8ef8cf263103c9384b322a41" @@ -10792,18 +10484,6 @@ postcss-merge-longhand@^5.0.2: postcss-value-parser "^4.1.0" stylehacks "^5.0.1" -postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" - postcss-merge-rules@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz#d6e4d65018badbdb7dcc789c4f39b941305d410a" @@ -10815,14 +10495,6 @@ postcss-merge-rules@^5.0.2: postcss-selector-parser "^6.0.5" vendors "^1.0.3" -postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-minify-font-values@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz#a90cefbfdaa075bd3dbaa1b33588bb4dc268addf" @@ -10830,16 +10502,6 @@ postcss-minify-font-values@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-minify-gradients@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.1.tgz#2dc79fd1a1afcb72a9e727bc549ce860f93565d2" @@ -10849,18 +10511,6 @@ postcss-minify-gradients@^5.0.1: is-color-stop "^1.1.0" postcss-value-parser "^4.1.0" -postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== - dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" - postcss-minify-params@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz#371153ba164b9d8562842fdcd929c98abd9e5b6c" @@ -10872,16 +10522,6 @@ postcss-minify-params@^5.0.1: postcss-value-parser "^4.1.0" uniqs "^2.0.0" -postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== - dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - postcss-minify-selectors@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz#4385c845d3979ff160291774523ffa54eafd5a54" @@ -10965,27 +10605,11 @@ postcss-modules@^4.0.0: postcss-modules-values "^4.0.0" string-hash "^1.1.1" -postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - dependencies: - postcss "^7.0.0" - postcss-normalize-charset@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz#121559d1bebc55ac8d24af37f67bd4da9efd91d0" integrity sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg== -postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-display-values@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz#62650b965981a955dffee83363453db82f6ad1fd" @@ -10994,16 +10618,6 @@ postcss-normalize-display-values@^5.0.1: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" -postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== - dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-positions@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz#868f6af1795fdfa86fbbe960dceb47e5f9492fe5" @@ -11011,16 +10625,6 @@ postcss-normalize-positions@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-repeat-style@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz#cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5" @@ -11029,15 +10633,6 @@ postcss-normalize-repeat-style@^5.0.1: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" -postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== - dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-string@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz#d9eafaa4df78c7a3b973ae346ef0e47c554985b0" @@ -11045,15 +10640,6 @@ postcss-normalize-string@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-timing-functions@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz#8ee41103b9130429c6cbba736932b75c5e2cb08c" @@ -11062,15 +10648,6 @@ postcss-normalize-timing-functions@^5.0.1: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" -postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-unicode@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz#82d672d648a411814aa5bf3ae565379ccd9f5e37" @@ -11079,16 +10656,6 @@ postcss-normalize-unicode@^5.0.1: browserslist "^4.16.0" postcss-value-parser "^4.1.0" -postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-url@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz#ddcdfb7cede1270740cf3e4dfc6008bd96abc763" @@ -11098,14 +10665,6 @@ postcss-normalize-url@^5.0.2: normalize-url "^6.0.1" postcss-value-parser "^4.1.0" -postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-normalize-whitespace@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz#b0b40b5bcac83585ff07ead2daf2dcfbeeef8e9a" @@ -11113,15 +10672,6 @@ postcss-normalize-whitespace@^5.0.1: dependencies: postcss-value-parser "^4.1.0" -postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== - dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-ordered-values@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044" @@ -11130,16 +10680,6 @@ postcss-ordered-values@^5.0.2: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" -postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-reduce-initial@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz#9d6369865b0f6f6f6b165a0ef5dc1a4856c7e946" @@ -11148,16 +10688,6 @@ postcss-reduce-initial@^5.0.1: browserslist "^4.16.0" caniuse-api "^3.0.0" -postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - postcss-reduce-transforms@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz#93c12f6a159474aa711d5269923e2383cedcf640" @@ -11166,15 +10696,6 @@ postcss-reduce-transforms@^5.0.1: cssnano-utils "^2.0.1" postcss-value-parser "^4.1.0" -postcss-selector-parser@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5: version "6.0.6" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" @@ -11183,15 +10704,6 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-svgo@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" - integrity sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" - postcss-svgo@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.2.tgz#bc73c4ea4c5a80fbd4b45e29042c34ceffb9257f" @@ -11200,15 +10712,6 @@ postcss-svgo@^5.0.2: postcss-value-parser "^4.1.0" svgo "^2.3.0" -postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== - dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" - postcss-unique-selectors@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz#3be5c1d7363352eff838bd62b0b07a0abad43bfc" @@ -11218,7 +10721,7 @@ postcss-unique-selectors@^5.0.1: postcss-selector-parser "^6.0.5" uniqs "^2.0.0" -postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0: +postcss-value-parser@^3.3.0: version "3.3.1" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== @@ -11237,7 +10740,7 @@ postcss@^6.0.14, postcss@^6.0.2: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.14, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0.5, postcss@^7.0.6: version "7.0.36" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb" integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw== @@ -11309,7 +10812,7 @@ pretty-format@^26.0.0, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.2, pretty-format@^27.0.6: +pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== @@ -11484,11 +10987,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" @@ -11605,16 +11103,6 @@ rc-collapse@~3.1.0: rc-util "^5.2.1" shallowequal "^1.1.0" -rc-dialog@~8.5.0: - version "8.5.2" - resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-8.5.2.tgz#530e289c25a31c15c85a0e8a4ba3f33414bff418" - integrity sha512-3n4taFcjqhTE9uNuzjB+nPDeqgRBTEGBfe46mb1e7r88DgDo0lL4NnxY/PZ6PJKd2tsCt+RrgF/+YeTvJ/Thsw== - dependencies: - "@babel/runtime" "^7.10.1" - classnames "^2.2.6" - rc-motion "^2.3.0" - rc-util "^5.6.1" - rc-dialog@~8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-8.6.0.tgz#3b228dac085de5eed8c6237f31162104687442e7" @@ -11652,14 +11140,14 @@ rc-field-form@~1.20.0: async-validator "^3.0.3" rc-util "^5.8.0" -rc-image@~5.2.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/rc-image/-/rc-image-5.2.4.tgz#ff1059f937bde6ca918c6f1beb316beba911f255" - integrity sha512-kWOjhZC1OoGKfvWqtDoO9r8WUNswBwnjcstI6rf7HMudz0usmbGvewcWqsOhyaBRJL9+I4eeG+xiAoxV1xi75Q== +rc-image@~5.2.5: + version "5.2.5" + resolved "https://registry.yarnpkg.com/rc-image/-/rc-image-5.2.5.tgz#44e6ffc842626827960e7ab72e1c0d6f3a8ce440" + integrity sha512-qUfZjYIODxO0c8a8P5GeuclYXZjzW4hV/5hyo27XqSFo1DmTCs2HkVeQObkcIk5kNsJtgsj1KoPThVsSc/PXOw== dependencies: "@babel/runtime" "^7.11.2" classnames "^2.2.6" - rc-dialog "~8.5.0" + rc-dialog "~8.6.0" rc-util "^5.0.6" rc-input-number@~7.1.0: @@ -11725,10 +11213,10 @@ rc-overflow@^1.0.0, rc-overflow@^1.2.0: rc-resize-observer "^1.0.0" rc-util "^5.5.1" -rc-pagination@~3.1.6: - version "3.1.7" - resolved "https://registry.yarnpkg.com/rc-pagination/-/rc-pagination-3.1.7.tgz#13ba071a7fcb0c79896076806f3944653e7bf29e" - integrity sha512-sl0HGVhv6AsMzA5H3q7cBQcbAGj/sFjoiDSLvq3+/4IjihPqScZnSSiqR4Wu9G8RLgNjrBnGrSdTGO2Kyrt3IA== +rc-pagination@~3.1.9: + version "3.1.9" + resolved "https://registry.yarnpkg.com/rc-pagination/-/rc-pagination-3.1.9.tgz#797ad75d85b1ef7a82801207ead410110337fdd6" + integrity sha512-IKBKaJ4icVPeEk9qRHrFBJmHxBUrCp3+nENBYob4Ofqsu3RXjBOy4N36zONO7oubgLyiG3PxVmyAuVlTkoc7Jg== dependencies: "@babel/runtime" "^7.10.1" classnames "^2.2.1" @@ -12534,11 +12022,6 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -12554,7 +12037,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -12638,14 +12121,14 @@ rollup-plugin-peer-deps-external@^2.2.4: resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz#8a420bbfd6dccc30aeb68c9bf57011f2f109570d" integrity sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g== -rollup-plugin-postcss@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.0.tgz#2131fb6db0d5dce01a37235e4f6ad4523c681cea" - integrity sha512-OQzT+YspV01/6dxfyEw8lBO2px3hyL8Xn+k2QGctL7V/Yx2Z1QaMKdYVslP1mqv7RsKt6DROIlnbpmgJ3yxf6g== +rollup-plugin-postcss@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.1.tgz#2856465b637ec02513676659aabf1ca3840f3af0" + integrity sha512-kUJHlpDGl9+kDfdUUbnerW0Mx1R0PL/6dgciUE/w19swYDBjug7RQfxIRvRGtO/cvCkynYyU8e/YFMI544vskA== dependencies: chalk "^4.1.0" concat-with-sourcemaps "^1.1.0" - cssnano "^4.1.10" + cssnano "^5.0.1" import-cwd "^3.0.0" p-queue "^6.6.2" pify "^5.0.0" @@ -12674,10 +12157,10 @@ rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: dependencies: estree-walker "^0.6.1" -rollup@^2.56.0: - version "2.56.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.0.tgz#daa832955d2b58f1ed52a3c4c85b7d1adaf076d0" - integrity sha512-weEafgbjbHCnrtJPNyCrhYnjP62AkF04P0BcV/1mofy1+gytWln4VVB1OK462cq2EAyWzRDpTMheSP/o+quoiA== +rollup@^2.56.2: + version "2.56.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.2.tgz#a045ff3f6af53ee009b5f5016ca3da0329e5470f" + integrity sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ== optionalDependencies: fsevents "~2.3.2" @@ -13036,13 +12519,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -13572,15 +13048,6 @@ styled-components@^2.4.0: stylis "^3.4.0" supports-color "^3.2.3" -stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - stylehacks@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.1.tgz#323ec554198520986806388c7fdaebc38d2c06fb" @@ -13656,25 +13123,6 @@ svg-tag-names@^1.1.0: resolved "https://registry.yarnpkg.com/svg-tag-names/-/svg-tag-names-1.1.2.tgz#aa785b58ce35e725a65758f7e436924dc79be9ce" integrity sha512-LIDOy8NRLGfJegTEnpizWA/ofg3Gyx58JgPEEjvATFciUJW9dHZ2aPTYY0Mn2rQYCeUGZElpHfu91OcWK0IMIw== -svgo@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - svgo@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.1.tgz#603a69ce50311c0e36791528f549644ec1b3f4bc" @@ -14000,11 +13448,16 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== +tslib@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -14173,11 +13626,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" @@ -14270,7 +13718,7 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= -unquote@^1.1.0, unquote@~1.1.1: +unquote@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= @@ -14354,16 +13802,6 @@ util.promisify@1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" @@ -14449,7 +13887,7 @@ vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -vendors@^1.0.0, vendors@^1.0.3: +vendors@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== From 0fed3ea99abef8ac5a255bc5c57eb1b4639f2ca1 Mon Sep 17 00:00:00 2001 From: Alexey Date: Sat, 14 Aug 2021 16:31:57 +0300 Subject: [PATCH 08/10] [refactor] GH-5 Dispatch on @type, @parent, separate elements for viewKind and viwDescr, Mst prefix, custom viewElements --- src/DispatchCell.tsx | 10 +- src/Form.tsx | 77 ++-- src/UnknownRenderer.tsx | 9 +- src/cells/AntdCellCardLayout.tsx | 14 +- src/cells/AntdCellG2.tsx | 2 +- src/cells/AntdCellHorizontalLayout.tsx | 44 ++- src/cells/AntdSimpleCells.tsx | 6 +- src/cells/TinyMCECell.tsx | 2 +- src/controls/AntdButtonControl.tsx | 2 +- src/data-controls/DataControl.tsx | 14 +- src/data-controls/GridRenderer.tsx | 24 +- src/data-controls/SaveControl.tsx | 2 +- src/data-controls/SelectControl.tsx | 4 +- src/data-controls/TabControlRenderer.tsx | 2 +- src/data-controls/TableRenderer.tsx | 10 +- src/data-controls/TreeRenderer.tsx | 10 +- src/index.ts | 4 + src/layouts/AntdFormLayout.tsx | 10 +- src/layouts/AntdHorizontalLayout.tsx | 26 +- src/layouts/AntdVerticalLayout.tsx | 16 +- src/layouts/SplitPaneLayout.tsx | 26 +- src/layouts/TabsLayout.tsx | 8 +- src/models/MstViewDescr.ts | 256 +++++++++++++ src/models/MstViewSchemas.ts | 30 ++ src/{stores => models}/ViewCollConstrs.ts | 0 src/{stores => models}/ViewShapeSchema.ts | 0 src/models/uischema.ts | 56 ++- src/stores/ViewDescr.ts | 165 --------- src/testers.ts | 49 +-- src/util/AntdModal.tsx | 11 +- src/util/ContextToProps.tsx | 209 ++++++----- src/util/layout.tsx | 16 +- stories/AntdCardCell.stories.tsx | 304 +++++++-------- stories/Form.stories.tsx | 69 ++-- stories/Tree.stories.tsx | 4 +- stories/TreeAndForm.stories.tsx | 432 ++++++++++++---------- stories/TreeAndFormArtifact.stories.tsx | 106 +++--- stories/TreeAndFormColumns.stories.tsx | 329 ++++++++-------- 38 files changed, 1320 insertions(+), 1038 deletions(-) create mode 100644 src/models/MstViewDescr.ts create mode 100644 src/models/MstViewSchemas.ts rename src/{stores => models}/ViewCollConstrs.ts (100%) rename src/{stores => models}/ViewShapeSchema.ts (100%) delete mode 100644 src/stores/ViewDescr.ts diff --git a/src/DispatchCell.tsx b/src/DispatchCell.tsx index fbec2b1..69939bd 100644 --- a/src/DispatchCell.tsx +++ b/src/DispatchCell.tsx @@ -19,10 +19,10 @@ import { MstContext } from './MstContext'; * Dispatch renderer component for cells. */ export const DispatchCell: React.FC = React.memo( - ({ data, onMeasureChange, uri, schema, viewElement, view, enabled, id, CKey, rowData, ...rest }) => { + ({ data, onMeasureChange, uri, schema, viewKindElement, viewKind, enabled, id, CKey, rowData, ...rest }) => { const { cells } = useContext(MstContext); - const renderer = maxBy(cells, (r) => r.tester(viewElement, schema)); - if (renderer === undefined || renderer.tester(viewElement, schema) === -1) { + const renderer = maxBy(cells, (r) => r.tester(viewKindElement, schema)); + if (renderer === undefined || renderer.tester(viewKindElement, schema) === -1) { return ( @@ -38,10 +38,10 @@ export const DispatchCell: React.FC = React.memo( rowData={rowData} onMeasureChange={onMeasureChange} schema={schema} - viewElement={viewElement} + viewKindElement={viewKindElement} uri={uri} enabled={enabled} - view={view} + viewKind={viewKind} id={id} {...rest} /> diff --git a/src/Form.tsx b/src/Form.tsx index ef64456..4561925 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -19,7 +19,7 @@ import { JsonSchema7 } from './models/jsonSchema7'; import { MstContext } from './MstContext'; import { UnknownRenderer } from './UnknownRenderer'; import { RankedTester } from './testers'; -import { View, ViewElement } from './models/uischema'; +import { IViewDescr, IViewKind, IViewKindElement } from './models/uischema'; export interface ControlComponent { data: any; @@ -51,16 +51,15 @@ export interface FormsCell { tester: RankedTester; cell: React.FC; } -export interface InitStateProps { - viewElement: ViewElement; - view: View; -} export interface FormsInitStateProps { viewDescrCollId: string; viewDescrId: string; - viewKindCollId: string; } -export interface FormsDispatchProps extends InitStateProps { +export interface FormsDispatchProps { + viewKind: IViewKind; + viewKindElement: IViewKindElement; + viewDescr?: IViewDescr; + viewDescrElement?: IViewKindElement; enabled?: boolean; form?: string; } @@ -86,14 +85,24 @@ export interface DispatchCellProps extends RenderProps { } export const FormsDispatch: React.FC = observer( - ({ view, viewElement, form, uri, enabled }: any) => { + ({ viewKind, viewKindElement, viewDescr, viewDescrElement, form, uri, enabled }) => { const { store, renderers } = useContext(MstContext); - const shapes = viewElement.resultsScope ? viewElement.resultsScope.split('/') : []; - const iri = shapes.length === 2 ? shapes[0] : viewElement.resultsScope; + // if ViewElement extend-override exists + if (!viewDescrElement && viewDescr) { + viewDescrElement = viewDescr.elements?.find((el) => el['@parent'] === viewKindElement['@id']); + } + + const shapes = viewKindElement.resultsScope ? viewKindElement.resultsScope.split('/') : []; + let collIri = shapes.length === 2 ? shapes[0] : viewKindElement.resultsScope; let schema: any; - if (iri) { - const coll = store.getColl(iri); + if (collIri) { + // if CollConstr extend-override exists switch to extCollConstr + if (viewDescr && viewDescr.collsConstrs) { + const extCollConstr = viewDescr.collsConstrs?.find((el) => el['@parent'] === viewKindElement['@id']); + if (extCollConstr) collIri = extCollConstr['@id']; + } + const coll = store.getColl(collIri); schema = coll?.collConstr.entConstrs[0]?.schemaJs; //if (store.schemas[iri]) { // schema = store.schemas[iri]; @@ -108,15 +117,26 @@ export const FormsDispatch: React.FC = observer r.tester(viewElement, schema)); - //const isModal = viewElement.options && viewElement.options.modal; - if (renderer === undefined || renderer.tester(viewElement, schema) === -1) { - return ; + const renderer = maxBy(renderers, (r) => r.tester(viewKindElement, schema)); + //const isModal = viewKindElement.options && viewKindElement.options.modal; + if (renderer === undefined || renderer.tester(viewKindElement, schema) === -1) { + return ( + + ); } else { const Render: React.FC = renderer.renderer; return ( {}}> - + ); } @@ -144,7 +164,7 @@ export const Form: React.FC = observer return ; } - const { viewDescrId, viewDescrCollId, viewKindCollId } = props; + const { viewDescrId, viewDescrCollId } = props; const collWithViewDescrsObs = store.getColl(viewDescrCollId); if (!collWithViewDescrsObs) { @@ -158,22 +178,23 @@ export const Form: React.FC = observer return ; } - const collWithViewKindsObs = store.getColl(viewKindCollId); - if (!collWithViewKindsObs) { - console.log('!collWithViewKindsObs', viewKindCollId); - return ; - } - const viewKindId = viewDescrObs.viewKind; - const viewKindObs = collWithViewKindsObs.dataByIri(viewKindId); + //const collWithViewKindsObs = store.getColl(viewKindCollId); + //if (!collWithViewKindsObs) { + // console.log('!collWithViewKindsObs', viewKindCollId); + // return ; + //} + const viewKindObs = viewDescrObs.viewKind; if (!viewKindObs) { - console.log('!viewKindObs', viewKindId); + console.log('!viewKindObs', viewKindObs); return ; } const viewKind: any = getSnapshot(viewKindObs); - const view: any = getSnapshot(viewDescrObs); + const viewDescr: any = getSnapshot(viewDescrObs); return ( {}}> - + {viewKind.elements.map((el: IViewKindElement) => ( + + ))} ); }); diff --git a/src/UnknownRenderer.tsx b/src/UnknownRenderer.tsx index fa033a3..fde78a2 100644 --- a/src/UnknownRenderer.tsx +++ b/src/UnknownRenderer.tsx @@ -18,6 +18,8 @@ export interface UnknownRendererProps { * The type for which no renderer has been found. */ type: 'renderer' | 'cell'; + elementId: string; + elementType: string; } /** @@ -25,6 +27,11 @@ export interface UnknownRendererProps { */ export class UnknownRenderer extends Component { render() { - return
No applicable {this.props.type} found.
; + return ( +
+ No applicable {this.props.type} found for element with id={this.props.elementId} and type= + {this.props.elementType}. +
+ ); } } diff --git a/src/cells/AntdCellCardLayout.tsx b/src/cells/AntdCellCardLayout.tsx index c6d768b..29ba978 100644 --- a/src/cells/AntdCellCardLayout.tsx +++ b/src/cells/AntdCellCardLayout.tsx @@ -12,26 +12,26 @@ import React from 'react'; import { rankWith, RankedTester, uiTypeIs } from '../testers'; import { get } from 'lodash-es'; -import { ViewElement } from '../models/uischema'; +import { IViewKindElement } from '../models/uischema'; import { Card } from 'antd'; import { DispatchCell } from '../DispatchCell'; import './cell.css'; export const AntdCellCardLayout = (props: any) => { - const { viewElement, view, schema, data, id } = props; + const { viewKindElement, viewKind, schema, data, id } = props; const createCardChilds = () => - viewElement.elements - ? viewElement.elements.map((e: ViewElement, idx: number) => { + viewKindElement.elements + ? viewKindElement.elements.map((e: IViewKindElement, idx: number) => { const newSchema = e.scope ? get(schema, 'properties.' + e.scope.replace(/\//, '.properties.')) : schema; return ( ); }) @@ -43,4 +43,4 @@ export const AntdCellCardLayout = (props: any) => { * Default tester for text-based/string controls. * @type {RankedTester} */ -export const antdCellCardLayoutTester: RankedTester = rankWith(2, uiTypeIs('CardLayout')); +export const antdCellCardLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:CardLayout')); diff --git a/src/cells/AntdCellG2.tsx b/src/cells/AntdCellG2.tsx index d4b31e6..0003177 100644 --- a/src/cells/AntdCellG2.tsx +++ b/src/cells/AntdCellG2.tsx @@ -18,6 +18,6 @@ export const AntdCellG2 = (props: any) => { * Default tester for text-based/string controls. * @type {RankedTester} */ -export const antdCellG2Tester: RankedTester = rankWith(2, uiTypeIs('G2')); +export const antdCellG2Tester: RankedTester = rankWith(2, uiTypeIs('aldkg:G2')); export const AntdCellG2WithStore = withStoreToCellProps(AntdCellG2); diff --git a/src/cells/AntdCellHorizontalLayout.tsx b/src/cells/AntdCellHorizontalLayout.tsx index 00df6c4..3bfcfc5 100644 --- a/src/cells/AntdCellHorizontalLayout.tsx +++ b/src/cells/AntdCellHorizontalLayout.tsx @@ -12,28 +12,42 @@ import { Row, Col } from 'antd'; import { DispatchCell } from '../DispatchCell'; import { DispatchCellProps } from '../Form'; -import { ViewElement } from '../models/uischema'; +import { IViewKindElement } from '../models/uischema'; import { rankWith, uiTypeIs, RankedTester } from '../testers'; import { get } from 'lodash-es'; import { Idx } from '../util/layout'; -export const AntdCellHorizontalLayoutRenderer: React.FC = ({ viewElement, view, data, schema }) => { - //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, schema, viewElement, view, data, enabled, form }) => { - const options = viewElement.options || {}; +export const AntdCellHorizontalLayoutRenderer: React.FC = ({ + viewKindElement, + viewKind, + data, + schema, +}) => { + //const layout = viewKindElement as Layout; + const Render: React.FC = ({ + idx, + schema, + viewKindElement, + viewKind, + data, + enabled, + form, + }) => { + const options = viewKindElement.options || {}; //const style: any = options.style; - const span = options.contentSize || !viewElement.elements ? undefined : Math.ceil(24 / viewElement.elements.length); - const newSchema = viewElement.scope - ? get(schema, 'properties.' + viewElement.scope.replace(/\//, '.properties.')) + const span = + options.contentSize || !viewKindElement.elements ? undefined : Math.ceil(24 / viewKindElement.elements.length); + const newSchema = viewKindElement.scope + ? get(schema, 'properties.' + viewKindElement.scope.replace(/\//, '.properties.')) : schema; return ( = ({ ); }; - const justify: any = viewElement.options ? viewElement.options.justify : 'center'; + const justify: any = viewKindElement.options ? viewKindElement.options.justify : 'center'; const rowStyle: any = { flexWrap: 'nowrap' }; - if (viewElement.options && viewElement.options.width === 'all-empty-space') rowStyle.width = '100%'; + if (viewKindElement.options && viewKindElement.options.width === 'all-empty-space') rowStyle.width = '100%'; return ( - {(viewElement.elements || []).map((e: ViewElement, idx: number) => ( - + {(viewKindElement.elements || []).map((e: IViewKindElement, idx: number) => ( + ))} ); }; -export const antdCellHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('CellHorizontalLayout')); +export const antdCellHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:CellHorizontalLayout')); diff --git a/src/cells/AntdSimpleCells.tsx b/src/cells/AntdSimpleCells.tsx index a575f42..03100f0 100644 --- a/src/cells/AntdSimpleCells.tsx +++ b/src/cells/AntdSimpleCells.tsx @@ -54,7 +54,7 @@ export const AntdButtonCell = (props: any) => { ); }; -export const antdButtonCellTester: RankedTester = rankWith(2, uiTypeIs('Button')); +export const antdButtonCellTester: RankedTester = rankWith(2, uiTypeIs('aldkg:Button')); export const AntdButtonCellWithStore = withStoreToCellProps(AntdButtonCell); /** @@ -84,7 +84,7 @@ export const AntdImageCell = (props: any) => { const { data } = props; return ; }; -export const antdImageCellTester: RankedTester = rankWith(2, uiTypeIs('ImageCell')); +export const antdImageCellTester: RankedTester = rankWith(2, uiTypeIs('aldkg:ImageCell')); export const AntdImageCellWithStore = withStoreToCellProps(AntdImageCell); /** @@ -103,7 +103,7 @@ export const AntdRateCell = (props: any /*: EnumCellProps & WithClassname*/) => ); }; -export const antdRateCellTester: RankedTester = rankWith(5, uiTypeIs('Rate')); +export const antdRateCellTester: RankedTester = rankWith(5, uiTypeIs('aldkg:Rate')); export const AntdRateCellWithStore = withStoreToCellProps(AntdRateCell); /** diff --git a/src/cells/TinyMCECell.tsx b/src/cells/TinyMCECell.tsx index bee97dd..ace0f3a 100644 --- a/src/cells/TinyMCECell.tsx +++ b/src/cells/TinyMCECell.tsx @@ -25,7 +25,7 @@ export const TinyMCECell = (props: any) => { */ export const tinyMCECellTester: RankedTester = rankWith( 10, - (viewElement, schema) => viewElement.options !== undefined && viewElement.options.formatter === 'tinyMCE', + (viewKindElement, schema) => viewKindElement.options !== undefined && viewKindElement.options.formatter === 'tinyMCE', ); export const TinyMCECellWithStore = withStoreToCellProps(TinyMCECell); diff --git a/src/controls/AntdButtonControl.tsx b/src/controls/AntdButtonControl.tsx index b23a108..112a412 100644 --- a/src/controls/AntdButtonControl.tsx +++ b/src/controls/AntdButtonControl.tsx @@ -30,5 +30,5 @@ export const AntdButtonControl: React.FC = ({ handleChange, ); }; -export const antdButtonControlTester: RankedTester = rankWith(2, uiTypeIs('Button')); +export const antdButtonControlTester: RankedTester = rankWith(2, uiTypeIs('aldkg:Button')); export const AntdButtonControlWithStore = withStoreToButtonProps(AntdButtonControl); diff --git a/src/data-controls/DataControl.tsx b/src/data-controls/DataControl.tsx index 7cb2c5e..93e54b6 100644 --- a/src/data-controls/DataControl.tsx +++ b/src/data-controls/DataControl.tsx @@ -23,11 +23,11 @@ const renderType: any = { export const AntdDataLayout: React.FC = (props) => { const { - viewElement, + viewKindElement, enabled, handleChange = () => {}, dataSource, - view, + viewKind, schema, editing, getData, @@ -36,11 +36,11 @@ export const AntdDataLayout: React.FC = (props) => { onDeleteFolder, onRename, } = props; - const data = treeify(dataSource, '@id', viewElement?.options.treeNodeParentKey || 'parent', 'children', strcmp); + const data = treeify(dataSource, '@id', viewKindElement?.options.treeNodeParentKey || 'parent', 'children', strcmp); const onSelect = (selected: { [key: string]: any }) => { handleChange(selected); }; - const Render = renderType[viewElement?.options.renderType]; + const Render = renderType[viewKindElement?.options.renderType]; return ( = (props) => { child={data} editing={editing} onDnD={onDnD} - viewElement={viewElement} - view={view} + viewKindElement={viewKindElement} + viewKind={viewKind} onCreateFolder={onCreateFolder} onDeleteFolder={onDeleteFolder} onRename={onRename} @@ -62,5 +62,5 @@ export const AntdDataLayout: React.FC = (props) => { ); }; -export const antdDataControlTester: RankedTester = rankWith(2, uiTypeIs('DataControl')); +export const antdDataControlTester: RankedTester = rankWith(2, uiTypeIs('aldkg:DataControl')); export const AntdDataControlWithStore = withStoreToDataControlProps(AntdDataLayout); diff --git a/src/data-controls/GridRenderer.tsx b/src/data-controls/GridRenderer.tsx index 92b700b..89d7480 100644 --- a/src/data-controls/GridRenderer.tsx +++ b/src/data-controls/GridRenderer.tsx @@ -7,33 +7,29 @@ * * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ -import React, { useState, useEffect } from 'react'; -import { List, Row, Col, Pagination } from 'antd'; -import { ViewElement } from '../models/uischema'; +import React from 'react'; +import { List } from 'antd'; +import { IViewKindElement } from '../models/uischema'; import { DispatchCell } from '../DispatchCell'; import './styles.css'; -const divStyle: React.CSSProperties = { - padding: '5px', -}; - export const GridRenderer: React.FC = (props) => { - const { child, onSelect, viewElement, view, schema } = props; - const grid = viewElement?.options?.grid || { gutter: 16, column: 4 }; - const template = viewElement?.options?.elementTemplate || null; + const { child, viewKindElement, viewKind, schema } = props; + const grid = viewKindElement?.options?.grid || { gutter: 16, column: 4 }; + const template = viewKindElement?.options?.elementTemplate || null; const createCell = (data: any, id: string | number) => template ? ( - template.map((e: ViewElement, idx: number) => ( + template.map((e: IViewKindElement, idx: number) => ( )) ) : ( diff --git a/src/data-controls/SaveControl.tsx b/src/data-controls/SaveControl.tsx index 1fc24c0..78b2cee 100644 --- a/src/data-controls/SaveControl.tsx +++ b/src/data-controls/SaveControl.tsx @@ -39,5 +39,5 @@ export const SaveControl: React.FC = (props) => { ); }; -export const saveControlTester: RankedTester = rankWith(1, uiTypeIs('SaveControl')); +export const saveControlTester: RankedTester = rankWith(1, uiTypeIs('aldkg:SaveControl')); export const AntdSaveControlWithStore = withStoreToSaveButtonProps(SaveControl); diff --git a/src/data-controls/SelectControl.tsx b/src/data-controls/SelectControl.tsx index 36defd6..4758448 100644 --- a/src/data-controls/SelectControl.tsx +++ b/src/data-controls/SelectControl.tsx @@ -15,7 +15,7 @@ import { withStoreToSelectControlProps } from '../util/ContextToProps'; export const AntdSelectControl: React.FC = (props) => { const { handleChange, dataSource } = props; - //const options = merge({}, viewElement.options); + //const options = merge({}, viewKindElement.options); const data: any = []; const dataObject: any = {}; @@ -63,5 +63,5 @@ export const AntdSelectControl: React.FC = (props) => { ); }; -export const antdSelectControlTester: RankedTester = rankWith(2, uiTypeIs('SelectControl')); +export const antdSelectControlTester: RankedTester = rankWith(2, uiTypeIs('aldkg:SelectControl')); export const AntdSelectControlWithStore = withStoreToSelectControlProps(AntdSelectControl); diff --git a/src/data-controls/TabControlRenderer.tsx b/src/data-controls/TabControlRenderer.tsx index be25b54..836f82d 100644 --- a/src/data-controls/TabControlRenderer.tsx +++ b/src/data-controls/TabControlRenderer.tsx @@ -57,5 +57,5 @@ export const TabControlRenderer = (props: any) => { return ; }; -export const antdTabControlTester: RankedTester = rankWith(2, uiTypeIs('TabControl')); +export const antdTabControlTester: RankedTester = rankWith(2, uiTypeIs('aldkg:TabControl')); export const AntdTabControlWithStore = withStoreToTabProps(TabControlRenderer); diff --git a/src/data-controls/TableRenderer.tsx b/src/data-controls/TableRenderer.tsx index 00f9bee..208bbc1 100644 --- a/src/data-controls/TableRenderer.tsx +++ b/src/data-controls/TableRenderer.tsx @@ -22,7 +22,7 @@ const divStyle: React.CSSProperties = { export const TableRenderer: React.FC = React.memo( (props) => { - const { schema, enabled, child, onSelect, viewElement, view, editing } = props; + const { schema, enabled, child, onSelect, viewKindElement, viewKind, editing } = props; const [selected, setSelected] = useState(child[0]); const [cacheSelect, setCacheSelect] = useState(); const [dataSource, setDataSource] = useState(child); @@ -77,12 +77,12 @@ export const TableRenderer: React.FC = React.memo( })} /> - {selected.viewElement || viewElement.elements ? ( + {selected.viewKindElement || viewKindElement.elements ? (
) : null} @@ -94,7 +94,7 @@ export const TableRenderer: React.FC = React.memo( onSelect(cacheSelect); setSelected(cacheSelect); }} - //schemaUri={viewElement.resultsScope} + //schemaUri={viewKindElement.resultsScope} onCancel={() => setVisible(false)} /> diff --git a/src/data-controls/TreeRenderer.tsx b/src/data-controls/TreeRenderer.tsx index 1c6680b..f003673 100644 --- a/src/data-controls/TreeRenderer.tsx +++ b/src/data-controls/TreeRenderer.tsx @@ -28,9 +28,9 @@ export const TreeRenderer: React.FC = (props) => { enabled, child, onSelect, - viewElement, + viewKindElement, dataSource, - view, + viewKind, editing, onDnD, onCreateFolder, @@ -120,7 +120,7 @@ export const TreeRenderer: React.FC = (props) => { setAutoExpandParent(false); }; - const titlePropName = viewElement?.options?.treeNodeTitleKey || 'title'; + const titlePropName = viewKindElement?.options?.treeNodeTitleKey || 'title'; const searchEdit = (data: any) => data.map((item: any) => { @@ -234,7 +234,7 @@ export const TreeRenderer: React.FC = (props) => { }; const onCreateDirectory = (parentId: string) => { - onCreateFolder({ [titlePropName]: 'new', [viewElement?.options.treeNodeParentKey || 'parent']: parentId }).then( + onCreateFolder({ [titlePropName]: 'new', [viewKindElement?.options.treeNodeParentKey || 'parent']: parentId }).then( (e: any) => { const data = [...treeData]; loop(data, parentId, (item: any) => { @@ -281,7 +281,7 @@ export const TreeRenderer: React.FC = (props) => { setVisible(false)} - schemaUri={viewElement.resultsScope} + schemaUri={viewKindElement.resultsScope} onCancel={() => setVisible(false)} /> = observer(({ form, onCancel, onS }); export const AntdFormLayout: React.FC = ({ - viewElement, - view, + viewKindElement, + viewKind, enabled, title, visible, @@ -97,9 +97,9 @@ export const AntdFormLayout: React.FC = ({ @@ -109,5 +109,5 @@ export const AntdFormLayout: React.FC = ({ ); }; -export const antdFormLayoutTester: RankedTester = rankWith(2, uiTypeIs('FormLayout')); +export const antdFormLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:FormLayout')); export const AntdFormLayoutWithStore = withStoreToFormProps(AntdFormLayout); diff --git a/src/layouts/AntdHorizontalLayout.tsx b/src/layouts/AntdHorizontalLayout.tsx index 3d18769..7606683 100644 --- a/src/layouts/AntdHorizontalLayout.tsx +++ b/src/layouts/AntdHorizontalLayout.tsx @@ -18,27 +18,33 @@ import { renderLayoutElements } from '../util/layout'; import { Idx } from '../util/layout'; import { LayoutComponent } from './LayoutComponent'; -export const AntdHorizontalLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible }) => { - //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, viewElement, view, enabled, form }) => { - const options = viewElement.options || {}; +export const AntdHorizontalLayoutRenderer: React.FC = ({ + viewKindElement, + viewKind, + enabled, + visible, +}) => { + //const layout = viewKindElement as Layout; + const Render: React.FC = ({ idx, viewKindElement, viewKind, enabled, form }) => { + const options = viewKindElement.options || {}; const style: any = options.style; - const span = options.contentSize || !viewElement.elements ? undefined : Math.ceil(24 / viewElement.elements.length); + const span = + options.contentSize || !viewKindElement.elements ? undefined : Math.ceil(24 / viewKindElement.elements.length); return ( - + ); }; - const justify: any = viewElement.options ? viewElement.options.justify : 'center'; + const justify: any = viewKindElement.options ? viewKindElement.options.justify : 'center'; const rowStyle: any = { flexWrap: 'nowrap' }; - if (viewElement.options && viewElement.options.width === 'all-empty-space') rowStyle.width = '100%'; + if (viewKindElement.options && viewKindElement.options.width === 'all-empty-space') rowStyle.width = '100%'; return ( - {renderLayoutElements({ viewElement, view, enabled, Render })} + {renderLayoutElements({ viewKindElement, viewKind, enabled, Render })} ); }; -export const antdHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('HorizontalLayout')); +export const antdHorizontalLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:HorizontalLayout')); export const AntdHorizontalLayoutWithStore = withLayoutProps(AntdHorizontalLayoutRenderer); diff --git a/src/layouts/AntdVerticalLayout.tsx b/src/layouts/AntdVerticalLayout.tsx index a21a64e..5d4a345 100644 --- a/src/layouts/AntdVerticalLayout.tsx +++ b/src/layouts/AntdVerticalLayout.tsx @@ -19,23 +19,23 @@ import { Idx } from '../util/layout'; import { LayoutComponent } from './LayoutComponent'; export const AntdVerticalLayoutRenderer: React.FC = ({ - viewElement, - view, + viewKindElement, + viewKind, enabled, visible, form, }) => { - const Render: React.FC = ({ idx, viewElement, view, enabled }) => { - const options = viewElement.options || {}; + const Render: React.FC = ({ idx, viewKindElement, viewKind, enabled }) => { + const options = viewKindElement.options || {}; const style: any = options.style; return ( - + ); @@ -43,11 +43,11 @@ export const AntdVerticalLayoutRenderer: React.FC = ({ return (
- {renderLayoutElements({ viewElement, view, enabled, Render })} + {renderLayoutElements({ viewKindElement, viewKind, enabled, Render })}
); }; -export const antdVerticalLayoutTester: RankedTester = rankWith(2, uiTypeIs('VerticalLayout')); +export const antdVerticalLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:VerticalLayout')); export const AntdVerticalLayoutWithStore = withLayoutProps(AntdVerticalLayoutRenderer); diff --git a/src/layouts/SplitPaneLayout.tsx b/src/layouts/SplitPaneLayout.tsx index 9df3a42..1afb8cd 100644 --- a/src/layouts/SplitPaneLayout.tsx +++ b/src/layouts/SplitPaneLayout.tsx @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ -import React, { ReactElement } from 'react'; +import React from 'react'; import SplitPane from 'react-split-pane'; import Pane from 'react-split-pane/lib/Pane'; @@ -17,7 +17,7 @@ import { withLayoutProps } from '../util/ContextToProps'; import { LayoutComponent } from './LayoutComponent'; import { Idx, RenderLayoutProps } from '../util/layout'; -import { ViewElement } from '../models/uischema'; +import { IViewKindElement } from '../models/uischema'; const divStyle: React.CSSProperties = { position: 'relative', @@ -26,17 +26,17 @@ const divStyle: React.CSSProperties = { margin: '1px', }; -const renderSplitElements = ({ viewElement, view, enabled, Render, form }: RenderLayoutProps) => { - const elements = viewElement.elements; - const defaultSize = viewElement.options && viewElement.options.defaultSize; +const renderSplitElements = ({ viewKindElement, viewKind, enabled, Render, form }: RenderLayoutProps) => { + const elements = viewKindElement.elements; + const defaultSize = viewKindElement.options && viewKindElement.options.defaultSize; return elements ? ( - elements.map((el: ViewElement, idx: number) => { + elements.map((el: IViewKindElement, idx: number) => { const id = el['@id'] || el.resultsScope || ''; const style = el.options && el.options.style; return (
- +
); @@ -46,23 +46,23 @@ const renderSplitElements = ({ viewElement, view, enabled, Render, form }: Rende ); }; -export const SplitPaneLayoutRenderer: React.FC = ({ viewElement, view, enabled, visible }) => { - //const layout = viewElement as Layout; - const Render: React.FC = ({ idx, viewElement, view, enabled }) => { +export const SplitPaneLayoutRenderer: React.FC = ({ viewKindElement, viewKind, enabled, visible }) => { + //const layout = viewKindElement as Layout; + const Render: React.FC = ({ idx, viewKindElement, viewKind, enabled }) => { return (
- +
); }; return ( - {renderSplitElements({ viewElement, view, enabled, Render })} + {renderSplitElements({ viewKindElement, viewKind, enabled, Render })} ); }; -export const splitPaneLayoutTester: RankedTester = rankWith(2, uiTypeIs('SplitPaneLayout')); +export const splitPaneLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:SplitPaneLayout')); export const SplitPaneLayoutWithStore = withLayoutProps(SplitPaneLayoutRenderer); diff --git a/src/layouts/TabsLayout.tsx b/src/layouts/TabsLayout.tsx index bbd9552..c69c29c 100644 --- a/src/layouts/TabsLayout.tsx +++ b/src/layouts/TabsLayout.tsx @@ -15,14 +15,14 @@ import { rankWith, RankedTester, uiTypeIs } from '../testers'; import { withLayoutProps } from '../util/ContextToProps'; export const TabsLayout: React.FC = (props) => { - const { enabled, onSelect = () => {}, viewElement, view } = props; - const elements = viewElement.elements; + const { enabled, onSelect = () => {}, viewKindElement, viewKind } = props; + const elements = viewKindElement.elements; const viewTabs = elements ? elements.map((e: any, index: number) => { const title = e.options && e.options.title; return ( - + ); }) @@ -36,5 +36,5 @@ export const TabsLayout: React.FC = (props) => { ); }; -export const antdTabsLayoutTester: RankedTester = rankWith(2, uiTypeIs('TabsLayout')); +export const antdTabsLayoutTester: RankedTester = rankWith(2, uiTypeIs('aldkg:TabsLayout')); export const AntdTabsLayoutWithStore = withLayoutProps(TabsLayout); diff --git a/src/models/MstViewDescr.ts b/src/models/MstViewDescr.ts new file mode 100644 index 0000000..b900b9f --- /dev/null +++ b/src/models/MstViewDescr.ts @@ -0,0 +1,256 @@ +/******************************************************************************** + * Copyright (c) 2020 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +import { reaction } from 'mobx'; +import { + getParent, + getRoot, + IAnyComplexType, + IAnyModelType, + IAnyStateTreeNode, + IAnyType, + SnapshotIn, + types, +} from 'mobx-state-tree'; + +import { + arrDiff, + CollState, + createModelFromState, + JsObject, + MstCollConstr, + MstModels, + registerMstCollSchema, + SparqlClient, +} from '@agentlab/sparql-jsld-client'; + +/*********************** + * View Kind + ***********************/ + +export const MstViewKindElement = types.model('MstViewKindElement', { + '@id': types.identifier, // JSON-LD object id + '@type': types.string, //types.union(types.literal('aldkg:ViewElement'), types.literal('aldkg:DiagramEditor')), // JSON-LD class id of a View + + title: types.maybe(types.union(types.string, types.frozen())), + description: types.maybe(types.union(types.string, types.frozen())), + + scope: types.maybe(types.string), + resultsScope: types.maybe(types.string), + options: types.maybe(types.frozen()), + + style: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.maybe(types.array(types.late((): IAnyType => MstViewKindDataType))), +}); + +const mstViewKindSchemas: MstModels = {}; + +export function registerMstViewKindSchema(id: string, t: IAnyComplexType): void { + console.log('register mstViewKindSchema', { id, t }); + mstViewKindSchemas[id] = t; +} + +export function unregisterMstViewKindSchema(id: string): IAnyComplexType { + const t = mstViewKindSchemas[id]; + delete mstViewKindSchemas[id]; + return t; +} + +export const MstViewKindDataType = types.union( + { + dispatcher: (snapshot: any) => { + if (snapshot) { + const mstModel = mstViewKindSchemas[snapshot['@type']]; + if (mstModel) { + //console.log('ViewKindDataType, create mstModel for', snapshot['@id'], mstModel.name); + return mstModel; + } + } + //console.log('ViewKindDataType, create ViewKindElement for', snapshot['@id']); + return MstViewKindElement; + }, + }, + MstViewKindElement, +); + +/** + * View Kind, which could be persisted in DB + */ +export const MstViewKind = types + .model('MstViewKind', { + '@id': types.identifier, // JSON-LD object id of a viewKind + '@type': types.string, // JSON-LD class id of a View + + title: types.maybe(types.string), // mandatory title + description: types.maybe(types.string), + + options: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.array(MstViewKindDataType), + + collsConstrs: types.array(MstCollConstr), // former 'queries' + }) + .actions((self) => { + const rep: IAnyStateTreeNode = getRoot(self); + const coll: IAnyStateTreeNode = getParent(self, 2); + let dispose: any; + return { + afterAttach() { + console.log('ViewKind afterAttach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + dispose = reaction( + () => self.collsConstrs, + (newArr: any[], oldArr: any[]) => { + console.log('ViewKind reaction, add coll ref, @id=', self['@id']); + const { deleted, added } = arrDiff(newArr, oldArr); + console.log('ViewKind reaction, add coll ref, {deleted,added}=', { deleted, added }); + deleted.forEach((e: any) => rep.colls.delete(e['@id'])); + added.forEach((e: any) => rep.addCollByConstrRef(e)); + }, + { fireImmediately: true, name: 'ViewKind-Attach' }, + ); + } + }, + beforeDetach() { + console.log('ViewKind beforeDetach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + if (dispose) dispose(); + self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); + } + }, + setCollConstrs(collsConstrs: any[]) { + const collsConstrsObservables = collsConstrs.map((cc) => MstCollConstr.create(cc)); + self.collsConstrs.push(...collsConstrsObservables); + }, + }; + }); + +export type IViewKindSnapshotIn = SnapshotIn; + +/*********************** + * View Description + ***********************/ + +export const MstViewDescrElement = types.model('MstViewDescrElement', { + '@id': types.identifier, // JSON-LD object id + '@type': types.string, //types.union(types.literal('aldkg:ViewElement'), types.literal('aldkg:DiagramEditor')), // JSON-LD class id of a View + '@parent': types.safeReference(types.late((): IAnyModelType => MstViewKindElement)), + + title: types.maybe(types.union(types.string, types.frozen())), + description: types.maybe(types.union(types.string, types.frozen())), + + scope: types.maybe(types.string), + resultsScope: types.maybe(types.string), + options: types.maybe(types.frozen()), + + style: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.maybe(types.array(types.late((): IAnyType => MstViewDescrDataType))), +}); + +const mstViewDescrSchemas: MstModels = {}; + +export function registerMstViewDescrSchema(id: string, t: IAnyComplexType): void { + console.log('register mstViewDescrSchema', { id, t }); + mstViewDescrSchemas[id] = t; +} + +export function unregisterMstViewDescrSchema(id: string): IAnyComplexType { + const t = mstViewDescrSchemas[id]; + delete mstViewDescrSchemas[id]; + return t; +} + +export const MstViewDescrDataType = types.union( + { + dispatcher: (snapshot: any) => { + if (snapshot) { + const mstModel = mstViewDescrSchemas[snapshot['@type']]; + if (mstModel) { + //console.log('ViewDescrDataType, create mstModel for', snapshot['@id'], mstModel.name); + return mstModel; + } + } + //console.log('ViewDescrDataType, create ViewDescrElement for', snapshot['@id']); + return MstViewDescrElement; + }, + }, + MstViewDescrElement, +); + +/** + * View Description, which could be persisted in DB + */ +export const MstViewDescr = types + .model('MstViewDescr', { + '@id': types.identifier, // JSON-LD object id of a viewKind + '@type': types.string, // JSON-LD class id of a View + viewKind: types.safeReference(MstViewKind), + + title: types.maybe(types.string), // mandatory title + description: types.maybe(types.string), + + options: types.maybe(types.frozen()), + + // Container-specific (e.g. Layout, type: 'xxxLayout') + elements: types.array(MstViewDescrDataType), + + collsConstrs: types.array(MstCollConstr), // former 'queries' + }) + .actions((self) => { + const rep: IAnyStateTreeNode = getRoot(self); + const coll: IAnyStateTreeNode = getParent(self, 2); + let dispose: any; + return { + afterAttach() { + console.log('MstViewDescr afterAttach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + dispose = reaction( + () => self.collsConstrs, + (newArr: any[], oldArr: any[]) => { + console.log('MstViewDescr reaction, add coll ref, @id=', self['@id']); + const { deleted, added } = arrDiff(newArr, oldArr); + console.log('MstViewDescr reaction, add coll ref, {deleted,added}=', { deleted, added }); + deleted.forEach((e: any) => rep.colls.delete(e['@id'])); + added.forEach((e: any) => rep.addCollByConstrRef(e)); + }, + { fireImmediately: true, name: 'MstViewDescr-Attach' }, + ); + } + }, + beforeDetach() { + console.log('MstViewDescr beforeDetach, @id=', self['@id']); + if (coll.resolveCollConstrs) { + if (dispose) dispose(); + self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); + } + }, + setCollConstrs(collsConstrs: any[]) { + const collsConstrsObservables = collsConstrs.map((cc) => MstCollConstr.create(cc)); + self.collsConstrs.push(...collsConstrsObservables); + }, + }; + }); + +export type IViewDescrSnapshotIn = SnapshotIn; + +export const createUiModelFromState = ( + repId: string, + client: SparqlClient, + initialState: any, + additionalColls: CollState[] | undefined = undefined, +): any => { + registerMstCollSchema('aldkg:ViewKind', MstViewKind); + registerMstCollSchema('aldkg:ViewDescr', MstViewDescr); + return createModelFromState(repId, client, initialState, additionalColls); +}; diff --git a/src/models/MstViewSchemas.ts b/src/models/MstViewSchemas.ts new file mode 100644 index 0000000..c5e08e8 --- /dev/null +++ b/src/models/MstViewSchemas.ts @@ -0,0 +1,30 @@ +/******************************************************************************** + * Copyright (c) 2021 Agentlab and others. + * + * This program and the accompanying materials are made available under the + * terms of the GNU General Public License v. 3.0 which is available at + * https://www.gnu.org/licenses/gpl-3.0.html. + * + * SPDX-License-Identifier: GPL-3.0-only + ********************************************************************************/ +import { reaction } from 'mobx'; +import { + getParent, + getRoot, + IAnyComplexType, + IAnyModelType, + IAnyStateTreeNode, + IAnyType, + SnapshotIn, + types, +} from 'mobx-state-tree'; + +import { MstViewKindElement } from './MstViewDescr'; + +export const MstVerticalLayout = types.compose( + 'MstVerticalLayout', + MstViewKindElement, + types.model({ + '@type': types.literal('aldkg:VerticalLayout'), + }), +); diff --git a/src/stores/ViewCollConstrs.ts b/src/models/ViewCollConstrs.ts similarity index 100% rename from src/stores/ViewCollConstrs.ts rename to src/models/ViewCollConstrs.ts diff --git a/src/stores/ViewShapeSchema.ts b/src/models/ViewShapeSchema.ts similarity index 100% rename from src/stores/ViewShapeSchema.ts rename to src/models/ViewShapeSchema.ts diff --git a/src/models/uischema.ts b/src/models/uischema.ts index 40b123a..bb0a2ab 100644 --- a/src/models/uischema.ts +++ b/src/models/uischema.ts @@ -7,40 +7,64 @@ * * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ -export interface ViewElement { + +import { ICollConstrJsOpt } from '@agentlab/sparql-jsld-client'; + +export interface IViewDescrElement { '@id': string; '@type': string; + '@parent'?: string; + title?: string; description?: string; - viewKind?: string; - type: string; - //order?: string[]; - //queries?: any[]; scope?: string; resultsScope?: string; options?: { [key: string]: any; }; - elements?: ViewElement[]; + elements?: IViewDescrElement[]; +} + +export interface IViewDescr { + '@id': string; + '@type': string; + viewKind?: string; + + title?: string; + description?: string; + + options?: { + [key: string]: any; + }; + elements: IViewDescrElement[]; + collsConstrs: ICollConstrJsOpt[]; } -export type View = ViewElement; -export interface ViewClassElement { - '@id'?: string; - '@type'?: string; +export interface IViewKindElement { + '@id': string; + '@type': string; + title?: string; description?: string; - queries?: any[]; - type: string; + scope?: string; resultsScope?: string; options?: { [key: string]: any; }; + elements?: IViewKindElement[]; } -export interface Layout extends ViewClassElement { - elements: (Layout | ViewClassElement)[]; -} +export interface IViewKind { + '@id': string; + '@type': string; -export declare type ViewClass = Layout | ViewClassElement; + title?: string; + description?: string; + + options?: { + [key: string]: any; + }; + elements: IViewKindElement[]; + collsConstrs: ICollConstrJsOpt[]; +} diff --git a/src/stores/ViewDescr.ts b/src/stores/ViewDescr.ts deleted file mode 100644 index fd83b37..0000000 --- a/src/stores/ViewDescr.ts +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 Agentlab and others. - * - * This program and the accompanying materials are made available under the - * terms of the GNU General Public License v. 3.0 which is available at - * https://www.gnu.org/licenses/gpl-3.0.html. - * - * SPDX-License-Identifier: GPL-3.0-only - ********************************************************************************/ -import { reaction } from 'mobx'; -import { getParent, getRoot, IAnyModelType, IAnyStateTreeNode, SnapshotIn, types } from 'mobx-state-tree'; - -import { - arrDiff, - CollConstr, - CollState, - JsObject, - SparqlClient, - registerMstSchema, - createModelFromState, -} from '@agentlab/sparql-jsld-client'; - -export const ViewElement = types.model('ViewElement', { - '@id': types.maybe(types.string), // JSON-LD object id of a view - '@type': types.maybe(types.string), // JSON-LD class id of a View - title: types.maybe(types.string), - description: types.maybe(types.string), - //viewKind: types.maybe(types.string), - - type: types.string, - scope: types.maybe(types.string), - resultsScope: types.maybe(types.string), - options: types.maybe(types.frozen()), - - // Container-specific (e.g. Layout, type: 'xxxLayout') - elements: types.maybe(types.array(types.late((): IAnyModelType => ViewElement))), -}); - -/** - * View Kind, which could be persisted in DB - */ -export const ViewKind = types - .model('ViewKind', { - '@id': types.identifier, // JSON-LD object id of a view - '@type': types.string, // JSON-LD class id of a View - - title: types.maybe(types.string), // mandatory title - description: types.maybe(types.string), - - type: types.string, - scope: types.maybe(types.string), - resultsScope: types.maybe(types.string), - options: types.maybe(types.frozen()), - - // Container-specific (e.g. Layout, type: 'xxxLayout') - elements: types.array(ViewElement), - - collsConstrs: types.array(CollConstr), // former 'queries' - }) - .actions((self) => { - const rep: IAnyStateTreeNode = getRoot(self); - const coll: IAnyStateTreeNode = getParent(self, 2); - let disp: any; - return { - afterAttach() { - console.log('ViewKind afterAttach, @id=', self['@id']); - if (coll.resolveCollConstrs) { - disp = reaction( - () => self.collsConstrs, - (newArr: any[], oldArr: any[]) => { - console.log('ViewKind reaction, add coll ref, @id=', self['@id']); - const { deleted, added } = arrDiff(newArr, oldArr); - console.log('ViewKind reaction, add coll ref, {deleted,added}=', { deleted, added }); - deleted.forEach((e: any) => rep.colls.delete(e['@id'])); - added.forEach((e: any) => rep.addCollByConstrRef(e)); - }, - { fireImmediately: true }, - ); - } - }, - beforeDetach() { - console.log('ViewKind beforeDetach, @id=', self['@id']); - if (coll.resolveCollConstrs) { - if (disp) disp(); - self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); - } - }, - setCollConstrs(collsConstrs: any[]) { - const ccso = collsConstrs.map((cc) => CollConstr.create(cc)); - self.collsConstrs.push(...ccso); - }, - }; - }); - -export type IViewKindSnapshotIn = SnapshotIn; - -/** - * View Description, which could be persisted in DB - */ -export const ViewDescr = types - .model('ViewDescr', { - '@id': types.identifier, // JSON-LD object id of a view - '@type': types.string, // JSON-LD class id of a View - viewKind: types.maybe(types.string), - - title: types.maybe(types.string), // mandatory title - description: types.maybe(types.string), - - type: types.string, - scope: types.maybe(types.string), - resultsScope: types.maybe(types.string), - options: types.maybe(types.frozen()), - - // Container-specific (e.g. Layout, type: 'xxxLayout') - elements: types.array(ViewElement), - - collsConstrs: types.array(CollConstr), // former 'queries' - }) - .actions((self) => { - const rep: IAnyStateTreeNode = getRoot(self); - const coll: IAnyStateTreeNode = getParent(self, 2); - let disp: any; - return { - afterAttach() { - console.log('ViewDescr afterAttach, @id=', self['@id']); - if (coll.resolveCollConstrs) { - disp = reaction( - () => self.collsConstrs, - (newArr: any[], oldArr: any[]) => { - console.log('ViewDescr reaction, add coll ref, @id=', self['@id']); - const { deleted, added } = arrDiff(newArr, oldArr); - console.log('ViewDescr reaction, add coll ref, {deleted,added}=', { deleted, added }); - deleted.forEach((e: any) => rep.colls.delete(e['@id'])); - added.forEach((e: any) => rep.addCollByConstrRef(e)); - }, - { fireImmediately: true }, - ); - } - }, - beforeDetach() { - console.log('ViewDescr beforeDetach, @id=', self['@id']); - if (coll.resolveCollConstrs) { - if (disp) disp(); - self.collsConstrs.forEach((e) => rep.colls.delete(e['@id'])); - } - }, - setCollConstrs(collsConstrs: any[]) { - const ccso = collsConstrs.map((cc) => CollConstr.create(cc)); - self.collsConstrs.push(...ccso); - }, - }; - }); - -export type IViewDescrSnapshotIn = SnapshotIn; - -export const createUiModelFromState = ( - repId: string, - client: SparqlClient, - initialState: any, - additionalColls: CollState[] | undefined = undefined, -): any => { - registerMstSchema('aldkg:ViewKind', ViewKind); - registerMstSchema('aldkg:ViewDescr', ViewDescr); - return createModelFromState(repId, client, initialState, additionalColls); -}; diff --git a/src/testers.ts b/src/testers.ts index 9cb4b88..987edaa 100644 --- a/src/testers.ts +++ b/src/testers.ts @@ -8,8 +8,9 @@ * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ import { find, includes, isArray, isEmpty } from 'lodash-es'; + import { JsonSchema7 } from './models/jsonSchema7'; -import { ViewElement } from './models/uischema'; +import { IViewKindElement } from './models/uischema'; /* eslint-disable @typescript-eslint/naming-convention */ @@ -22,7 +23,7 @@ export const NOT_APPLICABLE = -1; /** * A tester is a function that receives an UI schema and a JSON schema and returns a boolean. */ -export type Tester = (viewElement: ViewElement, schema: JsonSchema7) => boolean; +export type Tester = (viewKindElement: IViewKindElement, schema: JsonSchema7) => boolean; /** * A tester that allow composing other testers by && them. @@ -31,8 +32,8 @@ export type Tester = (viewElement: ViewElement, schema: JsonSchema7) => boolean; */ export const and = (...testers: Tester[]): Tester => - (viewElement: ViewElement, schema: JsonSchema7) => - testers.reduce((acc, tester) => acc && tester(viewElement, schema), true); + (viewKindElement: IViewKindElement, schema: JsonSchema7) => + testers.reduce((acc, tester) => acc && tester(viewKindElement, schema), true); /** * A tester that allow composing other testers by || them. @@ -41,8 +42,8 @@ export const and = */ export const or = (...testers: Tester[]): Tester => - (viewElement: ViewElement, schema: JsonSchema7) => - testers.reduce((acc, tester) => acc || tester(viewElement, schema), false); + (viewKindElement: IViewKindElement, schema: JsonSchema7) => + testers.reduce((acc, tester) => acc || tester(viewKindElement, schema), false); /** * Create a ranked tester that will associate a number with a given tester, if the @@ -53,8 +54,8 @@ export const or = */ export const rankWith = (rank: number, tester: Tester) => - (viewElement: ViewElement, schema: JsonSchema7): number => { - if (tester(viewElement, schema)) { + (viewKindElement: IViewKindElement, schema: JsonSchema7): number => { + if (tester(viewKindElement, schema)) { return rank; } @@ -68,8 +69,8 @@ export const rankWith = */ export const uiTypeIs = (expected: string): Tester => - (viewElement: ViewElement): boolean => - !isEmpty(viewElement) && viewElement.type === expected; + (viewKindElement: IViewKindElement): boolean => + !isEmpty(viewKindElement) && viewKindElement['@type'] === expected; /** * Checks whether the given UI schema has an option with the given @@ -81,19 +82,19 @@ export const uiTypeIs = */ export const optionIs = (optionName: string, optionValue: any): Tester => - (viewElement: ViewElement): boolean => { - if (isEmpty(viewElement)) { + (viewKindElement: IViewKindElement): boolean => { + if (isEmpty(viewKindElement)) { return false; } - const options = (viewElement as any).options; + const options = (viewKindElement as any).options; return !isEmpty(options) && options[optionName] === optionValue; }; /** * A ranked tester associates a tester with a number. */ -export declare type RankedTester = (viewElement: ViewElement, schema: JsonSchema7) => number; +export declare type RankedTester = (viewKindElement: IViewKindElement, schema: JsonSchema7) => number; export const hasType = (jsonSchema: JsonSchema7, expected: string): boolean => { return includes(deriveTypes(jsonSchema), expected); @@ -142,8 +143,8 @@ const deriveTypes = (jsonSchema: JsonSchema7): string[] => { */ export const schemaMatches = (predicate: (schema: JsonSchema7) => boolean): Tester => - (viewElement: ViewElement, schema: JsonSchema7): boolean => { - if (isEmpty(viewElement) /*|| !isControl(uischema)*/) { + (viewKindElement: IViewKindElement, schema: JsonSchema7): boolean => { + if (isEmpty(viewKindElement) /*|| !isControl(uischema)*/) { return false; } if (isEmpty(schema)) { @@ -193,24 +194,24 @@ export const formatIs = (expectedFormat: string): Tester => * has a 'date' format. * @type {Tester} */ -export const isDateControl = /*and(uiTypeIs('Control'),*/ formatIs('date' /*)*/); +export const isDateControl = /*and(uiTypeIs('aldkg:Control'),*/ formatIs('date' /*)*/); /** * Tests whether the given UI schema is of type Control and if the schema * has a 'date-time' format. * @type {Tester} */ -export const isDateTimeControl = /*and(uiTypeIs('Control'),*/ formatIs('date-time' /*)*/); +export const isDateTimeControl = /*and(uiTypeIs('aldkg:Control'),*/ formatIs('date-time' /*)*/); /** * Default tester for boolean. * @type {RankedTester} */ -export const isBooleanControl = /*and(uiTypeIs('Control'),*/ schemaTypeIs('boolean' /*)*/); +export const isBooleanControl = /*and(uiTypeIs('aldkg:Control'),*/ schemaTypeIs('boolean' /*)*/); export const isEnumControl = /*and( - uiTypeIs('Control'),*/ + uiTypeIs('aldkg:Control'),*/ or( schemaMatches((schema) => schema.enum !== undefined), schemaMatches((schema) => schema.const !== undefined), @@ -222,21 +223,21 @@ export const isEnumControl = * is of type integer * @type {Tester} */ -export const isIntegerControl = /*and(uiTypeIs('Control'),*/ schemaTypeIs('integer' /*)*/); +export const isIntegerControl = /*and(uiTypeIs('aldkg:Control'),*/ schemaTypeIs('integer' /*)*/); /** * Tests whether the given UI schema is of type Control and if the schema * is of type number * @type {Tester} */ -export const isNumberControl = /*and(uiTypeIs('Control'),*/ schemaTypeIs('number' /*)*/); +export const isNumberControl = /*and(uiTypeIs('aldkg:Control'),*/ schemaTypeIs('number' /*)*/); /** * Tests whether the given UI schema is of type Control and if the schema * is of type string * @type {Tester} */ -export const isStringControl = /*and(uiTypeIs('Control'),*/ schemaTypeIs('string' /*)*/); +export const isStringControl = /*and(uiTypeIs('aldkg:Control'),*/ schemaTypeIs('string' /*)*/); /** * Tests whether a given UI schema is of type Control, @@ -245,7 +246,7 @@ export const isStringControl = /*and(uiTypeIs('Control'),*/ schemaTypeIs('string * @type {Tester} */ export const isRangeControl = and( - /*uiTypeIs('Control'),*/ + /*uiTypeIs('aldkg:Control'),*/ or(schemaTypeIs('number'), schemaTypeIs('integer')), schemaMatches( (schema) => schema.maximum !== undefined && schema.minimum !== undefined && schema.default !== undefined, diff --git a/src/util/AntdModal.tsx b/src/util/AntdModal.tsx index 18c22b2..f48e4a5 100644 --- a/src/util/AntdModal.tsx +++ b/src/util/AntdModal.tsx @@ -15,7 +15,7 @@ import { SaveReqDialog } from './OnSaveDialog'; import { MstContext } from '../MstContext'; export const AntdModal: React.FC = observer( - ({ id, schema, viewElement, enabled, view, cells, childrenId, Render }) => { + ({ id, schema, viewKindElement, enabled, viewKind, cells, childrenId, Render }) => { const [visible, setVisible] = useState(false); const { store } = useContext(MstContext); @@ -41,7 +41,14 @@ export const AntdModal: React.FC = observer( cancelText='Отмена' width={1200} okText='Сохранить'> - + { diff --git a/src/util/ContextToProps.tsx b/src/util/ContextToProps.tsx index f3da76b..603b58a 100644 --- a/src/util/ContextToProps.tsx +++ b/src/util/ContextToProps.tsx @@ -16,7 +16,7 @@ import { observer } from 'mobx-react-lite'; import { createLabelDescriptionFrom } from './label'; import { LayoutComponent } from '../layouts/LayoutComponent'; -import { View, ViewElement } from '../models/uischema'; +import { IViewKindElement, IViewKind } from '../models/uischema'; import { ControlComponent, RenderProps } from '../Form'; //import { FilterType } from '../complex/Query'; import { validators } from '../validation'; @@ -52,17 +52,17 @@ export const withStoreToControlProps = (Component: React.FC): const successValidation = { validateStatus: 'success', }; - const { form, viewElement } = props; - const id = viewElement.resultsScope; + const { form, viewKindElement } = props; + const id = viewKindElement.resultsScope; const [validateObj, setValidateObj] = useState<{ validateStatus: string; help?: string; }>(successValidation); const [req] = id?.split('/') || []; - const [testReq, testUri] = viewElement.resultsScope?.split('/') || []; + const [testReq, testUri] = viewKindElement.resultsScope?.split('/') || []; const { store } = useContext(MstContext); const controlProps = mapStateToControlProps(props); - //const custom = view.properties && view.properties[req] ? view.properties[req].customReq : undefined; + //const custom = viewKind.properties && viewKind.properties[req] ? viewKind.properties[req].customReq : undefined; //custom ? store.loadData(req, custom.req) : store.loadData(testReq); const coll = store.getColl(testReq); let data = coll?.data; @@ -72,19 +72,19 @@ export const withStoreToControlProps = (Component: React.FC): data = getSnapshot(data); data = data[0]; const onValidate = (data: any) => { - if (viewElement.options && Array.isArray(viewElement.options.validation)) { - const validation = viewElement.options.validation; + if (viewKindElement.options && Array.isArray(viewKindElement.options.validation)) { + const validation = viewKindElement.options.validation; const idx = validation.findIndex((el: any) => !validators[el.validator](data, el.propsToValidator)); if (idx !== -1) { const { validateStatus, help } = validation[idx]; - store.setOnValidate(form, viewElement.resultsScope, false); + store.setOnValidate(form, viewKindElement.resultsScope, false); setValidateObj({ validateStatus, help, }); } else { setValidateObj(successValidation); - store.setOnValidate(form, viewElement.resultsScope, true); + store.setOnValidate(form, viewKindElement.resultsScope, true); } } }; @@ -100,28 +100,29 @@ export const withStoreToControlProps = (Component: React.FC): {...controlProps} handleChange={(data: any) => { form - ? store.onChangeFormData(form, viewElement.resultsScope, data) - : store.onChangeData(viewElement.resultsScope, data); + ? store.onChangeFormData(form, viewKindElement.resultsScope, data) + : store.onChangeData(viewKindElement.resultsScope, data); }} /> ); }); + export const withStoreToFormProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled, form }) => { - if (!view['@id']) { + observer(({ viewKindElement, viewKind, enabled, form }) => { + if (!viewKind['@id']) { return null; } - const title = viewElement.options ? viewElement.options.title : ''; - const id = viewElement['@id']; - const enabledLayout = enabled && checkProperty('editable', id, viewElement, view); - const visible = checkProperty('visible', id, viewElement, view); + const title = viewKindElement.options ? viewKindElement.options.title : ''; + const id = viewKindElement['@id']; + const enabledLayout = enabled && checkProperty('editable', id, viewKindElement, viewKind); + const visible = checkProperty('visible', id, viewKindElement, viewKind); const { store } = useContext(MstContext); return ( store.onSaveFormData(id)} @@ -133,23 +134,24 @@ export const withStoreToFormProps = (Component: React.FC): React.FC ); }); + export const withStoreToViewClassProps = (Component: any): any => observer(({ ...props }: any) => { - const { viewElement, view } = props; + const { viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - const scope = viewElement.resultsScope; + const scope = viewKindElement.resultsScope; if (!store.getSelectedDataJs(scope)) { return ; } //const id = store.getSelectedDataJs(scope).type; - return ; + return ; }); export const withStoreToViewProps = (Component: any): any => observer(({ ...props }: any) => { - const { view, viewElement } = props; + const { viewKind, viewKindElement } = props; const { store } = useContext(MstContext); - const scope = viewElement.resultsScope; + const scope = viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data) { @@ -159,8 +161,8 @@ export const withStoreToViewProps = (Component: any): any => return ; } data = getSnapshot(data); - //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(viewElement.resultsScope); + //if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + // store.setSaveLogic(viewKindElement.resultsScope); //} //const id = store.getSelectedDataJs(scope)['@type']; //const selection = getSnapshot(store.selectedData); @@ -169,13 +171,13 @@ export const withStoreToViewProps = (Component: any): any => return ; } const newViewElement = newView; - console.log('withStoreToViewProps', { view, viewElement, newView, newViewElement }); + console.log('withStoreToViewProps', { viewKind, viewKindElement, newView, newViewElement }); return ( store.setEditing(viewElement.resultsScope, state)} + viewKindElement={newViewElement} + viewKind={newView} + onChange={(state: boolean) => store.setEditing(viewKindElement.resultsScope, state)} /> ); }); @@ -184,21 +186,23 @@ export const withStoreToModalProps = (Component: any): any => observer(({ ...props }: any) => { return ; }); + export const withStoreToButtonProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement } = props; + const { schema, viewKindElement } = props; const { store } = useContext(MstContext); - if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - store.setSaveLogic(viewElement.resultsScope); + if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + store.setSaveLogic(viewKindElement.resultsScope); } - const options = viewElement.options || {}; + const options = viewKindElement.options || {}; return {}} options={options} />; }); + export const withStoreToCellProps = (Component: React.FC): React.FC => observer((props: any) => { - const { data, onMeasureChange, height, uri, CKey, rowData, viewElement } = props; - const path = viewElement.scope ? viewElement.scope.split('/').join('.') : null; + const { data, onMeasureChange, height, uri, CKey, rowData, viewKindElement } = props; + const path = viewKindElement.scope ? viewKindElement.scope.split('/').join('.') : null; const controlProps = mapStateToControlProps(props); /*const { store } = useRootCtx(); const onSave = (data: any) => { @@ -223,15 +227,15 @@ export const withStoreToCellProps = (Component: React.FC): React.FC => export const withStoreToDataControlProps = (Component: any): any => observer(({ ...props }: any) => { - const { viewElement, view } = props; + const { viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(viewElement.resultsScope); + //if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + // store.setSaveLogic(viewKindElement.resultsScope); //} - const custom = view[viewElement.resultsScope.split('/')[0]] - ? view[view.resultsScope.split('/')[0]].customReq + const custom = viewKind[viewKindElement.resultsScope.split('/')[0]] + ? viewKind[viewKind.resultsScope.split('/')[0]].customReq : undefined; - const scope = custom ? custom : viewElement.resultsScope; + const scope = custom ? custom : viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data || data.length === 0) { @@ -240,7 +244,7 @@ export const withStoreToDataControlProps = (Component: any): any => return ; } data = cloneDeep(getSnapshot(data)); - const options = viewElement.options || {}; + const options = viewKindElement.options || {}; const withConnections = options.connections; const onChange = (data: any) => { /*if (data) { @@ -278,7 +282,7 @@ export const withStoreToDataControlProps = (Component: any): any => uri={scope} dataSource={data} editing={store.editingData.get(scope)} - viewElement={viewElement} + viewKindElement={viewKindElement} handleChange={onChange} onCreateFolder={onCreateFolder} getData={getData} @@ -292,17 +296,17 @@ export const withStoreToDataControlProps = (Component: any): any => export const withStoreToSelectControlProps = (Component: any): any => observer(({ ...props }: any) => { - const { viewElement, view } = props; + const { viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - const id = view['@id']; - const scope = viewElement.resultsScope; + const id = viewKind['@id']; + const scope = viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data) { return ; } data = getSnapshot(data); - const options = viewElement.options || {}; + const options = viewKindElement.options || {}; const withConnections = options.connections; const onChange = (data: any) => { console.log('withStoreToSelectControlProps onChange', data); @@ -317,8 +321,8 @@ export const withStoreToSelectControlProps = (Component: any): any => return ( @@ -327,16 +331,16 @@ export const withStoreToSelectControlProps = (Component: any): any => export const withStoreToTabProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view } = props; + const { schema, viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(viewElement.resultsScope); + //if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + // store.setSaveLogic(viewKindElement.resultsScope); //} - const options = viewElement.options || {}; - const custom = view[viewElement.resultsScope.split('/')[0]] - ? view[viewElement.resultsScope.split('/')[0]].customReq + const options = viewKindElement.options || {}; + const custom = viewKind[viewKindElement.resultsScope.split('/')[0]] + ? viewKind[viewKindElement.resultsScope.split('/')[0]].customReq : undefined; - const scope = custom ? custom : viewElement.resultsScope; + const scope = custom ? custom : viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data) { @@ -360,16 +364,16 @@ export const withStoreToTabProps = (Component: any): any => export const withStoreToMenuProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view } = props; + const { schema, viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(viewElement.resultsScope); + //if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + // store.setSaveLogic(viewKindElement.resultsScope); //} - const options = viewElement.options || {}; - const custom = view[viewElement.resultsScope.split('/')[0]] - ? view[viewElement.resultsScope.split('/')[0]].customReq + const options = viewKindElement.options || {}; + const custom = viewKind[viewKindElement.resultsScope.split('/')[0]] + ? viewKind[viewKindElement.resultsScope.split('/')[0]].customReq : undefined; - const scope = custom ? custom : viewElement.resultsScope; + const scope = custom ? custom : viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data) { @@ -378,9 +382,11 @@ export const withStoreToMenuProps = (Component: any): any => data = getSnapshot(data); return ( e.options && e.options.modal) : []} + modals={ + viewKindElement.elements ? viewKindElement.elements.filter((e: any) => e.options && e.options.modal) : [] + } schema={schema} - view={view} + viewKind={viewKind} uri={scope} tabs={data} handleChange={(data: JsObject) => store.setSelectedData(scope, data)} @@ -392,24 +398,24 @@ export const withStoreToMenuProps = (Component: any): any => export const withStoreToCollapseProps = (Component: any): any => observer(({ ...props }: any) => { - const { viewElement, view } = props; - const options = viewElement.options || {}; + const { viewKindElement, viewKind } = props; + const options = viewKindElement.options || {}; - return ; + return ; }); export const withStoreToArrayProps = (Component: any): any => observer(({ ...props }: any) => { - const { schema, viewElement, view } = props; + const { schema, viewKindElement, viewKind } = props; const { store } = useContext(MstContext); - //if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - // store.setSaveLogic(viewElement.resultsScope); + //if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + // store.setSaveLogic(viewKindElement.resultsScope); //} - const options = viewElement.options || {}; - const custom = view[viewElement.resultsScope.split('/')[0]] - ? view[viewElement.resultsScope.split('/')[0]].customReq + const options = viewKindElement.options || {}; + const custom = viewKind[viewKindElement.resultsScope.split('/')[0]] + ? viewKind[viewKindElement.resultsScope.split('/')[0]].customReq : undefined; - const scope = custom ? custom : viewElement.resultsScope; + const scope = custom ? custom : viewKindElement.resultsScope; const coll = store.getColl(scope); let data = coll?.data; if (!data) { @@ -430,14 +436,14 @@ export const withStoreToArrayProps = (Component: any): any => });*/ }; const loadExpandedData = (subject: string) => { - //const newQuery = store.queries[viewElement.resultsScope]; + //const newQuery = store.queries[viewKindElement.resultsScope]; //newQuery.shapes[0].conditions = { ...newQuery.shapes[0].conditions, parentBinding: subject }; return data; //store.getDataByQuery(newQuery); }; return ( }); export const withLayoutProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled, form }) => { - const id = viewElement['@id'] || ''; - const enabledLayout = enabled && checkProperty('editable', id, viewElement, view); - const visible = checkProperty('visible', id, viewElement, view); + observer(({ viewKindElement, viewKind, enabled, form }) => { + const id = viewKindElement['@id'] || ''; + const enabledLayout = enabled && checkProperty('editable', id, viewKindElement, viewKind); + const visible = checkProperty('visible', id, viewKindElement, viewKind); const { store } = useContext(MstContext); - if (viewElement.options && viewElement.options.connections) { - viewElement.options.connections.forEach((e: any) => store.setSaveLogic(e.from, e.to)); + if (viewKindElement.options && viewKindElement.options.connections) { + viewKindElement.options.connections.forEach((e: any) => store.setSaveLogic(e.from, e.to)); } - return ; + return ( + + ); }); export const withStoreToSaveButtonProps = (Component: React.FC): React.FC => - observer(({ viewElement, view, enabled }) => { + observer(({ viewKindElement, enabled }) => { const { store } = useContext(MstContext); - if (viewElement.resultsScope && !store.saveLogicTree[viewElement.resultsScope]) { - store.setSaveLogic(viewElement.resultsScope); + if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) { + store.setSaveLogic(viewKindElement.resultsScope); } - const key = viewElement.resultsScope; + const key = viewKindElement.resultsScope; return ( ): Rea return ; }); -const mapStateToControlProps = ({ id, schema, viewElement, view, enabled }: ToControlProps) => { +const mapStateToControlProps = ({ id, schema, viewKindElement, viewKind, enabled }: ToControlProps) => { const pathSegments = id.split('/'); const path = pathSegments.join('.properties.'); - const visible = checkProperty('visible', path, viewElement, view); - const editable = viewElement.options && 'editable' in viewElement.options ? viewElement.options.editable : true; + const visible = checkProperty('visible', path, viewKindElement, viewKind); + const editable = + viewKindElement.options && 'editable' in viewKindElement.options ? viewKindElement.options.editable : true; const required = true; - const uiOptions = viewElement.options; + const uiOptions = viewKindElement.options; const description = schema.description || ''; - const labelDesc = createLabelDescriptionFrom(viewElement as any, schema); + const labelDesc = createLabelDescriptionFrom(viewKindElement as any, schema); const label = labelDesc.show ? (labelDesc.text as string) : ''; const key = pathSegments[1]; return { @@ -516,9 +531,9 @@ const mapStateToControlProps = ({ id, schema, viewElement, view, enabled }: ToCo }; }; -const checkProperty = (property: Property, path: string, viewElement: ViewElement, view: View) => { - const viewClassProp = viewElement.options; - const viewProp = get(view, path); +const checkProperty = (property: Property, path: string, viewKindElement: IViewKindElement, viewKind: IViewKind) => { + const viewClassProp = viewKindElement.options; + const viewProp = get(viewKind, path); if (viewClassProp && viewClassProp[property]) { return viewClassProp[property]; } else if (viewProp && viewProp[property]) { diff --git a/src/util/layout.tsx b/src/util/layout.tsx index f918a6d..515a2e6 100644 --- a/src/util/layout.tsx +++ b/src/util/layout.tsx @@ -9,7 +9,7 @@ ********************************************************************************/ import React from 'react'; -import { ViewElement } from '../models/uischema'; +import { IViewKindElement } from '../models/uischema'; import { FormsDispatchProps } from '../Form'; export declare type Idx = { @@ -17,16 +17,16 @@ export declare type Idx = { }; export interface RenderLayoutProps extends FormsDispatchProps { - viewElement: ViewElement; + viewKindElement: IViewKindElement; Render: React.FC; } -export const renderLayoutElements = ({ viewElement, view, enabled, Render }: RenderLayoutProps) => { - const elements = viewElement.elements; - //const id = view['@id']; - //const sort = id ? view.properties && view.properties[id] && view.properties[id].order : undefined; +export const renderLayoutElements = ({ viewKindElement, viewKind, enabled, Render }: RenderLayoutProps) => { + const elements = viewKindElement.elements; + //const id = viewKind['@id']; + //const sort = id ? viewKind.properties && viewKind.properties[id] && viewKind.properties[id].order : undefined; if (!elements || elements.length === 0) return <>; - return elements.map((el: ViewElement, idx: number) => ( - + return elements.map((el: IViewKindElement, idx: number) => ( + )); }; diff --git a/stories/AntdCardCell.stories.tsx b/stories/AntdCardCell.stories.tsx index 4358d1f..341c2e7 100644 --- a/stories/AntdCardCell.stories.tsx +++ b/stories/AntdCardCell.stories.tsx @@ -24,8 +24,9 @@ import { MstContextProvider, RendererRegistryEntry, } from '../src'; -import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { createUiModelFromState } from '../src/stores/ViewDescr'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/models/ViewCollConstrs'; +import { createUiModelFromState, registerMstViewKindSchema } from '../src/models/MstViewDescr'; +import { MstVerticalLayout } from '../src/models/MstViewSchemas'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -37,7 +38,6 @@ const viewKinds = [ { '@id': 'mktp:CardCellGridViewKind', '@type': 'aldkg:ViewKind', - type: 'VerticalLayout', collsConstrs: [ { '@id': 'mktp:ViewKind_Cards_Coll', @@ -51,176 +51,193 @@ const viewKinds = [ ], }, ], - options: { - //width: 'all-empty-space', - }, // child ui elements configs elements: [ { - type: 'DataControl', - resultsScope: 'mktp:ViewKind_Cards_Coll', - options: { - renderType: 'grid', - grid: { - gutter: 16, - xs: 2, - sm: 2, - md: 3, - lg: 3, - xl: 4, - xxl: 7, - }, - elementTemplate: [ - { - type: 'CardLayout', - elements: [ - { - type: 'ImageCell', - scope: 'imageUrl', - }, - { - type: 'Control', - scope: 'name', - options: { - editable: false, - style: { - height: '3.5em', - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - overflow: 'hidden', - textOverflow: 'ellipsis', - margin: 0, - }, - }, - }, - { - type: 'Rate', - scope: 'starsValue', - options: { - editable: false, - }, - }, + '@id': 'mktp:_29kFg89', + '@type': 'aldkg:VerticalLayout', + elements: [ + { + '@id': 'mktp:_24Hdr78', + '@type': 'aldkg:DataControl', + resultsScope: 'mktp:ViewKind_Cards_Coll', + options: { + renderType: 'grid', + grid: { + gutter: 16, + xs: 2, + sm: 2, + md: 3, + lg: 3, + xl: 4, + xxl: 7, + }, + elementTemplate: [ { - type: 'CellHorizontalLayout', - options: { - justify: 'space-between', - }, + '@id': 'mktp:_94hfT67', + '@type': 'aldkg:CardLayout', elements: [ { - type: 'Control', - scope: 'price', + '@id': 'mktp:_kje733js', + '@type': 'aldkg:ImageCell', + scope: 'imageUrl', + }, + { + '@id': 'mktp:_jw563df', + '@type': 'aldkg:Control', + scope: 'name', options: { - formatter: 'labeledValue', editable: false, - label: 'Цена', - specialChar: '₽', style: { + height: '3.5em', textAlign: 'left', fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, }, }, }, { - type: 'Control', - scope: 'totalSales', + '@id': 'mktp:_84gdY576', + '@type': 'aldkg:Rate', + scope: 'starsValue', + options: { + editable: false, + }, + }, + { + '@id': 'mktp:_934Hfg78', + '@type': 'aldkg:CellHorizontalLayout', + options: { + justify: 'space-between', + }, + elements: [ + { + '@id': 'mktp:_kfg67we', + '@type': 'aldkg:Control', + scope: 'price', + options: { + formatter: 'labeledValue', + editable: false, + label: 'Цена', + specialChar: '₽', + style: { + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + { + '@id': 'mktp:_jdf782fK', + '@type': 'aldkg:Control', + scope: 'totalSales', + options: { + formatter: 'labeledValue', + editable: false, + label: 'Всего продано', + style: { + textAlign: 'right', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', + }, + }, + }, + ], + }, + { + '@id': 'mktp:_Udf783d', + '@type': 'aldkg:Control', + scope: 'lastMonthSalesAmount', options: { - formatter: 'labeledValue', editable: false, - label: 'Всего продано', + formatter: 'сomparison', + dataToFormatter: { + prevValue: 'prevMonthSalesAmount', + }, + label: 'Продажи за месяц', style: { - textAlign: 'right', + textAlign: 'left', fontFamily: 'Lato,Tahoma,sans-serif', color: 'gray', }, }, }, - ], - }, - { - type: 'Control', - scope: 'lastMonthSalesAmount', - options: { - editable: false, - formatter: 'сomparison', - dataToFormatter: { - prevValue: 'prevMonthSalesAmount', - }, - label: 'Продажи за месяц', - style: { - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - { - type: 'Control', - scope: 'lastMonthSalesValue', - options: { - formatter: 'сomparison', - editable: false, - dataToFormatter: { - prevValue: 'prevMonthSalesValue', - }, - label: 'Объем продаж', - style: { - textAlign: 'left', - fontFamily: 'Lato,Tahoma,sans-serif', - color: 'gray', - }, - }, - }, - { - type: 'G2', - }, - { - type: 'CellHorizontalLayout', - options: { - justify: 'space-around', - }, - elements: [ { - type: 'Control', - scope: '@id', + '@id': 'mktp:_iw789dd', + '@type': 'aldkg:Control', + scope: 'lastMonthSalesValue', options: { - style: { - border: '1.5px solid black', - borderRadius: '2px', - height: '2em', - textAlign: 'center', - fontWeight: 500, - width: '90px', - color: 'black', - }, - specialImage: 'https://www.meme-arsenal.com/memes/f8e9bfb9fdf368272b21a5dac8f01ec1.jpg', + formatter: 'сomparison', editable: false, - formatter: 'link', dataToFormatter: { - link: '@id', + prevValue: 'prevMonthSalesValue', + }, + label: 'Объем продаж', + style: { + textAlign: 'left', + fontFamily: 'Lato,Tahoma,sans-serif', + color: 'gray', }, - label: 'Wildberries', }, }, { - type: 'Button', + '@id': 'mktp:_385hgf67', + '@type': 'aldkg:G2', + }, + { + '@id': 'mktp:_jfg789df', + '@type': 'aldkg:CellHorizontalLayout', options: { - label: 'Добавить', - style: { - border: '1.5px solid black', - borderRadius: '2px', - width: '90px', - fontWeight: 500, - color: 'black', - }, + justify: 'space-around', }, + elements: [ + { + '@id': 'mktp:_45jdfg78', + '@type': 'aldkg:Control', + scope: '@id', + options: { + style: { + border: '1.5px solid black', + borderRadius: '2px', + height: '2em', + textAlign: 'center', + fontWeight: 500, + width: '90px', + color: 'black', + }, + specialImage: 'https://www.meme-arsenal.com/memes/f8e9bfb9fdf368272b21a5dac8f01ec1.jpg', + editable: false, + formatter: 'link', + dataToFormatter: { + link: '@id', + }, + label: 'Wildberries', + }, + }, + { + '@id': 'mktp:_dfg897', + '@type': 'aldkg:Button', + options: { + label: 'Добавить', + style: { + border: '1.5px solid black', + borderRadius: '2px', + width: '90px', + fontWeight: 500, + color: 'black', + }, + }, + }, + ], }, ], }, ], }, - ], - }, + }, + ], }, ], }, @@ -231,11 +248,10 @@ const viewDescrs = [ '@id': 'mktp:CardCellViewDescr', '@type': 'aldkg:ViewDescr', viewKind: 'mktp:CardCellGridViewKind', - type: 'VerticalLayout', title: 'CardCellGrid', description: 'CardCellGrid', collsConstrs: [ - { + /*{ '@id': 'mktp:ViewDescr_Cards_Coll', '@type': 'aldkg:CollConstr', entConstrs: [ @@ -245,11 +261,9 @@ const viewDescrs = [ schema: 'hs:ProductCardShape', }, ], - }, + },*/ ], - options: { - //width: 'all-empty-space', - }, + options: {}, // child ui elements configs elements: [], }, @@ -279,6 +293,8 @@ const additionalColls: CollState[] = [ }, ]; +registerMstViewKindSchema('aldkg:VerticalLayout', MstVerticalLayout); + const client = new SparqlClientImpl('https://rdf4j.agentlab.ru/rdf4j-server'); const rootStore = createUiModelFromState('mktp', client, rootModelInitialState, additionalColls); console.log('rootStore', rootStore); @@ -305,11 +321,7 @@ export const Empty: Story<{}> = () => ( margin: '0 auto', padding: '5px', }}> -
+ diff --git a/stories/Form.stories.tsx b/stories/Form.stories.tsx index 2396acf..57bd827 100644 --- a/stories/Form.stories.tsx +++ b/stories/Form.stories.tsx @@ -23,18 +23,18 @@ import { antdControlRenderers, antdLayoutRenderers, } from '../src'; -import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { createUiModelFromState } from '../src/stores/ViewDescr'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/models/ViewCollConstrs'; +import { createUiModelFromState } from '../src/models/MstViewDescr'; const antdRenderers: RendererRegistryEntry[] = [...antdControlRenderers, ...antdLayoutRenderers]; const viewKinds = [ { '@id': 'rm:FormViewKind', - '@type': 'aldkg:ViewDescr', + '@type': 'aldkg:ViewKind', title: 'Малая форма', description: 'Small form', - type: 'FormLayout', + collsConstrs: [ { '@id': 'rm:FormView_Artifacts_Coll', @@ -51,28 +51,37 @@ const viewKinds = [ ], elements: [ { - type: 'Control', - resultsScope: 'rm:FormView_Artifacts_Coll/creator', - }, - { - type: 'Control', - resultsScope: 'rm:FormView_Artifacts_Coll/assetFolder', - }, - { - type: 'Control', - resultsScope: 'rm:FormView_Artifacts_Coll/description', - options: { - validation: [ - { - validator: 'RegExp', - propsToValidator: { - regExp: 'bo*', - }, - validateStatus: 'error', - help: 'Работает', + '@id': 'rm:_83hd7f', + '@type': 'aldkg:FormLayout', + elements: [ + { + '@id': 'rm:_17Gj78', + '@type': 'aldkg:Control', + resultsScope: 'rm:FormView_Artifacts_Coll/creator', + }, + { + '@id': 'rm:_297Hgf56', + '@type': 'aldkg:Control', + resultsScope: 'rm:FormView_Artifacts_Coll/assetFolder', + }, + { + '@id': 'rm:_934jHd67', + '@type': 'aldkg:Control', + resultsScope: 'rm:FormView_Artifacts_Coll/description', + options: { + validation: [ + { + validator: 'RegExp', + propsToValidator: { + regExp: 'bo*', + }, + validateStatus: 'error', + help: 'Работает', + }, + ], }, - ], - }, + }, + ], }, ], }, @@ -83,13 +92,9 @@ const viewDescrs = [ '@id': 'rm:FormViewDescr', '@type': 'aldkg:ViewDescr', viewKind: 'rm:FormViewKind', - type: 'VerticalLayout', title: 'CardCellGrid', description: 'CardCellGrid', collsConstrs: [], - options: { - //width: 'all-empty-space', - }, // child ui elements configs elements: [], }, @@ -137,11 +142,7 @@ const Template: Story = (args: any) => (
- +
diff --git a/stories/Tree.stories.tsx b/stories/Tree.stories.tsx index 7b7fbae..cece893 100644 --- a/stories/Tree.stories.tsx +++ b/stories/Tree.stories.tsx @@ -138,13 +138,13 @@ export default { export const Empty: Story<{}> = () => (
= () => (
- +
diff --git a/stories/TreeAndFormArtifact.stories.tsx b/stories/TreeAndFormArtifact.stories.tsx index 924c5aa..ac98d14 100644 --- a/stories/TreeAndFormArtifact.stories.tsx +++ b/stories/TreeAndFormArtifact.stories.tsx @@ -24,8 +24,8 @@ import { MstContextProvider, RendererRegistryEntry, } from '../src'; -import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { createUiModelFromState } from '../src/stores/ViewDescr'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/models/ViewCollConstrs'; +import { createUiModelFromState } from '../src/models/MstViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -35,8 +35,8 @@ const antdRenderers: RendererRegistryEntry[] = [ const viewKinds = [ { - '@id': 'mktp:TreeAndFormArtifactViewKind', - '@type': 'aldkg:ViewDescr', + '@id': 'rm:TreeAndFormArtifactViewKind', + '@type': 'aldkg:ViewKind', title: 'TreeAndForm', description: 'TreeAndForm', collsConstrs: [ @@ -64,54 +64,63 @@ const viewKinds = [ //orderBy: [{ expression: variable('identifier0'), descending: false }], }, ], - type: 'SplitPaneLayout', - options: { - defaultSize: { - 'rm:Folders_Coll': '17%', - ArtifactForm: '83%', - }, - height: 'all-empty-space', - //width: 'all-empty-space', - }, // child ui elements configs elements: [ { - type: 'DataControl', - resultsScope: 'rm:Folders_Coll', - options: { - renderType: 'tree', - }, - }, - { - '@id': 'ArtifactForm', - type: 'FormLayout', + '@id': 'rm:_kf8Df7', + '@type': 'aldkg:SplitPaneLayout', options: { - title: 'Aртефакт', + defaultSize: { + 'rm:Folders_Coll': '17%', + 'rm:_fgu778f': '83%', + }, + height: 'all-empty-space', + //width: 'all-empty-space', }, elements: [ { - type: 'Control', - resultsScope: 'rm:Artifacts_Coll/creator', - }, - { - type: 'Control', - resultsScope: 'rm:Artifacts_Coll/assetFolder', + '@id': 'rm:_9fKJ7dv', + '@type': 'aldkg:DataControl', + resultsScope: 'rm:Folders_Coll', + options: { + renderType: 'tree', + }, }, { - type: 'Control', - resultsScope: 'rm:Artifacts_Coll/description', + '@id': 'rm:_fgu778f', + '@type': 'aldkg:FormLayout', options: { - validation: [ - { - validator: 'RegExp', - propsToValidator: { - regExp: 'bo*', - }, - validateStatus: 'error', - help: 'Работает', - }, - ], + title: 'Aртефакт', }, + elements: [ + { + '@id': 'rm:_kf8Jdf', + '@type': 'aldkg:Control', + resultsScope: 'rm:Artifacts_Coll/creator', + }, + { + '@id': 'rm:_9dF78', + '@type': 'aldkg:Control', + resultsScope: 'rm:Artifacts_Coll/assetFolder', + }, + { + '@id': 'rm:_37Jdf67', + '@type': 'aldkg:Control', + resultsScope: 'rm:Artifacts_Coll/description', + options: { + validation: [ + { + validator: 'RegExp', + propsToValidator: { + regExp: 'bo*', + }, + validateStatus: 'error', + help: 'Работает', + }, + ], + }, + }, + ], }, ], }, @@ -121,16 +130,13 @@ const viewKinds = [ const viewDescrs = [ { - '@id': 'mktp:TreeAndFormArtifactViewDescr', + '@id': 'rm:TreeAndFormArtifactViewDescr', '@type': 'aldkg:ViewDescr', - viewKind: 'mktp:TreeAndFormArtifactViewKind', - type: 'VerticalLayout', + viewKind: 'rm:TreeAndFormArtifactViewKind', title: 'CardCellGrid', description: 'CardCellGrid', collsConstrs: [], - options: { - //width: 'all-empty-space', - }, + options: {}, // child ui elements configs elements: [], }, @@ -178,11 +184,7 @@ export const Empty: Story<{}> = () => (
- +
diff --git a/stories/TreeAndFormColumns.stories.tsx b/stories/TreeAndFormColumns.stories.tsx index 3847a6b..05b067a 100644 --- a/stories/TreeAndFormColumns.stories.tsx +++ b/stories/TreeAndFormColumns.stories.tsx @@ -24,8 +24,8 @@ import { MstContextProvider, RendererRegistryEntry, } from '../src'; -import { viewKindCollConstr, viewDescrCollConstr } from '../src/stores/ViewCollConstrs'; -import { createUiModelFromState } from '../src/stores/ViewDescr'; +import { viewKindCollConstr, viewDescrCollConstr } from '../src/models/ViewCollConstrs'; +import { createUiModelFromState } from '../src/models/MstViewDescr'; const antdRenderers: RendererRegistryEntry[] = [ ...antdControlRenderers, @@ -36,7 +36,7 @@ const antdRenderers: RendererRegistryEntry[] = [ const viewKinds = [ { '@id': 'mktp:TreeAndFormViewKind', - '@type': 'aldkg:ViewDescr', + '@type': 'aldkg:ViewKind', title: 'TreeAndForm', description: 'TreeAndForm', collsConstrs: [ @@ -53,169 +53,195 @@ const viewKinds = [ //orderBy: [{ expression: variable('identifier0'), descending: false }], }, ], - type: 'SplitPaneLayout', - options: { - defaultSize: { - 'rm:Folders_Coll': '17%', - ArtifactForm: '83%', - }, - height: 'all-empty-space', - //width: 'all-empty-space', - }, // child ui elements configs elements: [ { - '@id': 'ArtifactForm', - type: 'HorizontalLayout', + '@id': 'mktp:_92Jf4u78', + '@type': 'aldkg:SplitPaneLayout', options: { - justify: 'start', // start end center space-between space-around - //contentSize: true, - style: { - //flexGrow: '5', - width: '100%', + defaultSize: { + 'rm:Folders_Coll': '17%', + 'mktp:_87Dfg78': '83%', }, - width: 'all-empty-space', + height: 'all-empty-space', + //width: 'all-empty-space', }, elements: [ { - type: 'VerticalLayout', - options: { - style: { - width: '50%', - }, - width: 'all-empty-space', - }, - elements: [ - /*{ - type: 'Control', - resultsScope: 'rm:Cards_Coll/identifier', - },*/ - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/name', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/country', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/brand', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/price', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/saleValue', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/seller', - }, - ], - }, - { - type: 'VerticalLayout', + '@id': 'mktp:_87Dfg78', + '@type': 'aldkg:HorizontalLayout', options: { + justify: 'start', // start end center space-between space-around + //contentSize: true, style: { - width: '50%', + //flexGrow: '5', + width: '100%', }, width: 'all-empty-space', }, elements: [ { - type: 'Control', - resultsScope: 'rm:Cards_Coll/categoryPopularity', + '@id': 'mktp:_93JhdA78', + '@type': 'aldkg:VerticalLayout', + options: { + style: { + width: '50%', + }, + width: 'all-empty-space', + }, + elements: [ + /*{ + '@id': 'mktp:_92KdFj6', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/identifier', + },*/ + { + '@id': 'mktp:_63JdF67', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/name', + }, + { + '@id': 'mktp:_Kjd7F7s8', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/country', + }, + { + '@id': 'mktp:_Kf893Jd6', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/brand', + }, + { + '@id': 'mktp:_K84jd^', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/price', + }, + { + '@id': 'mktp:_dF7jdF6', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/saleValue', + }, + { + '@id': 'mktp:_93Kdf7j', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/seller', + }, + ], }, { - type: 'Control', - resultsScope: 'rm:Cards_Coll/commentsCount', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/starsValue', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/questionsCount', - }, + '@id': 'mktp:_87Kdf3Ry7', + '@type': 'aldkg:VerticalLayout', + options: { + style: { + width: '50%', + }, + width: 'all-empty-space', + }, + elements: [ + { + '@id': 'mktp:_93Kd8hH', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/categoryPopularity', + }, + { + '@id': 'mktp:_j7JG8d', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/commentsCount', + }, + { + '@id': 'mktp:_fg78Dfj6', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/starsValue', + }, + { + '@id': 'mktp:_924KFhf7', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/questionsCount', + }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/lastMonthSalesAmount', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/lastMonthSalesValue', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/perMonthSalesAmount', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/perMonthSalesValue', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/prevMonthSalesAmount', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/prevMonthSalesValue', - }, + { + '@id': 'mktp:_Kd83457', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/lastMonthSalesAmount', + }, + { + '@id': 'mktp:_8385jKd', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/lastMonthSalesValue', + }, + { + '@id': 'mktp:_8357KhfEm', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/perMonthSalesAmount', + }, + { + '@id': 'mktp:_956jsnH', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/perMonthSalesValue', + }, + { + '@id': 'mktp:_834LdjR', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/prevMonthSalesAmount', + }, + { + '@id': 'mktp:_935jFhj', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/prevMonthSalesValue', + }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/salesAmountDiff', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/totalSales', + { + '@id': 'mktp:_912JdmF', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/salesAmountDiff', + }, + { + '@id': 'mktp:_935KfH', + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/totalSales', + }, + /*{ + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/totalSalesDiff', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/stocks', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/stocksDiffOrders', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/stocksDiffReturns', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/rootId', + }, + + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/photosCount', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/firstParsedAt', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/lastMonthParsedAt', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/parsedAt', + }, + { + '@type': 'aldkg:Control', + resultsScope: 'rm:Cards_Coll/prevParsedAt', + },*/ + ], }, - /*{ - type: 'Control', - resultsScope: 'rm:Cards_Coll/totalSalesDiff', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/stocks', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/stocksDiffOrders', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/stocksDiffReturns', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/rootId', - }, - - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/photosCount', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/firstParsedAt', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/lastMonthParsedAt', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/parsedAt', - }, - { - type: 'Control', - resultsScope: 'rm:Cards_Coll/prevParsedAt', - },*/ ], }, ], @@ -229,13 +255,10 @@ const viewDescrs = [ '@id': 'mktp:TreeAndFormViewDescr', '@type': 'aldkg:ViewDescr', viewKind: 'mktp:TreeAndFormViewKind', - type: 'VerticalLayout', title: 'CardCellGrid', description: 'CardCellGrid', collsConstrs: [], - options: { - //width: 'all-empty-space', - }, + options: {}, // child ui elements configs elements: [], }, @@ -283,11 +306,7 @@ export const Empty: Story<{}> = () => (
- +
From fd69d4614dcc783e408b1e3a200ca57e86c32ebc Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 16 Aug 2021 22:03:17 +0300 Subject: [PATCH 09/10] [deps] GH-5 Update deps --- package.json | 12 +-- yarn.lock | 201 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 175 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 5677cff..035b0d2 100644 --- a/package.json +++ b/package.json @@ -50,11 +50,11 @@ "lint-staged": "lint-staged" }, "peerDependencies": { - "@agentlab/sparql-jsld-client": ">=5.0.0-rc.9", + "@agentlab/sparql-jsld-client": ">=5.0.0-rc.10", "@ant-design/icons": ">=4.6.2", "@tinymce/tinymce-react": ">=3.12.6", "antd": ">=4.16.11", - "history": ">=5.0.0", + "history": ">=5.0.1", "lodash-es": ">=4.17.21", "mobx": ">=6.3.2", "mobx-react-lite": ">=3.2.0", @@ -72,17 +72,17 @@ "uri-js": ">=4.4.1" }, "dependencies": { - "@agentlab/sparql-jsld-client": "^5.0.0-rc.9", + "@agentlab/sparql-jsld-client": "^5.0.0-rc.10", "@ant-design/icons": "^4.6.2", "@tinymce/tinymce-react": "^3.12.6", - "@types/react": "^17.0.17", + "@types/react": "^17.0.18", "@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", - "history": "^5.0.0", + "history": "^5.0.1", "mobx-react-lite": "^3.2.0", "mst-middlewares": "^5.0.2", "react": "^17.0.2", @@ -100,7 +100,7 @@ "uri-js": "^4.4.1" }, "devDependencies": { - "@babel/core": "^7.14.6", + "@babel/core": "^7.15.0", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-typescript": "^8.2.5", diff --git a/yarn.lock b/yarn.lock index 7b9a4f4..97b9f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,16 +2,16 @@ # yarn lockfile v1 -"@agentlab/sparql-jsld-client@^5.0.0-rc.9": - version "5.0.0-rc.9" - resolved "https://registry.yarnpkg.com/@agentlab/sparql-jsld-client/-/sparql-jsld-client-5.0.0-rc.9.tgz#c91316343cdf79da8b5953103998745083a27e60" - integrity sha512-oxGBRsJUzZHxqUaeaOTuQx9aNM6UhopW5cVkYOtJi3UUkTwd5ytcS5FKMCnxnfta5UrI+rS2m9mtqJL05E1mWA== +"@agentlab/sparql-jsld-client@^5.0.0-rc.10": + version "5.0.0-rc.10" + resolved "https://registry.yarnpkg.com/@agentlab/sparql-jsld-client/-/sparql-jsld-client-5.0.0-rc.10.tgz#767984028595ff895866ae05449ac332b010405c" + integrity sha512-SdqyGGyLDznrD/gI0JDVmG3wXqEfysAYNxOTnfrq3RlExGxo2mxO4QhGjf3eeaEAPKc3/ci8s841xLB1ldv9Gw== dependencies: - "@rdfjs/data-model" "^1.2.0" - "@types/json-schema" "^7.0.7" + "@rdfjs/data-model" "^1.3.3" + "@types/json-schema" "^7.0.9" "@types/lodash-es" "^4.17.4" "@types/rdf-js" "^4.0.2" - "@types/sparqljs" "^3.1.2" + "@types/sparqljs" "^3.1.3" axios "^0.21.1" is-url "^1.2.4" jsonld "^5.2.0" @@ -19,7 +19,7 @@ mobx "^6.3.2" mobx-state-tree "^5.0.2" moment "^2.29.1" - rdf-literal "^1.2.0" + rdf-literal "^1.3.0" sparqljs "^3.4.2" utility-types "^3.10.0" uuid62 "^1.0.1" @@ -84,6 +84,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== + "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" @@ -106,7 +111,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.14.6", "@babel/core@^7.7.2", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.7.2", "@babel/core@^7.7.5": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== @@ -127,6 +132,27 @@ semver "^6.3.0" source-map "^0.5.0" +"@babel/core@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" + integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" + "@babel/helper-module-transforms" "^7.15.0" + "@babel/helpers" "^7.14.8" + "@babel/parser" "^7.15.0" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.14.5", "@babel/generator@^7.7.2": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785" @@ -136,6 +162,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== + dependencies: + "@babel/types" "^7.15.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61" @@ -161,6 +196,16 @@ browserslist "^4.16.6" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.14.6": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542" @@ -246,6 +291,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== + dependencies: + "@babel/types" "^7.15.0" + "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" @@ -267,6 +319,20 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" + "@babel/helper-simple-access" "^7.14.8" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + "@babel/helper-optimise-call-expression@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" @@ -303,6 +369,16 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.0" + "@babel/helper-optimise-call-expression" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + "@babel/helper-simple-access@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" @@ -310,6 +386,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== + dependencies: + "@babel/types" "^7.14.8" + "@babel/helper-skip-transparent-expression-wrappers@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz#96f486ac050ca9f44b009fbe5b7d394cab3a0ee4" @@ -329,6 +412,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + "@babel/helper-validator-option@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" @@ -353,6 +441,15 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helpers@^7.14.8": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.3.tgz#c96838b752b95dcd525b4e741ed40bb1dc2a1357" + integrity sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g== + dependencies: + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -367,6 +464,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.7.tgz#6099720c8839ca865a2637e6c85852ead0bdb595" integrity sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA== +"@babel/parser@^7.15.0": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" + integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA== + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e" @@ -1152,6 +1254,21 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-function-name" "^7.14.5" + "@babel/helper-hoist-variables" "^7.14.5" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.14.5", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" @@ -1160,6 +1277,14 @@ "@babel/helper-validator-identifier" "^7.14.5" to-fast-properties "^2.0.0" +"@babel/types@^7.14.8", "@babel/types@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz#860ce718b0b73f4009e153541faff2cb6b85d047" @@ -1643,10 +1768,10 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q== -"@rdfjs/data-model@^1.2.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@rdfjs/data-model/-/data-model-1.3.1.tgz#65e1e7f9fe0c1306c0e3be8e7cad2712c8581182" - integrity sha512-vTzm+1uFIAZNokEYTZaJeApv7E0X6aYT+3QCrbDWJASgCxtF6jU2SzjRWgGhkr9AgFQ+pb/7HjrYLbf2vvnUBw== +"@rdfjs/data-model@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@rdfjs/data-model/-/data-model-1.3.3.tgz#be4b078915acac989f1848904f183afcb0b81e0a" + integrity sha512-oo9U3nEowTxxML7CZybujL3e/bty4aXHDSWanWXQxfnJQYKU6p5SCgkjeRbuVfQ9lAVfdvz68Qq5D4LtGWuKug== dependencies: "@types/rdf-js" "*" @@ -2825,6 +2950,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@^7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -3011,10 +3141,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17.0.17": - version "17.0.17" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.17.tgz#1772d3d5425128e0635a716f49ef57c2955df055" - integrity sha512-nrfi7I13cAmrd0wje8czYpf5SFbryczCtPzFc6ijqvdjKcyA3tCvGxwchOUlxb2ucBPuJ9Y3oUqKrRqZvrz0lw== +"@types/react@^17.0.18": + version "17.0.18" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.18.tgz#4109cbbd901be9582e5e39e3d77acd7b66bb7fbe" + integrity sha512-YTLgu7oS5zvSqq49X5Iue5oAbVGhgPc5Au29SJC4VeE17V6gASoOxVkUDy9pXFMRFxCWCD9fLeweNFizo3UzOg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -3042,10 +3172,10 @@ resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== -"@types/sparqljs@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@types/sparqljs/-/sparqljs-3.1.2.tgz#b6fdd046d82fbfb4035cadbde84cac6505836f83" - integrity sha512-tLfrnBuK37P2Bn8Fo7Qik95sBXYHw5D+gq3MMq1HVyoTpCWivwPnP0Mmd7Apamdc9eH3mLJwIZIETHCQ6HxMUw== +"@types/sparqljs@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@types/sparqljs/-/sparqljs-3.1.3.tgz#e4b9a2511bc2f14f564559ed6cf567835791a7e9" + integrity sha512-nmFgmR6ns4i8sg9fYu+293H+PMLKmDOZy34sgwgAeUEEiIqSs4guj5aCZRt3gq1g0yuKXkqrxLDq/684g7pGtQ== dependencies: rdf-js "^4.0.2" @@ -7314,10 +7444,10 @@ highlight.js@^10.1.1, highlight.js@~10.7.0: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== -history@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/history/-/history-5.0.0.tgz#0cabbb6c4bbf835addb874f8259f6d25101efd08" - integrity sha512-3NyRMKIiFSJmIPdq7FxkNMJkQ7ZEtVblOQ38VtKaA0zZMW1Eo6Q6W8oDKEflr1kNNTItSnk4JMCO1deeSgbLLg== +history@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/history/-/history-5.0.1.tgz#de35025ed08bce0db62364b47ebbf9d97b5eb06a" + integrity sha512-5qC/tFUKfVci5kzgRxZxN5Mf1CV8NmJx9ByaPX0YTLx5Vz3Svh7NYp6eA4CpDq4iA9D0C1t8BNIfvQIrUI3mVw== dependencies: "@babel/runtime" "^7.7.6" @@ -11411,13 +11541,20 @@ rdf-canonize@^3.0.0: dependencies: setimmediate "^1.0.5" -rdf-data-factory@^1.0.1, rdf-data-factory@^1.0.4: +rdf-data-factory@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/rdf-data-factory/-/rdf-data-factory-1.0.4.tgz#4e22fc462620fbca650eb2d26c4a13a103edd777" integrity sha512-ZIIwEkLcV7cTc+atvQFzAETFVRHz1BRe/MhdkZqYse8vxskErj8/bF/Ittc3B5c0GTyw6O3jVF2V7xBRGyRoSQ== dependencies: "@types/rdf-js" "^4.0.0" +rdf-data-factory@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/rdf-data-factory/-/rdf-data-factory-1.1.0.tgz#d0510b9f100dd79e94f29559a12d4a5a585054d6" + integrity sha512-g8feOVZ/KL1OK2Pco/jDBDFh4m29QDsOOD+rWloG9qFvIzRFchGy2CviLUX491E0ByewXxMpaq/A3zsWHQA16A== + dependencies: + "@rdfjs/types" "*" + rdf-js@*, rdf-js@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/rdf-js/-/rdf-js-4.0.2.tgz#f01510528bbfc6e004012b71a8a533896c4c4c10" @@ -11425,13 +11562,13 @@ rdf-js@*, rdf-js@^4.0.2: dependencies: "@rdfjs/types" "*" -rdf-literal@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/rdf-literal/-/rdf-literal-1.2.0.tgz#3159cce5587007144ea4a3a713cea31af4fc0c68" - integrity sha512-N7nyfp/xzoiUuJt0xZ80BvBGkCPwWejgVDkCxWDSuooXKSows4ToW+KouYkMHLcoFzGg1Rlw2lk6btjMJg5aSA== +rdf-literal@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rdf-literal/-/rdf-literal-1.3.0.tgz#7524f09e51ae25ca03b1d600260a0f6834fe0baf" + integrity sha512-5u5L4kPYNZANie5AE4gCXqwpNO/p9E/nUcDurk05XAOJT/pt9rQlDk6+BX7j3dNSee3h9GS4xlLoWxQDj7sXtg== dependencies: - "@types/rdf-js" "^4.0.0" - rdf-data-factory "^1.0.1" + "@rdfjs/types" "*" + rdf-data-factory "^1.1.0" react-colorful@^5.1.2: version "5.2.2" From 5fdbebcf31c40d58dc2d708c33292f78600bd7d1 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 16 Aug 2021 22:07:39 +0300 Subject: [PATCH 10/10] [refactor] GH-5 MstJsObject, informative UnknownRenderer --- .storybook/main.js | 7 ++++--- src/DispatchCell.tsx | 6 +++++- src/Form.tsx | 2 +- src/models/MstViewDescr.ts | 22 +++++++++++----------- src/models/MstViewSchemas.ts | 12 +----------- 5 files changed, 22 insertions(+), 27 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index c94fbfc..6826365 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -19,7 +19,8 @@ module.exports = { }, ], // https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration - //typescript: { - // check: true, // type-check stories during Storybook build - //} + typescript: { + check: false, // type-check stories during Storybook build + reactDocgen: false, //'react-docgen-typescript', + }, }; diff --git a/src/DispatchCell.tsx b/src/DispatchCell.tsx index 69939bd..bd1d477 100644 --- a/src/DispatchCell.tsx +++ b/src/DispatchCell.tsx @@ -25,7 +25,11 @@ export const DispatchCell: React.FC = React.memo( if (renderer === undefined || renderer.tester(viewKindElement, schema) === -1) { return ( - + ); } else { diff --git a/src/Form.tsx b/src/Form.tsx index 4561925..406c76d 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -185,7 +185,7 @@ export const Form: React.FC = observer //} const viewKindObs = viewDescrObs.viewKind; if (!viewKindObs) { - console.log('!viewKindObs', viewKindObs); + console.log('!viewKindObs for viewDescr', getSnapshot(viewDescrObs)); return ; } const viewKind: any = getSnapshot(viewKindObs); diff --git a/src/models/MstViewDescr.ts b/src/models/MstViewDescr.ts index b900b9f..18e2e46 100644 --- a/src/models/MstViewDescr.ts +++ b/src/models/MstViewDescr.ts @@ -23,8 +23,8 @@ import { arrDiff, CollState, createModelFromState, - JsObject, MstCollConstr, + MstJsObject, MstModels, registerMstCollSchema, SparqlClient, @@ -38,14 +38,14 @@ export const MstViewKindElement = types.model('MstViewKindElement', { '@id': types.identifier, // JSON-LD object id '@type': types.string, //types.union(types.literal('aldkg:ViewElement'), types.literal('aldkg:DiagramEditor')), // JSON-LD class id of a View - title: types.maybe(types.union(types.string, types.frozen())), - description: types.maybe(types.union(types.string, types.frozen())), + title: types.maybe(types.union(types.string, MstJsObject)), + description: types.maybe(types.union(types.string, MstJsObject)), scope: types.maybe(types.string), resultsScope: types.maybe(types.string), - options: types.maybe(types.frozen()), + options: types.maybe(MstJsObject), - style: types.maybe(types.frozen()), + style: types.maybe(MstJsObject), // Container-specific (e.g. Layout, type: 'xxxLayout') elements: types.maybe(types.array(types.late((): IAnyType => MstViewKindDataType))), @@ -92,7 +92,7 @@ export const MstViewKind = types title: types.maybe(types.string), // mandatory title description: types.maybe(types.string), - options: types.maybe(types.frozen()), + options: types.maybe(MstJsObject), // Container-specific (e.g. Layout, type: 'xxxLayout') elements: types.array(MstViewKindDataType), @@ -145,14 +145,14 @@ export const MstViewDescrElement = types.model('MstViewDescrElement', { '@type': types.string, //types.union(types.literal('aldkg:ViewElement'), types.literal('aldkg:DiagramEditor')), // JSON-LD class id of a View '@parent': types.safeReference(types.late((): IAnyModelType => MstViewKindElement)), - title: types.maybe(types.union(types.string, types.frozen())), - description: types.maybe(types.union(types.string, types.frozen())), + title: types.maybe(types.union(types.string, MstJsObject)), + description: types.maybe(types.union(types.string, MstJsObject)), scope: types.maybe(types.string), resultsScope: types.maybe(types.string), - options: types.maybe(types.frozen()), + options: types.maybe(MstJsObject), - style: types.maybe(types.frozen()), + style: types.maybe(MstJsObject), // Container-specific (e.g. Layout, type: 'xxxLayout') elements: types.maybe(types.array(types.late((): IAnyType => MstViewDescrDataType))), @@ -200,7 +200,7 @@ export const MstViewDescr = types title: types.maybe(types.string), // mandatory title description: types.maybe(types.string), - options: types.maybe(types.frozen()), + options: types.maybe(MstJsObject), // Container-specific (e.g. Layout, type: 'xxxLayout') elements: types.array(MstViewDescrDataType), diff --git a/src/models/MstViewSchemas.ts b/src/models/MstViewSchemas.ts index c5e08e8..a7f38f2 100644 --- a/src/models/MstViewSchemas.ts +++ b/src/models/MstViewSchemas.ts @@ -7,17 +7,7 @@ * * SPDX-License-Identifier: GPL-3.0-only ********************************************************************************/ -import { reaction } from 'mobx'; -import { - getParent, - getRoot, - IAnyComplexType, - IAnyModelType, - IAnyStateTreeNode, - IAnyType, - SnapshotIn, - types, -} from 'mobx-state-tree'; +import { types } from 'mobx-state-tree'; import { MstViewKindElement } from './MstViewDescr';