diff --git a/frontend/src/lib/common.ts b/frontend/src/lib/common.ts index 2a7830eaa4..674199643d 100644 --- a/frontend/src/lib/common.ts +++ b/frontend/src/lib/common.ts @@ -28,6 +28,11 @@ export interface SchemaProperty { contentEncoding?: 'base64' enum?: string[] } + min?: number + max?: number + currency?: string + currencyLocale?: string + multiselect?: boolean customErrorMessage?: string properties?: { [name: string]: SchemaProperty } required?: string[] @@ -38,6 +43,11 @@ export interface ModalSchemaProperty { description: string name: string required: boolean + min?: number + max?: number + currency?: string + currencyLocale?: string + multiselect?: boolean format?: string pattern?: string enum_?: string[] @@ -60,7 +70,12 @@ export function modalToSchema(schema: ModalSchemaProperty): SchemaProperty { format: schema.format, customErrorMessage: schema.customErrorMessage, properties: schema.schema?.properties, - required: schema.schema?.required + required: schema.schema?.required, + min: schema.min, + max: schema.max, + currency: schema.currency, + currencyLocale: schema.currencyLocale, + multiselect: schema.multiselect } } export type Schema = { diff --git a/frontend/src/lib/components/LightweightArgInput.svelte b/frontend/src/lib/components/LightweightArgInput.svelte index ac347e9912..ffb06cda58 100644 --- a/frontend/src/lib/components/LightweightArgInput.svelte +++ b/frontend/src/lib/components/LightweightArgInput.svelte @@ -16,6 +16,7 @@ import LightweightObjectResourceInput from './LightweightObjectResourceInput.svelte' import DateTimeInput from './DateTimeInput.svelte' import CurrencyInput from './apps/components/inputs/currency/CurrencyInput.svelte' + import Multiselect from 'svelte-multiselect' export let css: ComponentCustomCSS<'schemaformcomponent'> | undefined = undefined export let label: string = '' @@ -37,6 +38,7 @@ type?: 'string' | 'number' | 'bytes' | 'object' contentEncoding?: 'base64' enum?: string[] + multiselect?: string[] } | undefined = undefined export let displayHeader = true @@ -226,73 +228,91 @@ {/if} {:else if inputCat == 'list'}