diff options
author | Valerij Fredriksen <valerijf@yahooinc.com> | 2022-08-12 14:11:18 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@yahooinc.com> | 2022-08-12 15:02:05 +0200 |
commit | 07a74e30b98ae8ae7790e4fc5762cc32a8ae77d3 (patch) | |
tree | a0a5f5a369038cca8041f4bb0ec5a8b70457ddb2 /client/js | |
parent | 108c59ec4ac18af1ff412ade9aabe1e376b44aee (diff) |
Remove unused files
Diffstat (limited to 'client/js')
5 files changed, 0 insertions, 112 deletions
diff --git a/client/js/app/src/app/pages/querybuilder/Components/Buttons/ImageButton.jsx b/client/js/app/src/app/pages/querybuilder/Components/Buttons/ImageButton.jsx deleted file mode 100644 index 711229d82cd..00000000000 --- a/client/js/app/src/app/pages/querybuilder/Components/Buttons/ImageButton.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; - -export default function ImageButton({ - onClick, - children, - className, - image, - height = 15, - width = 15, - style, -}) { - return ( - <button className={className} onClick={onClick}> - <img - src={image} - height={height} - width={width} - style={style} - alt="Missing" - /> - {children} - </button> - ); -} diff --git a/client/js/app/src/app/pages/querybuilder/assets/img/copy.svg b/client/js/app/src/app/pages/querybuilder/assets/img/copy.svg deleted file mode 100644 index eada154413a..00000000000 --- a/client/js/app/src/app/pages/querybuilder/assets/img/copy.svg +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 488.3 488.3" style="enable-background:new 0 0 488.3 488.3;" xml:space="preserve" width="512px" height="512px" class=""><g><g> - <g> - <path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z" data-original="#000000" class="active-path" data-old_color="#F8F5F5" fill="#FCFCFC"/> - <path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z" data-original="#000000" class="active-path" data-old_color="#F8F5F5" fill="#FCFCFC"/> - </g> -</g></g> </svg> diff --git a/client/js/app/src/app/pages/querybuilder/assets/img/paste.svg b/client/js/app/src/app/pages/querybuilder/assets/img/paste.svg deleted file mode 100644 index b2edac680bf..00000000000 --- a/client/js/app/src/app/pages/querybuilder/assets/img/paste.svg +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 561 561" style="enable-background:new 0 0 561 561;" xml:space="preserve" class=""><g><g> - <g id="content-paste"> - <path d="M459,51H351.9c-10.2-30.6-38.25-51-71.4-51c-33.15,0-61.2,20.4-71.4,51H102c-28.05,0-51,22.95-51,51v408 c0,28.05,22.95,51,51,51h357c28.05,0,51-22.95,51-51V102C510,73.95,487.05,51,459,51z M280.5,51c15.3,0,25.5,10.2,25.5,25.5 S295.8,102,280.5,102S255,91.8,255,76.5S265.2,51,280.5,51z M459,510H102V102h51v76.5h255V102h51V510z" data-original="#000000" class="active-path" data-old_color="#F9F6F6" fill="#FBF9F9"/> - </g> -</g></g> </svg> diff --git a/client/js/app/src/app/pages/querybuilder/query-filters/PasteJSONButton.jsx b/client/js/app/src/app/pages/querybuilder/query-filters/PasteJSONButton.jsx deleted file mode 100644 index 15ebe88e2fb..00000000000 --- a/client/js/app/src/app/pages/querybuilder/query-filters/PasteJSONButton.jsx +++ /dev/null @@ -1,38 +0,0 @@ -import React, { useState } from 'react'; -import pasteImage from 'app/pages/querybuilder/assets/img/paste.svg'; -import ImageButton from 'app/pages/querybuilder/Components/Buttons/ImageButton'; -import { - ACTION, - dispatch, -} from 'app/pages/querybuilder/context/query-builder-provider'; - -export default function PasteJSONButton() { - const [paste, setPaste] = useState(false); - - const handleClick = () => { - setPaste(true); - window.addEventListener('paste', handlePaste); - }; - - const handlePaste = (e) => { - setPaste(false); - // Stop data actually being pasted into div - e.stopPropagation(); - e.preventDefault(); - const pastedData = e.clipboardData.getData('text'); - window.removeEventListener('paste', handlePaste); - dispatch(ACTION.SET_QUERY, pastedData); - }; - - return ( - <> - <ImageButton - className="pasteJSON" - image={pasteImage} - onClick={handleClick} - > - {paste ? 'Press CMD + V' : 'Paste JSON'} - </ImageButton> - </> - ); -} diff --git a/client/js/app/src/app/pages/querybuilder/query-response/CopyResponseButton.jsx b/client/js/app/src/app/pages/querybuilder/query-response/CopyResponseButton.jsx deleted file mode 100644 index 10520266b86..00000000000 --- a/client/js/app/src/app/pages/querybuilder/query-response/CopyResponseButton.jsx +++ /dev/null @@ -1,37 +0,0 @@ -import React, { useState } from 'react'; -import { OverlayTrigger, Tooltip } from 'react-bootstrap'; -import ImageButton from 'app/pages/querybuilder/Components/Buttons/ImageButton'; -import { useQueryBuilderContext } from 'app/pages/querybuilder/context/query-builder-provider'; -import copyImage from 'app/pages/querybuilder/assets/img/copy.svg'; - -export default function CopyResponseButton() { - const response = useQueryBuilderContext((ctx) => ctx.http.response); - const [show, setShow] = useState(false); - - const handleCopy = () => { - setShow(true); - navigator.clipboard.writeText(response); - setTimeout(() => { - setShow(false); - }, 2000); - }; - - return ( - <OverlayTrigger - placement="left-end" - overlay={ - <Tooltip>{show ? 'Response copied to clipboard' : 'Copy'}</Tooltip> - } - > - <span> - <ImageButton - className="intro-copy" - image={copyImage} - height={30} - width={30} - onClick={handleCopy} - /> - </span> - </OverlayTrigger> - ); -} |