[automated] Apply ESLint and Prettier fixes

This commit is contained in:
GitHub Action
2025-12-13 18:01:13 +00:00
parent 87c3ba636f
commit 574a3c21c9
3 changed files with 23 additions and 24 deletions

View File

@@ -103,7 +103,7 @@ function normalizeWidgetValue(value: unknown): WidgetValue {
if (
Array.isArray(value) &&
value.length > 0 &&
value.every((item): item is File => item instanceof File)
value.every((item): item is File => item instanceof File)
) {
return value
}
@@ -115,14 +115,14 @@ function normalizeWidgetValue(value: unknown): WidgetValue {
return undefined
}
function getControlWidget(widget: IBaseWidget): (() => Ref<ControlOptions>)|undefined {
function getControlWidget(
widget: IBaseWidget
): (() => Ref<ControlOptions>) | undefined {
const cagWidget = widget.linkedWidgets?.find(
(w) => w.name == 'control_after_generate'
)
if (!cagWidget) return
const cagRef = ref<ControlOptions>(
normalizeControlOption(cagWidget.value)
)
const cagRef = ref<ControlOptions>(normalizeControlOption(cagWidget.value))
watch(cagRef, (value) => {
cagWidget.value = normalizeControlOption(value)
cagWidget.callback?.(cagWidget.value)

View File

@@ -1,24 +1,24 @@
<template>
<WidgetLayoutField :widget>
<div class="relative">
<Select
v-model="modelValue"
:invalid
:filter="selectOptions.length > 4"
:auto-filter-focus="selectOptions.length > 4"
:options="selectOptions"
v-bind="combinedProps"
:class="cn(WidgetInputBaseClass, 'w-full text-xs')"
:aria-label="widget.name"
size="small"
:pt="{
option: 'text-xs',
dropdown: 'w-8',
label: cn('truncate min-w-[4ch]', slots.default && 'mr-5'),
overlay: 'w-fit min-w-full'
}"
data-capture-wheel="true"
/>
<Select
v-model="modelValue"
:invalid
:filter="selectOptions.length > 4"
:auto-filter-focus="selectOptions.length > 4"
:options="selectOptions"
v-bind="combinedProps"
:class="cn(WidgetInputBaseClass, 'w-full text-xs')"
:aria-label="widget.name"
size="small"
:pt="{
option: 'text-xs',
dropdown: 'w-8',
label: cn('truncate min-w-[4ch]', slots.default && 'mr-5'),
overlay: 'w-fit min-w-full'
}"
data-capture-wheel="true"
/>
<div class="absolute top-5 right-8 h-4 w-7 -translate-y-4/5">
<slot />
</div>

View File

@@ -68,7 +68,6 @@ export interface SimplifiedWidget<
spec?: InputSpecV2
controlWidget?: () => Ref<ControlOptions>
}
export type SimplifiedControlWidget<T extends WidgetValue = WidgetValue> =
SimplifiedWidget<T> & Required<Pick<SimplifiedWidget<T>, 'controlWidget'>>