poe-svelte-ui-lib 1.14.1 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,29 +68,17 @@
|
|
|
68
68
|
options={$optionsStore.HEADER_OPTIONS}
|
|
69
69
|
onUpdate={(option) => onPropertyChange({ eventHandler: { Header: (option as IOption<string>).value as string } })}
|
|
70
70
|
/>
|
|
71
|
-
{#if Header.value === "SET"}
|
|
72
|
-
<UI.Select
|
|
73
|
-
label={{ name: $T("constructor.props.argument") }}
|
|
74
|
-
type="buttons"
|
|
75
|
-
value={$optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === component.eventHandler.Argument) ??
|
|
76
|
-
$optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === "")}
|
|
77
|
-
options={$optionsStore.FULL_ARGUMENT_OPTION}
|
|
78
|
-
onUpdate={(option) => onPropertyChange({ eventHandler: { Argument: (option as IOption<string>).value as string } })}
|
|
79
|
-
/>
|
|
80
|
-
{/if}
|
|
81
71
|
<UI.Input
|
|
82
|
-
label={{ name:
|
|
83
|
-
wrapperClass="{Header.value === 'SET' ? 'mt-1' : ''} "
|
|
72
|
+
label={{ name: $T("constructor.props.argument") }}
|
|
84
73
|
value={component.eventHandler.Argument}
|
|
85
74
|
maxlength={32}
|
|
86
|
-
disabled={Header.value === "SET" && component.eventHandler.Argument == "Save"}
|
|
87
75
|
help={{ info: $T("constructor.props.argument.info"), autocomplete: "on", regExp: /^[a-zA-Z0-9\-_]{0,32}$/ }}
|
|
88
76
|
onUpdate={(value) => onPropertyChange({ eventHandler: { Argument: value as string } })}
|
|
89
77
|
/>
|
|
90
78
|
{/snippet}
|
|
91
79
|
|
|
92
80
|
{#snippet ButtonVariables()}
|
|
93
|
-
{#if component.eventHandler.Argument !== "
|
|
81
|
+
{#if component.eventHandler.Argument !== "ModCfg" || Header.value === "SET"}
|
|
94
82
|
<UI.Input
|
|
95
83
|
label={{ name: $T("constructor.props.value") }}
|
|
96
84
|
value={component.eventHandler.Value}
|
package/dist/Input/Input.svelte
CHANGED
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
onUpdate(value as number)
|
|
213
213
|
return
|
|
214
214
|
}
|
|
215
|
-
value = Number(value) + (number.step ?? 1)
|
|
215
|
+
value = roundToClean(Number(value) + (number.step ?? 1))
|
|
216
216
|
onUpdate(value as number)
|
|
217
217
|
}}
|
|
218
218
|
aria-label="Увеличить">+</button
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
onUpdate(value as number)
|
|
229
229
|
return
|
|
230
230
|
}
|
|
231
|
-
value = Number(value) - (number.step ?? 1)
|
|
231
|
+
value = roundToClean(Number(value) - (number.step ?? 1))
|
|
232
232
|
|
|
233
233
|
onUpdate(value as number)
|
|
234
234
|
}}
|
|
@@ -56,22 +56,10 @@
|
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
{#snippet SelectArgument()}
|
|
59
|
-
<UI.Select
|
|
60
|
-
label={{ name: $T("constructor.props.argument") }}
|
|
61
|
-
type="buttons"
|
|
62
|
-
value={$optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === component.eventHandler.Argument) ??
|
|
63
|
-
$optionsStore.FULL_ARGUMENT_OPTION.find((h) => h.value === "")}
|
|
64
|
-
options={$optionsStore.FULL_ARGUMENT_OPTION}
|
|
65
|
-
onUpdate={(option) => {
|
|
66
|
-
onPropertyChange({ eventHandler: { Argument: (option as UI.IOption).value as string } })
|
|
67
|
-
}}
|
|
68
|
-
/>
|
|
69
|
-
|
|
70
59
|
<UI.Input
|
|
71
|
-
|
|
60
|
+
label={{ name: $T("constructor.props.argument") }}
|
|
72
61
|
value={component.eventHandler.Argument}
|
|
73
62
|
maxlength={32}
|
|
74
|
-
disabled={component.eventHandler.Argument == "Save"}
|
|
75
63
|
help={{ info: $T("constructor.props.argument.info"), autocomplete: "on", regExp: /^[a-zA-Z0-9\-_]{0,32}$/ }}
|
|
76
64
|
onUpdate={(value) => onPropertyChange({ eventHandler: { Argument: value as string } })}
|
|
77
65
|
/>
|
package/dist/options.d.ts
CHANGED
package/dist/options.js
CHANGED
|
@@ -13,13 +13,9 @@ export const optionsStore = derived(T, ($T) => {
|
|
|
13
13
|
{ id: id(), name: "ER!", value: "ER!" },
|
|
14
14
|
],
|
|
15
15
|
SHORT_ARGUMENT_OPTION: [
|
|
16
|
-
{ id: id(), value: "
|
|
16
|
+
{ id: id(), value: "ModCfg", name: $T("constructor.props.action.save") },
|
|
17
17
|
{ id: id(), value: "NoSend", name: $T("constructor.props.action.nosend") },
|
|
18
18
|
],
|
|
19
|
-
FULL_ARGUMENT_OPTION: [
|
|
20
|
-
{ id: id(), value: "Save", name: $T("constructor.props.action.save") },
|
|
21
|
-
{ id: id(), value: "", name: $T("constructor.props.action.custom") },
|
|
22
|
-
],
|
|
23
19
|
ACCESS_OPTION: [
|
|
24
20
|
{ id: id(), value: "full", name: $T("constructor.props.type.full") },
|
|
25
21
|
{ id: id(), value: "viewOnly", name: $T("constructor.props.type.viewOnly") },
|