-
-
-
-
-
+
+
+
+
@@ -144,13 +142,12 @@ onBeforeUnmount(() => {
diff --git a/src/ui/src/builder/BuilderFieldsKeyValue.vue b/src/ui/src/builder/BuilderFieldsKeyValue.vue
index 006002809..dd29aa0ce 100644
--- a/src/ui/src/builder/BuilderFieldsKeyValue.vue
+++ b/src/ui/src/builder/BuilderFieldsKeyValue.vue
@@ -192,9 +192,6 @@ onMounted(async () => {
@import "./sharedStyles.css";
.chipStackContainer {
- padding: 12px;
- margin-top: 4px;
- padding-bottom: 12px;
border-bottom: 1px solid var(--builderSeparatorColor);
}
diff --git a/src/ui/src/builder/BuilderFieldsPadding.vue b/src/ui/src/builder/BuilderFieldsPadding.vue
index 14464d2c5..f9a3e5bbb 100644
--- a/src/ui/src/builder/BuilderFieldsPadding.vue
+++ b/src/ui/src/builder/BuilderFieldsPadding.vue
@@ -5,38 +5,36 @@
tabindex="-1"
:data-automation-key="props.fieldKey"
>
-
-
-
-
-
-
+
+
+
+
@@ -391,12 +389,6 @@ onBeforeUnmount(() => {
@import "./sharedStyles.css";
@import "./ico.css";
-.chipStackContainer {
- padding: 12px;
- margin-top: 4px;
- padding-bottom: 12px;
-}
-
.main {
border-top: 1px solid var(--builderSeparatorColor);
padding: 12px;
diff --git a/src/ui/src/builder/BuilderFieldsShadow.vue b/src/ui/src/builder/BuilderFieldsShadow.vue
index 54be9f0ac..b7135065f 100644
--- a/src/ui/src/builder/BuilderFieldsShadow.vue
+++ b/src/ui/src/builder/BuilderFieldsShadow.vue
@@ -5,38 +5,36 @@
tabindex="-1"
:data-automation-key="props.fieldKey"
>
-
-
-
-
-
-
+
+
+
+
@@ -236,11 +234,6 @@ onBeforeUnmount(() => {
diff --git a/src/ui/src/builder/BuilderFieldsWidth.vue b/src/ui/src/builder/BuilderFieldsWidth.vue
index bb3eaf0ba..f72d49e23 100644
--- a/src/ui/src/builder/BuilderFieldsWidth.vue
+++ b/src/ui/src/builder/BuilderFieldsWidth.vue
@@ -5,38 +5,36 @@
tabindex="-1"
:data-automation-key="props.fieldKey"
>
-
-
-
-
-
-
+
+
+
+
@@ -259,11 +257,6 @@ onBeforeUnmount(() => {
diff --git a/src/ui/src/builder/BuilderSettingsHandlers.vue b/src/ui/src/builder/BuilderSettingsHandlers.vue
index eca2728cd..efc57aa26 100644
--- a/src/ui/src/builder/BuilderSettingsHandlers.vue
+++ b/src/ui/src/builder/BuilderSettingsHandlers.vue
@@ -1,45 +1,34 @@
-
+
bolt
- Events
+
@@ -73,63 +62,38 @@
:close-action="customHandlerModalCloseAction"
icon="bolt"
modal-title="Add Custom Event Handler"
+ allow-overflow
>
-
-
-
- {{ eventType }}
-
-
-
-
-
-
-
-
- {{ eventInfo.desc }}
+
+
+
-
+
+
-
-
- Event type
-
-
-
- Can be any event type.
-
-
+
+
+
- Handler function
-
-
- The function that will handle the event.
-
+
@@ -139,6 +129,7 @@ import BuilderFieldsShadow from "./BuilderFieldsShadow.vue";
import BuilderFieldsText from "./BuilderFieldsText.vue";
import BuilderFieldsWidth from "./BuilderFieldsWidth.vue";
import BuilderFieldsTools from "./BuilderFieldsTools.vue";
+import WdsFieldWrapper from "@/wds/WdsFieldWrapper.vue";
const wf = inject(injectionKeys.core);
const ssbm = inject(injectionKeys.builderManager);
@@ -187,18 +178,21 @@ const fieldsByCategory = computed(() => {
.BuilderSettingsProperties {
padding: 24px;
-}
-.propertyCategory .title {
- margin-top: 24px;
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
}
-textarea.content {
- resize: vertical;
- height: 8em;
+.BuilderSettingsProperties__category {
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
}
-input[type="color"].content {
- height: 48px;
+.BuilderSettingsProperties__category__title {
+ color: #828282;
+ font-weight: 500;
+ font-size: 12px;
}
diff --git a/src/ui/src/builder/BuilderTemplateInput.vue b/src/ui/src/builder/BuilderTemplateInput.vue
index 02742361f..09d94a2e4 100644
--- a/src/ui/src/builder/BuilderTemplateInput.vue
+++ b/src/ui/src/builder/BuilderTemplateInput.vue
@@ -1,11 +1,9 @@
+
+ {{ propertyCategory }} +
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- {{ propertyCategory }}
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ fieldValue.name ?? fieldKey
- }} : {{ fieldValue.type }}
-
-
-
- {{ fieldValue.desc }}
-
-
-
-
-
-
+
import Fuse from "fuse.js";
-import { PropType, inject, nextTick, ref, shallowRef } from "vue";
+import {
+ PropType,
+ inject,
+ nextTick,
+ ref,
+ shallowRef,
+ ComponentInstance,
+} from "vue";
import injectionKeys from "../injectionKeys";
+import WdsTextInput from "@/wds/WdsTextInput.vue";
+import WdsTextareaInput from "@/wds/WdsTextareaInput.vue";
const emit = defineEmits(["input", "update:value"]);
@@ -97,7 +102,7 @@ const props = defineProps({
const ss = inject(injectionKeys.core);
const autocompleteOptions = shallowRef<{ text: string; type: string }[]>([]);
-const input = ref(null);
+const input = ref | null>(null);
defineExpose({
focus: () => input.value?.focus(),
@@ -107,24 +112,26 @@ function _get(object: object, path: string[]) {
return path.reduce((acc, key) => acc?.[key], object);
}
-const handleComplete = (selectedText) => {
+const handleComplete = (selectedText: string) => {
let newValue = input.value?.value ?? "";
- const { selectionStart, selectionEnd } = input.value ?? {};
+ const { selectionStart, selectionEnd } = input.value?.getSelection() ?? {};
const text = newValue.slice(0, selectionStart);
const full = getPath(text);
if (full === null) return;
const keyword = full.at(-1);
const regexKeyword = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "$"; // escape the keyword to handle properly on a regex
const replaced = text.replace(new RegExp(regexKeyword), selectedText);
-
+ // TODO: fix autocomplete
+ console.log("handleComplete old", input.value.value);
newValue = replaced + newValue.slice(selectionEnd);
emit("input", { target: { value: newValue } });
+ console.log("handleComplete new", newValue);
emit("update:value", newValue);
autocompleteOptions.value = [];
input.value.focus();
nextTick(() => {
- input.value.selectionEnd = replaced.length;
- input.value.selectionStart = replaced.length;
+ input.value.setSelectionEnd(replaced.length);
+ input.value.setSelectionStart(replaced.length);
});
};
@@ -154,13 +161,15 @@ const escapeVariable = (key) => {
};
const handleInput = (ev) => {
+ console.log("##handleInput", ev);
emit("input", ev);
emit("update:value", ev.target.value);
showAutocomplete();
};
const showAutocomplete = () => {
- const { selectionStart, selectionEnd, value: newValue } = input.value ?? {};
+ const { selectionStart, selectionEnd } = input.value?.getSelection() ?? {};
+ const newValue = input.value?.value;
const collapsed = selectionStart === selectionEnd;
if (!collapsed) {
autocompleteOptions.value = [];
diff --git a/src/ui/src/builder/sharedStyles.css b/src/ui/src/builder/sharedStyles.css
index c699da0c2..6702eaa52 100644
--- a/src/ui/src/builder/sharedStyles.css
+++ b/src/ui/src/builder/sharedStyles.css
@@ -181,6 +181,7 @@ code {
font-size: 1rem;
}
+/*
.fieldWrapper {
position: relative;
width: 100%;
@@ -223,6 +224,7 @@ code {
outline: none;
width: 100%;
}
+*/
.fieldWrapper > .desc {
color: var(--builderSecondaryTextColor);
diff --git a/src/ui/src/wds/WdsFieldWrapper.vue b/src/ui/src/wds/WdsFieldWrapper.vue
index 31cce095e..02a9a5cad 100644
--- a/src/ui/src/wds/WdsFieldWrapper.vue
+++ b/src/ui/src/wds/WdsFieldWrapper.vue
@@ -1,17 +1,36 @@
-
-
-
+
{{ hint }}
+
+
+
+
+ {{ hint }}