Skip to content

Commit

Permalink
fix(ui): resolve missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
madeindjs committed Jan 8, 2025
1 parent d99342e commit 39ee8bf
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 21 deletions.
4 changes: 1 addition & 3 deletions src/ui/src/builder/BuilderHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
:class="wf.syncHealth.value"
:title="syncHealthStatus()"
>
<i ref="syncHealthIcon" class="material-symbols-outlined icon"
>sync</i
<i class="material-symbols-outlined icon">sync</i
><span v-if="wf.syncHealth.value == 'offline'">Offline</span>
</div>
</div>
Expand All @@ -67,7 +66,6 @@ import BuilderModal, { ModalAction } from "./BuilderModal.vue";
import injectionKeys from "@/injectionKeys";
import BuilderStateExplorer from "./BuilderStateExplorer.vue";
const syncHealthIcon = ref(null);
const wf = inject(injectionKeys.core);
const ssbm = inject(injectionKeys.builderManager);
const { undo, redo, getUndoRedoSnapshot } = useComponentActions(wf, ssbm);
Expand Down
3 changes: 2 additions & 1 deletion src/ui/src/builder/BuilderTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import {
onMounted,
onUnmounted,
ref,
useTemplateRef,
} from "vue";
const DELAY_MS = 200;
const DEFAULT_GAP_PX = 4;
const rootEl = ref(null);
const rootEl = useTemplateRef("rootEl");
const isActive = ref(false);
const tooltipText = ref<ComputedRef | string | null>(null);
let trackedElement: HTMLElement | null = null;
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/builder/panels/BuilderPanelSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ export type BuilderPanelAction = {

<script setup lang="ts">
import injectionKeys from "@/injectionKeys";
import { inject, ref } from "vue";
import { inject, useTemplateRef } from "vue";
import BuilderCodePanel from "./BuilderCodePanel.vue";
import BuilderLogPanel from "./BuilderLogPanel.vue";
const wfbm = inject(injectionKeys.builderManager);
const screenEl = ref(null);
const screenEl = useTemplateRef("screenEl");
</script>

<style scoped>
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/builder/settings/BuilderSettingsBinding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { useComponentActions } from "../useComponentActions";
import injectionKeys from "@/injectionKeys";
import BuilderTemplateInput from "./BuilderTemplateInput.vue";
import WdsFieldWrapper from "@/wds/WdsFieldWrapper.vue";
import BuilderSectionTitle from "./BuilderSectionTitle.vue";
const hint =
'Links this component to a state element, in a two-way fashion. Reference the state element directly, i.e. use "my_var" instead of "@{my_var}".';
Expand Down
6 changes: 3 additions & 3 deletions src/ui/src/components/core/embed/CoreMapbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export default {

<script setup lang="ts">
import "mapbox-gl/dist/mapbox-gl.css";
import { inject, ref, watch, computed } from "vue";
import { inject, ref, watch, computed, useTemplateRef } from "vue";
import injectionKeys from "@/injectionKeys";
import type * as mapboxgl from "mapbox-gl";
const fields = inject(injectionKeys.evaluatedFields);
const rootEl = ref(null);
const mapEl = ref(null);
const rootEl = useTemplateRef("rootEl");
const mapEl = useTemplateRef("mapEl");
const center = computed<mapboxgl.LngLatLike>(() => [
fields.lng.value,
fields.lat.value,
Expand Down
6 changes: 3 additions & 3 deletions src/ui/src/components/core/embed/CorePDF.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
</script>

<script setup lang="ts">
import { inject, ref, watch, computed, onMounted } from "vue";
import { inject, ref, watch, computed, onMounted, useTemplateRef } from "vue";
import injectionKeys from "@/injectionKeys";
import "@tato30/vue-pdf/style.css";
Expand All @@ -129,8 +129,8 @@ const scale = ref(1);
const page = ref(1);
const matches = ref<MatchType[]>([]);
const currentMatch = ref(0);
const rootEl = ref(null);
const viewerEl = ref(null);
const rootEl = useTemplateRef("rootEl");
const viewerEl = useTemplateRef("viewerEl");
const loading = ref(false);
const pagesLoaded = ref(0);
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/components/core/input/CoreFileInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
</script>

<script setup lang="ts">
import { computed, inject, Ref, ref, watch } from "vue";
import { computed, inject, Ref, ref, useTemplateRef, watch } from "vue";
import injectionKeys from "@/injectionKeys";
import LoadingSymbol from "@/renderer/LoadingSymbol.vue";
import { useFormValueBroker } from "@/renderer/useFormValueBroker";
Expand All @@ -126,7 +126,7 @@ type SavedFile = { name: string; type: string; data: unknown };
const fields = inject(injectionKeys.evaluatedFields);
const rootInstance = ref<ComponentPublicInstance | null>(null);
const fileEl: Ref<HTMLInputElement> = ref(null);
const fileEl = useTemplateRef("fileEl");
const message: Ref<string> = ref(null);
const wf = inject(injectionKeys.core);
const instancePath = inject(injectionKeys.instancePath);
Expand Down
6 changes: 3 additions & 3 deletions src/ui/src/components/core/input/CoreNumberInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export default {
</script>

<script setup lang="ts">
import { inject, ref } from "vue";
import { inject, useTemplateRef } from "vue";
import injectionKeys from "@/injectionKeys";
import { useFormValueBroker } from "@/renderer/useFormValueBroker";
const fields = inject(injectionKeys.evaluatedFields);
const rootInstance = ref<ComponentPublicInstance | null>(null);
const inputEl = ref(null);
const rootInstance = useTemplateRef("rootInstance");
const inputEl = useTemplateRef("inputEl");
const wf = inject(injectionKeys.core);
const instancePath = inject(injectionKeys.instancePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports[`CoreCheckboxInput > should render value from the state and forward emit
data-v-7a72f1be=""
>
<input
checked=""
data-v-7a72f1be=""
type="checkbox"
value="b"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exports[`CoreDateInput > should render value from the state and forward emit 1`]
<input
data-v-acf95c76=""
type="date"
value="2024-12-14"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ exports[`CoreRadioInput > should render value from the state and forward emit 1`
data-v-d075b11d=""
>
<input
checked=""
data-v-d075b11d=""
id="component-id-test:0-option-a"
name="component-id-test:0-options"
Expand Down
11 changes: 9 additions & 2 deletions src/ui/src/components/workflows/base/WorkflowMiniMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@

<script setup lang="ts">
import injectionKeys from "@/injectionKeys";
import { inject, nextTick, onMounted, onUnmounted, ref } from "vue";
import {
inject,
nextTick,
onMounted,
onUnmounted,
ref,
useTemplateRef,
} from "vue";
const wfbm = inject(injectionKeys.builderManager);
const rootEl = ref(null);
const rootEl = useTemplateRef("rootEl");
const emit = defineEmits(["changeRenderOffset"]);
const resizeObserver = new ResizeObserver(render);
const mutationObserver = new MutationObserver(render);
Expand Down
11 changes: 9 additions & 2 deletions src/ui/src/components/workflows/base/WorkflowNavigator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@
</template>

<script setup lang="ts">
import { onMounted, onUnmounted, ref, toRefs, watch } from "vue";
import {
onMounted,
onUnmounted,
ref,
toRefs,
useTemplateRef,
watch,
} from "vue";
import WorkflowMiniMap from "./WorkflowMiniMap.vue";
import WdsButton from "@/wds/WdsButton.vue";
import WdsTextInput from "@/wds/WdsTextInput.vue";
Expand All @@ -105,7 +112,7 @@ const props = defineProps<{
const { zoomLevel } = toRefs(props);
const rootEl = ref(null);
const rootEl = useTemplateRef("rootEl");
const emit = defineEmits([
"changeRenderOffset",
"changeZoomLevel",
Expand Down

0 comments on commit 39ee8bf

Please sign in to comment.