From aa8795bc83669b7bc896daaa40a3240a72d67757 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Thu, 4 Apr 2024 08:56:46 +0100 Subject: [PATCH] Working after breakout --- .../controls/FieldContext/Chart.svelte | 124 ++++++++++++++++++ .../settings/controls/MultiFieldSelect.svelte | 70 ++++------ 2 files changed, 146 insertions(+), 48 deletions(-) create mode 100644 packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte new file mode 100644 index 0000000000..780ab4c696 --- /dev/null +++ b/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte @@ -0,0 +1,124 @@ + + +
+
+ +

{supportLevelText}

+
+
+
+ + {columnName} +
+ + {#if errors.length > 0} + {#each errors as datum} +

{datum}

+ {/each} + {:else if warnings.length > 0} + {#each warnings as datum} +

{datum}

+ {/each} + {/if} +
+
+ + diff --git a/packages/builder/src/components/design/settings/controls/MultiFieldSelect.svelte b/packages/builder/src/components/design/settings/controls/MultiFieldSelect.svelte index f1478ad2bb..912292a449 100644 --- a/packages/builder/src/components/design/settings/controls/MultiFieldSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/MultiFieldSelect.svelte @@ -4,6 +4,7 @@ import { selectedScreen } from "stores/builder" import { createEventDispatcher } from "svelte" import { validators, constants as validatorConstants } from "../fieldValidator"; + import ChartFieldContext from './FieldContext/Chart.svelte' export let componentInstance = {} export let value = "" @@ -197,54 +198,27 @@ anchor={contextTooltipAnchor} offset={20} > -
-
- -

{currentOptionSupport.text}

-
-
-
- - {getOptionIconTooltip(currentOption)} -
- - {#if fieldSupport[currentOption]?.errors?.length > 0} - {#each (fieldSupport[currentOption].errors) as datum} -

{datum}

- {/each} - {:else if fieldSupport[currentOption]?.warnings?.length > 0} - {#each (fieldSupport[currentOption].warnings) as datum} -

{datum}

- {/each} - {/if} -
-
-
-
- -

{previousOptionSupport.text}

-
-
-
- - {getOptionIconTooltip(previousOption)} -
- - {#if fieldSupport[previousOption]?.errors?.length > 0} - {#each (fieldSupport[previousOption].errors) as datum} -

{datum}

- {/each} - {:else if fieldSupport[previousOption]?.warnings?.length > 0} - {#each (fieldSupport[previousOption].warnings) as datum} -

{datum}

- {/each} - {/if} -
-
+ +