mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 00:00:46 +00:00
remove frontend warnings
This commit is contained in:
Generated
+5
-4
@@ -5569,9 +5569,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001563",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz",
|
||||
"integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==",
|
||||
"version": "1.0.30001655",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz",
|
||||
"integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -5586,7 +5586,8 @@
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/canvas": {
|
||||
"version": "2.11.2",
|
||||
|
||||
@@ -139,11 +139,11 @@
|
||||
"vscode-languageclient": "~9.0.1",
|
||||
"vscode-uri": "~3.0.8",
|
||||
"vscode-ws-jsonrpc": "~3.3.2",
|
||||
"windmill-parser-wasm-rust": "^1.387.0",
|
||||
"windmill-parser-wasm-php": "^1.382.2",
|
||||
"windmill-parser-wasm-go": "^1.382.2",
|
||||
"windmill-parser-wasm-php": "^1.382.2",
|
||||
"windmill-parser-wasm-py": "^1.382.2",
|
||||
"windmill-parser-wasm-regex": "^1.382.2",
|
||||
"windmill-parser-wasm-rust": "^1.387.0",
|
||||
"windmill-parser-wasm-ts": "^1.382.2",
|
||||
"windmill-sql-datatype-parser-wasm": "^1.318.0",
|
||||
"y-monaco": "^0.1.4",
|
||||
|
||||
@@ -905,5 +905,6 @@
|
||||
/* Firefox */
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield !important;
|
||||
appearance: textfield !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name={'authelia'} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name={'authentik'} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row gap-1 items-center w-full" id={randomId} on:pointerdown on:focus>
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
type="date"
|
||||
bind:value={date}
|
||||
|
||||
@@ -883,7 +883,7 @@
|
||||
Object.keys(flowModule.value.input_transforms).forEach((key) => {
|
||||
if (key !== 'prev_output') {
|
||||
const schema = $flowStateStore[module.id].schema
|
||||
const schemaProperty = Object.entries(schema.properties).find(
|
||||
const schemaProperty = Object.entries(schema?.properties ?? {}).find(
|
||||
(x) => x[0] === key
|
||||
)?.[1]
|
||||
const snakeKey = snakeCase(key)
|
||||
@@ -892,7 +892,7 @@
|
||||
(!$flowStore.schema || !(snakeKey in ($flowStore.schema.properties as any) ?? {})) // prevent overriding flow inputs
|
||||
) {
|
||||
copilotFlowInputs[snakeKey] = schemaProperty
|
||||
if (schema.required.includes(snakeKey)) {
|
||||
if (schema?.required.includes(snakeKey)) {
|
||||
copilotFlowRequiredInputs.push(snakeKey)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<Calendar size={SMALL_ICON_SIZE} class="text-secondary min-w-3.5" />
|
||||
<span class="whitespace-nowrap">
|
||||
Schedule:
|
||||
<!-- svelte-ignore a11y-invalid-attribute -->
|
||||
<a
|
||||
href="#"
|
||||
class="break-words text-blue-600 font-normal"
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
|
||||
if ($flowStateStore && $flowStateStore?.[modId] == undefined) {
|
||||
$flowStateStore[modId] = {
|
||||
...($flowStateStore[modId] ?? {}),
|
||||
...(($flowStateStore[modId] as object) ?? {}),
|
||||
previewResult: jobLoaded.args
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
import StepInputGen from './copilot/StepInputGen.svelte'
|
||||
import type { PickableProperties } from './flows/previousResults'
|
||||
|
||||
export let schema: Schema
|
||||
export let schema: Schema | { properties?: Record<string, any>; required?: string[] }
|
||||
export let arg: InputTransform | any
|
||||
export let argName: string
|
||||
export let extraLib: string = 'missing extraLib'
|
||||
@@ -45,11 +45,11 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
$: inputCat = computeInputCat(
|
||||
schema.properties[argName].type,
|
||||
schema.properties[argName].format,
|
||||
schema.properties[argName].items?.type,
|
||||
schema.properties[argName].enum,
|
||||
schema.properties[argName].contentEncoding
|
||||
schema?.properties?.[argName].type,
|
||||
schema?.properties?.[argName].format,
|
||||
schema?.properties?.[argName].items?.type,
|
||||
schema?.properties?.[argName].enum,
|
||||
schema?.properties?.[argName].contentEncoding
|
||||
)
|
||||
|
||||
let propertyType = getPropertyType(arg)
|
||||
@@ -170,11 +170,11 @@
|
||||
|
||||
function setDefaultCode() {
|
||||
if (!arg?.value) {
|
||||
monacoTemplate?.setCode(schema.properties[argName].default)
|
||||
monacoTemplate?.setCode(schema.properties?.[argName].default)
|
||||
}
|
||||
}
|
||||
|
||||
$: schema.properties[argName].default && setDefaultCode()
|
||||
$: schema?.properties?.[argName].default && setDefaultCode()
|
||||
|
||||
let resourceTypes: string[] | undefined = undefined
|
||||
|
||||
@@ -194,10 +194,10 @@
|
||||
<div class="flex flex-wrap grow">
|
||||
<FieldHeader
|
||||
label={argName}
|
||||
format={schema.properties[argName].format}
|
||||
contentEncoding={schema.properties[argName].contentEncoding}
|
||||
required={schema.required.includes(argName)}
|
||||
type={schema.properties[argName].type}
|
||||
format={schema?.properties?.[argName].format}
|
||||
contentEncoding={schema?.properties?.[argName].contentEncoding}
|
||||
required={schema.required?.includes(argName)}
|
||||
type={schema.properties?.[argName].type}
|
||||
/>
|
||||
|
||||
{#if isStaticTemplate(inputCat)}
|
||||
@@ -220,7 +220,7 @@
|
||||
bind:this={stepInputGen}
|
||||
{focused}
|
||||
{arg}
|
||||
schemaProperty={schema.properties[argName]}
|
||||
schemaProperty={schema?.properties?.[argName]}
|
||||
showPopup={(isStaticTemplate(inputCat) && propertyType == 'static') ||
|
||||
propertyType === undefined ||
|
||||
propertyType === 'static' ||
|
||||
@@ -382,7 +382,7 @@
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if propertyType === undefined || propertyType == 'static'}
|
||||
{:else if (propertyType === undefined || propertyType == 'static') && schema?.properties?.[argName]}
|
||||
<ArgInput
|
||||
{resourceTypes}
|
||||
noMargin
|
||||
@@ -402,7 +402,7 @@
|
||||
bind:value={arg.value}
|
||||
type={schema.properties[argName].type}
|
||||
oneOf={schema.properties[argName].oneOf}
|
||||
required={schema.required.includes(argName)}
|
||||
required={schema.required?.includes(argName)}
|
||||
bind:pattern={schema.properties[argName].pattern}
|
||||
bind:valid={inputCheck}
|
||||
defaultValue={schema.properties[argName].default}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import VariableEditor from './VariableEditor.svelte'
|
||||
import { Plus } from 'lucide-svelte'
|
||||
|
||||
export let schema: Schema
|
||||
export let schema: Schema | { properties?: Record<string, any> }
|
||||
export let args: Record<string, InputTransform | any> = {}
|
||||
|
||||
export let isValid: boolean = true
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
>
|
||||
<div class="w-full h-full flex flex-col">
|
||||
<div class="flex flex-row gap-2 pb-4">
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search {itemName}s"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name={'kanidm'} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name={'keycloak'} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
@@ -602,5 +602,6 @@
|
||||
/* Firefox */
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield !important;
|
||||
appearance: textfield !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import ScriptFix from './copilot/ScriptFix.svelte'
|
||||
|
||||
export let mod: FlowModule
|
||||
export let schema: Schema
|
||||
export let schema: Schema | { properties?: Record<string, any> }
|
||||
export let pickableProperties: PickableProperties | undefined
|
||||
export let lang: Script['language']
|
||||
export let editor: Editor | undefined
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import type SimpleEditor from './SimpleEditor.svelte'
|
||||
import { getResourceTypes } from './resourceTypesStore'
|
||||
|
||||
export let schema: Schema
|
||||
export let schema: Schema | { properties?: Record<string, any>; required?: string[] }
|
||||
export let args: Record<string, any> = {}
|
||||
export let mod: FlowModule
|
||||
export let pickableProperties: PickableProperties | undefined
|
||||
@@ -76,7 +76,7 @@
|
||||
{#each keys as argName, i (argName)}
|
||||
{#if Object.keys(schema.properties ?? {}).includes(argName)}
|
||||
<div class="flex gap-2">
|
||||
{#if typeof args == 'object' && schema?.properties[argName]}
|
||||
{#if typeof args == 'object' && schema?.properties?.[argName]}
|
||||
<ArgInput
|
||||
{resourceTypes}
|
||||
minW={false}
|
||||
@@ -86,7 +86,7 @@
|
||||
bind:value={args[argName]}
|
||||
type={schema.properties[argName].type}
|
||||
oneOf={schema.properties[argName].oneOf}
|
||||
required={schema.required.includes(argName)}
|
||||
required={schema?.required?.includes(argName)}
|
||||
pattern={schema.properties[argName].pattern}
|
||||
bind:editor={editor[argName]}
|
||||
bind:valid={inputCheck[argName]}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm flex gap-4 items-center font-medium text-primary"
|
||||
><div class="w-[120px]"><IconedResourceType {name} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
@@ -92,16 +93,16 @@
|
||||
</div>
|
||||
</CollapseLink>
|
||||
{:else if name == 'slack'}
|
||||
<CollapseLink text="Instructions">
|
||||
<div class="text-sm text-secondary border p-2">
|
||||
Create a new App <a
|
||||
href="https://api.slack.com/apps?new_app=1"
|
||||
target="_blank">in Slack API Console</a>.
|
||||
Pick "From an app manifest", then YAML and paste manifest template found on <a
|
||||
href="https://www.windmill.dev/docs/misc/setup_oauth#slack"
|
||||
target="_blank">Windmill Docs</a> and then paste Client ID and Client Secret here.
|
||||
</div>
|
||||
</CollapseLink>
|
||||
<CollapseLink text="Instructions">
|
||||
<div class="text-sm text-secondary border p-2">
|
||||
Create a new App <a href="https://api.slack.com/apps?new_app=1" target="_blank"
|
||||
>in Slack API Console</a
|
||||
>. Pick "From an app manifest", then YAML and paste manifest template found on
|
||||
<a href="https://www.windmill.dev/docs/misc/setup_oauth#slack" target="_blank"
|
||||
>Windmill Docs</a
|
||||
> and then paste Client ID and Client Secret here.
|
||||
</div>
|
||||
</CollapseLink>
|
||||
{:else if name == 'microsoft'}
|
||||
<CollapseLink text="Instructions">
|
||||
<div class="text-sm text-secondary border p-2">
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name="okta" after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
||||
><div class="w-[120px]"><IconedResourceType name={'zitadel'} after={true} /></div><Toggle
|
||||
checked={enabled}
|
||||
|
||||
+1
-7
@@ -3,12 +3,7 @@
|
||||
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../../inputType'
|
||||
import type {
|
||||
AppViewerContext,
|
||||
ComponentCustomCSS,
|
||||
RichConfiguration,
|
||||
RichConfigurations
|
||||
} from '../../../types'
|
||||
import type { AppViewerContext, ComponentCustomCSS, RichConfigurations } from '../../../types'
|
||||
import RunnableWrapper from '../../helpers/RunnableWrapper.svelte'
|
||||
|
||||
import { initConfig, initOutput } from '$lib/components/apps/editor/appUtils'
|
||||
@@ -33,7 +28,6 @@
|
||||
export let render: boolean
|
||||
export let customCss: ComponentCustomCSS<'aggridinfinitecomponent'> | undefined = undefined
|
||||
export let actions: TableAction[] | undefined = undefined
|
||||
export let actionsOrder: RichConfiguration | undefined = undefined
|
||||
|
||||
let runnableComponent: RunnableComponent | undefined = undefined
|
||||
|
||||
|
||||
+1
-7
@@ -3,11 +3,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import type { AppInput } from '$lib/components/apps/inputType'
|
||||
import type {
|
||||
ComponentCustomCSS,
|
||||
RichConfiguration,
|
||||
RichConfigurations
|
||||
} from '$lib/components/apps/types'
|
||||
import type { ComponentCustomCSS, RichConfigurations } from '$lib/components/apps/types'
|
||||
|
||||
import 'ag-grid-community/styles/ag-grid.css'
|
||||
import 'ag-grid-community/styles/ag-theme-alpine.css'
|
||||
@@ -23,7 +19,6 @@
|
||||
export let render: boolean
|
||||
export let customCss: ComponentCustomCSS<'aggridinfinitecomponentee'> | undefined = undefined
|
||||
export let actions: TableAction[] = []
|
||||
export let actionsOrder: RichConfiguration | undefined = undefined
|
||||
|
||||
let loaded = false
|
||||
async function load() {
|
||||
@@ -46,7 +41,6 @@
|
||||
{render}
|
||||
{customCss}
|
||||
{actions}
|
||||
{actionsOrder}
|
||||
/>
|
||||
{:else}
|
||||
<Loader2 class="animate-spin" />
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
<style lang="postcss">
|
||||
:global(.ql-toolbar) {
|
||||
@apply rounded-t-md;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
<style lang="postcss">
|
||||
input.currencyInput__formatted {
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 10px;
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<div class="flex gap-2 flex-col">
|
||||
{#each versions ?? [] as version}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class={classNames(
|
||||
'border flex gap-1 truncate justify-between flex-row w-full items-center p-2 rounded-md cursor-pointer hover:bg-blue-50 hover:text-blue-400',
|
||||
|
||||
@@ -403,7 +403,6 @@
|
||||
componentInput={component.componentInput}
|
||||
customCss={component.customCss}
|
||||
actions={component.actions ?? []}
|
||||
actionsOrder={component.actionsOrder ?? undefined}
|
||||
{render}
|
||||
/>
|
||||
{:else if component.type === 'aggridinfinitecomponentee'}
|
||||
@@ -415,7 +414,6 @@
|
||||
componentInput={component.componentInput}
|
||||
customCss={component.customCss}
|
||||
actions={component.actions ?? []}
|
||||
actionsOrder={component.actionsOrder ?? undefined}
|
||||
{render}
|
||||
/>
|
||||
{:else if component.type === 'textcomponent'}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<div class="ml-2 my-2">
|
||||
{#if subGrids.length > 1}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class={classNames(
|
||||
'px-1 py-0.5 flex justify-between items-center font-semibold text-xs border-l border-y w-full cursor-pointer',
|
||||
|
||||
@@ -414,7 +414,6 @@
|
||||
<DecisionTreeGraphEditor
|
||||
bind:nodes={componentSettings.item.data.nodes}
|
||||
bind:component={componentSettings.item.data}
|
||||
rebuildOnChange={componentSettings.item.data.nodes}
|
||||
/>
|
||||
{:else if componentSettings.item.data.type === 'verticalsplitpanescomponent' || componentSettings.item.data.type === 'horizontalsplitpanescomponent'}
|
||||
<GridPane
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
export let component: AppComponent
|
||||
export let nodes: DecisionTreeNode[]
|
||||
export let rebuildOnChange: any = undefined
|
||||
|
||||
let drawer: Drawer | undefined = undefined
|
||||
let paneWidth = 0
|
||||
|
||||
+1
@@ -87,6 +87,7 @@
|
||||
hover:bg-gray-100 focus:bg-gray-100 rounded duration-200 dark:hover:bg-frost-900 dark:focus:bg-frost-900
|
||||
{label === value ? 'text-blue-600 bg-blue-50 pointer-events-none' : ''}"
|
||||
>
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img
|
||||
class="dark:invert"
|
||||
loading="lazy"
|
||||
|
||||
@@ -582,6 +582,7 @@
|
||||
|
||||
<svelte:window on:click={handleClickOutside} on:keydown={handleKeyDown} />
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class={twMerge('svelte-select', containerClasses)}
|
||||
class:disabled
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
$: if (value === undefined) value = ''
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="relative grow {wrapperClass}"
|
||||
on:mouseenter={() => (isHovered = true)}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</Disposable>
|
||||
</ConditionalPortal>
|
||||
|
||||
<style>
|
||||
<style lang="postcss">
|
||||
.drawer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click class="py-1">
|
||||
<span
|
||||
class="text-secondary block px-4 py-2 text-sm hover:bg-surface-hover hover:text-primary"
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
</div>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class="relative bg-surface rounded-md" on:click|stopPropagation={() => {}}>
|
||||
<div
|
||||
class={twMerge(
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<ol class="relative z-20 flex justify-between items-centers text-sm font-medium text-tertiary">
|
||||
{#each tabs ?? [] as step, index}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<li
|
||||
class={classNames(
|
||||
'flex items-center gap-2 px-2 py-1 hover:bg-gray-1200 rounded-md m-0.5',
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
let loading = false
|
||||
export let pickableProperties: PickableProperties | undefined = undefined
|
||||
export let argNames: string[] = []
|
||||
export let schema: Schema
|
||||
export let schema: Schema | { properties?: Record<string, any> } | undefined = undefined
|
||||
|
||||
const { flowStore, selectedId } = getContext<FlowEditorContext>('FlowEditorContext')
|
||||
|
||||
@@ -130,7 +130,7 @@ input_name2: expression2
|
||||
const properties = {
|
||||
...($flowStore.schema?.properties as Record<string, SchemaProperty> | undefined),
|
||||
...newFlowInputs.reduce((acc, x) => {
|
||||
acc[x] = (schema.properties ?? {})[x]
|
||||
acc[x] = (schema?.properties ?? {})[x]
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="px-2 py-1 border flex items-center cursor-pointer bg-surface-secondary text-primary justify-between rounded-md"
|
||||
on:click={(e) => {
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
let val: { argName: string; type: string } | undefined = undefined
|
||||
|
||||
const [k, inputTransform] = x
|
||||
const v = schema.properties[k]
|
||||
const v = schema?.properties[k]
|
||||
|
||||
if (
|
||||
v.format?.includes('resource') &&
|
||||
v?.format?.includes('resource') &&
|
||||
inputTransform.type === 'static' &&
|
||||
(inputTransform.value === '' ||
|
||||
inputTransform.value === undefined ||
|
||||
@@ -66,7 +66,7 @@
|
||||
Object.entries(v.input_transforms)
|
||||
.filter((x) => {
|
||||
const shouldDisplay = hideOptional
|
||||
? $flowStateStore[m.id]?.schema.required?.includes(x[0])
|
||||
? $flowStateStore[m.id]?.schema?.required?.includes(x[0])
|
||||
: true
|
||||
return x[1].type == 'static' && shouldDisplay
|
||||
})
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
$flowInputsStore[module?.id] = {
|
||||
flowStepWarnings: await initFlowStepWarnings(
|
||||
module.value,
|
||||
$flowStateStore?.[module?.id]?.schema ?? {},
|
||||
$flowStateStore?.[module?.id]?.schema,
|
||||
dfs($flowStore.value.modules, (fm) => fm.id)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
argName,
|
||||
flowModule.value,
|
||||
$flowInputsStore[flowModule.id].flowStepWarnings ?? {},
|
||||
$flowStateStore[$selectedId]?.schema ?? {},
|
||||
$flowStateStore[$selectedId]?.schema,
|
||||
dfs($flowStore?.value?.modules ?? [], (fm) => fm.id) ?? []
|
||||
).then((flowStepWarnings) => {
|
||||
$flowInputsStore[flowModule.id].flowStepWarnings = flowStepWarnings
|
||||
@@ -254,7 +254,6 @@
|
||||
flowModule,
|
||||
$selectedId,
|
||||
$flowStateStore[flowModule.id].schema,
|
||||
$flowStore,
|
||||
$pathStore
|
||||
)
|
||||
flowModule = module
|
||||
@@ -500,6 +499,7 @@
|
||||
using `$args[name_of_arg]`</Tooltip
|
||||
>
|
||||
</svelte:fragment>
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
type="text"
|
||||
autofocus
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<div class="h-full overflow-hidden">
|
||||
<FlowCard {noEditor} title="Settings">
|
||||
<div class="h-full flex-1">
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<Tabs bind:selected={$selectedId}>
|
||||
<Tab value="settings-metadata">Metadata</Tab>
|
||||
{#if !noEditor && customUi?.settingsTabs?.schedule != false}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { loadFlowModuleState } from './flowStateUtils'
|
||||
import { emptyFlowModuleState } from './utils'
|
||||
|
||||
export type FlowModuleState = {
|
||||
schema: Schema
|
||||
schema?: Schema
|
||||
previewResult?: any
|
||||
previewArgs?: any
|
||||
}
|
||||
|
||||
@@ -210,8 +210,7 @@ export function emptyModule(flowState: FlowState, fullFlow: OpenFlow, flow?: boo
|
||||
export async function createScriptFromInlineScript(
|
||||
flowModule: FlowModule,
|
||||
suffix: string,
|
||||
schema: Schema,
|
||||
flow: OpenFlow,
|
||||
schema: Schema | undefined,
|
||||
flowPath: string
|
||||
): Promise<[FlowModule & { value: PathScript }, FlowModuleState]> {
|
||||
const user = get(userStore)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let open: boolean | undefined = undefined
|
||||
export let index: number
|
||||
export let flowJobs: string[] | undefined
|
||||
export let flowJobsSuccess: (boolean | undefined)[] | undefined
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
class="absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] trash center-center text-primary
|
||||
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-red-400 hover:text-white
|
||||
hover:border-red-700 {selected ? '' : '!hidden'}"
|
||||
title="Delete"
|
||||
on:click|preventDefault|stopPropagation={(event) =>
|
||||
dispatch('delete', { event, id, type: modType })}
|
||||
>
|
||||
@@ -171,6 +172,7 @@
|
||||
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-blue-400 hover:text-white
|
||||
hover:border-blue-700 {selected ? '' : '!hidden'}"
|
||||
on:click|preventDefault|stopPropagation={(event) => dispatch('move')}
|
||||
title="Move"
|
||||
>
|
||||
<Move class="mx-[3px]" size={14} strokeWidth={2} />
|
||||
</button>
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
$flowInputsStore[module.id] = {
|
||||
flowStepWarnings: await initFlowStepWarnings(
|
||||
module.value,
|
||||
$flowStateStore?.[module.id]?.schema ?? {},
|
||||
$flowStateStore?.[module.id]?.schema,
|
||||
dfs($flowStore.value.modules, (fm) => fm.id)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ export function emptyFlowModuleState(): FlowModuleState {
|
||||
export function isInputFilled(
|
||||
inputTransforms: Record<string, InputTransform>,
|
||||
key: string,
|
||||
schema: Schema
|
||||
schema: Schema | undefined
|
||||
): boolean {
|
||||
const required = schema?.required?.includes(key) ?? false
|
||||
|
||||
@@ -255,7 +255,7 @@ export async function computeFlowStepWarning(
|
||||
type: 'error' | 'warning'
|
||||
}
|
||||
>,
|
||||
schema: Schema,
|
||||
schema: Schema | undefined,
|
||||
moduleIds: string[] = []
|
||||
) {
|
||||
if (messages[argName]) {
|
||||
@@ -264,7 +264,7 @@ export async function computeFlowStepWarning(
|
||||
|
||||
const type = flowModuleValue.type
|
||||
if (type == 'rawscript' || type == 'script' || type == 'flow') {
|
||||
if (!isInputFilled(flowModuleValue.input_transforms, argName, schema ?? {})) {
|
||||
if (!isInputFilled(flowModuleValue.input_transforms, argName, schema)) {
|
||||
messages[argName] = {
|
||||
message: `Input ${argName} is required but not filled`,
|
||||
type: 'warning'
|
||||
@@ -290,7 +290,7 @@ export async function computeFlowStepWarning(
|
||||
|
||||
export async function initFlowStepWarnings(
|
||||
flowModuleValue: FlowModuleValue,
|
||||
schema: Schema,
|
||||
schema: Schema | undefined,
|
||||
moduleIds: string[] = []
|
||||
) {
|
||||
const messages: Record<
|
||||
@@ -305,7 +305,7 @@ export async function initFlowStepWarnings(
|
||||
if (type == 'rawscript' || type == 'script' || type == 'flow') {
|
||||
const keys = Object.keys(flowModuleValue.input_transforms ?? {})
|
||||
const promises = keys.map(async (key) => {
|
||||
await computeFlowStepWarning(key, flowModuleValue, messages, schema ?? {}, moduleIds)
|
||||
await computeFlowStepWarning(key, flowModuleValue, messages, schema, moduleIds)
|
||||
})
|
||||
await Promise.all(promises)
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
</SvelteFlow>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
<style lang="postcss">
|
||||
:global(.svelte-flow__handle) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
/>
|
||||
{#if data.insertable}
|
||||
<button
|
||||
title="Delete branch"
|
||||
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
|
||||
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-red-400 hover:text-white
|
||||
hover:border-red-700"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
/>
|
||||
{#if data.insertable}
|
||||
<button
|
||||
title="Delete branch"
|
||||
class="z-50 absolute -top-[10px] -right-[10px] rounded-full h-[20px] w-[20px] center-center text-primary
|
||||
border-[1.5px] border-gray-700 bg-surface duration-150 hover:bg-red-400 hover:text-white
|
||||
hover:border-red-700"
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<div class="absolute -bottom-10 left-1/2 transform -translate-x-1/2 z-10">
|
||||
{#if (data.value.type === 'branchall' || data.value.type === 'branchone') && data.insertable}
|
||||
<button
|
||||
title="Add branch"
|
||||
class="rounded-full border hover:bg-surface-hover bg-surface p-1"
|
||||
on:click={() => {
|
||||
data?.eventHandlers?.newBranch(data.module)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
export let width = '24px'
|
||||
</script>
|
||||
|
||||
<svg id="azure" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 374.5 377.3" width="20" height="20"
|
||||
<svg id="azure" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 374.5 377.3" {width} {height}
|
||||
><style>
|
||||
.st0-azure {
|
||||
fill: #00bef2;
|
||||
|
||||
@@ -15,11 +15,7 @@
|
||||
style="fill:currentcolor;"
|
||||
><metadata id="metadata25"
|
||||
><rdf:RDF
|
||||
><cc:Work rdf:about=""
|
||||
><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
/><dc:title /></cc:Work
|
||||
></rdf:RDF
|
||||
><cc:Work><dc:format>image/svg+xml</dc:format><dc:type /><dc:title /></cc:Work></rdf:RDF
|
||||
></metadata
|
||||
><defs id="defs23" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
@@ -28,19 +24,8 @@
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview21"
|
||||
showgrid="true"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="210.72257"
|
||||
inkscape:cy="88.813847"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Calque_1"
|
||||
><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4535"
|
||||
@@ -50,13 +35,10 @@
|
||||
>
|
||||
<style type="text/css" id="style2">
|
||||
.st0 {
|
||||
|
||||
}
|
||||
.st1 {
|
||||
|
||||
}
|
||||
.st2 {
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
></span
|
||||
>
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -317,6 +318,7 @@
|
||||
</Tooltip></span
|
||||
>
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -350,6 +352,7 @@
|
||||
{/if}
|
||||
<span class="text-xs absolute -top-4"> Tag </span>
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -383,6 +386,7 @@
|
||||
{/if}
|
||||
<span class="text-xs absolute -top-4"> Schedule Path </span>
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -630,6 +634,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -664,6 +669,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
@@ -698,6 +704,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
autofocus
|
||||
type="text"
|
||||
|
||||
@@ -228,9 +228,4 @@
|
||||
-webkit-appearance: none !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Firefox */
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -141,8 +141,8 @@
|
||||
}
|
||||
|
||||
$flowStateStore[newId] = emptyFlowModuleState()
|
||||
|
||||
$flowStateStore[newId].schema.properties = {
|
||||
let schema = $flowStateStore[newId].schema ?? { properties: {} }
|
||||
schema.properties = {
|
||||
x: {
|
||||
type: 'string',
|
||||
description: '',
|
||||
|
||||
Reference in New Issue
Block a user