From 64b3ec159a3ab8929b81ad09b51d8d16fee38aa5 Mon Sep 17 00:00:00 2001 From: Ayobami Akingbade Date: Sat, 24 Feb 2024 13:39:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(container):=20use=20containe?= =?UTF-8?q?r=20queries=20for=20grids?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 439 +++++++----------- package.json | 29 +- .../DatabaseConfigDataPersistenceAdaptor.ts | 8 +- .../app/LayoutImpl/RenderNavigation.tsx | 16 +- .../components/SchemaForm/form-grid.ts | 15 - .../components/SchemaForm/form-grid.tsx | 26 ++ src/frontend/components/SchemaForm/index.tsx | 9 +- .../components/Dropdown/index.tsx | 6 +- .../design-system/components/Table/Body.tsx | 5 +- src/frontend/design-system/constants/grid.ts | 4 +- src/frontend/design-system/theme/useTheme.ts | 28 +- .../views/Dashboard/List/_BaseDashboard.tsx | 16 +- .../Dashboard/Manage/_BaseManageDashboard.tsx | 1 + src/frontend/views/data/Table/portal/index.ts | 1 + src/frontend/views/data/Table/portal/main.tsx | 19 + .../views/data/Table/useTableColumns.tsx | 34 +- src/frontend/views/data/_BaseEntityForm.tsx | 10 +- .../data/buildAppliedSchemaFormConfig.ts | 64 +-- src/shared/types/data-sources.ts | 8 +- 19 files changed, 357 insertions(+), 381 deletions(-) delete mode 100644 src/frontend/components/SchemaForm/form-grid.ts create mode 100644 src/frontend/components/SchemaForm/form-grid.tsx diff --git a/package-lock.json b/package-lock.json index 2357e027b..3a3ba888b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,16 @@ { "name": "dashpress", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dashpress", - "version": "1.0.1", + "version": "1.0.2", "license": "GPL-3.0-or-later", "dependencies": { - "@dashpress/bacteria": "^0.0.11", + "@dashpress/bacteria": "^0.0.12", "@tanstack/react-table": "^8.7.9", - "@types/cryptr": "^4.0.1", - "@types/formidable": "^3.4.5", - "@types/jsonwebtoken": "^8.5.8", - "@types/lodash": "^4.14.182", - "@types/microseconds": "^0.2.0", - "@types/nodemailer": "^6.4.6", - "@types/prismjs": "^1.26.0", - "@types/qs": "^6.9.7", - "@types/ramda": "0.27.40", - "@types/react": "^18.0.11", - "@types/react-datepicker": "^4.4.1", - "@types/styled-components": "^5.1.25", "axios": "^1.2.1", "bcrypt": "^5.0.1", "change-case": "^4.1.2", @@ -45,7 +33,6 @@ "next": "12.3.1", "nodemailer": "^6.8.0", "path": "^0.12.7", - "polished": "^4.2.2", "prismjs": "^1.28.0", "qs": "^6.11.0", "ramda": "0.27.1", @@ -69,7 +56,7 @@ "react-tooltip": "^5.7.4", "react-use": "^17.4.0", "redis": "^4.4.0", - "styled-components": "^5.3.6", + "styled-components": "^6.1.8", "terminal-link": "^3.0.0", "tiny-skeleton-loader-react": "^1.2.1", "winston": "^3.8.2", @@ -96,8 +83,18 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.1", + "@types/cryptr": "^4.0.1", + "@types/formidable": "^3.4.5", + "@types/jsonwebtoken": "^8.5.8", + "@types/lodash": "^4.14.182", + "@types/microseconds": "^0.2.0", "@types/node": "^18.0.0", - "@types/react": "^18.0.9", + "@types/nodemailer": "^6.4.6", + "@types/prismjs": "^1.26.0", + "@types/qs": "^6.9.7", + "@types/ramda": "0.27.40", + "@types/react": "^18.0.11", + "@types/react-datepicker": "^4.4.1", "@types/react-dom": "^18.0.4", "@typescript-eslint/eslint-plugin": "^5.31.0", "@typescript-eslint/parser": "^5.31.0", @@ -551,6 +548,7 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dev": true, "dependencies": { "@babel/types": "^7.22.5" }, @@ -3337,9 +3335,9 @@ } }, "node_modules/@dashpress/bacteria": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/@dashpress/bacteria/-/bacteria-0.0.11.tgz", - "integrity": "sha512-i3ebzS8SpHZV566ayZNDAEC3ifYJme3YIoIfivhz0gvmDlWnUgvOrwV4IHCVRbp0wB8Fm8s5MvorupztAwmWlA==", + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@dashpress/bacteria/-/bacteria-0.0.12.tgz", + "integrity": "sha512-Q0K2xQ48kUCm2sl8+jIYr7Cx/oTbbpHSNBwukFQ6xjJVk4rgSovji9LHD+CA1pf6rJdM9LIWehmfJSNZKGUT9Q==", "dependencies": { "@types/fs-extra": "^9.0.13", "@types/pg": "^8.6.5", @@ -3634,25 +3632,17 @@ "license": "MIT" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.3.tgz", - "integrity": "sha512-RFg04p6C+1uO19uG8N+vqanzKqiM9eeV1LDOG3bmkYmuOj7NbKNlFC/4EZq5gnwAIlcC/jOT24f8Td0iax2SXA==", - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", "dependencies": { - "@emotion/memoize": "^0.7.4" + "@emotion/memoize": "^0.8.1" } }, - "node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", - "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==", - "license": "MIT" - }, "node_modules/@emotion/memoize": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz", - "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==", - "license": "MIT" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "node_modules/@emotion/provider": { "version": "0.11.2", @@ -3743,12 +3733,6 @@ "csstype": "^3.0.2" } }, - "node_modules/@emotion/serialize/node_modules/@emotion/unitless": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", - "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==", - "license": "MIT" - }, "node_modules/@emotion/sheet": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.0.tgz", @@ -3824,17 +3808,10 @@ "integrity": "sha512-rLu3wcBWH4P5q1CGoSSH/i9hrXs7SlbRLkoq9IGuoPYNGQvDJ3pt/wmOM+XgYjIDRMVIdkUWt0RsfzF50JfnCw==", "dev": true }, - "node_modules/@emotion/stylis": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", - "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==", - "license": "MIT" - }, "node_modules/@emotion/unitless": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", - "license": "MIT" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", + "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" }, "node_modules/@emotion/utils": { "version": "1.2.0", @@ -8522,6 +8499,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/cryptr/-/cryptr-4.0.1.tgz", "integrity": "sha512-Nn8fvr+8XYWK5h422lj4xQACfOg6vdhKI+Rh9ERa5Mg0cZvPL9Vn3845vSY07dNZnEs5cqkSNVMdhmf70lAYkA==", + "dev": true, "license": "MIT" }, "node_modules/@types/debug": { @@ -8544,6 +8522,7 @@ "version": "3.4.5", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-3.4.5.tgz", "integrity": "sha512-s7YPsNVfnsng5L8sKnG/Gbb2tiwwJTY1conOkJzTMRvJAlLFW1nEua+ADsJQu8N1c0oTHx9+d5nqg10WuT9gHQ==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -8585,16 +8564,6 @@ "@types/unist": "*" } }, - "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", - "license": "MIT", - "dependencies": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "node_modules/@types/html-minifier-terser": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz", @@ -8794,6 +8763,7 @@ "version": "8.5.8", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.8.tgz", "integrity": "sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==", + "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" @@ -8802,7 +8772,8 @@ "node_modules/@types/lodash": { "version": "4.14.195", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", - "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==" + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true }, "node_modules/@types/mdast": { "version": "3.0.11", @@ -8816,7 +8787,8 @@ "node_modules/@types/microseconds": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@types/microseconds/-/microseconds-0.2.0.tgz", - "integrity": "sha512-+UyZ10BHttSgwkFOxXiuGn9qJ0CMzM1sLWFPIjA21ddgF9nh21ZZ771OtmnTqOXn5BqtcrWwvDv88hoyIe/FMw==" + "integrity": "sha512-+UyZ10BHttSgwkFOxXiuGn9qJ0CMzM1sLWFPIjA21ddgF9nh21ZZ771OtmnTqOXn5BqtcrWwvDv88hoyIe/FMw==", + "dev": true }, "node_modules/@types/minimatch": { "version": "5.1.2", @@ -8874,6 +8846,7 @@ "version": "6.4.6", "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.6.tgz", "integrity": "sha512-pD6fL5GQtUKvD2WnPmg5bC2e8kWCAPDwMPmHe/ohQbW+Dy0EcHgZ2oCSuPlWNqk74LS5BVMig1SymQbFMPPK3w==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -8930,6 +8903,7 @@ "version": "1.26.0", "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.0.tgz", "integrity": "sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==", + "dev": true, "license": "MIT" }, "node_modules/@types/prop-types": { @@ -8941,7 +8915,8 @@ "node_modules/@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true }, "node_modules/@types/quill": { "version": "1.3.10", @@ -8955,6 +8930,7 @@ "version": "0.27.40", "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.27.40.tgz", "integrity": "sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ==", + "dev": true, "dependencies": { "ts-toolbelt": "^6.15.1" } @@ -8974,6 +8950,7 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-4.4.2.tgz", "integrity": "sha512-g8DhWvYmaIMLzVrIEVLXncylyImyBaoPsEUr3yR13JDaaHoebhDorqnVv4tLkNGa8SjBB8SAOQvxD5jaPNBX8A==", + "dev": true, "license": "MIT", "dependencies": { "@popperjs/core": "^2.9.2", @@ -9036,16 +9013,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/styled-components": { - "version": "5.1.26", - "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.26.tgz", - "integrity": "sha512-KuKJ9Z6xb93uJiIyxo/+ksS7yLjS1KzG6iv5i78dhVg/X3u5t1H7juRWqVmodIdz6wGVaIApo1u01kmFRdJHVw==", - "license": "MIT", - "dependencies": { - "@types/hoist-non-react-statics": "*", - "@types/react": "*", - "csstype": "^3.0.2" - } + "node_modules/@types/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==" }, "node_modules/@types/tapable": { "version": "1.0.8", @@ -10684,28 +10655,6 @@ "react-docgen": "^5.0.0" } }, - "node_modules/babel-plugin-styled-components": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", - "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", - "license": "MIT", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-module-imports": "^7.16.0", - "babel-plugin-syntax-jsx": "^6.18.0", - "lodash": "^4.17.11", - "picomatch": "^2.3.0" - }, - "peerDependencies": { - "styled-components": ">= 2" - } - }, - "node_modules/babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==", - "license": "MIT" - }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -11654,10 +11603,12 @@ } }, "node_modules/camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==", - "license": "MIT" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/caniuse-api": { "version": "3.0.0", @@ -13524,7 +13475,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", - "license": "ISC", "engines": { "node": ">=4" } @@ -13654,10 +13604,9 @@ } }, "node_modules/css-to-react-native": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", - "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", - "license": "MIT", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", "dependencies": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -13824,10 +13773,9 @@ "license": "MIT" }, "node_modules/csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "license": "MIT" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/currently-unhandled": { "version": "0.4.1", @@ -24534,6 +24482,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -24627,6 +24576,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz", "integrity": "sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==", + "dev": true, "dependencies": { "@babel/runtime": "^7.17.8" }, @@ -24644,10 +24594,9 @@ } }, "node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", - "dev": true, + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -25454,7 +25403,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, "funding": [ { "type": "github", @@ -26345,7 +26293,8 @@ "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", @@ -29566,25 +29515,22 @@ } }, "node_modules/styled-components": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.6.tgz", - "integrity": "sha512-hGTZquGAaTqhGWldX7hhfzjnIYBZ0IXQXkCYdvF1Sq3DsUaLx6+NTHC5Jj1ooM2F68sBiVz3lvhfwQs/S3l6qg==", - "hasInstallScript": true, - "license": "MIT", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.8.tgz", + "integrity": "sha512-PQ6Dn+QxlWyEGCKDS71NGsXoVLKfE1c3vApkvDYS5KAK+V8fNWGhbSUEo9Gg2iaID2tjLXegEW3bZDUGpofRWw==", "dependencies": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.4.5", - "@emotion/is-prop-valid": "^1.1.0", - "@emotion/stylis": "^0.8.4", - "@emotion/unitless": "^0.7.4", - "babel-plugin-styled-components": ">= 1.12.0", - "css-to-react-native": "^3.0.0", - "hoist-non-react-statics": "^3.0.0", - "shallowequal": "^1.1.0", - "supports-color": "^5.5.0" + "@emotion/is-prop-valid": "1.2.1", + "@emotion/unitless": "0.8.0", + "@types/stylis": "4.2.0", + "css-to-react-native": "3.2.0", + "csstype": "3.1.2", + "postcss": "8.4.31", + "shallowequal": "1.1.0", + "stylis": "4.3.1", + "tslib": "2.5.0" }, "engines": { - "node": ">=10" + "node": ">= 16" }, "funding": { "type": "opencollective", @@ -29592,30 +29538,13 @@ }, "peerDependencies": { "react": ">= 16.8.0", - "react-dom": ">= 16.8.0", - "react-is": ">= 16.8.0" - } - }, - "node_modules/styled-components/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "license": "MIT", - "engines": { - "node": ">=4" + "react-dom": ">= 16.8.0" } }, - "node_modules/styled-components/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } + "node_modules/styled-components/node_modules/stylis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", + "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" }, "node_modules/styled-jsx": { "version": "5.0.7", @@ -30524,7 +30453,8 @@ "node_modules/ts-toolbelt": { "version": "6.15.5", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", - "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" + "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==", + "dev": true }, "node_modules/tsconfig-paths": { "version": "3.14.1", @@ -30540,10 +30470,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "license": "0BSD" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "node_modules/tsup": { "version": "6.2.2", @@ -33260,6 +33189,7 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "dev": true, "requires": { "@babel/types": "^7.22.5" } @@ -35167,9 +35097,9 @@ } }, "@dashpress/bacteria": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/@dashpress/bacteria/-/bacteria-0.0.11.tgz", - "integrity": "sha512-i3ebzS8SpHZV566ayZNDAEC3ifYJme3YIoIfivhz0gvmDlWnUgvOrwV4IHCVRbp0wB8Fm8s5MvorupztAwmWlA==", + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@dashpress/bacteria/-/bacteria-0.0.12.tgz", + "integrity": "sha512-Q0K2xQ48kUCm2sl8+jIYr7Cx/oTbbpHSNBwukFQ6xjJVk4rgSovji9LHD+CA1pf6rJdM9LIWehmfJSNZKGUT9Q==", "requires": { "@types/fs-extra": "^9.0.13", "@types/pg": "^8.6.5", @@ -35414,24 +35344,17 @@ "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==" }, "@emotion/is-prop-valid": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.3.tgz", - "integrity": "sha512-RFg04p6C+1uO19uG8N+vqanzKqiM9eeV1LDOG3bmkYmuOj7NbKNlFC/4EZq5gnwAIlcC/jOT24f8Td0iax2SXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", "requires": { - "@emotion/memoize": "^0.7.4" - }, - "dependencies": { - "@emotion/memoize": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", - "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" - } + "@emotion/memoize": "^0.8.1" } }, "@emotion/memoize": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz", - "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "@emotion/provider": { "version": "0.11.2", @@ -35504,13 +35427,6 @@ "@emotion/unitless": "^0.8.0", "@emotion/utils": "^1.2.0", "csstype": "^3.0.2" - }, - "dependencies": { - "@emotion/unitless": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", - "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" - } } }, "@emotion/sheet": { @@ -35585,15 +35501,10 @@ } } }, - "@emotion/stylis": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", - "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" - }, "@emotion/unitless": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", + "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" }, "@emotion/utils": { "version": "1.2.0", @@ -38857,7 +38768,8 @@ "@types/cryptr": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/cryptr/-/cryptr-4.0.1.tgz", - "integrity": "sha512-Nn8fvr+8XYWK5h422lj4xQACfOg6vdhKI+Rh9ERa5Mg0cZvPL9Vn3845vSY07dNZnEs5cqkSNVMdhmf70lAYkA==" + "integrity": "sha512-Nn8fvr+8XYWK5h422lj4xQACfOg6vdhKI+Rh9ERa5Mg0cZvPL9Vn3845vSY07dNZnEs5cqkSNVMdhmf70lAYkA==", + "dev": true }, "@types/debug": { "version": "4.1.7", @@ -38878,6 +38790,7 @@ "version": "3.4.5", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-3.4.5.tgz", "integrity": "sha512-s7YPsNVfnsng5L8sKnG/Gbb2tiwwJTY1conOkJzTMRvJAlLFW1nEua+ADsJQu8N1c0oTHx9+d5nqg10WuT9gHQ==", + "dev": true, "requires": { "@types/node": "*" } @@ -38918,15 +38831,6 @@ "@types/unist": "*" } }, - "@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", - "requires": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "@types/html-minifier-terser": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz", @@ -39087,6 +38991,7 @@ "version": "8.5.8", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.8.tgz", "integrity": "sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==", + "dev": true, "requires": { "@types/node": "*" } @@ -39094,7 +38999,8 @@ "@types/lodash": { "version": "4.14.195", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", - "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==" + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true }, "@types/mdast": { "version": "3.0.11", @@ -39108,7 +39014,8 @@ "@types/microseconds": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@types/microseconds/-/microseconds-0.2.0.tgz", - "integrity": "sha512-+UyZ10BHttSgwkFOxXiuGn9qJ0CMzM1sLWFPIjA21ddgF9nh21ZZ771OtmnTqOXn5BqtcrWwvDv88hoyIe/FMw==" + "integrity": "sha512-+UyZ10BHttSgwkFOxXiuGn9qJ0CMzM1sLWFPIjA21ddgF9nh21ZZ771OtmnTqOXn5BqtcrWwvDv88hoyIe/FMw==", + "dev": true }, "@types/minimatch": { "version": "5.1.2", @@ -39160,6 +39067,7 @@ "version": "6.4.6", "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.6.tgz", "integrity": "sha512-pD6fL5GQtUKvD2WnPmg5bC2e8kWCAPDwMPmHe/ohQbW+Dy0EcHgZ2oCSuPlWNqk74LS5BVMig1SymQbFMPPK3w==", + "dev": true, "requires": { "@types/node": "*" } @@ -39212,7 +39120,8 @@ "@types/prismjs": { "version": "1.26.0", "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.0.tgz", - "integrity": "sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==" + "integrity": "sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==", + "dev": true }, "@types/prop-types": { "version": "15.7.5", @@ -39222,7 +39131,8 @@ "@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true }, "@types/quill": { "version": "1.3.10", @@ -39236,6 +39146,7 @@ "version": "0.27.40", "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.27.40.tgz", "integrity": "sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ==", + "dev": true, "requires": { "ts-toolbelt": "^6.15.1" } @@ -39254,6 +39165,7 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-4.4.2.tgz", "integrity": "sha512-g8DhWvYmaIMLzVrIEVLXncylyImyBaoPsEUr3yR13JDaaHoebhDorqnVv4tLkNGa8SjBB8SAOQvxD5jaPNBX8A==", + "dev": true, "requires": { "@popperjs/core": "^2.9.2", "@types/react": "*", @@ -39310,15 +39222,10 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "@types/styled-components": { - "version": "5.1.26", - "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.26.tgz", - "integrity": "sha512-KuKJ9Z6xb93uJiIyxo/+ksS7yLjS1KzG6iv5i78dhVg/X3u5t1H7juRWqVmodIdz6wGVaIApo1u01kmFRdJHVw==", - "requires": { - "@types/hoist-non-react-statics": "*", - "@types/react": "*", - "csstype": "^3.0.2" - } + "@types/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==" }, "@types/tapable": { "version": "1.0.8", @@ -40543,23 +40450,6 @@ "react-docgen": "^5.0.0" } }, - "babel-plugin-styled-components": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz", - "integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-module-imports": "^7.16.0", - "babel-plugin-syntax-jsx": "^6.18.0", - "lodash": "^4.17.11", - "picomatch": "^2.3.0" - } - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==" - }, "babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -41271,9 +41161,9 @@ } }, "camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==" }, "caniuse-api": { "version": "3.0.0", @@ -42813,9 +42703,9 @@ } }, "css-to-react-native": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", - "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", "requires": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -42937,9 +42827,9 @@ } }, "csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "currently-unhandled": { "version": "0.4.1", @@ -50850,7 +50740,8 @@ "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true }, "pidtree": { "version": "0.6.0", @@ -50909,6 +50800,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz", "integrity": "sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==", + "dev": true, "requires": { "@babel/runtime": "^7.17.8" } @@ -50920,10 +50812,9 @@ "dev": true }, "postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", - "dev": true, + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -50933,8 +50824,7 @@ "nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" } } }, @@ -52107,7 +51997,8 @@ "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true }, "react-lifecycles-compat": { "version": "3.0.4", @@ -54557,34 +54448,25 @@ } }, "styled-components": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.6.tgz", - "integrity": "sha512-hGTZquGAaTqhGWldX7hhfzjnIYBZ0IXQXkCYdvF1Sq3DsUaLx6+NTHC5Jj1ooM2F68sBiVz3lvhfwQs/S3l6qg==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.4.5", - "@emotion/is-prop-valid": "^1.1.0", - "@emotion/stylis": "^0.8.4", - "@emotion/unitless": "^0.7.4", - "babel-plugin-styled-components": ">= 1.12.0", - "css-to-react-native": "^3.0.0", - "hoist-non-react-statics": "^3.0.0", - "shallowequal": "^1.1.0", - "supports-color": "^5.5.0" + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.8.tgz", + "integrity": "sha512-PQ6Dn+QxlWyEGCKDS71NGsXoVLKfE1c3vApkvDYS5KAK+V8fNWGhbSUEo9Gg2iaID2tjLXegEW3bZDUGpofRWw==", + "requires": { + "@emotion/is-prop-valid": "1.2.1", + "@emotion/unitless": "0.8.0", + "@types/stylis": "4.2.0", + "css-to-react-native": "3.2.0", + "csstype": "3.1.2", + "postcss": "8.4.31", + "shallowequal": "1.1.0", + "stylis": "4.3.1", + "tslib": "2.5.0" }, "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } + "stylis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", + "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" } } }, @@ -55237,7 +55119,8 @@ "ts-toolbelt": { "version": "6.15.5", "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz", - "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==" + "integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==", + "dev": true }, "tsconfig-paths": { "version": "3.14.1", @@ -55252,9 +55135,9 @@ } }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, "tsup": { "version": "6.2.2", diff --git a/package.json b/package.json index 358715598..1a4cbbaf8 100644 --- a/package.json +++ b/package.json @@ -32,20 +32,8 @@ ], "bin": "./bin/dashpress", "dependencies": { - "@dashpress/bacteria": "^0.0.11", + "@dashpress/bacteria": "^0.0.12", "@tanstack/react-table": "^8.7.9", - "@types/cryptr": "^4.0.1", - "@types/formidable": "^3.4.5", - "@types/jsonwebtoken": "^8.5.8", - "@types/lodash": "^4.14.182", - "@types/microseconds": "^0.2.0", - "@types/nodemailer": "^6.4.6", - "@types/prismjs": "^1.26.0", - "@types/qs": "^6.9.7", - "@types/ramda": "0.27.40", - "@types/react": "^18.0.11", - "@types/react-datepicker": "^4.4.1", - "@types/styled-components": "^5.1.25", "axios": "^1.2.1", "bcrypt": "^5.0.1", "change-case": "^4.1.2", @@ -68,7 +56,6 @@ "next": "12.3.1", "nodemailer": "^6.8.0", "path": "^0.12.7", - "polished": "^4.2.2", "prismjs": "^1.28.0", "qs": "^6.11.0", "ramda": "0.27.1", @@ -92,7 +79,7 @@ "react-tooltip": "^5.7.4", "react-use": "^17.4.0", "redis": "^4.4.0", - "styled-components": "^5.3.6", + "styled-components": "^6.1.8", "terminal-link": "^3.0.0", "tiny-skeleton-loader-react": "^1.2.1", "winston": "^3.8.2", @@ -117,8 +104,18 @@ "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.1", "@types/node": "^18.0.0", - "@types/react": "^18.0.9", "@types/react-dom": "^18.0.4", + "@types/cryptr": "^4.0.1", + "@types/formidable": "^3.4.5", + "@types/jsonwebtoken": "^8.5.8", + "@types/lodash": "^4.14.182", + "@types/microseconds": "^0.2.0", + "@types/nodemailer": "^6.4.6", + "@types/prismjs": "^1.26.0", + "@types/qs": "^6.9.7", + "@types/ramda": "0.27.40", + "@types/react": "^18.0.11", + "@types/react-datepicker": "^4.4.1", "@typescript-eslint/eslint-plugin": "^5.31.0", "@typescript-eslint/parser": "^5.31.0", "babel-loader": "^8.2.5", diff --git a/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts b/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts index f428975ee..5ed98a7cc 100644 --- a/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts +++ b/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts @@ -71,6 +71,7 @@ export class DatabaseConfigDataPersistenceAdaptor< const query = (await this.getDbInstance()) .select(["value", "key"]) .where("domain", "=", this._configDomain) + .orderBy("created_at", "desc") .from(CONFIG_TABLE_NAME); const items = await query; @@ -157,11 +158,8 @@ export class DatabaseConfigDataPersistenceAdaptor< } async _removeItem(key: string): Promise { - await ( - await this.getDbInstance() - )(CONFIG_TABLE_NAME) + await (await this.getDbInstance())(CONFIG_TABLE_NAME) .where("domain", "=", this._configDomain) - .where({ key }) .del(); } @@ -174,6 +172,8 @@ export class DatabaseConfigDataPersistenceAdaptor< key: value[keyField], domain: this._configDomain, value: JSON.stringify(value), + created_at: new Date(), + updated_at: new Date(), })) ); } diff --git a/src/frontend/_layouts/app/LayoutImpl/RenderNavigation.tsx b/src/frontend/_layouts/app/LayoutImpl/RenderNavigation.tsx index 5e6122ac8..ca42341d2 100644 --- a/src/frontend/_layouts/app/LayoutImpl/RenderNavigation.tsx +++ b/src/frontend/_layouts/app/LayoutImpl/RenderNavigation.tsx @@ -48,7 +48,7 @@ const LeftSideNavMenuList = styled.li<{}>` `; const LeftSideNavMenuListAnchor = styled.a<{ - hoverColor: string; + $hoverColor: string; $isActive: boolean; $depth: number; }>` @@ -67,7 +67,7 @@ const LeftSideNavMenuListAnchor = styled.a<{ padding-left: ${(props) => props.$depth * 16}px; &:hover { color: ${SYSTEM_COLORS.white}; - background: ${(props) => props.hoverColor}; + background: ${(props) => props.$hoverColor}; } `; @@ -178,7 +178,7 @@ export function RenderNavigation({ as={PlainButton} $isActive={false} $depth={depth} - hoverColor={getBackgroundColor("primary-color", 45)} + $hoverColor={getBackgroundColor("primary-color", 45)} onClick={() => { clearBreadCrumbStack(); setIsFullWidth(true); @@ -188,9 +188,7 @@ export function RenderNavigation({ {menuIcon} {isFullWidth && ( - - {title} - + {title} {icon && menuIcon} - - {title} - + {title} )} diff --git a/src/frontend/components/SchemaForm/form-grid.ts b/src/frontend/components/SchemaForm/form-grid.ts deleted file mode 100644 index 79e1986f9..000000000 --- a/src/frontend/components/SchemaForm/form-grid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { gridItem, gridRoot } from "frontend/design-system/constants/grid"; -import { GridSpanSizes } from "shared/types/ui"; -import styled from "styled-components"; - -export const FormGrid = { - Root: styled.div` - ${gridRoot} - grid-auto-rows: auto; - `, - Item: styled.div<{ - $span?: GridSpanSizes; - }>` - ${gridItem} - `, -}; diff --git a/src/frontend/components/SchemaForm/form-grid.tsx b/src/frontend/components/SchemaForm/form-grid.tsx new file mode 100644 index 000000000..41e966632 --- /dev/null +++ b/src/frontend/components/SchemaForm/form-grid.tsx @@ -0,0 +1,26 @@ +import { gridItem, gridRoot } from "frontend/design-system/constants/grid"; +import { ReactNode } from "react"; +import { GridSpanSizes } from "shared/types/ui"; +import styled from "styled-components"; + +const Root = styled.div` + ${gridRoot} + grid-auto-rows: auto; +`; + +const Container = styled.div` + container-type: inline-size; +`; + +export const FormGrid = { + Root: ({ children }: { children: ReactNode }) => ( + + {children} + + ), + Item: styled.div<{ + $span?: GridSpanSizes; + }>` + ${gridItem} + `, +}; diff --git a/src/frontend/components/SchemaForm/index.tsx b/src/frontend/components/SchemaForm/index.tsx index 94d947aa7..539340f43 100644 --- a/src/frontend/components/SchemaForm/index.tsx +++ b/src/frontend/components/SchemaForm/index.tsx @@ -15,6 +15,8 @@ import { IFormExtension } from "./types"; import { runFormBeforeSubmit, runFormFieldState } from "./form-run"; import { FormGrid } from "./form-grid"; +const identity = (value: unknown) => value; + interface IProps { fields: IAppliedSchemaFormConfig; onSubmit: (data: T) => Promise; @@ -98,7 +100,12 @@ export function SchemaForm>({ return !bag?.formState?.(scriptProps).hidden; }) .map(([field, bag]: [string, ISchemaFormConfig]) => ( - + {(formProps) => ( (props.align === "left" ? "0" : "auto")}; top: calc(100% + 8px); - z-index: ${(props) => props.zIndex}; + z-index: ${(props) => props.$zIndex}; background: ${USE_ROOT_COLOR("base-color")}; border-radius: 2px; border: 1px solid ${USE_ROOT_COLOR("border-color")}; @@ -87,7 +87,7 @@ export function Dropdown({ offset={rootRef.current?.offsetLeft || 0} align={align} $width={width} - zIndex={rootZIndex} + $zIndex={rootZIndex} onClick={(e) => { if (!preserveVisibiltyOnClick) { close(); diff --git a/src/frontend/design-system/components/Table/Body.tsx b/src/frontend/design-system/components/Table/Body.tsx index 665a66cf4..eb3ff6a37 100644 --- a/src/frontend/design-system/components/Table/Body.tsx +++ b/src/frontend/design-system/components/Table/Body.tsx @@ -3,7 +3,6 @@ import { flexRender, Table } from "@tanstack/react-table"; import styled from "styled-components"; import { USE_ROOT_COLOR } from "frontend/design-system/theme/root"; import { useThemeColorShade } from "frontend/design-system/theme/useTheme"; -import { Typo } from "frontend/design-system/primitives/Typo"; import { EmptyWrapper } from "../EmptyWrapper"; import { IEmptyWrapperProps } from "../EmptyWrapper/types"; @@ -41,9 +40,7 @@ export function TableBody({ table, dataLength, empty, isLoading }: IProps) { {row.getVisibleCells().map((cell) => ( - - {flexRender(cell.column.columnDef.cell, cell.getContext())} - + {flexRender(cell.column.columnDef.cell, cell.getContext())} ))} diff --git a/src/frontend/design-system/constants/grid.ts b/src/frontend/design-system/constants/grid.ts index b1798ad2d..7f6a90e76 100644 --- a/src/frontend/design-system/constants/grid.ts +++ b/src/frontend/design-system/constants/grid.ts @@ -14,7 +14,7 @@ export const gridRoot = css` display: grid; column-gap: 16px; grid-template-columns: repeat(12, 1fr); - @media (max-width: ${BREAKPOINTS.lg}) { + @container (width < ${BREAKPOINTS.md}) { grid-template-columns: 1fr; } `; @@ -24,7 +24,7 @@ export const gridItem = css<{ }>` grid-column-start: span ${(props) => props.$span || "12"}; - @media (max-width: ${BREAKPOINTS.lg}) { + @container (width < ${BREAKPOINTS.md}) { grid-column-start: span 1; } `; diff --git a/src/frontend/design-system/theme/useTheme.ts b/src/frontend/design-system/theme/useTheme.ts index dda23d382..98fe64f28 100644 --- a/src/frontend/design-system/theme/useTheme.ts +++ b/src/frontend/design-system/theme/useTheme.ts @@ -1,5 +1,4 @@ import { useCallback, useContext, useEffect } from "react"; -import { darken } from "polished"; import { ColorSchemes } from "shared/types/ui"; import { DEFAULT_PRIMARY_COLOR } from "./constants"; import { ThemeContext } from "./Context"; @@ -22,6 +21,30 @@ const getColorModeImplementation = ( return colorMode; }; +function darkenHexColor(hexColor$1: string, percentage: number) { + const hexColor = hexColor$1.replace(/^#/, ""); + + // Convert hexadecimal to RGB + let red = parseInt(hexColor.substring(0, 2), 16); + let green = parseInt(hexColor.substring(2, 4), 16); + let blue = parseInt(hexColor.substring(4, 6), 16); + + // Calculate darken percentage + const darkenFactor = 1 - percentage / 100; + + // Darken RGB components + red = Math.max(0, Math.floor(red * darkenFactor)); + green = Math.max(0, Math.floor(green * darkenFactor)); + blue = Math.max(0, Math.floor(blue * darkenFactor)); + + // Convert back to hexadecimal + const darkenedHexColor = `#${red.toString(16).padStart(2, "0")}${green + .toString(16) + .padStart(2, "0")}${blue.toString(16).padStart(2, "0")}`; + + return darkenedHexColor; +} + export const useTheme = ( themeColor?: string, colorMode?: ColorSchemes | IColorMode @@ -53,8 +76,7 @@ export const useThemeColorShade = () => { return useCallback( (colorKey: IRootColors, percent: number) => { - const color$1 = themeContext.value[colorKey]; - return darken(`${percent / 100}`, color$1); + return darkenHexColor(themeContext.value[colorKey], percent); }, [themeContext.value] ); diff --git a/src/frontend/views/Dashboard/List/_BaseDashboard.tsx b/src/frontend/views/Dashboard/List/_BaseDashboard.tsx index 8a6452f12..26747c755 100644 --- a/src/frontend/views/Dashboard/List/_BaseDashboard.tsx +++ b/src/frontend/views/Dashboard/List/_BaseDashboard.tsx @@ -14,6 +14,10 @@ const Root = styled.div` ${dashboardGridRoot}; `; +const Container = styled.div` + container-type: inline-size; +`; + interface IProps { dashboardId: string; manageLink: string; @@ -45,11 +49,13 @@ export function BaseDashboard({ dashboardId, manageLink }: IProps) { error={widgets.error} loader={} > - - {widgets.data.map((config) => ( - - ))} - + + + {widgets.data.map((config) => ( + + ))} + + ); diff --git a/src/frontend/views/Dashboard/Manage/_BaseManageDashboard.tsx b/src/frontend/views/Dashboard/Manage/_BaseManageDashboard.tsx index a91bfefe3..dd961f264 100644 --- a/src/frontend/views/Dashboard/Manage/_BaseManageDashboard.tsx +++ b/src/frontend/views/Dashboard/Manage/_BaseManageDashboard.tsx @@ -18,6 +18,7 @@ import { DashboardWidget } from "../Widget"; import { DASHBOARD_WIDGETS_CRUD_CONFIG } from "../constants"; const Root = styled.div` + container-type: inline-size; .list { ${dashboardGridRoot}; } diff --git a/src/frontend/views/data/Table/portal/index.ts b/src/frontend/views/data/Table/portal/index.ts index aa17cdaa8..b10453d77 100644 --- a/src/frontend/views/data/Table/portal/index.ts +++ b/src/frontend/views/data/Table/portal/index.ts @@ -5,4 +5,5 @@ export { usePortalTableColumns, TableTopComponent, usePortalTableTabs, + PortalColumnRender, } from "./main"; diff --git a/src/frontend/views/data/Table/portal/main.tsx b/src/frontend/views/data/Table/portal/main.tsx index 63bea1e08..830432988 100644 --- a/src/frontend/views/data/Table/portal/main.tsx +++ b/src/frontend/views/data/Table/portal/main.tsx @@ -2,6 +2,7 @@ import { IDropDownMenuItem } from "frontend/design-system/components/DropdownMen import { ITableColumn } from "frontend/design-system/components/Table/types"; import { loadedDataState } from "frontend/lib/data/constants/loadedDataState"; import { DataStateKeys } from "frontend/lib/data/types"; +import { ReactNode } from "react"; import { noop } from "shared/lib/noop"; import { ITableView } from "shared/types/data"; @@ -40,3 +41,21 @@ export const usePortalTableTabs = ( noop(entity); return loadedDataState([]); }; + +export function PortalColumnRender({ + children, + column, + value, + entity, + entityId, +}: { + children: ReactNode; + column: string; + value: unknown; + entity: string; + entityId: string; +}) { + noop(column, value, entity, entityId); + // eslint-disable-next-line react/jsx-no-useless-fragment + return <>{children}; +} diff --git a/src/frontend/views/data/Table/useTableColumns.tsx b/src/frontend/views/data/Table/useTableColumns.tsx index e4f861701..0693e4e43 100644 --- a/src/frontend/views/data/Table/useTableColumns.tsx +++ b/src/frontend/views/data/Table/useTableColumns.tsx @@ -22,7 +22,7 @@ import { ActionButtons } from "frontend/design-system/components/Button/ActionBu import { TableFilterType } from "shared/types/data"; import { useEvaluateScriptContext } from "frontend/hooks/scripts"; import { viewSpecialDataTypes } from "../viewSpecialDataTypes"; -import { usePortalTableColumns } from "./portal"; +import { PortalColumnRender, usePortalTableColumns } from "./portal"; import { evalutePresentationScript } from "../evaluatePresentationScript"; import { useEntityActionButtons } from "../hooks/useEntityActionButtons"; import { usePortalActionButtons } from "../Details/portal"; @@ -188,16 +188,40 @@ export const useTableColumns = ( defaultDateFormat: defaultDateFormat.data, }, }); + + const columnRenderProps = { + column: name, + value: value$1, + entity, + entityId: row.original[idField.data] as string, + }; + if (specialDataTypeRender) { - return specialDataTypeRender; + return ( + + {specialDataTypeRender} + + ); } if (typeof value === "string") { - return <>{ellipsis(value as string, 50)}; + return ( + + {ellipsis(value as string, 50)} + + ); } if (typeof value === "object") { - return <>{JSON.stringify(value)}; + return ( + + {JSON.stringify(value)} + + ); } - return {value as string}; + return ( + + {value as string} + + ); }, }; return tableColumn; diff --git a/src/frontend/views/data/_BaseEntityForm.tsx b/src/frontend/views/data/_BaseEntityForm.tsx index 1d46d975b..393d7c933 100644 --- a/src/frontend/views/data/_BaseEntityForm.tsx +++ b/src/frontend/views/data/_BaseEntityForm.tsx @@ -30,6 +30,7 @@ type IProps = { resetForm?: true; buttonText: (submitting: boolean) => string; systemIcon: SystemIconsKeys; + fieldsToShow?: string[]; }; export function BaseEntityForm({ @@ -41,6 +42,7 @@ export function BaseEntityForm({ resetForm, buttonText, onSubmit, + fieldsToShow, }: IProps) { const entityValidationsMap = useEntityFieldValidations(entity); const getEntityFieldLabels = useEntityFieldLabels(entity); @@ -118,10 +120,10 @@ export function BaseEntityForm({ fields, }; - const formConfig = buildAppliedSchemaFormConfig( - formSchemaConfig, - allOptional - ); + const formConfig = buildAppliedSchemaFormConfig(formSchemaConfig, { + allOptional, + fieldsToShow, + }); return ( => { return Object.fromEntries( - fields.map((field) => { - const formConfig: ISchemaFormConfig = { - selections: entityFieldSelections[field] || [], - apiSelections: - entityFieldTypes[field] === "reference" - ? { - listUrl: ENTITY_LIST_PATH(entityToOneReferenceFields[field]), - entity: entityToOneReferenceFields[field], - referenceUrl: (value: string) => - ENTITY_REFERENCE_PATH({ - entity: entityToOneReferenceFields[field], - entityId: value, - }), + fields + .filter((field) => { + if (!fieldsToShow) { + return true; + } + return fieldsToShow.includes(field); + }) + .map((field) => { + const formConfig: ISchemaFormConfig = { + selections: entityFieldSelections[field] || [], + apiSelections: + entityFieldTypes[field] === "reference" + ? { + listUrl: ENTITY_LIST_PATH(entityToOneReferenceFields[field]), + entity: entityToOneReferenceFields[field], + referenceUrl: (value: string) => + ENTITY_REFERENCE_PATH({ + entity: entityToOneReferenceFields[field], + entityId: value, + }), + } + : undefined, + type: entityFieldTypes[field], + label: getEntityFieldLabels(field) || userFriendlyCase(field), + validations: (entityValidationsMap[field] || []).filter( + ({ validationType }) => { + if (allOptional) { + return validationType !== "required"; } - : undefined, - type: entityFieldTypes[field], - label: getEntityFieldLabels(field) || userFriendlyCase(field), - validations: (entityValidationsMap[field] || []).filter( - ({ validationType }) => { - if (allOptional) { - return validationType !== "required"; + return true; } - return true; - } - ), - }; - return [field, formConfig]; - }) + ), + }; + return [field, formConfig]; + }) ); }; diff --git a/src/shared/types/data-sources.ts b/src/shared/types/data-sources.ts index 379ac8a0f..df1e72bad 100644 --- a/src/shared/types/data-sources.ts +++ b/src/shared/types/data-sources.ts @@ -42,15 +42,15 @@ export const DATA_SOURCES_CONFIG: Record< useConnectionString: true, getQueryData: (data) => data.rows, }, - [RDMSSources.MsSql]: { + [RDMSSources.MySql]: { fields: DATABASE_FIELDS, - port: 1433, + port: 3306, useConnectionString: true, getQueryData: (data) => data[0], }, - [RDMSSources.MySql]: { + [RDMSSources.MsSql]: { fields: DATABASE_FIELDS, - port: 3306, + port: 1433, useConnectionString: true, getQueryData: (data) => data[0], },