From 6b566d8b7ad81cb69fe21c009cfcdee27851b5c4 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 29 Jan 2025 16:58:49 +0000 Subject: [PATCH] TS conversions of components required to create generic deletion component. --- packages/bbui/src/Form/Core/TextField.svelte | 27 +-- packages/bbui/src/Form/Field.svelte | 10 +- packages/bbui/src/Form/Input.svelte | 11 +- packages/bbui/src/Link/Link.svelte | 2 +- .../modals/DeleteDataConfirmationModal.svelte | 164 ++++++++++++++++++ packages/types/src/ui/common.ts | 3 + packages/types/src/ui/index.ts | 1 + 7 files changed, 193 insertions(+), 25 deletions(-) create mode 100644 packages/builder/src/components/backend/modals/DeleteDataConfirmationModal.svelte create mode 100644 packages/types/src/ui/common.ts diff --git a/packages/bbui/src/Form/Core/TextField.svelte b/packages/bbui/src/Form/Core/TextField.svelte index 917bb2a452..a4f614ce29 100644 --- a/packages/bbui/src/Form/Core/TextField.svelte +++ b/packages/bbui/src/Form/Core/TextField.svelte @@ -1,8 +1,9 @@ - diff --git a/packages/bbui/src/Form/Input.svelte b/packages/bbui/src/Form/Input.svelte index 47962720af..39055237f0 100644 --- a/packages/bbui/src/Form/Input.svelte +++ b/packages/bbui/src/Form/Input.svelte @@ -1,12 +1,12 @@ - + + +
+

+ Are you sure you wish to delete the table + + + + {source?.name} + ? + +

+ +

All table data will be deleted{viewsMessage}.

+

This action cannot be undone.

+ + {#if affectedScreens.length > 0} +
+ +
    + {#each affectedScreens as item} +
  • + {item.text} +
  • + {/each} +
+
+
+ {/if} +

+ Please enter the "{source?.name}" below to confirm. +

+ +
+
+ + diff --git a/packages/types/src/ui/common.ts b/packages/types/src/ui/common.ts new file mode 100644 index 0000000000..2f5d864ca0 --- /dev/null +++ b/packages/types/src/ui/common.ts @@ -0,0 +1,3 @@ +export type UIEvent = Event & { + currentTarget: EventTarget & HTMLInputElement +} & { key?: string } & { target?: any } diff --git a/packages/types/src/ui/index.ts b/packages/types/src/ui/index.ts index 6e5f37608c..9c4ba93058 100644 --- a/packages/types/src/ui/index.ts +++ b/packages/types/src/ui/index.ts @@ -3,3 +3,4 @@ export * from "./bindings" export * from "./components" export * from "./dataFetch" export * from "./datasource" +export * from "./common"