From 6d3ce1e3481f6b7d89077031f5445b9ef29e40fe Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Fri, 3 May 2024 09:09:58 +0400 Subject: [PATCH 1/8] Quill-UU-Button-Heading-Text-TextField --- docusaurus.config.js | 1 + package-lock.json | 76 +++++++++++++++++-- package.json | 2 + plugins/custom-loaders/index.js | 19 +++++ plugins/custom-loaders/package.json | 5 ++ src/components/SwipeableBottomSheet/index.tsx | 6 +- .../AppDashboardContainer/index.tsx | 2 +- .../components/AppRegister/index.tsx | 10 +-- .../dashboard/components/AppsTable/index.tsx | 6 +- .../Modals/AppRegisterSuccessModal/index.tsx | 2 +- src/theme/Root.tsx | 4 +- 11 files changed, 110 insertions(+), 23 deletions(-) create mode 100644 plugins/custom-loaders/index.js create mode 100644 plugins/custom-loaders/package.json diff --git a/docusaurus.config.js b/docusaurus.config.js index 763a13a78..bf287ce9d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -31,6 +31,7 @@ const config = { }, plugins: [ + 'custom-loaders', '@docusaurus/theme-live-codeblock', 'docusaurus-plugin-sass', [ diff --git a/package-lock.json b/package-lock.json index 400e4b69b..32ea2bf3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "deriv-api-docs", "version": "0.0.0", "dependencies": { + "@deriv-com/quill-ui": "^1.9.6", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-design": "^1.2.18", "@deriv/quill-icons": "^1.21.3", @@ -28,6 +29,7 @@ "@use-gesture/react": "^10.3.0", "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "clsx": "^1.2.1", + "custom-loaders": "file:plugins/custom-loaders", "docusaurus-plugin-sass": "^0.2.2", "identity-obj-proxy": "^3.0.0", "install": "^0.13.0", @@ -2606,6 +2608,47 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@deriv-com/quill-ui": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.9.6.tgz", + "integrity": "sha512-y6+OvuEwIt57FSuRNF1Pa5qapCV6bx0WyMuA/h/rTOcWXgiaUW37RBbYFCTejCA6bWgWT16eVx6BLb2aLEwTcw==", + "dependencies": { + "@deriv/quill-icons": "^1.19.20", + "@headlessui/react": "^1.7.18", + "react-swipeable": "^6.2.1", + "usehooks-ts": "^3.0.2", + "uuid": "^9.0.1" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.9.6" + } + }, + "node_modules/@deriv-com/quill-ui/node_modules/usehooks-ts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-3.1.0.tgz", + "integrity": "sha512-bBIa7yUyPhE1BCc0GmR96VU/15l/9gP1Ch5mYdLcFBaFGQsdmXkvjV0TtOqW1yUd6VjIwDunm+flSciCQXujiw==", + "dependencies": { + "lodash.debounce": "^4.0.8" + }, + "engines": { + "node": ">=16.15.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, + "node_modules/@deriv-com/quill-ui/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@deriv/api-types": { "version": "1.0.80", "resolved": "https://registry.npmjs.org/@deriv/api-types/-/api-types-1.0.80.tgz", @@ -3790,7 +3833,6 @@ "version": "1.7.18", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.18.tgz", "integrity": "sha512-4i5DOrzwN4qSgNsL4Si61VMkUcWbcSKueUV7sFhpHzQcSShdlHENE5+QBntMSRvHt8NyoFO2AGG8si9lq+w4zQ==", - "peer": true, "dependencies": { "@tanstack/react-virtual": "^3.0.0-beta.60", "client-only": "^0.0.1" @@ -6541,6 +6583,18 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -6868,7 +6922,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.1.3.tgz", "integrity": "sha512-YCzcbF/Ws/uZ0q3Z6fagH+JVhx4JLvbSflgldMgLsuvB8aXjZLLb3HvrEVxY480F9wFlBiXlvQxOyXb5ENPrNA==", - "peer": true, "dependencies": { "@tanstack/virtual-core": "3.1.3" }, @@ -6885,7 +6938,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.1.3.tgz", "integrity": "sha512-Y5B4EYyv1j9V8LzeAoOVeTg0LI7Fo5InYKgAjkY1Pu9GjtUwX/EKxNcU7ng3sKr99WEf+bPTcktAeybyMOYo+g==", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -9840,8 +9892,7 @@ "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", - "peer": true + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, "node_modules/cliui": { "version": "8.0.1", @@ -10801,6 +10852,10 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, + "node_modules/custom-loaders": { + "resolved": "plugins/custom-loaders", + "link": true + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -21675,6 +21730,14 @@ } } }, + "node_modules/react-swipeable": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-6.2.2.tgz", + "integrity": "sha512-Oz7nSFrssvq2yvy05aNL3F+yBUqSvLsK6x1mu+rQFOpMdQVnt4izKt1vyjvvTb70q6GQOaSpaB6qniROW2MAzQ==", + "peerDependencies": { + "react": "^16.8.3 || ^17 || ^18" + } + }, "node_modules/react-table": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.8.0.tgz", @@ -26610,6 +26673,9 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "plugins/custom-loaders": { + "version": "0.0.0" } } } diff --git a/package.json b/package.json index d52e6dada..955afa7f7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc" }, "dependencies": { + "@deriv-com/quill-ui": "^1.9.6", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-design": "^1.2.18", "@deriv/quill-icons": "^1.21.3", @@ -41,6 +42,7 @@ "@use-gesture/react": "^10.3.0", "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "clsx": "^1.2.1", + "custom-loaders": "file:plugins/custom-loaders", "docusaurus-plugin-sass": "^0.2.2", "identity-obj-proxy": "^3.0.0", "install": "^0.13.0", diff --git a/plugins/custom-loaders/index.js b/plugins/custom-loaders/index.js new file mode 100644 index 000000000..78e3dfa74 --- /dev/null +++ b/plugins/custom-loaders/index.js @@ -0,0 +1,19 @@ +module.exports = function (context, options) { + return { + name: 'custom-loaders', + configureWebpack(config, isServer) { + return { + module: { + rules: [ + { + test: /\.m?js/, + resolve: { + fullySpecified: false, + }, + }, + ], + }, + }; + }, + }; +}; diff --git a/plugins/custom-loaders/package.json b/plugins/custom-loaders/package.json new file mode 100644 index 000000000..18ff8e627 --- /dev/null +++ b/plugins/custom-loaders/package.json @@ -0,0 +1,5 @@ +{ + "name": "custom-loaders", + "version": "0.0.0", + "private": true +} diff --git a/src/components/SwipeableBottomSheet/index.tsx b/src/components/SwipeableBottomSheet/index.tsx index b8bd943b0..1f4121587 100644 --- a/src/components/SwipeableBottomSheet/index.tsx +++ b/src/components/SwipeableBottomSheet/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import { useDrag } from '@use-gesture/react'; import { a, useSpring, config } from '@react-spring/web'; -import { Button } from '@deriv/quill-design'; +import { Button } from '@deriv-com/quill-ui'; import './swipeable-bottom-sheet.scss'; type SwipeableBottomSheetProps = { @@ -88,7 +88,7 @@ const SwipeableBottomSheet: React.FC = ({
{primary_action && (
-
diff --git a/src/features/dashboard/components/AppsTable/index.tsx b/src/features/dashboard/components/AppsTable/index.tsx index 8ba091907..2a25af6a6 100644 --- a/src/features/dashboard/components/AppsTable/index.tsx +++ b/src/features/dashboard/components/AppsTable/index.tsx @@ -1,7 +1,7 @@ import { ApplicationObject } from '@deriv/api-types'; import React, { HTMLAttributes, useCallback, useState } from 'react'; import { Cell, Column } from 'react-table'; -import { Button, Heading, Text } from '@deriv/quill-design'; +import { Button, Heading, Text } from '@deriv-com/quill-ui'; import { LabelPairedCirclePlusMdRegularIcon } from '@deriv/quill-icons'; import useAppManager from '@site/src/hooks/useAppManager'; @@ -73,12 +73,12 @@ const AppsTableHeader: React.FC<{ is_desktop: boolean }> = ({ is_desktop }) => { diff --git a/src/features/dashboard/components/AppsTable/index.tsx b/src/features/dashboard/components/AppsTable/index.tsx index 2a25af6a6..d360b338b 100644 --- a/src/features/dashboard/components/AppsTable/index.tsx +++ b/src/features/dashboard/components/AppsTable/index.tsx @@ -74,7 +74,7 @@ const AppsTableHeader: React.FC<{ is_desktop: boolean }> = ({ is_desktop }) => { + {errors?.tnc_approval?.message} From ee74b509920918c9c22ba5a85d49d11f7b96360f Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Mon, 13 May 2024 14:48:41 +0400 Subject: [PATCH 5/8] removing quill-design --- package-lock.json | 47 ------------------------------------------- src/styles/index.scss | 1 - 2 files changed, 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 590ab49e6..d3985e695 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2679,22 +2679,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@deriv/quill-design": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@deriv/quill-design/-/quill-design-1.2.18.tgz", - "integrity": "sha512-BlhqMoW3dplvkLnEO2NdlrwEOdgQazI8PzzFnhlnEq58KgsKqiJZjvO8SycMeq0f0MKRZUi6MssPVqelFqjDcg==", - "peerDependencies": { - "@deriv/quill-icons": "^1.0.10", - "@headlessui/react": "^1.7.17", - "@types/react": "^17.x || ^18.x", - "@use-gesture/react": "^10.3.0", - "class-variance-authority": "^0.7.0", - "react": "^17.x || ^18.x", - "react-dom": "^17.x || ^18.x", - "tailwind-merge": "^1.14.0", - "usehooks-ts": "^2.9.1" - } - }, "node_modules/@deriv/quill-icons": { "version": "1.21.3", "resolved": "https://registry.npmjs.org/@deriv/quill-icons/-/quill-icons-1.21.3.tgz", @@ -9771,27 +9755,6 @@ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==" }, - "node_modules/class-variance-authority": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz", - "integrity": "sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==", - "peer": true, - "dependencies": { - "clsx": "2.0.0" - }, - "funding": { - "url": "https://joebell.co.uk" - } - }, - "node_modules/class-variance-authority/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/classnames": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", @@ -24410,16 +24373,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/tailwind-merge": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz", - "integrity": "sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/dcastil" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", diff --git a/src/styles/index.scss b/src/styles/index.scss index 535b94543..2b7d5afb6 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,6 +1,5 @@ @use 'src/styles/utility' as *; @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&family=Ubuntu:wght@400;500;700&display=swap'); -@import '@deriv/quill-design/dist/quill-design.css'; /** * Any CSS included here will be global. The classic template From 4148020d4212f5888422b5109247c882687be570 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Mon, 13 May 2024 16:31:45 +0400 Subject: [PATCH 6/8] theme provider updating quill --- package-lock.json | 8 ++++---- package.json | 2 +- src/theme/Root.tsx | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3985e695..410cdda0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "deriv-api-docs", "version": "0.0.0", "dependencies": { - "@deriv-com/quill-ui": "^1.9.20", + "@deriv-com/quill-ui": "^1.9.22", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-icons": "^1.21.3", "@deriv/ui": "^0.1.0", @@ -2607,9 +2607,9 @@ } }, "node_modules/@deriv-com/quill-ui": { - "version": "1.9.20", - "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.9.20.tgz", - "integrity": "sha512-6p8xhoX1yxFp+F91PbkFHNUeJ92LYI7aMEP1U9zAVsocvwu11jo+mOTeZApHw/ksbWdfxnfIbEOCEutntnM37A==", + "version": "1.9.22", + "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.9.22.tgz", + "integrity": "sha512-qvbL8RnmxpJM5XNCtn6nEPnwPgds17uNtGOafH4SZDmhAFrZb+YWXkIb2xybIDb8U+34W78dMDCvm1wxLKj4BQ==", "dependencies": { "@deriv/quill-icons": "^1.19.20", "@headlessui/react": "^1.7.18", diff --git a/package.json b/package.json index 0cbe43ab8..83ff4ea9d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc" }, "dependencies": { - "@deriv-com/quill-ui": "^1.9.20", + "@deriv-com/quill-ui": "^1.9.22", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-icons": "^1.21.3", "@deriv/ui": "^0.1.0", diff --git a/src/theme/Root.tsx b/src/theme/Root.tsx index 3c18d19e4..abe085149 100644 --- a/src/theme/Root.tsx +++ b/src/theme/Root.tsx @@ -30,7 +30,9 @@ export default function Root({ children }: TRootProps) { - {children} + + {children} + From bf5f523b1198fafe36965cb58547716f1a3bec2a Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Tue, 14 May 2024 14:50:00 +0400 Subject: [PATCH 7/8] styling issue fix --- .../AppDashboardContainer/app-dashboard-container.scss | 2 +- .../dashboard/components/AppDashboardContainer/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/dashboard/components/AppDashboardContainer/app-dashboard-container.scss b/src/features/dashboard/components/AppDashboardContainer/app-dashboard-container.scss index a7f935e7e..ec912fe7d 100644 --- a/src/features/dashboard/components/AppDashboardContainer/app-dashboard-container.scss +++ b/src/features/dashboard/components/AppDashboardContainer/app-dashboard-container.scss @@ -11,7 +11,7 @@ text-align: center; padding-inline: 16px; h2 { - margin-bottom: 16px; + margin-bottom: 8px; } } diff --git a/src/features/dashboard/components/AppDashboardContainer/index.tsx b/src/features/dashboard/components/AppDashboardContainer/index.tsx index f5160cbf8..4375f2fc9 100644 --- a/src/features/dashboard/components/AppDashboardContainer/index.tsx +++ b/src/features/dashboard/components/AppDashboardContainer/index.tsx @@ -7,7 +7,7 @@ const AppDashboardContainer: React.FC = ({ children }) => {
- App dashboard + App Dashboard Start using Deriv API to bring custom integrations and powerful automation to your apps. From f3e457158f5fd52c7e0ee7a8d8fe6dde10b38a38 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Wed, 15 May 2024 10:58:31 +0400 Subject: [PATCH 8/8] mobile view fix --- src/components/CustomAccordion/custom-accordion.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/CustomAccordion/custom-accordion.scss b/src/components/CustomAccordion/custom-accordion.scss index 17df1cba6..9e99eec10 100644 --- a/src/components/CustomAccordion/custom-accordion.scss +++ b/src/components/CustomAccordion/custom-accordion.scss @@ -13,6 +13,8 @@ .accordion_header { display: flex; + overflow-wrap: anywhere; + column-gap: 12px; background-color: transparent; [data-state='open'] {