|
@@ -87,7 +87,7 @@
|
|
|
:value="(arg.type === 'checkbox' || arg.type === 'confirmation') ? undefined : getArgumentValue(arg)"
|
|
:value="(arg.type === 'checkbox' || arg.type === 'confirmation') ? undefined : getArgumentValue(arg)"
|
|
|
:checked="(arg.type === 'checkbox' || arg.type === 'confirmation') ? getArgumentValue(arg) : undefined"
|
|
:checked="(arg.type === 'checkbox' || arg.type === 'confirmation') ? getArgumentValue(arg) : undefined"
|
|
|
:list="(arg.suggestions || getBrowserSuggestions(arg).length > 0) ? argumentFieldChoicesId(arg.name) : undefined"
|
|
:list="(arg.suggestions || getBrowserSuggestions(arg).length > 0) ? argumentFieldChoicesId(arg.name) : undefined"
|
|
|
- :type="getInputComponent(arg) !== 'select' ? getInputType(arg) : undefined"
|
|
|
|
|
|
|
+ :type="getInputComponent(arg) !== 'select' ? argumentInputType(arg) : undefined"
|
|
|
:rows="arg.type === 'raw_string_multiline' ? 5 : undefined"
|
|
:rows="arg.type === 'raw_string_multiline' ? 5 : undefined"
|
|
|
:step="arg.type === 'datetime' ? 1 : undefined"
|
|
:step="arg.type === 'datetime' ? 1 : undefined"
|
|
|
:pattern="getPattern(arg)"
|
|
:pattern="getPattern(arg)"
|
|
@@ -158,6 +158,7 @@ import {
|
|
|
argumentFieldId,
|
|
argumentFieldId,
|
|
|
argumentFieldValidationElementId
|
|
argumentFieldValidationElementId
|
|
|
} from '../utils/argumentFieldIds.js'
|
|
} from '../utils/argumentFieldIds.js'
|
|
|
|
|
+import { argumentInputType } from '../utils/argumentInputType.js'
|
|
|
import { getInitialArgumentValue, readPrefilledArgumentsFromNavigation } from '../utils/prefilledArguments.js'
|
|
import { getInitialArgumentValue, readPrefilledArgumentsFromNavigation } from '../utils/prefilledArguments.js'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -285,26 +286,6 @@ function getInputComponent (arg) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getInputType (arg) {
|
|
|
|
|
- if (arg.type === 'html' || arg.type === 'raw_string_multiline' || arg.type === 'select') {
|
|
|
|
|
- return undefined
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (arg.type === 'confirmation') {
|
|
|
|
|
- return 'checkbox'
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (arg.type === 'ascii_identifier' || arg.type === 'dnsname' || arg.type === 'shell_safe_identifier' || arg.type === 'ascii' || arg.type === 'ascii_sentence') {
|
|
|
|
|
- return 'text'
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (arg.type === 'datetime') {
|
|
|
|
|
- return 'datetime-local'
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return arg.type
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
function getPattern (arg) {
|
|
function getPattern (arg) {
|
|
|
if (arg.type && arg.type.startsWith('regex:')) {
|
|
if (arg.type && arg.type.startsWith('regex:')) {
|
|
|
return arg.type.replace('regex:', '')
|
|
return arg.type.replace('regex:', '')
|