From bea26d2d61c201df2e013bb5f665a690e926f003 Mon Sep 17 00:00:00 2001 From: Brock Anderson Date: Tue, 10 Dec 2024 16:17:49 -0800 Subject: [PATCH] feat: GEO-1179 remove unused files (#874) --- .../src/components/util/ClipboardButton.vue | 72 ---------- .../components/util/ConfirmationDialog.vue | 3 +- .../src/components/util/PrimaryButton.vue | 131 ------------------ .../src/components/util/TertiaryButton.vue | 93 ------------- .../src/utils/__tests__/dialogUtils.spec.ts | 18 --- frontend/src/utils/dialogUtils.ts | 60 -------- 6 files changed, 1 insertion(+), 376 deletions(-) delete mode 100644 frontend/src/components/util/ClipboardButton.vue delete mode 100644 frontend/src/components/util/PrimaryButton.vue delete mode 100644 frontend/src/components/util/TertiaryButton.vue delete mode 100644 frontend/src/utils/__tests__/dialogUtils.spec.ts delete mode 100644 frontend/src/utils/dialogUtils.ts diff --git a/frontend/src/components/util/ClipboardButton.vue b/frontend/src/components/util/ClipboardButton.vue deleted file mode 100644 index 0c1247be4..000000000 --- a/frontend/src/components/util/ClipboardButton.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/frontend/src/components/util/ConfirmationDialog.vue b/frontend/src/components/util/ConfirmationDialog.vue index bf048cdbd..cd03f4386 100644 --- a/frontend/src/components/util/ConfirmationDialog.vue +++ b/frontend/src/components/util/ConfirmationDialog.vue @@ -55,10 +55,9 @@ - - - diff --git a/frontend/src/components/util/TertiaryButton.vue b/frontend/src/components/util/TertiaryButton.vue deleted file mode 100644 index b4e7a1615..000000000 --- a/frontend/src/components/util/TertiaryButton.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/frontend/src/utils/__tests__/dialogUtils.spec.ts b/frontend/src/utils/__tests__/dialogUtils.spec.ts deleted file mode 100644 index 8d035b849..000000000 --- a/frontend/src/utils/__tests__/dialogUtils.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { DialogUtils } from '../dialogUtils'; - -describe('DialogUtils', () => { - it('captures multiple different responses if the response is set after', () => { - const dlg = new DialogUtils(); - dlg.getDialogResponse().then((response1) => { - expect(response1).toBe('abcdef'); - }); - dlg.setDialogResponse('abcdef'); - - //dlg.reset(); - dlg.getDialogResponse().then((response2) => { - expect(response2).toBe('zyxw'); - }); - dlg.setDialogResponse('zyxw'); - }); -}); diff --git a/frontend/src/utils/dialogUtils.ts b/frontend/src/utils/dialogUtils.ts deleted file mode 100644 index 7891db103..000000000 --- a/frontend/src/utils/dialogUtils.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * DialogUtils assists with getting reponses from a dialog and allowing the code to excecute when a response is made. - * - * How to use: - * Create the instance of the DialogUtils class. - * The dialog should call dialogResponse with the users selection - * Call GetDialogResponse to create the promise. - * Then show the dialog. - * - * Example: - * - * - * - */ - -export class DialogUtils { - private resolver: (value: T) => void; - - /** - * Get the response via a Promise. This allows you to do an action when the response is made. - * Must call getDialogResponse() BEFORE the user has an opertunity to call setDialogResponse() otherwise it will fail. - * @returns - */ - public getDialogResponse(): Promise { - return new Promise((resolve) => { - this.resolver = resolve; - }); - } - - /** - * The dialog calls this function to set the response selected by the user. - * @param response - */ - public setDialogResponse(response: T): void { - this.resolver(response); - } -}