From bddb6591d63f89acf220e0efbeed5f9ebdf680c4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 14 Jul 2021 15:46:31 +0100 Subject: [PATCH] Update styles of server binding panel used for formula fields and automation bindings --- .../common/bindings/ServerBindingPanel.svelte | 263 ++++++++++-------- 1 file changed, 150 insertions(+), 113 deletions(-) diff --git a/packages/builder/src/components/common/bindings/ServerBindingPanel.svelte b/packages/builder/src/components/common/bindings/ServerBindingPanel.svelte index 2c0e33227b..4da29cb049 100644 --- a/packages/builder/src/components/common/bindings/ServerBindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/ServerBindingPanel.svelte @@ -1,12 +1,6 @@ -
- -
- Available bindings - -
-
- {#each categories as [categoryName, bindings]} - {categoryName} - {#each bindings.filter( binding => binding.label.match(searchRgx) ) as binding} -
{ - value = addToText(value, getCaretPosition(), binding) - }} - > - {binding.label} - {binding.type} -
-
- {binding.description || ""} -
-
- {/each} - {/each} -
-
- Helpers - {#each helpers.filter(helper => helper.label.match(searchRgx) || helper.description.match(searchRgx)) as helper} -
{ - value = addToText(value, getCaretPosition(), helper.text) - }} - > - {helper.label} -
-
- {@html helper.description || ""} -
-
{helper.example || ""}
-
- {/each} -
-
-
-
+ +
+
+
Search
+ +
+ {#each filteredCategories as [categoryName, bindings]} + {#if bindings.length} +
+
{categoryName}
+
    + {#each bindings as binding} +
  • { + value = addToText(value, getCaretPosition(), binding) + }} + > + {binding.label} + {binding.type} + {#if binding.description} +
    +
    + {binding.description || ""} +
    + {/if} +
  • + {/each} +
+
+ {/if} + {/each} + {#if filteredHelpers?.length} +
+
Helpers
+
    + {#each filteredHelpers as helper} +
  • { + value = addToText(value, getCaretPosition(), helper.text) + }} + > +
    +
    {helper.displayText}
    +
    + {@html helper.description} +
    +
    {helper.example || ''}
    +
    +
  • + {/each} +
+
+ {/if} +
+
+