infoword imp

This commit is contained in:
Gerard Burns 2024-04-08 08:36:43 +01:00
parent bd002db0e7
commit ca14c97491
2 changed files with 20 additions and 22 deletions

View File

@ -7,6 +7,7 @@
import InfoWord from './InfoWord.svelte' import InfoWord from './InfoWord.svelte'
export let supportLevelClass = '' export let supportLevelClass = ''
export let supportLevelIconColor = ""
export let supportLevelIcon = "" export let supportLevelIcon = ""
export let supportLevelIconTooltip = "" export let supportLevelIconTooltip = ""
export let supportLevelText = "" export let supportLevelText = ""
@ -89,14 +90,13 @@
</div> </div>
<div class={`line ${supportLevelClass}`}> <div class={`line ${supportLevelClass}`}>
<span class="bullet"></span> <span class="bullet"></span>
<div <InfoWord
class={`chip supportChip ${supportLevelClass}`}
on:mouseenter={() => handleMouseenter("support")} on:mouseenter={() => handleMouseenter("support")}
on:mouseleave={() => handleMouseleave("support")} on:mouseleave={() => handleMouseleave("support")}
> icon={supportLevelIcon}
<Icon size="S" tooltip={supportLevelIconTooltip} name={supportLevelIcon} /> color={supportLevelIconColor}
<span class="text">{supportLevelText}</span> text={supportLevelText}
</div> />
<span class="space" /> <span class="space" />
<span class="text">with</span> <span class="text">with</span>
<span class="space" /> <span class="space" />
@ -111,15 +111,11 @@
<span class="bullet"></span> <span class="bullet"></span>
<span class="text">Any</span> <span class="text">Any</span>
<span class="space" /> <span class="space" />
<div <InfoWord
class="chip info"
on:mouseenter={() => handleMouseenter("stringsAndNumbers")} on:mouseenter={() => handleMouseenter("stringsAndNumbers")}
on:mouseleave={() => handleMouseleave("stringsAndNumbers")} on:mouseleave={() => handleMouseleave("stringsAndNumbers")}
> text="non-number-values"
<span class="text"> />
non-number values
</span>
</div>
<span class="space" /> <span class="space" />
<span class="text"> <span class="text">
will be ignored will be ignored
@ -132,15 +128,11 @@
<span class="bullet"></span> <span class="bullet"></span>
<span class="text">No</span> <span class="text">No</span>
<span class="space" /> <span class="space" />
<div <InfoWord
class="chip info" on:mouseenter={() => handleMouseenter("required")}
on:mouseenter={() => handleMouseenter("required")} on:mouseleave={() => handleMouseleave("required")}
on:mouseleave={() => handleMouseleave("required")} text="required"
> />
<span class="text">
required
</span>
</div>
<span class="space" /> <span class="space" />
<a target="_blank" rel="noopener noreferrer" href={"https://docs.budibase.com/docs/budibasedb#constraints"} class="chip link topLink"> <a target="_blank" rel="noopener noreferrer" href={"https://docs.budibase.com/docs/budibasedb#constraints"} class="chip link topLink">
<Icon size="S" name={"DataUnavailable"} /> <Icon size="S" name={"DataUnavailable"} />

View File

@ -133,6 +133,7 @@
if (level === validatorConstants.unsupported) { if (level === validatorConstants.unsupported) {
return { return {
class: "supportLevelUnsupported", class: "supportLevelUnsupported",
iconColor: "var(--red)",
icon: "Alert", icon: "Alert",
iconTooltip: fieldSupport[optionKey]?.message, iconTooltip: fieldSupport[optionKey]?.message,
text: "Not compatible" text: "Not compatible"
@ -142,6 +143,7 @@
if (level === validatorConstants.partialSupport) { if (level === validatorConstants.partialSupport) {
return { return {
class: "supportLevelPartialSupport", class: "supportLevelPartialSupport",
iconColor: "var(--yellow)",
icon: "AlertCheck", icon: "AlertCheck",
iconTooltip: fieldSupport[optionKey]?.message, iconTooltip: fieldSupport[optionKey]?.message,
text: "Partially compatible" text: "Partially compatible"
@ -151,6 +153,7 @@
if (level === validatorConstants.supported) { if (level === validatorConstants.supported) {
return { return {
class: "supportLevelSupported", class: "supportLevelSupported",
iconColor: "var(--green)",
icon: "CheckmarkCircle", icon: "CheckmarkCircle",
iconTooltip: fieldSupport[optionKey]?.message, iconTooltip: fieldSupport[optionKey]?.message,
text: "Compatible" text: "Compatible"
@ -159,6 +162,7 @@
return { return {
class: "supportLevelPartialSupport", class: "supportLevelPartialSupport",
iconColor: "var(--yellow)",
icon: "AlertCheck", icon: "AlertCheck",
iconTooltip: "", iconTooltip: "",
text: "Partially Compatible" text: "Partially Compatible"
@ -213,6 +217,7 @@
support={fieldSupport[currentOption]} support={fieldSupport[currentOption]}
supportLevelClass={currentOptionSupport.class} supportLevelClass={currentOptionSupport.class}
supportLevelIcon={currentOptionSupport.icon} supportLevelIcon={currentOptionSupport.icon}
supportLevelIconColor={currentOptionSupport.iconColor}
supportLevelIconTooltip={currentOptionSupport.iconTooltip} supportLevelIconTooltip={currentOptionSupport.iconTooltip}
supportLevelText={currentOptionSupport.text} supportLevelText={currentOptionSupport.text}
columnIcon={getOptionIcon(currentOption)} columnIcon={getOptionIcon(currentOption)}
@ -226,6 +231,7 @@
support={fieldSupport[previousOption]} support={fieldSupport[previousOption]}
supportLevelClass={previousOptionSupport.class} supportLevelClass={previousOptionSupport.class}
supportLevelIcon={previousOptionSupport.icon} supportLevelIcon={previousOptionSupport.icon}
supportLevelIconColor={previousOptionSupport.iconColor}
supportLevelIconTooltip={previousOptionSupport.iconTooltip} supportLevelIconTooltip={previousOptionSupport.iconTooltip}
supportLevelText={previousOptionSupport.text} supportLevelText={previousOptionSupport.text}
columnIcon={getOptionIcon(previousOption)} columnIcon={getOptionIcon(previousOption)}