From 6ceadba06af7e742091ddf248fda24c60d869294 Mon Sep 17 00:00:00 2001 From: connoratrug <47183404+connoratrug@users.noreply.github.com> Date: Wed, 29 Jan 2025 09:50:05 +0100 Subject: [PATCH] Revert "feat(tw): added new listbox component (#4421)" This reverts commit c439a85061548bab85810781797559fa809b2887. --- apps/metadata-utils/src/types.ts | 7 - apps/tailwind-components/assets/css/main.css | 9 - .../components/form/Field.vue | 36 +- .../components/form/FieldInput.vue | 6 +- .../components/input/Listbox.vue | 370 ------------------ .../components/input/listbox/List.vue | 34 -- .../components/input/listbox/ListItem.vue | 38 -- .../components/input/listbox/Toggle.vue | 50 --- apps/tailwind-components/pages/Form.story.vue | 15 +- .../pages/input/Listbox.story.vue | 150 ------- apps/tailwind-components/tailwind.config.js | 10 - apps/tailwind-components/types/listbox.ts | 11 - apps/yarn.lock | 1 - .../emx2/rdf/ColumnTypeRdfMapperTest.java | 2 + .../tailwind-components/input/listbox.spec.ts | 187 --------- 15 files changed, 14 insertions(+), 912 deletions(-) delete mode 100644 apps/tailwind-components/components/input/Listbox.vue delete mode 100644 apps/tailwind-components/components/input/listbox/List.vue delete mode 100644 apps/tailwind-components/components/input/listbox/ListItem.vue delete mode 100644 apps/tailwind-components/components/input/listbox/Toggle.vue delete mode 100644 apps/tailwind-components/pages/input/Listbox.story.vue delete mode 100644 apps/tailwind-components/types/listbox.ts delete mode 100644 e2e/tests/tailwind-components/input/listbox.spec.ts diff --git a/apps/metadata-utils/src/types.ts b/apps/metadata-utils/src/types.ts index 139a9a3bc6..fd225aab24 100644 --- a/apps/metadata-utils/src/types.ts +++ b/apps/metadata-utils/src/types.ts @@ -105,10 +105,3 @@ export type columnValue = string | number | boolean | columnValueObject; interface columnValueObject { [x: string]: columnValue; } - -export type IInputValue = string | number | boolean; - -export type IInputValueLabel = { - value: IInputValue | IInputValue[] | null; - label?: string; -}; diff --git a/apps/tailwind-components/assets/css/main.css b/apps/tailwind-components/assets/css/main.css index c423815896..81f2ffc914 100644 --- a/apps/tailwind-components/assets/css/main.css +++ b/apps/tailwind-components/assets/css/main.css @@ -79,9 +79,6 @@ --background-color-invalid: var(--color-red-200); --background-color-input: var(--color-white); --background-color-input-checked: var(--color-yellow-500); - --background-color-listbox: var(--color-white); - --background-color-listbox-hover: var(--color-gray-100); - --background-color-listbox-selected: var(--color-blue-500); --background-color-table: var(--color-white); --background-color-notification: var(--color-red-700); @@ -131,10 +128,6 @@ --text-color-pagination-input: var(--text-color-title); --text-color-pagination-hover: var(--text-color-title); --text-color-footer-link: var(--color-yellow-500); - --text-color-listbox: var(--color-black); - --text-color-listbox-hover: var(--color-black); - --text-color-listbox-selected: var(--color-blue-50); - --text-color-button-input-toggle: var(--color-black); --text-color-table-column-header: var(--color-gray-600); --text-color-form-header: var(--color-blue-800); --text-color-input-description: var(--color-blue-800); @@ -164,8 +157,6 @@ --border-color-pagination: var(--color-transparent); --border-color-input: #C0C0C0; --border-color-input-inverted: var(--color-gray-600); - --border-color-listbox-option: var(--color-gray-100); - --border-color-listbox: var(--border-color-input); --border-radius-3px: 3px; --border-radius-50px: 50px; diff --git a/apps/tailwind-components/components/form/Field.vue b/apps/tailwind-components/components/form/Field.vue index ed72ccbb49..5f2dacf3cc 100644 --- a/apps/tailwind-components/components/form/Field.vue +++ b/apps/tailwind-components/components/form/Field.vue @@ -35,54 +35,30 @@ function validate(value: columnValue) { formFieldInput.value.validate(value); } - -const refData = ref(); - -onMounted(async () => { - if (["ONTOLOGY", "ONTOLOGY_ARRAY"].includes(props.column.columnType)) { - const response = await fetchTableData( - props.column.refSchemaId as string, - props.column.refTableId as string - ); - refData.value = response.rows.map((row) => row.name); - } -});