From 033baea418d78e6131017b53c8307f6b1b604060 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 15 Jan 2024 22:23:10 +0100 Subject: [PATCH] Insert taxonomy mappings --- l10n/bundle.l10n.json | 3 + src/dashboardWebView/DashboardMessage.ts | 1 + .../components/Common/Button.tsx | 12 +- .../components/DataView/DataFormControls.tsx | 6 +- .../TaxonomyView/TaxonomyManager.tsx | 42 +++---- .../TaxonomyView/TaxonomyTagging.tsx | 106 +++++++++++++++--- .../components/TaxonomyView/TaxonomyView.tsx | 13 ++- src/dashboardWebView/styles.css | 6 +- src/helpers/TaxonomyHelper.ts | 79 +++++++++---- src/listeners/dashboard/TaxonomyListener.ts | 28 +++++ src/localization/localization.enum.ts | 12 ++ 11 files changed, 222 insertions(+), 86 deletions(-) diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json index ced9308e..9d35445c 100644 --- a/l10n/bundle.l10n.json +++ b/l10n/bundle.l10n.json @@ -294,6 +294,7 @@ "dashboard.taxonomyView.taxonomyManager.table.heading.action": "Action", "dashboard.taxonomyView.taxonomyManager.table.row.empty": "No {0} found", "dashboard.taxonomyView.taxonomyManager.table.unmapped.title": "Missing in your settings", + "dashboard.taxonomyView.taxonomyManager.filterInput.placeholder": "Filter", "dashboard.taxonomyView.taxonomyView.navigationBar.title": "Select the taxonomy", "dashboard.taxonomyView.taxonomyView.button.import": "Import taxonomy", @@ -661,9 +662,11 @@ "helpers.taxonomyHelper.createNew.input.placeholder": "Enter the value you want to add", "helpers.taxonomyHelper.createNew.input.validate.noValue": "A value must be provided.", "helpers.taxonomyHelper.createNew.input.validate.exists": "The value already exists.", + "helpers.taxonomyHelper.process.insert": "{0}: Renaming \"{1}\" from {2} to {3}.", "helpers.taxonomyHelper.process.edit": "{0}: Renaming \"{1}\" from {2} to {3}.", "helpers.taxonomyHelper.process.merge": "{0}: Merging \"{1}\" from {2} to {3}.", "helpers.taxonomyHelper.process.delete": "{0}: Deleting \"{1}\" from {2}.", + "helpers.taxonomyHelper.process.insert.success": "Insert completed.", "helpers.taxonomyHelper.process.edit.success": "Edit completed.", "helpers.taxonomyHelper.process.merge.success": "Merge completed.", "helpers.taxonomyHelper.process.delete.success": "Deletion completed.", diff --git a/src/dashboardWebView/DashboardMessage.ts b/src/dashboardWebView/DashboardMessage.ts index 9c8a2f7a..335160bc 100644 --- a/src/dashboardWebView/DashboardMessage.ts +++ b/src/dashboardWebView/DashboardMessage.ts @@ -64,6 +64,7 @@ export enum DashboardMessage { createTaxonomy = 'createTaxonomy', importTaxonomy = 'importTaxonomy', moveTaxonomy = 'moveTaxonomy', + mapTaxonomy = 'mapTaxonomy', // Other getTheme = 'getTheme', diff --git a/src/dashboardWebView/components/Common/Button.tsx b/src/dashboardWebView/components/Common/Button.tsx index 140d3f88..68384012 100644 --- a/src/dashboardWebView/components/Common/Button.tsx +++ b/src/dashboardWebView/components/Common/Button.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import useThemeColors from '../../hooks/useThemeColors'; export interface IButtonProps { secondary?: boolean; @@ -15,19 +14,14 @@ export const Button: React.FunctionComponent = ({ secondary, children }: React.PropsWithChildren) => { - const { getColors } = useThemeColors(); return (