From 380a9059aa9383d5094abebe20f971350fb9bfcc Mon Sep 17 00:00:00 2001 From: mohiit1502 Date: Mon, 6 Nov 2023 01:50:58 +0530 Subject: [PATCH] Updated drawer filters bug fixes pagination constrained to 2000 records --- package-lock.json | 37 +++-- package.json | 3 +- .../ConfigRowItem/ConfigRowItem.tsx | 8 + .../ConfigurationViewer.tsx | 2 +- src/app/components/Drawer/Drawer.tsx | 32 ++-- .../FontsList/FontsList.component.scss | 3 + .../components/FontsList/FontsList.test.ts | 8 + src/app/components/FontsList/FontsList.tsx | 93 ++++++++++++ src/app/components/FontsList/index.ts | 3 + .../IconController/IconController.tsx | 6 +- src/app/components/IconsList/IconsList.tsx | 114 +++++++++++--- .../LoginProvider/LoginProvider.tsx | 4 +- src/app/components/Main/Main.component.scss | 6 +- src/app/components/Main/Main.tsx | 6 +- src/app/components/atoms/ArViz/ArViz.tsx | 18 ++- .../BubbleChart/BubbleChart.component.scss | 3 + .../atoms/BubbleChart/BubbleChart.test.ts | 8 + .../atoms/BubbleChart/BubbleChart.tsx | 100 +++++++++++++ src/app/components/atoms/BubbleChart/index.ts | 3 + .../components/atoms/DropDown/DropDown.tsx | 6 +- .../components/atoms/IconTile/IconTile.tsx | 5 +- .../atoms/Pagination/Pagination.tsx | 64 ++++++-- .../SelectionPill.component.scss | 5 + .../atoms/SelectionPill/SelectionPill.tsx | 26 ++-- src/app/components/atoms/Tags/Tags.tsx | 54 ++++--- src/app/components/index.ts | 8 +- .../components/molecules/Filters/Filters.tsx | 65 +++++--- src/app/config/constants.ts | 30 ++-- src/app/pages/FontsPage/FontsPage.tsx | 21 ++- src/app/pages/IconsPage/IconsPage.slice.ts | 8 +- src/app/pages/IconsPage/IconsPage.tsx | 141 ++++++++++-------- src/app/static/styles/_global.scss | 8 + src/app/types/components.interface.ts | 44 +++++- src/app/types/entity.interface.ts | 8 + src/app/types/enums.ts | 11 ++ src/app/types/filterconfig.d.ts | 13 +- src/app/types/iconresponse.d.ts | 5 +- src/app/utils/helper.tsx | 3 +- src/app/utils/network.ts | 16 +- 39 files changed, 771 insertions(+), 227 deletions(-) create mode 100755 src/app/components/FontsList/FontsList.component.scss create mode 100755 src/app/components/FontsList/FontsList.test.ts create mode 100755 src/app/components/FontsList/FontsList.tsx create mode 100755 src/app/components/FontsList/index.ts create mode 100755 src/app/components/atoms/BubbleChart/BubbleChart.component.scss create mode 100755 src/app/components/atoms/BubbleChart/BubbleChart.test.ts create mode 100755 src/app/components/atoms/BubbleChart/BubbleChart.tsx create mode 100755 src/app/components/atoms/BubbleChart/index.ts diff --git a/package-lock.json b/package-lock.json index 4387f8d..ae82cd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.21", "license": "ISC", "dependencies": { - "@armco/analytics": "^0.2.2", + "@armco/analytics": "^0.2.5", "@armco/armory-react-components": "^0.0.20", "@popperjs/core": "^2.11.8", "@reduxjs/toolkit": "^1.8.1", @@ -17,6 +17,7 @@ "bootstrap": "^5.3.0", "classnames": "^2.3.2", "d3": "^7.8.5", + "highcharts": "^11.2.0", "highlight.js": "^11.8.0", "js-cookie": "^3.0.5", "moment": "^2.29.4", @@ -101,9 +102,9 @@ } }, "node_modules/@armco/analytics": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@armco/analytics/-/analytics-0.2.2.tgz", - "integrity": "sha512-dnzL1TQVx35RoCJGf5LKH1Rf/VqGmQTsoZY0niicdzXhPQk/qA2V8X/q0iIJMZgwQ3CO35437zxKx/QWV3xaVQ==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@armco/analytics/-/analytics-0.2.5.tgz", + "integrity": "sha512-esgKYvXGCTM2TWeFd6a9lkQRZur5Y9ATVElxgWKjMRak0DSFbBE1CGJbsKaSf398gv622ZkVmLgIq9DbIbbesw==", "dependencies": { "jet-logger": "^1.3.1", "jquery": "^3.7.0", @@ -15549,6 +15550,11 @@ "tslib": "^2.0.3" } }, + "node_modules/highcharts": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.2.0.tgz", + "integrity": "sha512-9i650YK7ZBA1Mgtr3avMkLVCAI45RQvYnwi+eHsdFSaBGuQN6BHoa4j4lMkSJLv0V4LISTK1z7J7G82Lzd7zwg==" + }, "node_modules/highlight.js": { "version": "11.8.0", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", @@ -17175,9 +17181,9 @@ } }, "node_modules/jquery": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", - "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" }, "node_modules/js-cookie": { "version": "3.0.5", @@ -22545,9 +22551,9 @@ } }, "@armco/analytics": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@armco/analytics/-/analytics-0.2.2.tgz", - "integrity": "sha512-dnzL1TQVx35RoCJGf5LKH1Rf/VqGmQTsoZY0niicdzXhPQk/qA2V8X/q0iIJMZgwQ3CO35437zxKx/QWV3xaVQ==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@armco/analytics/-/analytics-0.2.5.tgz", + "integrity": "sha512-esgKYvXGCTM2TWeFd6a9lkQRZur5Y9ATVElxgWKjMRak0DSFbBE1CGJbsKaSf398gv622ZkVmLgIq9DbIbbesw==", "requires": { "jet-logger": "^1.3.1", "jquery": "^3.7.0", @@ -33746,6 +33752,11 @@ "tslib": "^2.0.3" } }, + "highcharts": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.2.0.tgz", + "integrity": "sha512-9i650YK7ZBA1Mgtr3avMkLVCAI45RQvYnwi+eHsdFSaBGuQN6BHoa4j4lMkSJLv0V4LISTK1z7J7G82Lzd7zwg==" + }, "highlight.js": { "version": "11.8.0", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", @@ -34904,9 +34915,9 @@ } }, "jquery": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", - "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" }, "js-cookie": { "version": "3.0.5", diff --git a/package.json b/package.json index 2dd85f5..ee20d8d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "build-storybook": "storybook build" }, "dependencies": { - "@armco/analytics": "^0.2.2", + "@armco/analytics": "^0.2.5", "@armco/armory-react-components": "^0.0.20", "@popperjs/core": "^2.11.8", "@reduxjs/toolkit": "^1.8.1", @@ -36,6 +36,7 @@ "bootstrap": "^5.3.0", "classnames": "^2.3.2", "d3": "^7.8.5", + "highcharts": "^11.2.0", "highlight.js": "^11.8.0", "js-cookie": "^3.0.5", "moment": "^2.29.4", diff --git a/src/app/components/ConfigRowItem/ConfigRowItem.tsx b/src/app/components/ConfigRowItem/ConfigRowItem.tsx index 97dd579..6aba427 100755 --- a/src/app/components/ConfigRowItem/ConfigRowItem.tsx +++ b/src/app/components/ConfigRowItem/ConfigRowItem.tsx @@ -74,6 +74,14 @@ const ConfigRowItem = (props: ConfigRowItemProps): JSX.Element => { onClick={() => (edited ? setEdited(false) : setEdited(true))} /> + + onDelete && onDelete(config?._id)} + /> + { const addConfig = (key: string, value: string, _id?: string) => { const payload: ObjectType = { key, - value: JSON.parse(value), + value, namespace: namespace._id, version: "v1", } diff --git a/src/app/components/Drawer/Drawer.tsx b/src/app/components/Drawer/Drawer.tsx index 3a98184..12dfcd3 100755 --- a/src/app/components/Drawer/Drawer.tsx +++ b/src/app/components/Drawer/Drawer.tsx @@ -1,17 +1,31 @@ -import { ReactNode } from "react" +import { useState } from "react" +import { DrawerProps } from "../../types/components.interface" import "./Drawer.component.scss" - -interface DrawerProps { - children?: ReactNode - classes?: string -} +import LoadableIcon from "../atoms/LoadableIcon" const Drawer = (props: DrawerProps): JSX.Element => { - const { children, classes } = props + const { children, classes, isCollapsible } = props + const [collapsed, setCollapsed] = useState() return ( -